repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/domainservices/getService.go | sdk/go/azure/domainservices/getService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package domainservices
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets information about an Active Directory Domain Service.
//
// > **Note:** At present this data source only supports **User Forest** mode and _not_ **Resource Forest** mode. [Read more](https://docs.microsoft.com/azure/active-directory-domain-services/concepts-resource-forest) about the different operation modes for this service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/domainservices"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := domainservices.LookupService(ctx, &domainservices.LookupServiceArgs{
// Name: "example-aadds",
// ResourceGroupName: "example-aadds-rg",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.AAD` - 2021-05-01
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServiceResult
err := ctx.Invoke("azure:domainservices/getService:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getService.
type LookupServiceArgs struct {
// The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
Name string `pulumi:"name"`
// The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getService.
type LookupServiceResult struct {
// A unique ID for the managed domain deployment.
DeploymentId string `pulumi:"deploymentId"`
// The forest type used by the managed domain. One of `ResourceTrusting`, for a _Resource Forest_, or blank, for a _User Forest_.
DomainConfigurationType string `pulumi:"domainConfigurationType"`
// The Active Directory domain of the Domain Service. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
DomainName string `pulumi:"domainName"`
// Whether group-based filtered sync (also called scoped synchronisation) is enabled.
FilteredSyncEnabled bool `pulumi:"filteredSyncEnabled"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure location in which the replica set resides.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// A `notifications` block as defined below.
Notifications []GetServiceNotification `pulumi:"notifications"`
// One or more `replicaSet` blocks as defined below.
ReplicaSets []GetServiceReplicaSet `pulumi:"replicaSets"`
ResourceGroupName string `pulumi:"resourceGroupName"`
ResourceId string `pulumi:"resourceId"`
// A `secureLdap` block as defined below.
SecureLdaps []GetServiceSecureLdap `pulumi:"secureLdaps"`
// A `security` block as defined below.
Securities []GetServiceSecurity `pulumi:"securities"`
// The SKU of the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
Sku string `pulumi:"sku"`
SyncOwner string `pulumi:"syncOwner"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
TenantId string `pulumi:"tenantId"`
Version int `pulumi:"version"`
}
func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupServiceResultOutput, error) {
args := v.(LookupServiceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:domainservices/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil
}).(LookupServiceResultOutput)
}
// A collection of arguments for invoking getService.
type LookupServiceOutputArgs struct {
// The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (LookupServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem()
}
// A collection of values returned by getService.
type LookupServiceResultOutput struct{ *pulumi.OutputState }
func (LookupServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceResult)(nil)).Elem()
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput {
return o
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput {
return o
}
// A unique ID for the managed domain deployment.
func (o LookupServiceResultOutput) DeploymentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.DeploymentId }).(pulumi.StringOutput)
}
// The forest type used by the managed domain. One of `ResourceTrusting`, for a _Resource Forest_, or blank, for a _User Forest_.
func (o LookupServiceResultOutput) DomainConfigurationType() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.DomainConfigurationType }).(pulumi.StringOutput)
}
// The Active Directory domain of the Domain Service. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations.
func (o LookupServiceResultOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.DomainName }).(pulumi.StringOutput)
}
// Whether group-based filtered sync (also called scoped synchronisation) is enabled.
func (o LookupServiceResultOutput) FilteredSyncEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.FilteredSyncEnabled }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure location in which the replica set resides.
func (o LookupServiceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `notifications` block as defined below.
func (o LookupServiceResultOutput) Notifications() GetServiceNotificationArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []GetServiceNotification { return v.Notifications }).(GetServiceNotificationArrayOutput)
}
// One or more `replicaSet` blocks as defined below.
func (o LookupServiceResultOutput) ReplicaSets() GetServiceReplicaSetArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []GetServiceReplicaSet { return v.ReplicaSets }).(GetServiceReplicaSetArrayOutput)
}
func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) ResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceId }).(pulumi.StringOutput)
}
// A `secureLdap` block as defined below.
func (o LookupServiceResultOutput) SecureLdaps() GetServiceSecureLdapArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []GetServiceSecureLdap { return v.SecureLdaps }).(GetServiceSecureLdapArrayOutput)
}
// A `security` block as defined below.
func (o LookupServiceResultOutput) Securities() GetServiceSecurityArrayOutput {
return o.ApplyT(func(v LookupServiceResult) []GetServiceSecurity { return v.Securities }).(GetServiceSecurityArrayOutput)
}
// The SKU of the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`.
func (o LookupServiceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Sku }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) SyncOwner() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.SyncOwner }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func (o LookupServiceResultOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.TenantId }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) Version() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.Version }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServiceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/domainservices/serviceTrust.go | sdk/go/azure/domainservices/serviceTrust.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package domainservices
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Active Directory Domain Service Trust.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/domainservices"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := domainservices.LookupService(ctx, &domainservices.LookupServiceArgs{
// Name: "example-ds",
// ResourceGroupName: "example-rg",
// }, nil)
// if err != nil {
// return err
// }
// _, err = domainservices.NewServiceTrust(ctx, "example", &domainservices.ServiceTrustArgs{
// Name: pulumi.String("example-trust"),
// DomainServiceId: pulumi.String(example.Id),
// TrustedDomainFqdn: pulumi.String("example.com"),
// TrustedDomainDnsIps: pulumi.StringArray{
// pulumi.String("10.1.0.3"),
// pulumi.String("10.1.0.4"),
// },
// Password: pulumi.String("Password123"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AAD` - 2021-05-01
//
// ## Import
//
// Active Directory Domain Service Trusts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:domainservices/serviceTrust:ServiceTrust example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AAD/domainServices/DomainService1/trusts/trust1
// ```
type ServiceTrust struct {
pulumi.CustomResourceState
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
DomainServiceId pulumi.StringOutput `pulumi:"domainServiceId"`
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
Password pulumi.StringOutput `pulumi:"password"`
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
TrustedDomainDnsIps pulumi.StringArrayOutput `pulumi:"trustedDomainDnsIps"`
// The FQDN of the on-premise Active Directory Domain Service.
TrustedDomainFqdn pulumi.StringOutput `pulumi:"trustedDomainFqdn"`
}
// NewServiceTrust registers a new resource with the given unique name, arguments, and options.
func NewServiceTrust(ctx *pulumi.Context,
name string, args *ServiceTrustArgs, opts ...pulumi.ResourceOption) (*ServiceTrust, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DomainServiceId == nil {
return nil, errors.New("invalid value for required argument 'DomainServiceId'")
}
if args.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.TrustedDomainDnsIps == nil {
return nil, errors.New("invalid value for required argument 'TrustedDomainDnsIps'")
}
if args.TrustedDomainFqdn == nil {
return nil, errors.New("invalid value for required argument 'TrustedDomainFqdn'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceTrust
err := ctx.RegisterResource("azure:domainservices/serviceTrust:ServiceTrust", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceTrust gets an existing ServiceTrust resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServiceTrust(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceTrustState, opts ...pulumi.ResourceOption) (*ServiceTrust, error) {
var resource ServiceTrust
err := ctx.ReadResource("azure:domainservices/serviceTrust:ServiceTrust", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceTrust resources.
type serviceTrustState struct {
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
DomainServiceId *string `pulumi:"domainServiceId"`
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
Name *string `pulumi:"name"`
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
Password *string `pulumi:"password"`
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
TrustedDomainDnsIps []string `pulumi:"trustedDomainDnsIps"`
// The FQDN of the on-premise Active Directory Domain Service.
TrustedDomainFqdn *string `pulumi:"trustedDomainFqdn"`
}
type ServiceTrustState struct {
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
DomainServiceId pulumi.StringPtrInput
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
Name pulumi.StringPtrInput
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
Password pulumi.StringPtrInput
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
TrustedDomainDnsIps pulumi.StringArrayInput
// The FQDN of the on-premise Active Directory Domain Service.
TrustedDomainFqdn pulumi.StringPtrInput
}
func (ServiceTrustState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceTrustState)(nil)).Elem()
}
type serviceTrustArgs struct {
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
DomainServiceId string `pulumi:"domainServiceId"`
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
Name *string `pulumi:"name"`
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
Password string `pulumi:"password"`
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
TrustedDomainDnsIps []string `pulumi:"trustedDomainDnsIps"`
// The FQDN of the on-premise Active Directory Domain Service.
TrustedDomainFqdn string `pulumi:"trustedDomainFqdn"`
}
// The set of arguments for constructing a ServiceTrust resource.
type ServiceTrustArgs struct {
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
DomainServiceId pulumi.StringInput
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
Name pulumi.StringPtrInput
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
Password pulumi.StringInput
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
TrustedDomainDnsIps pulumi.StringArrayInput
// The FQDN of the on-premise Active Directory Domain Service.
TrustedDomainFqdn pulumi.StringInput
}
func (ServiceTrustArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceTrustArgs)(nil)).Elem()
}
type ServiceTrustInput interface {
pulumi.Input
ToServiceTrustOutput() ServiceTrustOutput
ToServiceTrustOutputWithContext(ctx context.Context) ServiceTrustOutput
}
func (*ServiceTrust) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceTrust)(nil)).Elem()
}
func (i *ServiceTrust) ToServiceTrustOutput() ServiceTrustOutput {
return i.ToServiceTrustOutputWithContext(context.Background())
}
func (i *ServiceTrust) ToServiceTrustOutputWithContext(ctx context.Context) ServiceTrustOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceTrustOutput)
}
// ServiceTrustArrayInput is an input type that accepts ServiceTrustArray and ServiceTrustArrayOutput values.
// You can construct a concrete instance of `ServiceTrustArrayInput` via:
//
// ServiceTrustArray{ ServiceTrustArgs{...} }
type ServiceTrustArrayInput interface {
pulumi.Input
ToServiceTrustArrayOutput() ServiceTrustArrayOutput
ToServiceTrustArrayOutputWithContext(context.Context) ServiceTrustArrayOutput
}
type ServiceTrustArray []ServiceTrustInput
func (ServiceTrustArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceTrust)(nil)).Elem()
}
func (i ServiceTrustArray) ToServiceTrustArrayOutput() ServiceTrustArrayOutput {
return i.ToServiceTrustArrayOutputWithContext(context.Background())
}
func (i ServiceTrustArray) ToServiceTrustArrayOutputWithContext(ctx context.Context) ServiceTrustArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceTrustArrayOutput)
}
// ServiceTrustMapInput is an input type that accepts ServiceTrustMap and ServiceTrustMapOutput values.
// You can construct a concrete instance of `ServiceTrustMapInput` via:
//
// ServiceTrustMap{ "key": ServiceTrustArgs{...} }
type ServiceTrustMapInput interface {
pulumi.Input
ToServiceTrustMapOutput() ServiceTrustMapOutput
ToServiceTrustMapOutputWithContext(context.Context) ServiceTrustMapOutput
}
type ServiceTrustMap map[string]ServiceTrustInput
func (ServiceTrustMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceTrust)(nil)).Elem()
}
func (i ServiceTrustMap) ToServiceTrustMapOutput() ServiceTrustMapOutput {
return i.ToServiceTrustMapOutputWithContext(context.Background())
}
func (i ServiceTrustMap) ToServiceTrustMapOutputWithContext(ctx context.Context) ServiceTrustMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceTrustMapOutput)
}
type ServiceTrustOutput struct{ *pulumi.OutputState }
func (ServiceTrustOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceTrust)(nil)).Elem()
}
func (o ServiceTrustOutput) ToServiceTrustOutput() ServiceTrustOutput {
return o
}
func (o ServiceTrustOutput) ToServiceTrustOutputWithContext(ctx context.Context) ServiceTrustOutput {
return o
}
// The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
func (o ServiceTrustOutput) DomainServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceTrust) pulumi.StringOutput { return v.DomainServiceId }).(pulumi.StringOutput)
}
// The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
func (o ServiceTrustOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceTrust) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The password of the inbound trust set in the on-premise Active Directory Domain Service.
func (o ServiceTrustOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceTrust) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
func (o ServiceTrustOutput) TrustedDomainDnsIps() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServiceTrust) pulumi.StringArrayOutput { return v.TrustedDomainDnsIps }).(pulumi.StringArrayOutput)
}
// The FQDN of the on-premise Active Directory Domain Service.
func (o ServiceTrustOutput) TrustedDomainFqdn() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceTrust) pulumi.StringOutput { return v.TrustedDomainFqdn }).(pulumi.StringOutput)
}
type ServiceTrustArrayOutput struct{ *pulumi.OutputState }
func (ServiceTrustArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceTrust)(nil)).Elem()
}
func (o ServiceTrustArrayOutput) ToServiceTrustArrayOutput() ServiceTrustArrayOutput {
return o
}
func (o ServiceTrustArrayOutput) ToServiceTrustArrayOutputWithContext(ctx context.Context) ServiceTrustArrayOutput {
return o
}
func (o ServiceTrustArrayOutput) Index(i pulumi.IntInput) ServiceTrustOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceTrust {
return vs[0].([]*ServiceTrust)[vs[1].(int)]
}).(ServiceTrustOutput)
}
type ServiceTrustMapOutput struct{ *pulumi.OutputState }
func (ServiceTrustMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceTrust)(nil)).Elem()
}
func (o ServiceTrustMapOutput) ToServiceTrustMapOutput() ServiceTrustMapOutput {
return o
}
func (o ServiceTrustMapOutput) ToServiceTrustMapOutputWithContext(ctx context.Context) ServiceTrustMapOutput {
return o
}
func (o ServiceTrustMapOutput) MapIndex(k pulumi.StringInput) ServiceTrustOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceTrust {
return vs[0].(map[string]*ServiceTrust)[vs[1].(string)]
}).(ServiceTrustOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceTrustInput)(nil)).Elem(), &ServiceTrust{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceTrustArrayInput)(nil)).Elem(), ServiceTrustArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceTrustMapInput)(nil)).Elem(), ServiceTrustMap{})
pulumi.RegisterOutputType(ServiceTrustOutput{})
pulumi.RegisterOutputType(ServiceTrustArrayOutput{})
pulumi.RegisterOutputType(ServiceTrustMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/fabric/init.go | sdk/go/azure/fabric/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package fabric
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:fabric/capacity:Capacity":
r = &Capacity{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"fabric/capacity",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/fabric/pulumiTypes.go | sdk/go/azure/fabric/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package fabric
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type CapacitySku struct {
// The name of the SKU to use for the Fabric Capacity. Possible values are `F2`, `F4`, `F8`, `F16`, `F32`, `F64`, `F128`, `F256`, `F512`, `F1024`, `F2048`.
Name string `pulumi:"name"`
// The tier of the SKU to use for the Fabric Capacity. The only possible value is `Fabric`.
Tier string `pulumi:"tier"`
}
// CapacitySkuInput is an input type that accepts CapacitySkuArgs and CapacitySkuOutput values.
// You can construct a concrete instance of `CapacitySkuInput` via:
//
// CapacitySkuArgs{...}
type CapacitySkuInput interface {
pulumi.Input
ToCapacitySkuOutput() CapacitySkuOutput
ToCapacitySkuOutputWithContext(context.Context) CapacitySkuOutput
}
type CapacitySkuArgs struct {
// The name of the SKU to use for the Fabric Capacity. Possible values are `F2`, `F4`, `F8`, `F16`, `F32`, `F64`, `F128`, `F256`, `F512`, `F1024`, `F2048`.
Name pulumi.StringInput `pulumi:"name"`
// The tier of the SKU to use for the Fabric Capacity. The only possible value is `Fabric`.
Tier pulumi.StringInput `pulumi:"tier"`
}
func (CapacitySkuArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CapacitySku)(nil)).Elem()
}
func (i CapacitySkuArgs) ToCapacitySkuOutput() CapacitySkuOutput {
return i.ToCapacitySkuOutputWithContext(context.Background())
}
func (i CapacitySkuArgs) ToCapacitySkuOutputWithContext(ctx context.Context) CapacitySkuOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacitySkuOutput)
}
func (i CapacitySkuArgs) ToCapacitySkuPtrOutput() CapacitySkuPtrOutput {
return i.ToCapacitySkuPtrOutputWithContext(context.Background())
}
func (i CapacitySkuArgs) ToCapacitySkuPtrOutputWithContext(ctx context.Context) CapacitySkuPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacitySkuOutput).ToCapacitySkuPtrOutputWithContext(ctx)
}
// CapacitySkuPtrInput is an input type that accepts CapacitySkuArgs, CapacitySkuPtr and CapacitySkuPtrOutput values.
// You can construct a concrete instance of `CapacitySkuPtrInput` via:
//
// CapacitySkuArgs{...}
//
// or:
//
// nil
type CapacitySkuPtrInput interface {
pulumi.Input
ToCapacitySkuPtrOutput() CapacitySkuPtrOutput
ToCapacitySkuPtrOutputWithContext(context.Context) CapacitySkuPtrOutput
}
type capacitySkuPtrType CapacitySkuArgs
func CapacitySkuPtr(v *CapacitySkuArgs) CapacitySkuPtrInput {
return (*capacitySkuPtrType)(v)
}
func (*capacitySkuPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CapacitySku)(nil)).Elem()
}
func (i *capacitySkuPtrType) ToCapacitySkuPtrOutput() CapacitySkuPtrOutput {
return i.ToCapacitySkuPtrOutputWithContext(context.Background())
}
func (i *capacitySkuPtrType) ToCapacitySkuPtrOutputWithContext(ctx context.Context) CapacitySkuPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacitySkuPtrOutput)
}
type CapacitySkuOutput struct{ *pulumi.OutputState }
func (CapacitySkuOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CapacitySku)(nil)).Elem()
}
func (o CapacitySkuOutput) ToCapacitySkuOutput() CapacitySkuOutput {
return o
}
func (o CapacitySkuOutput) ToCapacitySkuOutputWithContext(ctx context.Context) CapacitySkuOutput {
return o
}
func (o CapacitySkuOutput) ToCapacitySkuPtrOutput() CapacitySkuPtrOutput {
return o.ToCapacitySkuPtrOutputWithContext(context.Background())
}
func (o CapacitySkuOutput) ToCapacitySkuPtrOutputWithContext(ctx context.Context) CapacitySkuPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CapacitySku) *CapacitySku {
return &v
}).(CapacitySkuPtrOutput)
}
// The name of the SKU to use for the Fabric Capacity. Possible values are `F2`, `F4`, `F8`, `F16`, `F32`, `F64`, `F128`, `F256`, `F512`, `F1024`, `F2048`.
func (o CapacitySkuOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v CapacitySku) string { return v.Name }).(pulumi.StringOutput)
}
// The tier of the SKU to use for the Fabric Capacity. The only possible value is `Fabric`.
func (o CapacitySkuOutput) Tier() pulumi.StringOutput {
return o.ApplyT(func(v CapacitySku) string { return v.Tier }).(pulumi.StringOutput)
}
type CapacitySkuPtrOutput struct{ *pulumi.OutputState }
func (CapacitySkuPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CapacitySku)(nil)).Elem()
}
func (o CapacitySkuPtrOutput) ToCapacitySkuPtrOutput() CapacitySkuPtrOutput {
return o
}
func (o CapacitySkuPtrOutput) ToCapacitySkuPtrOutputWithContext(ctx context.Context) CapacitySkuPtrOutput {
return o
}
func (o CapacitySkuPtrOutput) Elem() CapacitySkuOutput {
return o.ApplyT(func(v *CapacitySku) CapacitySku {
if v != nil {
return *v
}
var ret CapacitySku
return ret
}).(CapacitySkuOutput)
}
// The name of the SKU to use for the Fabric Capacity. Possible values are `F2`, `F4`, `F8`, `F16`, `F32`, `F64`, `F128`, `F256`, `F512`, `F1024`, `F2048`.
func (o CapacitySkuPtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacitySku) *string {
if v == nil {
return nil
}
return &v.Name
}).(pulumi.StringPtrOutput)
}
// The tier of the SKU to use for the Fabric Capacity. The only possible value is `Fabric`.
func (o CapacitySkuPtrOutput) Tier() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CapacitySku) *string {
if v == nil {
return nil
}
return &v.Tier
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CapacitySkuInput)(nil)).Elem(), CapacitySkuArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*CapacitySkuPtrInput)(nil)).Elem(), CapacitySkuArgs{})
pulumi.RegisterOutputType(CapacitySkuOutput{})
pulumi.RegisterOutputType(CapacitySkuPtrOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/fabric/capacity.go | sdk/go/azure/fabric/capacity.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package fabric
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Fabric Capacity.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/fabric"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = fabric.NewCapacity(ctx, "example", &fabric.CapacityArgs{
// Name: pulumi.String("exampleffc"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// AdministrationMembers: pulumi.StringArray{
// pulumi.String(current.ObjectId),
// },
// Sku: &fabric.CapacitySkuArgs{
// Name: pulumi.String("F32"),
// Tier: pulumi.String("Fabric"),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Fabric` - 2023-11-01
//
// ## Import
//
// Fabric Capacities can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:fabric/capacity:Capacity example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Fabric/capacities/capacity1
// ```
type Capacity struct {
pulumi.CustomResourceState
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
AdministrationMembers pulumi.StringArrayOutput `pulumi:"administrationMembers"`
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku CapacitySkuOutput `pulumi:"sku"`
// A mapping of tags to assign to the Fabric Capacity.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewCapacity registers a new resource with the given unique name, arguments, and options.
func NewCapacity(ctx *pulumi.Context,
name string, args *CapacityArgs, opts ...pulumi.ResourceOption) (*Capacity, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Capacity
err := ctx.RegisterResource("azure:fabric/capacity:Capacity", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCapacity gets an existing Capacity resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCapacity(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CapacityState, opts ...pulumi.ResourceOption) (*Capacity, error) {
var resource Capacity
err := ctx.ReadResource("azure:fabric/capacity:Capacity", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Capacity resources.
type capacityState struct {
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
AdministrationMembers []string `pulumi:"administrationMembers"`
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku *CapacitySku `pulumi:"sku"`
// A mapping of tags to assign to the Fabric Capacity.
Tags map[string]string `pulumi:"tags"`
}
type CapacityState struct {
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
AdministrationMembers pulumi.StringArrayInput
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku CapacitySkuPtrInput
// A mapping of tags to assign to the Fabric Capacity.
Tags pulumi.StringMapInput
}
func (CapacityState) ElementType() reflect.Type {
return reflect.TypeOf((*capacityState)(nil)).Elem()
}
type capacityArgs struct {
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
AdministrationMembers []string `pulumi:"administrationMembers"`
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku CapacitySku `pulumi:"sku"`
// A mapping of tags to assign to the Fabric Capacity.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Capacity resource.
type CapacityArgs struct {
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
AdministrationMembers pulumi.StringArrayInput
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `sku` block as defined below.
Sku CapacitySkuInput
// A mapping of tags to assign to the Fabric Capacity.
Tags pulumi.StringMapInput
}
func (CapacityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*capacityArgs)(nil)).Elem()
}
type CapacityInput interface {
pulumi.Input
ToCapacityOutput() CapacityOutput
ToCapacityOutputWithContext(ctx context.Context) CapacityOutput
}
func (*Capacity) ElementType() reflect.Type {
return reflect.TypeOf((**Capacity)(nil)).Elem()
}
func (i *Capacity) ToCapacityOutput() CapacityOutput {
return i.ToCapacityOutputWithContext(context.Background())
}
func (i *Capacity) ToCapacityOutputWithContext(ctx context.Context) CapacityOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityOutput)
}
// CapacityArrayInput is an input type that accepts CapacityArray and CapacityArrayOutput values.
// You can construct a concrete instance of `CapacityArrayInput` via:
//
// CapacityArray{ CapacityArgs{...} }
type CapacityArrayInput interface {
pulumi.Input
ToCapacityArrayOutput() CapacityArrayOutput
ToCapacityArrayOutputWithContext(context.Context) CapacityArrayOutput
}
type CapacityArray []CapacityInput
func (CapacityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Capacity)(nil)).Elem()
}
func (i CapacityArray) ToCapacityArrayOutput() CapacityArrayOutput {
return i.ToCapacityArrayOutputWithContext(context.Background())
}
func (i CapacityArray) ToCapacityArrayOutputWithContext(ctx context.Context) CapacityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityArrayOutput)
}
// CapacityMapInput is an input type that accepts CapacityMap and CapacityMapOutput values.
// You can construct a concrete instance of `CapacityMapInput` via:
//
// CapacityMap{ "key": CapacityArgs{...} }
type CapacityMapInput interface {
pulumi.Input
ToCapacityMapOutput() CapacityMapOutput
ToCapacityMapOutputWithContext(context.Context) CapacityMapOutput
}
type CapacityMap map[string]CapacityInput
func (CapacityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Capacity)(nil)).Elem()
}
func (i CapacityMap) ToCapacityMapOutput() CapacityMapOutput {
return i.ToCapacityMapOutputWithContext(context.Background())
}
func (i CapacityMap) ToCapacityMapOutputWithContext(ctx context.Context) CapacityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CapacityMapOutput)
}
type CapacityOutput struct{ *pulumi.OutputState }
func (CapacityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Capacity)(nil)).Elem()
}
func (o CapacityOutput) ToCapacityOutput() CapacityOutput {
return o
}
func (o CapacityOutput) ToCapacityOutputWithContext(ctx context.Context) CapacityOutput {
return o
}
// An array of administrator user identities. The member must be an Entra user or a service principal.
//
// > **Note:** If the member is an Entra user, use user principal name (UPN) format. If the user is a service principal, use object ID.
func (o CapacityOutput) AdministrationMembers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Capacity) pulumi.StringArrayOutput { return v.AdministrationMembers }).(pulumi.StringArrayOutput)
}
// The supported Azure location where the Fabric Capacity exists. Changing this forces a new resource to be created.
func (o CapacityOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Capacity) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for the Fabric Capacity. Changing this forces a new resource to be created.
func (o CapacityOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Capacity) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group in which to create the Fabric Capacity. Changing this forces a new resource to be created.
func (o CapacityOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Capacity) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `sku` block as defined below.
func (o CapacityOutput) Sku() CapacitySkuOutput {
return o.ApplyT(func(v *Capacity) CapacitySkuOutput { return v.Sku }).(CapacitySkuOutput)
}
// A mapping of tags to assign to the Fabric Capacity.
func (o CapacityOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Capacity) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type CapacityArrayOutput struct{ *pulumi.OutputState }
func (CapacityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Capacity)(nil)).Elem()
}
func (o CapacityArrayOutput) ToCapacityArrayOutput() CapacityArrayOutput {
return o
}
func (o CapacityArrayOutput) ToCapacityArrayOutputWithContext(ctx context.Context) CapacityArrayOutput {
return o
}
func (o CapacityArrayOutput) Index(i pulumi.IntInput) CapacityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Capacity {
return vs[0].([]*Capacity)[vs[1].(int)]
}).(CapacityOutput)
}
type CapacityMapOutput struct{ *pulumi.OutputState }
func (CapacityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Capacity)(nil)).Elem()
}
func (o CapacityMapOutput) ToCapacityMapOutput() CapacityMapOutput {
return o
}
func (o CapacityMapOutput) ToCapacityMapOutputWithContext(ctx context.Context) CapacityMapOutput {
return o
}
func (o CapacityMapOutput) MapIndex(k pulumi.StringInput) CapacityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Capacity {
return vs[0].(map[string]*Capacity)[vs[1].(string)]
}).(CapacityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CapacityInput)(nil)).Elem(), &Capacity{})
pulumi.RegisterInputType(reflect.TypeOf((*CapacityArrayInput)(nil)).Elem(), CapacityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CapacityMapInput)(nil)).Elem(), CapacityMap{})
pulumi.RegisterOutputType(CapacityOutput{})
pulumi.RegisterOutputType(CapacityArrayOutput{})
pulumi.RegisterOutputType(CapacityMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudGateway.go | sdk/go/azure/appplatform/springCloudGateway.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// Manages a Spring Cloud Gateway.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudGateway` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// HttpsOnly: pulumi.Bool(false),
// PublicNetworkAccessEnabled: pulumi.Bool(true),
// InstanceCount: pulumi.Int(2),
// ApiMetadata: &appplatform.SpringCloudGatewayApiMetadataArgs{
// Description: pulumi.String("example description"),
// DocumentationUrl: pulumi.String("https://www.example.com/docs"),
// ServerUrl: pulumi.String("https://wwww.example.com"),
// Title: pulumi.String("example title"),
// Version: pulumi.String("1.0"),
// },
// Cors: &appplatform.SpringCloudGatewayCorsArgs{
// CredentialsAllowed: pulumi.Bool(false),
// AllowedHeaders: pulumi.StringArray{
// pulumi.String("*"),
// },
// AllowedMethods: pulumi.StringArray{
// pulumi.String("PUT"),
// },
// AllowedOrigins: pulumi.StringArray{
// pulumi.String("example.com"),
// },
// ExposedHeaders: pulumi.StringArray{
// pulumi.String("x-example-header"),
// },
// MaxAgeSeconds: pulumi.Int(86400),
// },
// Quota: &appplatform.SpringCloudGatewayQuotaArgs{
// Cpu: pulumi.String("1"),
// Memory: pulumi.String("2Gi"),
// },
// Sso: &appplatform.SpringCloudGatewaySsoArgs{
// ClientId: pulumi.String("example id"),
// ClientSecret: pulumi.String("example secret"),
// IssuerUri: pulumi.String("https://www.test.com/issueToken"),
// Scopes: pulumi.StringArray{
// pulumi.String("read"),
// },
// },
// LocalResponseCachePerInstance: &appplatform.SpringCloudGatewayLocalResponseCachePerInstanceArgs{
// Size: pulumi.String("100MB"),
// TimeToLive: pulumi.String("30s"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Gateways can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudGateway:SpringCloudGateway example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/gateways/gateway1
// ```
type SpringCloudGateway struct {
pulumi.CustomResourceState
// A `apiMetadata` block as defined below.
ApiMetadata SpringCloudGatewayApiMetadataPtrOutput `pulumi:"apiMetadata"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayOutput `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
ApplicationPerformanceMonitoringTypes pulumi.StringArrayOutput `pulumi:"applicationPerformanceMonitoringTypes"`
// A `clientAuthorization` block as defined below.
ClientAuthorization SpringCloudGatewayClientAuthorizationPtrOutput `pulumi:"clientAuthorization"`
// A `cors` block as defined below.
Cors SpringCloudGatewayCorsPtrOutput `pulumi:"cors"`
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapOutput `pulumi:"environmentVariables"`
// is only https is allowed?
HttpsOnly pulumi.BoolPtrOutput `pulumi:"httpsOnly"`
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrOutput `pulumi:"instanceCount"`
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerInstance SpringCloudGatewayLocalResponseCachePerInstancePtrOutput `pulumi:"localResponseCachePerInstance"`
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerRoute SpringCloudGatewayLocalResponseCachePerRoutePtrOutput `pulumi:"localResponseCachePerRoute"`
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
Name pulumi.StringOutput `pulumi:"name"`
// Indicates whether the Spring Cloud Gateway exposes endpoint.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// A `quota` block as defined below.
Quota SpringCloudGatewayQuotaOutput `pulumi:"quota"`
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
SensitiveEnvironmentVariables pulumi.StringMapOutput `pulumi:"sensitiveEnvironmentVariables"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso SpringCloudGatewaySsoPtrOutput `pulumi:"sso"`
// URL of the Spring Cloud Gateway, exposed when 'public_network_access_enabled' is true.
Url pulumi.StringOutput `pulumi:"url"`
}
// NewSpringCloudGateway registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudGateway(ctx *pulumi.Context,
name string, args *SpringCloudGatewayArgs, opts ...pulumi.ResourceOption) (*SpringCloudGateway, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.SensitiveEnvironmentVariables != nil {
args.SensitiveEnvironmentVariables = pulumi.ToSecret(args.SensitiveEnvironmentVariables).(pulumi.StringMapInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"sensitiveEnvironmentVariables",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudGateway
err := ctx.RegisterResource("azure:appplatform/springCloudGateway:SpringCloudGateway", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudGateway gets an existing SpringCloudGateway resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudGateway(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudGatewayState, opts ...pulumi.ResourceOption) (*SpringCloudGateway, error) {
var resource SpringCloudGateway
err := ctx.ReadResource("azure:appplatform/springCloudGateway:SpringCloudGateway", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudGateway resources.
type springCloudGatewayState struct {
// A `apiMetadata` block as defined below.
ApiMetadata *SpringCloudGatewayApiMetadata `pulumi:"apiMetadata"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
ApplicationPerformanceMonitoringTypes []string `pulumi:"applicationPerformanceMonitoringTypes"`
// A `clientAuthorization` block as defined below.
ClientAuthorization *SpringCloudGatewayClientAuthorization `pulumi:"clientAuthorization"`
// A `cors` block as defined below.
Cors *SpringCloudGatewayCors `pulumi:"cors"`
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// is only https is allowed?
HttpsOnly *bool `pulumi:"httpsOnly"`
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerInstance *SpringCloudGatewayLocalResponseCachePerInstance `pulumi:"localResponseCachePerInstance"`
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerRoute *SpringCloudGatewayLocalResponseCachePerRoute `pulumi:"localResponseCachePerRoute"`
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// Indicates whether the Spring Cloud Gateway exposes endpoint.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// A `quota` block as defined below.
Quota *SpringCloudGatewayQuota `pulumi:"quota"`
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
SensitiveEnvironmentVariables map[string]string `pulumi:"sensitiveEnvironmentVariables"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudGatewaySso `pulumi:"sso"`
// URL of the Spring Cloud Gateway, exposed when 'public_network_access_enabled' is true.
Url *string `pulumi:"url"`
}
type SpringCloudGatewayState struct {
// A `apiMetadata` block as defined below.
ApiMetadata SpringCloudGatewayApiMetadataPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
ApplicationPerformanceMonitoringTypes pulumi.StringArrayInput
// A `clientAuthorization` block as defined below.
ClientAuthorization SpringCloudGatewayClientAuthorizationPtrInput
// A `cors` block as defined below.
Cors SpringCloudGatewayCorsPtrInput
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// is only https is allowed?
HttpsOnly pulumi.BoolPtrInput
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerInstance SpringCloudGatewayLocalResponseCachePerInstancePtrInput
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerRoute SpringCloudGatewayLocalResponseCachePerRoutePtrInput
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// Indicates whether the Spring Cloud Gateway exposes endpoint.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// A `quota` block as defined below.
Quota SpringCloudGatewayQuotaPtrInput
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
SensitiveEnvironmentVariables pulumi.StringMapInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
SpringCloudServiceId pulumi.StringPtrInput
// A `sso` block as defined below.
Sso SpringCloudGatewaySsoPtrInput
// URL of the Spring Cloud Gateway, exposed when 'public_network_access_enabled' is true.
Url pulumi.StringPtrInput
}
func (SpringCloudGatewayState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayState)(nil)).Elem()
}
type springCloudGatewayArgs struct {
// A `apiMetadata` block as defined below.
ApiMetadata *SpringCloudGatewayApiMetadata `pulumi:"apiMetadata"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
ApplicationPerformanceMonitoringTypes []string `pulumi:"applicationPerformanceMonitoringTypes"`
// A `clientAuthorization` block as defined below.
ClientAuthorization *SpringCloudGatewayClientAuthorization `pulumi:"clientAuthorization"`
// A `cors` block as defined below.
Cors *SpringCloudGatewayCors `pulumi:"cors"`
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// is only https is allowed?
HttpsOnly *bool `pulumi:"httpsOnly"`
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerInstance *SpringCloudGatewayLocalResponseCachePerInstance `pulumi:"localResponseCachePerInstance"`
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerRoute *SpringCloudGatewayLocalResponseCachePerRoute `pulumi:"localResponseCachePerRoute"`
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// Indicates whether the Spring Cloud Gateway exposes endpoint.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// A `quota` block as defined below.
Quota *SpringCloudGatewayQuota `pulumi:"quota"`
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
SensitiveEnvironmentVariables map[string]string `pulumi:"sensitiveEnvironmentVariables"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudGatewaySso `pulumi:"sso"`
}
// The set of arguments for constructing a SpringCloudGateway resource.
type SpringCloudGatewayArgs struct {
// A `apiMetadata` block as defined below.
ApiMetadata SpringCloudGatewayApiMetadataPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
ApplicationPerformanceMonitoringTypes pulumi.StringArrayInput
// A `clientAuthorization` block as defined below.
ClientAuthorization SpringCloudGatewayClientAuthorizationPtrInput
// A `cors` block as defined below.
Cors SpringCloudGatewayCorsPtrInput
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// is only https is allowed?
HttpsOnly pulumi.BoolPtrInput
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerInstance SpringCloudGatewayLocalResponseCachePerInstancePtrInput
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
LocalResponseCachePerRoute SpringCloudGatewayLocalResponseCachePerRoutePtrInput
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// Indicates whether the Spring Cloud Gateway exposes endpoint.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// A `quota` block as defined below.
Quota SpringCloudGatewayQuotaPtrInput
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
SensitiveEnvironmentVariables pulumi.StringMapInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
SpringCloudServiceId pulumi.StringInput
// A `sso` block as defined below.
Sso SpringCloudGatewaySsoPtrInput
}
func (SpringCloudGatewayArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayArgs)(nil)).Elem()
}
type SpringCloudGatewayInput interface {
pulumi.Input
ToSpringCloudGatewayOutput() SpringCloudGatewayOutput
ToSpringCloudGatewayOutputWithContext(ctx context.Context) SpringCloudGatewayOutput
}
func (*SpringCloudGateway) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGateway)(nil)).Elem()
}
func (i *SpringCloudGateway) ToSpringCloudGatewayOutput() SpringCloudGatewayOutput {
return i.ToSpringCloudGatewayOutputWithContext(context.Background())
}
func (i *SpringCloudGateway) ToSpringCloudGatewayOutputWithContext(ctx context.Context) SpringCloudGatewayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayOutput)
}
// SpringCloudGatewayArrayInput is an input type that accepts SpringCloudGatewayArray and SpringCloudGatewayArrayOutput values.
// You can construct a concrete instance of `SpringCloudGatewayArrayInput` via:
//
// SpringCloudGatewayArray{ SpringCloudGatewayArgs{...} }
type SpringCloudGatewayArrayInput interface {
pulumi.Input
ToSpringCloudGatewayArrayOutput() SpringCloudGatewayArrayOutput
ToSpringCloudGatewayArrayOutputWithContext(context.Context) SpringCloudGatewayArrayOutput
}
type SpringCloudGatewayArray []SpringCloudGatewayInput
func (SpringCloudGatewayArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGateway)(nil)).Elem()
}
func (i SpringCloudGatewayArray) ToSpringCloudGatewayArrayOutput() SpringCloudGatewayArrayOutput {
return i.ToSpringCloudGatewayArrayOutputWithContext(context.Background())
}
func (i SpringCloudGatewayArray) ToSpringCloudGatewayArrayOutputWithContext(ctx context.Context) SpringCloudGatewayArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayArrayOutput)
}
// SpringCloudGatewayMapInput is an input type that accepts SpringCloudGatewayMap and SpringCloudGatewayMapOutput values.
// You can construct a concrete instance of `SpringCloudGatewayMapInput` via:
//
// SpringCloudGatewayMap{ "key": SpringCloudGatewayArgs{...} }
type SpringCloudGatewayMapInput interface {
pulumi.Input
ToSpringCloudGatewayMapOutput() SpringCloudGatewayMapOutput
ToSpringCloudGatewayMapOutputWithContext(context.Context) SpringCloudGatewayMapOutput
}
type SpringCloudGatewayMap map[string]SpringCloudGatewayInput
func (SpringCloudGatewayMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGateway)(nil)).Elem()
}
func (i SpringCloudGatewayMap) ToSpringCloudGatewayMapOutput() SpringCloudGatewayMapOutput {
return i.ToSpringCloudGatewayMapOutputWithContext(context.Background())
}
func (i SpringCloudGatewayMap) ToSpringCloudGatewayMapOutputWithContext(ctx context.Context) SpringCloudGatewayMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayMapOutput)
}
type SpringCloudGatewayOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGateway)(nil)).Elem()
}
func (o SpringCloudGatewayOutput) ToSpringCloudGatewayOutput() SpringCloudGatewayOutput {
return o
}
func (o SpringCloudGatewayOutput) ToSpringCloudGatewayOutputWithContext(ctx context.Context) SpringCloudGatewayOutput {
return o
}
// A `apiMetadata` block as defined below.
func (o SpringCloudGatewayOutput) ApiMetadata() SpringCloudGatewayApiMetadataPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayApiMetadataPtrOutput { return v.ApiMetadata }).(SpringCloudGatewayApiMetadataPtrOutput)
}
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
func (o SpringCloudGatewayOutput) ApplicationPerformanceMonitoringIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringArrayOutput { return v.ApplicationPerformanceMonitoringIds }).(pulumi.StringArrayOutput)
}
// Specifies a list of application performance monitoring types used in the Spring Cloud Gateway. The allowed values are `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
func (o SpringCloudGatewayOutput) ApplicationPerformanceMonitoringTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringArrayOutput { return v.ApplicationPerformanceMonitoringTypes }).(pulumi.StringArrayOutput)
}
// A `clientAuthorization` block as defined below.
func (o SpringCloudGatewayOutput) ClientAuthorization() SpringCloudGatewayClientAuthorizationPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayClientAuthorizationPtrOutput {
return v.ClientAuthorization
}).(SpringCloudGatewayClientAuthorizationPtrOutput)
}
// A `cors` block as defined below.
func (o SpringCloudGatewayOutput) Cors() SpringCloudGatewayCorsPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayCorsPtrOutput { return v.Cors }).(SpringCloudGatewayCorsPtrOutput)
}
// Specifies the environment variables of the Spring Cloud Gateway as a map of key-value pairs.
func (o SpringCloudGatewayOutput) EnvironmentVariables() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringMapOutput { return v.EnvironmentVariables }).(pulumi.StringMapOutput)
}
// is only https is allowed?
func (o SpringCloudGatewayOutput) HttpsOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.BoolPtrOutput { return v.HttpsOnly }).(pulumi.BoolPtrOutput)
}
// Specifies the required instance count of the Spring Cloud Gateway. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
func (o SpringCloudGatewayOutput) InstanceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.IntPtrOutput { return v.InstanceCount }).(pulumi.IntPtrOutput)
}
// A `localResponseCachePerInstance` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
func (o SpringCloudGatewayOutput) LocalResponseCachePerInstance() SpringCloudGatewayLocalResponseCachePerInstancePtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayLocalResponseCachePerInstancePtrOutput {
return v.LocalResponseCachePerInstance
}).(SpringCloudGatewayLocalResponseCachePerInstancePtrOutput)
}
// A `localResponseCachePerRoute` block as defined below. Only one of `localResponseCachePerInstance` or `localResponseCachePerRoute` can be specified.
func (o SpringCloudGatewayOutput) LocalResponseCachePerRoute() SpringCloudGatewayLocalResponseCachePerRoutePtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayLocalResponseCachePerRoutePtrOutput {
return v.LocalResponseCachePerRoute
}).(SpringCloudGatewayLocalResponseCachePerRoutePtrOutput)
}
// The name which should be used for this Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway to be created. The only possible value is `default`.
func (o SpringCloudGatewayOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Indicates whether the Spring Cloud Gateway exposes endpoint.
func (o SpringCloudGatewayOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// A `quota` block as defined below.
func (o SpringCloudGatewayOutput) Quota() SpringCloudGatewayQuotaOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewayQuotaOutput { return v.Quota }).(SpringCloudGatewayQuotaOutput)
}
// Specifies the sensitive environment variables of the Spring Cloud Gateway as a map of key-value pairs.
func (o SpringCloudGatewayOutput) SensitiveEnvironmentVariables() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringMapOutput { return v.SensitiveEnvironmentVariables }).(pulumi.StringMapOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Gateway to be created.
func (o SpringCloudGatewayOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
// A `sso` block as defined below.
func (o SpringCloudGatewayOutput) Sso() SpringCloudGatewaySsoPtrOutput {
return o.ApplyT(func(v *SpringCloudGateway) SpringCloudGatewaySsoPtrOutput { return v.Sso }).(SpringCloudGatewaySsoPtrOutput)
}
// URL of the Spring Cloud Gateway, exposed when 'public_network_access_enabled' is true.
func (o SpringCloudGatewayOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGateway) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type SpringCloudGatewayArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGateway)(nil)).Elem()
}
func (o SpringCloudGatewayArrayOutput) ToSpringCloudGatewayArrayOutput() SpringCloudGatewayArrayOutput {
return o
}
func (o SpringCloudGatewayArrayOutput) ToSpringCloudGatewayArrayOutputWithContext(ctx context.Context) SpringCloudGatewayArrayOutput {
return o
}
func (o SpringCloudGatewayArrayOutput) Index(i pulumi.IntInput) SpringCloudGatewayOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudGateway {
return vs[0].([]*SpringCloudGateway)[vs[1].(int)]
}).(SpringCloudGatewayOutput)
}
type SpringCloudGatewayMapOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGateway)(nil)).Elem()
}
func (o SpringCloudGatewayMapOutput) ToSpringCloudGatewayMapOutput() SpringCloudGatewayMapOutput {
return o
}
func (o SpringCloudGatewayMapOutput) ToSpringCloudGatewayMapOutputWithContext(ctx context.Context) SpringCloudGatewayMapOutput {
return o
}
func (o SpringCloudGatewayMapOutput) MapIndex(k pulumi.StringInput) SpringCloudGatewayOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudGateway {
return vs[0].(map[string]*SpringCloudGateway)[vs[1].(string)]
}).(SpringCloudGatewayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayInput)(nil)).Elem(), &SpringCloudGateway{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayArrayInput)(nil)).Elem(), SpringCloudGatewayArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayMapInput)(nil)).Elem(), SpringCloudGatewayMap{})
pulumi.RegisterOutputType(SpringCloudGatewayOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayArrayOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudGatewayCustomDomain.go | sdk/go/azure/appplatform/springCloudGatewayCustomDomain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Gateway Custom Domain.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudGatewayCustomDomain` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudGateway, err := appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudGatewayCustomDomain(ctx, "example", &appplatform.SpringCloudGatewayCustomDomainArgs{
// Name: pulumi.String("example.com"),
// SpringCloudGatewayId: exampleSpringCloudGateway.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Gateway Custom Domains can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudGatewayCustomDomain:SpringCloudGatewayCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/gateways/gateway1/domains/domain1
// ```
type SpringCloudGatewayCustomDomain struct {
pulumi.CustomResourceState
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
SpringCloudGatewayId pulumi.StringOutput `pulumi:"springCloudGatewayId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
Thumbprint pulumi.StringPtrOutput `pulumi:"thumbprint"`
}
// NewSpringCloudGatewayCustomDomain registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudGatewayCustomDomain(ctx *pulumi.Context,
name string, args *SpringCloudGatewayCustomDomainArgs, opts ...pulumi.ResourceOption) (*SpringCloudGatewayCustomDomain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudGatewayId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudGatewayId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudGatewayCustomDomain
err := ctx.RegisterResource("azure:appplatform/springCloudGatewayCustomDomain:SpringCloudGatewayCustomDomain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudGatewayCustomDomain gets an existing SpringCloudGatewayCustomDomain resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudGatewayCustomDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudGatewayCustomDomainState, opts ...pulumi.ResourceOption) (*SpringCloudGatewayCustomDomain, error) {
var resource SpringCloudGatewayCustomDomain
err := ctx.ReadResource("azure:appplatform/springCloudGatewayCustomDomain:SpringCloudGatewayCustomDomain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudGatewayCustomDomain resources.
type springCloudGatewayCustomDomainState struct {
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
SpringCloudGatewayId *string `pulumi:"springCloudGatewayId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
Thumbprint *string `pulumi:"thumbprint"`
}
type SpringCloudGatewayCustomDomainState struct {
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
SpringCloudGatewayId pulumi.StringPtrInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudGatewayCustomDomainState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayCustomDomainState)(nil)).Elem()
}
type springCloudGatewayCustomDomainArgs struct {
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
SpringCloudGatewayId string `pulumi:"springCloudGatewayId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
Thumbprint *string `pulumi:"thumbprint"`
}
// The set of arguments for constructing a SpringCloudGatewayCustomDomain resource.
type SpringCloudGatewayCustomDomainArgs struct {
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
SpringCloudGatewayId pulumi.StringInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudGatewayCustomDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayCustomDomainArgs)(nil)).Elem()
}
type SpringCloudGatewayCustomDomainInput interface {
pulumi.Input
ToSpringCloudGatewayCustomDomainOutput() SpringCloudGatewayCustomDomainOutput
ToSpringCloudGatewayCustomDomainOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainOutput
}
func (*SpringCloudGatewayCustomDomain) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (i *SpringCloudGatewayCustomDomain) ToSpringCloudGatewayCustomDomainOutput() SpringCloudGatewayCustomDomainOutput {
return i.ToSpringCloudGatewayCustomDomainOutputWithContext(context.Background())
}
func (i *SpringCloudGatewayCustomDomain) ToSpringCloudGatewayCustomDomainOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayCustomDomainOutput)
}
// SpringCloudGatewayCustomDomainArrayInput is an input type that accepts SpringCloudGatewayCustomDomainArray and SpringCloudGatewayCustomDomainArrayOutput values.
// You can construct a concrete instance of `SpringCloudGatewayCustomDomainArrayInput` via:
//
// SpringCloudGatewayCustomDomainArray{ SpringCloudGatewayCustomDomainArgs{...} }
type SpringCloudGatewayCustomDomainArrayInput interface {
pulumi.Input
ToSpringCloudGatewayCustomDomainArrayOutput() SpringCloudGatewayCustomDomainArrayOutput
ToSpringCloudGatewayCustomDomainArrayOutputWithContext(context.Context) SpringCloudGatewayCustomDomainArrayOutput
}
type SpringCloudGatewayCustomDomainArray []SpringCloudGatewayCustomDomainInput
func (SpringCloudGatewayCustomDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (i SpringCloudGatewayCustomDomainArray) ToSpringCloudGatewayCustomDomainArrayOutput() SpringCloudGatewayCustomDomainArrayOutput {
return i.ToSpringCloudGatewayCustomDomainArrayOutputWithContext(context.Background())
}
func (i SpringCloudGatewayCustomDomainArray) ToSpringCloudGatewayCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayCustomDomainArrayOutput)
}
// SpringCloudGatewayCustomDomainMapInput is an input type that accepts SpringCloudGatewayCustomDomainMap and SpringCloudGatewayCustomDomainMapOutput values.
// You can construct a concrete instance of `SpringCloudGatewayCustomDomainMapInput` via:
//
// SpringCloudGatewayCustomDomainMap{ "key": SpringCloudGatewayCustomDomainArgs{...} }
type SpringCloudGatewayCustomDomainMapInput interface {
pulumi.Input
ToSpringCloudGatewayCustomDomainMapOutput() SpringCloudGatewayCustomDomainMapOutput
ToSpringCloudGatewayCustomDomainMapOutputWithContext(context.Context) SpringCloudGatewayCustomDomainMapOutput
}
type SpringCloudGatewayCustomDomainMap map[string]SpringCloudGatewayCustomDomainInput
func (SpringCloudGatewayCustomDomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (i SpringCloudGatewayCustomDomainMap) ToSpringCloudGatewayCustomDomainMapOutput() SpringCloudGatewayCustomDomainMapOutput {
return i.ToSpringCloudGatewayCustomDomainMapOutputWithContext(context.Background())
}
func (i SpringCloudGatewayCustomDomainMap) ToSpringCloudGatewayCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayCustomDomainMapOutput)
}
type SpringCloudGatewayCustomDomainOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayCustomDomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (o SpringCloudGatewayCustomDomainOutput) ToSpringCloudGatewayCustomDomainOutput() SpringCloudGatewayCustomDomainOutput {
return o
}
func (o SpringCloudGatewayCustomDomainOutput) ToSpringCloudGatewayCustomDomainOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainOutput {
return o
}
// The name which should be used for this Spring Cloud Gateway Custom Domain. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
func (o SpringCloudGatewayCustomDomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGatewayCustomDomain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Custom Domain to be created.
func (o SpringCloudGatewayCustomDomainOutput) SpringCloudGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGatewayCustomDomain) pulumi.StringOutput { return v.SpringCloudGatewayId }).(pulumi.StringOutput)
}
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Gateway Custom Domain.
func (o SpringCloudGatewayCustomDomainOutput) Thumbprint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudGatewayCustomDomain) pulumi.StringPtrOutput { return v.Thumbprint }).(pulumi.StringPtrOutput)
}
type SpringCloudGatewayCustomDomainArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayCustomDomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (o SpringCloudGatewayCustomDomainArrayOutput) ToSpringCloudGatewayCustomDomainArrayOutput() SpringCloudGatewayCustomDomainArrayOutput {
return o
}
func (o SpringCloudGatewayCustomDomainArrayOutput) ToSpringCloudGatewayCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainArrayOutput {
return o
}
func (o SpringCloudGatewayCustomDomainArrayOutput) Index(i pulumi.IntInput) SpringCloudGatewayCustomDomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudGatewayCustomDomain {
return vs[0].([]*SpringCloudGatewayCustomDomain)[vs[1].(int)]
}).(SpringCloudGatewayCustomDomainOutput)
}
type SpringCloudGatewayCustomDomainMapOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayCustomDomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGatewayCustomDomain)(nil)).Elem()
}
func (o SpringCloudGatewayCustomDomainMapOutput) ToSpringCloudGatewayCustomDomainMapOutput() SpringCloudGatewayCustomDomainMapOutput {
return o
}
func (o SpringCloudGatewayCustomDomainMapOutput) ToSpringCloudGatewayCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudGatewayCustomDomainMapOutput {
return o
}
func (o SpringCloudGatewayCustomDomainMapOutput) MapIndex(k pulumi.StringInput) SpringCloudGatewayCustomDomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudGatewayCustomDomain {
return vs[0].(map[string]*SpringCloudGatewayCustomDomain)[vs[1].(string)]
}).(SpringCloudGatewayCustomDomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayCustomDomainInput)(nil)).Elem(), &SpringCloudGatewayCustomDomain{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayCustomDomainArrayInput)(nil)).Elem(), SpringCloudGatewayCustomDomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayCustomDomainMapInput)(nil)).Elem(), SpringCloudGatewayCustomDomainMap{})
pulumi.RegisterOutputType(SpringCloudGatewayCustomDomainOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayCustomDomainArrayOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayCustomDomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/init.go | sdk/go/azure/appplatform/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:appplatform/springCloudAccelerator:SpringCloudAccelerator":
r = &SpringCloudAccelerator{}
case "azure:appplatform/springCloudActiveDeployment:SpringCloudActiveDeployment":
r = &SpringCloudActiveDeployment{}
case "azure:appplatform/springCloudApiPortal:SpringCloudApiPortal":
r = &SpringCloudApiPortal{}
case "azure:appplatform/springCloudApiPortalCustomDomain:SpringCloudApiPortalCustomDomain":
r = &SpringCloudApiPortalCustomDomain{}
case "azure:appplatform/springCloudApp:SpringCloudApp":
r = &SpringCloudApp{}
case "azure:appplatform/springCloudAppCosmosDBAssociation:SpringCloudAppCosmosDBAssociation":
r = &SpringCloudAppCosmosDBAssociation{}
case "azure:appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring:SpringCloudAppDynamicsApplicationPerformanceMonitoring":
r = &SpringCloudAppDynamicsApplicationPerformanceMonitoring{}
case "azure:appplatform/springCloudAppMysqlAssociation:SpringCloudAppMysqlAssociation":
r = &SpringCloudAppMysqlAssociation{}
case "azure:appplatform/springCloudAppRedisAssociation:SpringCloudAppRedisAssociation":
r = &SpringCloudAppRedisAssociation{}
case "azure:appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring:SpringCloudApplicationInsightsApplicationPerformanceMonitoring":
r = &SpringCloudApplicationInsightsApplicationPerformanceMonitoring{}
case "azure:appplatform/springCloudApplicationLiveView:SpringCloudApplicationLiveView":
r = &SpringCloudApplicationLiveView{}
case "azure:appplatform/springCloudBuildDeployment:SpringCloudBuildDeployment":
r = &SpringCloudBuildDeployment{}
case "azure:appplatform/springCloudBuildPackBinding:SpringCloudBuildPackBinding":
r = &SpringCloudBuildPackBinding{}
case "azure:appplatform/springCloudBuilder:SpringCloudBuilder":
r = &SpringCloudBuilder{}
case "azure:appplatform/springCloudCertificate:SpringCloudCertificate":
r = &SpringCloudCertificate{}
case "azure:appplatform/springCloudConfigurationService:SpringCloudConfigurationService":
r = &SpringCloudConfigurationService{}
case "azure:appplatform/springCloudConnection:SpringCloudConnection":
r = &SpringCloudConnection{}
case "azure:appplatform/springCloudContainerDeployment:SpringCloudContainerDeployment":
r = &SpringCloudContainerDeployment{}
case "azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain":
r = &SpringCloudCustomDomain{}
case "azure:appplatform/springCloudCustomizedAccelerator:SpringCloudCustomizedAccelerator":
r = &SpringCloudCustomizedAccelerator{}
case "azure:appplatform/springCloudDevToolPortal:SpringCloudDevToolPortal":
r = &SpringCloudDevToolPortal{}
case "azure:appplatform/springCloudDynatraceApplicationPerformanceMonitoring:SpringCloudDynatraceApplicationPerformanceMonitoring":
r = &SpringCloudDynatraceApplicationPerformanceMonitoring{}
case "azure:appplatform/springCloudElasticApplicationPerformanceMonitoring:SpringCloudElasticApplicationPerformanceMonitoring":
r = &SpringCloudElasticApplicationPerformanceMonitoring{}
case "azure:appplatform/springCloudGateway:SpringCloudGateway":
r = &SpringCloudGateway{}
case "azure:appplatform/springCloudGatewayCustomDomain:SpringCloudGatewayCustomDomain":
r = &SpringCloudGatewayCustomDomain{}
case "azure:appplatform/springCloudGatewayRouteConfig:SpringCloudGatewayRouteConfig":
r = &SpringCloudGatewayRouteConfig{}
case "azure:appplatform/springCloudJavaDeployment:SpringCloudJavaDeployment":
r = &SpringCloudJavaDeployment{}
case "azure:appplatform/springCloudNewRelicApplicationPerformanceMonitoring:SpringCloudNewRelicApplicationPerformanceMonitoring":
r = &SpringCloudNewRelicApplicationPerformanceMonitoring{}
case "azure:appplatform/springCloudService:SpringCloudService":
r = &SpringCloudService{}
case "azure:appplatform/springCloudStorage:SpringCloudStorage":
r = &SpringCloudStorage{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudAccelerator",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudActiveDeployment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudApiPortal",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudApiPortalCustomDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudApp",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudAppCosmosDBAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudAppMysqlAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudAppRedisAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudApplicationLiveView",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudBuildDeployment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudBuildPackBinding",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudBuilder",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudConfigurationService",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudConnection",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudContainerDeployment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudCustomDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudCustomizedAccelerator",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudDevToolPortal",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudDynatraceApplicationPerformanceMonitoring",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudElasticApplicationPerformanceMonitoring",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudGateway",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudGatewayCustomDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudGatewayRouteConfig",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudJavaDeployment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudNewRelicApplicationPerformanceMonitoring",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudService",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"appplatform/springCloudStorage",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/pulumiTypes.go | sdk/go/azure/appplatform/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type SpringCloudApiPortalSso struct {
// The public identifier for the application.
ClientId *string `pulumi:"clientId"`
// The secret known only to the application and the authorization server.
ClientSecret *string `pulumi:"clientSecret"`
// The URI of Issuer Identifier.
IssuerUri *string `pulumi:"issuerUri"`
// It defines the specific actions applications can be allowed to do on a user's behalf.
Scopes []string `pulumi:"scopes"`
}
// SpringCloudApiPortalSsoInput is an input type that accepts SpringCloudApiPortalSsoArgs and SpringCloudApiPortalSsoOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalSsoInput` via:
//
// SpringCloudApiPortalSsoArgs{...}
type SpringCloudApiPortalSsoInput interface {
pulumi.Input
ToSpringCloudApiPortalSsoOutput() SpringCloudApiPortalSsoOutput
ToSpringCloudApiPortalSsoOutputWithContext(context.Context) SpringCloudApiPortalSsoOutput
}
type SpringCloudApiPortalSsoArgs struct {
// The public identifier for the application.
ClientId pulumi.StringPtrInput `pulumi:"clientId"`
// The secret known only to the application and the authorization server.
ClientSecret pulumi.StringPtrInput `pulumi:"clientSecret"`
// The URI of Issuer Identifier.
IssuerUri pulumi.StringPtrInput `pulumi:"issuerUri"`
// It defines the specific actions applications can be allowed to do on a user's behalf.
Scopes pulumi.StringArrayInput `pulumi:"scopes"`
}
func (SpringCloudApiPortalSsoArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudApiPortalSso)(nil)).Elem()
}
func (i SpringCloudApiPortalSsoArgs) ToSpringCloudApiPortalSsoOutput() SpringCloudApiPortalSsoOutput {
return i.ToSpringCloudApiPortalSsoOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalSsoArgs) ToSpringCloudApiPortalSsoOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalSsoOutput)
}
func (i SpringCloudApiPortalSsoArgs) ToSpringCloudApiPortalSsoPtrOutput() SpringCloudApiPortalSsoPtrOutput {
return i.ToSpringCloudApiPortalSsoPtrOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalSsoArgs) ToSpringCloudApiPortalSsoPtrOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalSsoOutput).ToSpringCloudApiPortalSsoPtrOutputWithContext(ctx)
}
// SpringCloudApiPortalSsoPtrInput is an input type that accepts SpringCloudApiPortalSsoArgs, SpringCloudApiPortalSsoPtr and SpringCloudApiPortalSsoPtrOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalSsoPtrInput` via:
//
// SpringCloudApiPortalSsoArgs{...}
//
// or:
//
// nil
type SpringCloudApiPortalSsoPtrInput interface {
pulumi.Input
ToSpringCloudApiPortalSsoPtrOutput() SpringCloudApiPortalSsoPtrOutput
ToSpringCloudApiPortalSsoPtrOutputWithContext(context.Context) SpringCloudApiPortalSsoPtrOutput
}
type springCloudApiPortalSsoPtrType SpringCloudApiPortalSsoArgs
func SpringCloudApiPortalSsoPtr(v *SpringCloudApiPortalSsoArgs) SpringCloudApiPortalSsoPtrInput {
return (*springCloudApiPortalSsoPtrType)(v)
}
func (*springCloudApiPortalSsoPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortalSso)(nil)).Elem()
}
func (i *springCloudApiPortalSsoPtrType) ToSpringCloudApiPortalSsoPtrOutput() SpringCloudApiPortalSsoPtrOutput {
return i.ToSpringCloudApiPortalSsoPtrOutputWithContext(context.Background())
}
func (i *springCloudApiPortalSsoPtrType) ToSpringCloudApiPortalSsoPtrOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalSsoPtrOutput)
}
type SpringCloudApiPortalSsoOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalSsoOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudApiPortalSso)(nil)).Elem()
}
func (o SpringCloudApiPortalSsoOutput) ToSpringCloudApiPortalSsoOutput() SpringCloudApiPortalSsoOutput {
return o
}
func (o SpringCloudApiPortalSsoOutput) ToSpringCloudApiPortalSsoOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoOutput {
return o
}
func (o SpringCloudApiPortalSsoOutput) ToSpringCloudApiPortalSsoPtrOutput() SpringCloudApiPortalSsoPtrOutput {
return o.ToSpringCloudApiPortalSsoPtrOutputWithContext(context.Background())
}
func (o SpringCloudApiPortalSsoOutput) ToSpringCloudApiPortalSsoPtrOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SpringCloudApiPortalSso) *SpringCloudApiPortalSso {
return &v
}).(SpringCloudApiPortalSsoPtrOutput)
}
// The public identifier for the application.
func (o SpringCloudApiPortalSsoOutput) ClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudApiPortalSso) *string { return v.ClientId }).(pulumi.StringPtrOutput)
}
// The secret known only to the application and the authorization server.
func (o SpringCloudApiPortalSsoOutput) ClientSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudApiPortalSso) *string { return v.ClientSecret }).(pulumi.StringPtrOutput)
}
// The URI of Issuer Identifier.
func (o SpringCloudApiPortalSsoOutput) IssuerUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudApiPortalSso) *string { return v.IssuerUri }).(pulumi.StringPtrOutput)
}
// It defines the specific actions applications can be allowed to do on a user's behalf.
func (o SpringCloudApiPortalSsoOutput) Scopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v SpringCloudApiPortalSso) []string { return v.Scopes }).(pulumi.StringArrayOutput)
}
type SpringCloudApiPortalSsoPtrOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalSsoPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortalSso)(nil)).Elem()
}
func (o SpringCloudApiPortalSsoPtrOutput) ToSpringCloudApiPortalSsoPtrOutput() SpringCloudApiPortalSsoPtrOutput {
return o
}
func (o SpringCloudApiPortalSsoPtrOutput) ToSpringCloudApiPortalSsoPtrOutputWithContext(ctx context.Context) SpringCloudApiPortalSsoPtrOutput {
return o
}
func (o SpringCloudApiPortalSsoPtrOutput) Elem() SpringCloudApiPortalSsoOutput {
return o.ApplyT(func(v *SpringCloudApiPortalSso) SpringCloudApiPortalSso {
if v != nil {
return *v
}
var ret SpringCloudApiPortalSso
return ret
}).(SpringCloudApiPortalSsoOutput)
}
// The public identifier for the application.
func (o SpringCloudApiPortalSsoPtrOutput) ClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortalSso) *string {
if v == nil {
return nil
}
return v.ClientId
}).(pulumi.StringPtrOutput)
}
// The secret known only to the application and the authorization server.
func (o SpringCloudApiPortalSsoPtrOutput) ClientSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortalSso) *string {
if v == nil {
return nil
}
return v.ClientSecret
}).(pulumi.StringPtrOutput)
}
// The URI of Issuer Identifier.
func (o SpringCloudApiPortalSsoPtrOutput) IssuerUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortalSso) *string {
if v == nil {
return nil
}
return v.IssuerUri
}).(pulumi.StringPtrOutput)
}
// It defines the specific actions applications can be allowed to do on a user's behalf.
func (o SpringCloudApiPortalSsoPtrOutput) Scopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudApiPortalSso) []string {
if v == nil {
return nil
}
return v.Scopes
}).(pulumi.StringArrayOutput)
}
type SpringCloudAppCustomPersistentDisk struct {
// These are the mount options for a persistent disk.
MountOptions []string `pulumi:"mountOptions"`
// The mount path of the persistent disk.
MountPath string `pulumi:"mountPath"`
// Indicates whether the persistent disk is a readOnly one.
ReadOnlyEnabled *bool `pulumi:"readOnlyEnabled"`
// The share name of the Azure File share.
ShareName string `pulumi:"shareName"`
// The name of the Spring Cloud Storage.
StorageName string `pulumi:"storageName"`
}
// SpringCloudAppCustomPersistentDiskInput is an input type that accepts SpringCloudAppCustomPersistentDiskArgs and SpringCloudAppCustomPersistentDiskOutput values.
// You can construct a concrete instance of `SpringCloudAppCustomPersistentDiskInput` via:
//
// SpringCloudAppCustomPersistentDiskArgs{...}
type SpringCloudAppCustomPersistentDiskInput interface {
pulumi.Input
ToSpringCloudAppCustomPersistentDiskOutput() SpringCloudAppCustomPersistentDiskOutput
ToSpringCloudAppCustomPersistentDiskOutputWithContext(context.Context) SpringCloudAppCustomPersistentDiskOutput
}
type SpringCloudAppCustomPersistentDiskArgs struct {
// These are the mount options for a persistent disk.
MountOptions pulumi.StringArrayInput `pulumi:"mountOptions"`
// The mount path of the persistent disk.
MountPath pulumi.StringInput `pulumi:"mountPath"`
// Indicates whether the persistent disk is a readOnly one.
ReadOnlyEnabled pulumi.BoolPtrInput `pulumi:"readOnlyEnabled"`
// The share name of the Azure File share.
ShareName pulumi.StringInput `pulumi:"shareName"`
// The name of the Spring Cloud Storage.
StorageName pulumi.StringInput `pulumi:"storageName"`
}
func (SpringCloudAppCustomPersistentDiskArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppCustomPersistentDisk)(nil)).Elem()
}
func (i SpringCloudAppCustomPersistentDiskArgs) ToSpringCloudAppCustomPersistentDiskOutput() SpringCloudAppCustomPersistentDiskOutput {
return i.ToSpringCloudAppCustomPersistentDiskOutputWithContext(context.Background())
}
func (i SpringCloudAppCustomPersistentDiskArgs) ToSpringCloudAppCustomPersistentDiskOutputWithContext(ctx context.Context) SpringCloudAppCustomPersistentDiskOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppCustomPersistentDiskOutput)
}
// SpringCloudAppCustomPersistentDiskArrayInput is an input type that accepts SpringCloudAppCustomPersistentDiskArray and SpringCloudAppCustomPersistentDiskArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppCustomPersistentDiskArrayInput` via:
//
// SpringCloudAppCustomPersistentDiskArray{ SpringCloudAppCustomPersistentDiskArgs{...} }
type SpringCloudAppCustomPersistentDiskArrayInput interface {
pulumi.Input
ToSpringCloudAppCustomPersistentDiskArrayOutput() SpringCloudAppCustomPersistentDiskArrayOutput
ToSpringCloudAppCustomPersistentDiskArrayOutputWithContext(context.Context) SpringCloudAppCustomPersistentDiskArrayOutput
}
type SpringCloudAppCustomPersistentDiskArray []SpringCloudAppCustomPersistentDiskInput
func (SpringCloudAppCustomPersistentDiskArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]SpringCloudAppCustomPersistentDisk)(nil)).Elem()
}
func (i SpringCloudAppCustomPersistentDiskArray) ToSpringCloudAppCustomPersistentDiskArrayOutput() SpringCloudAppCustomPersistentDiskArrayOutput {
return i.ToSpringCloudAppCustomPersistentDiskArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppCustomPersistentDiskArray) ToSpringCloudAppCustomPersistentDiskArrayOutputWithContext(ctx context.Context) SpringCloudAppCustomPersistentDiskArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppCustomPersistentDiskArrayOutput)
}
type SpringCloudAppCustomPersistentDiskOutput struct{ *pulumi.OutputState }
func (SpringCloudAppCustomPersistentDiskOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppCustomPersistentDisk)(nil)).Elem()
}
func (o SpringCloudAppCustomPersistentDiskOutput) ToSpringCloudAppCustomPersistentDiskOutput() SpringCloudAppCustomPersistentDiskOutput {
return o
}
func (o SpringCloudAppCustomPersistentDiskOutput) ToSpringCloudAppCustomPersistentDiskOutputWithContext(ctx context.Context) SpringCloudAppCustomPersistentDiskOutput {
return o
}
// These are the mount options for a persistent disk.
func (o SpringCloudAppCustomPersistentDiskOutput) MountOptions() pulumi.StringArrayOutput {
return o.ApplyT(func(v SpringCloudAppCustomPersistentDisk) []string { return v.MountOptions }).(pulumi.StringArrayOutput)
}
// The mount path of the persistent disk.
func (o SpringCloudAppCustomPersistentDiskOutput) MountPath() pulumi.StringOutput {
return o.ApplyT(func(v SpringCloudAppCustomPersistentDisk) string { return v.MountPath }).(pulumi.StringOutput)
}
// Indicates whether the persistent disk is a readOnly one.
func (o SpringCloudAppCustomPersistentDiskOutput) ReadOnlyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v SpringCloudAppCustomPersistentDisk) *bool { return v.ReadOnlyEnabled }).(pulumi.BoolPtrOutput)
}
// The share name of the Azure File share.
func (o SpringCloudAppCustomPersistentDiskOutput) ShareName() pulumi.StringOutput {
return o.ApplyT(func(v SpringCloudAppCustomPersistentDisk) string { return v.ShareName }).(pulumi.StringOutput)
}
// The name of the Spring Cloud Storage.
func (o SpringCloudAppCustomPersistentDiskOutput) StorageName() pulumi.StringOutput {
return o.ApplyT(func(v SpringCloudAppCustomPersistentDisk) string { return v.StorageName }).(pulumi.StringOutput)
}
type SpringCloudAppCustomPersistentDiskArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppCustomPersistentDiskArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]SpringCloudAppCustomPersistentDisk)(nil)).Elem()
}
func (o SpringCloudAppCustomPersistentDiskArrayOutput) ToSpringCloudAppCustomPersistentDiskArrayOutput() SpringCloudAppCustomPersistentDiskArrayOutput {
return o
}
func (o SpringCloudAppCustomPersistentDiskArrayOutput) ToSpringCloudAppCustomPersistentDiskArrayOutputWithContext(ctx context.Context) SpringCloudAppCustomPersistentDiskArrayOutput {
return o
}
func (o SpringCloudAppCustomPersistentDiskArrayOutput) Index(i pulumi.IntInput) SpringCloudAppCustomPersistentDiskOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) SpringCloudAppCustomPersistentDisk {
return vs[0].([]SpringCloudAppCustomPersistentDisk)[vs[1].(int)]
}).(SpringCloudAppCustomPersistentDiskOutput)
}
type SpringCloudAppIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Spring Cloud Application.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Spring Cloud Application. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type string `pulumi:"type"`
}
// SpringCloudAppIdentityInput is an input type that accepts SpringCloudAppIdentityArgs and SpringCloudAppIdentityOutput values.
// You can construct a concrete instance of `SpringCloudAppIdentityInput` via:
//
// SpringCloudAppIdentityArgs{...}
type SpringCloudAppIdentityInput interface {
pulumi.Input
ToSpringCloudAppIdentityOutput() SpringCloudAppIdentityOutput
ToSpringCloudAppIdentityOutputWithContext(context.Context) SpringCloudAppIdentityOutput
}
type SpringCloudAppIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Spring Cloud Application.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Spring Cloud Application. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type pulumi.StringInput `pulumi:"type"`
}
func (SpringCloudAppIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppIdentity)(nil)).Elem()
}
func (i SpringCloudAppIdentityArgs) ToSpringCloudAppIdentityOutput() SpringCloudAppIdentityOutput {
return i.ToSpringCloudAppIdentityOutputWithContext(context.Background())
}
func (i SpringCloudAppIdentityArgs) ToSpringCloudAppIdentityOutputWithContext(ctx context.Context) SpringCloudAppIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIdentityOutput)
}
func (i SpringCloudAppIdentityArgs) ToSpringCloudAppIdentityPtrOutput() SpringCloudAppIdentityPtrOutput {
return i.ToSpringCloudAppIdentityPtrOutputWithContext(context.Background())
}
func (i SpringCloudAppIdentityArgs) ToSpringCloudAppIdentityPtrOutputWithContext(ctx context.Context) SpringCloudAppIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIdentityOutput).ToSpringCloudAppIdentityPtrOutputWithContext(ctx)
}
// SpringCloudAppIdentityPtrInput is an input type that accepts SpringCloudAppIdentityArgs, SpringCloudAppIdentityPtr and SpringCloudAppIdentityPtrOutput values.
// You can construct a concrete instance of `SpringCloudAppIdentityPtrInput` via:
//
// SpringCloudAppIdentityArgs{...}
//
// or:
//
// nil
type SpringCloudAppIdentityPtrInput interface {
pulumi.Input
ToSpringCloudAppIdentityPtrOutput() SpringCloudAppIdentityPtrOutput
ToSpringCloudAppIdentityPtrOutputWithContext(context.Context) SpringCloudAppIdentityPtrOutput
}
type springCloudAppIdentityPtrType SpringCloudAppIdentityArgs
func SpringCloudAppIdentityPtr(v *SpringCloudAppIdentityArgs) SpringCloudAppIdentityPtrInput {
return (*springCloudAppIdentityPtrType)(v)
}
func (*springCloudAppIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppIdentity)(nil)).Elem()
}
func (i *springCloudAppIdentityPtrType) ToSpringCloudAppIdentityPtrOutput() SpringCloudAppIdentityPtrOutput {
return i.ToSpringCloudAppIdentityPtrOutputWithContext(context.Background())
}
func (i *springCloudAppIdentityPtrType) ToSpringCloudAppIdentityPtrOutputWithContext(ctx context.Context) SpringCloudAppIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIdentityPtrOutput)
}
type SpringCloudAppIdentityOutput struct{ *pulumi.OutputState }
func (SpringCloudAppIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppIdentity)(nil)).Elem()
}
func (o SpringCloudAppIdentityOutput) ToSpringCloudAppIdentityOutput() SpringCloudAppIdentityOutput {
return o
}
func (o SpringCloudAppIdentityOutput) ToSpringCloudAppIdentityOutputWithContext(ctx context.Context) SpringCloudAppIdentityOutput {
return o
}
func (o SpringCloudAppIdentityOutput) ToSpringCloudAppIdentityPtrOutput() SpringCloudAppIdentityPtrOutput {
return o.ToSpringCloudAppIdentityPtrOutputWithContext(context.Background())
}
func (o SpringCloudAppIdentityOutput) ToSpringCloudAppIdentityPtrOutputWithContext(ctx context.Context) SpringCloudAppIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SpringCloudAppIdentity) *SpringCloudAppIdentity {
return &v
}).(SpringCloudAppIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Spring Cloud Application.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o SpringCloudAppIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v SpringCloudAppIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
func (o SpringCloudAppIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudAppIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
func (o SpringCloudAppIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudAppIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Spring Cloud Application. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o SpringCloudAppIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v SpringCloudAppIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type SpringCloudAppIdentityPtrOutput struct{ *pulumi.OutputState }
func (SpringCloudAppIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppIdentity)(nil)).Elem()
}
func (o SpringCloudAppIdentityPtrOutput) ToSpringCloudAppIdentityPtrOutput() SpringCloudAppIdentityPtrOutput {
return o
}
func (o SpringCloudAppIdentityPtrOutput) ToSpringCloudAppIdentityPtrOutputWithContext(ctx context.Context) SpringCloudAppIdentityPtrOutput {
return o
}
func (o SpringCloudAppIdentityPtrOutput) Elem() SpringCloudAppIdentityOutput {
return o.ApplyT(func(v *SpringCloudAppIdentity) SpringCloudAppIdentity {
if v != nil {
return *v
}
var ret SpringCloudAppIdentity
return ret
}).(SpringCloudAppIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Spring Cloud Application.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o SpringCloudAppIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudAppIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
func (o SpringCloudAppIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Spring Cloud Application.
func (o SpringCloudAppIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Spring Cloud Application. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o SpringCloudAppIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type SpringCloudAppIngressSettings struct {
// Specifies how ingress should communicate with this app backend service. Allowed values are `GRPC` and `Default`. Defaults to `Default`.
BackendProtocol *string `pulumi:"backendProtocol"`
// Specifies the ingress read time out in seconds. Defaults to `300`.
ReadTimeoutInSeconds *int `pulumi:"readTimeoutInSeconds"`
// Specifies the ingress send time out in seconds. Defaults to `60`.
SendTimeoutInSeconds *int `pulumi:"sendTimeoutInSeconds"`
// Specifies the type of the affinity, set this to `Cookie` to enable session affinity. Allowed values are `Cookie` and `None`. Defaults to `None`.
SessionAffinity *string `pulumi:"sessionAffinity"`
// Specifies the time in seconds until the cookie expires.
SessionCookieMaxAge *int `pulumi:"sessionCookieMaxAge"`
}
// SpringCloudAppIngressSettingsInput is an input type that accepts SpringCloudAppIngressSettingsArgs and SpringCloudAppIngressSettingsOutput values.
// You can construct a concrete instance of `SpringCloudAppIngressSettingsInput` via:
//
// SpringCloudAppIngressSettingsArgs{...}
type SpringCloudAppIngressSettingsInput interface {
pulumi.Input
ToSpringCloudAppIngressSettingsOutput() SpringCloudAppIngressSettingsOutput
ToSpringCloudAppIngressSettingsOutputWithContext(context.Context) SpringCloudAppIngressSettingsOutput
}
type SpringCloudAppIngressSettingsArgs struct {
// Specifies how ingress should communicate with this app backend service. Allowed values are `GRPC` and `Default`. Defaults to `Default`.
BackendProtocol pulumi.StringPtrInput `pulumi:"backendProtocol"`
// Specifies the ingress read time out in seconds. Defaults to `300`.
ReadTimeoutInSeconds pulumi.IntPtrInput `pulumi:"readTimeoutInSeconds"`
// Specifies the ingress send time out in seconds. Defaults to `60`.
SendTimeoutInSeconds pulumi.IntPtrInput `pulumi:"sendTimeoutInSeconds"`
// Specifies the type of the affinity, set this to `Cookie` to enable session affinity. Allowed values are `Cookie` and `None`. Defaults to `None`.
SessionAffinity pulumi.StringPtrInput `pulumi:"sessionAffinity"`
// Specifies the time in seconds until the cookie expires.
SessionCookieMaxAge pulumi.IntPtrInput `pulumi:"sessionCookieMaxAge"`
}
func (SpringCloudAppIngressSettingsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppIngressSettings)(nil)).Elem()
}
func (i SpringCloudAppIngressSettingsArgs) ToSpringCloudAppIngressSettingsOutput() SpringCloudAppIngressSettingsOutput {
return i.ToSpringCloudAppIngressSettingsOutputWithContext(context.Background())
}
func (i SpringCloudAppIngressSettingsArgs) ToSpringCloudAppIngressSettingsOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIngressSettingsOutput)
}
func (i SpringCloudAppIngressSettingsArgs) ToSpringCloudAppIngressSettingsPtrOutput() SpringCloudAppIngressSettingsPtrOutput {
return i.ToSpringCloudAppIngressSettingsPtrOutputWithContext(context.Background())
}
func (i SpringCloudAppIngressSettingsArgs) ToSpringCloudAppIngressSettingsPtrOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIngressSettingsOutput).ToSpringCloudAppIngressSettingsPtrOutputWithContext(ctx)
}
// SpringCloudAppIngressSettingsPtrInput is an input type that accepts SpringCloudAppIngressSettingsArgs, SpringCloudAppIngressSettingsPtr and SpringCloudAppIngressSettingsPtrOutput values.
// You can construct a concrete instance of `SpringCloudAppIngressSettingsPtrInput` via:
//
// SpringCloudAppIngressSettingsArgs{...}
//
// or:
//
// nil
type SpringCloudAppIngressSettingsPtrInput interface {
pulumi.Input
ToSpringCloudAppIngressSettingsPtrOutput() SpringCloudAppIngressSettingsPtrOutput
ToSpringCloudAppIngressSettingsPtrOutputWithContext(context.Context) SpringCloudAppIngressSettingsPtrOutput
}
type springCloudAppIngressSettingsPtrType SpringCloudAppIngressSettingsArgs
func SpringCloudAppIngressSettingsPtr(v *SpringCloudAppIngressSettingsArgs) SpringCloudAppIngressSettingsPtrInput {
return (*springCloudAppIngressSettingsPtrType)(v)
}
func (*springCloudAppIngressSettingsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppIngressSettings)(nil)).Elem()
}
func (i *springCloudAppIngressSettingsPtrType) ToSpringCloudAppIngressSettingsPtrOutput() SpringCloudAppIngressSettingsPtrOutput {
return i.ToSpringCloudAppIngressSettingsPtrOutputWithContext(context.Background())
}
func (i *springCloudAppIngressSettingsPtrType) ToSpringCloudAppIngressSettingsPtrOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppIngressSettingsPtrOutput)
}
type SpringCloudAppIngressSettingsOutput struct{ *pulumi.OutputState }
func (SpringCloudAppIngressSettingsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SpringCloudAppIngressSettings)(nil)).Elem()
}
func (o SpringCloudAppIngressSettingsOutput) ToSpringCloudAppIngressSettingsOutput() SpringCloudAppIngressSettingsOutput {
return o
}
func (o SpringCloudAppIngressSettingsOutput) ToSpringCloudAppIngressSettingsOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsOutput {
return o
}
func (o SpringCloudAppIngressSettingsOutput) ToSpringCloudAppIngressSettingsPtrOutput() SpringCloudAppIngressSettingsPtrOutput {
return o.ToSpringCloudAppIngressSettingsPtrOutputWithContext(context.Background())
}
func (o SpringCloudAppIngressSettingsOutput) ToSpringCloudAppIngressSettingsPtrOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v SpringCloudAppIngressSettings) *SpringCloudAppIngressSettings {
return &v
}).(SpringCloudAppIngressSettingsPtrOutput)
}
// Specifies how ingress should communicate with this app backend service. Allowed values are `GRPC` and `Default`. Defaults to `Default`.
func (o SpringCloudAppIngressSettingsOutput) BackendProtocol() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudAppIngressSettings) *string { return v.BackendProtocol }).(pulumi.StringPtrOutput)
}
// Specifies the ingress read time out in seconds. Defaults to `300`.
func (o SpringCloudAppIngressSettingsOutput) ReadTimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v SpringCloudAppIngressSettings) *int { return v.ReadTimeoutInSeconds }).(pulumi.IntPtrOutput)
}
// Specifies the ingress send time out in seconds. Defaults to `60`.
func (o SpringCloudAppIngressSettingsOutput) SendTimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v SpringCloudAppIngressSettings) *int { return v.SendTimeoutInSeconds }).(pulumi.IntPtrOutput)
}
// Specifies the type of the affinity, set this to `Cookie` to enable session affinity. Allowed values are `Cookie` and `None`. Defaults to `None`.
func (o SpringCloudAppIngressSettingsOutput) SessionAffinity() pulumi.StringPtrOutput {
return o.ApplyT(func(v SpringCloudAppIngressSettings) *string { return v.SessionAffinity }).(pulumi.StringPtrOutput)
}
// Specifies the time in seconds until the cookie expires.
func (o SpringCloudAppIngressSettingsOutput) SessionCookieMaxAge() pulumi.IntPtrOutput {
return o.ApplyT(func(v SpringCloudAppIngressSettings) *int { return v.SessionCookieMaxAge }).(pulumi.IntPtrOutput)
}
type SpringCloudAppIngressSettingsPtrOutput struct{ *pulumi.OutputState }
func (SpringCloudAppIngressSettingsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppIngressSettings)(nil)).Elem()
}
func (o SpringCloudAppIngressSettingsPtrOutput) ToSpringCloudAppIngressSettingsPtrOutput() SpringCloudAppIngressSettingsPtrOutput {
return o
}
func (o SpringCloudAppIngressSettingsPtrOutput) ToSpringCloudAppIngressSettingsPtrOutputWithContext(ctx context.Context) SpringCloudAppIngressSettingsPtrOutput {
return o
}
func (o SpringCloudAppIngressSettingsPtrOutput) Elem() SpringCloudAppIngressSettingsOutput {
return o.ApplyT(func(v *SpringCloudAppIngressSettings) SpringCloudAppIngressSettings {
if v != nil {
return *v
}
var ret SpringCloudAppIngressSettings
return ret
}).(SpringCloudAppIngressSettingsOutput)
}
// Specifies how ingress should communicate with this app backend service. Allowed values are `GRPC` and `Default`. Defaults to `Default`.
func (o SpringCloudAppIngressSettingsPtrOutput) BackendProtocol() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppIngressSettings) *string {
if v == nil {
return nil
}
return v.BackendProtocol
}).(pulumi.StringPtrOutput)
}
// Specifies the ingress read time out in seconds. Defaults to `300`.
func (o SpringCloudAppIngressSettingsPtrOutput) ReadTimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudAppIngressSettings) *int {
if v == nil {
return nil
}
return v.ReadTimeoutInSeconds
}).(pulumi.IntPtrOutput)
}
// Specifies the ingress send time out in seconds. Defaults to `60`.
func (o SpringCloudAppIngressSettingsPtrOutput) SendTimeoutInSeconds() pulumi.IntPtrOutput {
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudNewRelicApplicationPerformanceMonitoring.go | sdk/go/azure/appplatform/springCloudNewRelicApplicationPerformanceMonitoring.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is only applicable for Spring Cloud Service enterprise tier
//
// Manages a Spring Cloud Application Performance Monitoring resource for New Relic.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudNewRelicApplicationPerformanceMonitoring` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudNewRelicApplicationPerformanceMonitoring(ctx, "example", &appplatform.SpringCloudNewRelicApplicationPerformanceMonitoringArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// AppName: pulumi.String("example-app-name"),
// LicenseKey: pulumi.String("example-license-key"),
// AppServerPort: pulumi.Int(8080),
// Labels: pulumi.StringMap{
// "tagName1": pulumi.String("tagValue1"),
// "tagName2": pulumi.String("tagValue2"),
// },
// GloballyEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Application Performance Monitoring resource for New Relic can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudNewRelicApplicationPerformanceMonitoring:SpringCloudNewRelicApplicationPerformanceMonitoring example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AppPlatform/spring/service1/apms/apm1
// ```
type SpringCloudNewRelicApplicationPerformanceMonitoring struct {
pulumi.CustomResourceState
// Specifies whether enable the agent. Defaults to `true`.
AgentEnabled pulumi.BoolPtrOutput `pulumi:"agentEnabled"`
// Specifies the application name used to report data to New Relic.
AppName pulumi.StringOutput `pulumi:"appName"`
// Specifies the port number to differentiate JVMs for the same app on the same machine.
AppServerPort pulumi.IntPtrOutput `pulumi:"appServerPort"`
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
AuditModeEnabled pulumi.BoolPtrOutput `pulumi:"auditModeEnabled"`
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
AutoAppNamingEnabled pulumi.BoolPtrOutput `pulumi:"autoAppNamingEnabled"`
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
AutoTransactionNamingEnabled pulumi.BoolPtrOutput `pulumi:"autoTransactionNamingEnabled"`
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
CustomTracingEnabled pulumi.BoolPtrOutput `pulumi:"customTracingEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrOutput `pulumi:"globallyEnabled"`
// Specifies a mapping of labels to be added to the New Relic application.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
LicenseKey pulumi.StringOutput `pulumi:"licenseKey"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudNewRelicApplicationPerformanceMonitoring registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudNewRelicApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, args *SpringCloudNewRelicApplicationPerformanceMonitoringArgs, opts ...pulumi.ResourceOption) (*SpringCloudNewRelicApplicationPerformanceMonitoring, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppName == nil {
return nil, errors.New("invalid value for required argument 'AppName'")
}
if args.LicenseKey == nil {
return nil, errors.New("invalid value for required argument 'LicenseKey'")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.LicenseKey != nil {
args.LicenseKey = pulumi.ToSecret(args.LicenseKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"licenseKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudNewRelicApplicationPerformanceMonitoring
err := ctx.RegisterResource("azure:appplatform/springCloudNewRelicApplicationPerformanceMonitoring:SpringCloudNewRelicApplicationPerformanceMonitoring", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudNewRelicApplicationPerformanceMonitoring gets an existing SpringCloudNewRelicApplicationPerformanceMonitoring resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudNewRelicApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudNewRelicApplicationPerformanceMonitoringState, opts ...pulumi.ResourceOption) (*SpringCloudNewRelicApplicationPerformanceMonitoring, error) {
var resource SpringCloudNewRelicApplicationPerformanceMonitoring
err := ctx.ReadResource("azure:appplatform/springCloudNewRelicApplicationPerformanceMonitoring:SpringCloudNewRelicApplicationPerformanceMonitoring", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudNewRelicApplicationPerformanceMonitoring resources.
type springCloudNewRelicApplicationPerformanceMonitoringState struct {
// Specifies whether enable the agent. Defaults to `true`.
AgentEnabled *bool `pulumi:"agentEnabled"`
// Specifies the application name used to report data to New Relic.
AppName *string `pulumi:"appName"`
// Specifies the port number to differentiate JVMs for the same app on the same machine.
AppServerPort *int `pulumi:"appServerPort"`
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
AuditModeEnabled *bool `pulumi:"auditModeEnabled"`
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
AutoAppNamingEnabled *bool `pulumi:"autoAppNamingEnabled"`
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
AutoTransactionNamingEnabled *bool `pulumi:"autoTransactionNamingEnabled"`
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
CustomTracingEnabled *bool `pulumi:"customTracingEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// Specifies a mapping of labels to be added to the New Relic application.
Labels map[string]string `pulumi:"labels"`
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
LicenseKey *string `pulumi:"licenseKey"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudNewRelicApplicationPerformanceMonitoringState struct {
// Specifies whether enable the agent. Defaults to `true`.
AgentEnabled pulumi.BoolPtrInput
// Specifies the application name used to report data to New Relic.
AppName pulumi.StringPtrInput
// Specifies the port number to differentiate JVMs for the same app on the same machine.
AppServerPort pulumi.IntPtrInput
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
AuditModeEnabled pulumi.BoolPtrInput
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
AutoAppNamingEnabled pulumi.BoolPtrInput
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
AutoTransactionNamingEnabled pulumi.BoolPtrInput
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
CustomTracingEnabled pulumi.BoolPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// Specifies a mapping of labels to be added to the New Relic application.
Labels pulumi.StringMapInput
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
LicenseKey pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudNewRelicApplicationPerformanceMonitoringState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudNewRelicApplicationPerformanceMonitoringState)(nil)).Elem()
}
type springCloudNewRelicApplicationPerformanceMonitoringArgs struct {
// Specifies whether enable the agent. Defaults to `true`.
AgentEnabled *bool `pulumi:"agentEnabled"`
// Specifies the application name used to report data to New Relic.
AppName string `pulumi:"appName"`
// Specifies the port number to differentiate JVMs for the same app on the same machine.
AppServerPort *int `pulumi:"appServerPort"`
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
AuditModeEnabled *bool `pulumi:"auditModeEnabled"`
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
AutoAppNamingEnabled *bool `pulumi:"autoAppNamingEnabled"`
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
AutoTransactionNamingEnabled *bool `pulumi:"autoTransactionNamingEnabled"`
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
CustomTracingEnabled *bool `pulumi:"customTracingEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// Specifies a mapping of labels to be added to the New Relic application.
Labels map[string]string `pulumi:"labels"`
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
LicenseKey string `pulumi:"licenseKey"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudNewRelicApplicationPerformanceMonitoring resource.
type SpringCloudNewRelicApplicationPerformanceMonitoringArgs struct {
// Specifies whether enable the agent. Defaults to `true`.
AgentEnabled pulumi.BoolPtrInput
// Specifies the application name used to report data to New Relic.
AppName pulumi.StringInput
// Specifies the port number to differentiate JVMs for the same app on the same machine.
AppServerPort pulumi.IntPtrInput
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
AuditModeEnabled pulumi.BoolPtrInput
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
AutoAppNamingEnabled pulumi.BoolPtrInput
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
AutoTransactionNamingEnabled pulumi.BoolPtrInput
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
CustomTracingEnabled pulumi.BoolPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// Specifies a mapping of labels to be added to the New Relic application.
Labels pulumi.StringMapInput
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
LicenseKey pulumi.StringInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudNewRelicApplicationPerformanceMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudNewRelicApplicationPerformanceMonitoringArgs)(nil)).Elem()
}
type SpringCloudNewRelicApplicationPerformanceMonitoringInput interface {
pulumi.Input
ToSpringCloudNewRelicApplicationPerformanceMonitoringOutput() SpringCloudNewRelicApplicationPerformanceMonitoringOutput
ToSpringCloudNewRelicApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringOutput
}
func (*SpringCloudNewRelicApplicationPerformanceMonitoring) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i *SpringCloudNewRelicApplicationPerformanceMonitoring) ToSpringCloudNewRelicApplicationPerformanceMonitoringOutput() SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return i.ToSpringCloudNewRelicApplicationPerformanceMonitoringOutputWithContext(context.Background())
}
func (i *SpringCloudNewRelicApplicationPerformanceMonitoring) ToSpringCloudNewRelicApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudNewRelicApplicationPerformanceMonitoringOutput)
}
// SpringCloudNewRelicApplicationPerformanceMonitoringArrayInput is an input type that accepts SpringCloudNewRelicApplicationPerformanceMonitoringArray and SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput values.
// You can construct a concrete instance of `SpringCloudNewRelicApplicationPerformanceMonitoringArrayInput` via:
//
// SpringCloudNewRelicApplicationPerformanceMonitoringArray{ SpringCloudNewRelicApplicationPerformanceMonitoringArgs{...} }
type SpringCloudNewRelicApplicationPerformanceMonitoringArrayInput interface {
pulumi.Input
ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput() SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput
ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutputWithContext(context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput
}
type SpringCloudNewRelicApplicationPerformanceMonitoringArray []SpringCloudNewRelicApplicationPerformanceMonitoringInput
func (SpringCloudNewRelicApplicationPerformanceMonitoringArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudNewRelicApplicationPerformanceMonitoringArray) ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput() SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput {
return i.ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutputWithContext(context.Background())
}
func (i SpringCloudNewRelicApplicationPerformanceMonitoringArray) ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput)
}
// SpringCloudNewRelicApplicationPerformanceMonitoringMapInput is an input type that accepts SpringCloudNewRelicApplicationPerformanceMonitoringMap and SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput values.
// You can construct a concrete instance of `SpringCloudNewRelicApplicationPerformanceMonitoringMapInput` via:
//
// SpringCloudNewRelicApplicationPerformanceMonitoringMap{ "key": SpringCloudNewRelicApplicationPerformanceMonitoringArgs{...} }
type SpringCloudNewRelicApplicationPerformanceMonitoringMapInput interface {
pulumi.Input
ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutput() SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput
ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutputWithContext(context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput
}
type SpringCloudNewRelicApplicationPerformanceMonitoringMap map[string]SpringCloudNewRelicApplicationPerformanceMonitoringInput
func (SpringCloudNewRelicApplicationPerformanceMonitoringMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudNewRelicApplicationPerformanceMonitoringMap) ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutput() SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput {
return i.ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutputWithContext(context.Background())
}
func (i SpringCloudNewRelicApplicationPerformanceMonitoringMap) ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput)
}
type SpringCloudNewRelicApplicationPerformanceMonitoringOutput struct{ *pulumi.OutputState }
func (SpringCloudNewRelicApplicationPerformanceMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringOutput() SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return o
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return o
}
// Specifies whether enable the agent. Defaults to `true`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AgentEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.AgentEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies the application name used to report data to New Relic.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AppName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput)
}
// Specifies the port number to differentiate JVMs for the same app on the same machine.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AppServerPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.IntPtrOutput {
return v.AppServerPort
}).(pulumi.IntPtrOutput)
}
// Specifies whether enable plain text logging of all data sent to New Relic to the agent logfile. Defaults to `false`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AuditModeEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.AuditModeEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies whether enable the reporting of data separately for each web app. Defaults to `false`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AutoAppNamingEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.AutoAppNamingEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies whether enable the component-based transaction naming. Defaults to `true`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) AutoTransactionNamingEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.AutoTransactionNamingEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies whether enable all instrumentation using an `@Trace` annotation. Disabling this causes `@Trace` annotations to be ignored. Defaults to `true`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) CustomTracingEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.CustomTracingEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) GloballyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.GloballyEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies a mapping of labels to be added to the New Relic application.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput)
}
// Specifies the license key associated with the New Relic account. This key binds your agent's data to your account in New Relic service.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) LicenseKey() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.StringOutput { return v.LicenseKey }).(pulumi.StringOutput)
}
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for New Relic. Changing this forces a new resource to be created.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudNewRelicApplicationPerformanceMonitoringOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudNewRelicApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.SpringCloudServiceId
}).(pulumi.StringOutput)
}
type SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput() SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput) Index(i pulumi.IntInput) SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudNewRelicApplicationPerformanceMonitoring {
return vs[0].([]*SpringCloudNewRelicApplicationPerformanceMonitoring)[vs[1].(int)]
}).(SpringCloudNewRelicApplicationPerformanceMonitoringOutput)
}
type SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput struct{ *pulumi.OutputState }
func (SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudNewRelicApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutput() SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput) ToSpringCloudNewRelicApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput) MapIndex(k pulumi.StringInput) SpringCloudNewRelicApplicationPerformanceMonitoringOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudNewRelicApplicationPerformanceMonitoring {
return vs[0].(map[string]*SpringCloudNewRelicApplicationPerformanceMonitoring)[vs[1].(string)]
}).(SpringCloudNewRelicApplicationPerformanceMonitoringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudNewRelicApplicationPerformanceMonitoringInput)(nil)).Elem(), &SpringCloudNewRelicApplicationPerformanceMonitoring{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudNewRelicApplicationPerformanceMonitoringArrayInput)(nil)).Elem(), SpringCloudNewRelicApplicationPerformanceMonitoringArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudNewRelicApplicationPerformanceMonitoringMapInput)(nil)).Elem(), SpringCloudNewRelicApplicationPerformanceMonitoringMap{})
pulumi.RegisterOutputType(SpringCloudNewRelicApplicationPerformanceMonitoringOutput{})
pulumi.RegisterOutputType(SpringCloudNewRelicApplicationPerformanceMonitoringArrayOutput{})
pulumi.RegisterOutputType(SpringCloudNewRelicApplicationPerformanceMonitoringMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudService.go | sdk/go/azure/appplatform/springCloudService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Spring Cloud Service.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudService` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("tf-test-appinsights"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("S0"),
// ConfigServerGitSetting: &appplatform.SpringCloudServiceConfigServerGitSettingArgs{
// Uri: pulumi.String("https://github.com/Azure-Samples/piggymetrics"),
// Label: pulumi.String("config"),
// SearchPaths: pulumi.StringArray{
// pulumi.String("dir1"),
// pulumi.String("dir2"),
// },
// },
// Trace: &appplatform.SpringCloudServiceTraceArgs{
// ConnectionString: exampleInsights.ConnectionString,
// SampleRate: pulumi.Float64(10),
// },
// Tags: pulumi.StringMap{
// "Env": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudService:SpringCloudService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AppPlatform/spring/spring1
// ```
type SpringCloudService struct {
pulumi.CustomResourceState
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
BuildAgentPoolSize pulumi.StringPtrOutput `pulumi:"buildAgentPoolSize"`
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
ConfigServerGitSetting SpringCloudServiceConfigServerGitSettingPtrOutput `pulumi:"configServerGitSetting"`
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
ContainerRegistries SpringCloudServiceContainerRegistryArrayOutput `pulumi:"containerRegistries"`
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
DefaultBuildService SpringCloudServiceDefaultBuildServicePtrOutput `pulumi:"defaultBuildService"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Should the log stream in vnet injection instance could be accessed from Internet?
LogStreamPublicEndpointEnabled pulumi.BoolPtrOutput `pulumi:"logStreamPublicEndpointEnabled"`
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
ManagedEnvironmentId pulumi.StringPtrOutput `pulumi:"managedEnvironmentId"`
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
Marketplace SpringCloudServiceMarketplaceOutput `pulumi:"marketplace"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `network` block as defined below. Changing this forces a new resource to be created.
Network SpringCloudServiceNetworkPtrOutput `pulumi:"network"`
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
OutboundPublicIpAddresses pulumi.StringArrayOutput `pulumi:"outboundPublicIpAddresses"`
// A list of `requiredNetworkTrafficRules` blocks as defined below.
RequiredNetworkTrafficRules SpringCloudServiceRequiredNetworkTrafficRuleArrayOutput `pulumi:"requiredNetworkTrafficRules"`
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
ServiceRegistryEnabled pulumi.BoolPtrOutput `pulumi:"serviceRegistryEnabled"`
// The ID of the Spring Cloud Service Registry.
ServiceRegistryId pulumi.StringOutput `pulumi:"serviceRegistryId"`
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
SkuName pulumi.StringPtrOutput `pulumi:"skuName"`
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
SkuTier pulumi.StringOutput `pulumi:"skuTier"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `trace` block as defined below.
Trace SpringCloudServiceTracePtrOutput `pulumi:"trace"`
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
ZoneRedundant pulumi.BoolPtrOutput `pulumi:"zoneRedundant"`
}
// NewSpringCloudService registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudService(ctx *pulumi.Context,
name string, args *SpringCloudServiceArgs, opts ...pulumi.ResourceOption) (*SpringCloudService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudService
err := ctx.RegisterResource("azure:appplatform/springCloudService:SpringCloudService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudService gets an existing SpringCloudService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudServiceState, opts ...pulumi.ResourceOption) (*SpringCloudService, error) {
var resource SpringCloudService
err := ctx.ReadResource("azure:appplatform/springCloudService:SpringCloudService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudService resources.
type springCloudServiceState struct {
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
BuildAgentPoolSize *string `pulumi:"buildAgentPoolSize"`
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
ConfigServerGitSetting *SpringCloudServiceConfigServerGitSetting `pulumi:"configServerGitSetting"`
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
ContainerRegistries []SpringCloudServiceContainerRegistry `pulumi:"containerRegistries"`
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
DefaultBuildService *SpringCloudServiceDefaultBuildService `pulumi:"defaultBuildService"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Should the log stream in vnet injection instance could be accessed from Internet?
LogStreamPublicEndpointEnabled *bool `pulumi:"logStreamPublicEndpointEnabled"`
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
ManagedEnvironmentId *string `pulumi:"managedEnvironmentId"`
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
Marketplace *SpringCloudServiceMarketplace `pulumi:"marketplace"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `network` block as defined below. Changing this forces a new resource to be created.
Network *SpringCloudServiceNetwork `pulumi:"network"`
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
OutboundPublicIpAddresses []string `pulumi:"outboundPublicIpAddresses"`
// A list of `requiredNetworkTrafficRules` blocks as defined below.
RequiredNetworkTrafficRules []SpringCloudServiceRequiredNetworkTrafficRule `pulumi:"requiredNetworkTrafficRules"`
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
ServiceRegistryEnabled *bool `pulumi:"serviceRegistryEnabled"`
// The ID of the Spring Cloud Service Registry.
ServiceRegistryId *string `pulumi:"serviceRegistryId"`
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
SkuName *string `pulumi:"skuName"`
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
SkuTier *string `pulumi:"skuTier"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `trace` block as defined below.
Trace *SpringCloudServiceTrace `pulumi:"trace"`
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
ZoneRedundant *bool `pulumi:"zoneRedundant"`
}
type SpringCloudServiceState struct {
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
BuildAgentPoolSize pulumi.StringPtrInput
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
ConfigServerGitSetting SpringCloudServiceConfigServerGitSettingPtrInput
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
ContainerRegistries SpringCloudServiceContainerRegistryArrayInput
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
DefaultBuildService SpringCloudServiceDefaultBuildServicePtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Should the log stream in vnet injection instance could be accessed from Internet?
LogStreamPublicEndpointEnabled pulumi.BoolPtrInput
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
ManagedEnvironmentId pulumi.StringPtrInput
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
Marketplace SpringCloudServiceMarketplacePtrInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `network` block as defined below. Changing this forces a new resource to be created.
Network SpringCloudServiceNetworkPtrInput
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
OutboundPublicIpAddresses pulumi.StringArrayInput
// A list of `requiredNetworkTrafficRules` blocks as defined below.
RequiredNetworkTrafficRules SpringCloudServiceRequiredNetworkTrafficRuleArrayInput
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
ServiceRegistryEnabled pulumi.BoolPtrInput
// The ID of the Spring Cloud Service Registry.
ServiceRegistryId pulumi.StringPtrInput
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
SkuName pulumi.StringPtrInput
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
SkuTier pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `trace` block as defined below.
Trace SpringCloudServiceTracePtrInput
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
ZoneRedundant pulumi.BoolPtrInput
}
func (SpringCloudServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudServiceState)(nil)).Elem()
}
type springCloudServiceArgs struct {
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
BuildAgentPoolSize *string `pulumi:"buildAgentPoolSize"`
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
ConfigServerGitSetting *SpringCloudServiceConfigServerGitSetting `pulumi:"configServerGitSetting"`
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
ContainerRegistries []SpringCloudServiceContainerRegistry `pulumi:"containerRegistries"`
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
DefaultBuildService *SpringCloudServiceDefaultBuildService `pulumi:"defaultBuildService"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Should the log stream in vnet injection instance could be accessed from Internet?
LogStreamPublicEndpointEnabled *bool `pulumi:"logStreamPublicEndpointEnabled"`
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
ManagedEnvironmentId *string `pulumi:"managedEnvironmentId"`
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
Marketplace *SpringCloudServiceMarketplace `pulumi:"marketplace"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `network` block as defined below. Changing this forces a new resource to be created.
Network *SpringCloudServiceNetwork `pulumi:"network"`
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
ServiceRegistryEnabled *bool `pulumi:"serviceRegistryEnabled"`
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
SkuName *string `pulumi:"skuName"`
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
SkuTier *string `pulumi:"skuTier"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `trace` block as defined below.
Trace *SpringCloudServiceTrace `pulumi:"trace"`
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
ZoneRedundant *bool `pulumi:"zoneRedundant"`
}
// The set of arguments for constructing a SpringCloudService resource.
type SpringCloudServiceArgs struct {
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
BuildAgentPoolSize pulumi.StringPtrInput
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
ConfigServerGitSetting SpringCloudServiceConfigServerGitSettingPtrInput
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
ContainerRegistries SpringCloudServiceContainerRegistryArrayInput
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
DefaultBuildService SpringCloudServiceDefaultBuildServicePtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Should the log stream in vnet injection instance could be accessed from Internet?
LogStreamPublicEndpointEnabled pulumi.BoolPtrInput
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
ManagedEnvironmentId pulumi.StringPtrInput
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
Marketplace SpringCloudServiceMarketplacePtrInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `network` block as defined below. Changing this forces a new resource to be created.
Network SpringCloudServiceNetworkPtrInput
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
ServiceRegistryEnabled pulumi.BoolPtrInput
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
SkuName pulumi.StringPtrInput
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
SkuTier pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `trace` block as defined below.
Trace SpringCloudServiceTracePtrInput
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
ZoneRedundant pulumi.BoolPtrInput
}
func (SpringCloudServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudServiceArgs)(nil)).Elem()
}
type SpringCloudServiceInput interface {
pulumi.Input
ToSpringCloudServiceOutput() SpringCloudServiceOutput
ToSpringCloudServiceOutputWithContext(ctx context.Context) SpringCloudServiceOutput
}
func (*SpringCloudService) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudService)(nil)).Elem()
}
func (i *SpringCloudService) ToSpringCloudServiceOutput() SpringCloudServiceOutput {
return i.ToSpringCloudServiceOutputWithContext(context.Background())
}
func (i *SpringCloudService) ToSpringCloudServiceOutputWithContext(ctx context.Context) SpringCloudServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudServiceOutput)
}
// SpringCloudServiceArrayInput is an input type that accepts SpringCloudServiceArray and SpringCloudServiceArrayOutput values.
// You can construct a concrete instance of `SpringCloudServiceArrayInput` via:
//
// SpringCloudServiceArray{ SpringCloudServiceArgs{...} }
type SpringCloudServiceArrayInput interface {
pulumi.Input
ToSpringCloudServiceArrayOutput() SpringCloudServiceArrayOutput
ToSpringCloudServiceArrayOutputWithContext(context.Context) SpringCloudServiceArrayOutput
}
type SpringCloudServiceArray []SpringCloudServiceInput
func (SpringCloudServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudService)(nil)).Elem()
}
func (i SpringCloudServiceArray) ToSpringCloudServiceArrayOutput() SpringCloudServiceArrayOutput {
return i.ToSpringCloudServiceArrayOutputWithContext(context.Background())
}
func (i SpringCloudServiceArray) ToSpringCloudServiceArrayOutputWithContext(ctx context.Context) SpringCloudServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudServiceArrayOutput)
}
// SpringCloudServiceMapInput is an input type that accepts SpringCloudServiceMap and SpringCloudServiceMapOutput values.
// You can construct a concrete instance of `SpringCloudServiceMapInput` via:
//
// SpringCloudServiceMap{ "key": SpringCloudServiceArgs{...} }
type SpringCloudServiceMapInput interface {
pulumi.Input
ToSpringCloudServiceMapOutput() SpringCloudServiceMapOutput
ToSpringCloudServiceMapOutputWithContext(context.Context) SpringCloudServiceMapOutput
}
type SpringCloudServiceMap map[string]SpringCloudServiceInput
func (SpringCloudServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudService)(nil)).Elem()
}
func (i SpringCloudServiceMap) ToSpringCloudServiceMapOutput() SpringCloudServiceMapOutput {
return i.ToSpringCloudServiceMapOutputWithContext(context.Background())
}
func (i SpringCloudServiceMap) ToSpringCloudServiceMapOutputWithContext(ctx context.Context) SpringCloudServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudServiceMapOutput)
}
type SpringCloudServiceOutput struct{ *pulumi.OutputState }
func (SpringCloudServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudService)(nil)).Elem()
}
func (o SpringCloudServiceOutput) ToSpringCloudServiceOutput() SpringCloudServiceOutput {
return o
}
func (o SpringCloudServiceOutput) ToSpringCloudServiceOutputWithContext(ctx context.Context) SpringCloudServiceOutput {
return o
}
// Specifies the size for this Spring Cloud Service's default build agent pool. Possible values are `S1`, `S2`, `S3`, `S4` and `S5`. This field is applicable only for Spring Cloud Service with enterprise tier.
func (o SpringCloudServiceOutput) BuildAgentPoolSize() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringPtrOutput { return v.BuildAgentPoolSize }).(pulumi.StringPtrOutput)
}
// A `configServerGitSetting` block as defined below. This field is applicable only for Spring Cloud Service with basic and standard tier.
func (o SpringCloudServiceOutput) ConfigServerGitSetting() SpringCloudServiceConfigServerGitSettingPtrOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceConfigServerGitSettingPtrOutput {
return v.ConfigServerGitSetting
}).(SpringCloudServiceConfigServerGitSettingPtrOutput)
}
// One or more `containerRegistry` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
func (o SpringCloudServiceOutput) ContainerRegistries() SpringCloudServiceContainerRegistryArrayOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceContainerRegistryArrayOutput {
return v.ContainerRegistries
}).(SpringCloudServiceContainerRegistryArrayOutput)
}
// A `defaultBuildService` block as defined below. This field is applicable only for Spring Cloud Service with enterprise tier.
func (o SpringCloudServiceOutput) DefaultBuildService() SpringCloudServiceDefaultBuildServicePtrOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceDefaultBuildServicePtrOutput {
return v.DefaultBuildService
}).(SpringCloudServiceDefaultBuildServicePtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Should the log stream in vnet injection instance could be accessed from Internet?
func (o SpringCloudServiceOutput) LogStreamPublicEndpointEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.BoolPtrOutput { return v.LogStreamPublicEndpointEnabled }).(pulumi.BoolPtrOutput)
}
// The resource Id of the Managed Environment that the Spring Apps instance builds on. Can only be specified when `skuTier` is set to `StandardGen2`.
func (o SpringCloudServiceOutput) ManagedEnvironmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringPtrOutput { return v.ManagedEnvironmentId }).(pulumi.StringPtrOutput)
}
// A `marketplace` block as defined below. Can only be specified when `sku` is set to `E0`.
func (o SpringCloudServiceOutput) Marketplace() SpringCloudServiceMarketplaceOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceMarketplaceOutput { return v.Marketplace }).(SpringCloudServiceMarketplaceOutput)
}
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `network` block as defined below. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) Network() SpringCloudServiceNetworkPtrOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceNetworkPtrOutput { return v.Network }).(SpringCloudServiceNetworkPtrOutput)
}
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
func (o SpringCloudServiceOutput) OutboundPublicIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringArrayOutput { return v.OutboundPublicIpAddresses }).(pulumi.StringArrayOutput)
}
// A list of `requiredNetworkTrafficRules` blocks as defined below.
func (o SpringCloudServiceOutput) RequiredNetworkTrafficRules() SpringCloudServiceRequiredNetworkTrafficRuleArrayOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceRequiredNetworkTrafficRuleArrayOutput {
return v.RequiredNetworkTrafficRules
}).(SpringCloudServiceRequiredNetworkTrafficRuleArrayOutput)
}
// Specifies The name of the resource group in which to create the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Whether enable the default Service Registry. This field is applicable only for Spring Cloud Service with enterprise tier.
func (o SpringCloudServiceOutput) ServiceRegistryEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.BoolPtrOutput { return v.ServiceRegistryEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Spring Cloud Service Registry.
func (o SpringCloudServiceOutput) ServiceRegistryId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringOutput { return v.ServiceRegistryId }).(pulumi.StringOutput)
}
// Specifies the SKU Name for this Spring Cloud Service. Possible values are `B0`, `S0` and `E0`. Defaults to `S0`. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) SkuName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringPtrOutput { return v.SkuName }).(pulumi.StringPtrOutput)
}
// Specifies the SKU Tier for this Spring Cloud Service. Possible values are `Basic`, `Enterprise`, `Standard` and `StandardGen2`. The attribute is automatically computed from API response except when `managedEnvironmentId` is defined. Changing this forces a new resource to be created.
func (o SpringCloudServiceOutput) SkuTier() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringOutput { return v.SkuTier }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o SpringCloudServiceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `trace` block as defined below.
func (o SpringCloudServiceOutput) Trace() SpringCloudServiceTracePtrOutput {
return o.ApplyT(func(v *SpringCloudService) SpringCloudServiceTracePtrOutput { return v.Trace }).(SpringCloudServiceTracePtrOutput)
}
// Whether zone redundancy is enabled for this Spring Cloud Service. Defaults to `false`.
func (o SpringCloudServiceOutput) ZoneRedundant() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudService) pulumi.BoolPtrOutput { return v.ZoneRedundant }).(pulumi.BoolPtrOutput)
}
type SpringCloudServiceArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudService)(nil)).Elem()
}
func (o SpringCloudServiceArrayOutput) ToSpringCloudServiceArrayOutput() SpringCloudServiceArrayOutput {
return o
}
func (o SpringCloudServiceArrayOutput) ToSpringCloudServiceArrayOutputWithContext(ctx context.Context) SpringCloudServiceArrayOutput {
return o
}
func (o SpringCloudServiceArrayOutput) Index(i pulumi.IntInput) SpringCloudServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudService {
return vs[0].([]*SpringCloudService)[vs[1].(int)]
}).(SpringCloudServiceOutput)
}
type SpringCloudServiceMapOutput struct{ *pulumi.OutputState }
func (SpringCloudServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudService)(nil)).Elem()
}
func (o SpringCloudServiceMapOutput) ToSpringCloudServiceMapOutput() SpringCloudServiceMapOutput {
return o
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudCustomDomain.go | sdk/go/azure/appplatform/springCloudCustomDomain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Spring Cloud Custom Domain.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudCustomDomain` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns"
// "github.com/pulumi/pulumi-std/sdk/go/std"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example := dns.LookupZoneOutput(ctx, dns.GetZoneOutputArgs{
// Name: pulumi.String("mydomain.com"),
// ResourceGroupName: exampleResourceGroup.Name,
// }, nil)
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: exampleResourceGroup.Name,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// exampleCNameRecord, err := dns.NewCNameRecord(ctx, "example", &dns.CNameRecordArgs{
// Name: pulumi.String("record1"),
// ZoneName: pulumi.String(example.ApplyT(func(example dns.GetZoneResult) (*string, error) {
// return &example.Name, nil
// }).(pulumi.StringPtrOutput)),
// ResourceGroupName: pulumi.String(example.ApplyT(func(example dns.GetZoneResult) (*string, error) {
// return &example.ResourceGroupName, nil
// }).(pulumi.StringPtrOutput)),
// Ttl: pulumi.Int(300),
// Record: exampleSpringCloudApp.Fqdn,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudCustomDomain(ctx, "example", &appplatform.SpringCloudCustomDomainArgs{
// Name: pulumi.String(std.JoinOutput(ctx, std.JoinOutputArgs{
// Separator: pulumi.String("."),
// Input: pulumi.StringArray{
// exampleCNameRecord.Name,
// exampleCNameRecord.ZoneName,
// },
// }, nil).ApplyT(func(invoke std.JoinResult) (*string, error) {
// return invoke.Result, nil
// }).(pulumi.StringPtrOutput)),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Custom Domain can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/apps/app1/domains/domain.com
// ```
type SpringCloudCustomDomain struct {
pulumi.CustomResourceState
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
CertificateName pulumi.StringPtrOutput `pulumi:"certificateName"`
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
Thumbprint pulumi.StringPtrOutput `pulumi:"thumbprint"`
}
// NewSpringCloudCustomDomain registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudCustomDomain(ctx *pulumi.Context,
name string, args *SpringCloudCustomDomainArgs, opts ...pulumi.ResourceOption) (*SpringCloudCustomDomain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudCustomDomain
err := ctx.RegisterResource("azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudCustomDomain gets an existing SpringCloudCustomDomain resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudCustomDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudCustomDomainState, opts ...pulumi.ResourceOption) (*SpringCloudCustomDomain, error) {
var resource SpringCloudCustomDomain
err := ctx.ReadResource("azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudCustomDomain resources.
type springCloudCustomDomainState struct {
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
CertificateName *string `pulumi:"certificateName"`
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
Thumbprint *string `pulumi:"thumbprint"`
}
type SpringCloudCustomDomainState struct {
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
CertificateName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudCustomDomainState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCustomDomainState)(nil)).Elem()
}
type springCloudCustomDomainArgs struct {
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
CertificateName *string `pulumi:"certificateName"`
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
Thumbprint *string `pulumi:"thumbprint"`
}
// The set of arguments for constructing a SpringCloudCustomDomain resource.
type SpringCloudCustomDomainArgs struct {
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
CertificateName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudCustomDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCustomDomainArgs)(nil)).Elem()
}
type SpringCloudCustomDomainInput interface {
pulumi.Input
ToSpringCloudCustomDomainOutput() SpringCloudCustomDomainOutput
ToSpringCloudCustomDomainOutputWithContext(ctx context.Context) SpringCloudCustomDomainOutput
}
func (*SpringCloudCustomDomain) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCustomDomain)(nil)).Elem()
}
func (i *SpringCloudCustomDomain) ToSpringCloudCustomDomainOutput() SpringCloudCustomDomainOutput {
return i.ToSpringCloudCustomDomainOutputWithContext(context.Background())
}
func (i *SpringCloudCustomDomain) ToSpringCloudCustomDomainOutputWithContext(ctx context.Context) SpringCloudCustomDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomDomainOutput)
}
// SpringCloudCustomDomainArrayInput is an input type that accepts SpringCloudCustomDomainArray and SpringCloudCustomDomainArrayOutput values.
// You can construct a concrete instance of `SpringCloudCustomDomainArrayInput` via:
//
// SpringCloudCustomDomainArray{ SpringCloudCustomDomainArgs{...} }
type SpringCloudCustomDomainArrayInput interface {
pulumi.Input
ToSpringCloudCustomDomainArrayOutput() SpringCloudCustomDomainArrayOutput
ToSpringCloudCustomDomainArrayOutputWithContext(context.Context) SpringCloudCustomDomainArrayOutput
}
type SpringCloudCustomDomainArray []SpringCloudCustomDomainInput
func (SpringCloudCustomDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCustomDomain)(nil)).Elem()
}
func (i SpringCloudCustomDomainArray) ToSpringCloudCustomDomainArrayOutput() SpringCloudCustomDomainArrayOutput {
return i.ToSpringCloudCustomDomainArrayOutputWithContext(context.Background())
}
func (i SpringCloudCustomDomainArray) ToSpringCloudCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudCustomDomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomDomainArrayOutput)
}
// SpringCloudCustomDomainMapInput is an input type that accepts SpringCloudCustomDomainMap and SpringCloudCustomDomainMapOutput values.
// You can construct a concrete instance of `SpringCloudCustomDomainMapInput` via:
//
// SpringCloudCustomDomainMap{ "key": SpringCloudCustomDomainArgs{...} }
type SpringCloudCustomDomainMapInput interface {
pulumi.Input
ToSpringCloudCustomDomainMapOutput() SpringCloudCustomDomainMapOutput
ToSpringCloudCustomDomainMapOutputWithContext(context.Context) SpringCloudCustomDomainMapOutput
}
type SpringCloudCustomDomainMap map[string]SpringCloudCustomDomainInput
func (SpringCloudCustomDomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCustomDomain)(nil)).Elem()
}
func (i SpringCloudCustomDomainMap) ToSpringCloudCustomDomainMapOutput() SpringCloudCustomDomainMapOutput {
return i.ToSpringCloudCustomDomainMapOutputWithContext(context.Background())
}
func (i SpringCloudCustomDomainMap) ToSpringCloudCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudCustomDomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomDomainMapOutput)
}
type SpringCloudCustomDomainOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomDomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCustomDomain)(nil)).Elem()
}
func (o SpringCloudCustomDomainOutput) ToSpringCloudCustomDomainOutput() SpringCloudCustomDomainOutput {
return o
}
func (o SpringCloudCustomDomainOutput) ToSpringCloudCustomDomainOutputWithContext(ctx context.Context) SpringCloudCustomDomainOutput {
return o
}
// Specifies the name of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `thumbprint` is specified
func (o SpringCloudCustomDomainOutput) CertificateName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomDomain) pulumi.StringPtrOutput { return v.CertificateName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Spring Cloud Custom Domain. Changing this forces a new resource to be created.
func (o SpringCloudCustomDomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCustomDomain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the resource ID of the Spring Cloud Application. Changing this forces a new resource to be created.
func (o SpringCloudCustomDomainOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCustomDomain) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud Custom Domain. Required when `certificateName` is specified. Changing this forces a new resource to be created.
func (o SpringCloudCustomDomainOutput) Thumbprint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomDomain) pulumi.StringPtrOutput { return v.Thumbprint }).(pulumi.StringPtrOutput)
}
type SpringCloudCustomDomainArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomDomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCustomDomain)(nil)).Elem()
}
func (o SpringCloudCustomDomainArrayOutput) ToSpringCloudCustomDomainArrayOutput() SpringCloudCustomDomainArrayOutput {
return o
}
func (o SpringCloudCustomDomainArrayOutput) ToSpringCloudCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudCustomDomainArrayOutput {
return o
}
func (o SpringCloudCustomDomainArrayOutput) Index(i pulumi.IntInput) SpringCloudCustomDomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudCustomDomain {
return vs[0].([]*SpringCloudCustomDomain)[vs[1].(int)]
}).(SpringCloudCustomDomainOutput)
}
type SpringCloudCustomDomainMapOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomDomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCustomDomain)(nil)).Elem()
}
func (o SpringCloudCustomDomainMapOutput) ToSpringCloudCustomDomainMapOutput() SpringCloudCustomDomainMapOutput {
return o
}
func (o SpringCloudCustomDomainMapOutput) ToSpringCloudCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudCustomDomainMapOutput {
return o
}
func (o SpringCloudCustomDomainMapOutput) MapIndex(k pulumi.StringInput) SpringCloudCustomDomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudCustomDomain {
return vs[0].(map[string]*SpringCloudCustomDomain)[vs[1].(string)]
}).(SpringCloudCustomDomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomDomainInput)(nil)).Elem(), &SpringCloudCustomDomain{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomDomainArrayInput)(nil)).Elem(), SpringCloudCustomDomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomDomainMapInput)(nil)).Elem(), SpringCloudCustomDomainMap{})
pulumi.RegisterOutputType(SpringCloudCustomDomainOutput{})
pulumi.RegisterOutputType(SpringCloudCustomDomainArrayOutput{})
pulumi.RegisterOutputType(SpringCloudCustomDomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudAppMysqlAssociation.go | sdk/go/azure/appplatform/springCloudAppMysqlAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Associates a Spring Cloud Application with a MySQL Database.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudAppMysqlAssociation` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mysql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{
// Name: pulumi.String("example-fsserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdministratorLogin: pulumi.String("adminTerraform"),
// AdministratorPassword: pulumi.String("QAZwsx123"),
// SkuName: pulumi.String("B_Standard_B1ms"),
// Zone: pulumi.String("2"),
// })
// if err != nil {
// return err
// }
// exampleFlexibleDatabase, err := mysql.NewFlexibleDatabase(ctx, "example", &mysql.FlexibleDatabaseArgs{
// Name: pulumi.String("exampledb"),
// ResourceGroupName: example.Name,
// ServerName: exampleFlexibleServer.Name,
// Charset: pulumi.String("utf8"),
// Collation: pulumi.String("utf8_unicode_ci"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudAppMysqlAssociation(ctx, "example", &appplatform.SpringCloudAppMysqlAssociationArgs{
// Name: pulumi.String("example-bind"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// MysqlServerId: exampleFlexibleServer.ID(),
// DatabaseName: exampleFlexibleDatabase.Name,
// Username: exampleFlexibleServer.AdministratorLogin,
// Password: exampleFlexibleServer.AdministratorLoginPassword,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Application MySQL Association can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudAppMysqlAssociation:SpringCloudAppMysqlAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1/bindings/bind1
// ```
type SpringCloudAppMysqlAssociation struct {
pulumi.CustomResourceState
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
MysqlServerId pulumi.StringOutput `pulumi:"mysqlServerId"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
Password pulumi.StringOutput `pulumi:"password"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewSpringCloudAppMysqlAssociation registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudAppMysqlAssociation(ctx *pulumi.Context,
name string, args *SpringCloudAppMysqlAssociationArgs, opts ...pulumi.ResourceOption) (*SpringCloudAppMysqlAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.MysqlServerId == nil {
return nil, errors.New("invalid value for required argument 'MysqlServerId'")
}
if args.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudAppMysqlAssociation
err := ctx.RegisterResource("azure:appplatform/springCloudAppMysqlAssociation:SpringCloudAppMysqlAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudAppMysqlAssociation gets an existing SpringCloudAppMysqlAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudAppMysqlAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAppMysqlAssociationState, opts ...pulumi.ResourceOption) (*SpringCloudAppMysqlAssociation, error) {
var resource SpringCloudAppMysqlAssociation
err := ctx.ReadResource("azure:appplatform/springCloudAppMysqlAssociation:SpringCloudAppMysqlAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudAppMysqlAssociation resources.
type springCloudAppMysqlAssociationState struct {
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
DatabaseName *string `pulumi:"databaseName"`
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
MysqlServerId *string `pulumi:"mysqlServerId"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
Password *string `pulumi:"password"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
Username *string `pulumi:"username"`
}
type SpringCloudAppMysqlAssociationState struct {
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
DatabaseName pulumi.StringPtrInput
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
MysqlServerId pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
Password pulumi.StringPtrInput
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
Username pulumi.StringPtrInput
}
func (SpringCloudAppMysqlAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppMysqlAssociationState)(nil)).Elem()
}
type springCloudAppMysqlAssociationArgs struct {
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
DatabaseName string `pulumi:"databaseName"`
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
MysqlServerId string `pulumi:"mysqlServerId"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
Password string `pulumi:"password"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a SpringCloudAppMysqlAssociation resource.
type SpringCloudAppMysqlAssociationArgs struct {
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
DatabaseName pulumi.StringInput
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
MysqlServerId pulumi.StringInput
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
Password pulumi.StringInput
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
Username pulumi.StringInput
}
func (SpringCloudAppMysqlAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppMysqlAssociationArgs)(nil)).Elem()
}
type SpringCloudAppMysqlAssociationInput interface {
pulumi.Input
ToSpringCloudAppMysqlAssociationOutput() SpringCloudAppMysqlAssociationOutput
ToSpringCloudAppMysqlAssociationOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationOutput
}
func (*SpringCloudAppMysqlAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (i *SpringCloudAppMysqlAssociation) ToSpringCloudAppMysqlAssociationOutput() SpringCloudAppMysqlAssociationOutput {
return i.ToSpringCloudAppMysqlAssociationOutputWithContext(context.Background())
}
func (i *SpringCloudAppMysqlAssociation) ToSpringCloudAppMysqlAssociationOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppMysqlAssociationOutput)
}
// SpringCloudAppMysqlAssociationArrayInput is an input type that accepts SpringCloudAppMysqlAssociationArray and SpringCloudAppMysqlAssociationArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppMysqlAssociationArrayInput` via:
//
// SpringCloudAppMysqlAssociationArray{ SpringCloudAppMysqlAssociationArgs{...} }
type SpringCloudAppMysqlAssociationArrayInput interface {
pulumi.Input
ToSpringCloudAppMysqlAssociationArrayOutput() SpringCloudAppMysqlAssociationArrayOutput
ToSpringCloudAppMysqlAssociationArrayOutputWithContext(context.Context) SpringCloudAppMysqlAssociationArrayOutput
}
type SpringCloudAppMysqlAssociationArray []SpringCloudAppMysqlAssociationInput
func (SpringCloudAppMysqlAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (i SpringCloudAppMysqlAssociationArray) ToSpringCloudAppMysqlAssociationArrayOutput() SpringCloudAppMysqlAssociationArrayOutput {
return i.ToSpringCloudAppMysqlAssociationArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppMysqlAssociationArray) ToSpringCloudAppMysqlAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppMysqlAssociationArrayOutput)
}
// SpringCloudAppMysqlAssociationMapInput is an input type that accepts SpringCloudAppMysqlAssociationMap and SpringCloudAppMysqlAssociationMapOutput values.
// You can construct a concrete instance of `SpringCloudAppMysqlAssociationMapInput` via:
//
// SpringCloudAppMysqlAssociationMap{ "key": SpringCloudAppMysqlAssociationArgs{...} }
type SpringCloudAppMysqlAssociationMapInput interface {
pulumi.Input
ToSpringCloudAppMysqlAssociationMapOutput() SpringCloudAppMysqlAssociationMapOutput
ToSpringCloudAppMysqlAssociationMapOutputWithContext(context.Context) SpringCloudAppMysqlAssociationMapOutput
}
type SpringCloudAppMysqlAssociationMap map[string]SpringCloudAppMysqlAssociationInput
func (SpringCloudAppMysqlAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (i SpringCloudAppMysqlAssociationMap) ToSpringCloudAppMysqlAssociationMapOutput() SpringCloudAppMysqlAssociationMapOutput {
return i.ToSpringCloudAppMysqlAssociationMapOutputWithContext(context.Background())
}
func (i SpringCloudAppMysqlAssociationMap) ToSpringCloudAppMysqlAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppMysqlAssociationMapOutput)
}
type SpringCloudAppMysqlAssociationOutput struct{ *pulumi.OutputState }
func (SpringCloudAppMysqlAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (o SpringCloudAppMysqlAssociationOutput) ToSpringCloudAppMysqlAssociationOutput() SpringCloudAppMysqlAssociationOutput {
return o
}
func (o SpringCloudAppMysqlAssociationOutput) ToSpringCloudAppMysqlAssociationOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationOutput {
return o
}
// Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.
func (o SpringCloudAppMysqlAssociationOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.
func (o SpringCloudAppMysqlAssociationOutput) MysqlServerId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.MysqlServerId }).(pulumi.StringOutput)
}
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
func (o SpringCloudAppMysqlAssociationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.
func (o SpringCloudAppMysqlAssociationOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
func (o SpringCloudAppMysqlAssociationOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
// Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.
func (o SpringCloudAppMysqlAssociationOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppMysqlAssociation) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type SpringCloudAppMysqlAssociationArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppMysqlAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (o SpringCloudAppMysqlAssociationArrayOutput) ToSpringCloudAppMysqlAssociationArrayOutput() SpringCloudAppMysqlAssociationArrayOutput {
return o
}
func (o SpringCloudAppMysqlAssociationArrayOutput) ToSpringCloudAppMysqlAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationArrayOutput {
return o
}
func (o SpringCloudAppMysqlAssociationArrayOutput) Index(i pulumi.IntInput) SpringCloudAppMysqlAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudAppMysqlAssociation {
return vs[0].([]*SpringCloudAppMysqlAssociation)[vs[1].(int)]
}).(SpringCloudAppMysqlAssociationOutput)
}
type SpringCloudAppMysqlAssociationMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAppMysqlAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppMysqlAssociation)(nil)).Elem()
}
func (o SpringCloudAppMysqlAssociationMapOutput) ToSpringCloudAppMysqlAssociationMapOutput() SpringCloudAppMysqlAssociationMapOutput {
return o
}
func (o SpringCloudAppMysqlAssociationMapOutput) ToSpringCloudAppMysqlAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppMysqlAssociationMapOutput {
return o
}
func (o SpringCloudAppMysqlAssociationMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAppMysqlAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudAppMysqlAssociation {
return vs[0].(map[string]*SpringCloudAppMysqlAssociation)[vs[1].(string)]
}).(SpringCloudAppMysqlAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppMysqlAssociationInput)(nil)).Elem(), &SpringCloudAppMysqlAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppMysqlAssociationArrayInput)(nil)).Elem(), SpringCloudAppMysqlAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppMysqlAssociationMapInput)(nil)).Elem(), SpringCloudAppMysqlAssociationMap{})
pulumi.RegisterOutputType(SpringCloudAppMysqlAssociationOutput{})
pulumi.RegisterOutputType(SpringCloudAppMysqlAssociationArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAppMysqlAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudAppCosmosDBAssociation.go | sdk/go/azure/appplatform/springCloudAppCosmosDBAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Associates a Spring Cloud Application with a CosmosDB Account.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudAppCosmosDBAssociation` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
// Name: pulumi.String("example-cosmosdb-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// OfferType: pulumi.String("Standard"),
// Kind: pulumi.String("GlobalDocumentDB"),
// ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
// ConsistencyLevel: pulumi.String("Strong"),
// },
// GeoLocations: cosmosdb.AccountGeoLocationArray{
// &cosmosdb.AccountGeoLocationArgs{
// Location: example.Location,
// FailoverPriority: pulumi.Int(0),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudAppCosmosDBAssociation(ctx, "example", &appplatform.SpringCloudAppCosmosDBAssociationArgs{
// Name: pulumi.String("example-bind"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// CosmosdbAccountId: exampleAccount.ID(),
// ApiType: pulumi.String("table"),
// CosmosdbAccessKey: exampleAccount.PrimaryKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Application CosmosDB Association can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudAppCosmosDBAssociation:SpringCloudAppCosmosDBAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1/bindings/bind1
// ```
type SpringCloudAppCosmosDBAssociation struct {
pulumi.CustomResourceState
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
ApiType pulumi.StringOutput `pulumi:"apiType"`
// Specifies the CosmosDB Account access key.
CosmosdbAccessKey pulumi.StringOutput `pulumi:"cosmosdbAccessKey"`
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
CosmosdbAccountId pulumi.StringOutput `pulumi:"cosmosdbAccountId"`
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
CosmosdbCassandraKeyspaceName pulumi.StringPtrOutput `pulumi:"cosmosdbCassandraKeyspaceName"`
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinDatabaseName pulumi.StringPtrOutput `pulumi:"cosmosdbGremlinDatabaseName"`
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinGraphName pulumi.StringPtrOutput `pulumi:"cosmosdbGremlinGraphName"`
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
CosmosdbMongoDatabaseName pulumi.StringPtrOutput `pulumi:"cosmosdbMongoDatabaseName"`
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
CosmosdbSqlDatabaseName pulumi.StringPtrOutput `pulumi:"cosmosdbSqlDatabaseName"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
}
// NewSpringCloudAppCosmosDBAssociation registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudAppCosmosDBAssociation(ctx *pulumi.Context,
name string, args *SpringCloudAppCosmosDBAssociationArgs, opts ...pulumi.ResourceOption) (*SpringCloudAppCosmosDBAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiType == nil {
return nil, errors.New("invalid value for required argument 'ApiType'")
}
if args.CosmosdbAccessKey == nil {
return nil, errors.New("invalid value for required argument 'CosmosdbAccessKey'")
}
if args.CosmosdbAccountId == nil {
return nil, errors.New("invalid value for required argument 'CosmosdbAccountId'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudAppCosmosDBAssociation
err := ctx.RegisterResource("azure:appplatform/springCloudAppCosmosDBAssociation:SpringCloudAppCosmosDBAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudAppCosmosDBAssociation gets an existing SpringCloudAppCosmosDBAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudAppCosmosDBAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAppCosmosDBAssociationState, opts ...pulumi.ResourceOption) (*SpringCloudAppCosmosDBAssociation, error) {
var resource SpringCloudAppCosmosDBAssociation
err := ctx.ReadResource("azure:appplatform/springCloudAppCosmosDBAssociation:SpringCloudAppCosmosDBAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudAppCosmosDBAssociation resources.
type springCloudAppCosmosDBAssociationState struct {
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
ApiType *string `pulumi:"apiType"`
// Specifies the CosmosDB Account access key.
CosmosdbAccessKey *string `pulumi:"cosmosdbAccessKey"`
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
CosmosdbAccountId *string `pulumi:"cosmosdbAccountId"`
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
CosmosdbCassandraKeyspaceName *string `pulumi:"cosmosdbCassandraKeyspaceName"`
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinDatabaseName *string `pulumi:"cosmosdbGremlinDatabaseName"`
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinGraphName *string `pulumi:"cosmosdbGremlinGraphName"`
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
CosmosdbMongoDatabaseName *string `pulumi:"cosmosdbMongoDatabaseName"`
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
CosmosdbSqlDatabaseName *string `pulumi:"cosmosdbSqlDatabaseName"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
}
type SpringCloudAppCosmosDBAssociationState struct {
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
ApiType pulumi.StringPtrInput
// Specifies the CosmosDB Account access key.
CosmosdbAccessKey pulumi.StringPtrInput
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
CosmosdbAccountId pulumi.StringPtrInput
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
CosmosdbCassandraKeyspaceName pulumi.StringPtrInput
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinDatabaseName pulumi.StringPtrInput
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinGraphName pulumi.StringPtrInput
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
CosmosdbMongoDatabaseName pulumi.StringPtrInput
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
CosmosdbSqlDatabaseName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
}
func (SpringCloudAppCosmosDBAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppCosmosDBAssociationState)(nil)).Elem()
}
type springCloudAppCosmosDBAssociationArgs struct {
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
ApiType string `pulumi:"apiType"`
// Specifies the CosmosDB Account access key.
CosmosdbAccessKey string `pulumi:"cosmosdbAccessKey"`
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
CosmosdbAccountId string `pulumi:"cosmosdbAccountId"`
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
CosmosdbCassandraKeyspaceName *string `pulumi:"cosmosdbCassandraKeyspaceName"`
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinDatabaseName *string `pulumi:"cosmosdbGremlinDatabaseName"`
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinGraphName *string `pulumi:"cosmosdbGremlinGraphName"`
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
CosmosdbMongoDatabaseName *string `pulumi:"cosmosdbMongoDatabaseName"`
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
CosmosdbSqlDatabaseName *string `pulumi:"cosmosdbSqlDatabaseName"`
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
}
// The set of arguments for constructing a SpringCloudAppCosmosDBAssociation resource.
type SpringCloudAppCosmosDBAssociationArgs struct {
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
ApiType pulumi.StringInput
// Specifies the CosmosDB Account access key.
CosmosdbAccessKey pulumi.StringInput
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
CosmosdbAccountId pulumi.StringInput
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
CosmosdbCassandraKeyspaceName pulumi.StringPtrInput
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinDatabaseName pulumi.StringPtrInput
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
CosmosdbGremlinGraphName pulumi.StringPtrInput
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
CosmosdbMongoDatabaseName pulumi.StringPtrInput
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
CosmosdbSqlDatabaseName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
}
func (SpringCloudAppCosmosDBAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppCosmosDBAssociationArgs)(nil)).Elem()
}
type SpringCloudAppCosmosDBAssociationInput interface {
pulumi.Input
ToSpringCloudAppCosmosDBAssociationOutput() SpringCloudAppCosmosDBAssociationOutput
ToSpringCloudAppCosmosDBAssociationOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationOutput
}
func (*SpringCloudAppCosmosDBAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (i *SpringCloudAppCosmosDBAssociation) ToSpringCloudAppCosmosDBAssociationOutput() SpringCloudAppCosmosDBAssociationOutput {
return i.ToSpringCloudAppCosmosDBAssociationOutputWithContext(context.Background())
}
func (i *SpringCloudAppCosmosDBAssociation) ToSpringCloudAppCosmosDBAssociationOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppCosmosDBAssociationOutput)
}
// SpringCloudAppCosmosDBAssociationArrayInput is an input type that accepts SpringCloudAppCosmosDBAssociationArray and SpringCloudAppCosmosDBAssociationArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppCosmosDBAssociationArrayInput` via:
//
// SpringCloudAppCosmosDBAssociationArray{ SpringCloudAppCosmosDBAssociationArgs{...} }
type SpringCloudAppCosmosDBAssociationArrayInput interface {
pulumi.Input
ToSpringCloudAppCosmosDBAssociationArrayOutput() SpringCloudAppCosmosDBAssociationArrayOutput
ToSpringCloudAppCosmosDBAssociationArrayOutputWithContext(context.Context) SpringCloudAppCosmosDBAssociationArrayOutput
}
type SpringCloudAppCosmosDBAssociationArray []SpringCloudAppCosmosDBAssociationInput
func (SpringCloudAppCosmosDBAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (i SpringCloudAppCosmosDBAssociationArray) ToSpringCloudAppCosmosDBAssociationArrayOutput() SpringCloudAppCosmosDBAssociationArrayOutput {
return i.ToSpringCloudAppCosmosDBAssociationArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppCosmosDBAssociationArray) ToSpringCloudAppCosmosDBAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppCosmosDBAssociationArrayOutput)
}
// SpringCloudAppCosmosDBAssociationMapInput is an input type that accepts SpringCloudAppCosmosDBAssociationMap and SpringCloudAppCosmosDBAssociationMapOutput values.
// You can construct a concrete instance of `SpringCloudAppCosmosDBAssociationMapInput` via:
//
// SpringCloudAppCosmosDBAssociationMap{ "key": SpringCloudAppCosmosDBAssociationArgs{...} }
type SpringCloudAppCosmosDBAssociationMapInput interface {
pulumi.Input
ToSpringCloudAppCosmosDBAssociationMapOutput() SpringCloudAppCosmosDBAssociationMapOutput
ToSpringCloudAppCosmosDBAssociationMapOutputWithContext(context.Context) SpringCloudAppCosmosDBAssociationMapOutput
}
type SpringCloudAppCosmosDBAssociationMap map[string]SpringCloudAppCosmosDBAssociationInput
func (SpringCloudAppCosmosDBAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (i SpringCloudAppCosmosDBAssociationMap) ToSpringCloudAppCosmosDBAssociationMapOutput() SpringCloudAppCosmosDBAssociationMapOutput {
return i.ToSpringCloudAppCosmosDBAssociationMapOutputWithContext(context.Background())
}
func (i SpringCloudAppCosmosDBAssociationMap) ToSpringCloudAppCosmosDBAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppCosmosDBAssociationMapOutput)
}
type SpringCloudAppCosmosDBAssociationOutput struct{ *pulumi.OutputState }
func (SpringCloudAppCosmosDBAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (o SpringCloudAppCosmosDBAssociationOutput) ToSpringCloudAppCosmosDBAssociationOutput() SpringCloudAppCosmosDBAssociationOutput {
return o
}
func (o SpringCloudAppCosmosDBAssociationOutput) ToSpringCloudAppCosmosDBAssociationOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationOutput {
return o
}
// Specifies the API type which should be used when connecting to the CosmosDB Account. Possible values are `cassandra`, `gremlin`, `mongo`, `sql` or `table`. Changing this forces a new resource to be created.
func (o SpringCloudAppCosmosDBAssociationOutput) ApiType() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringOutput { return v.ApiType }).(pulumi.StringOutput)
}
// Specifies the CosmosDB Account access key.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringOutput { return v.CosmosdbAccessKey }).(pulumi.StringOutput)
}
// Specifies the ID of the CosmosDB Account. Changing this forces a new resource to be created.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringOutput { return v.CosmosdbAccountId }).(pulumi.StringOutput)
}
// Specifies the name of the Cassandra Keyspace which the Spring Cloud App should be associated with. Should only be set when `apiType` is `cassandra`.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbCassandraKeyspaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringPtrOutput {
return v.CosmosdbCassandraKeyspaceName
}).(pulumi.StringPtrOutput)
}
// Specifies the name of the Gremlin Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbGremlinDatabaseName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringPtrOutput {
return v.CosmosdbGremlinDatabaseName
}).(pulumi.StringPtrOutput)
}
// Specifies the name of the Gremlin Graph which the Spring Cloud App should be associated with. Should only be set when `apiType` is `gremlin`.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbGremlinGraphName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringPtrOutput { return v.CosmosdbGremlinGraphName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Mongo Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `mongo`.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbMongoDatabaseName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringPtrOutput { return v.CosmosdbMongoDatabaseName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the SQL Database which the Spring Cloud App should be associated with. Should only be set when `apiType` is `sql`.
func (o SpringCloudAppCosmosDBAssociationOutput) CosmosdbSqlDatabaseName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringPtrOutput { return v.CosmosdbSqlDatabaseName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
func (o SpringCloudAppCosmosDBAssociationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.
func (o SpringCloudAppCosmosDBAssociationOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppCosmosDBAssociation) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
type SpringCloudAppCosmosDBAssociationArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppCosmosDBAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (o SpringCloudAppCosmosDBAssociationArrayOutput) ToSpringCloudAppCosmosDBAssociationArrayOutput() SpringCloudAppCosmosDBAssociationArrayOutput {
return o
}
func (o SpringCloudAppCosmosDBAssociationArrayOutput) ToSpringCloudAppCosmosDBAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationArrayOutput {
return o
}
func (o SpringCloudAppCosmosDBAssociationArrayOutput) Index(i pulumi.IntInput) SpringCloudAppCosmosDBAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudAppCosmosDBAssociation {
return vs[0].([]*SpringCloudAppCosmosDBAssociation)[vs[1].(int)]
}).(SpringCloudAppCosmosDBAssociationOutput)
}
type SpringCloudAppCosmosDBAssociationMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAppCosmosDBAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppCosmosDBAssociation)(nil)).Elem()
}
func (o SpringCloudAppCosmosDBAssociationMapOutput) ToSpringCloudAppCosmosDBAssociationMapOutput() SpringCloudAppCosmosDBAssociationMapOutput {
return o
}
func (o SpringCloudAppCosmosDBAssociationMapOutput) ToSpringCloudAppCosmosDBAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppCosmosDBAssociationMapOutput {
return o
}
func (o SpringCloudAppCosmosDBAssociationMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAppCosmosDBAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudAppCosmosDBAssociation {
return vs[0].(map[string]*SpringCloudAppCosmosDBAssociation)[vs[1].(string)]
}).(SpringCloudAppCosmosDBAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppCosmosDBAssociationInput)(nil)).Elem(), &SpringCloudAppCosmosDBAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppCosmosDBAssociationArrayInput)(nil)).Elem(), SpringCloudAppCosmosDBAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppCosmosDBAssociationMapInput)(nil)).Elem(), SpringCloudAppCosmosDBAssociationMap{})
pulumi.RegisterOutputType(SpringCloudAppCosmosDBAssociationOutput{})
pulumi.RegisterOutputType(SpringCloudAppCosmosDBAssociationArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAppCosmosDBAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudConfigurationService.go | sdk/go/azure/appplatform/springCloudConfigurationService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Configuration Service.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudConfigurationService` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudConfigurationService(ctx, "example", &appplatform.SpringCloudConfigurationServiceArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// Repositories: appplatform.SpringCloudConfigurationServiceRepositoryArray{
// &appplatform.SpringCloudConfigurationServiceRepositoryArgs{
// Name: pulumi.String("fake"),
// Label: pulumi.String("master"),
// Patterns: pulumi.StringArray{
// pulumi.String("app/dev"),
// },
// Uri: pulumi.String("https://github.com/Azure-Samples/piggymetrics"),
// SearchPaths: pulumi.StringArray{
// pulumi.String("dir1"),
// pulumi.String("dir2"),
// },
// StrictHostKeyChecking: pulumi.Bool(false),
// Username: pulumi.String("adminuser"),
// Password: pulumi.String("H@Sh1CoR3!"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Configuration Services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudConfigurationService:SpringCloudConfigurationService example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/configurationServices/configurationService1
// ```
type SpringCloudConfigurationService struct {
pulumi.CustomResourceState
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
Generation pulumi.StringPtrOutput `pulumi:"generation"`
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies how often to check repository updates. Minimum value is 0.
RefreshIntervalInSeconds pulumi.IntPtrOutput `pulumi:"refreshIntervalInSeconds"`
// One or more `repository` blocks as defined below.
Repositories SpringCloudConfigurationServiceRepositoryArrayOutput `pulumi:"repositories"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudConfigurationService registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudConfigurationService(ctx *pulumi.Context,
name string, args *SpringCloudConfigurationServiceArgs, opts ...pulumi.ResourceOption) (*SpringCloudConfigurationService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudConfigurationService
err := ctx.RegisterResource("azure:appplatform/springCloudConfigurationService:SpringCloudConfigurationService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudConfigurationService gets an existing SpringCloudConfigurationService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudConfigurationService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudConfigurationServiceState, opts ...pulumi.ResourceOption) (*SpringCloudConfigurationService, error) {
var resource SpringCloudConfigurationService
err := ctx.ReadResource("azure:appplatform/springCloudConfigurationService:SpringCloudConfigurationService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudConfigurationService resources.
type springCloudConfigurationServiceState struct {
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
Generation *string `pulumi:"generation"`
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
Name *string `pulumi:"name"`
// Specifies how often to check repository updates. Minimum value is 0.
RefreshIntervalInSeconds *int `pulumi:"refreshIntervalInSeconds"`
// One or more `repository` blocks as defined below.
Repositories []SpringCloudConfigurationServiceRepository `pulumi:"repositories"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudConfigurationServiceState struct {
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
Generation pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
Name pulumi.StringPtrInput
// Specifies how often to check repository updates. Minimum value is 0.
RefreshIntervalInSeconds pulumi.IntPtrInput
// One or more `repository` blocks as defined below.
Repositories SpringCloudConfigurationServiceRepositoryArrayInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudConfigurationServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudConfigurationServiceState)(nil)).Elem()
}
type springCloudConfigurationServiceArgs struct {
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
Generation *string `pulumi:"generation"`
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
Name *string `pulumi:"name"`
// Specifies how often to check repository updates. Minimum value is 0.
RefreshIntervalInSeconds *int `pulumi:"refreshIntervalInSeconds"`
// One or more `repository` blocks as defined below.
Repositories []SpringCloudConfigurationServiceRepository `pulumi:"repositories"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudConfigurationService resource.
type SpringCloudConfigurationServiceArgs struct {
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
Generation pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
Name pulumi.StringPtrInput
// Specifies how often to check repository updates. Minimum value is 0.
RefreshIntervalInSeconds pulumi.IntPtrInput
// One or more `repository` blocks as defined below.
Repositories SpringCloudConfigurationServiceRepositoryArrayInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudConfigurationServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudConfigurationServiceArgs)(nil)).Elem()
}
type SpringCloudConfigurationServiceInput interface {
pulumi.Input
ToSpringCloudConfigurationServiceOutput() SpringCloudConfigurationServiceOutput
ToSpringCloudConfigurationServiceOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceOutput
}
func (*SpringCloudConfigurationService) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudConfigurationService)(nil)).Elem()
}
func (i *SpringCloudConfigurationService) ToSpringCloudConfigurationServiceOutput() SpringCloudConfigurationServiceOutput {
return i.ToSpringCloudConfigurationServiceOutputWithContext(context.Background())
}
func (i *SpringCloudConfigurationService) ToSpringCloudConfigurationServiceOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConfigurationServiceOutput)
}
// SpringCloudConfigurationServiceArrayInput is an input type that accepts SpringCloudConfigurationServiceArray and SpringCloudConfigurationServiceArrayOutput values.
// You can construct a concrete instance of `SpringCloudConfigurationServiceArrayInput` via:
//
// SpringCloudConfigurationServiceArray{ SpringCloudConfigurationServiceArgs{...} }
type SpringCloudConfigurationServiceArrayInput interface {
pulumi.Input
ToSpringCloudConfigurationServiceArrayOutput() SpringCloudConfigurationServiceArrayOutput
ToSpringCloudConfigurationServiceArrayOutputWithContext(context.Context) SpringCloudConfigurationServiceArrayOutput
}
type SpringCloudConfigurationServiceArray []SpringCloudConfigurationServiceInput
func (SpringCloudConfigurationServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudConfigurationService)(nil)).Elem()
}
func (i SpringCloudConfigurationServiceArray) ToSpringCloudConfigurationServiceArrayOutput() SpringCloudConfigurationServiceArrayOutput {
return i.ToSpringCloudConfigurationServiceArrayOutputWithContext(context.Background())
}
func (i SpringCloudConfigurationServiceArray) ToSpringCloudConfigurationServiceArrayOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConfigurationServiceArrayOutput)
}
// SpringCloudConfigurationServiceMapInput is an input type that accepts SpringCloudConfigurationServiceMap and SpringCloudConfigurationServiceMapOutput values.
// You can construct a concrete instance of `SpringCloudConfigurationServiceMapInput` via:
//
// SpringCloudConfigurationServiceMap{ "key": SpringCloudConfigurationServiceArgs{...} }
type SpringCloudConfigurationServiceMapInput interface {
pulumi.Input
ToSpringCloudConfigurationServiceMapOutput() SpringCloudConfigurationServiceMapOutput
ToSpringCloudConfigurationServiceMapOutputWithContext(context.Context) SpringCloudConfigurationServiceMapOutput
}
type SpringCloudConfigurationServiceMap map[string]SpringCloudConfigurationServiceInput
func (SpringCloudConfigurationServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudConfigurationService)(nil)).Elem()
}
func (i SpringCloudConfigurationServiceMap) ToSpringCloudConfigurationServiceMapOutput() SpringCloudConfigurationServiceMapOutput {
return i.ToSpringCloudConfigurationServiceMapOutputWithContext(context.Background())
}
func (i SpringCloudConfigurationServiceMap) ToSpringCloudConfigurationServiceMapOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConfigurationServiceMapOutput)
}
type SpringCloudConfigurationServiceOutput struct{ *pulumi.OutputState }
func (SpringCloudConfigurationServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudConfigurationService)(nil)).Elem()
}
func (o SpringCloudConfigurationServiceOutput) ToSpringCloudConfigurationServiceOutput() SpringCloudConfigurationServiceOutput {
return o
}
func (o SpringCloudConfigurationServiceOutput) ToSpringCloudConfigurationServiceOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceOutput {
return o
}
// The generation of the Spring Cloud Configuration Service. Possible values are `Gen1` and `Gen2`.
func (o SpringCloudConfigurationServiceOutput) Generation() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudConfigurationService) pulumi.StringPtrOutput { return v.Generation }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Spring Cloud Configuration Service. The only possible value is `default`. Changing this forces a new Spring Cloud Configuration Service to be created.
func (o SpringCloudConfigurationServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudConfigurationService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies how often to check repository updates. Minimum value is 0.
func (o SpringCloudConfigurationServiceOutput) RefreshIntervalInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudConfigurationService) pulumi.IntPtrOutput { return v.RefreshIntervalInSeconds }).(pulumi.IntPtrOutput)
}
// One or more `repository` blocks as defined below.
func (o SpringCloudConfigurationServiceOutput) Repositories() SpringCloudConfigurationServiceRepositoryArrayOutput {
return o.ApplyT(func(v *SpringCloudConfigurationService) SpringCloudConfigurationServiceRepositoryArrayOutput {
return v.Repositories
}).(SpringCloudConfigurationServiceRepositoryArrayOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Configuration Service to be created.
func (o SpringCloudConfigurationServiceOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudConfigurationService) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
type SpringCloudConfigurationServiceArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudConfigurationServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudConfigurationService)(nil)).Elem()
}
func (o SpringCloudConfigurationServiceArrayOutput) ToSpringCloudConfigurationServiceArrayOutput() SpringCloudConfigurationServiceArrayOutput {
return o
}
func (o SpringCloudConfigurationServiceArrayOutput) ToSpringCloudConfigurationServiceArrayOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceArrayOutput {
return o
}
func (o SpringCloudConfigurationServiceArrayOutput) Index(i pulumi.IntInput) SpringCloudConfigurationServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudConfigurationService {
return vs[0].([]*SpringCloudConfigurationService)[vs[1].(int)]
}).(SpringCloudConfigurationServiceOutput)
}
type SpringCloudConfigurationServiceMapOutput struct{ *pulumi.OutputState }
func (SpringCloudConfigurationServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudConfigurationService)(nil)).Elem()
}
func (o SpringCloudConfigurationServiceMapOutput) ToSpringCloudConfigurationServiceMapOutput() SpringCloudConfigurationServiceMapOutput {
return o
}
func (o SpringCloudConfigurationServiceMapOutput) ToSpringCloudConfigurationServiceMapOutputWithContext(ctx context.Context) SpringCloudConfigurationServiceMapOutput {
return o
}
func (o SpringCloudConfigurationServiceMapOutput) MapIndex(k pulumi.StringInput) SpringCloudConfigurationServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudConfigurationService {
return vs[0].(map[string]*SpringCloudConfigurationService)[vs[1].(string)]
}).(SpringCloudConfigurationServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConfigurationServiceInput)(nil)).Elem(), &SpringCloudConfigurationService{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConfigurationServiceArrayInput)(nil)).Elem(), SpringCloudConfigurationServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConfigurationServiceMapInput)(nil)).Elem(), SpringCloudConfigurationServiceMap{})
pulumi.RegisterOutputType(SpringCloudConfigurationServiceOutput{})
pulumi.RegisterOutputType(SpringCloudConfigurationServiceArrayOutput{})
pulumi.RegisterOutputType(SpringCloudConfigurationServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudGatewayRouteConfig.go | sdk/go/azure/appplatform/springCloudGatewayRouteConfig.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Gateway Route Config.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudGatewayRouteConfig` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudGateway, err := appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudGatewayRouteConfig(ctx, "example", &appplatform.SpringCloudGatewayRouteConfigArgs{
// Name: pulumi.String("example"),
// SpringCloudGatewayId: exampleSpringCloudGateway.ID(),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// Protocol: pulumi.String("HTTPS"),
// Routes: appplatform.SpringCloudGatewayRouteConfigRouteArray{
// &appplatform.SpringCloudGatewayRouteConfigRouteArgs{
// Description: pulumi.String("example description"),
// Filters: pulumi.StringArray{
// pulumi.String("StripPrefix=2"),
// pulumi.String("RateLimit=1,1s"),
// },
// Order: pulumi.Int(1),
// Predicates: pulumi.StringArray{
// pulumi.String("Path=/api5/customer/**"),
// },
// SsoValidationEnabled: pulumi.Bool(true),
// Title: pulumi.String("myApp route config"),
// TokenRelay: pulumi.Bool(true),
// Uri: pulumi.String("https://www.example.com"),
// ClassificationTags: pulumi.StringArray{
// pulumi.String("tag1"),
// pulumi.String("tag2"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Gateway Route Configs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudGatewayRouteConfig:SpringCloudGatewayRouteConfig example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/gateways/gateway1/routeConfigs/routeConfig1
// ```
type SpringCloudGatewayRouteConfig struct {
pulumi.CustomResourceState
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
Filters pulumi.StringArrayOutput `pulumi:"filters"`
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `openApi` blocks as defined below.
OpenApi SpringCloudGatewayRouteConfigOpenApiPtrOutput `pulumi:"openApi"`
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
Predicates pulumi.StringArrayOutput `pulumi:"predicates"`
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
Protocol pulumi.StringOutput `pulumi:"protocol"`
// One or more `route` blocks as defined below.
Routes SpringCloudGatewayRouteConfigRouteArrayOutput `pulumi:"routes"`
// The ID of the Spring Cloud App.
SpringCloudAppId pulumi.StringPtrOutput `pulumi:"springCloudAppId"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
SpringCloudGatewayId pulumi.StringOutput `pulumi:"springCloudGatewayId"`
// Should the sso validation be enabled in app level?
SsoValidationEnabled pulumi.BoolPtrOutput `pulumi:"ssoValidationEnabled"`
}
// NewSpringCloudGatewayRouteConfig registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudGatewayRouteConfig(ctx *pulumi.Context,
name string, args *SpringCloudGatewayRouteConfigArgs, opts ...pulumi.ResourceOption) (*SpringCloudGatewayRouteConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Protocol == nil {
return nil, errors.New("invalid value for required argument 'Protocol'")
}
if args.SpringCloudGatewayId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudGatewayId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudGatewayRouteConfig
err := ctx.RegisterResource("azure:appplatform/springCloudGatewayRouteConfig:SpringCloudGatewayRouteConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudGatewayRouteConfig gets an existing SpringCloudGatewayRouteConfig resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudGatewayRouteConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudGatewayRouteConfigState, opts ...pulumi.ResourceOption) (*SpringCloudGatewayRouteConfig, error) {
var resource SpringCloudGatewayRouteConfig
err := ctx.ReadResource("azure:appplatform/springCloudGatewayRouteConfig:SpringCloudGatewayRouteConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudGatewayRouteConfig resources.
type springCloudGatewayRouteConfigState struct {
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
Filters []string `pulumi:"filters"`
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
Name *string `pulumi:"name"`
// One or more `openApi` blocks as defined below.
OpenApi *SpringCloudGatewayRouteConfigOpenApi `pulumi:"openApi"`
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
Predicates []string `pulumi:"predicates"`
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
Protocol *string `pulumi:"protocol"`
// One or more `route` blocks as defined below.
Routes []SpringCloudGatewayRouteConfigRoute `pulumi:"routes"`
// The ID of the Spring Cloud App.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
SpringCloudGatewayId *string `pulumi:"springCloudGatewayId"`
// Should the sso validation be enabled in app level?
SsoValidationEnabled *bool `pulumi:"ssoValidationEnabled"`
}
type SpringCloudGatewayRouteConfigState struct {
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
Filters pulumi.StringArrayInput
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
Name pulumi.StringPtrInput
// One or more `openApi` blocks as defined below.
OpenApi SpringCloudGatewayRouteConfigOpenApiPtrInput
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
Predicates pulumi.StringArrayInput
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
Protocol pulumi.StringPtrInput
// One or more `route` blocks as defined below.
Routes SpringCloudGatewayRouteConfigRouteArrayInput
// The ID of the Spring Cloud App.
SpringCloudAppId pulumi.StringPtrInput
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
SpringCloudGatewayId pulumi.StringPtrInput
// Should the sso validation be enabled in app level?
SsoValidationEnabled pulumi.BoolPtrInput
}
func (SpringCloudGatewayRouteConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayRouteConfigState)(nil)).Elem()
}
type springCloudGatewayRouteConfigArgs struct {
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
Filters []string `pulumi:"filters"`
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
Name *string `pulumi:"name"`
// One or more `openApi` blocks as defined below.
OpenApi *SpringCloudGatewayRouteConfigOpenApi `pulumi:"openApi"`
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
Predicates []string `pulumi:"predicates"`
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
Protocol string `pulumi:"protocol"`
// One or more `route` blocks as defined below.
Routes []SpringCloudGatewayRouteConfigRoute `pulumi:"routes"`
// The ID of the Spring Cloud App.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
SpringCloudGatewayId string `pulumi:"springCloudGatewayId"`
// Should the sso validation be enabled in app level?
SsoValidationEnabled *bool `pulumi:"ssoValidationEnabled"`
}
// The set of arguments for constructing a SpringCloudGatewayRouteConfig resource.
type SpringCloudGatewayRouteConfigArgs struct {
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
Filters pulumi.StringArrayInput
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
Name pulumi.StringPtrInput
// One or more `openApi` blocks as defined below.
OpenApi SpringCloudGatewayRouteConfigOpenApiPtrInput
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
Predicates pulumi.StringArrayInput
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
Protocol pulumi.StringInput
// One or more `route` blocks as defined below.
Routes SpringCloudGatewayRouteConfigRouteArrayInput
// The ID of the Spring Cloud App.
SpringCloudAppId pulumi.StringPtrInput
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
SpringCloudGatewayId pulumi.StringInput
// Should the sso validation be enabled in app level?
SsoValidationEnabled pulumi.BoolPtrInput
}
func (SpringCloudGatewayRouteConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudGatewayRouteConfigArgs)(nil)).Elem()
}
type SpringCloudGatewayRouteConfigInput interface {
pulumi.Input
ToSpringCloudGatewayRouteConfigOutput() SpringCloudGatewayRouteConfigOutput
ToSpringCloudGatewayRouteConfigOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigOutput
}
func (*SpringCloudGatewayRouteConfig) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (i *SpringCloudGatewayRouteConfig) ToSpringCloudGatewayRouteConfigOutput() SpringCloudGatewayRouteConfigOutput {
return i.ToSpringCloudGatewayRouteConfigOutputWithContext(context.Background())
}
func (i *SpringCloudGatewayRouteConfig) ToSpringCloudGatewayRouteConfigOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayRouteConfigOutput)
}
// SpringCloudGatewayRouteConfigArrayInput is an input type that accepts SpringCloudGatewayRouteConfigArray and SpringCloudGatewayRouteConfigArrayOutput values.
// You can construct a concrete instance of `SpringCloudGatewayRouteConfigArrayInput` via:
//
// SpringCloudGatewayRouteConfigArray{ SpringCloudGatewayRouteConfigArgs{...} }
type SpringCloudGatewayRouteConfigArrayInput interface {
pulumi.Input
ToSpringCloudGatewayRouteConfigArrayOutput() SpringCloudGatewayRouteConfigArrayOutput
ToSpringCloudGatewayRouteConfigArrayOutputWithContext(context.Context) SpringCloudGatewayRouteConfigArrayOutput
}
type SpringCloudGatewayRouteConfigArray []SpringCloudGatewayRouteConfigInput
func (SpringCloudGatewayRouteConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (i SpringCloudGatewayRouteConfigArray) ToSpringCloudGatewayRouteConfigArrayOutput() SpringCloudGatewayRouteConfigArrayOutput {
return i.ToSpringCloudGatewayRouteConfigArrayOutputWithContext(context.Background())
}
func (i SpringCloudGatewayRouteConfigArray) ToSpringCloudGatewayRouteConfigArrayOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayRouteConfigArrayOutput)
}
// SpringCloudGatewayRouteConfigMapInput is an input type that accepts SpringCloudGatewayRouteConfigMap and SpringCloudGatewayRouteConfigMapOutput values.
// You can construct a concrete instance of `SpringCloudGatewayRouteConfigMapInput` via:
//
// SpringCloudGatewayRouteConfigMap{ "key": SpringCloudGatewayRouteConfigArgs{...} }
type SpringCloudGatewayRouteConfigMapInput interface {
pulumi.Input
ToSpringCloudGatewayRouteConfigMapOutput() SpringCloudGatewayRouteConfigMapOutput
ToSpringCloudGatewayRouteConfigMapOutputWithContext(context.Context) SpringCloudGatewayRouteConfigMapOutput
}
type SpringCloudGatewayRouteConfigMap map[string]SpringCloudGatewayRouteConfigInput
func (SpringCloudGatewayRouteConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (i SpringCloudGatewayRouteConfigMap) ToSpringCloudGatewayRouteConfigMapOutput() SpringCloudGatewayRouteConfigMapOutput {
return i.ToSpringCloudGatewayRouteConfigMapOutputWithContext(context.Background())
}
func (i SpringCloudGatewayRouteConfigMap) ToSpringCloudGatewayRouteConfigMapOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudGatewayRouteConfigMapOutput)
}
type SpringCloudGatewayRouteConfigOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayRouteConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (o SpringCloudGatewayRouteConfigOutput) ToSpringCloudGatewayRouteConfigOutput() SpringCloudGatewayRouteConfigOutput {
return o
}
func (o SpringCloudGatewayRouteConfigOutput) ToSpringCloudGatewayRouteConfigOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigOutput {
return o
}
// Specifies a list of filters which are used to modify the request before sending it to the target endpoint, or the received response in app level.
func (o SpringCloudGatewayRouteConfigOutput) Filters() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringArrayOutput { return v.Filters }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Spring Cloud Gateway Route Config. Changing this forces a new Spring Cloud Gateway Route Config to be created.
func (o SpringCloudGatewayRouteConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `openApi` blocks as defined below.
func (o SpringCloudGatewayRouteConfigOutput) OpenApi() SpringCloudGatewayRouteConfigOpenApiPtrOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) SpringCloudGatewayRouteConfigOpenApiPtrOutput { return v.OpenApi }).(SpringCloudGatewayRouteConfigOpenApiPtrOutput)
}
// Specifies a list of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
func (o SpringCloudGatewayRouteConfigOutput) Predicates() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringArrayOutput { return v.Predicates }).(pulumi.StringArrayOutput)
}
// Specifies the protocol of routed Spring Cloud App. Allowed values are `HTTP` and `HTTPS`.
//
// > **Note:** You likely want to use `HTTPS` in a production environment, since `HTTP` offers no encryption.
func (o SpringCloudGatewayRouteConfigOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
}
// One or more `route` blocks as defined below.
func (o SpringCloudGatewayRouteConfigOutput) Routes() SpringCloudGatewayRouteConfigRouteArrayOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) SpringCloudGatewayRouteConfigRouteArrayOutput { return v.Routes }).(SpringCloudGatewayRouteConfigRouteArrayOutput)
}
// The ID of the Spring Cloud App.
func (o SpringCloudGatewayRouteConfigOutput) SpringCloudAppId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringPtrOutput { return v.SpringCloudAppId }).(pulumi.StringPtrOutput)
}
// The ID of the Spring Cloud Gateway. Changing this forces a new Spring Cloud Gateway Route Config to be created.
func (o SpringCloudGatewayRouteConfigOutput) SpringCloudGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.StringOutput { return v.SpringCloudGatewayId }).(pulumi.StringOutput)
}
// Should the sso validation be enabled in app level?
func (o SpringCloudGatewayRouteConfigOutput) SsoValidationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudGatewayRouteConfig) pulumi.BoolPtrOutput { return v.SsoValidationEnabled }).(pulumi.BoolPtrOutput)
}
type SpringCloudGatewayRouteConfigArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayRouteConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (o SpringCloudGatewayRouteConfigArrayOutput) ToSpringCloudGatewayRouteConfigArrayOutput() SpringCloudGatewayRouteConfigArrayOutput {
return o
}
func (o SpringCloudGatewayRouteConfigArrayOutput) ToSpringCloudGatewayRouteConfigArrayOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigArrayOutput {
return o
}
func (o SpringCloudGatewayRouteConfigArrayOutput) Index(i pulumi.IntInput) SpringCloudGatewayRouteConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudGatewayRouteConfig {
return vs[0].([]*SpringCloudGatewayRouteConfig)[vs[1].(int)]
}).(SpringCloudGatewayRouteConfigOutput)
}
type SpringCloudGatewayRouteConfigMapOutput struct{ *pulumi.OutputState }
func (SpringCloudGatewayRouteConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudGatewayRouteConfig)(nil)).Elem()
}
func (o SpringCloudGatewayRouteConfigMapOutput) ToSpringCloudGatewayRouteConfigMapOutput() SpringCloudGatewayRouteConfigMapOutput {
return o
}
func (o SpringCloudGatewayRouteConfigMapOutput) ToSpringCloudGatewayRouteConfigMapOutputWithContext(ctx context.Context) SpringCloudGatewayRouteConfigMapOutput {
return o
}
func (o SpringCloudGatewayRouteConfigMapOutput) MapIndex(k pulumi.StringInput) SpringCloudGatewayRouteConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudGatewayRouteConfig {
return vs[0].(map[string]*SpringCloudGatewayRouteConfig)[vs[1].(string)]
}).(SpringCloudGatewayRouteConfigOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayRouteConfigInput)(nil)).Elem(), &SpringCloudGatewayRouteConfig{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayRouteConfigArrayInput)(nil)).Elem(), SpringCloudGatewayRouteConfigArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudGatewayRouteConfigMapInput)(nil)).Elem(), SpringCloudGatewayRouteConfigMap{})
pulumi.RegisterOutputType(SpringCloudGatewayRouteConfigOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayRouteConfigArrayOutput{})
pulumi.RegisterOutputType(SpringCloudGatewayRouteConfigMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudCertificate.go | sdk/go/azure/appplatform/springCloudCertificate.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Spring Cloud Certificate.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudCertificate` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Import
//
// Spring Cloud Certificate can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudCertificate:SpringCloudCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/spring1/certificates/cert1
// ```
type SpringCloudCertificate struct {
pulumi.CustomResourceState
// The content of uploaded certificate. Changing this forces a new resource to be created.
CertificateContent pulumi.StringPtrOutput `pulumi:"certificateContent"`
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
ExcludePrivateKey pulumi.BoolPtrOutput `pulumi:"excludePrivateKey"`
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
KeyVaultCertificateId pulumi.StringPtrOutput `pulumi:"keyVaultCertificateId"`
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringOutput `pulumi:"serviceName"`
// The thumbprint of the Spring Cloud certificate.
Thumbprint pulumi.StringOutput `pulumi:"thumbprint"`
}
// NewSpringCloudCertificate registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudCertificate(ctx *pulumi.Context,
name string, args *SpringCloudCertificateArgs, opts ...pulumi.ResourceOption) (*SpringCloudCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServiceName == nil {
return nil, errors.New("invalid value for required argument 'ServiceName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudCertificate
err := ctx.RegisterResource("azure:appplatform/springCloudCertificate:SpringCloudCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudCertificate gets an existing SpringCloudCertificate resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudCertificateState, opts ...pulumi.ResourceOption) (*SpringCloudCertificate, error) {
var resource SpringCloudCertificate
err := ctx.ReadResource("azure:appplatform/springCloudCertificate:SpringCloudCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudCertificate resources.
type springCloudCertificateState struct {
// The content of uploaded certificate. Changing this forces a new resource to be created.
CertificateContent *string `pulumi:"certificateContent"`
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
ExcludePrivateKey *bool `pulumi:"excludePrivateKey"`
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
KeyVaultCertificateId *string `pulumi:"keyVaultCertificateId"`
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName *string `pulumi:"serviceName"`
// The thumbprint of the Spring Cloud certificate.
Thumbprint *string `pulumi:"thumbprint"`
}
type SpringCloudCertificateState struct {
// The content of uploaded certificate. Changing this forces a new resource to be created.
CertificateContent pulumi.StringPtrInput
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
ExcludePrivateKey pulumi.BoolPtrInput
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
KeyVaultCertificateId pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringPtrInput
// The thumbprint of the Spring Cloud certificate.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCertificateState)(nil)).Elem()
}
type springCloudCertificateArgs struct {
// The content of uploaded certificate. Changing this forces a new resource to be created.
CertificateContent *string `pulumi:"certificateContent"`
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
ExcludePrivateKey *bool `pulumi:"excludePrivateKey"`
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
KeyVaultCertificateId *string `pulumi:"keyVaultCertificateId"`
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName string `pulumi:"serviceName"`
}
// The set of arguments for constructing a SpringCloudCertificate resource.
type SpringCloudCertificateArgs struct {
// The content of uploaded certificate. Changing this forces a new resource to be created.
CertificateContent pulumi.StringPtrInput
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
ExcludePrivateKey pulumi.BoolPtrInput
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
KeyVaultCertificateId pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringInput
}
func (SpringCloudCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCertificateArgs)(nil)).Elem()
}
type SpringCloudCertificateInput interface {
pulumi.Input
ToSpringCloudCertificateOutput() SpringCloudCertificateOutput
ToSpringCloudCertificateOutputWithContext(ctx context.Context) SpringCloudCertificateOutput
}
func (*SpringCloudCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCertificate)(nil)).Elem()
}
func (i *SpringCloudCertificate) ToSpringCloudCertificateOutput() SpringCloudCertificateOutput {
return i.ToSpringCloudCertificateOutputWithContext(context.Background())
}
func (i *SpringCloudCertificate) ToSpringCloudCertificateOutputWithContext(ctx context.Context) SpringCloudCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCertificateOutput)
}
// SpringCloudCertificateArrayInput is an input type that accepts SpringCloudCertificateArray and SpringCloudCertificateArrayOutput values.
// You can construct a concrete instance of `SpringCloudCertificateArrayInput` via:
//
// SpringCloudCertificateArray{ SpringCloudCertificateArgs{...} }
type SpringCloudCertificateArrayInput interface {
pulumi.Input
ToSpringCloudCertificateArrayOutput() SpringCloudCertificateArrayOutput
ToSpringCloudCertificateArrayOutputWithContext(context.Context) SpringCloudCertificateArrayOutput
}
type SpringCloudCertificateArray []SpringCloudCertificateInput
func (SpringCloudCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCertificate)(nil)).Elem()
}
func (i SpringCloudCertificateArray) ToSpringCloudCertificateArrayOutput() SpringCloudCertificateArrayOutput {
return i.ToSpringCloudCertificateArrayOutputWithContext(context.Background())
}
func (i SpringCloudCertificateArray) ToSpringCloudCertificateArrayOutputWithContext(ctx context.Context) SpringCloudCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCertificateArrayOutput)
}
// SpringCloudCertificateMapInput is an input type that accepts SpringCloudCertificateMap and SpringCloudCertificateMapOutput values.
// You can construct a concrete instance of `SpringCloudCertificateMapInput` via:
//
// SpringCloudCertificateMap{ "key": SpringCloudCertificateArgs{...} }
type SpringCloudCertificateMapInput interface {
pulumi.Input
ToSpringCloudCertificateMapOutput() SpringCloudCertificateMapOutput
ToSpringCloudCertificateMapOutputWithContext(context.Context) SpringCloudCertificateMapOutput
}
type SpringCloudCertificateMap map[string]SpringCloudCertificateInput
func (SpringCloudCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCertificate)(nil)).Elem()
}
func (i SpringCloudCertificateMap) ToSpringCloudCertificateMapOutput() SpringCloudCertificateMapOutput {
return i.ToSpringCloudCertificateMapOutputWithContext(context.Background())
}
func (i SpringCloudCertificateMap) ToSpringCloudCertificateMapOutputWithContext(ctx context.Context) SpringCloudCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCertificateMapOutput)
}
type SpringCloudCertificateOutput struct{ *pulumi.OutputState }
func (SpringCloudCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCertificate)(nil)).Elem()
}
func (o SpringCloudCertificateOutput) ToSpringCloudCertificateOutput() SpringCloudCertificateOutput {
return o
}
func (o SpringCloudCertificateOutput) ToSpringCloudCertificateOutputWithContext(ctx context.Context) SpringCloudCertificateOutput {
return o
}
// The content of uploaded certificate. Changing this forces a new resource to be created.
func (o SpringCloudCertificateOutput) CertificateContent() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringPtrOutput { return v.CertificateContent }).(pulumi.StringPtrOutput)
}
// Specifies whether the private key should be excluded from the Key Vault Certificate. Changing this forces a new resource to be created. Defaults to `false`.
func (o SpringCloudCertificateOutput) ExcludePrivateKey() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.BoolPtrOutput { return v.ExcludePrivateKey }).(pulumi.BoolPtrOutput)
}
// Specifies the ID of the Key Vault Certificate resource. Changing this forces a new resource to be created.
func (o SpringCloudCertificateOutput) KeyVaultCertificateId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringPtrOutput { return v.KeyVaultCertificateId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Spring Cloud Certificate. Changing this forces a new resource to be created.
func (o SpringCloudCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the resource group in which to create the Spring Cloud Certificate. Changing this forces a new resource to be created.
func (o SpringCloudCertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
func (o SpringCloudCertificateOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringOutput { return v.ServiceName }).(pulumi.StringOutput)
}
// The thumbprint of the Spring Cloud certificate.
func (o SpringCloudCertificateOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCertificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput)
}
type SpringCloudCertificateArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCertificate)(nil)).Elem()
}
func (o SpringCloudCertificateArrayOutput) ToSpringCloudCertificateArrayOutput() SpringCloudCertificateArrayOutput {
return o
}
func (o SpringCloudCertificateArrayOutput) ToSpringCloudCertificateArrayOutputWithContext(ctx context.Context) SpringCloudCertificateArrayOutput {
return o
}
func (o SpringCloudCertificateArrayOutput) Index(i pulumi.IntInput) SpringCloudCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudCertificate {
return vs[0].([]*SpringCloudCertificate)[vs[1].(int)]
}).(SpringCloudCertificateOutput)
}
type SpringCloudCertificateMapOutput struct{ *pulumi.OutputState }
func (SpringCloudCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCertificate)(nil)).Elem()
}
func (o SpringCloudCertificateMapOutput) ToSpringCloudCertificateMapOutput() SpringCloudCertificateMapOutput {
return o
}
func (o SpringCloudCertificateMapOutput) ToSpringCloudCertificateMapOutputWithContext(ctx context.Context) SpringCloudCertificateMapOutput {
return o
}
func (o SpringCloudCertificateMapOutput) MapIndex(k pulumi.StringInput) SpringCloudCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudCertificate {
return vs[0].(map[string]*SpringCloudCertificate)[vs[1].(string)]
}).(SpringCloudCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCertificateInput)(nil)).Elem(), &SpringCloudCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCertificateArrayInput)(nil)).Elem(), SpringCloudCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCertificateMapInput)(nil)).Elem(), SpringCloudCertificateMap{})
pulumi.RegisterOutputType(SpringCloudCertificateOutput{})
pulumi.RegisterOutputType(SpringCloudCertificateArrayOutput{})
pulumi.RegisterOutputType(SpringCloudCertificateMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudBuildDeployment.go | sdk/go/azure/appplatform/springCloudBuildDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Build Deployment.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudBuildDeployment` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleSpringCloudService.ResourceGroupName,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudBuildDeployment(ctx, "example", &appplatform.SpringCloudBuildDeploymentArgs{
// Name: pulumi.String("example"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// BuildResultId: pulumi.String("<default>"),
// InstanceCount: pulumi.Int(2),
// EnvironmentVariables: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// "Env": pulumi.String("Staging"),
// },
// Quota: &appplatform.SpringCloudBuildDeploymentQuotaArgs{
// Cpu: pulumi.String("2"),
// Memory: pulumi.String("4Gi"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Build Deployments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudBuildDeployment:SpringCloudBuildDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/apps/app1/deployments/deploy1
// ```
type SpringCloudBuildDeployment struct {
pulumi.CustomResourceState
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
AddonJson pulumi.StringOutput `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayOutput `pulumi:"applicationPerformanceMonitoringIds"`
// The ID of the Spring Cloud Build Result.
BuildResultId pulumi.StringOutput `pulumi:"buildResultId"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapOutput `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrOutput `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `quota` block as defined below.
Quota SpringCloudBuildDeploymentQuotaOutput `pulumi:"quota"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
}
// NewSpringCloudBuildDeployment registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudBuildDeployment(ctx *pulumi.Context,
name string, args *SpringCloudBuildDeploymentArgs, opts ...pulumi.ResourceOption) (*SpringCloudBuildDeployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BuildResultId == nil {
return nil, errors.New("invalid value for required argument 'BuildResultId'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudBuildDeployment
err := ctx.RegisterResource("azure:appplatform/springCloudBuildDeployment:SpringCloudBuildDeployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudBuildDeployment gets an existing SpringCloudBuildDeployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudBuildDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudBuildDeploymentState, opts ...pulumi.ResourceOption) (*SpringCloudBuildDeployment, error) {
var resource SpringCloudBuildDeployment
err := ctx.ReadResource("azure:appplatform/springCloudBuildDeployment:SpringCloudBuildDeployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudBuildDeployment resources.
type springCloudBuildDeploymentState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
AddonJson *string `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// The ID of the Spring Cloud Build Result.
BuildResultId *string `pulumi:"buildResultId"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudBuildDeploymentQuota `pulumi:"quota"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
}
type SpringCloudBuildDeploymentState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
AddonJson pulumi.StringPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// The ID of the Spring Cloud Build Result.
BuildResultId pulumi.StringPtrInput
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudBuildDeploymentQuotaPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
SpringCloudAppId pulumi.StringPtrInput
}
func (SpringCloudBuildDeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuildDeploymentState)(nil)).Elem()
}
type springCloudBuildDeploymentArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
AddonJson *string `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// The ID of the Spring Cloud Build Result.
BuildResultId string `pulumi:"buildResultId"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudBuildDeploymentQuota `pulumi:"quota"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
}
// The set of arguments for constructing a SpringCloudBuildDeployment resource.
type SpringCloudBuildDeploymentArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
AddonJson pulumi.StringPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// The ID of the Spring Cloud Build Result.
BuildResultId pulumi.StringInput
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudBuildDeploymentQuotaPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
SpringCloudAppId pulumi.StringInput
}
func (SpringCloudBuildDeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuildDeploymentArgs)(nil)).Elem()
}
type SpringCloudBuildDeploymentInput interface {
pulumi.Input
ToSpringCloudBuildDeploymentOutput() SpringCloudBuildDeploymentOutput
ToSpringCloudBuildDeploymentOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentOutput
}
func (*SpringCloudBuildDeployment) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuildDeployment)(nil)).Elem()
}
func (i *SpringCloudBuildDeployment) ToSpringCloudBuildDeploymentOutput() SpringCloudBuildDeploymentOutput {
return i.ToSpringCloudBuildDeploymentOutputWithContext(context.Background())
}
func (i *SpringCloudBuildDeployment) ToSpringCloudBuildDeploymentOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildDeploymentOutput)
}
// SpringCloudBuildDeploymentArrayInput is an input type that accepts SpringCloudBuildDeploymentArray and SpringCloudBuildDeploymentArrayOutput values.
// You can construct a concrete instance of `SpringCloudBuildDeploymentArrayInput` via:
//
// SpringCloudBuildDeploymentArray{ SpringCloudBuildDeploymentArgs{...} }
type SpringCloudBuildDeploymentArrayInput interface {
pulumi.Input
ToSpringCloudBuildDeploymentArrayOutput() SpringCloudBuildDeploymentArrayOutput
ToSpringCloudBuildDeploymentArrayOutputWithContext(context.Context) SpringCloudBuildDeploymentArrayOutput
}
type SpringCloudBuildDeploymentArray []SpringCloudBuildDeploymentInput
func (SpringCloudBuildDeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuildDeployment)(nil)).Elem()
}
func (i SpringCloudBuildDeploymentArray) ToSpringCloudBuildDeploymentArrayOutput() SpringCloudBuildDeploymentArrayOutput {
return i.ToSpringCloudBuildDeploymentArrayOutputWithContext(context.Background())
}
func (i SpringCloudBuildDeploymentArray) ToSpringCloudBuildDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildDeploymentArrayOutput)
}
// SpringCloudBuildDeploymentMapInput is an input type that accepts SpringCloudBuildDeploymentMap and SpringCloudBuildDeploymentMapOutput values.
// You can construct a concrete instance of `SpringCloudBuildDeploymentMapInput` via:
//
// SpringCloudBuildDeploymentMap{ "key": SpringCloudBuildDeploymentArgs{...} }
type SpringCloudBuildDeploymentMapInput interface {
pulumi.Input
ToSpringCloudBuildDeploymentMapOutput() SpringCloudBuildDeploymentMapOutput
ToSpringCloudBuildDeploymentMapOutputWithContext(context.Context) SpringCloudBuildDeploymentMapOutput
}
type SpringCloudBuildDeploymentMap map[string]SpringCloudBuildDeploymentInput
func (SpringCloudBuildDeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuildDeployment)(nil)).Elem()
}
func (i SpringCloudBuildDeploymentMap) ToSpringCloudBuildDeploymentMapOutput() SpringCloudBuildDeploymentMapOutput {
return i.ToSpringCloudBuildDeploymentMapOutputWithContext(context.Background())
}
func (i SpringCloudBuildDeploymentMap) ToSpringCloudBuildDeploymentMapOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildDeploymentMapOutput)
}
type SpringCloudBuildDeploymentOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildDeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuildDeployment)(nil)).Elem()
}
func (o SpringCloudBuildDeploymentOutput) ToSpringCloudBuildDeploymentOutput() SpringCloudBuildDeploymentOutput {
return o
}
func (o SpringCloudBuildDeploymentOutput) ToSpringCloudBuildDeploymentOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentOutput {
return o
}
// A JSON object that contains the addon configurations of the Spring Cloud Build Deployment.
func (o SpringCloudBuildDeploymentOutput) AddonJson() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringOutput { return v.AddonJson }).(pulumi.StringOutput)
}
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
func (o SpringCloudBuildDeploymentOutput) ApplicationPerformanceMonitoringIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringArrayOutput {
return v.ApplicationPerformanceMonitoringIds
}).(pulumi.StringArrayOutput)
}
// The ID of the Spring Cloud Build Result.
func (o SpringCloudBuildDeploymentOutput) BuildResultId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringOutput { return v.BuildResultId }).(pulumi.StringOutput)
}
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
func (o SpringCloudBuildDeploymentOutput) EnvironmentVariables() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringMapOutput { return v.EnvironmentVariables }).(pulumi.StringMapOutput)
}
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
func (o SpringCloudBuildDeploymentOutput) InstanceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.IntPtrOutput { return v.InstanceCount }).(pulumi.IntPtrOutput)
}
// The name which should be used for this Spring Cloud Build Deployment. Changing this forces a new Spring Cloud Build Deployment to be created.
func (o SpringCloudBuildDeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `quota` block as defined below.
func (o SpringCloudBuildDeploymentOutput) Quota() SpringCloudBuildDeploymentQuotaOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) SpringCloudBuildDeploymentQuotaOutput { return v.Quota }).(SpringCloudBuildDeploymentQuotaOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Build Deployment to be created.
func (o SpringCloudBuildDeploymentOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildDeployment) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
type SpringCloudBuildDeploymentArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildDeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuildDeployment)(nil)).Elem()
}
func (o SpringCloudBuildDeploymentArrayOutput) ToSpringCloudBuildDeploymentArrayOutput() SpringCloudBuildDeploymentArrayOutput {
return o
}
func (o SpringCloudBuildDeploymentArrayOutput) ToSpringCloudBuildDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentArrayOutput {
return o
}
func (o SpringCloudBuildDeploymentArrayOutput) Index(i pulumi.IntInput) SpringCloudBuildDeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudBuildDeployment {
return vs[0].([]*SpringCloudBuildDeployment)[vs[1].(int)]
}).(SpringCloudBuildDeploymentOutput)
}
type SpringCloudBuildDeploymentMapOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildDeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuildDeployment)(nil)).Elem()
}
func (o SpringCloudBuildDeploymentMapOutput) ToSpringCloudBuildDeploymentMapOutput() SpringCloudBuildDeploymentMapOutput {
return o
}
func (o SpringCloudBuildDeploymentMapOutput) ToSpringCloudBuildDeploymentMapOutputWithContext(ctx context.Context) SpringCloudBuildDeploymentMapOutput {
return o
}
func (o SpringCloudBuildDeploymentMapOutput) MapIndex(k pulumi.StringInput) SpringCloudBuildDeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudBuildDeployment {
return vs[0].(map[string]*SpringCloudBuildDeployment)[vs[1].(string)]
}).(SpringCloudBuildDeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildDeploymentInput)(nil)).Elem(), &SpringCloudBuildDeployment{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildDeploymentArrayInput)(nil)).Elem(), SpringCloudBuildDeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildDeploymentMapInput)(nil)).Elem(), SpringCloudBuildDeploymentMap{})
pulumi.RegisterOutputType(SpringCloudBuildDeploymentOutput{})
pulumi.RegisterOutputType(SpringCloudBuildDeploymentArrayOutput{})
pulumi.RegisterOutputType(SpringCloudBuildDeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring.go | sdk/go/azure/appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is only applicable for Spring Cloud Service enterprise tier
//
// Manages a Spring Cloud Application Performance Monitoring resource for App Dynamics.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudAppDynamicsApplicationPerformanceMonitoring` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudAppDynamicsApplicationPerformanceMonitoring(ctx, "example", &appplatform.SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// AgentAccountName: pulumi.String("example-agent-account-name"),
// AgentAccountAccessKey: pulumi.String("example-agent-account-access-key"),
// ControllerHostName: pulumi.String("example-controller-host-name"),
// AgentApplicationName: pulumi.String("example-agent-application-name"),
// AgentTierName: pulumi.String("example-agent-tier-name"),
// AgentNodeName: pulumi.String("example-agent-node-name"),
// AgentUniqueHostId: pulumi.String("example-agent-unique-host-id"),
// ControllerSslEnabled: pulumi.Bool(true),
// ControllerPort: pulumi.Int(8080),
// GloballyEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Application Performance Monitoring resource for App Dynamics can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring:SpringCloudAppDynamicsApplicationPerformanceMonitoring example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AppPlatform/spring/service1/apms/apm1
// ```
type SpringCloudAppDynamicsApplicationPerformanceMonitoring struct {
pulumi.CustomResourceState
// Specifies the account access key used to authenticate with the Controller.
AgentAccountAccessKey pulumi.StringOutput `pulumi:"agentAccountAccessKey"`
// Specifies the account name of the App Dynamics account.
AgentAccountName pulumi.StringOutput `pulumi:"agentAccountName"`
// Specifies the name of the logical business application that this JVM node belongs to.
AgentApplicationName pulumi.StringPtrOutput `pulumi:"agentApplicationName"`
// Specifies the name of the node. Where JVMs are dynamically created.
AgentNodeName pulumi.StringPtrOutput `pulumi:"agentNodeName"`
// Specifies the name of the tier that this JVM node belongs to.
AgentTierName pulumi.StringPtrOutput `pulumi:"agentTierName"`
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
AgentUniqueHostId pulumi.StringPtrOutput `pulumi:"agentUniqueHostId"`
// Specifies the hostname or the IP address of the AppDynamics Controller.
ControllerHostName pulumi.StringOutput `pulumi:"controllerHostName"`
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
ControllerPort pulumi.IntPtrOutput `pulumi:"controllerPort"`
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
ControllerSslEnabled pulumi.BoolPtrOutput `pulumi:"controllerSslEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrOutput `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudAppDynamicsApplicationPerformanceMonitoring registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudAppDynamicsApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, args *SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs, opts ...pulumi.ResourceOption) (*SpringCloudAppDynamicsApplicationPerformanceMonitoring, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AgentAccountAccessKey == nil {
return nil, errors.New("invalid value for required argument 'AgentAccountAccessKey'")
}
if args.AgentAccountName == nil {
return nil, errors.New("invalid value for required argument 'AgentAccountName'")
}
if args.ControllerHostName == nil {
return nil, errors.New("invalid value for required argument 'ControllerHostName'")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.AgentAccountAccessKey != nil {
args.AgentAccountAccessKey = pulumi.ToSecret(args.AgentAccountAccessKey).(pulumi.StringInput)
}
if args.AgentAccountName != nil {
args.AgentAccountName = pulumi.ToSecret(args.AgentAccountName).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"agentAccountAccessKey",
"agentAccountName",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudAppDynamicsApplicationPerformanceMonitoring
err := ctx.RegisterResource("azure:appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring:SpringCloudAppDynamicsApplicationPerformanceMonitoring", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudAppDynamicsApplicationPerformanceMonitoring gets an existing SpringCloudAppDynamicsApplicationPerformanceMonitoring resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudAppDynamicsApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAppDynamicsApplicationPerformanceMonitoringState, opts ...pulumi.ResourceOption) (*SpringCloudAppDynamicsApplicationPerformanceMonitoring, error) {
var resource SpringCloudAppDynamicsApplicationPerformanceMonitoring
err := ctx.ReadResource("azure:appplatform/springCloudAppDynamicsApplicationPerformanceMonitoring:SpringCloudAppDynamicsApplicationPerformanceMonitoring", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudAppDynamicsApplicationPerformanceMonitoring resources.
type springCloudAppDynamicsApplicationPerformanceMonitoringState struct {
// Specifies the account access key used to authenticate with the Controller.
AgentAccountAccessKey *string `pulumi:"agentAccountAccessKey"`
// Specifies the account name of the App Dynamics account.
AgentAccountName *string `pulumi:"agentAccountName"`
// Specifies the name of the logical business application that this JVM node belongs to.
AgentApplicationName *string `pulumi:"agentApplicationName"`
// Specifies the name of the node. Where JVMs are dynamically created.
AgentNodeName *string `pulumi:"agentNodeName"`
// Specifies the name of the tier that this JVM node belongs to.
AgentTierName *string `pulumi:"agentTierName"`
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
AgentUniqueHostId *string `pulumi:"agentUniqueHostId"`
// Specifies the hostname or the IP address of the AppDynamics Controller.
ControllerHostName *string `pulumi:"controllerHostName"`
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
ControllerPort *int `pulumi:"controllerPort"`
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
ControllerSslEnabled *bool `pulumi:"controllerSslEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringState struct {
// Specifies the account access key used to authenticate with the Controller.
AgentAccountAccessKey pulumi.StringPtrInput
// Specifies the account name of the App Dynamics account.
AgentAccountName pulumi.StringPtrInput
// Specifies the name of the logical business application that this JVM node belongs to.
AgentApplicationName pulumi.StringPtrInput
// Specifies the name of the node. Where JVMs are dynamically created.
AgentNodeName pulumi.StringPtrInput
// Specifies the name of the tier that this JVM node belongs to.
AgentTierName pulumi.StringPtrInput
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
AgentUniqueHostId pulumi.StringPtrInput
// Specifies the hostname or the IP address of the AppDynamics Controller.
ControllerHostName pulumi.StringPtrInput
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
ControllerPort pulumi.IntPtrInput
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
ControllerSslEnabled pulumi.BoolPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppDynamicsApplicationPerformanceMonitoringState)(nil)).Elem()
}
type springCloudAppDynamicsApplicationPerformanceMonitoringArgs struct {
// Specifies the account access key used to authenticate with the Controller.
AgentAccountAccessKey string `pulumi:"agentAccountAccessKey"`
// Specifies the account name of the App Dynamics account.
AgentAccountName string `pulumi:"agentAccountName"`
// Specifies the name of the logical business application that this JVM node belongs to.
AgentApplicationName *string `pulumi:"agentApplicationName"`
// Specifies the name of the node. Where JVMs are dynamically created.
AgentNodeName *string `pulumi:"agentNodeName"`
// Specifies the name of the tier that this JVM node belongs to.
AgentTierName *string `pulumi:"agentTierName"`
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
AgentUniqueHostId *string `pulumi:"agentUniqueHostId"`
// Specifies the hostname or the IP address of the AppDynamics Controller.
ControllerHostName string `pulumi:"controllerHostName"`
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
ControllerPort *int `pulumi:"controllerPort"`
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
ControllerSslEnabled *bool `pulumi:"controllerSslEnabled"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudAppDynamicsApplicationPerformanceMonitoring resource.
type SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs struct {
// Specifies the account access key used to authenticate with the Controller.
AgentAccountAccessKey pulumi.StringInput
// Specifies the account name of the App Dynamics account.
AgentAccountName pulumi.StringInput
// Specifies the name of the logical business application that this JVM node belongs to.
AgentApplicationName pulumi.StringPtrInput
// Specifies the name of the node. Where JVMs are dynamically created.
AgentNodeName pulumi.StringPtrInput
// Specifies the name of the tier that this JVM node belongs to.
AgentTierName pulumi.StringPtrInput
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
AgentUniqueHostId pulumi.StringPtrInput
// Specifies the hostname or the IP address of the AppDynamics Controller.
ControllerHostName pulumi.StringInput
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
ControllerPort pulumi.IntPtrInput
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
ControllerSslEnabled pulumi.BoolPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppDynamicsApplicationPerformanceMonitoringArgs)(nil)).Elem()
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringInput interface {
pulumi.Input
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput
}
func (*SpringCloudAppDynamicsApplicationPerformanceMonitoring) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i *SpringCloudAppDynamicsApplicationPerformanceMonitoring) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return i.ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutputWithContext(context.Background())
}
func (i *SpringCloudAppDynamicsApplicationPerformanceMonitoring) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput)
}
// SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayInput is an input type that accepts SpringCloudAppDynamicsApplicationPerformanceMonitoringArray and SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayInput` via:
//
// SpringCloudAppDynamicsApplicationPerformanceMonitoringArray{ SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs{...} }
type SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayInput interface {
pulumi.Input
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutputWithContext(context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringArray []SpringCloudAppDynamicsApplicationPerformanceMonitoringInput
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudAppDynamicsApplicationPerformanceMonitoringArray) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput {
return i.ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppDynamicsApplicationPerformanceMonitoringArray) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput)
}
// SpringCloudAppDynamicsApplicationPerformanceMonitoringMapInput is an input type that accepts SpringCloudAppDynamicsApplicationPerformanceMonitoringMap and SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput values.
// You can construct a concrete instance of `SpringCloudAppDynamicsApplicationPerformanceMonitoringMapInput` via:
//
// SpringCloudAppDynamicsApplicationPerformanceMonitoringMap{ "key": SpringCloudAppDynamicsApplicationPerformanceMonitoringArgs{...} }
type SpringCloudAppDynamicsApplicationPerformanceMonitoringMapInput interface {
pulumi.Input
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput
ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutputWithContext(context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringMap map[string]SpringCloudAppDynamicsApplicationPerformanceMonitoringInput
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudAppDynamicsApplicationPerformanceMonitoringMap) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput {
return i.ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutputWithContext(context.Background())
}
func (i SpringCloudAppDynamicsApplicationPerformanceMonitoringMap) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput)
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput struct{ *pulumi.OutputState }
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return o
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return o
}
// Specifies the account access key used to authenticate with the Controller.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentAccountAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.AgentAccountAccessKey
}).(pulumi.StringOutput)
}
// Specifies the account name of the App Dynamics account.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.AgentAccountName
}).(pulumi.StringOutput)
}
// Specifies the name of the logical business application that this JVM node belongs to.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentApplicationName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.AgentApplicationName
}).(pulumi.StringPtrOutput)
}
// Specifies the name of the node. Where JVMs are dynamically created.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentNodeName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.AgentNodeName
}).(pulumi.StringPtrOutput)
}
// Specifies the name of the tier that this JVM node belongs to.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentTierName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.AgentTierName
}).(pulumi.StringPtrOutput)
}
// Specifies the unique host ID which is used to Logically partition a single physical host or virtual machine such that it appears to the Controller that the application is running on different machines.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) AgentUniqueHostId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.AgentUniqueHostId
}).(pulumi.StringPtrOutput)
}
// Specifies the hostname or the IP address of the AppDynamics Controller.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ControllerHostName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.ControllerHostName
}).(pulumi.StringOutput)
}
// Specifies the HTTP(S) port of the AppDynamics Controller. This is the port used to access the AppDynamics browser-based user interface.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ControllerPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.IntPtrOutput {
return v.ControllerPort
}).(pulumi.IntPtrOutput)
}
// Specifies whether enable use SSL (HTTPS) to connect to the AppDynamics Controller.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) ControllerSslEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.ControllerSslEnabled
}).(pulumi.BoolPtrOutput)
}
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) GloballyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.GloballyEnabled
}).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for App Dynamics. Changing this forces a new resource to be created.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppDynamicsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.SpringCloudServiceId
}).(pulumi.StringOutput)
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput) Index(i pulumi.IntInput) SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudAppDynamicsApplicationPerformanceMonitoring {
return vs[0].([]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)[vs[1].(int)]
}).(SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput)
}
type SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput() SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput) ToSpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudAppDynamicsApplicationPerformanceMonitoring {
return vs[0].(map[string]*SpringCloudAppDynamicsApplicationPerformanceMonitoring)[vs[1].(string)]
}).(SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppDynamicsApplicationPerformanceMonitoringInput)(nil)).Elem(), &SpringCloudAppDynamicsApplicationPerformanceMonitoring{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayInput)(nil)).Elem(), SpringCloudAppDynamicsApplicationPerformanceMonitoringArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppDynamicsApplicationPerformanceMonitoringMapInput)(nil)).Elem(), SpringCloudAppDynamicsApplicationPerformanceMonitoringMap{})
pulumi.RegisterOutputType(SpringCloudAppDynamicsApplicationPerformanceMonitoringOutput{})
pulumi.RegisterOutputType(SpringCloudAppDynamicsApplicationPerformanceMonitoringArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAppDynamicsApplicationPerformanceMonitoringMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/getSpringCloudApp.go | sdk/go/azure/appplatform/getSpringCloudApp.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Spring Cloud Application.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApp` data source is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := appplatform.LookupSpringCloudApp(ctx, &appplatform.LookupSpringCloudAppArgs{
// Name: exampleAzurermSpringCloudApp.Name,
// ResourceGroupName: exampleAzurermSpringCloudApp.ResourceGroupName,
// ServiceName: exampleAzurermSpringCloudApp.ServiceName,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("springCloudAppId", example.Id)
// return nil
// })
// }
//
// ```
func LookupSpringCloudApp(ctx *pulumi.Context, args *LookupSpringCloudAppArgs, opts ...pulumi.InvokeOption) (*LookupSpringCloudAppResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSpringCloudAppResult
err := ctx.Invoke("azure:appplatform/getSpringCloudApp:getSpringCloudApp", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSpringCloudApp.
type LookupSpringCloudAppArgs struct {
// The name of the Spring Cloud Application.
Name string `pulumi:"name"`
// The name of the Resource Group where the Spring Cloud Application exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the Spring Cloud Service.
ServiceName string `pulumi:"serviceName"`
}
// A collection of values returned by getSpringCloudApp.
type LookupSpringCloudAppResult struct {
// The Fully Qualified DNS Name.
Fqdn string `pulumi:"fqdn"`
// Is only HTTPS allowed?
HttpsOnly bool `pulumi:"httpsOnly"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetSpringCloudAppIdentity `pulumi:"identities"`
// Does the Spring Cloud Application have public endpoint?
IsPublic bool `pulumi:"isPublic"`
Name string `pulumi:"name"`
// A `persistentDisk` block as defined below.
PersistentDisks []GetSpringCloudAppPersistentDisk `pulumi:"persistentDisks"`
ResourceGroupName string `pulumi:"resourceGroupName"`
ServiceName string `pulumi:"serviceName"`
// Is End to End TLS Enabled?
TlsEnabled bool `pulumi:"tlsEnabled"`
// The public endpoint of the Spring Cloud Application.
Url string `pulumi:"url"`
}
func LookupSpringCloudAppOutput(ctx *pulumi.Context, args LookupSpringCloudAppOutputArgs, opts ...pulumi.InvokeOption) LookupSpringCloudAppResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSpringCloudAppResultOutput, error) {
args := v.(LookupSpringCloudAppArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:appplatform/getSpringCloudApp:getSpringCloudApp", args, LookupSpringCloudAppResultOutput{}, options).(LookupSpringCloudAppResultOutput), nil
}).(LookupSpringCloudAppResultOutput)
}
// A collection of arguments for invoking getSpringCloudApp.
type LookupSpringCloudAppOutputArgs struct {
// The name of the Spring Cloud Application.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Spring Cloud Application exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The name of the Spring Cloud Service.
ServiceName pulumi.StringInput `pulumi:"serviceName"`
}
func (LookupSpringCloudAppOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSpringCloudAppArgs)(nil)).Elem()
}
// A collection of values returned by getSpringCloudApp.
type LookupSpringCloudAppResultOutput struct{ *pulumi.OutputState }
func (LookupSpringCloudAppResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSpringCloudAppResult)(nil)).Elem()
}
func (o LookupSpringCloudAppResultOutput) ToLookupSpringCloudAppResultOutput() LookupSpringCloudAppResultOutput {
return o
}
func (o LookupSpringCloudAppResultOutput) ToLookupSpringCloudAppResultOutputWithContext(ctx context.Context) LookupSpringCloudAppResultOutput {
return o
}
// The Fully Qualified DNS Name.
func (o LookupSpringCloudAppResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// Is only HTTPS allowed?
func (o LookupSpringCloudAppResultOutput) HttpsOnly() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) bool { return v.HttpsOnly }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSpringCloudAppResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupSpringCloudAppResultOutput) Identities() GetSpringCloudAppIdentityArrayOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) []GetSpringCloudAppIdentity { return v.Identities }).(GetSpringCloudAppIdentityArrayOutput)
}
// Does the Spring Cloud Application have public endpoint?
func (o LookupSpringCloudAppResultOutput) IsPublic() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) bool { return v.IsPublic }).(pulumi.BoolOutput)
}
func (o LookupSpringCloudAppResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `persistentDisk` block as defined below.
func (o LookupSpringCloudAppResultOutput) PersistentDisks() GetSpringCloudAppPersistentDiskArrayOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) []GetSpringCloudAppPersistentDisk { return v.PersistentDisks }).(GetSpringCloudAppPersistentDiskArrayOutput)
}
func (o LookupSpringCloudAppResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o LookupSpringCloudAppResultOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.ServiceName }).(pulumi.StringOutput)
}
// Is End to End TLS Enabled?
func (o LookupSpringCloudAppResultOutput) TlsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) bool { return v.TlsEnabled }).(pulumi.BoolOutput)
}
// The public endpoint of the Spring Cloud Application.
func (o LookupSpringCloudAppResultOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudAppResult) string { return v.Url }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSpringCloudAppResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudAppRedisAssociation.go | sdk/go/azure/appplatform/springCloudAppRedisAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Associates a Spring Cloud Application with a Redis Cache.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudAppRedisAssociation` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/redis"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// exampleCache, err := redis.NewCache(ctx, "example", &redis.CacheArgs{
// Name: pulumi.String("example-cache"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Capacity: pulumi.Int(0),
// Family: pulumi.String("C"),
// SkuName: pulumi.String("Basic"),
// EnableNonSslPort: true,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudAppRedisAssociation(ctx, "example", &appplatform.SpringCloudAppRedisAssociationArgs{
// Name: pulumi.String("example-bind"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// RedisCacheId: exampleCache.ID(),
// RedisAccessKey: exampleCache.PrimaryAccessKey,
// SslEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Application Redis Association can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudAppRedisAssociation:SpringCloudAppRedisAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.AppPlatform/spring/myservice/apps/myapp/bindings/bind1
// ```
type SpringCloudAppRedisAssociation struct {
pulumi.CustomResourceState
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Redis Cache access key.
RedisAccessKey pulumi.StringOutput `pulumi:"redisAccessKey"`
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
RedisCacheId pulumi.StringOutput `pulumi:"redisCacheId"`
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
// Should SSL be used when connecting to Redis? Defaults to `true`.
SslEnabled pulumi.BoolPtrOutput `pulumi:"sslEnabled"`
}
// NewSpringCloudAppRedisAssociation registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudAppRedisAssociation(ctx *pulumi.Context,
name string, args *SpringCloudAppRedisAssociationArgs, opts ...pulumi.ResourceOption) (*SpringCloudAppRedisAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.RedisAccessKey == nil {
return nil, errors.New("invalid value for required argument 'RedisAccessKey'")
}
if args.RedisCacheId == nil {
return nil, errors.New("invalid value for required argument 'RedisCacheId'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudAppRedisAssociation
err := ctx.RegisterResource("azure:appplatform/springCloudAppRedisAssociation:SpringCloudAppRedisAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudAppRedisAssociation gets an existing SpringCloudAppRedisAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudAppRedisAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAppRedisAssociationState, opts ...pulumi.ResourceOption) (*SpringCloudAppRedisAssociation, error) {
var resource SpringCloudAppRedisAssociation
err := ctx.ReadResource("azure:appplatform/springCloudAppRedisAssociation:SpringCloudAppRedisAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudAppRedisAssociation resources.
type springCloudAppRedisAssociationState struct {
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Redis Cache access key.
RedisAccessKey *string `pulumi:"redisAccessKey"`
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
RedisCacheId *string `pulumi:"redisCacheId"`
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
// Should SSL be used when connecting to Redis? Defaults to `true`.
SslEnabled *bool `pulumi:"sslEnabled"`
}
type SpringCloudAppRedisAssociationState struct {
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Redis Cache access key.
RedisAccessKey pulumi.StringPtrInput
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
RedisCacheId pulumi.StringPtrInput
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
// Should SSL be used when connecting to Redis? Defaults to `true`.
SslEnabled pulumi.BoolPtrInput
}
func (SpringCloudAppRedisAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppRedisAssociationState)(nil)).Elem()
}
type springCloudAppRedisAssociationArgs struct {
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Redis Cache access key.
RedisAccessKey string `pulumi:"redisAccessKey"`
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
RedisCacheId string `pulumi:"redisCacheId"`
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
// Should SSL be used when connecting to Redis? Defaults to `true`.
SslEnabled *bool `pulumi:"sslEnabled"`
}
// The set of arguments for constructing a SpringCloudAppRedisAssociation resource.
type SpringCloudAppRedisAssociationArgs struct {
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Redis Cache access key.
RedisAccessKey pulumi.StringInput
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
RedisCacheId pulumi.StringInput
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
// Should SSL be used when connecting to Redis? Defaults to `true`.
SslEnabled pulumi.BoolPtrInput
}
func (SpringCloudAppRedisAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppRedisAssociationArgs)(nil)).Elem()
}
type SpringCloudAppRedisAssociationInput interface {
pulumi.Input
ToSpringCloudAppRedisAssociationOutput() SpringCloudAppRedisAssociationOutput
ToSpringCloudAppRedisAssociationOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationOutput
}
func (*SpringCloudAppRedisAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (i *SpringCloudAppRedisAssociation) ToSpringCloudAppRedisAssociationOutput() SpringCloudAppRedisAssociationOutput {
return i.ToSpringCloudAppRedisAssociationOutputWithContext(context.Background())
}
func (i *SpringCloudAppRedisAssociation) ToSpringCloudAppRedisAssociationOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppRedisAssociationOutput)
}
// SpringCloudAppRedisAssociationArrayInput is an input type that accepts SpringCloudAppRedisAssociationArray and SpringCloudAppRedisAssociationArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppRedisAssociationArrayInput` via:
//
// SpringCloudAppRedisAssociationArray{ SpringCloudAppRedisAssociationArgs{...} }
type SpringCloudAppRedisAssociationArrayInput interface {
pulumi.Input
ToSpringCloudAppRedisAssociationArrayOutput() SpringCloudAppRedisAssociationArrayOutput
ToSpringCloudAppRedisAssociationArrayOutputWithContext(context.Context) SpringCloudAppRedisAssociationArrayOutput
}
type SpringCloudAppRedisAssociationArray []SpringCloudAppRedisAssociationInput
func (SpringCloudAppRedisAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (i SpringCloudAppRedisAssociationArray) ToSpringCloudAppRedisAssociationArrayOutput() SpringCloudAppRedisAssociationArrayOutput {
return i.ToSpringCloudAppRedisAssociationArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppRedisAssociationArray) ToSpringCloudAppRedisAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppRedisAssociationArrayOutput)
}
// SpringCloudAppRedisAssociationMapInput is an input type that accepts SpringCloudAppRedisAssociationMap and SpringCloudAppRedisAssociationMapOutput values.
// You can construct a concrete instance of `SpringCloudAppRedisAssociationMapInput` via:
//
// SpringCloudAppRedisAssociationMap{ "key": SpringCloudAppRedisAssociationArgs{...} }
type SpringCloudAppRedisAssociationMapInput interface {
pulumi.Input
ToSpringCloudAppRedisAssociationMapOutput() SpringCloudAppRedisAssociationMapOutput
ToSpringCloudAppRedisAssociationMapOutputWithContext(context.Context) SpringCloudAppRedisAssociationMapOutput
}
type SpringCloudAppRedisAssociationMap map[string]SpringCloudAppRedisAssociationInput
func (SpringCloudAppRedisAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (i SpringCloudAppRedisAssociationMap) ToSpringCloudAppRedisAssociationMapOutput() SpringCloudAppRedisAssociationMapOutput {
return i.ToSpringCloudAppRedisAssociationMapOutputWithContext(context.Background())
}
func (i SpringCloudAppRedisAssociationMap) ToSpringCloudAppRedisAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppRedisAssociationMapOutput)
}
type SpringCloudAppRedisAssociationOutput struct{ *pulumi.OutputState }
func (SpringCloudAppRedisAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (o SpringCloudAppRedisAssociationOutput) ToSpringCloudAppRedisAssociationOutput() SpringCloudAppRedisAssociationOutput {
return o
}
func (o SpringCloudAppRedisAssociationOutput) ToSpringCloudAppRedisAssociationOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationOutput {
return o
}
// Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.
func (o SpringCloudAppRedisAssociationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppRedisAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the Redis Cache access key.
func (o SpringCloudAppRedisAssociationOutput) RedisAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppRedisAssociation) pulumi.StringOutput { return v.RedisAccessKey }).(pulumi.StringOutput)
}
// Specifies the Redis Cache resource ID. Changing this forces a new resource to be created.
func (o SpringCloudAppRedisAssociationOutput) RedisCacheId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppRedisAssociation) pulumi.StringOutput { return v.RedisCacheId }).(pulumi.StringOutput)
}
// Specifies the Spring Cloud Application resource ID in which the Association is created. Changing this forces a new resource to be created.
func (o SpringCloudAppRedisAssociationOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAppRedisAssociation) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
// Should SSL be used when connecting to Redis? Defaults to `true`.
func (o SpringCloudAppRedisAssociationOutput) SslEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudAppRedisAssociation) pulumi.BoolPtrOutput { return v.SslEnabled }).(pulumi.BoolPtrOutput)
}
type SpringCloudAppRedisAssociationArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppRedisAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (o SpringCloudAppRedisAssociationArrayOutput) ToSpringCloudAppRedisAssociationArrayOutput() SpringCloudAppRedisAssociationArrayOutput {
return o
}
func (o SpringCloudAppRedisAssociationArrayOutput) ToSpringCloudAppRedisAssociationArrayOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationArrayOutput {
return o
}
func (o SpringCloudAppRedisAssociationArrayOutput) Index(i pulumi.IntInput) SpringCloudAppRedisAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudAppRedisAssociation {
return vs[0].([]*SpringCloudAppRedisAssociation)[vs[1].(int)]
}).(SpringCloudAppRedisAssociationOutput)
}
type SpringCloudAppRedisAssociationMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAppRedisAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAppRedisAssociation)(nil)).Elem()
}
func (o SpringCloudAppRedisAssociationMapOutput) ToSpringCloudAppRedisAssociationMapOutput() SpringCloudAppRedisAssociationMapOutput {
return o
}
func (o SpringCloudAppRedisAssociationMapOutput) ToSpringCloudAppRedisAssociationMapOutputWithContext(ctx context.Context) SpringCloudAppRedisAssociationMapOutput {
return o
}
func (o SpringCloudAppRedisAssociationMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAppRedisAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudAppRedisAssociation {
return vs[0].(map[string]*SpringCloudAppRedisAssociation)[vs[1].(string)]
}).(SpringCloudAppRedisAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppRedisAssociationInput)(nil)).Elem(), &SpringCloudAppRedisAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppRedisAssociationArrayInput)(nil)).Elem(), SpringCloudAppRedisAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppRedisAssociationMapInput)(nil)).Elem(), SpringCloudAppRedisAssociationMap{})
pulumi.RegisterOutputType(SpringCloudAppRedisAssociationOutput{})
pulumi.RegisterOutputType(SpringCloudAppRedisAssociationArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAppRedisAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudConnection.go | sdk/go/azure/appplatform/springCloudConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a service connector for spring cloud app.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudConnection` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
// Name: pulumi.String("example-cosmosdb-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// OfferType: pulumi.String("Standard"),
// Kind: pulumi.String("GlobalDocumentDB"),
// ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
// ConsistencyLevel: pulumi.String("BoundedStaleness"),
// MaxIntervalInSeconds: pulumi.Int(10),
// MaxStalenessPrefix: pulumi.Int(200),
// },
// GeoLocations: cosmosdb.AccountGeoLocationArray{
// &cosmosdb.AccountGeoLocationArgs{
// Location: example.Location,
// FailoverPriority: pulumi.Int(0),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{
// Name: pulumi.String("cosmos-sql-db"),
// ResourceGroupName: exampleAccount.ResourceGroupName,
// AccountName: exampleAccount.Name,
// Throughput: pulumi.Int(400),
// })
// if err != nil {
// return err
// }
// _, err = cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{
// Name: pulumi.String("example-container"),
// ResourceGroupName: exampleAccount.ResourceGroupName,
// AccountName: exampleAccount.Name,
// DatabaseName: exampleSqlDatabase.Name,
// PartitionKeyPath: "/definition",
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("examplespringcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("examplespringcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// Identity: &appplatform.SpringCloudAppIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleSpringCloudJavaDeployment, err := appplatform.NewSpringCloudJavaDeployment(ctx, "example", &appplatform.SpringCloudJavaDeploymentArgs{
// Name: pulumi.String("exampledeployment"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudConnection(ctx, "example", &appplatform.SpringCloudConnectionArgs{
// Name: pulumi.String("example-serviceconnector"),
// SpringCloudId: exampleSpringCloudJavaDeployment.ID(),
// TargetResourceId: exampleSqlDatabase.ID(),
// Authentication: &appplatform.SpringCloudConnectionAuthenticationArgs{
// Type: pulumi.String("systemAssignedIdentity"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceLinker` - 2024-04-01, 2022-05-01
//
// ## Import
//
// Service Connector for spring cloud can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudConnection:SpringCloudConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AppPlatform/Spring/springcloud/apps/springcloudapp/deployments/deployment/providers/Microsoft.ServiceLinker/linkers/serviceconnector1
// ```
type SpringCloudConnection struct {
pulumi.CustomResourceState
// The authentication info. An `authentication` block as defined below.
Authentication SpringCloudConnectionAuthenticationOutput `pulumi:"authentication"`
ClientType pulumi.StringPtrOutput `pulumi:"clientType"`
// The name of the service connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
SecretStore SpringCloudConnectionSecretStorePtrOutput `pulumi:"secretStore"`
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
SpringCloudId pulumi.StringOutput `pulumi:"springCloudId"`
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"`
VnetSolution pulumi.StringPtrOutput `pulumi:"vnetSolution"`
}
// NewSpringCloudConnection registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudConnection(ctx *pulumi.Context,
name string, args *SpringCloudConnectionArgs, opts ...pulumi.ResourceOption) (*SpringCloudConnection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Authentication == nil {
return nil, errors.New("invalid value for required argument 'Authentication'")
}
if args.SpringCloudId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudId'")
}
if args.TargetResourceId == nil {
return nil, errors.New("invalid value for required argument 'TargetResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudConnection
err := ctx.RegisterResource("azure:appplatform/springCloudConnection:SpringCloudConnection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudConnection gets an existing SpringCloudConnection resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudConnectionState, opts ...pulumi.ResourceOption) (*SpringCloudConnection, error) {
var resource SpringCloudConnection
err := ctx.ReadResource("azure:appplatform/springCloudConnection:SpringCloudConnection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudConnection resources.
type springCloudConnectionState struct {
// The authentication info. An `authentication` block as defined below.
Authentication *SpringCloudConnectionAuthentication `pulumi:"authentication"`
ClientType *string `pulumi:"clientType"`
// The name of the service connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
SecretStore *SpringCloudConnectionSecretStore `pulumi:"secretStore"`
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
SpringCloudId *string `pulumi:"springCloudId"`
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
TargetResourceId *string `pulumi:"targetResourceId"`
VnetSolution *string `pulumi:"vnetSolution"`
}
type SpringCloudConnectionState struct {
// The authentication info. An `authentication` block as defined below.
Authentication SpringCloudConnectionAuthenticationPtrInput
ClientType pulumi.StringPtrInput
// The name of the service connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
SecretStore SpringCloudConnectionSecretStorePtrInput
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
SpringCloudId pulumi.StringPtrInput
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
TargetResourceId pulumi.StringPtrInput
VnetSolution pulumi.StringPtrInput
}
func (SpringCloudConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudConnectionState)(nil)).Elem()
}
type springCloudConnectionArgs struct {
// The authentication info. An `authentication` block as defined below.
Authentication SpringCloudConnectionAuthentication `pulumi:"authentication"`
ClientType *string `pulumi:"clientType"`
// The name of the service connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
SecretStore *SpringCloudConnectionSecretStore `pulumi:"secretStore"`
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
SpringCloudId string `pulumi:"springCloudId"`
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
TargetResourceId string `pulumi:"targetResourceId"`
VnetSolution *string `pulumi:"vnetSolution"`
}
// The set of arguments for constructing a SpringCloudConnection resource.
type SpringCloudConnectionArgs struct {
// The authentication info. An `authentication` block as defined below.
Authentication SpringCloudConnectionAuthenticationInput
ClientType pulumi.StringPtrInput
// The name of the service connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
SecretStore SpringCloudConnectionSecretStorePtrInput
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
SpringCloudId pulumi.StringInput
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
TargetResourceId pulumi.StringInput
VnetSolution pulumi.StringPtrInput
}
func (SpringCloudConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudConnectionArgs)(nil)).Elem()
}
type SpringCloudConnectionInput interface {
pulumi.Input
ToSpringCloudConnectionOutput() SpringCloudConnectionOutput
ToSpringCloudConnectionOutputWithContext(ctx context.Context) SpringCloudConnectionOutput
}
func (*SpringCloudConnection) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudConnection)(nil)).Elem()
}
func (i *SpringCloudConnection) ToSpringCloudConnectionOutput() SpringCloudConnectionOutput {
return i.ToSpringCloudConnectionOutputWithContext(context.Background())
}
func (i *SpringCloudConnection) ToSpringCloudConnectionOutputWithContext(ctx context.Context) SpringCloudConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConnectionOutput)
}
// SpringCloudConnectionArrayInput is an input type that accepts SpringCloudConnectionArray and SpringCloudConnectionArrayOutput values.
// You can construct a concrete instance of `SpringCloudConnectionArrayInput` via:
//
// SpringCloudConnectionArray{ SpringCloudConnectionArgs{...} }
type SpringCloudConnectionArrayInput interface {
pulumi.Input
ToSpringCloudConnectionArrayOutput() SpringCloudConnectionArrayOutput
ToSpringCloudConnectionArrayOutputWithContext(context.Context) SpringCloudConnectionArrayOutput
}
type SpringCloudConnectionArray []SpringCloudConnectionInput
func (SpringCloudConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudConnection)(nil)).Elem()
}
func (i SpringCloudConnectionArray) ToSpringCloudConnectionArrayOutput() SpringCloudConnectionArrayOutput {
return i.ToSpringCloudConnectionArrayOutputWithContext(context.Background())
}
func (i SpringCloudConnectionArray) ToSpringCloudConnectionArrayOutputWithContext(ctx context.Context) SpringCloudConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConnectionArrayOutput)
}
// SpringCloudConnectionMapInput is an input type that accepts SpringCloudConnectionMap and SpringCloudConnectionMapOutput values.
// You can construct a concrete instance of `SpringCloudConnectionMapInput` via:
//
// SpringCloudConnectionMap{ "key": SpringCloudConnectionArgs{...} }
type SpringCloudConnectionMapInput interface {
pulumi.Input
ToSpringCloudConnectionMapOutput() SpringCloudConnectionMapOutput
ToSpringCloudConnectionMapOutputWithContext(context.Context) SpringCloudConnectionMapOutput
}
type SpringCloudConnectionMap map[string]SpringCloudConnectionInput
func (SpringCloudConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudConnection)(nil)).Elem()
}
func (i SpringCloudConnectionMap) ToSpringCloudConnectionMapOutput() SpringCloudConnectionMapOutput {
return i.ToSpringCloudConnectionMapOutputWithContext(context.Background())
}
func (i SpringCloudConnectionMap) ToSpringCloudConnectionMapOutputWithContext(ctx context.Context) SpringCloudConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudConnectionMapOutput)
}
type SpringCloudConnectionOutput struct{ *pulumi.OutputState }
func (SpringCloudConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudConnection)(nil)).Elem()
}
func (o SpringCloudConnectionOutput) ToSpringCloudConnectionOutput() SpringCloudConnectionOutput {
return o
}
func (o SpringCloudConnectionOutput) ToSpringCloudConnectionOutputWithContext(ctx context.Context) SpringCloudConnectionOutput {
return o
}
// The authentication info. An `authentication` block as defined below.
func (o SpringCloudConnectionOutput) Authentication() SpringCloudConnectionAuthenticationOutput {
return o.ApplyT(func(v *SpringCloudConnection) SpringCloudConnectionAuthenticationOutput { return v.Authentication }).(SpringCloudConnectionAuthenticationOutput)
}
func (o SpringCloudConnectionOutput) ClientType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudConnection) pulumi.StringPtrOutput { return v.ClientType }).(pulumi.StringPtrOutput)
}
// The name of the service connection. Changing this forces a new resource to be created.
func (o SpringCloudConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o SpringCloudConnectionOutput) SecretStore() SpringCloudConnectionSecretStorePtrOutput {
return o.ApplyT(func(v *SpringCloudConnection) SpringCloudConnectionSecretStorePtrOutput { return v.SecretStore }).(SpringCloudConnectionSecretStorePtrOutput)
}
// The ID of the data source spring cloud. Changing this forces a new resource to be created.
func (o SpringCloudConnectionOutput) SpringCloudId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudConnection) pulumi.StringOutput { return v.SpringCloudId }).(pulumi.StringOutput)
}
// The ID of the target resource. Changing this forces a new resource to be created. Possible target resources are `Postgres`, `PostgresFlexible`, `Mysql`, `Sql`, `Redis`, `RedisEnterprise`, `CosmosCassandra`, `CosmosGremlin`, `CosmosMongo`, `CosmosSql`, `CosmosTable`, `StorageBlob`, `StorageQueue`, `StorageFile`, `StorageTable`, `AppConfig`, `EventHub`, `ServiceBus`, `SignalR`, `WebPubSub`, `ConfluentKafka`. The integration guide can be found [here](https://learn.microsoft.com/en-us/azure/service-connector/how-to-integrate-postgres).
func (o SpringCloudConnectionOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudConnection) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput)
}
func (o SpringCloudConnectionOutput) VnetSolution() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudConnection) pulumi.StringPtrOutput { return v.VnetSolution }).(pulumi.StringPtrOutput)
}
type SpringCloudConnectionArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudConnection)(nil)).Elem()
}
func (o SpringCloudConnectionArrayOutput) ToSpringCloudConnectionArrayOutput() SpringCloudConnectionArrayOutput {
return o
}
func (o SpringCloudConnectionArrayOutput) ToSpringCloudConnectionArrayOutputWithContext(ctx context.Context) SpringCloudConnectionArrayOutput {
return o
}
func (o SpringCloudConnectionArrayOutput) Index(i pulumi.IntInput) SpringCloudConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudConnection {
return vs[0].([]*SpringCloudConnection)[vs[1].(int)]
}).(SpringCloudConnectionOutput)
}
type SpringCloudConnectionMapOutput struct{ *pulumi.OutputState }
func (SpringCloudConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudConnection)(nil)).Elem()
}
func (o SpringCloudConnectionMapOutput) ToSpringCloudConnectionMapOutput() SpringCloudConnectionMapOutput {
return o
}
func (o SpringCloudConnectionMapOutput) ToSpringCloudConnectionMapOutputWithContext(ctx context.Context) SpringCloudConnectionMapOutput {
return o
}
func (o SpringCloudConnectionMapOutput) MapIndex(k pulumi.StringInput) SpringCloudConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudConnection {
return vs[0].(map[string]*SpringCloudConnection)[vs[1].(string)]
}).(SpringCloudConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConnectionInput)(nil)).Elem(), &SpringCloudConnection{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConnectionArrayInput)(nil)).Elem(), SpringCloudConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudConnectionMapInput)(nil)).Elem(), SpringCloudConnectionMap{})
pulumi.RegisterOutputType(SpringCloudConnectionOutput{})
pulumi.RegisterOutputType(SpringCloudConnectionArrayOutput{})
pulumi.RegisterOutputType(SpringCloudConnectionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudBuildPackBinding.go | sdk/go/azure/appplatform/springCloudBuildPackBinding.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Build Pack Binding.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudBuildPackBinding` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudBuilder, err := appplatform.NewSpringCloudBuilder(ctx, "example", &appplatform.SpringCloudBuilderArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// BuildPackGroups: appplatform.SpringCloudBuilderBuildPackGroupArray{
// &appplatform.SpringCloudBuilderBuildPackGroupArgs{
// Name: pulumi.String("mix"),
// BuildPackIds: pulumi.StringArray{
// pulumi.String("tanzu-Build Packs/java-azure"),
// },
// },
// },
// Stack: &appplatform.SpringCloudBuilderStackArgs{
// Id: pulumi.String("io.Build Packs.stacks.bionic"),
// Version: pulumi.String("base"),
// },
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudBuildPackBinding(ctx, "example", &appplatform.SpringCloudBuildPackBindingArgs{
// Name: pulumi.String("example"),
// SpringCloudBuilderId: exampleSpringCloudBuilder.ID(),
// BindingType: pulumi.String("ApplicationInsights"),
// Launch: &appplatform.SpringCloudBuildPackBindingLaunchArgs{
// Properties: pulumi.StringMap{
// "abc": pulumi.String("def"),
// "any-string": pulumi.String("any-string"),
// "sampling-rate": pulumi.String("12.0"),
// },
// Secrets: pulumi.StringMap{
// "connection-string": pulumi.String("XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX;XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXX"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Build Pack Bindings can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudBuildPackBinding:SpringCloudBuildPackBinding example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/buildServices/buildService1/builders/builder1/buildPackBindings/binding1
// ```
type SpringCloudBuildPackBinding struct {
pulumi.CustomResourceState
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
BindingType pulumi.StringPtrOutput `pulumi:"bindingType"`
// A `launch` block as defined below.
Launch SpringCloudBuildPackBindingLaunchPtrOutput `pulumi:"launch"`
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
SpringCloudBuilderId pulumi.StringOutput `pulumi:"springCloudBuilderId"`
}
// NewSpringCloudBuildPackBinding registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudBuildPackBinding(ctx *pulumi.Context,
name string, args *SpringCloudBuildPackBindingArgs, opts ...pulumi.ResourceOption) (*SpringCloudBuildPackBinding, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudBuilderId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudBuilderId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudBuildPackBinding
err := ctx.RegisterResource("azure:appplatform/springCloudBuildPackBinding:SpringCloudBuildPackBinding", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudBuildPackBinding gets an existing SpringCloudBuildPackBinding resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudBuildPackBinding(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudBuildPackBindingState, opts ...pulumi.ResourceOption) (*SpringCloudBuildPackBinding, error) {
var resource SpringCloudBuildPackBinding
err := ctx.ReadResource("azure:appplatform/springCloudBuildPackBinding:SpringCloudBuildPackBinding", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudBuildPackBinding resources.
type springCloudBuildPackBindingState struct {
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
BindingType *string `pulumi:"bindingType"`
// A `launch` block as defined below.
Launch *SpringCloudBuildPackBindingLaunch `pulumi:"launch"`
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
SpringCloudBuilderId *string `pulumi:"springCloudBuilderId"`
}
type SpringCloudBuildPackBindingState struct {
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
BindingType pulumi.StringPtrInput
// A `launch` block as defined below.
Launch SpringCloudBuildPackBindingLaunchPtrInput
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
SpringCloudBuilderId pulumi.StringPtrInput
}
func (SpringCloudBuildPackBindingState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuildPackBindingState)(nil)).Elem()
}
type springCloudBuildPackBindingArgs struct {
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
BindingType *string `pulumi:"bindingType"`
// A `launch` block as defined below.
Launch *SpringCloudBuildPackBindingLaunch `pulumi:"launch"`
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
SpringCloudBuilderId string `pulumi:"springCloudBuilderId"`
}
// The set of arguments for constructing a SpringCloudBuildPackBinding resource.
type SpringCloudBuildPackBindingArgs struct {
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
BindingType pulumi.StringPtrInput
// A `launch` block as defined below.
Launch SpringCloudBuildPackBindingLaunchPtrInput
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
SpringCloudBuilderId pulumi.StringInput
}
func (SpringCloudBuildPackBindingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuildPackBindingArgs)(nil)).Elem()
}
type SpringCloudBuildPackBindingInput interface {
pulumi.Input
ToSpringCloudBuildPackBindingOutput() SpringCloudBuildPackBindingOutput
ToSpringCloudBuildPackBindingOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingOutput
}
func (*SpringCloudBuildPackBinding) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuildPackBinding)(nil)).Elem()
}
func (i *SpringCloudBuildPackBinding) ToSpringCloudBuildPackBindingOutput() SpringCloudBuildPackBindingOutput {
return i.ToSpringCloudBuildPackBindingOutputWithContext(context.Background())
}
func (i *SpringCloudBuildPackBinding) ToSpringCloudBuildPackBindingOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildPackBindingOutput)
}
// SpringCloudBuildPackBindingArrayInput is an input type that accepts SpringCloudBuildPackBindingArray and SpringCloudBuildPackBindingArrayOutput values.
// You can construct a concrete instance of `SpringCloudBuildPackBindingArrayInput` via:
//
// SpringCloudBuildPackBindingArray{ SpringCloudBuildPackBindingArgs{...} }
type SpringCloudBuildPackBindingArrayInput interface {
pulumi.Input
ToSpringCloudBuildPackBindingArrayOutput() SpringCloudBuildPackBindingArrayOutput
ToSpringCloudBuildPackBindingArrayOutputWithContext(context.Context) SpringCloudBuildPackBindingArrayOutput
}
type SpringCloudBuildPackBindingArray []SpringCloudBuildPackBindingInput
func (SpringCloudBuildPackBindingArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuildPackBinding)(nil)).Elem()
}
func (i SpringCloudBuildPackBindingArray) ToSpringCloudBuildPackBindingArrayOutput() SpringCloudBuildPackBindingArrayOutput {
return i.ToSpringCloudBuildPackBindingArrayOutputWithContext(context.Background())
}
func (i SpringCloudBuildPackBindingArray) ToSpringCloudBuildPackBindingArrayOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildPackBindingArrayOutput)
}
// SpringCloudBuildPackBindingMapInput is an input type that accepts SpringCloudBuildPackBindingMap and SpringCloudBuildPackBindingMapOutput values.
// You can construct a concrete instance of `SpringCloudBuildPackBindingMapInput` via:
//
// SpringCloudBuildPackBindingMap{ "key": SpringCloudBuildPackBindingArgs{...} }
type SpringCloudBuildPackBindingMapInput interface {
pulumi.Input
ToSpringCloudBuildPackBindingMapOutput() SpringCloudBuildPackBindingMapOutput
ToSpringCloudBuildPackBindingMapOutputWithContext(context.Context) SpringCloudBuildPackBindingMapOutput
}
type SpringCloudBuildPackBindingMap map[string]SpringCloudBuildPackBindingInput
func (SpringCloudBuildPackBindingMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuildPackBinding)(nil)).Elem()
}
func (i SpringCloudBuildPackBindingMap) ToSpringCloudBuildPackBindingMapOutput() SpringCloudBuildPackBindingMapOutput {
return i.ToSpringCloudBuildPackBindingMapOutputWithContext(context.Background())
}
func (i SpringCloudBuildPackBindingMap) ToSpringCloudBuildPackBindingMapOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuildPackBindingMapOutput)
}
type SpringCloudBuildPackBindingOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildPackBindingOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuildPackBinding)(nil)).Elem()
}
func (o SpringCloudBuildPackBindingOutput) ToSpringCloudBuildPackBindingOutput() SpringCloudBuildPackBindingOutput {
return o
}
func (o SpringCloudBuildPackBindingOutput) ToSpringCloudBuildPackBindingOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingOutput {
return o
}
// Specifies the Build Pack Binding Type. Allowed values are `ApacheSkyWalking`, `AppDynamics`, `ApplicationInsights`, `Dynatrace`, `ElasticAPM` and `NewRelic`.
func (o SpringCloudBuildPackBindingOutput) BindingType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudBuildPackBinding) pulumi.StringPtrOutput { return v.BindingType }).(pulumi.StringPtrOutput)
}
// A `launch` block as defined below.
func (o SpringCloudBuildPackBindingOutput) Launch() SpringCloudBuildPackBindingLaunchPtrOutput {
return o.ApplyT(func(v *SpringCloudBuildPackBinding) SpringCloudBuildPackBindingLaunchPtrOutput { return v.Launch }).(SpringCloudBuildPackBindingLaunchPtrOutput)
}
// The name which should be used for this Spring Cloud Build Pack Binding. Changing this forces a new Spring Cloud Build Pack Binding to be created.
func (o SpringCloudBuildPackBindingOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildPackBinding) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Builder. Changing this forces a new Spring Cloud Build Pack Binding to be created.
func (o SpringCloudBuildPackBindingOutput) SpringCloudBuilderId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuildPackBinding) pulumi.StringOutput { return v.SpringCloudBuilderId }).(pulumi.StringOutput)
}
type SpringCloudBuildPackBindingArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildPackBindingArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuildPackBinding)(nil)).Elem()
}
func (o SpringCloudBuildPackBindingArrayOutput) ToSpringCloudBuildPackBindingArrayOutput() SpringCloudBuildPackBindingArrayOutput {
return o
}
func (o SpringCloudBuildPackBindingArrayOutput) ToSpringCloudBuildPackBindingArrayOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingArrayOutput {
return o
}
func (o SpringCloudBuildPackBindingArrayOutput) Index(i pulumi.IntInput) SpringCloudBuildPackBindingOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudBuildPackBinding {
return vs[0].([]*SpringCloudBuildPackBinding)[vs[1].(int)]
}).(SpringCloudBuildPackBindingOutput)
}
type SpringCloudBuildPackBindingMapOutput struct{ *pulumi.OutputState }
func (SpringCloudBuildPackBindingMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuildPackBinding)(nil)).Elem()
}
func (o SpringCloudBuildPackBindingMapOutput) ToSpringCloudBuildPackBindingMapOutput() SpringCloudBuildPackBindingMapOutput {
return o
}
func (o SpringCloudBuildPackBindingMapOutput) ToSpringCloudBuildPackBindingMapOutputWithContext(ctx context.Context) SpringCloudBuildPackBindingMapOutput {
return o
}
func (o SpringCloudBuildPackBindingMapOutput) MapIndex(k pulumi.StringInput) SpringCloudBuildPackBindingOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudBuildPackBinding {
return vs[0].(map[string]*SpringCloudBuildPackBinding)[vs[1].(string)]
}).(SpringCloudBuildPackBindingOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildPackBindingInput)(nil)).Elem(), &SpringCloudBuildPackBinding{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildPackBindingArrayInput)(nil)).Elem(), SpringCloudBuildPackBindingArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuildPackBindingMapInput)(nil)).Elem(), SpringCloudBuildPackBindingMap{})
pulumi.RegisterOutputType(SpringCloudBuildPackBindingOutput{})
pulumi.RegisterOutputType(SpringCloudBuildPackBindingArrayOutput{})
pulumi.RegisterOutputType(SpringCloudBuildPackBindingMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudContainerDeployment.go | sdk/go/azure/appplatform/springCloudContainerDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Container Deployment.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudContainerDeployment` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleSpringCloudService.ResourceGroupName,
// ServiceName: exampleSpringCloudService.Name,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudContainerDeployment(ctx, "example", &appplatform.SpringCloudContainerDeploymentArgs{
// Name: pulumi.String("example"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// InstanceCount: pulumi.Int(2),
// Arguments: pulumi.StringArray{
// pulumi.String("-cp"),
// pulumi.String("/app/resources:/app/classes:/app/libs/*"),
// pulumi.String("hello.Application"),
// },
// Commands: pulumi.StringArray{
// pulumi.String("java"),
// },
// EnvironmentVariables: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// "Env": pulumi.String("Staging"),
// },
// Server: pulumi.String("docker.io"),
// Image: pulumi.String("springio/gs-spring-boot-docker"),
// LanguageFramework: pulumi.String("springboot"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Container Deployments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudContainerDeployment:SpringCloudContainerDeployment example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/apps/app1/deployments/deploy1
// ```
type SpringCloudContainerDeployment struct {
pulumi.CustomResourceState
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
AddonJson pulumi.StringOutput `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayOutput `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
Arguments pulumi.StringArrayOutput `pulumi:"arguments"`
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
Commands pulumi.StringArrayOutput `pulumi:"commands"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapOutput `pulumi:"environmentVariables"`
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
Image pulumi.StringOutput `pulumi:"image"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrOutput `pulumi:"instanceCount"`
// Specifies the language framework of the container image. The only possible value is `springboot`.
LanguageFramework pulumi.StringPtrOutput `pulumi:"languageFramework"`
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `quota` block as defined below.
Quota SpringCloudContainerDeploymentQuotaOutput `pulumi:"quota"`
// The name of the registry that contains the container image.
Server pulumi.StringOutput `pulumi:"server"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
}
// NewSpringCloudContainerDeployment registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudContainerDeployment(ctx *pulumi.Context,
name string, args *SpringCloudContainerDeploymentArgs, opts ...pulumi.ResourceOption) (*SpringCloudContainerDeployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Image == nil {
return nil, errors.New("invalid value for required argument 'Image'")
}
if args.Server == nil {
return nil, errors.New("invalid value for required argument 'Server'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudContainerDeployment
err := ctx.RegisterResource("azure:appplatform/springCloudContainerDeployment:SpringCloudContainerDeployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudContainerDeployment gets an existing SpringCloudContainerDeployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudContainerDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudContainerDeploymentState, opts ...pulumi.ResourceOption) (*SpringCloudContainerDeployment, error) {
var resource SpringCloudContainerDeployment
err := ctx.ReadResource("azure:appplatform/springCloudContainerDeployment:SpringCloudContainerDeployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudContainerDeployment resources.
type springCloudContainerDeploymentState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
AddonJson *string `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
Arguments []string `pulumi:"arguments"`
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
Commands []string `pulumi:"commands"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
Image *string `pulumi:"image"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// Specifies the language framework of the container image. The only possible value is `springboot`.
LanguageFramework *string `pulumi:"languageFramework"`
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudContainerDeploymentQuota `pulumi:"quota"`
// The name of the registry that contains the container image.
Server *string `pulumi:"server"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
}
type SpringCloudContainerDeploymentState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
AddonJson pulumi.StringPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
Arguments pulumi.StringArrayInput
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
Commands pulumi.StringArrayInput
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
Image pulumi.StringPtrInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// Specifies the language framework of the container image. The only possible value is `springboot`.
LanguageFramework pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudContainerDeploymentQuotaPtrInput
// The name of the registry that contains the container image.
Server pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
SpringCloudAppId pulumi.StringPtrInput
}
func (SpringCloudContainerDeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudContainerDeploymentState)(nil)).Elem()
}
type springCloudContainerDeploymentArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
AddonJson *string `pulumi:"addonJson"`
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds []string `pulumi:"applicationPerformanceMonitoringIds"`
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
Arguments []string `pulumi:"arguments"`
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
Commands []string `pulumi:"commands"`
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
Image string `pulumi:"image"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// Specifies the language framework of the container image. The only possible value is `springboot`.
LanguageFramework *string `pulumi:"languageFramework"`
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudContainerDeploymentQuota `pulumi:"quota"`
// The name of the registry that contains the container image.
Server string `pulumi:"server"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
}
// The set of arguments for constructing a SpringCloudContainerDeployment resource.
type SpringCloudContainerDeploymentArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
AddonJson pulumi.StringPtrInput
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
ApplicationPerformanceMonitoringIds pulumi.StringArrayInput
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
Arguments pulumi.StringArrayInput
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
Commands pulumi.StringArrayInput
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
Image pulumi.StringInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// Specifies the language framework of the container image. The only possible value is `springboot`.
LanguageFramework pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudContainerDeploymentQuotaPtrInput
// The name of the registry that contains the container image.
Server pulumi.StringInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
SpringCloudAppId pulumi.StringInput
}
func (SpringCloudContainerDeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudContainerDeploymentArgs)(nil)).Elem()
}
type SpringCloudContainerDeploymentInput interface {
pulumi.Input
ToSpringCloudContainerDeploymentOutput() SpringCloudContainerDeploymentOutput
ToSpringCloudContainerDeploymentOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentOutput
}
func (*SpringCloudContainerDeployment) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudContainerDeployment)(nil)).Elem()
}
func (i *SpringCloudContainerDeployment) ToSpringCloudContainerDeploymentOutput() SpringCloudContainerDeploymentOutput {
return i.ToSpringCloudContainerDeploymentOutputWithContext(context.Background())
}
func (i *SpringCloudContainerDeployment) ToSpringCloudContainerDeploymentOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudContainerDeploymentOutput)
}
// SpringCloudContainerDeploymentArrayInput is an input type that accepts SpringCloudContainerDeploymentArray and SpringCloudContainerDeploymentArrayOutput values.
// You can construct a concrete instance of `SpringCloudContainerDeploymentArrayInput` via:
//
// SpringCloudContainerDeploymentArray{ SpringCloudContainerDeploymentArgs{...} }
type SpringCloudContainerDeploymentArrayInput interface {
pulumi.Input
ToSpringCloudContainerDeploymentArrayOutput() SpringCloudContainerDeploymentArrayOutput
ToSpringCloudContainerDeploymentArrayOutputWithContext(context.Context) SpringCloudContainerDeploymentArrayOutput
}
type SpringCloudContainerDeploymentArray []SpringCloudContainerDeploymentInput
func (SpringCloudContainerDeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudContainerDeployment)(nil)).Elem()
}
func (i SpringCloudContainerDeploymentArray) ToSpringCloudContainerDeploymentArrayOutput() SpringCloudContainerDeploymentArrayOutput {
return i.ToSpringCloudContainerDeploymentArrayOutputWithContext(context.Background())
}
func (i SpringCloudContainerDeploymentArray) ToSpringCloudContainerDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudContainerDeploymentArrayOutput)
}
// SpringCloudContainerDeploymentMapInput is an input type that accepts SpringCloudContainerDeploymentMap and SpringCloudContainerDeploymentMapOutput values.
// You can construct a concrete instance of `SpringCloudContainerDeploymentMapInput` via:
//
// SpringCloudContainerDeploymentMap{ "key": SpringCloudContainerDeploymentArgs{...} }
type SpringCloudContainerDeploymentMapInput interface {
pulumi.Input
ToSpringCloudContainerDeploymentMapOutput() SpringCloudContainerDeploymentMapOutput
ToSpringCloudContainerDeploymentMapOutputWithContext(context.Context) SpringCloudContainerDeploymentMapOutput
}
type SpringCloudContainerDeploymentMap map[string]SpringCloudContainerDeploymentInput
func (SpringCloudContainerDeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudContainerDeployment)(nil)).Elem()
}
func (i SpringCloudContainerDeploymentMap) ToSpringCloudContainerDeploymentMapOutput() SpringCloudContainerDeploymentMapOutput {
return i.ToSpringCloudContainerDeploymentMapOutputWithContext(context.Background())
}
func (i SpringCloudContainerDeploymentMap) ToSpringCloudContainerDeploymentMapOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudContainerDeploymentMapOutput)
}
type SpringCloudContainerDeploymentOutput struct{ *pulumi.OutputState }
func (SpringCloudContainerDeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudContainerDeployment)(nil)).Elem()
}
func (o SpringCloudContainerDeploymentOutput) ToSpringCloudContainerDeploymentOutput() SpringCloudContainerDeploymentOutput {
return o
}
func (o SpringCloudContainerDeploymentOutput) ToSpringCloudContainerDeploymentOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentOutput {
return o
}
// A JSON object that contains the addon configurations of the Spring Cloud Container Deployment.
func (o SpringCloudContainerDeploymentOutput) AddonJson() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringOutput { return v.AddonJson }).(pulumi.StringOutput)
}
// Specifies a list of Spring Cloud Application Performance Monitoring IDs.
func (o SpringCloudContainerDeploymentOutput) ApplicationPerformanceMonitoringIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringArrayOutput {
return v.ApplicationPerformanceMonitoringIds
}).(pulumi.StringArrayOutput)
}
// Specifies the arguments to the entrypoint. The docker image's `CMD` is used if not specified.
func (o SpringCloudContainerDeploymentOutput) Arguments() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringArrayOutput { return v.Arguments }).(pulumi.StringArrayOutput)
}
// Specifies the entrypoint array. It will not be executed within a shell. The docker image's `ENTRYPOINT` is used if not specified.
func (o SpringCloudContainerDeploymentOutput) Commands() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringArrayOutput { return v.Commands }).(pulumi.StringArrayOutput)
}
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
func (o SpringCloudContainerDeploymentOutput) EnvironmentVariables() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringMapOutput { return v.EnvironmentVariables }).(pulumi.StringMapOutput)
}
// Container image of the custom container. This should be in the form of `<repository>:<tag>` without the server name of the registry.
func (o SpringCloudContainerDeploymentOutput) Image() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringOutput { return v.Image }).(pulumi.StringOutput)
}
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
func (o SpringCloudContainerDeploymentOutput) InstanceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.IntPtrOutput { return v.InstanceCount }).(pulumi.IntPtrOutput)
}
// Specifies the language framework of the container image. The only possible value is `springboot`.
func (o SpringCloudContainerDeploymentOutput) LanguageFramework() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringPtrOutput { return v.LanguageFramework }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Spring Cloud Container Deployment. Changing this forces a new Spring Cloud Container Deployment to be created.
func (o SpringCloudContainerDeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `quota` block as defined below.
func (o SpringCloudContainerDeploymentOutput) Quota() SpringCloudContainerDeploymentQuotaOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) SpringCloudContainerDeploymentQuotaOutput { return v.Quota }).(SpringCloudContainerDeploymentQuotaOutput)
}
// The name of the registry that contains the container image.
func (o SpringCloudContainerDeploymentOutput) Server() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringOutput { return v.Server }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Container Deployment to be created.
func (o SpringCloudContainerDeploymentOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudContainerDeployment) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
type SpringCloudContainerDeploymentArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudContainerDeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudContainerDeployment)(nil)).Elem()
}
func (o SpringCloudContainerDeploymentArrayOutput) ToSpringCloudContainerDeploymentArrayOutput() SpringCloudContainerDeploymentArrayOutput {
return o
}
func (o SpringCloudContainerDeploymentArrayOutput) ToSpringCloudContainerDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentArrayOutput {
return o
}
func (o SpringCloudContainerDeploymentArrayOutput) Index(i pulumi.IntInput) SpringCloudContainerDeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudContainerDeployment {
return vs[0].([]*SpringCloudContainerDeployment)[vs[1].(int)]
}).(SpringCloudContainerDeploymentOutput)
}
type SpringCloudContainerDeploymentMapOutput struct{ *pulumi.OutputState }
func (SpringCloudContainerDeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudContainerDeployment)(nil)).Elem()
}
func (o SpringCloudContainerDeploymentMapOutput) ToSpringCloudContainerDeploymentMapOutput() SpringCloudContainerDeploymentMapOutput {
return o
}
func (o SpringCloudContainerDeploymentMapOutput) ToSpringCloudContainerDeploymentMapOutputWithContext(ctx context.Context) SpringCloudContainerDeploymentMapOutput {
return o
}
func (o SpringCloudContainerDeploymentMapOutput) MapIndex(k pulumi.StringInput) SpringCloudContainerDeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudContainerDeployment {
return vs[0].(map[string]*SpringCloudContainerDeployment)[vs[1].(string)]
}).(SpringCloudContainerDeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudContainerDeploymentInput)(nil)).Elem(), &SpringCloudContainerDeployment{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudContainerDeploymentArrayInput)(nil)).Elem(), SpringCloudContainerDeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudContainerDeploymentMapInput)(nil)).Elem(), SpringCloudContainerDeploymentMap{})
pulumi.RegisterOutputType(SpringCloudContainerDeploymentOutput{})
pulumi.RegisterOutputType(SpringCloudContainerDeploymentArrayOutput{})
pulumi.RegisterOutputType(SpringCloudContainerDeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudDevToolPortal.go | sdk/go/azure/appplatform/springCloudDevToolPortal.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// Manages a Spring Cloud Dev Tool Portal.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudDevToolPortal` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudDevToolPortal(ctx, "example", &appplatform.SpringCloudDevToolPortalArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// PublicNetworkAccessEnabled: pulumi.Bool(true),
// Sso: &appplatform.SpringCloudDevToolPortalSsoArgs{
// ClientId: pulumi.String("example id"),
// ClientSecret: pulumi.String("example secret"),
// MetadataUrl: pulumi.Sprintf("https://login.microsoftonline.com/%v/v2.0/.well-known/openid-configuration", current.TenantId),
// Scopes: pulumi.StringArray{
// pulumi.String("openid"),
// pulumi.String("profile"),
// pulumi.String("email"),
// },
// },
// ApplicationAcceleratorEnabled: pulumi.Bool(true),
// ApplicationLiveViewEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Dev Tool Portals can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudDevToolPortal:SpringCloudDevToolPortal example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/Spring/service1/DevToolPortals/default
// ```
type SpringCloudDevToolPortal struct {
pulumi.CustomResourceState
// Should the Accelerator plugin be enabled?
ApplicationAcceleratorEnabled pulumi.BoolOutput `pulumi:"applicationAcceleratorEnabled"`
// Should the Application Live View be enabled?
ApplicationLiveViewEnabled pulumi.BoolOutput `pulumi:"applicationLiveViewEnabled"`
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Is public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso SpringCloudDevToolPortalSsoPtrOutput `pulumi:"sso"`
}
// NewSpringCloudDevToolPortal registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudDevToolPortal(ctx *pulumi.Context,
name string, args *SpringCloudDevToolPortalArgs, opts ...pulumi.ResourceOption) (*SpringCloudDevToolPortal, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudDevToolPortal
err := ctx.RegisterResource("azure:appplatform/springCloudDevToolPortal:SpringCloudDevToolPortal", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudDevToolPortal gets an existing SpringCloudDevToolPortal resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudDevToolPortal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudDevToolPortalState, opts ...pulumi.ResourceOption) (*SpringCloudDevToolPortal, error) {
var resource SpringCloudDevToolPortal
err := ctx.ReadResource("azure:appplatform/springCloudDevToolPortal:SpringCloudDevToolPortal", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudDevToolPortal resources.
type springCloudDevToolPortalState struct {
// Should the Accelerator plugin be enabled?
ApplicationAcceleratorEnabled *bool `pulumi:"applicationAcceleratorEnabled"`
// Should the Application Live View be enabled?
ApplicationLiveViewEnabled *bool `pulumi:"applicationLiveViewEnabled"`
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
Name *string `pulumi:"name"`
// Is public network access enabled?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudDevToolPortalSso `pulumi:"sso"`
}
type SpringCloudDevToolPortalState struct {
// Should the Accelerator plugin be enabled?
ApplicationAcceleratorEnabled pulumi.BoolPtrInput
// Should the Application Live View be enabled?
ApplicationLiveViewEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
Name pulumi.StringPtrInput
// Is public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
SpringCloudServiceId pulumi.StringPtrInput
// A `sso` block as defined below.
Sso SpringCloudDevToolPortalSsoPtrInput
}
func (SpringCloudDevToolPortalState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudDevToolPortalState)(nil)).Elem()
}
type springCloudDevToolPortalArgs struct {
// Should the Accelerator plugin be enabled?
ApplicationAcceleratorEnabled *bool `pulumi:"applicationAcceleratorEnabled"`
// Should the Application Live View be enabled?
ApplicationLiveViewEnabled *bool `pulumi:"applicationLiveViewEnabled"`
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
Name *string `pulumi:"name"`
// Is public network access enabled?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudDevToolPortalSso `pulumi:"sso"`
}
// The set of arguments for constructing a SpringCloudDevToolPortal resource.
type SpringCloudDevToolPortalArgs struct {
// Should the Accelerator plugin be enabled?
ApplicationAcceleratorEnabled pulumi.BoolPtrInput
// Should the Application Live View be enabled?
ApplicationLiveViewEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
Name pulumi.StringPtrInput
// Is public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
SpringCloudServiceId pulumi.StringInput
// A `sso` block as defined below.
Sso SpringCloudDevToolPortalSsoPtrInput
}
func (SpringCloudDevToolPortalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudDevToolPortalArgs)(nil)).Elem()
}
type SpringCloudDevToolPortalInput interface {
pulumi.Input
ToSpringCloudDevToolPortalOutput() SpringCloudDevToolPortalOutput
ToSpringCloudDevToolPortalOutputWithContext(ctx context.Context) SpringCloudDevToolPortalOutput
}
func (*SpringCloudDevToolPortal) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudDevToolPortal)(nil)).Elem()
}
func (i *SpringCloudDevToolPortal) ToSpringCloudDevToolPortalOutput() SpringCloudDevToolPortalOutput {
return i.ToSpringCloudDevToolPortalOutputWithContext(context.Background())
}
func (i *SpringCloudDevToolPortal) ToSpringCloudDevToolPortalOutputWithContext(ctx context.Context) SpringCloudDevToolPortalOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDevToolPortalOutput)
}
// SpringCloudDevToolPortalArrayInput is an input type that accepts SpringCloudDevToolPortalArray and SpringCloudDevToolPortalArrayOutput values.
// You can construct a concrete instance of `SpringCloudDevToolPortalArrayInput` via:
//
// SpringCloudDevToolPortalArray{ SpringCloudDevToolPortalArgs{...} }
type SpringCloudDevToolPortalArrayInput interface {
pulumi.Input
ToSpringCloudDevToolPortalArrayOutput() SpringCloudDevToolPortalArrayOutput
ToSpringCloudDevToolPortalArrayOutputWithContext(context.Context) SpringCloudDevToolPortalArrayOutput
}
type SpringCloudDevToolPortalArray []SpringCloudDevToolPortalInput
func (SpringCloudDevToolPortalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudDevToolPortal)(nil)).Elem()
}
func (i SpringCloudDevToolPortalArray) ToSpringCloudDevToolPortalArrayOutput() SpringCloudDevToolPortalArrayOutput {
return i.ToSpringCloudDevToolPortalArrayOutputWithContext(context.Background())
}
func (i SpringCloudDevToolPortalArray) ToSpringCloudDevToolPortalArrayOutputWithContext(ctx context.Context) SpringCloudDevToolPortalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDevToolPortalArrayOutput)
}
// SpringCloudDevToolPortalMapInput is an input type that accepts SpringCloudDevToolPortalMap and SpringCloudDevToolPortalMapOutput values.
// You can construct a concrete instance of `SpringCloudDevToolPortalMapInput` via:
//
// SpringCloudDevToolPortalMap{ "key": SpringCloudDevToolPortalArgs{...} }
type SpringCloudDevToolPortalMapInput interface {
pulumi.Input
ToSpringCloudDevToolPortalMapOutput() SpringCloudDevToolPortalMapOutput
ToSpringCloudDevToolPortalMapOutputWithContext(context.Context) SpringCloudDevToolPortalMapOutput
}
type SpringCloudDevToolPortalMap map[string]SpringCloudDevToolPortalInput
func (SpringCloudDevToolPortalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudDevToolPortal)(nil)).Elem()
}
func (i SpringCloudDevToolPortalMap) ToSpringCloudDevToolPortalMapOutput() SpringCloudDevToolPortalMapOutput {
return i.ToSpringCloudDevToolPortalMapOutputWithContext(context.Background())
}
func (i SpringCloudDevToolPortalMap) ToSpringCloudDevToolPortalMapOutputWithContext(ctx context.Context) SpringCloudDevToolPortalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDevToolPortalMapOutput)
}
type SpringCloudDevToolPortalOutput struct{ *pulumi.OutputState }
func (SpringCloudDevToolPortalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudDevToolPortal)(nil)).Elem()
}
func (o SpringCloudDevToolPortalOutput) ToSpringCloudDevToolPortalOutput() SpringCloudDevToolPortalOutput {
return o
}
func (o SpringCloudDevToolPortalOutput) ToSpringCloudDevToolPortalOutputWithContext(ctx context.Context) SpringCloudDevToolPortalOutput {
return o
}
// Should the Accelerator plugin be enabled?
func (o SpringCloudDevToolPortalOutput) ApplicationAcceleratorEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) pulumi.BoolOutput { return v.ApplicationAcceleratorEnabled }).(pulumi.BoolOutput)
}
// Should the Application Live View be enabled?
func (o SpringCloudDevToolPortalOutput) ApplicationLiveViewEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) pulumi.BoolOutput { return v.ApplicationLiveViewEnabled }).(pulumi.BoolOutput)
}
// The name which should be used for this Spring Cloud Dev Tool Portal. The only possible value is `default`. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
func (o SpringCloudDevToolPortalOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Is public network access enabled?
func (o SpringCloudDevToolPortalOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Dev Tool Portal to be created.
func (o SpringCloudDevToolPortalOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
// A `sso` block as defined below.
func (o SpringCloudDevToolPortalOutput) Sso() SpringCloudDevToolPortalSsoPtrOutput {
return o.ApplyT(func(v *SpringCloudDevToolPortal) SpringCloudDevToolPortalSsoPtrOutput { return v.Sso }).(SpringCloudDevToolPortalSsoPtrOutput)
}
type SpringCloudDevToolPortalArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudDevToolPortalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudDevToolPortal)(nil)).Elem()
}
func (o SpringCloudDevToolPortalArrayOutput) ToSpringCloudDevToolPortalArrayOutput() SpringCloudDevToolPortalArrayOutput {
return o
}
func (o SpringCloudDevToolPortalArrayOutput) ToSpringCloudDevToolPortalArrayOutputWithContext(ctx context.Context) SpringCloudDevToolPortalArrayOutput {
return o
}
func (o SpringCloudDevToolPortalArrayOutput) Index(i pulumi.IntInput) SpringCloudDevToolPortalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudDevToolPortal {
return vs[0].([]*SpringCloudDevToolPortal)[vs[1].(int)]
}).(SpringCloudDevToolPortalOutput)
}
type SpringCloudDevToolPortalMapOutput struct{ *pulumi.OutputState }
func (SpringCloudDevToolPortalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudDevToolPortal)(nil)).Elem()
}
func (o SpringCloudDevToolPortalMapOutput) ToSpringCloudDevToolPortalMapOutput() SpringCloudDevToolPortalMapOutput {
return o
}
func (o SpringCloudDevToolPortalMapOutput) ToSpringCloudDevToolPortalMapOutputWithContext(ctx context.Context) SpringCloudDevToolPortalMapOutput {
return o
}
func (o SpringCloudDevToolPortalMapOutput) MapIndex(k pulumi.StringInput) SpringCloudDevToolPortalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudDevToolPortal {
return vs[0].(map[string]*SpringCloudDevToolPortal)[vs[1].(string)]
}).(SpringCloudDevToolPortalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDevToolPortalInput)(nil)).Elem(), &SpringCloudDevToolPortal{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDevToolPortalArrayInput)(nil)).Elem(), SpringCloudDevToolPortalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDevToolPortalMapInput)(nil)).Elem(), SpringCloudDevToolPortalMap{})
pulumi.RegisterOutputType(SpringCloudDevToolPortalOutput{})
pulumi.RegisterOutputType(SpringCloudDevToolPortalArrayOutput{})
pulumi.RegisterOutputType(SpringCloudDevToolPortalMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudCustomizedAccelerator.go | sdk/go/azure/appplatform/springCloudCustomizedAccelerator.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Customized Accelerator.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudCustomizedAccelerator` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("west europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudAccelerator, err := appplatform.NewSpringCloudAccelerator(ctx, "example", &appplatform.SpringCloudAcceleratorArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudCustomizedAccelerator(ctx, "example", &appplatform.SpringCloudCustomizedAcceleratorArgs{
// Name: pulumi.String("example"),
// SpringCloudAcceleratorId: exampleSpringCloudAccelerator.ID(),
// GitRepository: &appplatform.SpringCloudCustomizedAcceleratorGitRepositoryArgs{
// Url: pulumi.String("https://github.com/Azure-Samples/piggymetrics"),
// GitTag: pulumi.String("spring.version.2.0.3"),
// IntervalInSeconds: pulumi.Int(100),
// },
// AcceleratorTags: pulumi.StringArray{
// pulumi.String("tag-a"),
// pulumi.String("tag-b"),
// },
// Description: pulumi.String("example description"),
// DisplayName: pulumi.String("example name"),
// IconUrl: pulumi.String("https://images.freecreatives.com/wp-content/uploads/2015/05/smiley-559124_640.jpg"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Customized Accelerators can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudCustomizedAccelerator:SpringCloudCustomizedAccelerator example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/applicationAccelerators/default/customizedAccelerators/customizedAccelerator1
// ```
type SpringCloudCustomizedAccelerator struct {
pulumi.CustomResourceState
// Specifies a list of accelerator tags.
AcceleratorTags pulumi.StringArrayOutput `pulumi:"acceleratorTags"`
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
AcceleratorType pulumi.StringPtrOutput `pulumi:"acceleratorType"`
// Specifies the description of the Spring Cloud Customized Accelerator.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the display name of the Spring Cloud Customized Accelerator..
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// A `gitRepository` block as defined below.
GitRepository SpringCloudCustomizedAcceleratorGitRepositoryOutput `pulumi:"gitRepository"`
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
IconUrl pulumi.StringPtrOutput `pulumi:"iconUrl"`
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
SpringCloudAcceleratorId pulumi.StringOutput `pulumi:"springCloudAcceleratorId"`
}
// NewSpringCloudCustomizedAccelerator registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudCustomizedAccelerator(ctx *pulumi.Context,
name string, args *SpringCloudCustomizedAcceleratorArgs, opts ...pulumi.ResourceOption) (*SpringCloudCustomizedAccelerator, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.GitRepository == nil {
return nil, errors.New("invalid value for required argument 'GitRepository'")
}
if args.SpringCloudAcceleratorId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAcceleratorId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudCustomizedAccelerator
err := ctx.RegisterResource("azure:appplatform/springCloudCustomizedAccelerator:SpringCloudCustomizedAccelerator", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudCustomizedAccelerator gets an existing SpringCloudCustomizedAccelerator resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudCustomizedAccelerator(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudCustomizedAcceleratorState, opts ...pulumi.ResourceOption) (*SpringCloudCustomizedAccelerator, error) {
var resource SpringCloudCustomizedAccelerator
err := ctx.ReadResource("azure:appplatform/springCloudCustomizedAccelerator:SpringCloudCustomizedAccelerator", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudCustomizedAccelerator resources.
type springCloudCustomizedAcceleratorState struct {
// Specifies a list of accelerator tags.
AcceleratorTags []string `pulumi:"acceleratorTags"`
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
AcceleratorType *string `pulumi:"acceleratorType"`
// Specifies the description of the Spring Cloud Customized Accelerator.
Description *string `pulumi:"description"`
// Specifies the display name of the Spring Cloud Customized Accelerator..
DisplayName *string `pulumi:"displayName"`
// A `gitRepository` block as defined below.
GitRepository *SpringCloudCustomizedAcceleratorGitRepository `pulumi:"gitRepository"`
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
IconUrl *string `pulumi:"iconUrl"`
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
SpringCloudAcceleratorId *string `pulumi:"springCloudAcceleratorId"`
}
type SpringCloudCustomizedAcceleratorState struct {
// Specifies a list of accelerator tags.
AcceleratorTags pulumi.StringArrayInput
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
AcceleratorType pulumi.StringPtrInput
// Specifies the description of the Spring Cloud Customized Accelerator.
Description pulumi.StringPtrInput
// Specifies the display name of the Spring Cloud Customized Accelerator..
DisplayName pulumi.StringPtrInput
// A `gitRepository` block as defined below.
GitRepository SpringCloudCustomizedAcceleratorGitRepositoryPtrInput
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
IconUrl pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
SpringCloudAcceleratorId pulumi.StringPtrInput
}
func (SpringCloudCustomizedAcceleratorState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCustomizedAcceleratorState)(nil)).Elem()
}
type springCloudCustomizedAcceleratorArgs struct {
// Specifies a list of accelerator tags.
AcceleratorTags []string `pulumi:"acceleratorTags"`
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
AcceleratorType *string `pulumi:"acceleratorType"`
// Specifies the description of the Spring Cloud Customized Accelerator.
Description *string `pulumi:"description"`
// Specifies the display name of the Spring Cloud Customized Accelerator..
DisplayName *string `pulumi:"displayName"`
// A `gitRepository` block as defined below.
GitRepository SpringCloudCustomizedAcceleratorGitRepository `pulumi:"gitRepository"`
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
IconUrl *string `pulumi:"iconUrl"`
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
SpringCloudAcceleratorId string `pulumi:"springCloudAcceleratorId"`
}
// The set of arguments for constructing a SpringCloudCustomizedAccelerator resource.
type SpringCloudCustomizedAcceleratorArgs struct {
// Specifies a list of accelerator tags.
AcceleratorTags pulumi.StringArrayInput
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
AcceleratorType pulumi.StringPtrInput
// Specifies the description of the Spring Cloud Customized Accelerator.
Description pulumi.StringPtrInput
// Specifies the display name of the Spring Cloud Customized Accelerator..
DisplayName pulumi.StringPtrInput
// A `gitRepository` block as defined below.
GitRepository SpringCloudCustomizedAcceleratorGitRepositoryInput
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
IconUrl pulumi.StringPtrInput
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
SpringCloudAcceleratorId pulumi.StringInput
}
func (SpringCloudCustomizedAcceleratorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudCustomizedAcceleratorArgs)(nil)).Elem()
}
type SpringCloudCustomizedAcceleratorInput interface {
pulumi.Input
ToSpringCloudCustomizedAcceleratorOutput() SpringCloudCustomizedAcceleratorOutput
ToSpringCloudCustomizedAcceleratorOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorOutput
}
func (*SpringCloudCustomizedAccelerator) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (i *SpringCloudCustomizedAccelerator) ToSpringCloudCustomizedAcceleratorOutput() SpringCloudCustomizedAcceleratorOutput {
return i.ToSpringCloudCustomizedAcceleratorOutputWithContext(context.Background())
}
func (i *SpringCloudCustomizedAccelerator) ToSpringCloudCustomizedAcceleratorOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomizedAcceleratorOutput)
}
// SpringCloudCustomizedAcceleratorArrayInput is an input type that accepts SpringCloudCustomizedAcceleratorArray and SpringCloudCustomizedAcceleratorArrayOutput values.
// You can construct a concrete instance of `SpringCloudCustomizedAcceleratorArrayInput` via:
//
// SpringCloudCustomizedAcceleratorArray{ SpringCloudCustomizedAcceleratorArgs{...} }
type SpringCloudCustomizedAcceleratorArrayInput interface {
pulumi.Input
ToSpringCloudCustomizedAcceleratorArrayOutput() SpringCloudCustomizedAcceleratorArrayOutput
ToSpringCloudCustomizedAcceleratorArrayOutputWithContext(context.Context) SpringCloudCustomizedAcceleratorArrayOutput
}
type SpringCloudCustomizedAcceleratorArray []SpringCloudCustomizedAcceleratorInput
func (SpringCloudCustomizedAcceleratorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (i SpringCloudCustomizedAcceleratorArray) ToSpringCloudCustomizedAcceleratorArrayOutput() SpringCloudCustomizedAcceleratorArrayOutput {
return i.ToSpringCloudCustomizedAcceleratorArrayOutputWithContext(context.Background())
}
func (i SpringCloudCustomizedAcceleratorArray) ToSpringCloudCustomizedAcceleratorArrayOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomizedAcceleratorArrayOutput)
}
// SpringCloudCustomizedAcceleratorMapInput is an input type that accepts SpringCloudCustomizedAcceleratorMap and SpringCloudCustomizedAcceleratorMapOutput values.
// You can construct a concrete instance of `SpringCloudCustomizedAcceleratorMapInput` via:
//
// SpringCloudCustomizedAcceleratorMap{ "key": SpringCloudCustomizedAcceleratorArgs{...} }
type SpringCloudCustomizedAcceleratorMapInput interface {
pulumi.Input
ToSpringCloudCustomizedAcceleratorMapOutput() SpringCloudCustomizedAcceleratorMapOutput
ToSpringCloudCustomizedAcceleratorMapOutputWithContext(context.Context) SpringCloudCustomizedAcceleratorMapOutput
}
type SpringCloudCustomizedAcceleratorMap map[string]SpringCloudCustomizedAcceleratorInput
func (SpringCloudCustomizedAcceleratorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (i SpringCloudCustomizedAcceleratorMap) ToSpringCloudCustomizedAcceleratorMapOutput() SpringCloudCustomizedAcceleratorMapOutput {
return i.ToSpringCloudCustomizedAcceleratorMapOutputWithContext(context.Background())
}
func (i SpringCloudCustomizedAcceleratorMap) ToSpringCloudCustomizedAcceleratorMapOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudCustomizedAcceleratorMapOutput)
}
type SpringCloudCustomizedAcceleratorOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomizedAcceleratorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (o SpringCloudCustomizedAcceleratorOutput) ToSpringCloudCustomizedAcceleratorOutput() SpringCloudCustomizedAcceleratorOutput {
return o
}
func (o SpringCloudCustomizedAcceleratorOutput) ToSpringCloudCustomizedAcceleratorOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorOutput {
return o
}
// Specifies a list of accelerator tags.
func (o SpringCloudCustomizedAcceleratorOutput) AcceleratorTags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringArrayOutput { return v.AcceleratorTags }).(pulumi.StringArrayOutput)
}
// Specifies the type of the Spring Cloud Customized Accelerator. Possible values are `Accelerator` and `Fragment`. Defaults to `Accelerator`.
func (o SpringCloudCustomizedAcceleratorOutput) AcceleratorType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringPtrOutput { return v.AcceleratorType }).(pulumi.StringPtrOutput)
}
// Specifies the description of the Spring Cloud Customized Accelerator.
func (o SpringCloudCustomizedAcceleratorOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the display name of the Spring Cloud Customized Accelerator..
func (o SpringCloudCustomizedAcceleratorOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// A `gitRepository` block as defined below.
func (o SpringCloudCustomizedAcceleratorOutput) GitRepository() SpringCloudCustomizedAcceleratorGitRepositoryOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) SpringCloudCustomizedAcceleratorGitRepositoryOutput {
return v.GitRepository
}).(SpringCloudCustomizedAcceleratorGitRepositoryOutput)
}
// Specifies the icon URL of the Spring Cloud Customized Accelerator..
func (o SpringCloudCustomizedAcceleratorOutput) IconUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringPtrOutput { return v.IconUrl }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Spring Cloud Customized Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
func (o SpringCloudCustomizedAcceleratorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Accelerator. Changing this forces a new Spring Cloud Customized Accelerator to be created.
func (o SpringCloudCustomizedAcceleratorOutput) SpringCloudAcceleratorId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudCustomizedAccelerator) pulumi.StringOutput { return v.SpringCloudAcceleratorId }).(pulumi.StringOutput)
}
type SpringCloudCustomizedAcceleratorArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomizedAcceleratorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (o SpringCloudCustomizedAcceleratorArrayOutput) ToSpringCloudCustomizedAcceleratorArrayOutput() SpringCloudCustomizedAcceleratorArrayOutput {
return o
}
func (o SpringCloudCustomizedAcceleratorArrayOutput) ToSpringCloudCustomizedAcceleratorArrayOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorArrayOutput {
return o
}
func (o SpringCloudCustomizedAcceleratorArrayOutput) Index(i pulumi.IntInput) SpringCloudCustomizedAcceleratorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudCustomizedAccelerator {
return vs[0].([]*SpringCloudCustomizedAccelerator)[vs[1].(int)]
}).(SpringCloudCustomizedAcceleratorOutput)
}
type SpringCloudCustomizedAcceleratorMapOutput struct{ *pulumi.OutputState }
func (SpringCloudCustomizedAcceleratorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudCustomizedAccelerator)(nil)).Elem()
}
func (o SpringCloudCustomizedAcceleratorMapOutput) ToSpringCloudCustomizedAcceleratorMapOutput() SpringCloudCustomizedAcceleratorMapOutput {
return o
}
func (o SpringCloudCustomizedAcceleratorMapOutput) ToSpringCloudCustomizedAcceleratorMapOutputWithContext(ctx context.Context) SpringCloudCustomizedAcceleratorMapOutput {
return o
}
func (o SpringCloudCustomizedAcceleratorMapOutput) MapIndex(k pulumi.StringInput) SpringCloudCustomizedAcceleratorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudCustomizedAccelerator {
return vs[0].(map[string]*SpringCloudCustomizedAccelerator)[vs[1].(string)]
}).(SpringCloudCustomizedAcceleratorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomizedAcceleratorInput)(nil)).Elem(), &SpringCloudCustomizedAccelerator{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomizedAcceleratorArrayInput)(nil)).Elem(), SpringCloudCustomizedAcceleratorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudCustomizedAcceleratorMapInput)(nil)).Elem(), SpringCloudCustomizedAcceleratorMap{})
pulumi.RegisterOutputType(SpringCloudCustomizedAcceleratorOutput{})
pulumi.RegisterOutputType(SpringCloudCustomizedAcceleratorArrayOutput{})
pulumi.RegisterOutputType(SpringCloudCustomizedAcceleratorMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring.go | sdk/go/azure/appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is only applicable for Spring Cloud Service enterprise tier
//
// Manages a Spring Cloud Application Performance Monitoring resource for Application Insights.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApplicationInsightsApplicationPerformanceMonitoring` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudApplicationInsightsApplicationPerformanceMonitoring(ctx, "example", &appplatform.SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// ConnectionString: exampleInsights.InstrumentationKey,
// GloballyEnabled: pulumi.Bool(true),
// RoleName: pulumi.String("test-role"),
// RoleInstance: pulumi.String("test-instance"),
// SamplingPercentage: pulumi.Int(50),
// SamplingRequestsPerSecond: pulumi.Int(10),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Application Performance Monitoring resource for Application Insights can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring:SpringCloudApplicationInsightsApplicationPerformanceMonitoring example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AppPlatform/spring/service1/apms/apm1
// ```
type SpringCloudApplicationInsightsApplicationPerformanceMonitoring struct {
pulumi.CustomResourceState
// The instrumentation key used to push data to Application Insights.
ConnectionString pulumi.StringPtrOutput `pulumi:"connectionString"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrOutput `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the cloud role instance.
RoleInstance pulumi.StringPtrOutput `pulumi:"roleInstance"`
// Specifies the cloud role name used to label the component on the application map.
RoleName pulumi.StringPtrOutput `pulumi:"roleName"`
// Specifies the percentage for fixed-percentage sampling.
SamplingPercentage pulumi.IntPtrOutput `pulumi:"samplingPercentage"`
// Specifies the number of requests per second for the rate-limited sampling.
SamplingRequestsPerSecond pulumi.IntPtrOutput `pulumi:"samplingRequestsPerSecond"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudApplicationInsightsApplicationPerformanceMonitoring registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudApplicationInsightsApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, args *SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs, opts ...pulumi.ResourceOption) (*SpringCloudApplicationInsightsApplicationPerformanceMonitoring, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudApplicationInsightsApplicationPerformanceMonitoring
err := ctx.RegisterResource("azure:appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring:SpringCloudApplicationInsightsApplicationPerformanceMonitoring", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudApplicationInsightsApplicationPerformanceMonitoring gets an existing SpringCloudApplicationInsightsApplicationPerformanceMonitoring resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudApplicationInsightsApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudApplicationInsightsApplicationPerformanceMonitoringState, opts ...pulumi.ResourceOption) (*SpringCloudApplicationInsightsApplicationPerformanceMonitoring, error) {
var resource SpringCloudApplicationInsightsApplicationPerformanceMonitoring
err := ctx.ReadResource("azure:appplatform/springCloudApplicationInsightsApplicationPerformanceMonitoring:SpringCloudApplicationInsightsApplicationPerformanceMonitoring", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudApplicationInsightsApplicationPerformanceMonitoring resources.
type springCloudApplicationInsightsApplicationPerformanceMonitoringState struct {
// The instrumentation key used to push data to Application Insights.
ConnectionString *string `pulumi:"connectionString"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the cloud role instance.
RoleInstance *string `pulumi:"roleInstance"`
// Specifies the cloud role name used to label the component on the application map.
RoleName *string `pulumi:"roleName"`
// Specifies the percentage for fixed-percentage sampling.
SamplingPercentage *int `pulumi:"samplingPercentage"`
// Specifies the number of requests per second for the rate-limited sampling.
SamplingRequestsPerSecond *int `pulumi:"samplingRequestsPerSecond"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringState struct {
// The instrumentation key used to push data to Application Insights.
ConnectionString pulumi.StringPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the cloud role instance.
RoleInstance pulumi.StringPtrInput
// Specifies the cloud role name used to label the component on the application map.
RoleName pulumi.StringPtrInput
// Specifies the percentage for fixed-percentage sampling.
SamplingPercentage pulumi.IntPtrInput
// Specifies the number of requests per second for the rate-limited sampling.
SamplingRequestsPerSecond pulumi.IntPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApplicationInsightsApplicationPerformanceMonitoringState)(nil)).Elem()
}
type springCloudApplicationInsightsApplicationPerformanceMonitoringArgs struct {
// The instrumentation key used to push data to Application Insights.
ConnectionString *string `pulumi:"connectionString"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the cloud role instance.
RoleInstance *string `pulumi:"roleInstance"`
// Specifies the cloud role name used to label the component on the application map.
RoleName *string `pulumi:"roleName"`
// Specifies the percentage for fixed-percentage sampling.
SamplingPercentage *int `pulumi:"samplingPercentage"`
// Specifies the number of requests per second for the rate-limited sampling.
SamplingRequestsPerSecond *int `pulumi:"samplingRequestsPerSecond"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudApplicationInsightsApplicationPerformanceMonitoring resource.
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs struct {
// The instrumentation key used to push data to Application Insights.
ConnectionString pulumi.StringPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the cloud role instance.
RoleInstance pulumi.StringPtrInput
// Specifies the cloud role name used to label the component on the application map.
RoleName pulumi.StringPtrInput
// Specifies the percentage for fixed-percentage sampling.
SamplingPercentage pulumi.IntPtrInput
// Specifies the number of requests per second for the rate-limited sampling.
SamplingRequestsPerSecond pulumi.IntPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApplicationInsightsApplicationPerformanceMonitoringArgs)(nil)).Elem()
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringInput interface {
pulumi.Input
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput
}
func (*SpringCloudApplicationInsightsApplicationPerformanceMonitoring) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return i.ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutputWithContext(context.Background())
}
func (i *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput)
}
// SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayInput is an input type that accepts SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray and SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput values.
// You can construct a concrete instance of `SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayInput` via:
//
// SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray{ SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs{...} }
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayInput interface {
pulumi.Input
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutputWithContext(context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray []SpringCloudApplicationInsightsApplicationPerformanceMonitoringInput
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput {
return i.ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutputWithContext(context.Background())
}
func (i SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput)
}
// SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapInput is an input type that accepts SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap and SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput values.
// You can construct a concrete instance of `SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapInput` via:
//
// SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap{ "key": SpringCloudApplicationInsightsApplicationPerformanceMonitoringArgs{...} }
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapInput interface {
pulumi.Input
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput
ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutputWithContext(context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap map[string]SpringCloudApplicationInsightsApplicationPerformanceMonitoringInput
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput {
return i.ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutputWithContext(context.Background())
}
func (i SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput)
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return o
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return o
}
// The instrumentation key used to push data to Application Insights.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) ConnectionString() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.ConnectionString
}).(pulumi.StringPtrOutput)
}
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) GloballyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.GloballyEnabled
}).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Application Insights. Changing this forces a new resource to be created.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.Name
}).(pulumi.StringOutput)
}
// Specifies the cloud role instance.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) RoleInstance() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.RoleInstance
}).(pulumi.StringPtrOutput)
}
// Specifies the cloud role name used to label the component on the application map.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) RoleName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.RoleName
}).(pulumi.StringPtrOutput)
}
// Specifies the percentage for fixed-percentage sampling.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) SamplingPercentage() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.IntPtrOutput {
return v.SamplingPercentage
}).(pulumi.IntPtrOutput)
}
// Specifies the number of requests per second for the rate-limited sampling.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) SamplingRequestsPerSecond() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.IntPtrOutput {
return v.SamplingRequestsPerSecond
}).(pulumi.IntPtrOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApplicationInsightsApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.SpringCloudServiceId
}).(pulumi.StringOutput)
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput) Index(i pulumi.IntInput) SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudApplicationInsightsApplicationPerformanceMonitoring {
return vs[0].([]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)[vs[1].(int)]
}).(SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput)
}
type SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput() SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput) ToSpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput) MapIndex(k pulumi.StringInput) SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudApplicationInsightsApplicationPerformanceMonitoring {
return vs[0].(map[string]*SpringCloudApplicationInsightsApplicationPerformanceMonitoring)[vs[1].(string)]
}).(SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationInsightsApplicationPerformanceMonitoringInput)(nil)).Elem(), &SpringCloudApplicationInsightsApplicationPerformanceMonitoring{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayInput)(nil)).Elem(), SpringCloudApplicationInsightsApplicationPerformanceMonitoringArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapInput)(nil)).Elem(), SpringCloudApplicationInsightsApplicationPerformanceMonitoringMap{})
pulumi.RegisterOutputType(SpringCloudApplicationInsightsApplicationPerformanceMonitoringOutput{})
pulumi.RegisterOutputType(SpringCloudApplicationInsightsApplicationPerformanceMonitoringArrayOutput{})
pulumi.RegisterOutputType(SpringCloudApplicationInsightsApplicationPerformanceMonitoringMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudElasticApplicationPerformanceMonitoring.go | sdk/go/azure/appplatform/springCloudElasticApplicationPerformanceMonitoring.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is only applicable for Spring Cloud Service enterprise tier
//
// Manages a Spring Cloud Application Performance Monitoring resource for Elastic.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudElasticApplicationPerformanceMonitoring` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudElasticApplicationPerformanceMonitoring(ctx, "example", &appplatform.SpringCloudElasticApplicationPerformanceMonitoringArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// GloballyEnabled: pulumi.Bool(true),
// ApplicationPackages: pulumi.StringArray{
// pulumi.String("org.example"),
// pulumi.String("org.another.example"),
// },
// ServiceName: pulumi.String("example-service-name"),
// ServerUrl: pulumi.String("http://127.0.0.1:8200"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Application Performance Monitoring resource for Elastic can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudElasticApplicationPerformanceMonitoring:SpringCloudElasticApplicationPerformanceMonitoring example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AppPlatform/spring/service1/apms/apm1
// ```
type SpringCloudElasticApplicationPerformanceMonitoring struct {
pulumi.CustomResourceState
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
ApplicationPackages pulumi.StringArrayOutput `pulumi:"applicationPackages"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrOutput `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
ServerUrl pulumi.StringOutput `pulumi:"serverUrl"`
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
ServiceName pulumi.StringOutput `pulumi:"serviceName"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudElasticApplicationPerformanceMonitoring registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudElasticApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, args *SpringCloudElasticApplicationPerformanceMonitoringArgs, opts ...pulumi.ResourceOption) (*SpringCloudElasticApplicationPerformanceMonitoring, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationPackages == nil {
return nil, errors.New("invalid value for required argument 'ApplicationPackages'")
}
if args.ServerUrl == nil {
return nil, errors.New("invalid value for required argument 'ServerUrl'")
}
if args.ServiceName == nil {
return nil, errors.New("invalid value for required argument 'ServiceName'")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudElasticApplicationPerformanceMonitoring
err := ctx.RegisterResource("azure:appplatform/springCloudElasticApplicationPerformanceMonitoring:SpringCloudElasticApplicationPerformanceMonitoring", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudElasticApplicationPerformanceMonitoring gets an existing SpringCloudElasticApplicationPerformanceMonitoring resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudElasticApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudElasticApplicationPerformanceMonitoringState, opts ...pulumi.ResourceOption) (*SpringCloudElasticApplicationPerformanceMonitoring, error) {
var resource SpringCloudElasticApplicationPerformanceMonitoring
err := ctx.ReadResource("azure:appplatform/springCloudElasticApplicationPerformanceMonitoring:SpringCloudElasticApplicationPerformanceMonitoring", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudElasticApplicationPerformanceMonitoring resources.
type springCloudElasticApplicationPerformanceMonitoringState struct {
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
ApplicationPackages []string `pulumi:"applicationPackages"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
ServerUrl *string `pulumi:"serverUrl"`
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
ServiceName *string `pulumi:"serviceName"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudElasticApplicationPerformanceMonitoringState struct {
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
ApplicationPackages pulumi.StringArrayInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
ServerUrl pulumi.StringPtrInput
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
ServiceName pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudElasticApplicationPerformanceMonitoringState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudElasticApplicationPerformanceMonitoringState)(nil)).Elem()
}
type springCloudElasticApplicationPerformanceMonitoringArgs struct {
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
ApplicationPackages []string `pulumi:"applicationPackages"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
ServerUrl string `pulumi:"serverUrl"`
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
ServiceName string `pulumi:"serviceName"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudElasticApplicationPerformanceMonitoring resource.
type SpringCloudElasticApplicationPerformanceMonitoringArgs struct {
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
ApplicationPackages pulumi.StringArrayInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
ServerUrl pulumi.StringInput
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
ServiceName pulumi.StringInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudElasticApplicationPerformanceMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudElasticApplicationPerformanceMonitoringArgs)(nil)).Elem()
}
type SpringCloudElasticApplicationPerformanceMonitoringInput interface {
pulumi.Input
ToSpringCloudElasticApplicationPerformanceMonitoringOutput() SpringCloudElasticApplicationPerformanceMonitoringOutput
ToSpringCloudElasticApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringOutput
}
func (*SpringCloudElasticApplicationPerformanceMonitoring) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i *SpringCloudElasticApplicationPerformanceMonitoring) ToSpringCloudElasticApplicationPerformanceMonitoringOutput() SpringCloudElasticApplicationPerformanceMonitoringOutput {
return i.ToSpringCloudElasticApplicationPerformanceMonitoringOutputWithContext(context.Background())
}
func (i *SpringCloudElasticApplicationPerformanceMonitoring) ToSpringCloudElasticApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudElasticApplicationPerformanceMonitoringOutput)
}
// SpringCloudElasticApplicationPerformanceMonitoringArrayInput is an input type that accepts SpringCloudElasticApplicationPerformanceMonitoringArray and SpringCloudElasticApplicationPerformanceMonitoringArrayOutput values.
// You can construct a concrete instance of `SpringCloudElasticApplicationPerformanceMonitoringArrayInput` via:
//
// SpringCloudElasticApplicationPerformanceMonitoringArray{ SpringCloudElasticApplicationPerformanceMonitoringArgs{...} }
type SpringCloudElasticApplicationPerformanceMonitoringArrayInput interface {
pulumi.Input
ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutput() SpringCloudElasticApplicationPerformanceMonitoringArrayOutput
ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutputWithContext(context.Context) SpringCloudElasticApplicationPerformanceMonitoringArrayOutput
}
type SpringCloudElasticApplicationPerformanceMonitoringArray []SpringCloudElasticApplicationPerformanceMonitoringInput
func (SpringCloudElasticApplicationPerformanceMonitoringArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudElasticApplicationPerformanceMonitoringArray) ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutput() SpringCloudElasticApplicationPerformanceMonitoringArrayOutput {
return i.ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutputWithContext(context.Background())
}
func (i SpringCloudElasticApplicationPerformanceMonitoringArray) ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudElasticApplicationPerformanceMonitoringArrayOutput)
}
// SpringCloudElasticApplicationPerformanceMonitoringMapInput is an input type that accepts SpringCloudElasticApplicationPerformanceMonitoringMap and SpringCloudElasticApplicationPerformanceMonitoringMapOutput values.
// You can construct a concrete instance of `SpringCloudElasticApplicationPerformanceMonitoringMapInput` via:
//
// SpringCloudElasticApplicationPerformanceMonitoringMap{ "key": SpringCloudElasticApplicationPerformanceMonitoringArgs{...} }
type SpringCloudElasticApplicationPerformanceMonitoringMapInput interface {
pulumi.Input
ToSpringCloudElasticApplicationPerformanceMonitoringMapOutput() SpringCloudElasticApplicationPerformanceMonitoringMapOutput
ToSpringCloudElasticApplicationPerformanceMonitoringMapOutputWithContext(context.Context) SpringCloudElasticApplicationPerformanceMonitoringMapOutput
}
type SpringCloudElasticApplicationPerformanceMonitoringMap map[string]SpringCloudElasticApplicationPerformanceMonitoringInput
func (SpringCloudElasticApplicationPerformanceMonitoringMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudElasticApplicationPerformanceMonitoringMap) ToSpringCloudElasticApplicationPerformanceMonitoringMapOutput() SpringCloudElasticApplicationPerformanceMonitoringMapOutput {
return i.ToSpringCloudElasticApplicationPerformanceMonitoringMapOutputWithContext(context.Background())
}
func (i SpringCloudElasticApplicationPerformanceMonitoringMap) ToSpringCloudElasticApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudElasticApplicationPerformanceMonitoringMapOutput)
}
type SpringCloudElasticApplicationPerformanceMonitoringOutput struct{ *pulumi.OutputState }
func (SpringCloudElasticApplicationPerformanceMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) ToSpringCloudElasticApplicationPerformanceMonitoringOutput() SpringCloudElasticApplicationPerformanceMonitoringOutput {
return o
}
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) ToSpringCloudElasticApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringOutput {
return o
}
// Specifies a list of the packages which should be used to determine whether a stack trace frame is an in-app frame or a library frame. This is a comma separated list of package names.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) ApplicationPackages() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.StringArrayOutput {
return v.ApplicationPackages
}).(pulumi.StringArrayOutput)
}
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) GloballyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.GloballyEnabled
}).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Elastic. Changing this forces a new resource to be created.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the server URL. The URL must be fully qualified, including protocol (http or https) and port.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) ServerUrl() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.StringOutput { return v.ServerUrl }).(pulumi.StringOutput)
}
// Specifies the service name which is used to keep all the errors and transactions of your service together and is the primary filter in the Elastic APM user interface.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.StringOutput { return v.ServiceName }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudElasticApplicationPerformanceMonitoringOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudElasticApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.SpringCloudServiceId
}).(pulumi.StringOutput)
}
type SpringCloudElasticApplicationPerformanceMonitoringArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudElasticApplicationPerformanceMonitoringArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudElasticApplicationPerformanceMonitoringArrayOutput) ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutput() SpringCloudElasticApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudElasticApplicationPerformanceMonitoringArrayOutput) ToSpringCloudElasticApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudElasticApplicationPerformanceMonitoringArrayOutput) Index(i pulumi.IntInput) SpringCloudElasticApplicationPerformanceMonitoringOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudElasticApplicationPerformanceMonitoring {
return vs[0].([]*SpringCloudElasticApplicationPerformanceMonitoring)[vs[1].(int)]
}).(SpringCloudElasticApplicationPerformanceMonitoringOutput)
}
type SpringCloudElasticApplicationPerformanceMonitoringMapOutput struct{ *pulumi.OutputState }
func (SpringCloudElasticApplicationPerformanceMonitoringMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudElasticApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudElasticApplicationPerformanceMonitoringMapOutput) ToSpringCloudElasticApplicationPerformanceMonitoringMapOutput() SpringCloudElasticApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudElasticApplicationPerformanceMonitoringMapOutput) ToSpringCloudElasticApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudElasticApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudElasticApplicationPerformanceMonitoringMapOutput) MapIndex(k pulumi.StringInput) SpringCloudElasticApplicationPerformanceMonitoringOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudElasticApplicationPerformanceMonitoring {
return vs[0].(map[string]*SpringCloudElasticApplicationPerformanceMonitoring)[vs[1].(string)]
}).(SpringCloudElasticApplicationPerformanceMonitoringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudElasticApplicationPerformanceMonitoringInput)(nil)).Elem(), &SpringCloudElasticApplicationPerformanceMonitoring{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudElasticApplicationPerformanceMonitoringArrayInput)(nil)).Elem(), SpringCloudElasticApplicationPerformanceMonitoringArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudElasticApplicationPerformanceMonitoringMapInput)(nil)).Elem(), SpringCloudElasticApplicationPerformanceMonitoringMap{})
pulumi.RegisterOutputType(SpringCloudElasticApplicationPerformanceMonitoringOutput{})
pulumi.RegisterOutputType(SpringCloudElasticApplicationPerformanceMonitoringArrayOutput{})
pulumi.RegisterOutputType(SpringCloudElasticApplicationPerformanceMonitoringMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudApp.go | sdk/go/azure/appplatform/springCloudApp.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manage an Azure Spring Cloud Application.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApp` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// Identity: &appplatform.SpringCloudAppIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Application can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudApp:SpringCloudApp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.AppPlatform/spring/myservice/apps/myapp
// ```
type SpringCloudApp struct {
pulumi.CustomResourceState
// A JSON object that contains the addon configurations of the Spring Cloud Service.
AddonJson pulumi.StringOutput `pulumi:"addonJson"`
// A `customPersistentDisk` block as defined below.
CustomPersistentDisks SpringCloudAppCustomPersistentDiskArrayOutput `pulumi:"customPersistentDisks"`
// The Fully Qualified DNS Name of the Spring Application in the service.
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// Is only HTTPS allowed? Defaults to `false`.
HttpsOnly pulumi.BoolPtrOutput `pulumi:"httpsOnly"`
// An `identity` block as defined below.
Identity SpringCloudAppIdentityPtrOutput `pulumi:"identity"`
// An `ingressSettings` block as defined below.
IngressSettings SpringCloudAppIngressSettingsOutput `pulumi:"ingressSettings"`
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
IsPublic pulumi.BoolPtrOutput `pulumi:"isPublic"`
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An `persistentDisk` block as defined below.
PersistentDisk SpringCloudAppPersistentDiskOutput `pulumi:"persistentDisk"`
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
PublicEndpointEnabled pulumi.BoolPtrOutput `pulumi:"publicEndpointEnabled"`
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringOutput `pulumi:"serviceName"`
// Is End to End TLS Enabled? Defaults to `false`.
TlsEnabled pulumi.BoolPtrOutput `pulumi:"tlsEnabled"`
// The public endpoint of the Spring Cloud Application.
Url pulumi.StringOutput `pulumi:"url"`
}
// NewSpringCloudApp registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudApp(ctx *pulumi.Context,
name string, args *SpringCloudAppArgs, opts ...pulumi.ResourceOption) (*SpringCloudApp, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServiceName == nil {
return nil, errors.New("invalid value for required argument 'ServiceName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudApp
err := ctx.RegisterResource("azure:appplatform/springCloudApp:SpringCloudApp", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudApp gets an existing SpringCloudApp resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudApp(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAppState, opts ...pulumi.ResourceOption) (*SpringCloudApp, error) {
var resource SpringCloudApp
err := ctx.ReadResource("azure:appplatform/springCloudApp:SpringCloudApp", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudApp resources.
type springCloudAppState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Service.
AddonJson *string `pulumi:"addonJson"`
// A `customPersistentDisk` block as defined below.
CustomPersistentDisks []SpringCloudAppCustomPersistentDisk `pulumi:"customPersistentDisks"`
// The Fully Qualified DNS Name of the Spring Application in the service.
Fqdn *string `pulumi:"fqdn"`
// Is only HTTPS allowed? Defaults to `false`.
HttpsOnly *bool `pulumi:"httpsOnly"`
// An `identity` block as defined below.
Identity *SpringCloudAppIdentity `pulumi:"identity"`
// An `ingressSettings` block as defined below.
IngressSettings *SpringCloudAppIngressSettings `pulumi:"ingressSettings"`
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
IsPublic *bool `pulumi:"isPublic"`
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `persistentDisk` block as defined below.
PersistentDisk *SpringCloudAppPersistentDisk `pulumi:"persistentDisk"`
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
PublicEndpointEnabled *bool `pulumi:"publicEndpointEnabled"`
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName *string `pulumi:"serviceName"`
// Is End to End TLS Enabled? Defaults to `false`.
TlsEnabled *bool `pulumi:"tlsEnabled"`
// The public endpoint of the Spring Cloud Application.
Url *string `pulumi:"url"`
}
type SpringCloudAppState struct {
// A JSON object that contains the addon configurations of the Spring Cloud Service.
AddonJson pulumi.StringPtrInput
// A `customPersistentDisk` block as defined below.
CustomPersistentDisks SpringCloudAppCustomPersistentDiskArrayInput
// The Fully Qualified DNS Name of the Spring Application in the service.
Fqdn pulumi.StringPtrInput
// Is only HTTPS allowed? Defaults to `false`.
HttpsOnly pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity SpringCloudAppIdentityPtrInput
// An `ingressSettings` block as defined below.
IngressSettings SpringCloudAppIngressSettingsPtrInput
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
IsPublic pulumi.BoolPtrInput
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `persistentDisk` block as defined below.
PersistentDisk SpringCloudAppPersistentDiskPtrInput
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
PublicEndpointEnabled pulumi.BoolPtrInput
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringPtrInput
// Is End to End TLS Enabled? Defaults to `false`.
TlsEnabled pulumi.BoolPtrInput
// The public endpoint of the Spring Cloud Application.
Url pulumi.StringPtrInput
}
func (SpringCloudAppState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppState)(nil)).Elem()
}
type springCloudAppArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Service.
AddonJson *string `pulumi:"addonJson"`
// A `customPersistentDisk` block as defined below.
CustomPersistentDisks []SpringCloudAppCustomPersistentDisk `pulumi:"customPersistentDisks"`
// Is only HTTPS allowed? Defaults to `false`.
HttpsOnly *bool `pulumi:"httpsOnly"`
// An `identity` block as defined below.
Identity *SpringCloudAppIdentity `pulumi:"identity"`
// An `ingressSettings` block as defined below.
IngressSettings *SpringCloudAppIngressSettings `pulumi:"ingressSettings"`
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
IsPublic *bool `pulumi:"isPublic"`
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `persistentDisk` block as defined below.
PersistentDisk *SpringCloudAppPersistentDisk `pulumi:"persistentDisk"`
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
PublicEndpointEnabled *bool `pulumi:"publicEndpointEnabled"`
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName string `pulumi:"serviceName"`
// Is End to End TLS Enabled? Defaults to `false`.
TlsEnabled *bool `pulumi:"tlsEnabled"`
}
// The set of arguments for constructing a SpringCloudApp resource.
type SpringCloudAppArgs struct {
// A JSON object that contains the addon configurations of the Spring Cloud Service.
AddonJson pulumi.StringPtrInput
// A `customPersistentDisk` block as defined below.
CustomPersistentDisks SpringCloudAppCustomPersistentDiskArrayInput
// Is only HTTPS allowed? Defaults to `false`.
HttpsOnly pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity SpringCloudAppIdentityPtrInput
// An `ingressSettings` block as defined below.
IngressSettings SpringCloudAppIngressSettingsPtrInput
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
IsPublic pulumi.BoolPtrInput
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `persistentDisk` block as defined below.
PersistentDisk SpringCloudAppPersistentDiskPtrInput
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
PublicEndpointEnabled pulumi.BoolPtrInput
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
ServiceName pulumi.StringInput
// Is End to End TLS Enabled? Defaults to `false`.
TlsEnabled pulumi.BoolPtrInput
}
func (SpringCloudAppArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAppArgs)(nil)).Elem()
}
type SpringCloudAppInput interface {
pulumi.Input
ToSpringCloudAppOutput() SpringCloudAppOutput
ToSpringCloudAppOutputWithContext(ctx context.Context) SpringCloudAppOutput
}
func (*SpringCloudApp) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApp)(nil)).Elem()
}
func (i *SpringCloudApp) ToSpringCloudAppOutput() SpringCloudAppOutput {
return i.ToSpringCloudAppOutputWithContext(context.Background())
}
func (i *SpringCloudApp) ToSpringCloudAppOutputWithContext(ctx context.Context) SpringCloudAppOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppOutput)
}
// SpringCloudAppArrayInput is an input type that accepts SpringCloudAppArray and SpringCloudAppArrayOutput values.
// You can construct a concrete instance of `SpringCloudAppArrayInput` via:
//
// SpringCloudAppArray{ SpringCloudAppArgs{...} }
type SpringCloudAppArrayInput interface {
pulumi.Input
ToSpringCloudAppArrayOutput() SpringCloudAppArrayOutput
ToSpringCloudAppArrayOutputWithContext(context.Context) SpringCloudAppArrayOutput
}
type SpringCloudAppArray []SpringCloudAppInput
func (SpringCloudAppArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApp)(nil)).Elem()
}
func (i SpringCloudAppArray) ToSpringCloudAppArrayOutput() SpringCloudAppArrayOutput {
return i.ToSpringCloudAppArrayOutputWithContext(context.Background())
}
func (i SpringCloudAppArray) ToSpringCloudAppArrayOutputWithContext(ctx context.Context) SpringCloudAppArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppArrayOutput)
}
// SpringCloudAppMapInput is an input type that accepts SpringCloudAppMap and SpringCloudAppMapOutput values.
// You can construct a concrete instance of `SpringCloudAppMapInput` via:
//
// SpringCloudAppMap{ "key": SpringCloudAppArgs{...} }
type SpringCloudAppMapInput interface {
pulumi.Input
ToSpringCloudAppMapOutput() SpringCloudAppMapOutput
ToSpringCloudAppMapOutputWithContext(context.Context) SpringCloudAppMapOutput
}
type SpringCloudAppMap map[string]SpringCloudAppInput
func (SpringCloudAppMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApp)(nil)).Elem()
}
func (i SpringCloudAppMap) ToSpringCloudAppMapOutput() SpringCloudAppMapOutput {
return i.ToSpringCloudAppMapOutputWithContext(context.Background())
}
func (i SpringCloudAppMap) ToSpringCloudAppMapOutputWithContext(ctx context.Context) SpringCloudAppMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAppMapOutput)
}
type SpringCloudAppOutput struct{ *pulumi.OutputState }
func (SpringCloudAppOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApp)(nil)).Elem()
}
func (o SpringCloudAppOutput) ToSpringCloudAppOutput() SpringCloudAppOutput {
return o
}
func (o SpringCloudAppOutput) ToSpringCloudAppOutputWithContext(ctx context.Context) SpringCloudAppOutput {
return o
}
// A JSON object that contains the addon configurations of the Spring Cloud Service.
func (o SpringCloudAppOutput) AddonJson() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.AddonJson }).(pulumi.StringOutput)
}
// A `customPersistentDisk` block as defined below.
func (o SpringCloudAppOutput) CustomPersistentDisks() SpringCloudAppCustomPersistentDiskArrayOutput {
return o.ApplyT(func(v *SpringCloudApp) SpringCloudAppCustomPersistentDiskArrayOutput { return v.CustomPersistentDisks }).(SpringCloudAppCustomPersistentDiskArrayOutput)
}
// The Fully Qualified DNS Name of the Spring Application in the service.
func (o SpringCloudAppOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput)
}
// Is only HTTPS allowed? Defaults to `false`.
func (o SpringCloudAppOutput) HttpsOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.BoolPtrOutput { return v.HttpsOnly }).(pulumi.BoolPtrOutput)
}
// An `identity` block as defined below.
func (o SpringCloudAppOutput) Identity() SpringCloudAppIdentityPtrOutput {
return o.ApplyT(func(v *SpringCloudApp) SpringCloudAppIdentityPtrOutput { return v.Identity }).(SpringCloudAppIdentityPtrOutput)
}
// An `ingressSettings` block as defined below.
func (o SpringCloudAppOutput) IngressSettings() SpringCloudAppIngressSettingsOutput {
return o.ApplyT(func(v *SpringCloudApp) SpringCloudAppIngressSettingsOutput { return v.IngressSettings }).(SpringCloudAppIngressSettingsOutput)
}
// Does the Spring Cloud Application have public endpoint? Defaults to `false`.
func (o SpringCloudAppOutput) IsPublic() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.BoolPtrOutput { return v.IsPublic }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Spring Cloud Application. Changing this forces a new resource to be created.
func (o SpringCloudAppOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An `persistentDisk` block as defined below.
func (o SpringCloudAppOutput) PersistentDisk() SpringCloudAppPersistentDiskOutput {
return o.ApplyT(func(v *SpringCloudApp) SpringCloudAppPersistentDiskOutput { return v.PersistentDisk }).(SpringCloudAppPersistentDiskOutput)
}
// Should the App in vnet injection instance exposes endpoint which could be accessed from Internet?
func (o SpringCloudAppOutput) PublicEndpointEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.BoolPtrOutput { return v.PublicEndpointEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the resource group in which to create the Spring Cloud Application. Changing this forces a new resource to be created.
func (o SpringCloudAppOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the name of the Spring Cloud Service resource. Changing this forces a new resource to be created.
func (o SpringCloudAppOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.ServiceName }).(pulumi.StringOutput)
}
// Is End to End TLS Enabled? Defaults to `false`.
func (o SpringCloudAppOutput) TlsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.BoolPtrOutput { return v.TlsEnabled }).(pulumi.BoolPtrOutput)
}
// The public endpoint of the Spring Cloud Application.
func (o SpringCloudAppOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApp) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type SpringCloudAppArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAppArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApp)(nil)).Elem()
}
func (o SpringCloudAppArrayOutput) ToSpringCloudAppArrayOutput() SpringCloudAppArrayOutput {
return o
}
func (o SpringCloudAppArrayOutput) ToSpringCloudAppArrayOutputWithContext(ctx context.Context) SpringCloudAppArrayOutput {
return o
}
func (o SpringCloudAppArrayOutput) Index(i pulumi.IntInput) SpringCloudAppOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudApp {
return vs[0].([]*SpringCloudApp)[vs[1].(int)]
}).(SpringCloudAppOutput)
}
type SpringCloudAppMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAppMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApp)(nil)).Elem()
}
func (o SpringCloudAppMapOutput) ToSpringCloudAppMapOutput() SpringCloudAppMapOutput {
return o
}
func (o SpringCloudAppMapOutput) ToSpringCloudAppMapOutputWithContext(ctx context.Context) SpringCloudAppMapOutput {
return o
}
func (o SpringCloudAppMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAppOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudApp {
return vs[0].(map[string]*SpringCloudApp)[vs[1].(string)]
}).(SpringCloudAppOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppInput)(nil)).Elem(), &SpringCloudApp{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppArrayInput)(nil)).Elem(), SpringCloudAppArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAppMapInput)(nil)).Elem(), SpringCloudAppMap{})
pulumi.RegisterOutputType(SpringCloudAppOutput{})
pulumi.RegisterOutputType(SpringCloudAppArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAppMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudJavaDeployment.go | sdk/go/azure/appplatform/springCloudJavaDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Spring Cloud Deployment with a Java runtime.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with basic and standard tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudJavaDeployment` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// Identity: &appplatform.SpringCloudAppIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudJavaDeployment(ctx, "example", &appplatform.SpringCloudJavaDeploymentArgs{
// Name: pulumi.String("deploy1"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// InstanceCount: pulumi.Int(2),
// JvmOptions: pulumi.String("-XX:+PrintGC"),
// Quota: &appplatform.SpringCloudJavaDeploymentQuotaArgs{
// Cpu: pulumi.String("2"),
// Memory: pulumi.String("4Gi"),
// },
// RuntimeVersion: pulumi.String("Java_11"),
// EnvironmentVariables: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// "Env": pulumi.String("Staging"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Deployment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudJavaDeployment:SpringCloudJavaDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1/deployments/deploy1
// ```
type SpringCloudJavaDeployment struct {
pulumi.CustomResourceState
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapOutput `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrOutput `pulumi:"instanceCount"`
// Specifies the jvm option of the Spring Cloud Deployment.
JvmOptions pulumi.StringPtrOutput `pulumi:"jvmOptions"`
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `quota` block as defined below.
Quota SpringCloudJavaDeploymentQuotaOutput `pulumi:"quota"`
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
RuntimeVersion pulumi.StringPtrOutput `pulumi:"runtimeVersion"`
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
}
// NewSpringCloudJavaDeployment registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudJavaDeployment(ctx *pulumi.Context,
name string, args *SpringCloudJavaDeploymentArgs, opts ...pulumi.ResourceOption) (*SpringCloudJavaDeployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudJavaDeployment
err := ctx.RegisterResource("azure:appplatform/springCloudJavaDeployment:SpringCloudJavaDeployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudJavaDeployment gets an existing SpringCloudJavaDeployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudJavaDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudJavaDeploymentState, opts ...pulumi.ResourceOption) (*SpringCloudJavaDeployment, error) {
var resource SpringCloudJavaDeployment
err := ctx.ReadResource("azure:appplatform/springCloudJavaDeployment:SpringCloudJavaDeployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudJavaDeployment resources.
type springCloudJavaDeploymentState struct {
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// Specifies the jvm option of the Spring Cloud Deployment.
JvmOptions *string `pulumi:"jvmOptions"`
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudJavaDeploymentQuota `pulumi:"quota"`
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
RuntimeVersion *string `pulumi:"runtimeVersion"`
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
}
type SpringCloudJavaDeploymentState struct {
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// Specifies the jvm option of the Spring Cloud Deployment.
JvmOptions pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudJavaDeploymentQuotaPtrInput
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
RuntimeVersion pulumi.StringPtrInput
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
}
func (SpringCloudJavaDeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudJavaDeploymentState)(nil)).Elem()
}
type springCloudJavaDeploymentArgs struct {
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables map[string]string `pulumi:"environmentVariables"`
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// Specifies the jvm option of the Spring Cloud Deployment.
JvmOptions *string `pulumi:"jvmOptions"`
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `quota` block as defined below.
Quota *SpringCloudJavaDeploymentQuota `pulumi:"quota"`
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
RuntimeVersion *string `pulumi:"runtimeVersion"`
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
}
// The set of arguments for constructing a SpringCloudJavaDeployment resource.
type SpringCloudJavaDeploymentArgs struct {
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
EnvironmentVariables pulumi.StringMapInput
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// Specifies the jvm option of the Spring Cloud Deployment.
JvmOptions pulumi.StringPtrInput
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `quota` block as defined below.
Quota SpringCloudJavaDeploymentQuotaPtrInput
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
RuntimeVersion pulumi.StringPtrInput
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
}
func (SpringCloudJavaDeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudJavaDeploymentArgs)(nil)).Elem()
}
type SpringCloudJavaDeploymentInput interface {
pulumi.Input
ToSpringCloudJavaDeploymentOutput() SpringCloudJavaDeploymentOutput
ToSpringCloudJavaDeploymentOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentOutput
}
func (*SpringCloudJavaDeployment) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudJavaDeployment)(nil)).Elem()
}
func (i *SpringCloudJavaDeployment) ToSpringCloudJavaDeploymentOutput() SpringCloudJavaDeploymentOutput {
return i.ToSpringCloudJavaDeploymentOutputWithContext(context.Background())
}
func (i *SpringCloudJavaDeployment) ToSpringCloudJavaDeploymentOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudJavaDeploymentOutput)
}
// SpringCloudJavaDeploymentArrayInput is an input type that accepts SpringCloudJavaDeploymentArray and SpringCloudJavaDeploymentArrayOutput values.
// You can construct a concrete instance of `SpringCloudJavaDeploymentArrayInput` via:
//
// SpringCloudJavaDeploymentArray{ SpringCloudJavaDeploymentArgs{...} }
type SpringCloudJavaDeploymentArrayInput interface {
pulumi.Input
ToSpringCloudJavaDeploymentArrayOutput() SpringCloudJavaDeploymentArrayOutput
ToSpringCloudJavaDeploymentArrayOutputWithContext(context.Context) SpringCloudJavaDeploymentArrayOutput
}
type SpringCloudJavaDeploymentArray []SpringCloudJavaDeploymentInput
func (SpringCloudJavaDeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudJavaDeployment)(nil)).Elem()
}
func (i SpringCloudJavaDeploymentArray) ToSpringCloudJavaDeploymentArrayOutput() SpringCloudJavaDeploymentArrayOutput {
return i.ToSpringCloudJavaDeploymentArrayOutputWithContext(context.Background())
}
func (i SpringCloudJavaDeploymentArray) ToSpringCloudJavaDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudJavaDeploymentArrayOutput)
}
// SpringCloudJavaDeploymentMapInput is an input type that accepts SpringCloudJavaDeploymentMap and SpringCloudJavaDeploymentMapOutput values.
// You can construct a concrete instance of `SpringCloudJavaDeploymentMapInput` via:
//
// SpringCloudJavaDeploymentMap{ "key": SpringCloudJavaDeploymentArgs{...} }
type SpringCloudJavaDeploymentMapInput interface {
pulumi.Input
ToSpringCloudJavaDeploymentMapOutput() SpringCloudJavaDeploymentMapOutput
ToSpringCloudJavaDeploymentMapOutputWithContext(context.Context) SpringCloudJavaDeploymentMapOutput
}
type SpringCloudJavaDeploymentMap map[string]SpringCloudJavaDeploymentInput
func (SpringCloudJavaDeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudJavaDeployment)(nil)).Elem()
}
func (i SpringCloudJavaDeploymentMap) ToSpringCloudJavaDeploymentMapOutput() SpringCloudJavaDeploymentMapOutput {
return i.ToSpringCloudJavaDeploymentMapOutputWithContext(context.Background())
}
func (i SpringCloudJavaDeploymentMap) ToSpringCloudJavaDeploymentMapOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudJavaDeploymentMapOutput)
}
type SpringCloudJavaDeploymentOutput struct{ *pulumi.OutputState }
func (SpringCloudJavaDeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudJavaDeployment)(nil)).Elem()
}
func (o SpringCloudJavaDeploymentOutput) ToSpringCloudJavaDeploymentOutput() SpringCloudJavaDeploymentOutput {
return o
}
func (o SpringCloudJavaDeploymentOutput) ToSpringCloudJavaDeploymentOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentOutput {
return o
}
// Specifies the environment variables of the Spring Cloud Deployment as a map of key-value pairs.
func (o SpringCloudJavaDeploymentOutput) EnvironmentVariables() pulumi.StringMapOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.StringMapOutput { return v.EnvironmentVariables }).(pulumi.StringMapOutput)
}
// Specifies the required instance count of the Spring Cloud Deployment. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
func (o SpringCloudJavaDeploymentOutput) InstanceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.IntPtrOutput { return v.InstanceCount }).(pulumi.IntPtrOutput)
}
// Specifies the jvm option of the Spring Cloud Deployment.
func (o SpringCloudJavaDeploymentOutput) JvmOptions() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.StringPtrOutput { return v.JvmOptions }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Spring Cloud Deployment. Changing this forces a new resource to be created.
func (o SpringCloudJavaDeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `quota` block as defined below.
func (o SpringCloudJavaDeploymentOutput) Quota() SpringCloudJavaDeploymentQuotaOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) SpringCloudJavaDeploymentQuotaOutput { return v.Quota }).(SpringCloudJavaDeploymentQuotaOutput)
}
// Specifies the runtime version of the Spring Cloud Deployment. Possible Values are `Java_8`, `Java_11` and `Java_17`. Defaults to `Java_8`.
func (o SpringCloudJavaDeploymentOutput) RuntimeVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.StringPtrOutput { return v.RuntimeVersion }).(pulumi.StringPtrOutput)
}
// Specifies the id of the Spring Cloud Application in which to create the Deployment. Changing this forces a new resource to be created.
func (o SpringCloudJavaDeploymentOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudJavaDeployment) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
type SpringCloudJavaDeploymentArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudJavaDeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudJavaDeployment)(nil)).Elem()
}
func (o SpringCloudJavaDeploymentArrayOutput) ToSpringCloudJavaDeploymentArrayOutput() SpringCloudJavaDeploymentArrayOutput {
return o
}
func (o SpringCloudJavaDeploymentArrayOutput) ToSpringCloudJavaDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentArrayOutput {
return o
}
func (o SpringCloudJavaDeploymentArrayOutput) Index(i pulumi.IntInput) SpringCloudJavaDeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudJavaDeployment {
return vs[0].([]*SpringCloudJavaDeployment)[vs[1].(int)]
}).(SpringCloudJavaDeploymentOutput)
}
type SpringCloudJavaDeploymentMapOutput struct{ *pulumi.OutputState }
func (SpringCloudJavaDeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudJavaDeployment)(nil)).Elem()
}
func (o SpringCloudJavaDeploymentMapOutput) ToSpringCloudJavaDeploymentMapOutput() SpringCloudJavaDeploymentMapOutput {
return o
}
func (o SpringCloudJavaDeploymentMapOutput) ToSpringCloudJavaDeploymentMapOutputWithContext(ctx context.Context) SpringCloudJavaDeploymentMapOutput {
return o
}
func (o SpringCloudJavaDeploymentMapOutput) MapIndex(k pulumi.StringInput) SpringCloudJavaDeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudJavaDeployment {
return vs[0].(map[string]*SpringCloudJavaDeployment)[vs[1].(string)]
}).(SpringCloudJavaDeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudJavaDeploymentInput)(nil)).Elem(), &SpringCloudJavaDeployment{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudJavaDeploymentArrayInput)(nil)).Elem(), SpringCloudJavaDeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudJavaDeploymentMapInput)(nil)).Elem(), SpringCloudJavaDeploymentMap{})
pulumi.RegisterOutputType(SpringCloudJavaDeploymentOutput{})
pulumi.RegisterOutputType(SpringCloudJavaDeploymentArrayOutput{})
pulumi.RegisterOutputType(SpringCloudJavaDeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudActiveDeployment.go | sdk/go/azure/appplatform/springCloudActiveDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Active Azure Spring Cloud Deployment.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudActiveDeployment` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApp, err := appplatform.NewSpringCloudApp(ctx, "example", &appplatform.SpringCloudAppArgs{
// Name: pulumi.String("example-springcloudapp"),
// ResourceGroupName: example.Name,
// ServiceName: exampleSpringCloudService.Name,
// Identity: &appplatform.SpringCloudAppIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleSpringCloudJavaDeployment, err := appplatform.NewSpringCloudJavaDeployment(ctx, "example", &appplatform.SpringCloudJavaDeploymentArgs{
// Name: pulumi.String("deploy1"),
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// InstanceCount: pulumi.Int(2),
// JvmOptions: pulumi.String("-XX:+PrintGC"),
// RuntimeVersion: pulumi.String("Java_11"),
// Quota: &appplatform.SpringCloudJavaDeploymentQuotaArgs{
// Cpu: pulumi.String("2"),
// Memory: pulumi.String("4Gi"),
// },
// EnvironmentVariables: pulumi.StringMap{
// "Env": pulumi.String("Staging"),
// },
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudActiveDeployment(ctx, "example", &appplatform.SpringCloudActiveDeploymentArgs{
// SpringCloudAppId: exampleSpringCloudApp.ID(),
// DeploymentName: exampleSpringCloudJavaDeployment.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Active Deployment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudActiveDeployment:SpringCloudActiveDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1
// ```
type SpringCloudActiveDeployment struct {
pulumi.CustomResourceState
// Specifies the name of Spring Cloud Deployment which is going to be active.
DeploymentName pulumi.StringOutput `pulumi:"deploymentName"`
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringOutput `pulumi:"springCloudAppId"`
}
// NewSpringCloudActiveDeployment registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudActiveDeployment(ctx *pulumi.Context,
name string, args *SpringCloudActiveDeploymentArgs, opts ...pulumi.ResourceOption) (*SpringCloudActiveDeployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DeploymentName == nil {
return nil, errors.New("invalid value for required argument 'DeploymentName'")
}
if args.SpringCloudAppId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudAppId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudActiveDeployment
err := ctx.RegisterResource("azure:appplatform/springCloudActiveDeployment:SpringCloudActiveDeployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudActiveDeployment gets an existing SpringCloudActiveDeployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudActiveDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudActiveDeploymentState, opts ...pulumi.ResourceOption) (*SpringCloudActiveDeployment, error) {
var resource SpringCloudActiveDeployment
err := ctx.ReadResource("azure:appplatform/springCloudActiveDeployment:SpringCloudActiveDeployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudActiveDeployment resources.
type springCloudActiveDeploymentState struct {
// Specifies the name of Spring Cloud Deployment which is going to be active.
DeploymentName *string `pulumi:"deploymentName"`
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId *string `pulumi:"springCloudAppId"`
}
type SpringCloudActiveDeploymentState struct {
// Specifies the name of Spring Cloud Deployment which is going to be active.
DeploymentName pulumi.StringPtrInput
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringPtrInput
}
func (SpringCloudActiveDeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudActiveDeploymentState)(nil)).Elem()
}
type springCloudActiveDeploymentArgs struct {
// Specifies the name of Spring Cloud Deployment which is going to be active.
DeploymentName string `pulumi:"deploymentName"`
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId string `pulumi:"springCloudAppId"`
}
// The set of arguments for constructing a SpringCloudActiveDeployment resource.
type SpringCloudActiveDeploymentArgs struct {
// Specifies the name of Spring Cloud Deployment which is going to be active.
DeploymentName pulumi.StringInput
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
SpringCloudAppId pulumi.StringInput
}
func (SpringCloudActiveDeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudActiveDeploymentArgs)(nil)).Elem()
}
type SpringCloudActiveDeploymentInput interface {
pulumi.Input
ToSpringCloudActiveDeploymentOutput() SpringCloudActiveDeploymentOutput
ToSpringCloudActiveDeploymentOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentOutput
}
func (*SpringCloudActiveDeployment) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudActiveDeployment)(nil)).Elem()
}
func (i *SpringCloudActiveDeployment) ToSpringCloudActiveDeploymentOutput() SpringCloudActiveDeploymentOutput {
return i.ToSpringCloudActiveDeploymentOutputWithContext(context.Background())
}
func (i *SpringCloudActiveDeployment) ToSpringCloudActiveDeploymentOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudActiveDeploymentOutput)
}
// SpringCloudActiveDeploymentArrayInput is an input type that accepts SpringCloudActiveDeploymentArray and SpringCloudActiveDeploymentArrayOutput values.
// You can construct a concrete instance of `SpringCloudActiveDeploymentArrayInput` via:
//
// SpringCloudActiveDeploymentArray{ SpringCloudActiveDeploymentArgs{...} }
type SpringCloudActiveDeploymentArrayInput interface {
pulumi.Input
ToSpringCloudActiveDeploymentArrayOutput() SpringCloudActiveDeploymentArrayOutput
ToSpringCloudActiveDeploymentArrayOutputWithContext(context.Context) SpringCloudActiveDeploymentArrayOutput
}
type SpringCloudActiveDeploymentArray []SpringCloudActiveDeploymentInput
func (SpringCloudActiveDeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudActiveDeployment)(nil)).Elem()
}
func (i SpringCloudActiveDeploymentArray) ToSpringCloudActiveDeploymentArrayOutput() SpringCloudActiveDeploymentArrayOutput {
return i.ToSpringCloudActiveDeploymentArrayOutputWithContext(context.Background())
}
func (i SpringCloudActiveDeploymentArray) ToSpringCloudActiveDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudActiveDeploymentArrayOutput)
}
// SpringCloudActiveDeploymentMapInput is an input type that accepts SpringCloudActiveDeploymentMap and SpringCloudActiveDeploymentMapOutput values.
// You can construct a concrete instance of `SpringCloudActiveDeploymentMapInput` via:
//
// SpringCloudActiveDeploymentMap{ "key": SpringCloudActiveDeploymentArgs{...} }
type SpringCloudActiveDeploymentMapInput interface {
pulumi.Input
ToSpringCloudActiveDeploymentMapOutput() SpringCloudActiveDeploymentMapOutput
ToSpringCloudActiveDeploymentMapOutputWithContext(context.Context) SpringCloudActiveDeploymentMapOutput
}
type SpringCloudActiveDeploymentMap map[string]SpringCloudActiveDeploymentInput
func (SpringCloudActiveDeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudActiveDeployment)(nil)).Elem()
}
func (i SpringCloudActiveDeploymentMap) ToSpringCloudActiveDeploymentMapOutput() SpringCloudActiveDeploymentMapOutput {
return i.ToSpringCloudActiveDeploymentMapOutputWithContext(context.Background())
}
func (i SpringCloudActiveDeploymentMap) ToSpringCloudActiveDeploymentMapOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudActiveDeploymentMapOutput)
}
type SpringCloudActiveDeploymentOutput struct{ *pulumi.OutputState }
func (SpringCloudActiveDeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudActiveDeployment)(nil)).Elem()
}
func (o SpringCloudActiveDeploymentOutput) ToSpringCloudActiveDeploymentOutput() SpringCloudActiveDeploymentOutput {
return o
}
func (o SpringCloudActiveDeploymentOutput) ToSpringCloudActiveDeploymentOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentOutput {
return o
}
// Specifies the name of Spring Cloud Deployment which is going to be active.
func (o SpringCloudActiveDeploymentOutput) DeploymentName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudActiveDeployment) pulumi.StringOutput { return v.DeploymentName }).(pulumi.StringOutput)
}
// Specifies the id of the Spring Cloud Application. Changing this forces a new resource to be created.
func (o SpringCloudActiveDeploymentOutput) SpringCloudAppId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudActiveDeployment) pulumi.StringOutput { return v.SpringCloudAppId }).(pulumi.StringOutput)
}
type SpringCloudActiveDeploymentArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudActiveDeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudActiveDeployment)(nil)).Elem()
}
func (o SpringCloudActiveDeploymentArrayOutput) ToSpringCloudActiveDeploymentArrayOutput() SpringCloudActiveDeploymentArrayOutput {
return o
}
func (o SpringCloudActiveDeploymentArrayOutput) ToSpringCloudActiveDeploymentArrayOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentArrayOutput {
return o
}
func (o SpringCloudActiveDeploymentArrayOutput) Index(i pulumi.IntInput) SpringCloudActiveDeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudActiveDeployment {
return vs[0].([]*SpringCloudActiveDeployment)[vs[1].(int)]
}).(SpringCloudActiveDeploymentOutput)
}
type SpringCloudActiveDeploymentMapOutput struct{ *pulumi.OutputState }
func (SpringCloudActiveDeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudActiveDeployment)(nil)).Elem()
}
func (o SpringCloudActiveDeploymentMapOutput) ToSpringCloudActiveDeploymentMapOutput() SpringCloudActiveDeploymentMapOutput {
return o
}
func (o SpringCloudActiveDeploymentMapOutput) ToSpringCloudActiveDeploymentMapOutputWithContext(ctx context.Context) SpringCloudActiveDeploymentMapOutput {
return o
}
func (o SpringCloudActiveDeploymentMapOutput) MapIndex(k pulumi.StringInput) SpringCloudActiveDeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudActiveDeployment {
return vs[0].(map[string]*SpringCloudActiveDeployment)[vs[1].(string)]
}).(SpringCloudActiveDeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudActiveDeploymentInput)(nil)).Elem(), &SpringCloudActiveDeployment{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudActiveDeploymentArrayInput)(nil)).Elem(), SpringCloudActiveDeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudActiveDeploymentMapInput)(nil)).Elem(), SpringCloudActiveDeploymentMap{})
pulumi.RegisterOutputType(SpringCloudActiveDeploymentOutput{})
pulumi.RegisterOutputType(SpringCloudActiveDeploymentArrayOutput{})
pulumi.RegisterOutputType(SpringCloudActiveDeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudApiPortal.go | sdk/go/azure/appplatform/springCloudApiPortal.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud API Portal.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApiPortal` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudGateway, err := appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudApiPortal(ctx, "example", &appplatform.SpringCloudApiPortalArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// GatewayIds: pulumi.StringArray{
// exampleSpringCloudGateway.ID(),
// },
// HttpsOnlyEnabled: pulumi.Bool(false),
// PublicNetworkAccessEnabled: pulumi.Bool(true),
// InstanceCount: pulumi.Int(1),
// ApiTryOutEnabled: pulumi.Bool(true),
// Sso: &appplatform.SpringCloudApiPortalSsoArgs{
// ClientId: pulumi.String("test"),
// ClientSecret: pulumi.String("secret"),
// IssuerUri: pulumi.String("https://www.example.com/issueToken"),
// Scopes: pulumi.StringArray{
// pulumi.String("read"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud API Portals can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudApiPortal:SpringCloudApiPortal example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/apiPortals/apiPortal1
// ```
type SpringCloudApiPortal struct {
pulumi.CustomResourceState
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
ApiTryOutEnabled pulumi.BoolPtrOutput `pulumi:"apiTryOutEnabled"`
// Specifies a list of Spring Cloud Gateway.
GatewayIds pulumi.StringArrayOutput `pulumi:"gatewayIds"`
// is only https is allowed?
HttpsOnlyEnabled pulumi.BoolPtrOutput `pulumi:"httpsOnlyEnabled"`
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrOutput `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
Name pulumi.StringOutput `pulumi:"name"`
// Is the public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso SpringCloudApiPortalSsoPtrOutput `pulumi:"sso"`
// TODO.
Url pulumi.StringOutput `pulumi:"url"`
}
// NewSpringCloudApiPortal registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudApiPortal(ctx *pulumi.Context,
name string, args *SpringCloudApiPortalArgs, opts ...pulumi.ResourceOption) (*SpringCloudApiPortal, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudApiPortal
err := ctx.RegisterResource("azure:appplatform/springCloudApiPortal:SpringCloudApiPortal", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudApiPortal gets an existing SpringCloudApiPortal resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudApiPortal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudApiPortalState, opts ...pulumi.ResourceOption) (*SpringCloudApiPortal, error) {
var resource SpringCloudApiPortal
err := ctx.ReadResource("azure:appplatform/springCloudApiPortal:SpringCloudApiPortal", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudApiPortal resources.
type springCloudApiPortalState struct {
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
ApiTryOutEnabled *bool `pulumi:"apiTryOutEnabled"`
// Specifies a list of Spring Cloud Gateway.
GatewayIds []string `pulumi:"gatewayIds"`
// is only https is allowed?
HttpsOnlyEnabled *bool `pulumi:"httpsOnlyEnabled"`
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// Is the public network access enabled?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudApiPortalSso `pulumi:"sso"`
// TODO.
Url *string `pulumi:"url"`
}
type SpringCloudApiPortalState struct {
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
ApiTryOutEnabled pulumi.BoolPtrInput
// Specifies a list of Spring Cloud Gateway.
GatewayIds pulumi.StringArrayInput
// is only https is allowed?
HttpsOnlyEnabled pulumi.BoolPtrInput
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// Is the public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
SpringCloudServiceId pulumi.StringPtrInput
// A `sso` block as defined below.
Sso SpringCloudApiPortalSsoPtrInput
// TODO.
Url pulumi.StringPtrInput
}
func (SpringCloudApiPortalState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApiPortalState)(nil)).Elem()
}
type springCloudApiPortalArgs struct {
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
ApiTryOutEnabled *bool `pulumi:"apiTryOutEnabled"`
// Specifies a list of Spring Cloud Gateway.
GatewayIds []string `pulumi:"gatewayIds"`
// is only https is allowed?
HttpsOnlyEnabled *bool `pulumi:"httpsOnlyEnabled"`
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount *int `pulumi:"instanceCount"`
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// Is the public network access enabled?
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// A `sso` block as defined below.
Sso *SpringCloudApiPortalSso `pulumi:"sso"`
}
// The set of arguments for constructing a SpringCloudApiPortal resource.
type SpringCloudApiPortalArgs struct {
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
ApiTryOutEnabled pulumi.BoolPtrInput
// Specifies a list of Spring Cloud Gateway.
GatewayIds pulumi.StringArrayInput
// is only https is allowed?
HttpsOnlyEnabled pulumi.BoolPtrInput
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
InstanceCount pulumi.IntPtrInput
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// Is the public network access enabled?
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
SpringCloudServiceId pulumi.StringInput
// A `sso` block as defined below.
Sso SpringCloudApiPortalSsoPtrInput
}
func (SpringCloudApiPortalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApiPortalArgs)(nil)).Elem()
}
type SpringCloudApiPortalInput interface {
pulumi.Input
ToSpringCloudApiPortalOutput() SpringCloudApiPortalOutput
ToSpringCloudApiPortalOutputWithContext(ctx context.Context) SpringCloudApiPortalOutput
}
func (*SpringCloudApiPortal) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortal)(nil)).Elem()
}
func (i *SpringCloudApiPortal) ToSpringCloudApiPortalOutput() SpringCloudApiPortalOutput {
return i.ToSpringCloudApiPortalOutputWithContext(context.Background())
}
func (i *SpringCloudApiPortal) ToSpringCloudApiPortalOutputWithContext(ctx context.Context) SpringCloudApiPortalOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalOutput)
}
// SpringCloudApiPortalArrayInput is an input type that accepts SpringCloudApiPortalArray and SpringCloudApiPortalArrayOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalArrayInput` via:
//
// SpringCloudApiPortalArray{ SpringCloudApiPortalArgs{...} }
type SpringCloudApiPortalArrayInput interface {
pulumi.Input
ToSpringCloudApiPortalArrayOutput() SpringCloudApiPortalArrayOutput
ToSpringCloudApiPortalArrayOutputWithContext(context.Context) SpringCloudApiPortalArrayOutput
}
type SpringCloudApiPortalArray []SpringCloudApiPortalInput
func (SpringCloudApiPortalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApiPortal)(nil)).Elem()
}
func (i SpringCloudApiPortalArray) ToSpringCloudApiPortalArrayOutput() SpringCloudApiPortalArrayOutput {
return i.ToSpringCloudApiPortalArrayOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalArray) ToSpringCloudApiPortalArrayOutputWithContext(ctx context.Context) SpringCloudApiPortalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalArrayOutput)
}
// SpringCloudApiPortalMapInput is an input type that accepts SpringCloudApiPortalMap and SpringCloudApiPortalMapOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalMapInput` via:
//
// SpringCloudApiPortalMap{ "key": SpringCloudApiPortalArgs{...} }
type SpringCloudApiPortalMapInput interface {
pulumi.Input
ToSpringCloudApiPortalMapOutput() SpringCloudApiPortalMapOutput
ToSpringCloudApiPortalMapOutputWithContext(context.Context) SpringCloudApiPortalMapOutput
}
type SpringCloudApiPortalMap map[string]SpringCloudApiPortalInput
func (SpringCloudApiPortalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApiPortal)(nil)).Elem()
}
func (i SpringCloudApiPortalMap) ToSpringCloudApiPortalMapOutput() SpringCloudApiPortalMapOutput {
return i.ToSpringCloudApiPortalMapOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalMap) ToSpringCloudApiPortalMapOutputWithContext(ctx context.Context) SpringCloudApiPortalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalMapOutput)
}
type SpringCloudApiPortalOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortal)(nil)).Elem()
}
func (o SpringCloudApiPortalOutput) ToSpringCloudApiPortalOutput() SpringCloudApiPortalOutput {
return o
}
func (o SpringCloudApiPortalOutput) ToSpringCloudApiPortalOutputWithContext(ctx context.Context) SpringCloudApiPortalOutput {
return o
}
// Specifies whether the API try-out feature is enabled. When enabled, users can try out the API by sending requests and viewing responses in API portal.
func (o SpringCloudApiPortalOutput) ApiTryOutEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.BoolPtrOutput { return v.ApiTryOutEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies a list of Spring Cloud Gateway.
func (o SpringCloudApiPortalOutput) GatewayIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.StringArrayOutput { return v.GatewayIds }).(pulumi.StringArrayOutput)
}
// is only https is allowed?
func (o SpringCloudApiPortalOutput) HttpsOnlyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.BoolPtrOutput { return v.HttpsOnlyEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the required instance count of the Spring Cloud API Portal. Possible Values are between `1` and `500`. Defaults to `1` if not specified.
func (o SpringCloudApiPortalOutput) InstanceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.IntPtrOutput { return v.InstanceCount }).(pulumi.IntPtrOutput)
}
// The name which should be used for this Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal to be created. The only possible value is `default`.
func (o SpringCloudApiPortalOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Is the public network access enabled?
func (o SpringCloudApiPortalOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud API Portal to be created.
func (o SpringCloudApiPortalOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
// A `sso` block as defined below.
func (o SpringCloudApiPortalOutput) Sso() SpringCloudApiPortalSsoPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) SpringCloudApiPortalSsoPtrOutput { return v.Sso }).(SpringCloudApiPortalSsoPtrOutput)
}
// TODO.
func (o SpringCloudApiPortalOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApiPortal) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type SpringCloudApiPortalArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApiPortal)(nil)).Elem()
}
func (o SpringCloudApiPortalArrayOutput) ToSpringCloudApiPortalArrayOutput() SpringCloudApiPortalArrayOutput {
return o
}
func (o SpringCloudApiPortalArrayOutput) ToSpringCloudApiPortalArrayOutputWithContext(ctx context.Context) SpringCloudApiPortalArrayOutput {
return o
}
func (o SpringCloudApiPortalArrayOutput) Index(i pulumi.IntInput) SpringCloudApiPortalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudApiPortal {
return vs[0].([]*SpringCloudApiPortal)[vs[1].(int)]
}).(SpringCloudApiPortalOutput)
}
type SpringCloudApiPortalMapOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApiPortal)(nil)).Elem()
}
func (o SpringCloudApiPortalMapOutput) ToSpringCloudApiPortalMapOutput() SpringCloudApiPortalMapOutput {
return o
}
func (o SpringCloudApiPortalMapOutput) ToSpringCloudApiPortalMapOutputWithContext(ctx context.Context) SpringCloudApiPortalMapOutput {
return o
}
func (o SpringCloudApiPortalMapOutput) MapIndex(k pulumi.StringInput) SpringCloudApiPortalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudApiPortal {
return vs[0].(map[string]*SpringCloudApiPortal)[vs[1].(string)]
}).(SpringCloudApiPortalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalInput)(nil)).Elem(), &SpringCloudApiPortal{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalArrayInput)(nil)).Elem(), SpringCloudApiPortalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalMapInput)(nil)).Elem(), SpringCloudApiPortalMap{})
pulumi.RegisterOutputType(SpringCloudApiPortalOutput{})
pulumi.RegisterOutputType(SpringCloudApiPortalArrayOutput{})
pulumi.RegisterOutputType(SpringCloudApiPortalMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudApplicationLiveView.go | sdk/go/azure/appplatform/springCloudApplicationLiveView.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// Manages a Spring Cloud Application Live View.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApplicationLiveView` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudApplicationLiveView(ctx, "example", &appplatform.SpringCloudApplicationLiveViewArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Application Live Views can be imported using the `resource id`, e.g.
//
// g
//
// ```sh
// $ pulumi import azure:appplatform/springCloudApplicationLiveView:SpringCloudApplicationLiveView example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/applicationLiveViews/default
// ```
type SpringCloudApplicationLiveView struct {
pulumi.CustomResourceState
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudApplicationLiveView registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudApplicationLiveView(ctx *pulumi.Context,
name string, args *SpringCloudApplicationLiveViewArgs, opts ...pulumi.ResourceOption) (*SpringCloudApplicationLiveView, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudApplicationLiveView
err := ctx.RegisterResource("azure:appplatform/springCloudApplicationLiveView:SpringCloudApplicationLiveView", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudApplicationLiveView gets an existing SpringCloudApplicationLiveView resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudApplicationLiveView(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudApplicationLiveViewState, opts ...pulumi.ResourceOption) (*SpringCloudApplicationLiveView, error) {
var resource SpringCloudApplicationLiveView
err := ctx.ReadResource("azure:appplatform/springCloudApplicationLiveView:SpringCloudApplicationLiveView", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudApplicationLiveView resources.
type springCloudApplicationLiveViewState struct {
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudApplicationLiveViewState struct {
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudApplicationLiveViewState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApplicationLiveViewState)(nil)).Elem()
}
type springCloudApplicationLiveViewArgs struct {
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudApplicationLiveView resource.
type SpringCloudApplicationLiveViewArgs struct {
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudApplicationLiveViewArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApplicationLiveViewArgs)(nil)).Elem()
}
type SpringCloudApplicationLiveViewInput interface {
pulumi.Input
ToSpringCloudApplicationLiveViewOutput() SpringCloudApplicationLiveViewOutput
ToSpringCloudApplicationLiveViewOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewOutput
}
func (*SpringCloudApplicationLiveView) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApplicationLiveView)(nil)).Elem()
}
func (i *SpringCloudApplicationLiveView) ToSpringCloudApplicationLiveViewOutput() SpringCloudApplicationLiveViewOutput {
return i.ToSpringCloudApplicationLiveViewOutputWithContext(context.Background())
}
func (i *SpringCloudApplicationLiveView) ToSpringCloudApplicationLiveViewOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationLiveViewOutput)
}
// SpringCloudApplicationLiveViewArrayInput is an input type that accepts SpringCloudApplicationLiveViewArray and SpringCloudApplicationLiveViewArrayOutput values.
// You can construct a concrete instance of `SpringCloudApplicationLiveViewArrayInput` via:
//
// SpringCloudApplicationLiveViewArray{ SpringCloudApplicationLiveViewArgs{...} }
type SpringCloudApplicationLiveViewArrayInput interface {
pulumi.Input
ToSpringCloudApplicationLiveViewArrayOutput() SpringCloudApplicationLiveViewArrayOutput
ToSpringCloudApplicationLiveViewArrayOutputWithContext(context.Context) SpringCloudApplicationLiveViewArrayOutput
}
type SpringCloudApplicationLiveViewArray []SpringCloudApplicationLiveViewInput
func (SpringCloudApplicationLiveViewArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApplicationLiveView)(nil)).Elem()
}
func (i SpringCloudApplicationLiveViewArray) ToSpringCloudApplicationLiveViewArrayOutput() SpringCloudApplicationLiveViewArrayOutput {
return i.ToSpringCloudApplicationLiveViewArrayOutputWithContext(context.Background())
}
func (i SpringCloudApplicationLiveViewArray) ToSpringCloudApplicationLiveViewArrayOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationLiveViewArrayOutput)
}
// SpringCloudApplicationLiveViewMapInput is an input type that accepts SpringCloudApplicationLiveViewMap and SpringCloudApplicationLiveViewMapOutput values.
// You can construct a concrete instance of `SpringCloudApplicationLiveViewMapInput` via:
//
// SpringCloudApplicationLiveViewMap{ "key": SpringCloudApplicationLiveViewArgs{...} }
type SpringCloudApplicationLiveViewMapInput interface {
pulumi.Input
ToSpringCloudApplicationLiveViewMapOutput() SpringCloudApplicationLiveViewMapOutput
ToSpringCloudApplicationLiveViewMapOutputWithContext(context.Context) SpringCloudApplicationLiveViewMapOutput
}
type SpringCloudApplicationLiveViewMap map[string]SpringCloudApplicationLiveViewInput
func (SpringCloudApplicationLiveViewMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApplicationLiveView)(nil)).Elem()
}
func (i SpringCloudApplicationLiveViewMap) ToSpringCloudApplicationLiveViewMapOutput() SpringCloudApplicationLiveViewMapOutput {
return i.ToSpringCloudApplicationLiveViewMapOutputWithContext(context.Background())
}
func (i SpringCloudApplicationLiveViewMap) ToSpringCloudApplicationLiveViewMapOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApplicationLiveViewMapOutput)
}
type SpringCloudApplicationLiveViewOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationLiveViewOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApplicationLiveView)(nil)).Elem()
}
func (o SpringCloudApplicationLiveViewOutput) ToSpringCloudApplicationLiveViewOutput() SpringCloudApplicationLiveViewOutput {
return o
}
func (o SpringCloudApplicationLiveViewOutput) ToSpringCloudApplicationLiveViewOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewOutput {
return o
}
// The name which should be used for this Spring Cloud Application Live View. Changing this forces a new Spring Cloud Application Live View to be created. The only possible value is `default`.
func (o SpringCloudApplicationLiveViewOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApplicationLiveView) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Application Live View to be created.
func (o SpringCloudApplicationLiveViewOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApplicationLiveView) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
type SpringCloudApplicationLiveViewArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationLiveViewArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApplicationLiveView)(nil)).Elem()
}
func (o SpringCloudApplicationLiveViewArrayOutput) ToSpringCloudApplicationLiveViewArrayOutput() SpringCloudApplicationLiveViewArrayOutput {
return o
}
func (o SpringCloudApplicationLiveViewArrayOutput) ToSpringCloudApplicationLiveViewArrayOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewArrayOutput {
return o
}
func (o SpringCloudApplicationLiveViewArrayOutput) Index(i pulumi.IntInput) SpringCloudApplicationLiveViewOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudApplicationLiveView {
return vs[0].([]*SpringCloudApplicationLiveView)[vs[1].(int)]
}).(SpringCloudApplicationLiveViewOutput)
}
type SpringCloudApplicationLiveViewMapOutput struct{ *pulumi.OutputState }
func (SpringCloudApplicationLiveViewMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApplicationLiveView)(nil)).Elem()
}
func (o SpringCloudApplicationLiveViewMapOutput) ToSpringCloudApplicationLiveViewMapOutput() SpringCloudApplicationLiveViewMapOutput {
return o
}
func (o SpringCloudApplicationLiveViewMapOutput) ToSpringCloudApplicationLiveViewMapOutputWithContext(ctx context.Context) SpringCloudApplicationLiveViewMapOutput {
return o
}
func (o SpringCloudApplicationLiveViewMapOutput) MapIndex(k pulumi.StringInput) SpringCloudApplicationLiveViewOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudApplicationLiveView {
return vs[0].(map[string]*SpringCloudApplicationLiveView)[vs[1].(string)]
}).(SpringCloudApplicationLiveViewOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationLiveViewInput)(nil)).Elem(), &SpringCloudApplicationLiveView{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationLiveViewArrayInput)(nil)).Elem(), SpringCloudApplicationLiveViewArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApplicationLiveViewMapInput)(nil)).Elem(), SpringCloudApplicationLiveViewMap{})
pulumi.RegisterOutputType(SpringCloudApplicationLiveViewOutput{})
pulumi.RegisterOutputType(SpringCloudApplicationLiveViewArrayOutput{})
pulumi.RegisterOutputType(SpringCloudApplicationLiveViewMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/getSpringCloudService.go | sdk/go/azure/appplatform/getSpringCloudService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Spring Cloud Service.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudService` data source is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := appplatform.LookupSpringCloudService(ctx, &appplatform.LookupSpringCloudServiceArgs{
// Name: exampleAzurermSpringCloudService.Name,
// ResourceGroupName: exampleAzurermSpringCloudService.ResourceGroupName,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("springCloudServiceId", example.Id)
// return nil
// })
// }
//
// ```
func LookupSpringCloudService(ctx *pulumi.Context, args *LookupSpringCloudServiceArgs, opts ...pulumi.InvokeOption) (*LookupSpringCloudServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSpringCloudServiceResult
err := ctx.Invoke("azure:appplatform/getSpringCloudService:getSpringCloudService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSpringCloudService.
type LookupSpringCloudServiceArgs struct {
// Specifies The name of the Spring Cloud Service resource.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group where the Spring Cloud Service exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getSpringCloudService.
type LookupSpringCloudServiceResult struct {
// A `configServerGitSetting` block as defined below.
ConfigServerGitSettings []GetSpringCloudServiceConfigServerGitSetting `pulumi:"configServerGitSettings"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The location of Spring Cloud Service.
Location string `pulumi:"location"`
// The name to identify on the Git repository.
Name string `pulumi:"name"`
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
OutboundPublicIpAddresses []string `pulumi:"outboundPublicIpAddresses"`
// A list of `requiredNetworkTrafficRules` blocks as defined below.
RequiredNetworkTrafficRules []GetSpringCloudServiceRequiredNetworkTrafficRule `pulumi:"requiredNetworkTrafficRules"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to Spring Cloud Service.
Tags map[string]string `pulumi:"tags"`
}
func LookupSpringCloudServiceOutput(ctx *pulumi.Context, args LookupSpringCloudServiceOutputArgs, opts ...pulumi.InvokeOption) LookupSpringCloudServiceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSpringCloudServiceResultOutput, error) {
args := v.(LookupSpringCloudServiceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:appplatform/getSpringCloudService:getSpringCloudService", args, LookupSpringCloudServiceResultOutput{}, options).(LookupSpringCloudServiceResultOutput), nil
}).(LookupSpringCloudServiceResultOutput)
}
// A collection of arguments for invoking getSpringCloudService.
type LookupSpringCloudServiceOutputArgs struct {
// Specifies The name of the Spring Cloud Service resource.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the Resource Group where the Spring Cloud Service exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupSpringCloudServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSpringCloudServiceArgs)(nil)).Elem()
}
// A collection of values returned by getSpringCloudService.
type LookupSpringCloudServiceResultOutput struct{ *pulumi.OutputState }
func (LookupSpringCloudServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSpringCloudServiceResult)(nil)).Elem()
}
func (o LookupSpringCloudServiceResultOutput) ToLookupSpringCloudServiceResultOutput() LookupSpringCloudServiceResultOutput {
return o
}
func (o LookupSpringCloudServiceResultOutput) ToLookupSpringCloudServiceResultOutputWithContext(ctx context.Context) LookupSpringCloudServiceResultOutput {
return o
}
// A `configServerGitSetting` block as defined below.
func (o LookupSpringCloudServiceResultOutput) ConfigServerGitSettings() GetSpringCloudServiceConfigServerGitSettingArrayOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) []GetSpringCloudServiceConfigServerGitSetting {
return v.ConfigServerGitSettings
}).(GetSpringCloudServiceConfigServerGitSettingArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSpringCloudServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The location of Spring Cloud Service.
func (o LookupSpringCloudServiceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) string { return v.Location }).(pulumi.StringOutput)
}
// The name to identify on the Git repository.
func (o LookupSpringCloudServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// A list of the outbound Public IP Addresses used by this Spring Cloud Service.
func (o LookupSpringCloudServiceResultOutput) OutboundPublicIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) []string { return v.OutboundPublicIpAddresses }).(pulumi.StringArrayOutput)
}
// A list of `requiredNetworkTrafficRules` blocks as defined below.
func (o LookupSpringCloudServiceResultOutput) RequiredNetworkTrafficRules() GetSpringCloudServiceRequiredNetworkTrafficRuleArrayOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) []GetSpringCloudServiceRequiredNetworkTrafficRule {
return v.RequiredNetworkTrafficRules
}).(GetSpringCloudServiceRequiredNetworkTrafficRuleArrayOutput)
}
func (o LookupSpringCloudServiceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to Spring Cloud Service.
func (o LookupSpringCloudServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupSpringCloudServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSpringCloudServiceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudApiPortalCustomDomain.go | sdk/go/azure/appplatform/springCloudApiPortalCustomDomain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud API Portal Domain.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudApiPortalCustomDomain` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudGateway, err := appplatform.NewSpringCloudGateway(ctx, "example", &appplatform.SpringCloudGatewayArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudApiPortal, err := appplatform.NewSpringCloudApiPortal(ctx, "example", &appplatform.SpringCloudApiPortalArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// GatewayIds: pulumi.StringArray{
// exampleSpringCloudGateway.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudApiPortalCustomDomain(ctx, "example", &appplatform.SpringCloudApiPortalCustomDomainArgs{
// Name: pulumi.String("example.com"),
// SpringCloudApiPortalId: exampleSpringCloudApiPortal.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud API Portal Domains can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudApiPortalCustomDomain:SpringCloudApiPortalCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/apiPortals/apiPortal1/domains/domain1
// ```
type SpringCloudApiPortalCustomDomain struct {
pulumi.CustomResourceState
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
SpringCloudApiPortalId pulumi.StringOutput `pulumi:"springCloudApiPortalId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
Thumbprint pulumi.StringPtrOutput `pulumi:"thumbprint"`
}
// NewSpringCloudApiPortalCustomDomain registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudApiPortalCustomDomain(ctx *pulumi.Context,
name string, args *SpringCloudApiPortalCustomDomainArgs, opts ...pulumi.ResourceOption) (*SpringCloudApiPortalCustomDomain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudApiPortalId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudApiPortalId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudApiPortalCustomDomain
err := ctx.RegisterResource("azure:appplatform/springCloudApiPortalCustomDomain:SpringCloudApiPortalCustomDomain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudApiPortalCustomDomain gets an existing SpringCloudApiPortalCustomDomain resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudApiPortalCustomDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudApiPortalCustomDomainState, opts ...pulumi.ResourceOption) (*SpringCloudApiPortalCustomDomain, error) {
var resource SpringCloudApiPortalCustomDomain
err := ctx.ReadResource("azure:appplatform/springCloudApiPortalCustomDomain:SpringCloudApiPortalCustomDomain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudApiPortalCustomDomain resources.
type springCloudApiPortalCustomDomainState struct {
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
SpringCloudApiPortalId *string `pulumi:"springCloudApiPortalId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
Thumbprint *string `pulumi:"thumbprint"`
}
type SpringCloudApiPortalCustomDomainState struct {
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
SpringCloudApiPortalId pulumi.StringPtrInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudApiPortalCustomDomainState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApiPortalCustomDomainState)(nil)).Elem()
}
type springCloudApiPortalCustomDomainArgs struct {
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
SpringCloudApiPortalId string `pulumi:"springCloudApiPortalId"`
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
Thumbprint *string `pulumi:"thumbprint"`
}
// The set of arguments for constructing a SpringCloudApiPortalCustomDomain resource.
type SpringCloudApiPortalCustomDomainArgs struct {
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
SpringCloudApiPortalId pulumi.StringInput
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
Thumbprint pulumi.StringPtrInput
}
func (SpringCloudApiPortalCustomDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudApiPortalCustomDomainArgs)(nil)).Elem()
}
type SpringCloudApiPortalCustomDomainInput interface {
pulumi.Input
ToSpringCloudApiPortalCustomDomainOutput() SpringCloudApiPortalCustomDomainOutput
ToSpringCloudApiPortalCustomDomainOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainOutput
}
func (*SpringCloudApiPortalCustomDomain) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (i *SpringCloudApiPortalCustomDomain) ToSpringCloudApiPortalCustomDomainOutput() SpringCloudApiPortalCustomDomainOutput {
return i.ToSpringCloudApiPortalCustomDomainOutputWithContext(context.Background())
}
func (i *SpringCloudApiPortalCustomDomain) ToSpringCloudApiPortalCustomDomainOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalCustomDomainOutput)
}
// SpringCloudApiPortalCustomDomainArrayInput is an input type that accepts SpringCloudApiPortalCustomDomainArray and SpringCloudApiPortalCustomDomainArrayOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalCustomDomainArrayInput` via:
//
// SpringCloudApiPortalCustomDomainArray{ SpringCloudApiPortalCustomDomainArgs{...} }
type SpringCloudApiPortalCustomDomainArrayInput interface {
pulumi.Input
ToSpringCloudApiPortalCustomDomainArrayOutput() SpringCloudApiPortalCustomDomainArrayOutput
ToSpringCloudApiPortalCustomDomainArrayOutputWithContext(context.Context) SpringCloudApiPortalCustomDomainArrayOutput
}
type SpringCloudApiPortalCustomDomainArray []SpringCloudApiPortalCustomDomainInput
func (SpringCloudApiPortalCustomDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (i SpringCloudApiPortalCustomDomainArray) ToSpringCloudApiPortalCustomDomainArrayOutput() SpringCloudApiPortalCustomDomainArrayOutput {
return i.ToSpringCloudApiPortalCustomDomainArrayOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalCustomDomainArray) ToSpringCloudApiPortalCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalCustomDomainArrayOutput)
}
// SpringCloudApiPortalCustomDomainMapInput is an input type that accepts SpringCloudApiPortalCustomDomainMap and SpringCloudApiPortalCustomDomainMapOutput values.
// You can construct a concrete instance of `SpringCloudApiPortalCustomDomainMapInput` via:
//
// SpringCloudApiPortalCustomDomainMap{ "key": SpringCloudApiPortalCustomDomainArgs{...} }
type SpringCloudApiPortalCustomDomainMapInput interface {
pulumi.Input
ToSpringCloudApiPortalCustomDomainMapOutput() SpringCloudApiPortalCustomDomainMapOutput
ToSpringCloudApiPortalCustomDomainMapOutputWithContext(context.Context) SpringCloudApiPortalCustomDomainMapOutput
}
type SpringCloudApiPortalCustomDomainMap map[string]SpringCloudApiPortalCustomDomainInput
func (SpringCloudApiPortalCustomDomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (i SpringCloudApiPortalCustomDomainMap) ToSpringCloudApiPortalCustomDomainMapOutput() SpringCloudApiPortalCustomDomainMapOutput {
return i.ToSpringCloudApiPortalCustomDomainMapOutputWithContext(context.Background())
}
func (i SpringCloudApiPortalCustomDomainMap) ToSpringCloudApiPortalCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudApiPortalCustomDomainMapOutput)
}
type SpringCloudApiPortalCustomDomainOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalCustomDomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (o SpringCloudApiPortalCustomDomainOutput) ToSpringCloudApiPortalCustomDomainOutput() SpringCloudApiPortalCustomDomainOutput {
return o
}
func (o SpringCloudApiPortalCustomDomainOutput) ToSpringCloudApiPortalCustomDomainOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainOutput {
return o
}
// The name which should be used for this Spring Cloud API Portal Domain. Changing this forces a new Spring Cloud API Portal Domain to be created.
func (o SpringCloudApiPortalCustomDomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApiPortalCustomDomain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud API Portal. Changing this forces a new Spring Cloud API Portal Domain to be created.
func (o SpringCloudApiPortalCustomDomainOutput) SpringCloudApiPortalId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudApiPortalCustomDomain) pulumi.StringOutput { return v.SpringCloudApiPortalId }).(pulumi.StringOutput)
}
// Specifies the thumbprint of the Spring Cloud Certificate that binds to the Spring Cloud API Portal Domain.
func (o SpringCloudApiPortalCustomDomainOutput) Thumbprint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudApiPortalCustomDomain) pulumi.StringPtrOutput { return v.Thumbprint }).(pulumi.StringPtrOutput)
}
type SpringCloudApiPortalCustomDomainArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalCustomDomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (o SpringCloudApiPortalCustomDomainArrayOutput) ToSpringCloudApiPortalCustomDomainArrayOutput() SpringCloudApiPortalCustomDomainArrayOutput {
return o
}
func (o SpringCloudApiPortalCustomDomainArrayOutput) ToSpringCloudApiPortalCustomDomainArrayOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainArrayOutput {
return o
}
func (o SpringCloudApiPortalCustomDomainArrayOutput) Index(i pulumi.IntInput) SpringCloudApiPortalCustomDomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudApiPortalCustomDomain {
return vs[0].([]*SpringCloudApiPortalCustomDomain)[vs[1].(int)]
}).(SpringCloudApiPortalCustomDomainOutput)
}
type SpringCloudApiPortalCustomDomainMapOutput struct{ *pulumi.OutputState }
func (SpringCloudApiPortalCustomDomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudApiPortalCustomDomain)(nil)).Elem()
}
func (o SpringCloudApiPortalCustomDomainMapOutput) ToSpringCloudApiPortalCustomDomainMapOutput() SpringCloudApiPortalCustomDomainMapOutput {
return o
}
func (o SpringCloudApiPortalCustomDomainMapOutput) ToSpringCloudApiPortalCustomDomainMapOutputWithContext(ctx context.Context) SpringCloudApiPortalCustomDomainMapOutput {
return o
}
func (o SpringCloudApiPortalCustomDomainMapOutput) MapIndex(k pulumi.StringInput) SpringCloudApiPortalCustomDomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudApiPortalCustomDomain {
return vs[0].(map[string]*SpringCloudApiPortalCustomDomain)[vs[1].(string)]
}).(SpringCloudApiPortalCustomDomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalCustomDomainInput)(nil)).Elem(), &SpringCloudApiPortalCustomDomain{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalCustomDomainArrayInput)(nil)).Elem(), SpringCloudApiPortalCustomDomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudApiPortalCustomDomainMapInput)(nil)).Elem(), SpringCloudApiPortalCustomDomainMap{})
pulumi.RegisterOutputType(SpringCloudApiPortalCustomDomainOutput{})
pulumi.RegisterOutputType(SpringCloudApiPortalCustomDomainArrayOutput{})
pulumi.RegisterOutputType(SpringCloudApiPortalCustomDomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudDynatraceApplicationPerformanceMonitoring.go | sdk/go/azure/appplatform/springCloudDynatraceApplicationPerformanceMonitoring.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is only applicable for Spring Cloud Service enterprise tier
//
// Manages a Spring Cloud Application Performance Monitoring resource for Dynatrace.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudDynatraceApplicationPerformanceMonitoring` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudDynatraceApplicationPerformanceMonitoring(ctx, "example", &appplatform.SpringCloudDynatraceApplicationPerformanceMonitoringArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// GloballyEnabled: pulumi.Bool(true),
// ApiUrl: pulumi.String("https://example-api-url.com"),
// ApiToken: pulumi.String("dt0s01.AAAAAAAAAAAAAAAAAAAAAAAA.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"),
// EnvironmentId: pulumi.String("example-environment-id"),
// Tenant: pulumi.String("example-tenant"),
// TenantToken: pulumi.String("dt0s01.AAAAAAAAAAAAAAAAAAAAAAAA.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"),
// ConnectionPoint: pulumi.String("https://example.live.dynatrace.com:443"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AppPlatform` - 2024-01-01-preview
//
// ## Import
//
// Spring Cloud Application Performance Monitoring resource for Dynatrace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudDynatraceApplicationPerformanceMonitoring:SpringCloudDynatraceApplicationPerformanceMonitoring example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AppPlatform/spring/service1/apms/apm1
// ```
type SpringCloudDynatraceApplicationPerformanceMonitoring struct {
pulumi.CustomResourceState
// Specifies the API token of the Dynatrace environment.
ApiToken pulumi.StringPtrOutput `pulumi:"apiToken"`
// Specifies the API Url of the Dynatrace environment.
ApiUrl pulumi.StringPtrOutput `pulumi:"apiUrl"`
// Specifies the endpoint to connect to the Dynatrace environment.
ConnectionPoint pulumi.StringOutput `pulumi:"connectionPoint"`
// Specifies the Dynatrace environment ID.
EnvironmentId pulumi.StringPtrOutput `pulumi:"environmentId"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrOutput `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// Specifies the Dynatrace tenant.
Tenant pulumi.StringOutput `pulumi:"tenant"`
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
TenantToken pulumi.StringOutput `pulumi:"tenantToken"`
}
// NewSpringCloudDynatraceApplicationPerformanceMonitoring registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudDynatraceApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, args *SpringCloudDynatraceApplicationPerformanceMonitoringArgs, opts ...pulumi.ResourceOption) (*SpringCloudDynatraceApplicationPerformanceMonitoring, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ConnectionPoint == nil {
return nil, errors.New("invalid value for required argument 'ConnectionPoint'")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.Tenant == nil {
return nil, errors.New("invalid value for required argument 'Tenant'")
}
if args.TenantToken == nil {
return nil, errors.New("invalid value for required argument 'TenantToken'")
}
if args.ApiToken != nil {
args.ApiToken = pulumi.ToSecret(args.ApiToken).(pulumi.StringPtrInput)
}
if args.Tenant != nil {
args.Tenant = pulumi.ToSecret(args.Tenant).(pulumi.StringInput)
}
if args.TenantToken != nil {
args.TenantToken = pulumi.ToSecret(args.TenantToken).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"apiToken",
"tenant",
"tenantToken",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudDynatraceApplicationPerformanceMonitoring
err := ctx.RegisterResource("azure:appplatform/springCloudDynatraceApplicationPerformanceMonitoring:SpringCloudDynatraceApplicationPerformanceMonitoring", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudDynatraceApplicationPerformanceMonitoring gets an existing SpringCloudDynatraceApplicationPerformanceMonitoring resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudDynatraceApplicationPerformanceMonitoring(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudDynatraceApplicationPerformanceMonitoringState, opts ...pulumi.ResourceOption) (*SpringCloudDynatraceApplicationPerformanceMonitoring, error) {
var resource SpringCloudDynatraceApplicationPerformanceMonitoring
err := ctx.ReadResource("azure:appplatform/springCloudDynatraceApplicationPerformanceMonitoring:SpringCloudDynatraceApplicationPerformanceMonitoring", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudDynatraceApplicationPerformanceMonitoring resources.
type springCloudDynatraceApplicationPerformanceMonitoringState struct {
// Specifies the API token of the Dynatrace environment.
ApiToken *string `pulumi:"apiToken"`
// Specifies the API Url of the Dynatrace environment.
ApiUrl *string `pulumi:"apiUrl"`
// Specifies the endpoint to connect to the Dynatrace environment.
ConnectionPoint *string `pulumi:"connectionPoint"`
// Specifies the Dynatrace environment ID.
EnvironmentId *string `pulumi:"environmentId"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// Specifies the Dynatrace tenant.
Tenant *string `pulumi:"tenant"`
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
TenantToken *string `pulumi:"tenantToken"`
}
type SpringCloudDynatraceApplicationPerformanceMonitoringState struct {
// Specifies the API token of the Dynatrace environment.
ApiToken pulumi.StringPtrInput
// Specifies the API Url of the Dynatrace environment.
ApiUrl pulumi.StringPtrInput
// Specifies the endpoint to connect to the Dynatrace environment.
ConnectionPoint pulumi.StringPtrInput
// Specifies the Dynatrace environment ID.
EnvironmentId pulumi.StringPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringPtrInput
// Specifies the Dynatrace tenant.
Tenant pulumi.StringPtrInput
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
TenantToken pulumi.StringPtrInput
}
func (SpringCloudDynatraceApplicationPerformanceMonitoringState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudDynatraceApplicationPerformanceMonitoringState)(nil)).Elem()
}
type springCloudDynatraceApplicationPerformanceMonitoringArgs struct {
// Specifies the API token of the Dynatrace environment.
ApiToken *string `pulumi:"apiToken"`
// Specifies the API Url of the Dynatrace environment.
ApiUrl *string `pulumi:"apiUrl"`
// Specifies the endpoint to connect to the Dynatrace environment.
ConnectionPoint string `pulumi:"connectionPoint"`
// Specifies the Dynatrace environment ID.
EnvironmentId *string `pulumi:"environmentId"`
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled *bool `pulumi:"globallyEnabled"`
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// Specifies the Dynatrace tenant.
Tenant string `pulumi:"tenant"`
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
TenantToken string `pulumi:"tenantToken"`
}
// The set of arguments for constructing a SpringCloudDynatraceApplicationPerformanceMonitoring resource.
type SpringCloudDynatraceApplicationPerformanceMonitoringArgs struct {
// Specifies the API token of the Dynatrace environment.
ApiToken pulumi.StringPtrInput
// Specifies the API Url of the Dynatrace environment.
ApiUrl pulumi.StringPtrInput
// Specifies the endpoint to connect to the Dynatrace environment.
ConnectionPoint pulumi.StringInput
// Specifies the Dynatrace environment ID.
EnvironmentId pulumi.StringPtrInput
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
GloballyEnabled pulumi.BoolPtrInput
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
SpringCloudServiceId pulumi.StringInput
// Specifies the Dynatrace tenant.
Tenant pulumi.StringInput
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
TenantToken pulumi.StringInput
}
func (SpringCloudDynatraceApplicationPerformanceMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudDynatraceApplicationPerformanceMonitoringArgs)(nil)).Elem()
}
type SpringCloudDynatraceApplicationPerformanceMonitoringInput interface {
pulumi.Input
ToSpringCloudDynatraceApplicationPerformanceMonitoringOutput() SpringCloudDynatraceApplicationPerformanceMonitoringOutput
ToSpringCloudDynatraceApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringOutput
}
func (*SpringCloudDynatraceApplicationPerformanceMonitoring) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i *SpringCloudDynatraceApplicationPerformanceMonitoring) ToSpringCloudDynatraceApplicationPerformanceMonitoringOutput() SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return i.ToSpringCloudDynatraceApplicationPerformanceMonitoringOutputWithContext(context.Background())
}
func (i *SpringCloudDynatraceApplicationPerformanceMonitoring) ToSpringCloudDynatraceApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDynatraceApplicationPerformanceMonitoringOutput)
}
// SpringCloudDynatraceApplicationPerformanceMonitoringArrayInput is an input type that accepts SpringCloudDynatraceApplicationPerformanceMonitoringArray and SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput values.
// You can construct a concrete instance of `SpringCloudDynatraceApplicationPerformanceMonitoringArrayInput` via:
//
// SpringCloudDynatraceApplicationPerformanceMonitoringArray{ SpringCloudDynatraceApplicationPerformanceMonitoringArgs{...} }
type SpringCloudDynatraceApplicationPerformanceMonitoringArrayInput interface {
pulumi.Input
ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput() SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput
ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutputWithContext(context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput
}
type SpringCloudDynatraceApplicationPerformanceMonitoringArray []SpringCloudDynatraceApplicationPerformanceMonitoringInput
func (SpringCloudDynatraceApplicationPerformanceMonitoringArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudDynatraceApplicationPerformanceMonitoringArray) ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput() SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput {
return i.ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutputWithContext(context.Background())
}
func (i SpringCloudDynatraceApplicationPerformanceMonitoringArray) ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput)
}
// SpringCloudDynatraceApplicationPerformanceMonitoringMapInput is an input type that accepts SpringCloudDynatraceApplicationPerformanceMonitoringMap and SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput values.
// You can construct a concrete instance of `SpringCloudDynatraceApplicationPerformanceMonitoringMapInput` via:
//
// SpringCloudDynatraceApplicationPerformanceMonitoringMap{ "key": SpringCloudDynatraceApplicationPerformanceMonitoringArgs{...} }
type SpringCloudDynatraceApplicationPerformanceMonitoringMapInput interface {
pulumi.Input
ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutput() SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput
ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutputWithContext(context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput
}
type SpringCloudDynatraceApplicationPerformanceMonitoringMap map[string]SpringCloudDynatraceApplicationPerformanceMonitoringInput
func (SpringCloudDynatraceApplicationPerformanceMonitoringMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (i SpringCloudDynatraceApplicationPerformanceMonitoringMap) ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutput() SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput {
return i.ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutputWithContext(context.Background())
}
func (i SpringCloudDynatraceApplicationPerformanceMonitoringMap) ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput)
}
type SpringCloudDynatraceApplicationPerformanceMonitoringOutput struct{ *pulumi.OutputState }
func (SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringOutput() SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return o
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return o
}
// Specifies the API token of the Dynatrace environment.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ApiToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.ApiToken
}).(pulumi.StringPtrOutput)
}
// Specifies the API Url of the Dynatrace environment.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ApiUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringPtrOutput { return v.ApiUrl }).(pulumi.StringPtrOutput)
}
// Specifies the endpoint to connect to the Dynatrace environment.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) ConnectionPoint() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.ConnectionPoint
}).(pulumi.StringOutput)
}
// Specifies the Dynatrace environment ID.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) EnvironmentId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringPtrOutput {
return v.EnvironmentId
}).(pulumi.StringPtrOutput)
}
// Specifies whether the Spring Cloud Application Performance Monitoring resource for Application Insights is enabled globally. Defaults to `false`.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) GloballyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.BoolPtrOutput {
return v.GloballyEnabled
}).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Spring Cloud Application Performance Monitoring resource for Dynatrace. Changing this forces a new resource to be created.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new resource to be created.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.SpringCloudServiceId
}).(pulumi.StringOutput)
}
// Specifies the Dynatrace tenant.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) Tenant() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringOutput { return v.Tenant }).(pulumi.StringOutput)
}
// Specifies the internal token that is used for authentication when OneAgent connects to the Dynatrace cluster to send data.
func (o SpringCloudDynatraceApplicationPerformanceMonitoringOutput) TenantToken() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudDynatraceApplicationPerformanceMonitoring) pulumi.StringOutput {
return v.TenantToken
}).(pulumi.StringOutput)
}
type SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput() SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringArrayOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput {
return o
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput) Index(i pulumi.IntInput) SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudDynatraceApplicationPerformanceMonitoring {
return vs[0].([]*SpringCloudDynatraceApplicationPerformanceMonitoring)[vs[1].(int)]
}).(SpringCloudDynatraceApplicationPerformanceMonitoringOutput)
}
type SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput struct{ *pulumi.OutputState }
func (SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudDynatraceApplicationPerformanceMonitoring)(nil)).Elem()
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutput() SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput) ToSpringCloudDynatraceApplicationPerformanceMonitoringMapOutputWithContext(ctx context.Context) SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput {
return o
}
func (o SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput) MapIndex(k pulumi.StringInput) SpringCloudDynatraceApplicationPerformanceMonitoringOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudDynatraceApplicationPerformanceMonitoring {
return vs[0].(map[string]*SpringCloudDynatraceApplicationPerformanceMonitoring)[vs[1].(string)]
}).(SpringCloudDynatraceApplicationPerformanceMonitoringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDynatraceApplicationPerformanceMonitoringInput)(nil)).Elem(), &SpringCloudDynatraceApplicationPerformanceMonitoring{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDynatraceApplicationPerformanceMonitoringArrayInput)(nil)).Elem(), SpringCloudDynatraceApplicationPerformanceMonitoringArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudDynatraceApplicationPerformanceMonitoringMapInput)(nil)).Elem(), SpringCloudDynatraceApplicationPerformanceMonitoringMap{})
pulumi.RegisterOutputType(SpringCloudDynatraceApplicationPerformanceMonitoringOutput{})
pulumi.RegisterOutputType(SpringCloudDynatraceApplicationPerformanceMonitoringArrayOutput{})
pulumi.RegisterOutputType(SpringCloudDynatraceApplicationPerformanceMonitoringMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudStorage.go | sdk/go/azure/appplatform/springCloudStorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Storage.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudStorage` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudStorage(ctx, "example", &appplatform.SpringCloudStorageArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// StorageAccountName: exampleAccount.Name,
// StorageAccountKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Storages can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudStorage:SpringCloudStorage example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/storages/storage1
// ```
type SpringCloudStorage struct {
pulumi.CustomResourceState
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// The access key of the Azure Storage Account.
StorageAccountKey pulumi.StringOutput `pulumi:"storageAccountKey"`
// The account name of the Azure Storage Account.
StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"`
}
// NewSpringCloudStorage registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudStorage(ctx *pulumi.Context,
name string, args *SpringCloudStorageArgs, opts ...pulumi.ResourceOption) (*SpringCloudStorage, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.StorageAccountKey == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountKey'")
}
if args.StorageAccountName == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudStorage
err := ctx.RegisterResource("azure:appplatform/springCloudStorage:SpringCloudStorage", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudStorage gets an existing SpringCloudStorage resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudStorage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudStorageState, opts ...pulumi.ResourceOption) (*SpringCloudStorage, error) {
var resource SpringCloudStorage
err := ctx.ReadResource("azure:appplatform/springCloudStorage:SpringCloudStorage", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudStorage resources.
type springCloudStorageState struct {
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// The access key of the Azure Storage Account.
StorageAccountKey *string `pulumi:"storageAccountKey"`
// The account name of the Azure Storage Account.
StorageAccountName *string `pulumi:"storageAccountName"`
}
type SpringCloudStorageState struct {
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
SpringCloudServiceId pulumi.StringPtrInput
// The access key of the Azure Storage Account.
StorageAccountKey pulumi.StringPtrInput
// The account name of the Azure Storage Account.
StorageAccountName pulumi.StringPtrInput
}
func (SpringCloudStorageState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudStorageState)(nil)).Elem()
}
type springCloudStorageArgs struct {
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// The access key of the Azure Storage Account.
StorageAccountKey string `pulumi:"storageAccountKey"`
// The account name of the Azure Storage Account.
StorageAccountName string `pulumi:"storageAccountName"`
}
// The set of arguments for constructing a SpringCloudStorage resource.
type SpringCloudStorageArgs struct {
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
SpringCloudServiceId pulumi.StringInput
// The access key of the Azure Storage Account.
StorageAccountKey pulumi.StringInput
// The account name of the Azure Storage Account.
StorageAccountName pulumi.StringInput
}
func (SpringCloudStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudStorageArgs)(nil)).Elem()
}
type SpringCloudStorageInput interface {
pulumi.Input
ToSpringCloudStorageOutput() SpringCloudStorageOutput
ToSpringCloudStorageOutputWithContext(ctx context.Context) SpringCloudStorageOutput
}
func (*SpringCloudStorage) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudStorage)(nil)).Elem()
}
func (i *SpringCloudStorage) ToSpringCloudStorageOutput() SpringCloudStorageOutput {
return i.ToSpringCloudStorageOutputWithContext(context.Background())
}
func (i *SpringCloudStorage) ToSpringCloudStorageOutputWithContext(ctx context.Context) SpringCloudStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudStorageOutput)
}
// SpringCloudStorageArrayInput is an input type that accepts SpringCloudStorageArray and SpringCloudStorageArrayOutput values.
// You can construct a concrete instance of `SpringCloudStorageArrayInput` via:
//
// SpringCloudStorageArray{ SpringCloudStorageArgs{...} }
type SpringCloudStorageArrayInput interface {
pulumi.Input
ToSpringCloudStorageArrayOutput() SpringCloudStorageArrayOutput
ToSpringCloudStorageArrayOutputWithContext(context.Context) SpringCloudStorageArrayOutput
}
type SpringCloudStorageArray []SpringCloudStorageInput
func (SpringCloudStorageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudStorage)(nil)).Elem()
}
func (i SpringCloudStorageArray) ToSpringCloudStorageArrayOutput() SpringCloudStorageArrayOutput {
return i.ToSpringCloudStorageArrayOutputWithContext(context.Background())
}
func (i SpringCloudStorageArray) ToSpringCloudStorageArrayOutputWithContext(ctx context.Context) SpringCloudStorageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudStorageArrayOutput)
}
// SpringCloudStorageMapInput is an input type that accepts SpringCloudStorageMap and SpringCloudStorageMapOutput values.
// You can construct a concrete instance of `SpringCloudStorageMapInput` via:
//
// SpringCloudStorageMap{ "key": SpringCloudStorageArgs{...} }
type SpringCloudStorageMapInput interface {
pulumi.Input
ToSpringCloudStorageMapOutput() SpringCloudStorageMapOutput
ToSpringCloudStorageMapOutputWithContext(context.Context) SpringCloudStorageMapOutput
}
type SpringCloudStorageMap map[string]SpringCloudStorageInput
func (SpringCloudStorageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudStorage)(nil)).Elem()
}
func (i SpringCloudStorageMap) ToSpringCloudStorageMapOutput() SpringCloudStorageMapOutput {
return i.ToSpringCloudStorageMapOutputWithContext(context.Background())
}
func (i SpringCloudStorageMap) ToSpringCloudStorageMapOutputWithContext(ctx context.Context) SpringCloudStorageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudStorageMapOutput)
}
type SpringCloudStorageOutput struct{ *pulumi.OutputState }
func (SpringCloudStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudStorage)(nil)).Elem()
}
func (o SpringCloudStorageOutput) ToSpringCloudStorageOutput() SpringCloudStorageOutput {
return o
}
func (o SpringCloudStorageOutput) ToSpringCloudStorageOutputWithContext(ctx context.Context) SpringCloudStorageOutput {
return o
}
// The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
func (o SpringCloudStorageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudStorage) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
func (o SpringCloudStorageOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudStorage) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
// The access key of the Azure Storage Account.
func (o SpringCloudStorageOutput) StorageAccountKey() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudStorage) pulumi.StringOutput { return v.StorageAccountKey }).(pulumi.StringOutput)
}
// The account name of the Azure Storage Account.
func (o SpringCloudStorageOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudStorage) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput)
}
type SpringCloudStorageArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudStorageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudStorage)(nil)).Elem()
}
func (o SpringCloudStorageArrayOutput) ToSpringCloudStorageArrayOutput() SpringCloudStorageArrayOutput {
return o
}
func (o SpringCloudStorageArrayOutput) ToSpringCloudStorageArrayOutputWithContext(ctx context.Context) SpringCloudStorageArrayOutput {
return o
}
func (o SpringCloudStorageArrayOutput) Index(i pulumi.IntInput) SpringCloudStorageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudStorage {
return vs[0].([]*SpringCloudStorage)[vs[1].(int)]
}).(SpringCloudStorageOutput)
}
type SpringCloudStorageMapOutput struct{ *pulumi.OutputState }
func (SpringCloudStorageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudStorage)(nil)).Elem()
}
func (o SpringCloudStorageMapOutput) ToSpringCloudStorageMapOutput() SpringCloudStorageMapOutput {
return o
}
func (o SpringCloudStorageMapOutput) ToSpringCloudStorageMapOutputWithContext(ctx context.Context) SpringCloudStorageMapOutput {
return o
}
func (o SpringCloudStorageMapOutput) MapIndex(k pulumi.StringInput) SpringCloudStorageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudStorage {
return vs[0].(map[string]*SpringCloudStorage)[vs[1].(string)]
}).(SpringCloudStorageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudStorageInput)(nil)).Elem(), &SpringCloudStorage{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudStorageArrayInput)(nil)).Elem(), SpringCloudStorageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudStorageMapInput)(nil)).Elem(), SpringCloudStorageMap{})
pulumi.RegisterOutputType(SpringCloudStorageOutput{})
pulumi.RegisterOutputType(SpringCloudStorageArrayOutput{})
pulumi.RegisterOutputType(SpringCloudStorageMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudBuilder.go | sdk/go/azure/appplatform/springCloudBuilder.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spring Cloud Builder.
//
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudBuilder` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example-springcloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudBuilder(ctx, "example", &appplatform.SpringCloudBuilderArgs{
// Name: pulumi.String("example"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// BuildPackGroups: appplatform.SpringCloudBuilderBuildPackGroupArray{
// &appplatform.SpringCloudBuilderBuildPackGroupArgs{
// Name: pulumi.String("mix"),
// BuildPackIds: pulumi.StringArray{
// pulumi.String("tanzu-buildpacks/java-azure"),
// },
// },
// },
// Stack: &appplatform.SpringCloudBuilderStackArgs{
// Id: pulumi.String("io.buildpacks.stacks.bionic"),
// Version: pulumi.String("base"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Builders can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudBuilder:SpringCloudBuilder example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/buildServices/buildService1/builders/builder1
// ```
type SpringCloudBuilder struct {
pulumi.CustomResourceState
// One or more `buildPackGroup` blocks as defined below.
BuildPackGroups SpringCloudBuilderBuildPackGroupArrayOutput `pulumi:"buildPackGroups"`
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
// A `stack` block as defined below.
Stack SpringCloudBuilderStackOutput `pulumi:"stack"`
}
// NewSpringCloudBuilder registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudBuilder(ctx *pulumi.Context,
name string, args *SpringCloudBuilderArgs, opts ...pulumi.ResourceOption) (*SpringCloudBuilder, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BuildPackGroups == nil {
return nil, errors.New("invalid value for required argument 'BuildPackGroups'")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
if args.Stack == nil {
return nil, errors.New("invalid value for required argument 'Stack'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudBuilder
err := ctx.RegisterResource("azure:appplatform/springCloudBuilder:SpringCloudBuilder", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudBuilder gets an existing SpringCloudBuilder resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudBuilder(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudBuilderState, opts ...pulumi.ResourceOption) (*SpringCloudBuilder, error) {
var resource SpringCloudBuilder
err := ctx.ReadResource("azure:appplatform/springCloudBuilder:SpringCloudBuilder", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudBuilder resources.
type springCloudBuilderState struct {
// One or more `buildPackGroup` blocks as defined below.
BuildPackGroups []SpringCloudBuilderBuildPackGroup `pulumi:"buildPackGroups"`
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
// A `stack` block as defined below.
Stack *SpringCloudBuilderStack `pulumi:"stack"`
}
type SpringCloudBuilderState struct {
// One or more `buildPackGroup` blocks as defined below.
BuildPackGroups SpringCloudBuilderBuildPackGroupArrayInput
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
SpringCloudServiceId pulumi.StringPtrInput
// A `stack` block as defined below.
Stack SpringCloudBuilderStackPtrInput
}
func (SpringCloudBuilderState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuilderState)(nil)).Elem()
}
type springCloudBuilderArgs struct {
// One or more `buildPackGroup` blocks as defined below.
BuildPackGroups []SpringCloudBuilderBuildPackGroup `pulumi:"buildPackGroups"`
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
// A `stack` block as defined below.
Stack SpringCloudBuilderStack `pulumi:"stack"`
}
// The set of arguments for constructing a SpringCloudBuilder resource.
type SpringCloudBuilderArgs struct {
// One or more `buildPackGroup` blocks as defined below.
BuildPackGroups SpringCloudBuilderBuildPackGroupArrayInput
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
SpringCloudServiceId pulumi.StringInput
// A `stack` block as defined below.
Stack SpringCloudBuilderStackInput
}
func (SpringCloudBuilderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudBuilderArgs)(nil)).Elem()
}
type SpringCloudBuilderInput interface {
pulumi.Input
ToSpringCloudBuilderOutput() SpringCloudBuilderOutput
ToSpringCloudBuilderOutputWithContext(ctx context.Context) SpringCloudBuilderOutput
}
func (*SpringCloudBuilder) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuilder)(nil)).Elem()
}
func (i *SpringCloudBuilder) ToSpringCloudBuilderOutput() SpringCloudBuilderOutput {
return i.ToSpringCloudBuilderOutputWithContext(context.Background())
}
func (i *SpringCloudBuilder) ToSpringCloudBuilderOutputWithContext(ctx context.Context) SpringCloudBuilderOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuilderOutput)
}
// SpringCloudBuilderArrayInput is an input type that accepts SpringCloudBuilderArray and SpringCloudBuilderArrayOutput values.
// You can construct a concrete instance of `SpringCloudBuilderArrayInput` via:
//
// SpringCloudBuilderArray{ SpringCloudBuilderArgs{...} }
type SpringCloudBuilderArrayInput interface {
pulumi.Input
ToSpringCloudBuilderArrayOutput() SpringCloudBuilderArrayOutput
ToSpringCloudBuilderArrayOutputWithContext(context.Context) SpringCloudBuilderArrayOutput
}
type SpringCloudBuilderArray []SpringCloudBuilderInput
func (SpringCloudBuilderArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuilder)(nil)).Elem()
}
func (i SpringCloudBuilderArray) ToSpringCloudBuilderArrayOutput() SpringCloudBuilderArrayOutput {
return i.ToSpringCloudBuilderArrayOutputWithContext(context.Background())
}
func (i SpringCloudBuilderArray) ToSpringCloudBuilderArrayOutputWithContext(ctx context.Context) SpringCloudBuilderArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuilderArrayOutput)
}
// SpringCloudBuilderMapInput is an input type that accepts SpringCloudBuilderMap and SpringCloudBuilderMapOutput values.
// You can construct a concrete instance of `SpringCloudBuilderMapInput` via:
//
// SpringCloudBuilderMap{ "key": SpringCloudBuilderArgs{...} }
type SpringCloudBuilderMapInput interface {
pulumi.Input
ToSpringCloudBuilderMapOutput() SpringCloudBuilderMapOutput
ToSpringCloudBuilderMapOutputWithContext(context.Context) SpringCloudBuilderMapOutput
}
type SpringCloudBuilderMap map[string]SpringCloudBuilderInput
func (SpringCloudBuilderMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuilder)(nil)).Elem()
}
func (i SpringCloudBuilderMap) ToSpringCloudBuilderMapOutput() SpringCloudBuilderMapOutput {
return i.ToSpringCloudBuilderMapOutputWithContext(context.Background())
}
func (i SpringCloudBuilderMap) ToSpringCloudBuilderMapOutputWithContext(ctx context.Context) SpringCloudBuilderMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudBuilderMapOutput)
}
type SpringCloudBuilderOutput struct{ *pulumi.OutputState }
func (SpringCloudBuilderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudBuilder)(nil)).Elem()
}
func (o SpringCloudBuilderOutput) ToSpringCloudBuilderOutput() SpringCloudBuilderOutput {
return o
}
func (o SpringCloudBuilderOutput) ToSpringCloudBuilderOutputWithContext(ctx context.Context) SpringCloudBuilderOutput {
return o
}
// One or more `buildPackGroup` blocks as defined below.
func (o SpringCloudBuilderOutput) BuildPackGroups() SpringCloudBuilderBuildPackGroupArrayOutput {
return o.ApplyT(func(v *SpringCloudBuilder) SpringCloudBuilderBuildPackGroupArrayOutput { return v.BuildPackGroups }).(SpringCloudBuilderBuildPackGroupArrayOutput)
}
// The name which should be used for this Spring Cloud Builder. Changing this forces a new Spring Cloud Builder to be created.
func (o SpringCloudBuilderOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuilder) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Builder to be created.
func (o SpringCloudBuilderOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudBuilder) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
// A `stack` block as defined below.
func (o SpringCloudBuilderOutput) Stack() SpringCloudBuilderStackOutput {
return o.ApplyT(func(v *SpringCloudBuilder) SpringCloudBuilderStackOutput { return v.Stack }).(SpringCloudBuilderStackOutput)
}
type SpringCloudBuilderArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudBuilderArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudBuilder)(nil)).Elem()
}
func (o SpringCloudBuilderArrayOutput) ToSpringCloudBuilderArrayOutput() SpringCloudBuilderArrayOutput {
return o
}
func (o SpringCloudBuilderArrayOutput) ToSpringCloudBuilderArrayOutputWithContext(ctx context.Context) SpringCloudBuilderArrayOutput {
return o
}
func (o SpringCloudBuilderArrayOutput) Index(i pulumi.IntInput) SpringCloudBuilderOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudBuilder {
return vs[0].([]*SpringCloudBuilder)[vs[1].(int)]
}).(SpringCloudBuilderOutput)
}
type SpringCloudBuilderMapOutput struct{ *pulumi.OutputState }
func (SpringCloudBuilderMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudBuilder)(nil)).Elem()
}
func (o SpringCloudBuilderMapOutput) ToSpringCloudBuilderMapOutput() SpringCloudBuilderMapOutput {
return o
}
func (o SpringCloudBuilderMapOutput) ToSpringCloudBuilderMapOutputWithContext(ctx context.Context) SpringCloudBuilderMapOutput {
return o
}
func (o SpringCloudBuilderMapOutput) MapIndex(k pulumi.StringInput) SpringCloudBuilderOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudBuilder {
return vs[0].(map[string]*SpringCloudBuilder)[vs[1].(string)]
}).(SpringCloudBuilderOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuilderInput)(nil)).Elem(), &SpringCloudBuilder{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuilderArrayInput)(nil)).Elem(), SpringCloudBuilderArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudBuilderMapInput)(nil)).Elem(), SpringCloudBuilderMap{})
pulumi.RegisterOutputType(SpringCloudBuilderOutput{})
pulumi.RegisterOutputType(SpringCloudBuilderArrayOutput{})
pulumi.RegisterOutputType(SpringCloudBuilderMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appplatform/springCloudAccelerator.go | sdk/go/azure/appplatform/springCloudAccelerator.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package appplatform
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** This resource is applicable only for Spring Cloud Service with enterprise tier.
//
// Manages a Spring Cloud Accelerator.
//
// !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `appplatform.SpringCloudAccelerator` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appplatform"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpringCloudService, err := appplatform.NewSpringCloudService(ctx, "example", &appplatform.SpringCloudServiceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("E0"),
// })
// if err != nil {
// return err
// }
// _, err = appplatform.NewSpringCloudAccelerator(ctx, "example", &appplatform.SpringCloudAcceleratorArgs{
// Name: pulumi.String("default"),
// SpringCloudServiceId: exampleSpringCloudService.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Spring Cloud Accelerators can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:appplatform/springCloudAccelerator:SpringCloudAccelerator example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/applicationAccelerators/default
// ```
type SpringCloudAccelerator struct {
pulumi.CustomResourceState
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
SpringCloudServiceId pulumi.StringOutput `pulumi:"springCloudServiceId"`
}
// NewSpringCloudAccelerator registers a new resource with the given unique name, arguments, and options.
func NewSpringCloudAccelerator(ctx *pulumi.Context,
name string, args *SpringCloudAcceleratorArgs, opts ...pulumi.ResourceOption) (*SpringCloudAccelerator, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SpringCloudServiceId == nil {
return nil, errors.New("invalid value for required argument 'SpringCloudServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SpringCloudAccelerator
err := ctx.RegisterResource("azure:appplatform/springCloudAccelerator:SpringCloudAccelerator", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpringCloudAccelerator gets an existing SpringCloudAccelerator resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSpringCloudAccelerator(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpringCloudAcceleratorState, opts ...pulumi.ResourceOption) (*SpringCloudAccelerator, error) {
var resource SpringCloudAccelerator
err := ctx.ReadResource("azure:appplatform/springCloudAccelerator:SpringCloudAccelerator", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SpringCloudAccelerator resources.
type springCloudAcceleratorState struct {
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
SpringCloudServiceId *string `pulumi:"springCloudServiceId"`
}
type SpringCloudAcceleratorState struct {
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
SpringCloudServiceId pulumi.StringPtrInput
}
func (SpringCloudAcceleratorState) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAcceleratorState)(nil)).Elem()
}
type springCloudAcceleratorArgs struct {
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
Name *string `pulumi:"name"`
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
SpringCloudServiceId string `pulumi:"springCloudServiceId"`
}
// The set of arguments for constructing a SpringCloudAccelerator resource.
type SpringCloudAcceleratorArgs struct {
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
Name pulumi.StringPtrInput
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
SpringCloudServiceId pulumi.StringInput
}
func (SpringCloudAcceleratorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*springCloudAcceleratorArgs)(nil)).Elem()
}
type SpringCloudAcceleratorInput interface {
pulumi.Input
ToSpringCloudAcceleratorOutput() SpringCloudAcceleratorOutput
ToSpringCloudAcceleratorOutputWithContext(ctx context.Context) SpringCloudAcceleratorOutput
}
func (*SpringCloudAccelerator) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAccelerator)(nil)).Elem()
}
func (i *SpringCloudAccelerator) ToSpringCloudAcceleratorOutput() SpringCloudAcceleratorOutput {
return i.ToSpringCloudAcceleratorOutputWithContext(context.Background())
}
func (i *SpringCloudAccelerator) ToSpringCloudAcceleratorOutputWithContext(ctx context.Context) SpringCloudAcceleratorOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAcceleratorOutput)
}
// SpringCloudAcceleratorArrayInput is an input type that accepts SpringCloudAcceleratorArray and SpringCloudAcceleratorArrayOutput values.
// You can construct a concrete instance of `SpringCloudAcceleratorArrayInput` via:
//
// SpringCloudAcceleratorArray{ SpringCloudAcceleratorArgs{...} }
type SpringCloudAcceleratorArrayInput interface {
pulumi.Input
ToSpringCloudAcceleratorArrayOutput() SpringCloudAcceleratorArrayOutput
ToSpringCloudAcceleratorArrayOutputWithContext(context.Context) SpringCloudAcceleratorArrayOutput
}
type SpringCloudAcceleratorArray []SpringCloudAcceleratorInput
func (SpringCloudAcceleratorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAccelerator)(nil)).Elem()
}
func (i SpringCloudAcceleratorArray) ToSpringCloudAcceleratorArrayOutput() SpringCloudAcceleratorArrayOutput {
return i.ToSpringCloudAcceleratorArrayOutputWithContext(context.Background())
}
func (i SpringCloudAcceleratorArray) ToSpringCloudAcceleratorArrayOutputWithContext(ctx context.Context) SpringCloudAcceleratorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAcceleratorArrayOutput)
}
// SpringCloudAcceleratorMapInput is an input type that accepts SpringCloudAcceleratorMap and SpringCloudAcceleratorMapOutput values.
// You can construct a concrete instance of `SpringCloudAcceleratorMapInput` via:
//
// SpringCloudAcceleratorMap{ "key": SpringCloudAcceleratorArgs{...} }
type SpringCloudAcceleratorMapInput interface {
pulumi.Input
ToSpringCloudAcceleratorMapOutput() SpringCloudAcceleratorMapOutput
ToSpringCloudAcceleratorMapOutputWithContext(context.Context) SpringCloudAcceleratorMapOutput
}
type SpringCloudAcceleratorMap map[string]SpringCloudAcceleratorInput
func (SpringCloudAcceleratorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAccelerator)(nil)).Elem()
}
func (i SpringCloudAcceleratorMap) ToSpringCloudAcceleratorMapOutput() SpringCloudAcceleratorMapOutput {
return i.ToSpringCloudAcceleratorMapOutputWithContext(context.Background())
}
func (i SpringCloudAcceleratorMap) ToSpringCloudAcceleratorMapOutputWithContext(ctx context.Context) SpringCloudAcceleratorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpringCloudAcceleratorMapOutput)
}
type SpringCloudAcceleratorOutput struct{ *pulumi.OutputState }
func (SpringCloudAcceleratorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SpringCloudAccelerator)(nil)).Elem()
}
func (o SpringCloudAcceleratorOutput) ToSpringCloudAcceleratorOutput() SpringCloudAcceleratorOutput {
return o
}
func (o SpringCloudAcceleratorOutput) ToSpringCloudAcceleratorOutputWithContext(ctx context.Context) SpringCloudAcceleratorOutput {
return o
}
// The name which should be used for this Spring Cloud Accelerator. Changing this forces a new Spring Cloud Accelerator to be created. The only possible value is `default`.
func (o SpringCloudAcceleratorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAccelerator) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Spring Cloud Service. Changing this forces a new Spring Cloud Accelerator to be created.
func (o SpringCloudAcceleratorOutput) SpringCloudServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SpringCloudAccelerator) pulumi.StringOutput { return v.SpringCloudServiceId }).(pulumi.StringOutput)
}
type SpringCloudAcceleratorArrayOutput struct{ *pulumi.OutputState }
func (SpringCloudAcceleratorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SpringCloudAccelerator)(nil)).Elem()
}
func (o SpringCloudAcceleratorArrayOutput) ToSpringCloudAcceleratorArrayOutput() SpringCloudAcceleratorArrayOutput {
return o
}
func (o SpringCloudAcceleratorArrayOutput) ToSpringCloudAcceleratorArrayOutputWithContext(ctx context.Context) SpringCloudAcceleratorArrayOutput {
return o
}
func (o SpringCloudAcceleratorArrayOutput) Index(i pulumi.IntInput) SpringCloudAcceleratorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SpringCloudAccelerator {
return vs[0].([]*SpringCloudAccelerator)[vs[1].(int)]
}).(SpringCloudAcceleratorOutput)
}
type SpringCloudAcceleratorMapOutput struct{ *pulumi.OutputState }
func (SpringCloudAcceleratorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SpringCloudAccelerator)(nil)).Elem()
}
func (o SpringCloudAcceleratorMapOutput) ToSpringCloudAcceleratorMapOutput() SpringCloudAcceleratorMapOutput {
return o
}
func (o SpringCloudAcceleratorMapOutput) ToSpringCloudAcceleratorMapOutputWithContext(ctx context.Context) SpringCloudAcceleratorMapOutput {
return o
}
func (o SpringCloudAcceleratorMapOutput) MapIndex(k pulumi.StringInput) SpringCloudAcceleratorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SpringCloudAccelerator {
return vs[0].(map[string]*SpringCloudAccelerator)[vs[1].(string)]
}).(SpringCloudAcceleratorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAcceleratorInput)(nil)).Elem(), &SpringCloudAccelerator{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAcceleratorArrayInput)(nil)).Elem(), SpringCloudAcceleratorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpringCloudAcceleratorMapInput)(nil)).Elem(), SpringCloudAcceleratorMap{})
pulumi.RegisterOutputType(SpringCloudAcceleratorOutput{})
pulumi.RegisterOutputType(SpringCloudAcceleratorArrayOutput{})
pulumi.RegisterOutputType(SpringCloudAcceleratorMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/purview/init.go | sdk/go/azure/purview/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package purview
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:purview/account:Account":
r = &Account{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"purview/account",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/purview/pulumiTypes.go | sdk/go/azure/purview/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package purview
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type AccountIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Purview Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Purview Account. Possible values are `UserAssigned` and `SystemAssigned`.
Type string `pulumi:"type"`
}
// AccountIdentityInput is an input type that accepts AccountIdentityArgs and AccountIdentityOutput values.
// You can construct a concrete instance of `AccountIdentityInput` via:
//
// AccountIdentityArgs{...}
type AccountIdentityInput interface {
pulumi.Input
ToAccountIdentityOutput() AccountIdentityOutput
ToAccountIdentityOutputWithContext(context.Context) AccountIdentityOutput
}
type AccountIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Purview Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Purview Account. Possible values are `UserAssigned` and `SystemAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (AccountIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (i AccountIdentityArgs) ToAccountIdentityOutput() AccountIdentityOutput {
return i.ToAccountIdentityOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput)
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput).ToAccountIdentityPtrOutputWithContext(ctx)
}
// AccountIdentityPtrInput is an input type that accepts AccountIdentityArgs, AccountIdentityPtr and AccountIdentityPtrOutput values.
// You can construct a concrete instance of `AccountIdentityPtrInput` via:
//
// AccountIdentityArgs{...}
//
// or:
//
// nil
type AccountIdentityPtrInput interface {
pulumi.Input
ToAccountIdentityPtrOutput() AccountIdentityPtrOutput
ToAccountIdentityPtrOutputWithContext(context.Context) AccountIdentityPtrOutput
}
type accountIdentityPtrType AccountIdentityArgs
func AccountIdentityPtr(v *AccountIdentityArgs) AccountIdentityPtrInput {
return (*accountIdentityPtrType)(v)
}
func (*accountIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityPtrOutput)
}
type AccountIdentityOutput struct{ *pulumi.OutputState }
func (AccountIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityOutput) ToAccountIdentityOutput() AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountIdentity) *AccountIdentity {
return &v
}).(AccountIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Purview Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o AccountIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AccountIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AccountIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AccountIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Purview Account. Possible values are `UserAssigned` and `SystemAssigned`.
func (o AccountIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AccountIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AccountIdentityPtrOutput struct{ *pulumi.OutputState }
func (AccountIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) Elem() AccountIdentityOutput {
return o.ApplyT(func(v *AccountIdentity) AccountIdentity {
if v != nil {
return *v
}
var ret AccountIdentity
return ret
}).(AccountIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Purview Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o AccountIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AccountIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AccountIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Purview Account. Possible values are `UserAssigned` and `SystemAssigned`.
func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AccountManagedResource struct {
// The ID of the managed event hub namespace.
EventHubNamespaceId *string `pulumi:"eventHubNamespaceId"`
// The ID of the managed resource group.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The ID of the managed storage account.
StorageAccountId *string `pulumi:"storageAccountId"`
}
// AccountManagedResourceInput is an input type that accepts AccountManagedResourceArgs and AccountManagedResourceOutput values.
// You can construct a concrete instance of `AccountManagedResourceInput` via:
//
// AccountManagedResourceArgs{...}
type AccountManagedResourceInput interface {
pulumi.Input
ToAccountManagedResourceOutput() AccountManagedResourceOutput
ToAccountManagedResourceOutputWithContext(context.Context) AccountManagedResourceOutput
}
type AccountManagedResourceArgs struct {
// The ID of the managed event hub namespace.
EventHubNamespaceId pulumi.StringPtrInput `pulumi:"eventHubNamespaceId"`
// The ID of the managed resource group.
ResourceGroupId pulumi.StringPtrInput `pulumi:"resourceGroupId"`
// The ID of the managed storage account.
StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"`
}
func (AccountManagedResourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountManagedResource)(nil)).Elem()
}
func (i AccountManagedResourceArgs) ToAccountManagedResourceOutput() AccountManagedResourceOutput {
return i.ToAccountManagedResourceOutputWithContext(context.Background())
}
func (i AccountManagedResourceArgs) ToAccountManagedResourceOutputWithContext(ctx context.Context) AccountManagedResourceOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountManagedResourceOutput)
}
// AccountManagedResourceArrayInput is an input type that accepts AccountManagedResourceArray and AccountManagedResourceArrayOutput values.
// You can construct a concrete instance of `AccountManagedResourceArrayInput` via:
//
// AccountManagedResourceArray{ AccountManagedResourceArgs{...} }
type AccountManagedResourceArrayInput interface {
pulumi.Input
ToAccountManagedResourceArrayOutput() AccountManagedResourceArrayOutput
ToAccountManagedResourceArrayOutputWithContext(context.Context) AccountManagedResourceArrayOutput
}
type AccountManagedResourceArray []AccountManagedResourceInput
func (AccountManagedResourceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountManagedResource)(nil)).Elem()
}
func (i AccountManagedResourceArray) ToAccountManagedResourceArrayOutput() AccountManagedResourceArrayOutput {
return i.ToAccountManagedResourceArrayOutputWithContext(context.Background())
}
func (i AccountManagedResourceArray) ToAccountManagedResourceArrayOutputWithContext(ctx context.Context) AccountManagedResourceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountManagedResourceArrayOutput)
}
type AccountManagedResourceOutput struct{ *pulumi.OutputState }
func (AccountManagedResourceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountManagedResource)(nil)).Elem()
}
func (o AccountManagedResourceOutput) ToAccountManagedResourceOutput() AccountManagedResourceOutput {
return o
}
func (o AccountManagedResourceOutput) ToAccountManagedResourceOutputWithContext(ctx context.Context) AccountManagedResourceOutput {
return o
}
// The ID of the managed event hub namespace.
func (o AccountManagedResourceOutput) EventHubNamespaceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountManagedResource) *string { return v.EventHubNamespaceId }).(pulumi.StringPtrOutput)
}
// The ID of the managed resource group.
func (o AccountManagedResourceOutput) ResourceGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountManagedResource) *string { return v.ResourceGroupId }).(pulumi.StringPtrOutput)
}
// The ID of the managed storage account.
func (o AccountManagedResourceOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountManagedResource) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
type AccountManagedResourceArrayOutput struct{ *pulumi.OutputState }
func (AccountManagedResourceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountManagedResource)(nil)).Elem()
}
func (o AccountManagedResourceArrayOutput) ToAccountManagedResourceArrayOutput() AccountManagedResourceArrayOutput {
return o
}
func (o AccountManagedResourceArrayOutput) ToAccountManagedResourceArrayOutputWithContext(ctx context.Context) AccountManagedResourceArrayOutput {
return o
}
func (o AccountManagedResourceArrayOutput) Index(i pulumi.IntInput) AccountManagedResourceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AccountManagedResource {
return vs[0].([]AccountManagedResource)[vs[1].(int)]
}).(AccountManagedResourceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityInput)(nil)).Elem(), AccountIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityPtrInput)(nil)).Elem(), AccountIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountManagedResourceInput)(nil)).Elem(), AccountManagedResourceArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountManagedResourceArrayInput)(nil)).Elem(), AccountManagedResourceArray{})
pulumi.RegisterOutputType(AccountIdentityOutput{})
pulumi.RegisterOutputType(AccountIdentityPtrOutput{})
pulumi.RegisterOutputType(AccountManagedResourceOutput{})
pulumi.RegisterOutputType(AccountManagedResourceArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/purview/account.go | sdk/go/azure/purview/account.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package purview
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Purview Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/purview"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = purview.NewAccount(ctx, "example", &purview.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Identity: &purview.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Purview` - 2021-12-01
//
// ## Import
//
// Purview Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:purview/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Purview/accounts/account1
// ```
type Account struct {
pulumi.CustomResourceState
// Atlas Kafka endpoint primary connection string.
AtlasKafkaEndpointPrimaryConnectionString pulumi.StringOutput `pulumi:"atlasKafkaEndpointPrimaryConnectionString"`
// Atlas Kafka endpoint secondary connection string.
AtlasKafkaEndpointSecondaryConnectionString pulumi.StringOutput `pulumi:"atlasKafkaEndpointSecondaryConnectionString"`
// Configured in AWS to allow use of the role arn used for scanning
AwsExternalId pulumi.StringOutput `pulumi:"awsExternalId"`
// Catalog endpoint.
CatalogEndpoint pulumi.StringOutput `pulumi:"catalogEndpoint"`
// Guardian endpoint.
GuardianEndpoint pulumi.StringOutput `pulumi:"guardianEndpoint"`
// An `identity` block as defined below.
Identity AccountIdentityOutput `pulumi:"identity"`
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
ManagedEventHubEnabled pulumi.BoolPtrOutput `pulumi:"managedEventHubEnabled"`
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
ManagedResourceGroupName pulumi.StringOutput `pulumi:"managedResourceGroupName"`
// A `managedResources` block as defined below.
ManagedResources AccountManagedResourceArrayOutput `pulumi:"managedResources"`
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Should the Purview Account be visible to the public network? Defaults to `true`.
PublicNetworkEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkEnabled"`
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Scan endpoint.
ScanEndpoint pulumi.StringOutput `pulumi:"scanEndpoint"`
// A mapping of tags which should be assigned to the Purview Account.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccount registers a new resource with the given unique name, arguments, and options.
func NewAccount(ctx *pulumi.Context,
name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"atlasKafkaEndpointPrimaryConnectionString",
"atlasKafkaEndpointSecondaryConnectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:purview/account:Account", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccount gets an existing Account resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) {
var resource Account
err := ctx.ReadResource("azure:purview/account:Account", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Account resources.
type accountState struct {
// Atlas Kafka endpoint primary connection string.
AtlasKafkaEndpointPrimaryConnectionString *string `pulumi:"atlasKafkaEndpointPrimaryConnectionString"`
// Atlas Kafka endpoint secondary connection string.
AtlasKafkaEndpointSecondaryConnectionString *string `pulumi:"atlasKafkaEndpointSecondaryConnectionString"`
// Configured in AWS to allow use of the role arn used for scanning
AwsExternalId *string `pulumi:"awsExternalId"`
// Catalog endpoint.
CatalogEndpoint *string `pulumi:"catalogEndpoint"`
// Guardian endpoint.
GuardianEndpoint *string `pulumi:"guardianEndpoint"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
Location *string `pulumi:"location"`
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
ManagedEventHubEnabled *bool `pulumi:"managedEventHubEnabled"`
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// A `managedResources` block as defined below.
ManagedResources []AccountManagedResource `pulumi:"managedResources"`
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
Name *string `pulumi:"name"`
// Should the Purview Account be visible to the public network? Defaults to `true`.
PublicNetworkEnabled *bool `pulumi:"publicNetworkEnabled"`
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Scan endpoint.
ScanEndpoint *string `pulumi:"scanEndpoint"`
// A mapping of tags which should be assigned to the Purview Account.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// Atlas Kafka endpoint primary connection string.
AtlasKafkaEndpointPrimaryConnectionString pulumi.StringPtrInput
// Atlas Kafka endpoint secondary connection string.
AtlasKafkaEndpointSecondaryConnectionString pulumi.StringPtrInput
// Configured in AWS to allow use of the role arn used for scanning
AwsExternalId pulumi.StringPtrInput
// Catalog endpoint.
CatalogEndpoint pulumi.StringPtrInput
// Guardian endpoint.
GuardianEndpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
Location pulumi.StringPtrInput
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
ManagedEventHubEnabled pulumi.BoolPtrInput
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
ManagedResourceGroupName pulumi.StringPtrInput
// A `managedResources` block as defined below.
ManagedResources AccountManagedResourceArrayInput
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
Name pulumi.StringPtrInput
// Should the Purview Account be visible to the public network? Defaults to `true`.
PublicNetworkEnabled pulumi.BoolPtrInput
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
ResourceGroupName pulumi.StringPtrInput
// Scan endpoint.
ScanEndpoint pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Purview Account.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// An `identity` block as defined below.
Identity AccountIdentity `pulumi:"identity"`
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
Location *string `pulumi:"location"`
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
ManagedEventHubEnabled *bool `pulumi:"managedEventHubEnabled"`
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
Name *string `pulumi:"name"`
// Should the Purview Account be visible to the public network? Defaults to `true`.
PublicNetworkEnabled *bool `pulumi:"publicNetworkEnabled"`
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Purview Account.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// An `identity` block as defined below.
Identity AccountIdentityInput
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
Location pulumi.StringPtrInput
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
ManagedEventHubEnabled pulumi.BoolPtrInput
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
ManagedResourceGroupName pulumi.StringPtrInput
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
Name pulumi.StringPtrInput
// Should the Purview Account be visible to the public network? Defaults to `true`.
PublicNetworkEnabled pulumi.BoolPtrInput
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Purview Account.
Tags pulumi.StringMapInput
}
func (AccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountArgs)(nil)).Elem()
}
type AccountInput interface {
pulumi.Input
ToAccountOutput() AccountOutput
ToAccountOutputWithContext(ctx context.Context) AccountOutput
}
func (*Account) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (i *Account) ToAccountOutput() AccountOutput {
return i.ToAccountOutputWithContext(context.Background())
}
func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountOutput)
}
// AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values.
// You can construct a concrete instance of `AccountArrayInput` via:
//
// AccountArray{ AccountArgs{...} }
type AccountArrayInput interface {
pulumi.Input
ToAccountArrayOutput() AccountArrayOutput
ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput
}
type AccountArray []AccountInput
func (AccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput {
return i.ToAccountArrayOutputWithContext(context.Background())
}
func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountArrayOutput)
}
// AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values.
// You can construct a concrete instance of `AccountMapInput` via:
//
// AccountMap{ "key": AccountArgs{...} }
type AccountMapInput interface {
pulumi.Input
ToAccountMapOutput() AccountMapOutput
ToAccountMapOutputWithContext(context.Context) AccountMapOutput
}
type AccountMap map[string]AccountInput
func (AccountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (i AccountMap) ToAccountMapOutput() AccountMapOutput {
return i.ToAccountMapOutputWithContext(context.Background())
}
func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountMapOutput)
}
type AccountOutput struct{ *pulumi.OutputState }
func (AccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (o AccountOutput) ToAccountOutput() AccountOutput {
return o
}
func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return o
}
// Atlas Kafka endpoint primary connection string.
func (o AccountOutput) AtlasKafkaEndpointPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.AtlasKafkaEndpointPrimaryConnectionString }).(pulumi.StringOutput)
}
// Atlas Kafka endpoint secondary connection string.
func (o AccountOutput) AtlasKafkaEndpointSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.AtlasKafkaEndpointSecondaryConnectionString }).(pulumi.StringOutput)
}
// Configured in AWS to allow use of the role arn used for scanning
func (o AccountOutput) AwsExternalId() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.AwsExternalId }).(pulumi.StringOutput)
}
// Catalog endpoint.
func (o AccountOutput) CatalogEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.CatalogEndpoint }).(pulumi.StringOutput)
}
// Guardian endpoint.
func (o AccountOutput) GuardianEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.GuardianEndpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o AccountOutput) Identity() AccountIdentityOutput {
return o.ApplyT(func(v *Account) AccountIdentityOutput { return v.Identity }).(AccountIdentityOutput)
}
// The Azure Region where the Purview Account should exist. Changing this forces a new Purview Account to be created.
func (o AccountOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Whether the Purview Account should create a managed Event Hub Namespace. Defaults to `true`.
//
// > **Note:** `managedEventHubEnabled` must be `false` in order to use a Kafka Configuration with the Purview Account.
func (o AccountOutput) ManagedEventHubEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.ManagedEventHubEnabled }).(pulumi.BoolPtrOutput)
}
// The name which should be used for the new Resource Group where Purview Account creates the managed resources. Changing this forces a new Purview Account to be created.
//
// > **Note:** `managedResourceGroupName` must be a new Resource Group.
func (o AccountOutput) ManagedResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ManagedResourceGroupName }).(pulumi.StringOutput)
}
// A `managedResources` block as defined below.
func (o AccountOutput) ManagedResources() AccountManagedResourceArrayOutput {
return o.ApplyT(func(v *Account) AccountManagedResourceArrayOutput { return v.ManagedResources }).(AccountManagedResourceArrayOutput)
}
// The name which should be used for this Purview Account. Changing this forces a new Purview Account to be created.
func (o AccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Should the Purview Account be visible to the public network? Defaults to `true`.
func (o AccountOutput) PublicNetworkEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.PublicNetworkEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the Resource Group where the Purview Account should exist. Changing this forces a new Purview Account to be created.
func (o AccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Scan endpoint.
func (o AccountOutput) ScanEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ScanEndpoint }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Purview Account.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AccountArrayOutput struct{ *pulumi.OutputState }
func (AccountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput {
return o
}
func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return o
}
func (o AccountArrayOutput) Index(i pulumi.IntInput) AccountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Account {
return vs[0].([]*Account)[vs[1].(int)]
}).(AccountOutput)
}
type AccountMapOutput struct{ *pulumi.OutputState }
func (AccountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput {
return o
}
func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return o
}
func (o AccountMapOutput) MapIndex(k pulumi.StringInput) AccountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Account {
return vs[0].(map[string]*Account)[vs[1].(string)]
}).(AccountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountInput)(nil)).Elem(), &Account{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountArrayInput)(nil)).Elem(), AccountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountMapInput)(nil)).Elem(), AccountMap{})
pulumi.RegisterOutputType(AccountOutput{})
pulumi.RegisterOutputType(AccountArrayOutput{})
pulumi.RegisterOutputType(AccountMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databoxedge/init.go | sdk/go/azure/databoxedge/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package databoxedge
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:databoxedge/device:Device":
r = &Device{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"databoxedge/device",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databoxedge/pulumiTypes.go | sdk/go/azure/databoxedge/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package databoxedge
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type DeviceDeviceProperty struct {
// The Data Box Edge/Gateway device local capacity in MB.
Capacity *int `pulumi:"capacity"`
// Type of compute roles configured.
ConfiguredRoleTypes []string `pulumi:"configuredRoleTypes"`
// The Data Box Edge/Gateway device culture.
Culture *string `pulumi:"culture"`
// The device software version number of the device (e.g. 1.2.18105.6).
HcsVersion *string `pulumi:"hcsVersion"`
// The Data Box Edge/Gateway device model.
Model *string `pulumi:"model"`
// The number of nodes in the cluster.
NodeCount *int `pulumi:"nodeCount"`
// The Serial Number of Data Box Edge/Gateway device.
SerialNumber *string `pulumi:"serialNumber"`
// The Data Box Edge/Gateway device software version.
SoftwareVersion *string `pulumi:"softwareVersion"`
// The status of the Data Box Edge/Gateway device.
Status *string `pulumi:"status"`
// The Data Box Edge/Gateway device timezone.
TimeZone *string `pulumi:"timeZone"`
// The type of the Data Box Edge/Gateway device.
Type *string `pulumi:"type"`
}
// DeviceDevicePropertyInput is an input type that accepts DeviceDevicePropertyArgs and DeviceDevicePropertyOutput values.
// You can construct a concrete instance of `DeviceDevicePropertyInput` via:
//
// DeviceDevicePropertyArgs{...}
type DeviceDevicePropertyInput interface {
pulumi.Input
ToDeviceDevicePropertyOutput() DeviceDevicePropertyOutput
ToDeviceDevicePropertyOutputWithContext(context.Context) DeviceDevicePropertyOutput
}
type DeviceDevicePropertyArgs struct {
// The Data Box Edge/Gateway device local capacity in MB.
Capacity pulumi.IntPtrInput `pulumi:"capacity"`
// Type of compute roles configured.
ConfiguredRoleTypes pulumi.StringArrayInput `pulumi:"configuredRoleTypes"`
// The Data Box Edge/Gateway device culture.
Culture pulumi.StringPtrInput `pulumi:"culture"`
// The device software version number of the device (e.g. 1.2.18105.6).
HcsVersion pulumi.StringPtrInput `pulumi:"hcsVersion"`
// The Data Box Edge/Gateway device model.
Model pulumi.StringPtrInput `pulumi:"model"`
// The number of nodes in the cluster.
NodeCount pulumi.IntPtrInput `pulumi:"nodeCount"`
// The Serial Number of Data Box Edge/Gateway device.
SerialNumber pulumi.StringPtrInput `pulumi:"serialNumber"`
// The Data Box Edge/Gateway device software version.
SoftwareVersion pulumi.StringPtrInput `pulumi:"softwareVersion"`
// The status of the Data Box Edge/Gateway device.
Status pulumi.StringPtrInput `pulumi:"status"`
// The Data Box Edge/Gateway device timezone.
TimeZone pulumi.StringPtrInput `pulumi:"timeZone"`
// The type of the Data Box Edge/Gateway device.
Type pulumi.StringPtrInput `pulumi:"type"`
}
func (DeviceDevicePropertyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DeviceDeviceProperty)(nil)).Elem()
}
func (i DeviceDevicePropertyArgs) ToDeviceDevicePropertyOutput() DeviceDevicePropertyOutput {
return i.ToDeviceDevicePropertyOutputWithContext(context.Background())
}
func (i DeviceDevicePropertyArgs) ToDeviceDevicePropertyOutputWithContext(ctx context.Context) DeviceDevicePropertyOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceDevicePropertyOutput)
}
// DeviceDevicePropertyArrayInput is an input type that accepts DeviceDevicePropertyArray and DeviceDevicePropertyArrayOutput values.
// You can construct a concrete instance of `DeviceDevicePropertyArrayInput` via:
//
// DeviceDevicePropertyArray{ DeviceDevicePropertyArgs{...} }
type DeviceDevicePropertyArrayInput interface {
pulumi.Input
ToDeviceDevicePropertyArrayOutput() DeviceDevicePropertyArrayOutput
ToDeviceDevicePropertyArrayOutputWithContext(context.Context) DeviceDevicePropertyArrayOutput
}
type DeviceDevicePropertyArray []DeviceDevicePropertyInput
func (DeviceDevicePropertyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeviceDeviceProperty)(nil)).Elem()
}
func (i DeviceDevicePropertyArray) ToDeviceDevicePropertyArrayOutput() DeviceDevicePropertyArrayOutput {
return i.ToDeviceDevicePropertyArrayOutputWithContext(context.Background())
}
func (i DeviceDevicePropertyArray) ToDeviceDevicePropertyArrayOutputWithContext(ctx context.Context) DeviceDevicePropertyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceDevicePropertyArrayOutput)
}
type DeviceDevicePropertyOutput struct{ *pulumi.OutputState }
func (DeviceDevicePropertyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DeviceDeviceProperty)(nil)).Elem()
}
func (o DeviceDevicePropertyOutput) ToDeviceDevicePropertyOutput() DeviceDevicePropertyOutput {
return o
}
func (o DeviceDevicePropertyOutput) ToDeviceDevicePropertyOutputWithContext(ctx context.Context) DeviceDevicePropertyOutput {
return o
}
// The Data Box Edge/Gateway device local capacity in MB.
func (o DeviceDevicePropertyOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *int { return v.Capacity }).(pulumi.IntPtrOutput)
}
// Type of compute roles configured.
func (o DeviceDevicePropertyOutput) ConfiguredRoleTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v DeviceDeviceProperty) []string { return v.ConfiguredRoleTypes }).(pulumi.StringArrayOutput)
}
// The Data Box Edge/Gateway device culture.
func (o DeviceDevicePropertyOutput) Culture() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.Culture }).(pulumi.StringPtrOutput)
}
// The device software version number of the device (e.g. 1.2.18105.6).
func (o DeviceDevicePropertyOutput) HcsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.HcsVersion }).(pulumi.StringPtrOutput)
}
// The Data Box Edge/Gateway device model.
func (o DeviceDevicePropertyOutput) Model() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.Model }).(pulumi.StringPtrOutput)
}
// The number of nodes in the cluster.
func (o DeviceDevicePropertyOutput) NodeCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *int { return v.NodeCount }).(pulumi.IntPtrOutput)
}
// The Serial Number of Data Box Edge/Gateway device.
func (o DeviceDevicePropertyOutput) SerialNumber() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.SerialNumber }).(pulumi.StringPtrOutput)
}
// The Data Box Edge/Gateway device software version.
func (o DeviceDevicePropertyOutput) SoftwareVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.SoftwareVersion }).(pulumi.StringPtrOutput)
}
// The status of the Data Box Edge/Gateway device.
func (o DeviceDevicePropertyOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.Status }).(pulumi.StringPtrOutput)
}
// The Data Box Edge/Gateway device timezone.
func (o DeviceDevicePropertyOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// The type of the Data Box Edge/Gateway device.
func (o DeviceDevicePropertyOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v DeviceDeviceProperty) *string { return v.Type }).(pulumi.StringPtrOutput)
}
type DeviceDevicePropertyArrayOutput struct{ *pulumi.OutputState }
func (DeviceDevicePropertyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DeviceDeviceProperty)(nil)).Elem()
}
func (o DeviceDevicePropertyArrayOutput) ToDeviceDevicePropertyArrayOutput() DeviceDevicePropertyArrayOutput {
return o
}
func (o DeviceDevicePropertyArrayOutput) ToDeviceDevicePropertyArrayOutputWithContext(ctx context.Context) DeviceDevicePropertyArrayOutput {
return o
}
func (o DeviceDevicePropertyArrayOutput) Index(i pulumi.IntInput) DeviceDevicePropertyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DeviceDeviceProperty {
return vs[0].([]DeviceDeviceProperty)[vs[1].(int)]
}).(DeviceDevicePropertyOutput)
}
type GetDeviceDeviceProperty struct {
// The Data Box Edge/Gateway device local capacity in MB.
Capacity int `pulumi:"capacity"`
// Type of compute roles configured.
ConfiguredRoleTypes []string `pulumi:"configuredRoleTypes"`
// The Data Box Edge/Gateway device culture.
Culture string `pulumi:"culture"`
// The device software version number of the device (e.g. 1.2.18105.6).
HcsVersion string `pulumi:"hcsVersion"`
// The Data Box Edge/Gateway device model.
Model string `pulumi:"model"`
// The number of nodes in the cluster.
NodeCount int `pulumi:"nodeCount"`
// The Serial Number of Data Box Edge/Gateway device.
SerialNumber string `pulumi:"serialNumber"`
// The Data Box Edge/Gateway device software version.
SoftwareVersion string `pulumi:"softwareVersion"`
// The status of the Data Box Edge/Gateway device.
Status string `pulumi:"status"`
// The Data Box Edge/Gateway device timezone.
TimeZone string `pulumi:"timeZone"`
// The type of the Data Box Edge/Gateway device.
Type string `pulumi:"type"`
}
// GetDeviceDevicePropertyInput is an input type that accepts GetDeviceDevicePropertyArgs and GetDeviceDevicePropertyOutput values.
// You can construct a concrete instance of `GetDeviceDevicePropertyInput` via:
//
// GetDeviceDevicePropertyArgs{...}
type GetDeviceDevicePropertyInput interface {
pulumi.Input
ToGetDeviceDevicePropertyOutput() GetDeviceDevicePropertyOutput
ToGetDeviceDevicePropertyOutputWithContext(context.Context) GetDeviceDevicePropertyOutput
}
type GetDeviceDevicePropertyArgs struct {
// The Data Box Edge/Gateway device local capacity in MB.
Capacity pulumi.IntInput `pulumi:"capacity"`
// Type of compute roles configured.
ConfiguredRoleTypes pulumi.StringArrayInput `pulumi:"configuredRoleTypes"`
// The Data Box Edge/Gateway device culture.
Culture pulumi.StringInput `pulumi:"culture"`
// The device software version number of the device (e.g. 1.2.18105.6).
HcsVersion pulumi.StringInput `pulumi:"hcsVersion"`
// The Data Box Edge/Gateway device model.
Model pulumi.StringInput `pulumi:"model"`
// The number of nodes in the cluster.
NodeCount pulumi.IntInput `pulumi:"nodeCount"`
// The Serial Number of Data Box Edge/Gateway device.
SerialNumber pulumi.StringInput `pulumi:"serialNumber"`
// The Data Box Edge/Gateway device software version.
SoftwareVersion pulumi.StringInput `pulumi:"softwareVersion"`
// The status of the Data Box Edge/Gateway device.
Status pulumi.StringInput `pulumi:"status"`
// The Data Box Edge/Gateway device timezone.
TimeZone pulumi.StringInput `pulumi:"timeZone"`
// The type of the Data Box Edge/Gateway device.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetDeviceDevicePropertyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDeviceDeviceProperty)(nil)).Elem()
}
func (i GetDeviceDevicePropertyArgs) ToGetDeviceDevicePropertyOutput() GetDeviceDevicePropertyOutput {
return i.ToGetDeviceDevicePropertyOutputWithContext(context.Background())
}
func (i GetDeviceDevicePropertyArgs) ToGetDeviceDevicePropertyOutputWithContext(ctx context.Context) GetDeviceDevicePropertyOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetDeviceDevicePropertyOutput)
}
// GetDeviceDevicePropertyArrayInput is an input type that accepts GetDeviceDevicePropertyArray and GetDeviceDevicePropertyArrayOutput values.
// You can construct a concrete instance of `GetDeviceDevicePropertyArrayInput` via:
//
// GetDeviceDevicePropertyArray{ GetDeviceDevicePropertyArgs{...} }
type GetDeviceDevicePropertyArrayInput interface {
pulumi.Input
ToGetDeviceDevicePropertyArrayOutput() GetDeviceDevicePropertyArrayOutput
ToGetDeviceDevicePropertyArrayOutputWithContext(context.Context) GetDeviceDevicePropertyArrayOutput
}
type GetDeviceDevicePropertyArray []GetDeviceDevicePropertyInput
func (GetDeviceDevicePropertyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetDeviceDeviceProperty)(nil)).Elem()
}
func (i GetDeviceDevicePropertyArray) ToGetDeviceDevicePropertyArrayOutput() GetDeviceDevicePropertyArrayOutput {
return i.ToGetDeviceDevicePropertyArrayOutputWithContext(context.Background())
}
func (i GetDeviceDevicePropertyArray) ToGetDeviceDevicePropertyArrayOutputWithContext(ctx context.Context) GetDeviceDevicePropertyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetDeviceDevicePropertyArrayOutput)
}
type GetDeviceDevicePropertyOutput struct{ *pulumi.OutputState }
func (GetDeviceDevicePropertyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDeviceDeviceProperty)(nil)).Elem()
}
func (o GetDeviceDevicePropertyOutput) ToGetDeviceDevicePropertyOutput() GetDeviceDevicePropertyOutput {
return o
}
func (o GetDeviceDevicePropertyOutput) ToGetDeviceDevicePropertyOutputWithContext(ctx context.Context) GetDeviceDevicePropertyOutput {
return o
}
// The Data Box Edge/Gateway device local capacity in MB.
func (o GetDeviceDevicePropertyOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) int { return v.Capacity }).(pulumi.IntOutput)
}
// Type of compute roles configured.
func (o GetDeviceDevicePropertyOutput) ConfiguredRoleTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) []string { return v.ConfiguredRoleTypes }).(pulumi.StringArrayOutput)
}
// The Data Box Edge/Gateway device culture.
func (o GetDeviceDevicePropertyOutput) Culture() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.Culture }).(pulumi.StringOutput)
}
// The device software version number of the device (e.g. 1.2.18105.6).
func (o GetDeviceDevicePropertyOutput) HcsVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.HcsVersion }).(pulumi.StringOutput)
}
// The Data Box Edge/Gateway device model.
func (o GetDeviceDevicePropertyOutput) Model() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.Model }).(pulumi.StringOutput)
}
// The number of nodes in the cluster.
func (o GetDeviceDevicePropertyOutput) NodeCount() pulumi.IntOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) int { return v.NodeCount }).(pulumi.IntOutput)
}
// The Serial Number of Data Box Edge/Gateway device.
func (o GetDeviceDevicePropertyOutput) SerialNumber() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.SerialNumber }).(pulumi.StringOutput)
}
// The Data Box Edge/Gateway device software version.
func (o GetDeviceDevicePropertyOutput) SoftwareVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.SoftwareVersion }).(pulumi.StringOutput)
}
// The status of the Data Box Edge/Gateway device.
func (o GetDeviceDevicePropertyOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.Status }).(pulumi.StringOutput)
}
// The Data Box Edge/Gateway device timezone.
func (o GetDeviceDevicePropertyOutput) TimeZone() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.TimeZone }).(pulumi.StringOutput)
}
// The type of the Data Box Edge/Gateway device.
func (o GetDeviceDevicePropertyOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetDeviceDeviceProperty) string { return v.Type }).(pulumi.StringOutput)
}
type GetDeviceDevicePropertyArrayOutput struct{ *pulumi.OutputState }
func (GetDeviceDevicePropertyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetDeviceDeviceProperty)(nil)).Elem()
}
func (o GetDeviceDevicePropertyArrayOutput) ToGetDeviceDevicePropertyArrayOutput() GetDeviceDevicePropertyArrayOutput {
return o
}
func (o GetDeviceDevicePropertyArrayOutput) ToGetDeviceDevicePropertyArrayOutputWithContext(ctx context.Context) GetDeviceDevicePropertyArrayOutput {
return o
}
func (o GetDeviceDevicePropertyArrayOutput) Index(i pulumi.IntInput) GetDeviceDevicePropertyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetDeviceDeviceProperty {
return vs[0].([]GetDeviceDeviceProperty)[vs[1].(int)]
}).(GetDeviceDevicePropertyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DeviceDevicePropertyInput)(nil)).Elem(), DeviceDevicePropertyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*DeviceDevicePropertyArrayInput)(nil)).Elem(), DeviceDevicePropertyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GetDeviceDevicePropertyInput)(nil)).Elem(), GetDeviceDevicePropertyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetDeviceDevicePropertyArrayInput)(nil)).Elem(), GetDeviceDevicePropertyArray{})
pulumi.RegisterOutputType(DeviceDevicePropertyOutput{})
pulumi.RegisterOutputType(DeviceDevicePropertyArrayOutput{})
pulumi.RegisterOutputType(GetDeviceDevicePropertyOutput{})
pulumi.RegisterOutputType(GetDeviceDevicePropertyArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databoxedge/device.go | sdk/go/azure/databoxedge/device.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package databoxedge
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Databox Edge Device.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databoxedge"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-databoxedge"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = databoxedge.NewDevice(ctx, "example", &databoxedge.DeviceArgs{
// Name: pulumi.String("example-device"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("EdgeP_Base-Standard"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DataBoxEdge` - 2022-03-01
//
// ## Import
//
// Databox Edge Devices can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:databoxedge/device:Device example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/device1
// ```
type Device struct {
pulumi.CustomResourceState
// A `deviceProperties` block as defined below.
DeviceProperties DeviceDevicePropertyArrayOutput `pulumi:"deviceProperties"`
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewDevice registers a new resource with the given unique name, arguments, and options.
func NewDevice(ctx *pulumi.Context,
name string, args *DeviceArgs, opts ...pulumi.ResourceOption) (*Device, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Device
err := ctx.RegisterResource("azure:databoxedge/device:Device", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDevice gets an existing Device resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDevice(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DeviceState, opts ...pulumi.ResourceOption) (*Device, error) {
var resource Device
err := ctx.ReadResource("azure:databoxedge/device:Device", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Device resources.
type deviceState struct {
// A `deviceProperties` block as defined below.
DeviceProperties []DeviceDeviceProperty `pulumi:"deviceProperties"`
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
SkuName *string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags map[string]string `pulumi:"tags"`
}
type DeviceState struct {
// A `deviceProperties` block as defined below.
DeviceProperties DeviceDevicePropertyArrayInput
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName pulumi.StringPtrInput
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
SkuName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags pulumi.StringMapInput
}
func (DeviceState) ElementType() reflect.Type {
return reflect.TypeOf((*deviceState)(nil)).Elem()
}
type deviceArgs struct {
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
SkuName string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Device resource.
type DeviceArgs struct {
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName pulumi.StringInput
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
SkuName pulumi.StringInput
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags pulumi.StringMapInput
}
func (DeviceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*deviceArgs)(nil)).Elem()
}
type DeviceInput interface {
pulumi.Input
ToDeviceOutput() DeviceOutput
ToDeviceOutputWithContext(ctx context.Context) DeviceOutput
}
func (*Device) ElementType() reflect.Type {
return reflect.TypeOf((**Device)(nil)).Elem()
}
func (i *Device) ToDeviceOutput() DeviceOutput {
return i.ToDeviceOutputWithContext(context.Background())
}
func (i *Device) ToDeviceOutputWithContext(ctx context.Context) DeviceOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceOutput)
}
// DeviceArrayInput is an input type that accepts DeviceArray and DeviceArrayOutput values.
// You can construct a concrete instance of `DeviceArrayInput` via:
//
// DeviceArray{ DeviceArgs{...} }
type DeviceArrayInput interface {
pulumi.Input
ToDeviceArrayOutput() DeviceArrayOutput
ToDeviceArrayOutputWithContext(context.Context) DeviceArrayOutput
}
type DeviceArray []DeviceInput
func (DeviceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Device)(nil)).Elem()
}
func (i DeviceArray) ToDeviceArrayOutput() DeviceArrayOutput {
return i.ToDeviceArrayOutputWithContext(context.Background())
}
func (i DeviceArray) ToDeviceArrayOutputWithContext(ctx context.Context) DeviceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceArrayOutput)
}
// DeviceMapInput is an input type that accepts DeviceMap and DeviceMapOutput values.
// You can construct a concrete instance of `DeviceMapInput` via:
//
// DeviceMap{ "key": DeviceArgs{...} }
type DeviceMapInput interface {
pulumi.Input
ToDeviceMapOutput() DeviceMapOutput
ToDeviceMapOutputWithContext(context.Context) DeviceMapOutput
}
type DeviceMap map[string]DeviceInput
func (DeviceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Device)(nil)).Elem()
}
func (i DeviceMap) ToDeviceMapOutput() DeviceMapOutput {
return i.ToDeviceMapOutputWithContext(context.Background())
}
func (i DeviceMap) ToDeviceMapOutputWithContext(ctx context.Context) DeviceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeviceMapOutput)
}
type DeviceOutput struct{ *pulumi.OutputState }
func (DeviceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Device)(nil)).Elem()
}
func (o DeviceOutput) ToDeviceOutput() DeviceOutput {
return o
}
func (o DeviceOutput) ToDeviceOutputWithContext(ctx context.Context) DeviceOutput {
return o
}
// A `deviceProperties` block as defined below.
func (o DeviceOutput) DeviceProperties() DeviceDevicePropertyArrayOutput {
return o.ApplyT(func(v *Device) DeviceDevicePropertyArrayOutput { return v.DeviceProperties }).(DeviceDevicePropertyArrayOutput)
}
// The Azure Region where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
func (o DeviceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Device) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
func (o DeviceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Device) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
func (o DeviceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Device) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Gateway`, `EdgeMR_Mini`, `EdgeP_Base`, `EdgeP_High`, `EdgePR_Base`, `EdgePR_Base_UPS`, `GPU`, `RCA_Large`, `RCA_Small`, `RDC`, `TCA_Large`, `TCA_Small`, `TDC`, `TEA_1Node`, `TEA_1Node_UPS`, `TEA_1Node_Heater`, `TEA_1Node_UPS_Heater`, `TEA_4Node_Heater`, `TEA_4Node_UPS_Heater` or `TMA`. The second segment defines the `tier` of the `skuName`, possible values are `Standard`. For more information see the product documentation. Changing this forces a new Databox Edge Device to be created.
func (o DeviceOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Device) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Databox Edge Device.
func (o DeviceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Device) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type DeviceArrayOutput struct{ *pulumi.OutputState }
func (DeviceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Device)(nil)).Elem()
}
func (o DeviceArrayOutput) ToDeviceArrayOutput() DeviceArrayOutput {
return o
}
func (o DeviceArrayOutput) ToDeviceArrayOutputWithContext(ctx context.Context) DeviceArrayOutput {
return o
}
func (o DeviceArrayOutput) Index(i pulumi.IntInput) DeviceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Device {
return vs[0].([]*Device)[vs[1].(int)]
}).(DeviceOutput)
}
type DeviceMapOutput struct{ *pulumi.OutputState }
func (DeviceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Device)(nil)).Elem()
}
func (o DeviceMapOutput) ToDeviceMapOutput() DeviceMapOutput {
return o
}
func (o DeviceMapOutput) ToDeviceMapOutputWithContext(ctx context.Context) DeviceMapOutput {
return o
}
func (o DeviceMapOutput) MapIndex(k pulumi.StringInput) DeviceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Device {
return vs[0].(map[string]*Device)[vs[1].(string)]
}).(DeviceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DeviceInput)(nil)).Elem(), &Device{})
pulumi.RegisterInputType(reflect.TypeOf((*DeviceArrayInput)(nil)).Elem(), DeviceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DeviceMapInput)(nil)).Elem(), DeviceMap{})
pulumi.RegisterOutputType(DeviceOutput{})
pulumi.RegisterOutputType(DeviceArrayOutput{})
pulumi.RegisterOutputType(DeviceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databoxedge/getDevice.go | sdk/go/azure/databoxedge/getDevice.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package databoxedge
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Databox Edge Device.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databoxedge"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := databoxedge.LookupDevice(ctx, &databoxedge.LookupDeviceArgs{
// Name: "example-device",
// ResourceGroupName: "example-rg",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DataBoxEdge` - 2022-03-01
func LookupDevice(ctx *pulumi.Context, args *LookupDeviceArgs, opts ...pulumi.InvokeOption) (*LookupDeviceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDeviceResult
err := ctx.Invoke("azure:databoxedge/getDevice:getDevice", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDevice.
type LookupDeviceArgs struct {
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name string `pulumi:"name"`
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDevice.
type LookupDeviceResult struct {
// A `deviceProperties` block as defined below.
DeviceProperties []GetDeviceDeviceProperty `pulumi:"deviceProperties"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Databox Edge Device should exist.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU. The second segment defines the `tier` of the `skuName`. For more information see the product documentation.
SkuName string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Databox Edge Device.
Tags map[string]string `pulumi:"tags"`
}
func LookupDeviceOutput(ctx *pulumi.Context, args LookupDeviceOutputArgs, opts ...pulumi.InvokeOption) LookupDeviceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDeviceResultOutput, error) {
args := v.(LookupDeviceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:databoxedge/getDevice:getDevice", args, LookupDeviceResultOutput{}, options).(LookupDeviceResultOutput), nil
}).(LookupDeviceResultOutput)
}
// A collection of arguments for invoking getDevice.
type LookupDeviceOutputArgs struct {
// The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDeviceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeviceArgs)(nil)).Elem()
}
// A collection of values returned by getDevice.
type LookupDeviceResultOutput struct{ *pulumi.OutputState }
func (LookupDeviceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDeviceResult)(nil)).Elem()
}
func (o LookupDeviceResultOutput) ToLookupDeviceResultOutput() LookupDeviceResultOutput {
return o
}
func (o LookupDeviceResultOutput) ToLookupDeviceResultOutputWithContext(ctx context.Context) LookupDeviceResultOutput {
return o
}
// A `deviceProperties` block as defined below.
func (o LookupDeviceResultOutput) DeviceProperties() GetDeviceDevicePropertyArrayOutput {
return o.ApplyT(func(v LookupDeviceResult) []GetDeviceDeviceProperty { return v.DeviceProperties }).(GetDeviceDevicePropertyArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDeviceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Databox Edge Device should exist.
func (o LookupDeviceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupDeviceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDeviceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The `skuName` is comprised of two segments separated by a hyphen (e.g. `TEA_1Node_UPS_Heater-Standard`). The first segment of the `skuName` defines the `name` of the SKU. The second segment defines the `tier` of the `skuName`. For more information see the product documentation.
func (o LookupDeviceResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDeviceResult) string { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Databox Edge Device.
func (o LookupDeviceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDeviceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDeviceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/accountRaiBlocklist.go | sdk/go/azure/cognitive/accountRaiBlocklist.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cognitive Account Rai Blocklist.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("Brazil South"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-ca"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("OpenAI"),
// SkuName: pulumi.String("S0"),
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAccountRaiBlocklist(ctx, "example", &cognitive.AccountRaiBlocklistArgs{
// Name: pulumi.String("example-crb"),
// CognitiveAccountId: exampleAccount.ID(),
// Description: pulumi.String("Azure OpenAI Rai Blocklist"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// Cognitive Account Rai Blocklist can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/accountRaiBlocklist:AccountRaiBlocklist example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.CognitiveServices/accounts/account1/raiBlocklists/raiblocklist1
// ```
type AccountRaiBlocklist struct {
pulumi.CustomResourceState
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
CognitiveAccountId pulumi.StringOutput `pulumi:"cognitiveAccountId"`
// A short description for the Cognitive Account Rai Blocklist.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewAccountRaiBlocklist registers a new resource with the given unique name, arguments, and options.
func NewAccountRaiBlocklist(ctx *pulumi.Context,
name string, args *AccountRaiBlocklistArgs, opts ...pulumi.ResourceOption) (*AccountRaiBlocklist, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CognitiveAccountId == nil {
return nil, errors.New("invalid value for required argument 'CognitiveAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountRaiBlocklist
err := ctx.RegisterResource("azure:cognitive/accountRaiBlocklist:AccountRaiBlocklist", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountRaiBlocklist gets an existing AccountRaiBlocklist resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountRaiBlocklist(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountRaiBlocklistState, opts ...pulumi.ResourceOption) (*AccountRaiBlocklist, error) {
var resource AccountRaiBlocklist
err := ctx.ReadResource("azure:cognitive/accountRaiBlocklist:AccountRaiBlocklist", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountRaiBlocklist resources.
type accountRaiBlocklistState struct {
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// A short description for the Cognitive Account Rai Blocklist.
Description *string `pulumi:"description"`
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Name *string `pulumi:"name"`
}
type AccountRaiBlocklistState struct {
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
CognitiveAccountId pulumi.StringPtrInput
// A short description for the Cognitive Account Rai Blocklist.
Description pulumi.StringPtrInput
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Name pulumi.StringPtrInput
}
func (AccountRaiBlocklistState) ElementType() reflect.Type {
return reflect.TypeOf((*accountRaiBlocklistState)(nil)).Elem()
}
type accountRaiBlocklistArgs struct {
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
CognitiveAccountId string `pulumi:"cognitiveAccountId"`
// A short description for the Cognitive Account Rai Blocklist.
Description *string `pulumi:"description"`
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a AccountRaiBlocklist resource.
type AccountRaiBlocklistArgs struct {
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
CognitiveAccountId pulumi.StringInput
// A short description for the Cognitive Account Rai Blocklist.
Description pulumi.StringPtrInput
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
Name pulumi.StringPtrInput
}
func (AccountRaiBlocklistArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountRaiBlocklistArgs)(nil)).Elem()
}
type AccountRaiBlocklistInput interface {
pulumi.Input
ToAccountRaiBlocklistOutput() AccountRaiBlocklistOutput
ToAccountRaiBlocklistOutputWithContext(ctx context.Context) AccountRaiBlocklistOutput
}
func (*AccountRaiBlocklist) ElementType() reflect.Type {
return reflect.TypeOf((**AccountRaiBlocklist)(nil)).Elem()
}
func (i *AccountRaiBlocklist) ToAccountRaiBlocklistOutput() AccountRaiBlocklistOutput {
return i.ToAccountRaiBlocklistOutputWithContext(context.Background())
}
func (i *AccountRaiBlocklist) ToAccountRaiBlocklistOutputWithContext(ctx context.Context) AccountRaiBlocklistOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiBlocklistOutput)
}
// AccountRaiBlocklistArrayInput is an input type that accepts AccountRaiBlocklistArray and AccountRaiBlocklistArrayOutput values.
// You can construct a concrete instance of `AccountRaiBlocklistArrayInput` via:
//
// AccountRaiBlocklistArray{ AccountRaiBlocklistArgs{...} }
type AccountRaiBlocklistArrayInput interface {
pulumi.Input
ToAccountRaiBlocklistArrayOutput() AccountRaiBlocklistArrayOutput
ToAccountRaiBlocklistArrayOutputWithContext(context.Context) AccountRaiBlocklistArrayOutput
}
type AccountRaiBlocklistArray []AccountRaiBlocklistInput
func (AccountRaiBlocklistArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountRaiBlocklist)(nil)).Elem()
}
func (i AccountRaiBlocklistArray) ToAccountRaiBlocklistArrayOutput() AccountRaiBlocklistArrayOutput {
return i.ToAccountRaiBlocklistArrayOutputWithContext(context.Background())
}
func (i AccountRaiBlocklistArray) ToAccountRaiBlocklistArrayOutputWithContext(ctx context.Context) AccountRaiBlocklistArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiBlocklistArrayOutput)
}
// AccountRaiBlocklistMapInput is an input type that accepts AccountRaiBlocklistMap and AccountRaiBlocklistMapOutput values.
// You can construct a concrete instance of `AccountRaiBlocklistMapInput` via:
//
// AccountRaiBlocklistMap{ "key": AccountRaiBlocklistArgs{...} }
type AccountRaiBlocklistMapInput interface {
pulumi.Input
ToAccountRaiBlocklistMapOutput() AccountRaiBlocklistMapOutput
ToAccountRaiBlocklistMapOutputWithContext(context.Context) AccountRaiBlocklistMapOutput
}
type AccountRaiBlocklistMap map[string]AccountRaiBlocklistInput
func (AccountRaiBlocklistMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountRaiBlocklist)(nil)).Elem()
}
func (i AccountRaiBlocklistMap) ToAccountRaiBlocklistMapOutput() AccountRaiBlocklistMapOutput {
return i.ToAccountRaiBlocklistMapOutputWithContext(context.Background())
}
func (i AccountRaiBlocklistMap) ToAccountRaiBlocklistMapOutputWithContext(ctx context.Context) AccountRaiBlocklistMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiBlocklistMapOutput)
}
type AccountRaiBlocklistOutput struct{ *pulumi.OutputState }
func (AccountRaiBlocklistOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountRaiBlocklist)(nil)).Elem()
}
func (o AccountRaiBlocklistOutput) ToAccountRaiBlocklistOutput() AccountRaiBlocklistOutput {
return o
}
func (o AccountRaiBlocklistOutput) ToAccountRaiBlocklistOutputWithContext(ctx context.Context) AccountRaiBlocklistOutput {
return o
}
// The ID of the Cognitive Services Account. Changing this forces a new Cognitive Account Rai Blocklist to be created.
func (o AccountRaiBlocklistOutput) CognitiveAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountRaiBlocklist) pulumi.StringOutput { return v.CognitiveAccountId }).(pulumi.StringOutput)
}
// A short description for the Cognitive Account Rai Blocklist.
func (o AccountRaiBlocklistOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountRaiBlocklist) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name of the Cognitive Account Rai Blocklist. Changing this forces a new Cognitive Account Rai Blocklist to be created.
func (o AccountRaiBlocklistOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AccountRaiBlocklist) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type AccountRaiBlocklistArrayOutput struct{ *pulumi.OutputState }
func (AccountRaiBlocklistArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountRaiBlocklist)(nil)).Elem()
}
func (o AccountRaiBlocklistArrayOutput) ToAccountRaiBlocklistArrayOutput() AccountRaiBlocklistArrayOutput {
return o
}
func (o AccountRaiBlocklistArrayOutput) ToAccountRaiBlocklistArrayOutputWithContext(ctx context.Context) AccountRaiBlocklistArrayOutput {
return o
}
func (o AccountRaiBlocklistArrayOutput) Index(i pulumi.IntInput) AccountRaiBlocklistOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountRaiBlocklist {
return vs[0].([]*AccountRaiBlocklist)[vs[1].(int)]
}).(AccountRaiBlocklistOutput)
}
type AccountRaiBlocklistMapOutput struct{ *pulumi.OutputState }
func (AccountRaiBlocklistMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountRaiBlocklist)(nil)).Elem()
}
func (o AccountRaiBlocklistMapOutput) ToAccountRaiBlocklistMapOutput() AccountRaiBlocklistMapOutput {
return o
}
func (o AccountRaiBlocklistMapOutput) ToAccountRaiBlocklistMapOutputWithContext(ctx context.Context) AccountRaiBlocklistMapOutput {
return o
}
func (o AccountRaiBlocklistMapOutput) MapIndex(k pulumi.StringInput) AccountRaiBlocklistOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountRaiBlocklist {
return vs[0].(map[string]*AccountRaiBlocklist)[vs[1].(string)]
}).(AccountRaiBlocklistOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiBlocklistInput)(nil)).Elem(), &AccountRaiBlocklist{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiBlocklistArrayInput)(nil)).Elem(), AccountRaiBlocklistArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiBlocklistMapInput)(nil)).Elem(), AccountRaiBlocklistMap{})
pulumi.RegisterOutputType(AccountRaiBlocklistOutput{})
pulumi.RegisterOutputType(AccountRaiBlocklistArrayOutput{})
pulumi.RegisterOutputType(AccountRaiBlocklistMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/init.go | sdk/go/azure/cognitive/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:cognitive/aIServices:AIServices":
r = &AIServices{}
case "azure:cognitive/account:Account":
r = &Account{}
case "azure:cognitive/accountCustomerManagedKey:AccountCustomerManagedKey":
r = &AccountCustomerManagedKey{}
case "azure:cognitive/accountProject:AccountProject":
r = &AccountProject{}
case "azure:cognitive/accountRaiBlocklist:AccountRaiBlocklist":
r = &AccountRaiBlocklist{}
case "azure:cognitive/accountRaiPolicy:AccountRaiPolicy":
r = &AccountRaiPolicy{}
case "azure:cognitive/deployment:Deployment":
r = &Deployment{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"cognitive/aIServices",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/account",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/accountCustomerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/accountProject",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/accountRaiBlocklist",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/accountRaiPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"cognitive/deployment",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/pulumiTypes.go | sdk/go/azure/cognitive/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type AIServicesCustomerManagedKey struct {
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there are multiple identities attached to the Azure AI Service.
IdentityClientId *string `pulumi:"identityClientId"`
// The ID of the Key Vault Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// The ID of the managed HSM Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
}
// AIServicesCustomerManagedKeyInput is an input type that accepts AIServicesCustomerManagedKeyArgs and AIServicesCustomerManagedKeyOutput values.
// You can construct a concrete instance of `AIServicesCustomerManagedKeyInput` via:
//
// AIServicesCustomerManagedKeyArgs{...}
type AIServicesCustomerManagedKeyInput interface {
pulumi.Input
ToAIServicesCustomerManagedKeyOutput() AIServicesCustomerManagedKeyOutput
ToAIServicesCustomerManagedKeyOutputWithContext(context.Context) AIServicesCustomerManagedKeyOutput
}
type AIServicesCustomerManagedKeyArgs struct {
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there are multiple identities attached to the Azure AI Service.
IdentityClientId pulumi.StringPtrInput `pulumi:"identityClientId"`
// The ID of the Key Vault Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
KeyVaultKeyId pulumi.StringPtrInput `pulumi:"keyVaultKeyId"`
// The ID of the managed HSM Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
ManagedHsmKeyId pulumi.StringPtrInput `pulumi:"managedHsmKeyId"`
}
func (AIServicesCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesCustomerManagedKey)(nil)).Elem()
}
func (i AIServicesCustomerManagedKeyArgs) ToAIServicesCustomerManagedKeyOutput() AIServicesCustomerManagedKeyOutput {
return i.ToAIServicesCustomerManagedKeyOutputWithContext(context.Background())
}
func (i AIServicesCustomerManagedKeyArgs) ToAIServicesCustomerManagedKeyOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesCustomerManagedKeyOutput)
}
func (i AIServicesCustomerManagedKeyArgs) ToAIServicesCustomerManagedKeyPtrOutput() AIServicesCustomerManagedKeyPtrOutput {
return i.ToAIServicesCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (i AIServicesCustomerManagedKeyArgs) ToAIServicesCustomerManagedKeyPtrOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesCustomerManagedKeyOutput).ToAIServicesCustomerManagedKeyPtrOutputWithContext(ctx)
}
// AIServicesCustomerManagedKeyPtrInput is an input type that accepts AIServicesCustomerManagedKeyArgs, AIServicesCustomerManagedKeyPtr and AIServicesCustomerManagedKeyPtrOutput values.
// You can construct a concrete instance of `AIServicesCustomerManagedKeyPtrInput` via:
//
// AIServicesCustomerManagedKeyArgs{...}
//
// or:
//
// nil
type AIServicesCustomerManagedKeyPtrInput interface {
pulumi.Input
ToAIServicesCustomerManagedKeyPtrOutput() AIServicesCustomerManagedKeyPtrOutput
ToAIServicesCustomerManagedKeyPtrOutputWithContext(context.Context) AIServicesCustomerManagedKeyPtrOutput
}
type aiservicesCustomerManagedKeyPtrType AIServicesCustomerManagedKeyArgs
func AIServicesCustomerManagedKeyPtr(v *AIServicesCustomerManagedKeyArgs) AIServicesCustomerManagedKeyPtrInput {
return (*aiservicesCustomerManagedKeyPtrType)(v)
}
func (*aiservicesCustomerManagedKeyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesCustomerManagedKey)(nil)).Elem()
}
func (i *aiservicesCustomerManagedKeyPtrType) ToAIServicesCustomerManagedKeyPtrOutput() AIServicesCustomerManagedKeyPtrOutput {
return i.ToAIServicesCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (i *aiservicesCustomerManagedKeyPtrType) ToAIServicesCustomerManagedKeyPtrOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesCustomerManagedKeyPtrOutput)
}
type AIServicesCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (AIServicesCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesCustomerManagedKey)(nil)).Elem()
}
func (o AIServicesCustomerManagedKeyOutput) ToAIServicesCustomerManagedKeyOutput() AIServicesCustomerManagedKeyOutput {
return o
}
func (o AIServicesCustomerManagedKeyOutput) ToAIServicesCustomerManagedKeyOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyOutput {
return o
}
func (o AIServicesCustomerManagedKeyOutput) ToAIServicesCustomerManagedKeyPtrOutput() AIServicesCustomerManagedKeyPtrOutput {
return o.ToAIServicesCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (o AIServicesCustomerManagedKeyOutput) ToAIServicesCustomerManagedKeyPtrOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AIServicesCustomerManagedKey) *AIServicesCustomerManagedKey {
return &v
}).(AIServicesCustomerManagedKeyPtrOutput)
}
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there are multiple identities attached to the Azure AI Service.
func (o AIServicesCustomerManagedKeyOutput) IdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesCustomerManagedKey) *string { return v.IdentityClientId }).(pulumi.StringPtrOutput)
}
// The ID of the Key Vault Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
func (o AIServicesCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesCustomerManagedKey) *string { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// The ID of the managed HSM Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
func (o AIServicesCustomerManagedKeyOutput) ManagedHsmKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesCustomerManagedKey) *string { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput)
}
type AIServicesCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState }
func (AIServicesCustomerManagedKeyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesCustomerManagedKey)(nil)).Elem()
}
func (o AIServicesCustomerManagedKeyPtrOutput) ToAIServicesCustomerManagedKeyPtrOutput() AIServicesCustomerManagedKeyPtrOutput {
return o
}
func (o AIServicesCustomerManagedKeyPtrOutput) ToAIServicesCustomerManagedKeyPtrOutputWithContext(ctx context.Context) AIServicesCustomerManagedKeyPtrOutput {
return o
}
func (o AIServicesCustomerManagedKeyPtrOutput) Elem() AIServicesCustomerManagedKeyOutput {
return o.ApplyT(func(v *AIServicesCustomerManagedKey) AIServicesCustomerManagedKey {
if v != nil {
return *v
}
var ret AIServicesCustomerManagedKey
return ret
}).(AIServicesCustomerManagedKeyOutput)
}
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there are multiple identities attached to the Azure AI Service.
func (o AIServicesCustomerManagedKeyPtrOutput) IdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesCustomerManagedKey) *string {
if v == nil {
return nil
}
return v.IdentityClientId
}).(pulumi.StringPtrOutput)
}
// The ID of the Key Vault Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
func (o AIServicesCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesCustomerManagedKey) *string {
if v == nil {
return nil
}
return v.KeyVaultKeyId
}).(pulumi.StringPtrOutput)
}
// The ID of the managed HSM Key which should be used to encrypt the data in this AI Services Account. Exactly one of `keyVaultKeyId`, `managedHsmKeyId` must be specified.
func (o AIServicesCustomerManagedKeyPtrOutput) ManagedHsmKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesCustomerManagedKey) *string {
if v == nil {
return nil
}
return v.ManagedHsmKeyId
}).(pulumi.StringPtrOutput)
}
type AIServicesIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Services Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this AI Services Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`
Type string `pulumi:"type"`
}
// AIServicesIdentityInput is an input type that accepts AIServicesIdentityArgs and AIServicesIdentityOutput values.
// You can construct a concrete instance of `AIServicesIdentityInput` via:
//
// AIServicesIdentityArgs{...}
type AIServicesIdentityInput interface {
pulumi.Input
ToAIServicesIdentityOutput() AIServicesIdentityOutput
ToAIServicesIdentityOutputWithContext(context.Context) AIServicesIdentityOutput
}
type AIServicesIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Services Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this AI Services Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`
Type pulumi.StringInput `pulumi:"type"`
}
func (AIServicesIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesIdentity)(nil)).Elem()
}
func (i AIServicesIdentityArgs) ToAIServicesIdentityOutput() AIServicesIdentityOutput {
return i.ToAIServicesIdentityOutputWithContext(context.Background())
}
func (i AIServicesIdentityArgs) ToAIServicesIdentityOutputWithContext(ctx context.Context) AIServicesIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesIdentityOutput)
}
func (i AIServicesIdentityArgs) ToAIServicesIdentityPtrOutput() AIServicesIdentityPtrOutput {
return i.ToAIServicesIdentityPtrOutputWithContext(context.Background())
}
func (i AIServicesIdentityArgs) ToAIServicesIdentityPtrOutputWithContext(ctx context.Context) AIServicesIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesIdentityOutput).ToAIServicesIdentityPtrOutputWithContext(ctx)
}
// AIServicesIdentityPtrInput is an input type that accepts AIServicesIdentityArgs, AIServicesIdentityPtr and AIServicesIdentityPtrOutput values.
// You can construct a concrete instance of `AIServicesIdentityPtrInput` via:
//
// AIServicesIdentityArgs{...}
//
// or:
//
// nil
type AIServicesIdentityPtrInput interface {
pulumi.Input
ToAIServicesIdentityPtrOutput() AIServicesIdentityPtrOutput
ToAIServicesIdentityPtrOutputWithContext(context.Context) AIServicesIdentityPtrOutput
}
type aiservicesIdentityPtrType AIServicesIdentityArgs
func AIServicesIdentityPtr(v *AIServicesIdentityArgs) AIServicesIdentityPtrInput {
return (*aiservicesIdentityPtrType)(v)
}
func (*aiservicesIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesIdentity)(nil)).Elem()
}
func (i *aiservicesIdentityPtrType) ToAIServicesIdentityPtrOutput() AIServicesIdentityPtrOutput {
return i.ToAIServicesIdentityPtrOutputWithContext(context.Background())
}
func (i *aiservicesIdentityPtrType) ToAIServicesIdentityPtrOutputWithContext(ctx context.Context) AIServicesIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesIdentityPtrOutput)
}
type AIServicesIdentityOutput struct{ *pulumi.OutputState }
func (AIServicesIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesIdentity)(nil)).Elem()
}
func (o AIServicesIdentityOutput) ToAIServicesIdentityOutput() AIServicesIdentityOutput {
return o
}
func (o AIServicesIdentityOutput) ToAIServicesIdentityOutputWithContext(ctx context.Context) AIServicesIdentityOutput {
return o
}
func (o AIServicesIdentityOutput) ToAIServicesIdentityPtrOutput() AIServicesIdentityPtrOutput {
return o.ToAIServicesIdentityPtrOutputWithContext(context.Background())
}
func (o AIServicesIdentityOutput) ToAIServicesIdentityPtrOutputWithContext(ctx context.Context) AIServicesIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AIServicesIdentity) *AIServicesIdentity {
return &v
}).(AIServicesIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Services Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o AIServicesIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AIServicesIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AIServicesIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AIServicesIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this AI Services Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`
func (o AIServicesIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AIServicesIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AIServicesIdentityPtrOutput struct{ *pulumi.OutputState }
func (AIServicesIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesIdentity)(nil)).Elem()
}
func (o AIServicesIdentityPtrOutput) ToAIServicesIdentityPtrOutput() AIServicesIdentityPtrOutput {
return o
}
func (o AIServicesIdentityPtrOutput) ToAIServicesIdentityPtrOutputWithContext(ctx context.Context) AIServicesIdentityPtrOutput {
return o
}
func (o AIServicesIdentityPtrOutput) Elem() AIServicesIdentityOutput {
return o.ApplyT(func(v *AIServicesIdentity) AIServicesIdentity {
if v != nil {
return *v
}
var ret AIServicesIdentity
return ret
}).(AIServicesIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Services Account.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o AIServicesIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AIServicesIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AIServicesIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AIServicesIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this AI Services Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`
func (o AIServicesIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AIServicesNetworkAcls struct {
// Whether to allow trusted Azure Services to access the service. Possible values are `None` and `AzureServices`. Defaults to `AzureServices`.
Bypass *string `pulumi:"bypass"`
// The Default Action to use when no rules match from `ipRules` / `virtualNetworkRules`. Possible values are `Allow` and `Deny`.
DefaultAction string `pulumi:"defaultAction"`
// One or more IP Addresses, or CIDR Blocks which should be able to access the AI Services Account.
IpRules []string `pulumi:"ipRules"`
// A `virtualNetworkRules` block as defined below.
VirtualNetworkRules []AIServicesNetworkAclsVirtualNetworkRule `pulumi:"virtualNetworkRules"`
}
// AIServicesNetworkAclsInput is an input type that accepts AIServicesNetworkAclsArgs and AIServicesNetworkAclsOutput values.
// You can construct a concrete instance of `AIServicesNetworkAclsInput` via:
//
// AIServicesNetworkAclsArgs{...}
type AIServicesNetworkAclsInput interface {
pulumi.Input
ToAIServicesNetworkAclsOutput() AIServicesNetworkAclsOutput
ToAIServicesNetworkAclsOutputWithContext(context.Context) AIServicesNetworkAclsOutput
}
type AIServicesNetworkAclsArgs struct {
// Whether to allow trusted Azure Services to access the service. Possible values are `None` and `AzureServices`. Defaults to `AzureServices`.
Bypass pulumi.StringPtrInput `pulumi:"bypass"`
// The Default Action to use when no rules match from `ipRules` / `virtualNetworkRules`. Possible values are `Allow` and `Deny`.
DefaultAction pulumi.StringInput `pulumi:"defaultAction"`
// One or more IP Addresses, or CIDR Blocks which should be able to access the AI Services Account.
IpRules pulumi.StringArrayInput `pulumi:"ipRules"`
// A `virtualNetworkRules` block as defined below.
VirtualNetworkRules AIServicesNetworkAclsVirtualNetworkRuleArrayInput `pulumi:"virtualNetworkRules"`
}
func (AIServicesNetworkAclsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesNetworkAcls)(nil)).Elem()
}
func (i AIServicesNetworkAclsArgs) ToAIServicesNetworkAclsOutput() AIServicesNetworkAclsOutput {
return i.ToAIServicesNetworkAclsOutputWithContext(context.Background())
}
func (i AIServicesNetworkAclsArgs) ToAIServicesNetworkAclsOutputWithContext(ctx context.Context) AIServicesNetworkAclsOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesNetworkAclsOutput)
}
func (i AIServicesNetworkAclsArgs) ToAIServicesNetworkAclsPtrOutput() AIServicesNetworkAclsPtrOutput {
return i.ToAIServicesNetworkAclsPtrOutputWithContext(context.Background())
}
func (i AIServicesNetworkAclsArgs) ToAIServicesNetworkAclsPtrOutputWithContext(ctx context.Context) AIServicesNetworkAclsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesNetworkAclsOutput).ToAIServicesNetworkAclsPtrOutputWithContext(ctx)
}
// AIServicesNetworkAclsPtrInput is an input type that accepts AIServicesNetworkAclsArgs, AIServicesNetworkAclsPtr and AIServicesNetworkAclsPtrOutput values.
// You can construct a concrete instance of `AIServicesNetworkAclsPtrInput` via:
//
// AIServicesNetworkAclsArgs{...}
//
// or:
//
// nil
type AIServicesNetworkAclsPtrInput interface {
pulumi.Input
ToAIServicesNetworkAclsPtrOutput() AIServicesNetworkAclsPtrOutput
ToAIServicesNetworkAclsPtrOutputWithContext(context.Context) AIServicesNetworkAclsPtrOutput
}
type aiservicesNetworkAclsPtrType AIServicesNetworkAclsArgs
func AIServicesNetworkAclsPtr(v *AIServicesNetworkAclsArgs) AIServicesNetworkAclsPtrInput {
return (*aiservicesNetworkAclsPtrType)(v)
}
func (*aiservicesNetworkAclsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesNetworkAcls)(nil)).Elem()
}
func (i *aiservicesNetworkAclsPtrType) ToAIServicesNetworkAclsPtrOutput() AIServicesNetworkAclsPtrOutput {
return i.ToAIServicesNetworkAclsPtrOutputWithContext(context.Background())
}
func (i *aiservicesNetworkAclsPtrType) ToAIServicesNetworkAclsPtrOutputWithContext(ctx context.Context) AIServicesNetworkAclsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesNetworkAclsPtrOutput)
}
type AIServicesNetworkAclsOutput struct{ *pulumi.OutputState }
func (AIServicesNetworkAclsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesNetworkAcls)(nil)).Elem()
}
func (o AIServicesNetworkAclsOutput) ToAIServicesNetworkAclsOutput() AIServicesNetworkAclsOutput {
return o
}
func (o AIServicesNetworkAclsOutput) ToAIServicesNetworkAclsOutputWithContext(ctx context.Context) AIServicesNetworkAclsOutput {
return o
}
func (o AIServicesNetworkAclsOutput) ToAIServicesNetworkAclsPtrOutput() AIServicesNetworkAclsPtrOutput {
return o.ToAIServicesNetworkAclsPtrOutputWithContext(context.Background())
}
func (o AIServicesNetworkAclsOutput) ToAIServicesNetworkAclsPtrOutputWithContext(ctx context.Context) AIServicesNetworkAclsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AIServicesNetworkAcls) *AIServicesNetworkAcls {
return &v
}).(AIServicesNetworkAclsPtrOutput)
}
// Whether to allow trusted Azure Services to access the service. Possible values are `None` and `AzureServices`. Defaults to `AzureServices`.
func (o AIServicesNetworkAclsOutput) Bypass() pulumi.StringPtrOutput {
return o.ApplyT(func(v AIServicesNetworkAcls) *string { return v.Bypass }).(pulumi.StringPtrOutput)
}
// The Default Action to use when no rules match from `ipRules` / `virtualNetworkRules`. Possible values are `Allow` and `Deny`.
func (o AIServicesNetworkAclsOutput) DefaultAction() pulumi.StringOutput {
return o.ApplyT(func(v AIServicesNetworkAcls) string { return v.DefaultAction }).(pulumi.StringOutput)
}
// One or more IP Addresses, or CIDR Blocks which should be able to access the AI Services Account.
func (o AIServicesNetworkAclsOutput) IpRules() pulumi.StringArrayOutput {
return o.ApplyT(func(v AIServicesNetworkAcls) []string { return v.IpRules }).(pulumi.StringArrayOutput)
}
// A `virtualNetworkRules` block as defined below.
func (o AIServicesNetworkAclsOutput) VirtualNetworkRules() AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return o.ApplyT(func(v AIServicesNetworkAcls) []AIServicesNetworkAclsVirtualNetworkRule { return v.VirtualNetworkRules }).(AIServicesNetworkAclsVirtualNetworkRuleArrayOutput)
}
type AIServicesNetworkAclsPtrOutput struct{ *pulumi.OutputState }
func (AIServicesNetworkAclsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AIServicesNetworkAcls)(nil)).Elem()
}
func (o AIServicesNetworkAclsPtrOutput) ToAIServicesNetworkAclsPtrOutput() AIServicesNetworkAclsPtrOutput {
return o
}
func (o AIServicesNetworkAclsPtrOutput) ToAIServicesNetworkAclsPtrOutputWithContext(ctx context.Context) AIServicesNetworkAclsPtrOutput {
return o
}
func (o AIServicesNetworkAclsPtrOutput) Elem() AIServicesNetworkAclsOutput {
return o.ApplyT(func(v *AIServicesNetworkAcls) AIServicesNetworkAcls {
if v != nil {
return *v
}
var ret AIServicesNetworkAcls
return ret
}).(AIServicesNetworkAclsOutput)
}
// Whether to allow trusted Azure Services to access the service. Possible values are `None` and `AzureServices`. Defaults to `AzureServices`.
func (o AIServicesNetworkAclsPtrOutput) Bypass() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesNetworkAcls) *string {
if v == nil {
return nil
}
return v.Bypass
}).(pulumi.StringPtrOutput)
}
// The Default Action to use when no rules match from `ipRules` / `virtualNetworkRules`. Possible values are `Allow` and `Deny`.
func (o AIServicesNetworkAclsPtrOutput) DefaultAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServicesNetworkAcls) *string {
if v == nil {
return nil
}
return &v.DefaultAction
}).(pulumi.StringPtrOutput)
}
// One or more IP Addresses, or CIDR Blocks which should be able to access the AI Services Account.
func (o AIServicesNetworkAclsPtrOutput) IpRules() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AIServicesNetworkAcls) []string {
if v == nil {
return nil
}
return v.IpRules
}).(pulumi.StringArrayOutput)
}
// A `virtualNetworkRules` block as defined below.
func (o AIServicesNetworkAclsPtrOutput) VirtualNetworkRules() AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return o.ApplyT(func(v *AIServicesNetworkAcls) []AIServicesNetworkAclsVirtualNetworkRule {
if v == nil {
return nil
}
return v.VirtualNetworkRules
}).(AIServicesNetworkAclsVirtualNetworkRuleArrayOutput)
}
type AIServicesNetworkAclsVirtualNetworkRule struct {
// Whether to ignore a missing Virtual Network Service Endpoint or not. Default to `false`.
IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The ID of the subnet which should be able to access this AI Services Account.
SubnetId string `pulumi:"subnetId"`
}
// AIServicesNetworkAclsVirtualNetworkRuleInput is an input type that accepts AIServicesNetworkAclsVirtualNetworkRuleArgs and AIServicesNetworkAclsVirtualNetworkRuleOutput values.
// You can construct a concrete instance of `AIServicesNetworkAclsVirtualNetworkRuleInput` via:
//
// AIServicesNetworkAclsVirtualNetworkRuleArgs{...}
type AIServicesNetworkAclsVirtualNetworkRuleInput interface {
pulumi.Input
ToAIServicesNetworkAclsVirtualNetworkRuleOutput() AIServicesNetworkAclsVirtualNetworkRuleOutput
ToAIServicesNetworkAclsVirtualNetworkRuleOutputWithContext(context.Context) AIServicesNetworkAclsVirtualNetworkRuleOutput
}
type AIServicesNetworkAclsVirtualNetworkRuleArgs struct {
// Whether to ignore a missing Virtual Network Service Endpoint or not. Default to `false`.
IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The ID of the subnet which should be able to access this AI Services Account.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (AIServicesNetworkAclsVirtualNetworkRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesNetworkAclsVirtualNetworkRule)(nil)).Elem()
}
func (i AIServicesNetworkAclsVirtualNetworkRuleArgs) ToAIServicesNetworkAclsVirtualNetworkRuleOutput() AIServicesNetworkAclsVirtualNetworkRuleOutput {
return i.ToAIServicesNetworkAclsVirtualNetworkRuleOutputWithContext(context.Background())
}
func (i AIServicesNetworkAclsVirtualNetworkRuleArgs) ToAIServicesNetworkAclsVirtualNetworkRuleOutputWithContext(ctx context.Context) AIServicesNetworkAclsVirtualNetworkRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesNetworkAclsVirtualNetworkRuleOutput)
}
// AIServicesNetworkAclsVirtualNetworkRuleArrayInput is an input type that accepts AIServicesNetworkAclsVirtualNetworkRuleArray and AIServicesNetworkAclsVirtualNetworkRuleArrayOutput values.
// You can construct a concrete instance of `AIServicesNetworkAclsVirtualNetworkRuleArrayInput` via:
//
// AIServicesNetworkAclsVirtualNetworkRuleArray{ AIServicesNetworkAclsVirtualNetworkRuleArgs{...} }
type AIServicesNetworkAclsVirtualNetworkRuleArrayInput interface {
pulumi.Input
ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutput() AIServicesNetworkAclsVirtualNetworkRuleArrayOutput
ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutputWithContext(context.Context) AIServicesNetworkAclsVirtualNetworkRuleArrayOutput
}
type AIServicesNetworkAclsVirtualNetworkRuleArray []AIServicesNetworkAclsVirtualNetworkRuleInput
func (AIServicesNetworkAclsVirtualNetworkRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AIServicesNetworkAclsVirtualNetworkRule)(nil)).Elem()
}
func (i AIServicesNetworkAclsVirtualNetworkRuleArray) ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutput() AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return i.ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutputWithContext(context.Background())
}
func (i AIServicesNetworkAclsVirtualNetworkRuleArray) ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesNetworkAclsVirtualNetworkRuleArrayOutput)
}
type AIServicesNetworkAclsVirtualNetworkRuleOutput struct{ *pulumi.OutputState }
func (AIServicesNetworkAclsVirtualNetworkRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesNetworkAclsVirtualNetworkRule)(nil)).Elem()
}
func (o AIServicesNetworkAclsVirtualNetworkRuleOutput) ToAIServicesNetworkAclsVirtualNetworkRuleOutput() AIServicesNetworkAclsVirtualNetworkRuleOutput {
return o
}
func (o AIServicesNetworkAclsVirtualNetworkRuleOutput) ToAIServicesNetworkAclsVirtualNetworkRuleOutputWithContext(ctx context.Context) AIServicesNetworkAclsVirtualNetworkRuleOutput {
return o
}
// Whether to ignore a missing Virtual Network Service Endpoint or not. Default to `false`.
func (o AIServicesNetworkAclsVirtualNetworkRuleOutput) IgnoreMissingVnetServiceEndpoint() pulumi.BoolPtrOutput {
return o.ApplyT(func(v AIServicesNetworkAclsVirtualNetworkRule) *bool { return v.IgnoreMissingVnetServiceEndpoint }).(pulumi.BoolPtrOutput)
}
// The ID of the subnet which should be able to access this AI Services Account.
func (o AIServicesNetworkAclsVirtualNetworkRuleOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v AIServicesNetworkAclsVirtualNetworkRule) string { return v.SubnetId }).(pulumi.StringOutput)
}
type AIServicesNetworkAclsVirtualNetworkRuleArrayOutput struct{ *pulumi.OutputState }
func (AIServicesNetworkAclsVirtualNetworkRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AIServicesNetworkAclsVirtualNetworkRule)(nil)).Elem()
}
func (o AIServicesNetworkAclsVirtualNetworkRuleArrayOutput) ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutput() AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return o
}
func (o AIServicesNetworkAclsVirtualNetworkRuleArrayOutput) ToAIServicesNetworkAclsVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) AIServicesNetworkAclsVirtualNetworkRuleArrayOutput {
return o
}
func (o AIServicesNetworkAclsVirtualNetworkRuleArrayOutput) Index(i pulumi.IntInput) AIServicesNetworkAclsVirtualNetworkRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AIServicesNetworkAclsVirtualNetworkRule {
return vs[0].([]AIServicesNetworkAclsVirtualNetworkRule)[vs[1].(int)]
}).(AIServicesNetworkAclsVirtualNetworkRuleOutput)
}
type AIServicesStorage struct {
// The client ID of the Managed Identity associated with the Storage Account.
IdentityClientId *string `pulumi:"identityClientId"`
// The ID of the Storage Account.
StorageAccountId string `pulumi:"storageAccountId"`
}
// AIServicesStorageInput is an input type that accepts AIServicesStorageArgs and AIServicesStorageOutput values.
// You can construct a concrete instance of `AIServicesStorageInput` via:
//
// AIServicesStorageArgs{...}
type AIServicesStorageInput interface {
pulumi.Input
ToAIServicesStorageOutput() AIServicesStorageOutput
ToAIServicesStorageOutputWithContext(context.Context) AIServicesStorageOutput
}
type AIServicesStorageArgs struct {
// The client ID of the Managed Identity associated with the Storage Account.
IdentityClientId pulumi.StringPtrInput `pulumi:"identityClientId"`
// The ID of the Storage Account.
StorageAccountId pulumi.StringInput `pulumi:"storageAccountId"`
}
func (AIServicesStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AIServicesStorage)(nil)).Elem()
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/accountProject.go | sdk/go/azure/cognitive/accountProject.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cognitive Account Project.
//
// > **Note:** Cognitive Account Projects can only be created under a Cognitive Account that has `projectManagementEnabled = true`, `kind = "AIServices"`, a managed identity configured, and a `customSubdomainName` specified.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("AIServices"),
// SkuName: pulumi.String("S0"),
// ProjectManagementEnabled: pulumi.Bool(true),
// CustomSubdomainName: pulumi.String("example-account-subdomain"),
// Identity: &cognitive.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAccountProject(ctx, "example", &cognitive.AccountProjectArgs{
// Name: pulumi.String("example-project"),
// CognitiveAccountId: exampleAccount.ID(),
// Location: example.Location,
// Description: pulumi.String("Example cognitive services project"),
// DisplayName: pulumi.String("Example Project"),
// Identity: &cognitive.AccountProjectIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "Environment": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// Cognitive Account Projects can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/accountProject:AccountProject example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1/projects/project1
// ```
type AccountProject struct {
pulumi.CustomResourceState
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringOutput `pulumi:"cognitiveAccountId"`
// Whether this project is the default project for the Cognitive Account.
Default pulumi.BoolOutput `pulumi:"default"`
// A description of the Cognitive Account Project.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of the Cognitive Account Project.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// A mapping of endpoint names to endpoint URLs for the project.
Endpoints pulumi.StringMapOutput `pulumi:"endpoints"`
// An `identity` block as defined below.
Identity AccountProjectIdentityOutput `pulumi:"identity"`
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccountProject registers a new resource with the given unique name, arguments, and options.
func NewAccountProject(ctx *pulumi.Context,
name string, args *AccountProjectArgs, opts ...pulumi.ResourceOption) (*AccountProject, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CognitiveAccountId == nil {
return nil, errors.New("invalid value for required argument 'CognitiveAccountId'")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountProject
err := ctx.RegisterResource("azure:cognitive/accountProject:AccountProject", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountProject gets an existing AccountProject resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountProject(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountProjectState, opts ...pulumi.ResourceOption) (*AccountProject, error) {
var resource AccountProject
err := ctx.ReadResource("azure:cognitive/accountProject:AccountProject", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountProject resources.
type accountProjectState struct {
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// Whether this project is the default project for the Cognitive Account.
Default *bool `pulumi:"default"`
// A description of the Cognitive Account Project.
Description *string `pulumi:"description"`
// The display name of the Cognitive Account Project.
DisplayName *string `pulumi:"displayName"`
// A mapping of endpoint names to endpoint URLs for the project.
Endpoints map[string]string `pulumi:"endpoints"`
// An `identity` block as defined below.
Identity *AccountProjectIdentity `pulumi:"identity"`
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountProjectState struct {
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringPtrInput
// Whether this project is the default project for the Cognitive Account.
Default pulumi.BoolPtrInput
// A description of the Cognitive Account Project.
Description pulumi.StringPtrInput
// The display name of the Cognitive Account Project.
DisplayName pulumi.StringPtrInput
// A mapping of endpoint names to endpoint URLs for the project.
Endpoints pulumi.StringMapInput
// An `identity` block as defined below.
Identity AccountProjectIdentityPtrInput
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountProjectState) ElementType() reflect.Type {
return reflect.TypeOf((*accountProjectState)(nil)).Elem()
}
type accountProjectArgs struct {
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
CognitiveAccountId string `pulumi:"cognitiveAccountId"`
// A description of the Cognitive Account Project.
Description *string `pulumi:"description"`
// The display name of the Cognitive Account Project.
DisplayName *string `pulumi:"displayName"`
// An `identity` block as defined below.
Identity AccountProjectIdentity `pulumi:"identity"`
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a AccountProject resource.
type AccountProjectArgs struct {
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringInput
// A description of the Cognitive Account Project.
Description pulumi.StringPtrInput
// The display name of the Cognitive Account Project.
DisplayName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AccountProjectIdentityInput
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountProjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountProjectArgs)(nil)).Elem()
}
type AccountProjectInput interface {
pulumi.Input
ToAccountProjectOutput() AccountProjectOutput
ToAccountProjectOutputWithContext(ctx context.Context) AccountProjectOutput
}
func (*AccountProject) ElementType() reflect.Type {
return reflect.TypeOf((**AccountProject)(nil)).Elem()
}
func (i *AccountProject) ToAccountProjectOutput() AccountProjectOutput {
return i.ToAccountProjectOutputWithContext(context.Background())
}
func (i *AccountProject) ToAccountProjectOutputWithContext(ctx context.Context) AccountProjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountProjectOutput)
}
// AccountProjectArrayInput is an input type that accepts AccountProjectArray and AccountProjectArrayOutput values.
// You can construct a concrete instance of `AccountProjectArrayInput` via:
//
// AccountProjectArray{ AccountProjectArgs{...} }
type AccountProjectArrayInput interface {
pulumi.Input
ToAccountProjectArrayOutput() AccountProjectArrayOutput
ToAccountProjectArrayOutputWithContext(context.Context) AccountProjectArrayOutput
}
type AccountProjectArray []AccountProjectInput
func (AccountProjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountProject)(nil)).Elem()
}
func (i AccountProjectArray) ToAccountProjectArrayOutput() AccountProjectArrayOutput {
return i.ToAccountProjectArrayOutputWithContext(context.Background())
}
func (i AccountProjectArray) ToAccountProjectArrayOutputWithContext(ctx context.Context) AccountProjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountProjectArrayOutput)
}
// AccountProjectMapInput is an input type that accepts AccountProjectMap and AccountProjectMapOutput values.
// You can construct a concrete instance of `AccountProjectMapInput` via:
//
// AccountProjectMap{ "key": AccountProjectArgs{...} }
type AccountProjectMapInput interface {
pulumi.Input
ToAccountProjectMapOutput() AccountProjectMapOutput
ToAccountProjectMapOutputWithContext(context.Context) AccountProjectMapOutput
}
type AccountProjectMap map[string]AccountProjectInput
func (AccountProjectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountProject)(nil)).Elem()
}
func (i AccountProjectMap) ToAccountProjectMapOutput() AccountProjectMapOutput {
return i.ToAccountProjectMapOutputWithContext(context.Background())
}
func (i AccountProjectMap) ToAccountProjectMapOutputWithContext(ctx context.Context) AccountProjectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountProjectMapOutput)
}
type AccountProjectOutput struct{ *pulumi.OutputState }
func (AccountProjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountProject)(nil)).Elem()
}
func (o AccountProjectOutput) ToAccountProjectOutput() AccountProjectOutput {
return o
}
func (o AccountProjectOutput) ToAccountProjectOutputWithContext(ctx context.Context) AccountProjectOutput {
return o
}
// The ID of the Cognitive Account where the Project should exist. Changing this forces a new resource to be created.
func (o AccountProjectOutput) CognitiveAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringOutput { return v.CognitiveAccountId }).(pulumi.StringOutput)
}
// Whether this project is the default project for the Cognitive Account.
func (o AccountProjectOutput) Default() pulumi.BoolOutput {
return o.ApplyT(func(v *AccountProject) pulumi.BoolOutput { return v.Default }).(pulumi.BoolOutput)
}
// A description of the Cognitive Account Project.
func (o AccountProjectOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of the Cognitive Account Project.
func (o AccountProjectOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// A mapping of endpoint names to endpoint URLs for the project.
func (o AccountProjectOutput) Endpoints() pulumi.StringMapOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringMapOutput { return v.Endpoints }).(pulumi.StringMapOutput)
}
// An `identity` block as defined below.
func (o AccountProjectOutput) Identity() AccountProjectIdentityOutput {
return o.ApplyT(func(v *AccountProject) AccountProjectIdentityOutput { return v.Identity }).(AccountProjectIdentityOutput)
}
// The Azure Region where the Cognitive Account Project should exist. Changing this forces a new resource to be created.
func (o AccountProjectOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Cognitive Account Project. Changing this forces a new resource to be created.
func (o AccountProjectOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o AccountProjectOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AccountProject) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AccountProjectArrayOutput struct{ *pulumi.OutputState }
func (AccountProjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountProject)(nil)).Elem()
}
func (o AccountProjectArrayOutput) ToAccountProjectArrayOutput() AccountProjectArrayOutput {
return o
}
func (o AccountProjectArrayOutput) ToAccountProjectArrayOutputWithContext(ctx context.Context) AccountProjectArrayOutput {
return o
}
func (o AccountProjectArrayOutput) Index(i pulumi.IntInput) AccountProjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountProject {
return vs[0].([]*AccountProject)[vs[1].(int)]
}).(AccountProjectOutput)
}
type AccountProjectMapOutput struct{ *pulumi.OutputState }
func (AccountProjectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountProject)(nil)).Elem()
}
func (o AccountProjectMapOutput) ToAccountProjectMapOutput() AccountProjectMapOutput {
return o
}
func (o AccountProjectMapOutput) ToAccountProjectMapOutputWithContext(ctx context.Context) AccountProjectMapOutput {
return o
}
func (o AccountProjectMapOutput) MapIndex(k pulumi.StringInput) AccountProjectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountProject {
return vs[0].(map[string]*AccountProject)[vs[1].(string)]
}).(AccountProjectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountProjectInput)(nil)).Elem(), &AccountProject{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountProjectArrayInput)(nil)).Elem(), AccountProjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountProjectMapInput)(nil)).Elem(), AccountProjectMap{})
pulumi.RegisterOutputType(AccountProjectOutput{})
pulumi.RegisterOutputType(AccountProjectArrayOutput{})
pulumi.RegisterOutputType(AccountProjectMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/accountRaiPolicy.go | sdk/go/azure/cognitive/accountRaiPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cognitive Services Account RAI Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("OpenAI"),
// SkuName: pulumi.String("S0"),
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAccountRaiPolicy(ctx, "example", &cognitive.AccountRaiPolicyArgs{
// Name: pulumi.String("example-rai-policy"),
// CognitiveAccountId: exampleAccount.ID(),
// BasePolicyName: pulumi.String("Microsoft.Default"),
// ContentFilters: cognitive.AccountRaiPolicyContentFilterArray{
// &cognitive.AccountRaiPolicyContentFilterArgs{
// Name: pulumi.String("Hate"),
// FilterEnabled: pulumi.Bool(true),
// BlockEnabled: pulumi.Bool(true),
// SeverityThreshold: pulumi.String("High"),
// Source: pulumi.String("Prompt"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// Cognitive Service Account RAI Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/accountRaiPolicy:AccountRaiPolicy policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1/raiPolicies/policy1
// ```
type AccountRaiPolicy struct {
pulumi.CustomResourceState
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
BasePolicyName pulumi.StringOutput `pulumi:"basePolicyName"`
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringOutput `pulumi:"cognitiveAccountId"`
// A `contentFilter` block as defined below.
ContentFilters AccountRaiPolicyContentFilterArrayOutput `pulumi:"contentFilters"`
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
Mode pulumi.StringPtrOutput `pulumi:"mode"`
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccountRaiPolicy registers a new resource with the given unique name, arguments, and options.
func NewAccountRaiPolicy(ctx *pulumi.Context,
name string, args *AccountRaiPolicyArgs, opts ...pulumi.ResourceOption) (*AccountRaiPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BasePolicyName == nil {
return nil, errors.New("invalid value for required argument 'BasePolicyName'")
}
if args.CognitiveAccountId == nil {
return nil, errors.New("invalid value for required argument 'CognitiveAccountId'")
}
if args.ContentFilters == nil {
return nil, errors.New("invalid value for required argument 'ContentFilters'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountRaiPolicy
err := ctx.RegisterResource("azure:cognitive/accountRaiPolicy:AccountRaiPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountRaiPolicy gets an existing AccountRaiPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountRaiPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountRaiPolicyState, opts ...pulumi.ResourceOption) (*AccountRaiPolicy, error) {
var resource AccountRaiPolicy
err := ctx.ReadResource("azure:cognitive/accountRaiPolicy:AccountRaiPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountRaiPolicy resources.
type accountRaiPolicyState struct {
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
BasePolicyName *string `pulumi:"basePolicyName"`
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// A `contentFilter` block as defined below.
ContentFilters []AccountRaiPolicyContentFilter `pulumi:"contentFilters"`
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
Mode *string `pulumi:"mode"`
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountRaiPolicyState struct {
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
BasePolicyName pulumi.StringPtrInput
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringPtrInput
// A `contentFilter` block as defined below.
ContentFilters AccountRaiPolicyContentFilterArrayInput
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
Mode pulumi.StringPtrInput
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountRaiPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*accountRaiPolicyState)(nil)).Elem()
}
type accountRaiPolicyArgs struct {
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
BasePolicyName string `pulumi:"basePolicyName"`
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
CognitiveAccountId string `pulumi:"cognitiveAccountId"`
// A `contentFilter` block as defined below.
ContentFilters []AccountRaiPolicyContentFilter `pulumi:"contentFilters"`
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
Mode *string `pulumi:"mode"`
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a AccountRaiPolicy resource.
type AccountRaiPolicyArgs struct {
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
BasePolicyName pulumi.StringInput
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringInput
// A `contentFilter` block as defined below.
ContentFilters AccountRaiPolicyContentFilterArrayInput
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
Mode pulumi.StringPtrInput
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountRaiPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountRaiPolicyArgs)(nil)).Elem()
}
type AccountRaiPolicyInput interface {
pulumi.Input
ToAccountRaiPolicyOutput() AccountRaiPolicyOutput
ToAccountRaiPolicyOutputWithContext(ctx context.Context) AccountRaiPolicyOutput
}
func (*AccountRaiPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**AccountRaiPolicy)(nil)).Elem()
}
func (i *AccountRaiPolicy) ToAccountRaiPolicyOutput() AccountRaiPolicyOutput {
return i.ToAccountRaiPolicyOutputWithContext(context.Background())
}
func (i *AccountRaiPolicy) ToAccountRaiPolicyOutputWithContext(ctx context.Context) AccountRaiPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiPolicyOutput)
}
// AccountRaiPolicyArrayInput is an input type that accepts AccountRaiPolicyArray and AccountRaiPolicyArrayOutput values.
// You can construct a concrete instance of `AccountRaiPolicyArrayInput` via:
//
// AccountRaiPolicyArray{ AccountRaiPolicyArgs{...} }
type AccountRaiPolicyArrayInput interface {
pulumi.Input
ToAccountRaiPolicyArrayOutput() AccountRaiPolicyArrayOutput
ToAccountRaiPolicyArrayOutputWithContext(context.Context) AccountRaiPolicyArrayOutput
}
type AccountRaiPolicyArray []AccountRaiPolicyInput
func (AccountRaiPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountRaiPolicy)(nil)).Elem()
}
func (i AccountRaiPolicyArray) ToAccountRaiPolicyArrayOutput() AccountRaiPolicyArrayOutput {
return i.ToAccountRaiPolicyArrayOutputWithContext(context.Background())
}
func (i AccountRaiPolicyArray) ToAccountRaiPolicyArrayOutputWithContext(ctx context.Context) AccountRaiPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiPolicyArrayOutput)
}
// AccountRaiPolicyMapInput is an input type that accepts AccountRaiPolicyMap and AccountRaiPolicyMapOutput values.
// You can construct a concrete instance of `AccountRaiPolicyMapInput` via:
//
// AccountRaiPolicyMap{ "key": AccountRaiPolicyArgs{...} }
type AccountRaiPolicyMapInput interface {
pulumi.Input
ToAccountRaiPolicyMapOutput() AccountRaiPolicyMapOutput
ToAccountRaiPolicyMapOutputWithContext(context.Context) AccountRaiPolicyMapOutput
}
type AccountRaiPolicyMap map[string]AccountRaiPolicyInput
func (AccountRaiPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountRaiPolicy)(nil)).Elem()
}
func (i AccountRaiPolicyMap) ToAccountRaiPolicyMapOutput() AccountRaiPolicyMapOutput {
return i.ToAccountRaiPolicyMapOutputWithContext(context.Background())
}
func (i AccountRaiPolicyMap) ToAccountRaiPolicyMapOutputWithContext(ctx context.Context) AccountRaiPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountRaiPolicyMapOutput)
}
type AccountRaiPolicyOutput struct{ *pulumi.OutputState }
func (AccountRaiPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountRaiPolicy)(nil)).Elem()
}
func (o AccountRaiPolicyOutput) ToAccountRaiPolicyOutput() AccountRaiPolicyOutput {
return o
}
func (o AccountRaiPolicyOutput) ToAccountRaiPolicyOutputWithContext(ctx context.Context) AccountRaiPolicyOutput {
return o
}
// The name of the base policy to use for this RAI Policy. Changing this forces a new resource to be created.
func (o AccountRaiPolicyOutput) BasePolicyName() pulumi.StringOutput {
return o.ApplyT(func(v *AccountRaiPolicy) pulumi.StringOutput { return v.BasePolicyName }).(pulumi.StringOutput)
}
// The ID of the Cognitive Service Account to which this RAI Policy should be associated. Changing this forces a new resource to be created.
func (o AccountRaiPolicyOutput) CognitiveAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountRaiPolicy) pulumi.StringOutput { return v.CognitiveAccountId }).(pulumi.StringOutput)
}
// A `contentFilter` block as defined below.
func (o AccountRaiPolicyOutput) ContentFilters() AccountRaiPolicyContentFilterArrayOutput {
return o.ApplyT(func(v *AccountRaiPolicy) AccountRaiPolicyContentFilterArrayOutput { return v.ContentFilters }).(AccountRaiPolicyContentFilterArrayOutput)
}
// The mode of the RAI Policy. Possible values are `Default`, `Deferred`, `Blocking` or `Asynchronous_filter`.
func (o AccountRaiPolicyOutput) Mode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountRaiPolicy) pulumi.StringPtrOutput { return v.Mode }).(pulumi.StringPtrOutput)
}
// The name of the Cognitive Service Account RAI Policy. Changing this forces a new resource to be created.
func (o AccountRaiPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AccountRaiPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o AccountRaiPolicyOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AccountRaiPolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AccountRaiPolicyArrayOutput struct{ *pulumi.OutputState }
func (AccountRaiPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountRaiPolicy)(nil)).Elem()
}
func (o AccountRaiPolicyArrayOutput) ToAccountRaiPolicyArrayOutput() AccountRaiPolicyArrayOutput {
return o
}
func (o AccountRaiPolicyArrayOutput) ToAccountRaiPolicyArrayOutputWithContext(ctx context.Context) AccountRaiPolicyArrayOutput {
return o
}
func (o AccountRaiPolicyArrayOutput) Index(i pulumi.IntInput) AccountRaiPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountRaiPolicy {
return vs[0].([]*AccountRaiPolicy)[vs[1].(int)]
}).(AccountRaiPolicyOutput)
}
type AccountRaiPolicyMapOutput struct{ *pulumi.OutputState }
func (AccountRaiPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountRaiPolicy)(nil)).Elem()
}
func (o AccountRaiPolicyMapOutput) ToAccountRaiPolicyMapOutput() AccountRaiPolicyMapOutput {
return o
}
func (o AccountRaiPolicyMapOutput) ToAccountRaiPolicyMapOutputWithContext(ctx context.Context) AccountRaiPolicyMapOutput {
return o
}
func (o AccountRaiPolicyMapOutput) MapIndex(k pulumi.StringInput) AccountRaiPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountRaiPolicy {
return vs[0].(map[string]*AccountRaiPolicy)[vs[1].(string)]
}).(AccountRaiPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiPolicyInput)(nil)).Elem(), &AccountRaiPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiPolicyArrayInput)(nil)).Elem(), AccountRaiPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountRaiPolicyMapInput)(nil)).Elem(), AccountRaiPolicyMap{})
pulumi.RegisterOutputType(AccountRaiPolicyOutput{})
pulumi.RegisterOutputType(AccountRaiPolicyArrayOutput{})
pulumi.RegisterOutputType(AccountRaiPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/aiservices.go | sdk/go/azure/cognitive/aiservices.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an AI Services Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAIServices(ctx, "example", &cognitive.AIServicesArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("S0"),
// Tags: pulumi.StringMap{
// "Acceptance": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// AI Services Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/aIServices:AIServices account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1
// ```
type AIServices struct {
pulumi.CustomResourceState
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
CustomSubdomainName pulumi.StringPtrOutput `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey AIServicesCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"`
// The endpoint used to connect to the AI Services Account.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// List of FQDNs allowed for the AI Services Account.
Fqdns pulumi.StringArrayOutput `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity AIServicesIdentityPtrOutput `pulumi:"identity"`
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls AIServicesNetworkAclsPtrOutput `pulumi:"networkAcls"`
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
OutboundNetworkAccessRestricted pulumi.BoolPtrOutput `pulumi:"outboundNetworkAccessRestricted"`
// A primary access key which can be used to connect to the AI Services Account.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary access key which can be used to connect to the AI Services Account.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A `storage` block as defined below.
Storages AIServicesStorageArrayOutput `pulumi:"storages"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAIServices registers a new resource with the given unique name, arguments, and options.
func NewAIServices(ctx *pulumi.Context,
name string, args *AIServicesArgs, opts ...pulumi.ResourceOption) (*AIServices, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AIServices
err := ctx.RegisterResource("azure:cognitive/aIServices:AIServices", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAIServices gets an existing AIServices resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAIServices(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AIServicesState, opts ...pulumi.ResourceOption) (*AIServices, error) {
var resource AIServices
err := ctx.ReadResource("azure:cognitive/aIServices:AIServices", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AIServices resources.
type aiservicesState struct {
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
CustomSubdomainName *string `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey *AIServicesCustomerManagedKey `pulumi:"customerManagedKey"`
// The endpoint used to connect to the AI Services Account.
Endpoint *string `pulumi:"endpoint"`
// List of FQDNs allowed for the AI Services Account.
Fqdns []string `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity *AIServicesIdentity `pulumi:"identity"`
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls *AIServicesNetworkAcls `pulumi:"networkAcls"`
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
OutboundNetworkAccessRestricted *bool `pulumi:"outboundNetworkAccessRestricted"`
// A primary access key which can be used to connect to the AI Services Account.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary access key which can be used to connect to the AI Services Account.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName *string `pulumi:"skuName"`
// A `storage` block as defined below.
Storages []AIServicesStorage `pulumi:"storages"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AIServicesState struct {
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
CustomSubdomainName pulumi.StringPtrInput
// A `customerManagedKey` block as documented below.
CustomerManagedKey AIServicesCustomerManagedKeyPtrInput
// The endpoint used to connect to the AI Services Account.
Endpoint pulumi.StringPtrInput
// List of FQDNs allowed for the AI Services Account.
Fqdns pulumi.StringArrayInput
// An `identity` block as defined below.
Identity AIServicesIdentityPtrInput
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls AIServicesNetworkAclsPtrInput
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
OutboundNetworkAccessRestricted pulumi.BoolPtrInput
// A primary access key which can be used to connect to the AI Services Account.
PrimaryAccessKey pulumi.StringPtrInput
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary access key which can be used to connect to the AI Services Account.
SecondaryAccessKey pulumi.StringPtrInput
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName pulumi.StringPtrInput
// A `storage` block as defined below.
Storages AIServicesStorageArrayInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AIServicesState) ElementType() reflect.Type {
return reflect.TypeOf((*aiservicesState)(nil)).Elem()
}
type aiservicesArgs struct {
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
CustomSubdomainName *string `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey *AIServicesCustomerManagedKey `pulumi:"customerManagedKey"`
// List of FQDNs allowed for the AI Services Account.
Fqdns []string `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity *AIServicesIdentity `pulumi:"identity"`
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls *AIServicesNetworkAcls `pulumi:"networkAcls"`
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
OutboundNetworkAccessRestricted *bool `pulumi:"outboundNetworkAccessRestricted"`
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName string `pulumi:"skuName"`
// A `storage` block as defined below.
Storages []AIServicesStorage `pulumi:"storages"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a AIServices resource.
type AIServicesArgs struct {
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
CustomSubdomainName pulumi.StringPtrInput
// A `customerManagedKey` block as documented below.
CustomerManagedKey AIServicesCustomerManagedKeyPtrInput
// List of FQDNs allowed for the AI Services Account.
Fqdns pulumi.StringArrayInput
// An `identity` block as defined below.
Identity AIServicesIdentityPtrInput
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls AIServicesNetworkAclsPtrInput
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
OutboundNetworkAccessRestricted pulumi.BoolPtrInput
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName pulumi.StringInput
// A `storage` block as defined below.
Storages AIServicesStorageArrayInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AIServicesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*aiservicesArgs)(nil)).Elem()
}
type AIServicesInput interface {
pulumi.Input
ToAIServicesOutput() AIServicesOutput
ToAIServicesOutputWithContext(ctx context.Context) AIServicesOutput
}
func (*AIServices) ElementType() reflect.Type {
return reflect.TypeOf((**AIServices)(nil)).Elem()
}
func (i *AIServices) ToAIServicesOutput() AIServicesOutput {
return i.ToAIServicesOutputWithContext(context.Background())
}
func (i *AIServices) ToAIServicesOutputWithContext(ctx context.Context) AIServicesOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesOutput)
}
// AIServicesArrayInput is an input type that accepts AIServicesArray and AIServicesArrayOutput values.
// You can construct a concrete instance of `AIServicesArrayInput` via:
//
// AIServicesArray{ AIServicesArgs{...} }
type AIServicesArrayInput interface {
pulumi.Input
ToAIServicesArrayOutput() AIServicesArrayOutput
ToAIServicesArrayOutputWithContext(context.Context) AIServicesArrayOutput
}
type AIServicesArray []AIServicesInput
func (AIServicesArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AIServices)(nil)).Elem()
}
func (i AIServicesArray) ToAIServicesArrayOutput() AIServicesArrayOutput {
return i.ToAIServicesArrayOutputWithContext(context.Background())
}
func (i AIServicesArray) ToAIServicesArrayOutputWithContext(ctx context.Context) AIServicesArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesArrayOutput)
}
// AIServicesMapInput is an input type that accepts AIServicesMap and AIServicesMapOutput values.
// You can construct a concrete instance of `AIServicesMapInput` via:
//
// AIServicesMap{ "key": AIServicesArgs{...} }
type AIServicesMapInput interface {
pulumi.Input
ToAIServicesMapOutput() AIServicesMapOutput
ToAIServicesMapOutputWithContext(context.Context) AIServicesMapOutput
}
type AIServicesMap map[string]AIServicesInput
func (AIServicesMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AIServices)(nil)).Elem()
}
func (i AIServicesMap) ToAIServicesMapOutput() AIServicesMapOutput {
return i.ToAIServicesMapOutputWithContext(context.Background())
}
func (i AIServicesMap) ToAIServicesMapOutputWithContext(ctx context.Context) AIServicesMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AIServicesMapOutput)
}
type AIServicesOutput struct{ *pulumi.OutputState }
func (AIServicesOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AIServices)(nil)).Elem()
}
func (o AIServicesOutput) ToAIServicesOutput() AIServicesOutput {
return o
}
func (o AIServicesOutput) ToAIServicesOutputWithContext(ctx context.Context) AIServicesOutput {
return o
}
// The subdomain name used for token-based authentication. This property is required when `networkAcls` is specified. Changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource.
func (o AIServicesOutput) CustomSubdomainName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringPtrOutput { return v.CustomSubdomainName }).(pulumi.StringPtrOutput)
}
// A `customerManagedKey` block as documented below.
func (o AIServicesOutput) CustomerManagedKey() AIServicesCustomerManagedKeyPtrOutput {
return o.ApplyT(func(v *AIServices) AIServicesCustomerManagedKeyPtrOutput { return v.CustomerManagedKey }).(AIServicesCustomerManagedKeyPtrOutput)
}
// The endpoint used to connect to the AI Services Account.
func (o AIServicesOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// List of FQDNs allowed for the AI Services Account.
func (o AIServicesOutput) Fqdns() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringArrayOutput { return v.Fqdns }).(pulumi.StringArrayOutput)
}
// An `identity` block as defined below.
func (o AIServicesOutput) Identity() AIServicesIdentityPtrOutput {
return o.ApplyT(func(v *AIServices) AIServicesIdentityPtrOutput { return v.Identity }).(AIServicesIdentityPtrOutput)
}
// Whether local authentication is enabled for the AI Services Account. Defaults to `true`.
func (o AIServicesOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AIServices) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AIServicesOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the AI Services Account. Changing this forces a new resource to be created.
func (o AIServicesOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
func (o AIServicesOutput) NetworkAcls() AIServicesNetworkAclsPtrOutput {
return o.ApplyT(func(v *AIServices) AIServicesNetworkAclsPtrOutput { return v.NetworkAcls }).(AIServicesNetworkAclsPtrOutput)
}
// Whether outbound network access is restricted for the AI Services Account. Defaults to `false`.
func (o AIServicesOutput) OutboundNetworkAccessRestricted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AIServices) pulumi.BoolPtrOutput { return v.OutboundNetworkAccessRestricted }).(pulumi.BoolPtrOutput)
}
// A primary access key which can be used to connect to the AI Services Account.
func (o AIServicesOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether public network access is allowed for the AI Services Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
func (o AIServicesOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The name of the resource group in which the AI Services Account is created. Changing this forces a new resource to be created.
func (o AIServicesOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary access key which can be used to connect to the AI Services Account.
func (o AIServicesOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// Specifies the SKU Name for this AI Services Account. Possible values are `F0`, `F1`, `S0`, `S`, `S1`, `S2`, `S3`, `S4`, `S5`, `S6`, `P0`, `P1`, `P2`, `E0` and `DC0`.
//
// > **Note:** SKU `DC0` is the commitment tier for AI Services Account containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
func (o AIServicesOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// A `storage` block as defined below.
func (o AIServicesOutput) Storages() AIServicesStorageArrayOutput {
return o.ApplyT(func(v *AIServices) AIServicesStorageArrayOutput { return v.Storages }).(AIServicesStorageArrayOutput)
}
// A mapping of tags to assign to the resource.
func (o AIServicesOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AIServices) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AIServicesArrayOutput struct{ *pulumi.OutputState }
func (AIServicesArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AIServices)(nil)).Elem()
}
func (o AIServicesArrayOutput) ToAIServicesArrayOutput() AIServicesArrayOutput {
return o
}
func (o AIServicesArrayOutput) ToAIServicesArrayOutputWithContext(ctx context.Context) AIServicesArrayOutput {
return o
}
func (o AIServicesArrayOutput) Index(i pulumi.IntInput) AIServicesOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AIServices {
return vs[0].([]*AIServices)[vs[1].(int)]
}).(AIServicesOutput)
}
type AIServicesMapOutput struct{ *pulumi.OutputState }
func (AIServicesMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AIServices)(nil)).Elem()
}
func (o AIServicesMapOutput) ToAIServicesMapOutput() AIServicesMapOutput {
return o
}
func (o AIServicesMapOutput) ToAIServicesMapOutputWithContext(ctx context.Context) AIServicesMapOutput {
return o
}
func (o AIServicesMapOutput) MapIndex(k pulumi.StringInput) AIServicesOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AIServices {
return vs[0].(map[string]*AIServices)[vs[1].(string)]
}).(AIServicesOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AIServicesInput)(nil)).Elem(), &AIServices{})
pulumi.RegisterInputType(reflect.TypeOf((*AIServicesArrayInput)(nil)).Elem(), AIServicesArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AIServicesMapInput)(nil)).Elem(), AIServicesMap{})
pulumi.RegisterOutputType(AIServicesOutput{})
pulumi.RegisterOutputType(AIServicesArrayOutput{})
pulumi.RegisterOutputType(AIServicesMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/accountCustomerManagedKey.go | sdk/go/azure/cognitive/accountCustomerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Customer Managed Key for a Cognitive Services Account.
//
// > **Note:** It's possible to define a Customer Managed Key both within the `cognitive.Account` resource via the `customerManagedKey` block and by using the `cognitive.AccountCustomerManagedKey` resource. However it's not possible to use both methods to manage a Customer Managed Key for a Cognitive Account, since there'll be conflicts.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// ResourceGroupName: example.Name,
// Location: example.Location,
// Name: pulumi.String("example-identity"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("Face"),
// SkuName: pulumi.String("E0"),
// CustomSubdomainName: pulumi.String("example-account"),
// Identity: &cognitive.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned, UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-vault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleAccount.Identity.ApplyT(func(identity cognitive.AccountIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleAccount.Identity.ApplyT(func(identity cognitive.AccountIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Create"),
// pulumi.String("List"),
// pulumi.String("Restore"),
// pulumi.String("Recover"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Purge"),
// pulumi.String("Encrypt"),
// pulumi.String("Decrypt"),
// pulumi.String("Sign"),
// pulumi.String("Verify"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("List"),
// pulumi.String("Restore"),
// pulumi.String("Recover"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Purge"),
// pulumi.String("Encrypt"),
// pulumi.String("Decrypt"),
// pulumi.String("Sign"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleUserAssignedIdentity.TenantId,
// ObjectId: exampleUserAssignedIdentity.PrincipalId,
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("List"),
// pulumi.String("Restore"),
// pulumi.String("Recover"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Purge"),
// pulumi.String("Encrypt"),
// pulumi.String("Decrypt"),
// pulumi.String("Sign"),
// pulumi.String("Verify"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("example-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAccountCustomerManagedKey(ctx, "example", &cognitive.AccountCustomerManagedKeyArgs{
// CognitiveAccountId: exampleAccount.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// IdentityClientId: exampleUserAssignedIdentity.ClientId,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// Customer Managed Keys for a Cognitive Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/accountCustomerManagedKey:AccountCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1
// ```
type AccountCustomerManagedKey struct {
pulumi.CustomResourceState
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringOutput `pulumi:"cognitiveAccountId"`
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
IdentityClientId pulumi.StringPtrOutput `pulumi:"identityClientId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"`
}
// NewAccountCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewAccountCustomerManagedKey(ctx *pulumi.Context,
name string, args *AccountCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*AccountCustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CognitiveAccountId == nil {
return nil, errors.New("invalid value for required argument 'CognitiveAccountId'")
}
if args.KeyVaultKeyId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultKeyId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountCustomerManagedKey
err := ctx.RegisterResource("azure:cognitive/accountCustomerManagedKey:AccountCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountCustomerManagedKey gets an existing AccountCustomerManagedKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*AccountCustomerManagedKey, error) {
var resource AccountCustomerManagedKey
err := ctx.ReadResource("azure:cognitive/accountCustomerManagedKey:AccountCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountCustomerManagedKey resources.
type accountCustomerManagedKeyState struct {
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
IdentityClientId *string `pulumi:"identityClientId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
}
type AccountCustomerManagedKeyState struct {
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringPtrInput
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
IdentityClientId pulumi.StringPtrInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
KeyVaultKeyId pulumi.StringPtrInput
}
func (AccountCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*accountCustomerManagedKeyState)(nil)).Elem()
}
type accountCustomerManagedKeyArgs struct {
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
CognitiveAccountId string `pulumi:"cognitiveAccountId"`
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
IdentityClientId *string `pulumi:"identityClientId"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
}
// The set of arguments for constructing a AccountCustomerManagedKey resource.
type AccountCustomerManagedKeyArgs struct {
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringInput
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
IdentityClientId pulumi.StringPtrInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
KeyVaultKeyId pulumi.StringInput
}
func (AccountCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountCustomerManagedKeyArgs)(nil)).Elem()
}
type AccountCustomerManagedKeyInput interface {
pulumi.Input
ToAccountCustomerManagedKeyOutput() AccountCustomerManagedKeyOutput
ToAccountCustomerManagedKeyOutputWithContext(ctx context.Context) AccountCustomerManagedKeyOutput
}
func (*AccountCustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCustomerManagedKey)(nil)).Elem()
}
func (i *AccountCustomerManagedKey) ToAccountCustomerManagedKeyOutput() AccountCustomerManagedKeyOutput {
return i.ToAccountCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *AccountCustomerManagedKey) ToAccountCustomerManagedKeyOutputWithContext(ctx context.Context) AccountCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCustomerManagedKeyOutput)
}
// AccountCustomerManagedKeyArrayInput is an input type that accepts AccountCustomerManagedKeyArray and AccountCustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `AccountCustomerManagedKeyArrayInput` via:
//
// AccountCustomerManagedKeyArray{ AccountCustomerManagedKeyArgs{...} }
type AccountCustomerManagedKeyArrayInput interface {
pulumi.Input
ToAccountCustomerManagedKeyArrayOutput() AccountCustomerManagedKeyArrayOutput
ToAccountCustomerManagedKeyArrayOutputWithContext(context.Context) AccountCustomerManagedKeyArrayOutput
}
type AccountCustomerManagedKeyArray []AccountCustomerManagedKeyInput
func (AccountCustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountCustomerManagedKey)(nil)).Elem()
}
func (i AccountCustomerManagedKeyArray) ToAccountCustomerManagedKeyArrayOutput() AccountCustomerManagedKeyArrayOutput {
return i.ToAccountCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i AccountCustomerManagedKeyArray) ToAccountCustomerManagedKeyArrayOutputWithContext(ctx context.Context) AccountCustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCustomerManagedKeyArrayOutput)
}
// AccountCustomerManagedKeyMapInput is an input type that accepts AccountCustomerManagedKeyMap and AccountCustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `AccountCustomerManagedKeyMapInput` via:
//
// AccountCustomerManagedKeyMap{ "key": AccountCustomerManagedKeyArgs{...} }
type AccountCustomerManagedKeyMapInput interface {
pulumi.Input
ToAccountCustomerManagedKeyMapOutput() AccountCustomerManagedKeyMapOutput
ToAccountCustomerManagedKeyMapOutputWithContext(context.Context) AccountCustomerManagedKeyMapOutput
}
type AccountCustomerManagedKeyMap map[string]AccountCustomerManagedKeyInput
func (AccountCustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountCustomerManagedKey)(nil)).Elem()
}
func (i AccountCustomerManagedKeyMap) ToAccountCustomerManagedKeyMapOutput() AccountCustomerManagedKeyMapOutput {
return i.ToAccountCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i AccountCustomerManagedKeyMap) ToAccountCustomerManagedKeyMapOutputWithContext(ctx context.Context) AccountCustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCustomerManagedKeyMapOutput)
}
type AccountCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (AccountCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCustomerManagedKey)(nil)).Elem()
}
func (o AccountCustomerManagedKeyOutput) ToAccountCustomerManagedKeyOutput() AccountCustomerManagedKeyOutput {
return o
}
func (o AccountCustomerManagedKeyOutput) ToAccountCustomerManagedKeyOutputWithContext(ctx context.Context) AccountCustomerManagedKeyOutput {
return o
}
// The ID of the Cognitive Account. Changing this forces a new resource to be created.
func (o AccountCustomerManagedKeyOutput) CognitiveAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCustomerManagedKey) pulumi.StringOutput { return v.CognitiveAccountId }).(pulumi.StringOutput)
}
// The Client ID of the User Assigned Identity that has access to the key. This property only needs to be specified when there're multiple identities attached to the Cognitive Account.
func (o AccountCustomerManagedKeyOutput) IdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCustomerManagedKey) pulumi.StringPtrOutput { return v.IdentityClientId }).(pulumi.StringPtrOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Cognitive Account.
func (o AccountCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
type AccountCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (AccountCustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountCustomerManagedKey)(nil)).Elem()
}
func (o AccountCustomerManagedKeyArrayOutput) ToAccountCustomerManagedKeyArrayOutput() AccountCustomerManagedKeyArrayOutput {
return o
}
func (o AccountCustomerManagedKeyArrayOutput) ToAccountCustomerManagedKeyArrayOutputWithContext(ctx context.Context) AccountCustomerManagedKeyArrayOutput {
return o
}
func (o AccountCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) AccountCustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountCustomerManagedKey {
return vs[0].([]*AccountCustomerManagedKey)[vs[1].(int)]
}).(AccountCustomerManagedKeyOutput)
}
type AccountCustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (AccountCustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountCustomerManagedKey)(nil)).Elem()
}
func (o AccountCustomerManagedKeyMapOutput) ToAccountCustomerManagedKeyMapOutput() AccountCustomerManagedKeyMapOutput {
return o
}
func (o AccountCustomerManagedKeyMapOutput) ToAccountCustomerManagedKeyMapOutputWithContext(ctx context.Context) AccountCustomerManagedKeyMapOutput {
return o
}
func (o AccountCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) AccountCustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountCustomerManagedKey {
return vs[0].(map[string]*AccountCustomerManagedKey)[vs[1].(string)]
}).(AccountCustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountCustomerManagedKeyInput)(nil)).Elem(), &AccountCustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCustomerManagedKeyArrayInput)(nil)).Elem(), AccountCustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCustomerManagedKeyMapInput)(nil)).Elem(), AccountCustomerManagedKeyMap{})
pulumi.RegisterOutputType(AccountCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(AccountCustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(AccountCustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/getAccount.go | sdk/go/azure/cognitive/getAccount.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Cognitive Services Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// test, err := cognitive.LookupAccount(ctx, &cognitive.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "cognitive_account_rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("primaryAccessKey", test.PrimaryAccessKey)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccountResult
err := ctx.Invoke("azure:cognitive/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// Specifies the name of the Cognitive Services Account.
Name string `pulumi:"name"`
// Specifies the name of the resource group where the Cognitive Services Account resides.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The ID of the search service.
CustomQuestionAnsweringSearchServiceId string `pulumi:"customQuestionAnsweringSearchServiceId"`
// The subdomain name used for Entra ID token-based authentication.
CustomSubdomainName string `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as defined below.
CustomerManagedKeys []GetAccountCustomerManagedKeyType `pulumi:"customerManagedKeys"`
// Whether dynamic throttling is enabled for this Cognitive Services Account.
DynamicThrottlingEnabled bool `pulumi:"dynamicThrottlingEnabled"`
// The endpoint of the Cognitive Services Account.
Endpoint string `pulumi:"endpoint"`
// List of FQDNs allowed for the Cognitive Services Account.
Fqdns []string `pulumi:"fqdns"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetAccountIdentity `pulumi:"identities"`
// The type of the Cognitive Services Account.
Kind string `pulumi:"kind"`
// Whether local authentication methods are enabled for the Cognitive Services Account.
LocalAuthEnabled bool `pulumi:"localAuthEnabled"`
// The Azure location where the Cognitive Services Account exists.
Location string `pulumi:"location"`
// The Microsoft Entra Application (client) ID.
MetricsAdvisorAadClientId string `pulumi:"metricsAdvisorAadClientId"`
// The Microsoft Entra Tenant ID.
MetricsAdvisorAadTenantId string `pulumi:"metricsAdvisorAadTenantId"`
// The super user of Metrics Advisor.
MetricsAdvisorSuperUserName string `pulumi:"metricsAdvisorSuperUserName"`
// The website name of Metrics Advisor.
MetricsAdvisorWebsiteName string `pulumi:"metricsAdvisorWebsiteName"`
Name string `pulumi:"name"`
// A `networkAcls` block as defined below.
NetworkAcls []GetAccountNetworkAcl `pulumi:"networkAcls"`
// A `networkInjection` block as defined below.
NetworkInjections []GetAccountNetworkInjection `pulumi:"networkInjections"`
// Whether outbound network access is restricted for the Cognitive Services Account.
OutboundNetworkAccessRestricted bool `pulumi:"outboundNetworkAccessRestricted"`
// The primary access key of the Cognitive Services Account.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
// Whether project management is enabled.
ProjectManagementEnabled bool `pulumi:"projectManagementEnabled"`
// Whether public network access is allowed for the Cognitive Services Account.
PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"`
// The link to the QNA runtime.
QnaRuntimeEndpoint string `pulumi:"qnaRuntimeEndpoint"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary access key of the Cognitive Services Account.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// The SKU name of the Cognitive Services Account.
SkuName string `pulumi:"skuName"`
// A `storage` block as defined below.
Storages []GetAccountStorage `pulumi:"storages"`
// A mapping of tags to assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func LookupAccountOutput(ctx *pulumi.Context, args LookupAccountOutputArgs, opts ...pulumi.InvokeOption) LookupAccountResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAccountResultOutput, error) {
args := v.(LookupAccountArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:cognitive/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// Specifies the name of the Cognitive Services Account.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the resource group where the Cognitive Services Account resides.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// A mapping of tags to assigned to the resource.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (LookupAccountOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountArgs)(nil)).Elem()
}
// A collection of values returned by getAccount.
type LookupAccountResultOutput struct{ *pulumi.OutputState }
func (LookupAccountResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountResult)(nil)).Elem()
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutput() LookupAccountResultOutput {
return o
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutputWithContext(ctx context.Context) LookupAccountResultOutput {
return o
}
// The ID of the search service.
func (o LookupAccountResultOutput) CustomQuestionAnsweringSearchServiceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.CustomQuestionAnsweringSearchServiceId }).(pulumi.StringOutput)
}
// The subdomain name used for Entra ID token-based authentication.
func (o LookupAccountResultOutput) CustomSubdomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.CustomSubdomainName }).(pulumi.StringOutput)
}
// A `customerManagedKey` block as defined below.
func (o LookupAccountResultOutput) CustomerManagedKeys() GetAccountCustomerManagedKeyTypeArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountCustomerManagedKeyType { return v.CustomerManagedKeys }).(GetAccountCustomerManagedKeyTypeArrayOutput)
}
// Whether dynamic throttling is enabled for this Cognitive Services Account.
func (o LookupAccountResultOutput) DynamicThrottlingEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.DynamicThrottlingEnabled }).(pulumi.BoolOutput)
}
// The endpoint of the Cognitive Services Account.
func (o LookupAccountResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// List of FQDNs allowed for the Cognitive Services Account.
func (o LookupAccountResultOutput) Fqdns() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []string { return v.Fqdns }).(pulumi.StringArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAccountResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o LookupAccountResultOutput) Identities() GetAccountIdentityArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountIdentity { return v.Identities }).(GetAccountIdentityArrayOutput)
}
// The type of the Cognitive Services Account.
func (o LookupAccountResultOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Kind }).(pulumi.StringOutput)
}
// Whether local authentication methods are enabled for the Cognitive Services Account.
func (o LookupAccountResultOutput) LocalAuthEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.LocalAuthEnabled }).(pulumi.BoolOutput)
}
// The Azure location where the Cognitive Services Account exists.
func (o LookupAccountResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Location }).(pulumi.StringOutput)
}
// The Microsoft Entra Application (client) ID.
func (o LookupAccountResultOutput) MetricsAdvisorAadClientId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.MetricsAdvisorAadClientId }).(pulumi.StringOutput)
}
// The Microsoft Entra Tenant ID.
func (o LookupAccountResultOutput) MetricsAdvisorAadTenantId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.MetricsAdvisorAadTenantId }).(pulumi.StringOutput)
}
// The super user of Metrics Advisor.
func (o LookupAccountResultOutput) MetricsAdvisorSuperUserName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.MetricsAdvisorSuperUserName }).(pulumi.StringOutput)
}
// The website name of Metrics Advisor.
func (o LookupAccountResultOutput) MetricsAdvisorWebsiteName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.MetricsAdvisorWebsiteName }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `networkAcls` block as defined below.
func (o LookupAccountResultOutput) NetworkAcls() GetAccountNetworkAclArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountNetworkAcl { return v.NetworkAcls }).(GetAccountNetworkAclArrayOutput)
}
// A `networkInjection` block as defined below.
func (o LookupAccountResultOutput) NetworkInjections() GetAccountNetworkInjectionArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountNetworkInjection { return v.NetworkInjections }).(GetAccountNetworkInjectionArrayOutput)
}
// Whether outbound network access is restricted for the Cognitive Services Account.
func (o LookupAccountResultOutput) OutboundNetworkAccessRestricted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.OutboundNetworkAccessRestricted }).(pulumi.BoolOutput)
}
// The primary access key of the Cognitive Services Account.
func (o LookupAccountResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether project management is enabled.
func (o LookupAccountResultOutput) ProjectManagementEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.ProjectManagementEnabled }).(pulumi.BoolOutput)
}
// Whether public network access is allowed for the Cognitive Services Account.
func (o LookupAccountResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput)
}
// The link to the QNA runtime.
func (o LookupAccountResultOutput) QnaRuntimeEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.QnaRuntimeEndpoint }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary access key of the Cognitive Services Account.
func (o LookupAccountResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// The SKU name of the Cognitive Services Account.
func (o LookupAccountResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SkuName }).(pulumi.StringOutput)
}
// A `storage` block as defined below.
func (o LookupAccountResultOutput) Storages() GetAccountStorageArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountStorage { return v.Storages }).(GetAccountStorageArrayOutput)
}
// A mapping of tags to assigned to the resource.
func (o LookupAccountResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAccountResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAccountResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/deployment.go | sdk/go/azure/cognitive/deployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cognitive Services Account Deployment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-ca"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("OpenAI"),
// SkuName: pulumi.String("S0"),
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewDeployment(ctx, "example", &cognitive.DeploymentArgs{
// Name: pulumi.String("example-cd"),
// CognitiveAccountId: exampleAccount.ID(),
// Model: &cognitive.DeploymentModelArgs{
// Format: pulumi.String("OpenAI"),
// Name: pulumi.String("text-curie-001"),
// Version: pulumi.String("1"),
// },
// Sku: &cognitive.DeploymentSkuArgs{
// Name: pulumi.String("Standard"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// ## Import
//
// Cognitive Services Account Deployment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/deployment:Deployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.CognitiveServices/accounts/account1/deployments/deployment1
// ```
type Deployment struct {
pulumi.CustomResourceState
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringOutput `pulumi:"cognitiveAccountId"`
// Whether dynamic throttling is enabled.
DynamicThrottlingEnabled pulumi.BoolPtrOutput `pulumi:"dynamicThrottlingEnabled"`
// A `model` block as defined below. Changing this forces a new resource to be created.
Model DeploymentModelOutput `pulumi:"model"`
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of RAI policy.
RaiPolicyName pulumi.StringPtrOutput `pulumi:"raiPolicyName"`
// A `sku` block as defined below.
Sku DeploymentSkuOutput `pulumi:"sku"`
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
VersionUpgradeOption pulumi.StringPtrOutput `pulumi:"versionUpgradeOption"`
}
// NewDeployment registers a new resource with the given unique name, arguments, and options.
func NewDeployment(ctx *pulumi.Context,
name string, args *DeploymentArgs, opts ...pulumi.ResourceOption) (*Deployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CognitiveAccountId == nil {
return nil, errors.New("invalid value for required argument 'CognitiveAccountId'")
}
if args.Model == nil {
return nil, errors.New("invalid value for required argument 'Model'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Deployment
err := ctx.RegisterResource("azure:cognitive/deployment:Deployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDeployment gets an existing Deployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DeploymentState, opts ...pulumi.ResourceOption) (*Deployment, error) {
var resource Deployment
err := ctx.ReadResource("azure:cognitive/deployment:Deployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Deployment resources.
type deploymentState struct {
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
CognitiveAccountId *string `pulumi:"cognitiveAccountId"`
// Whether dynamic throttling is enabled.
DynamicThrottlingEnabled *bool `pulumi:"dynamicThrottlingEnabled"`
// A `model` block as defined below. Changing this forces a new resource to be created.
Model *DeploymentModel `pulumi:"model"`
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of RAI policy.
RaiPolicyName *string `pulumi:"raiPolicyName"`
// A `sku` block as defined below.
Sku *DeploymentSku `pulumi:"sku"`
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
VersionUpgradeOption *string `pulumi:"versionUpgradeOption"`
}
type DeploymentState struct {
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringPtrInput
// Whether dynamic throttling is enabled.
DynamicThrottlingEnabled pulumi.BoolPtrInput
// A `model` block as defined below. Changing this forces a new resource to be created.
Model DeploymentModelPtrInput
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of RAI policy.
RaiPolicyName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku DeploymentSkuPtrInput
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
VersionUpgradeOption pulumi.StringPtrInput
}
func (DeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*deploymentState)(nil)).Elem()
}
type deploymentArgs struct {
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
CognitiveAccountId string `pulumi:"cognitiveAccountId"`
// Whether dynamic throttling is enabled.
DynamicThrottlingEnabled *bool `pulumi:"dynamicThrottlingEnabled"`
// A `model` block as defined below. Changing this forces a new resource to be created.
Model DeploymentModel `pulumi:"model"`
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of RAI policy.
RaiPolicyName *string `pulumi:"raiPolicyName"`
// A `sku` block as defined below.
Sku DeploymentSku `pulumi:"sku"`
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
VersionUpgradeOption *string `pulumi:"versionUpgradeOption"`
}
// The set of arguments for constructing a Deployment resource.
type DeploymentArgs struct {
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
CognitiveAccountId pulumi.StringInput
// Whether dynamic throttling is enabled.
DynamicThrottlingEnabled pulumi.BoolPtrInput
// A `model` block as defined below. Changing this forces a new resource to be created.
Model DeploymentModelInput
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of RAI policy.
RaiPolicyName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku DeploymentSkuInput
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
VersionUpgradeOption pulumi.StringPtrInput
}
func (DeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*deploymentArgs)(nil)).Elem()
}
type DeploymentInput interface {
pulumi.Input
ToDeploymentOutput() DeploymentOutput
ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput
}
func (*Deployment) ElementType() reflect.Type {
return reflect.TypeOf((**Deployment)(nil)).Elem()
}
func (i *Deployment) ToDeploymentOutput() DeploymentOutput {
return i.ToDeploymentOutputWithContext(context.Background())
}
func (i *Deployment) ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentOutput)
}
// DeploymentArrayInput is an input type that accepts DeploymentArray and DeploymentArrayOutput values.
// You can construct a concrete instance of `DeploymentArrayInput` via:
//
// DeploymentArray{ DeploymentArgs{...} }
type DeploymentArrayInput interface {
pulumi.Input
ToDeploymentArrayOutput() DeploymentArrayOutput
ToDeploymentArrayOutputWithContext(context.Context) DeploymentArrayOutput
}
type DeploymentArray []DeploymentInput
func (DeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Deployment)(nil)).Elem()
}
func (i DeploymentArray) ToDeploymentArrayOutput() DeploymentArrayOutput {
return i.ToDeploymentArrayOutputWithContext(context.Background())
}
func (i DeploymentArray) ToDeploymentArrayOutputWithContext(ctx context.Context) DeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentArrayOutput)
}
// DeploymentMapInput is an input type that accepts DeploymentMap and DeploymentMapOutput values.
// You can construct a concrete instance of `DeploymentMapInput` via:
//
// DeploymentMap{ "key": DeploymentArgs{...} }
type DeploymentMapInput interface {
pulumi.Input
ToDeploymentMapOutput() DeploymentMapOutput
ToDeploymentMapOutputWithContext(context.Context) DeploymentMapOutput
}
type DeploymentMap map[string]DeploymentInput
func (DeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Deployment)(nil)).Elem()
}
func (i DeploymentMap) ToDeploymentMapOutput() DeploymentMapOutput {
return i.ToDeploymentMapOutputWithContext(context.Background())
}
func (i DeploymentMap) ToDeploymentMapOutputWithContext(ctx context.Context) DeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DeploymentMapOutput)
}
type DeploymentOutput struct{ *pulumi.OutputState }
func (DeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Deployment)(nil)).Elem()
}
func (o DeploymentOutput) ToDeploymentOutput() DeploymentOutput {
return o
}
func (o DeploymentOutput) ToDeploymentOutputWithContext(ctx context.Context) DeploymentOutput {
return o
}
// The ID of the Cognitive Services Account. Changing this forces a new resource to be created.
func (o DeploymentOutput) CognitiveAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.CognitiveAccountId }).(pulumi.StringOutput)
}
// Whether dynamic throttling is enabled.
func (o DeploymentOutput) DynamicThrottlingEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.BoolPtrOutput { return v.DynamicThrottlingEnabled }).(pulumi.BoolPtrOutput)
}
// A `model` block as defined below. Changing this forces a new resource to be created.
func (o DeploymentOutput) Model() DeploymentModelOutput {
return o.ApplyT(func(v *Deployment) DeploymentModelOutput { return v.Model }).(DeploymentModelOutput)
}
// The name of the Cognitive Services Account Deployment. Changing this forces a new resource to be created.
func (o DeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of RAI policy.
func (o DeploymentOutput) RaiPolicyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.RaiPolicyName }).(pulumi.StringPtrOutput)
}
// A `sku` block as defined below.
func (o DeploymentOutput) Sku() DeploymentSkuOutput {
return o.ApplyT(func(v *Deployment) DeploymentSkuOutput { return v.Sku }).(DeploymentSkuOutput)
}
// Deployment model version upgrade option. Possible values are `OnceNewDefaultVersionAvailable`, `OnceCurrentVersionExpired`, and `NoAutoUpgrade`. Defaults to `OnceNewDefaultVersionAvailable`.
func (o DeploymentOutput) VersionUpgradeOption() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Deployment) pulumi.StringPtrOutput { return v.VersionUpgradeOption }).(pulumi.StringPtrOutput)
}
type DeploymentArrayOutput struct{ *pulumi.OutputState }
func (DeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Deployment)(nil)).Elem()
}
func (o DeploymentArrayOutput) ToDeploymentArrayOutput() DeploymentArrayOutput {
return o
}
func (o DeploymentArrayOutput) ToDeploymentArrayOutputWithContext(ctx context.Context) DeploymentArrayOutput {
return o
}
func (o DeploymentArrayOutput) Index(i pulumi.IntInput) DeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Deployment {
return vs[0].([]*Deployment)[vs[1].(int)]
}).(DeploymentOutput)
}
type DeploymentMapOutput struct{ *pulumi.OutputState }
func (DeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Deployment)(nil)).Elem()
}
func (o DeploymentMapOutput) ToDeploymentMapOutput() DeploymentMapOutput {
return o
}
func (o DeploymentMapOutput) ToDeploymentMapOutputWithContext(ctx context.Context) DeploymentMapOutput {
return o
}
func (o DeploymentMapOutput) MapIndex(k pulumi.StringInput) DeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Deployment {
return vs[0].(map[string]*Deployment)[vs[1].(string)]
}).(DeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentInput)(nil)).Elem(), &Deployment{})
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentArrayInput)(nil)).Elem(), DeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DeploymentMapInput)(nil)).Elem(), DeploymentMap{})
pulumi.RegisterOutputType(DeploymentOutput{})
pulumi.RegisterOutputType(DeploymentArrayOutput{})
pulumi.RegisterOutputType(DeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/cognitive/account.go | sdk/go/azure/cognitive/account.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package cognitive
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cognitive Services Account.
//
// > **Note:** The Cognitive Services Account manages the resource type for various Azure AI resource implementations, including Azure AI Foundry, Azure OpenAI, Azure Speech, Azure Vision and others. Each service shares the same control plane but exposes a different subset of developer APIs. Azure AI Foundry (kind = `AIServices`) provides the superset of capabilities. For more information, please see [Azure AI Foundry architecture](https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/architecture).
//
// > **Note:** The Azure Provider will attempt to Purge the Cognitive Services Account during deletion. This feature can be disabled using the `features` block within the `provider` block, see the provider documentation on the features block for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = cognitive.NewAccount(ctx, "example", &cognitive.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Kind: pulumi.String("Face"),
// SkuName: pulumi.String("S0"),
// Tags: pulumi.StringMap{
// "Acceptance": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.CognitiveServices` - 2025-06-01
//
// * `Microsoft.Network` - 2025-01-01
//
// ## Import
//
// Cognitive Service Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:cognitive/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.CognitiveServices/accounts/account1
// ```
type Account struct {
pulumi.CustomResourceState
// If `kind` is `TextAnalytics` this specifies the ID of the Search service.
CustomQuestionAnsweringSearchServiceId pulumi.StringPtrOutput `pulumi:"customQuestionAnsweringSearchServiceId"`
// If `kind` is `TextAnalytics` this specifies the key of the Search service.
//
// > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview)
CustomQuestionAnsweringSearchServiceKey pulumi.StringPtrOutput `pulumi:"customQuestionAnsweringSearchServiceKey"`
// The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://<custom_subdomain_name>.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible.
CustomSubdomainName pulumi.StringPtrOutput `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey AccountCustomerManagedKeyTypePtrOutput `pulumi:"customerManagedKey"`
// Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`.
DynamicThrottlingEnabled pulumi.BoolPtrOutput `pulumi:"dynamicThrottlingEnabled"`
// The endpoint used to connect to the Cognitive Service Account.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// List of FQDNs allowed for the Cognitive Account.
Fqdns pulumi.StringArrayOutput `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity AccountIdentityPtrOutput `pulumi:"identity"`
// Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal).
//
// > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first.
//
// > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites).
Kind pulumi.StringOutput `pulumi:"kind"`
// Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadClientId pulumi.StringPtrOutput `pulumi:"metricsAdvisorAadClientId"`
// The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadTenantId pulumi.StringPtrOutput `pulumi:"metricsAdvisorAadTenantId"`
// The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorSuperUserName pulumi.StringPtrOutput `pulumi:"metricsAdvisorSuperUserName"`
// The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
//
// > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`.
MetricsAdvisorWebsiteName pulumi.StringPtrOutput `pulumi:"metricsAdvisorWebsiteName"`
// Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls AccountNetworkAclsPtrOutput `pulumi:"networkAcls"`
// A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`.
NetworkInjection AccountNetworkInjectionPtrOutput `pulumi:"networkInjection"`
// Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`.
OutboundNetworkAccessRestricted pulumi.BoolPtrOutput `pulumi:"outboundNetworkAccessRestricted"`
// A primary access key which can be used to connect to the Cognitive Service Account.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`.
ProjectManagementEnabled pulumi.BoolPtrOutput `pulumi:"projectManagementEnabled"`
// Whether public network access is allowed for the Cognitive Account. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// A URL to link a QnAMaker cognitive account to a QnA runtime.
QnaRuntimeEndpoint pulumi.StringPtrOutput `pulumi:"qnaRuntimeEndpoint"`
// The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary access key which can be used to connect to the Cognitive Service Account.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`.
//
// > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A `storage` block as defined below.
Storages AccountStorageArrayOutput `pulumi:"storages"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccount registers a new resource with the given unique name, arguments, and options.
func NewAccount(ctx *pulumi.Context,
name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Kind == nil {
return nil, errors.New("invalid value for required argument 'Kind'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
if args.CustomQuestionAnsweringSearchServiceKey != nil {
args.CustomQuestionAnsweringSearchServiceKey = pulumi.ToSecret(args.CustomQuestionAnsweringSearchServiceKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"customQuestionAnsweringSearchServiceKey",
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:cognitive/account:Account", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccount gets an existing Account resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) {
var resource Account
err := ctx.ReadResource("azure:cognitive/account:Account", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Account resources.
type accountState struct {
// If `kind` is `TextAnalytics` this specifies the ID of the Search service.
CustomQuestionAnsweringSearchServiceId *string `pulumi:"customQuestionAnsweringSearchServiceId"`
// If `kind` is `TextAnalytics` this specifies the key of the Search service.
//
// > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview)
CustomQuestionAnsweringSearchServiceKey *string `pulumi:"customQuestionAnsweringSearchServiceKey"`
// The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://<custom_subdomain_name>.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible.
CustomSubdomainName *string `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey *AccountCustomerManagedKeyType `pulumi:"customerManagedKey"`
// Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`.
DynamicThrottlingEnabled *bool `pulumi:"dynamicThrottlingEnabled"`
// The endpoint used to connect to the Cognitive Service Account.
Endpoint *string `pulumi:"endpoint"`
// List of FQDNs allowed for the Cognitive Account.
Fqdns []string `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal).
//
// > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first.
//
// > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites).
Kind *string `pulumi:"kind"`
// Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadClientId *string `pulumi:"metricsAdvisorAadClientId"`
// The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadTenantId *string `pulumi:"metricsAdvisorAadTenantId"`
// The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorSuperUserName *string `pulumi:"metricsAdvisorSuperUserName"`
// The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
//
// > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`.
MetricsAdvisorWebsiteName *string `pulumi:"metricsAdvisorWebsiteName"`
// Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls *AccountNetworkAcls `pulumi:"networkAcls"`
// A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`.
NetworkInjection *AccountNetworkInjection `pulumi:"networkInjection"`
// Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`.
OutboundNetworkAccessRestricted *bool `pulumi:"outboundNetworkAccessRestricted"`
// A primary access key which can be used to connect to the Cognitive Service Account.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`.
ProjectManagementEnabled *bool `pulumi:"projectManagementEnabled"`
// Whether public network access is allowed for the Cognitive Account. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// A URL to link a QnAMaker cognitive account to a QnA runtime.
QnaRuntimeEndpoint *string `pulumi:"qnaRuntimeEndpoint"`
// The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary access key which can be used to connect to the Cognitive Service Account.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`.
//
// > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName *string `pulumi:"skuName"`
// A `storage` block as defined below.
Storages []AccountStorage `pulumi:"storages"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// If `kind` is `TextAnalytics` this specifies the ID of the Search service.
CustomQuestionAnsweringSearchServiceId pulumi.StringPtrInput
// If `kind` is `TextAnalytics` this specifies the key of the Search service.
//
// > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview)
CustomQuestionAnsweringSearchServiceKey pulumi.StringPtrInput
// The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://<custom_subdomain_name>.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible.
CustomSubdomainName pulumi.StringPtrInput
// A `customerManagedKey` block as documented below.
CustomerManagedKey AccountCustomerManagedKeyTypePtrInput
// Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`.
DynamicThrottlingEnabled pulumi.BoolPtrInput
// The endpoint used to connect to the Cognitive Service Account.
Endpoint pulumi.StringPtrInput
// List of FQDNs allowed for the Cognitive Account.
Fqdns pulumi.StringArrayInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal).
//
// > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first.
//
// > **Note:** You must create your first Face, Text Analytics, or Computer Vision resources from the Azure portal to review and acknowledge the terms and conditions. In Azure Portal, the checkbox to accept terms and conditions is only displayed when a US region is selected. More information on [Prerequisites](https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows#prerequisites).
Kind pulumi.StringPtrInput
// Whether local authentication methods is enabled for the Cognitive Account. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The Azure AD Client ID (Application ID). This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadClientId pulumi.StringPtrInput
// The Azure AD Tenant ID. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorAadTenantId pulumi.StringPtrInput
// The super user of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
MetricsAdvisorSuperUserName pulumi.StringPtrInput
// The website name of Metrics Advisor. This attribute is only set when kind is `MetricsAdvisor`. Changing this forces a new resource to be created.
//
// > **Note:** This URL is mandatory if the `kind` is set to `QnAMaker`.
MetricsAdvisorWebsiteName pulumi.StringPtrInput
// Specifies the name of the Cognitive Service Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkAcls` block as defined below. When this property is specified, `customSubdomainName` is also required to be set.
NetworkAcls AccountNetworkAclsPtrInput
// A `networkInjection` block as defined below. Only applicable if the `kind` is set to `AIServices`.
NetworkInjection AccountNetworkInjectionPtrInput
// Whether outbound network access is restricted for the Cognitive Account. Defaults to `false`.
OutboundNetworkAccessRestricted pulumi.BoolPtrInput
// A primary access key which can be used to connect to the Cognitive Service Account.
PrimaryAccessKey pulumi.StringPtrInput
// Whether project management is enabled. Can only be set to `true` when `kind` is set to `AIServices`. Once enabled, disabling `projectManagementEnabled` forces a new resource to be created unless `kind` is set to `OpenAI`. Defaults to `false`.
ProjectManagementEnabled pulumi.BoolPtrInput
// Whether public network access is allowed for the Cognitive Account. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// A URL to link a QnAMaker cognitive account to a QnA runtime.
QnaRuntimeEndpoint pulumi.StringPtrInput
// The name of the resource group in which the Cognitive Service Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary access key which can be used to connect to the Cognitive Service Account.
SecondaryAccessKey pulumi.StringPtrInput
// Specifies the SKU Name for this Cognitive Service Account. Possible values are `C2`, `C3`, `C4`, `D3`, `DC0`, `E0`, `F0`, `F1`, `P0`, `P1`, `P2`, `S`, `S0`, `S1`, `S2`, `S3`, `S4`, `S5` and `S6`.
//
// > **Note:** SKU `DC0` is the commitment tier for Cognitive Services containers running in disconnected environments. You must obtain approval from Microsoft by submitting the [request form](https://aka.ms/csdisconnectedcontainers) first, before you can use this SKU. More information on [Purchase a commitment plan to use containers in disconnected environments](https://learn.microsoft.com/en-us/azure/cognitive-services/containers/disconnected-containers?tabs=stt#purchase-a-commitment-plan-to-use-containers-in-disconnected-environments).
SkuName pulumi.StringPtrInput
// A `storage` block as defined below.
Storages AccountStorageArrayInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// If `kind` is `TextAnalytics` this specifies the ID of the Search service.
CustomQuestionAnsweringSearchServiceId *string `pulumi:"customQuestionAnsweringSearchServiceId"`
// If `kind` is `TextAnalytics` this specifies the key of the Search service.
//
// > **Note:** `customQuestionAnsweringSearchServiceId` and `customQuestionAnsweringSearchServiceKey` are used for [Custom Question Answering, the renamed version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/custom-question-answering), while `qnaRuntimeEndpoint` is used for [the old version of QnA Maker](https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/overview)
CustomQuestionAnsweringSearchServiceKey *string `pulumi:"customQuestionAnsweringSearchServiceKey"`
// The subdomain name used for Entra ID token-based authentication. This attribute is required when `networkAcls` is specified. This attribute is also required when using the OpenAI service with libraries which assume the Azure OpenAI endpoint is a subdomain on `https://openai.azure.com/`, eg. `https://<custom_subdomain_name>.openai.azure.com/`. This can be specified during creation or added later, but once set changing this forces a new resource to be created.
//
// > **Note:** If you do not specify a `customSubdomainName` then you will not be able to attach a Private Endpoint to the resource. Moreover, functionality that requires Entra ID authentication, including Agent service, will not be accessible.
CustomSubdomainName *string `pulumi:"customSubdomainName"`
// A `customerManagedKey` block as documented below.
CustomerManagedKey *AccountCustomerManagedKeyType `pulumi:"customerManagedKey"`
// Whether to enable the dynamic throttling for this Cognitive Service Account. This attribute cannot be set when the `kind` is `OpenAI` or `AIServices`.
DynamicThrottlingEnabled *bool `pulumi:"dynamicThrottlingEnabled"`
// List of FQDNs allowed for the Cognitive Account.
Fqdns []string `pulumi:"fqdns"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// Specifies the type of Cognitive Service Account that should be created. Possible values are `Academic`, `AIServices`, `AnomalyDetector`, `Bing.Autosuggest`, `Bing.Autosuggest.v7`, `Bing.CustomSearch`, `Bing.Search`, `Bing.Search.v7`, `Bing.Speech`, `Bing.SpellCheck`, `Bing.SpellCheck.v7`, `CognitiveServices`, `ComputerVision`, `ContentModerator`, `ContentSafety`, `CustomSpeech`, `CustomVision.Prediction`, `CustomVision.Training`, `Emotion`, `Face`, `FormRecognizer`, `ImmersiveReader`, `LUIS`, `LUIS.Authoring`, `MetricsAdvisor`, `OpenAI`, `Personalizer`, `QnAMaker`, `Recommendations`, `SpeakerRecognition`, `Speech`, `SpeechServices`, `SpeechTranslation`, `TextAnalytics`, `TextTranslation` and `WebLM`. Changing this forces a new resource to be created except when upgrading the Cognitive Service Account from `OpenAI` to `AIServices` or rolling back from `AIServices` to `OpenAI`. More information on [upgrade and rollback scenario](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/upgrade-azure-openai?tabs=portal).
//
// > **Note:** New Bing Search resources cannot be created as their APIs are moving from Cognitive Services Platform to new surface area under Microsoft.com. Starting from October 30, 2020, existing instances of Bing Search APIs provisioned via Cognitive Services will be continuously supported for next 3 years or till the end of respective Enterprise Agreement, whichever happens first.
//
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/portal/init.go | sdk/go/azure/portal/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package portal
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:portal/portalDashboard:PortalDashboard":
r = &PortalDashboard{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"portal/portalDashboard",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/portal/portalDashboard.go | sdk/go/azure/portal/portalDashboard.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package portal
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Import
//
// Dashboards can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:portal/portalDashboard:PortalDashboard my-board /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Portal/dashboards/00000000-0000-0000-0000-000000000000
// ```
//
// Note the URI in the above sample can be found using the Resource Explorer tool in the Azure Portal.
type PortalDashboard struct {
pulumi.CustomResourceState
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
DashboardProperties pulumi.StringOutput `pulumi:"dashboardProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPortalDashboard registers a new resource with the given unique name, arguments, and options.
func NewPortalDashboard(ctx *pulumi.Context,
name string, args *PortalDashboardArgs, opts ...pulumi.ResourceOption) (*PortalDashboard, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DashboardProperties == nil {
return nil, errors.New("invalid value for required argument 'DashboardProperties'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:portal/dashboard:Dashboard"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource PortalDashboard
err := ctx.RegisterResource("azure:portal/portalDashboard:PortalDashboard", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPortalDashboard gets an existing PortalDashboard resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPortalDashboard(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PortalDashboardState, opts ...pulumi.ResourceOption) (*PortalDashboard, error) {
var resource PortalDashboard
err := ctx.ReadResource("azure:portal/portalDashboard:PortalDashboard", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PortalDashboard resources.
type portalDashboardState struct {
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
DashboardProperties *string `pulumi:"dashboardProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type PortalDashboardState struct {
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
DashboardProperties pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (PortalDashboardState) ElementType() reflect.Type {
return reflect.TypeOf((*portalDashboardState)(nil)).Elem()
}
type portalDashboardArgs struct {
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
DashboardProperties string `pulumi:"dashboardProperties"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a PortalDashboard resource.
type PortalDashboardArgs struct {
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
DashboardProperties pulumi.StringInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (PortalDashboardArgs) ElementType() reflect.Type {
return reflect.TypeOf((*portalDashboardArgs)(nil)).Elem()
}
type PortalDashboardInput interface {
pulumi.Input
ToPortalDashboardOutput() PortalDashboardOutput
ToPortalDashboardOutputWithContext(ctx context.Context) PortalDashboardOutput
}
func (*PortalDashboard) ElementType() reflect.Type {
return reflect.TypeOf((**PortalDashboard)(nil)).Elem()
}
func (i *PortalDashboard) ToPortalDashboardOutput() PortalDashboardOutput {
return i.ToPortalDashboardOutputWithContext(context.Background())
}
func (i *PortalDashboard) ToPortalDashboardOutputWithContext(ctx context.Context) PortalDashboardOutput {
return pulumi.ToOutputWithContext(ctx, i).(PortalDashboardOutput)
}
// PortalDashboardArrayInput is an input type that accepts PortalDashboardArray and PortalDashboardArrayOutput values.
// You can construct a concrete instance of `PortalDashboardArrayInput` via:
//
// PortalDashboardArray{ PortalDashboardArgs{...} }
type PortalDashboardArrayInput interface {
pulumi.Input
ToPortalDashboardArrayOutput() PortalDashboardArrayOutput
ToPortalDashboardArrayOutputWithContext(context.Context) PortalDashboardArrayOutput
}
type PortalDashboardArray []PortalDashboardInput
func (PortalDashboardArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PortalDashboard)(nil)).Elem()
}
func (i PortalDashboardArray) ToPortalDashboardArrayOutput() PortalDashboardArrayOutput {
return i.ToPortalDashboardArrayOutputWithContext(context.Background())
}
func (i PortalDashboardArray) ToPortalDashboardArrayOutputWithContext(ctx context.Context) PortalDashboardArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PortalDashboardArrayOutput)
}
// PortalDashboardMapInput is an input type that accepts PortalDashboardMap and PortalDashboardMapOutput values.
// You can construct a concrete instance of `PortalDashboardMapInput` via:
//
// PortalDashboardMap{ "key": PortalDashboardArgs{...} }
type PortalDashboardMapInput interface {
pulumi.Input
ToPortalDashboardMapOutput() PortalDashboardMapOutput
ToPortalDashboardMapOutputWithContext(context.Context) PortalDashboardMapOutput
}
type PortalDashboardMap map[string]PortalDashboardInput
func (PortalDashboardMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PortalDashboard)(nil)).Elem()
}
func (i PortalDashboardMap) ToPortalDashboardMapOutput() PortalDashboardMapOutput {
return i.ToPortalDashboardMapOutputWithContext(context.Background())
}
func (i PortalDashboardMap) ToPortalDashboardMapOutputWithContext(ctx context.Context) PortalDashboardMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PortalDashboardMapOutput)
}
type PortalDashboardOutput struct{ *pulumi.OutputState }
func (PortalDashboardOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PortalDashboard)(nil)).Elem()
}
func (o PortalDashboardOutput) ToPortalDashboardOutput() PortalDashboardOutput {
return o
}
func (o PortalDashboardOutput) ToPortalDashboardOutputWithContext(ctx context.Context) PortalDashboardOutput {
return o
}
// JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
func (o PortalDashboardOutput) DashboardProperties() pulumi.StringOutput {
return o.ApplyT(func(v *PortalDashboard) pulumi.StringOutput { return v.DashboardProperties }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o PortalDashboardOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *PortalDashboard) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Shared Dashboard. Changing this forces a new resource to be created.
//
// > **Note:** You can specify a tag with the key `hidden-title` to set a more user-friendly title for this Dashboard.
func (o PortalDashboardOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PortalDashboard) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the dashboard. Changing this forces a new resource to be created.
func (o PortalDashboardOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PortalDashboard) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o PortalDashboardOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *PortalDashboard) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type PortalDashboardArrayOutput struct{ *pulumi.OutputState }
func (PortalDashboardArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PortalDashboard)(nil)).Elem()
}
func (o PortalDashboardArrayOutput) ToPortalDashboardArrayOutput() PortalDashboardArrayOutput {
return o
}
func (o PortalDashboardArrayOutput) ToPortalDashboardArrayOutputWithContext(ctx context.Context) PortalDashboardArrayOutput {
return o
}
func (o PortalDashboardArrayOutput) Index(i pulumi.IntInput) PortalDashboardOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PortalDashboard {
return vs[0].([]*PortalDashboard)[vs[1].(int)]
}).(PortalDashboardOutput)
}
type PortalDashboardMapOutput struct{ *pulumi.OutputState }
func (PortalDashboardMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PortalDashboard)(nil)).Elem()
}
func (o PortalDashboardMapOutput) ToPortalDashboardMapOutput() PortalDashboardMapOutput {
return o
}
func (o PortalDashboardMapOutput) ToPortalDashboardMapOutputWithContext(ctx context.Context) PortalDashboardMapOutput {
return o
}
func (o PortalDashboardMapOutput) MapIndex(k pulumi.StringInput) PortalDashboardOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PortalDashboard {
return vs[0].(map[string]*PortalDashboard)[vs[1].(string)]
}).(PortalDashboardOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PortalDashboardInput)(nil)).Elem(), &PortalDashboard{})
pulumi.RegisterInputType(reflect.TypeOf((*PortalDashboardArrayInput)(nil)).Elem(), PortalDashboardArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PortalDashboardMapInput)(nil)).Elem(), PortalDashboardMap{})
pulumi.RegisterOutputType(PortalDashboardOutput{})
pulumi.RegisterOutputType(PortalDashboardArrayOutput{})
pulumi.RegisterOutputType(PortalDashboardMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/portal/azurerm_portal_dashboard.go | sdk/go/azure/portal/azurerm_portal_dashboard.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package portal
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing shared dashboard in the Azure Portal. This is the data source of the `azurermDashboard` resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/portal"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := portal.Azurerm_portal_dashboard(ctx, &portal.Azurerm_portal_dashboardArgs{
// Name: pulumi.StringRef("existing-dashboard"),
// ResourceGroupName: "dashboard-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", exampleAzurermDashboard.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Portal` - 2019-01-01-preview
func Azurerm_portal_dashboard(ctx *pulumi.Context, args *Azurerm_portal_dashboardArgs, opts ...pulumi.InvokeOption) (*Azurerm_portal_dashboardResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv Azurerm_portal_dashboardResult
err := ctx.Invoke("azure:portal/azurerm_portal_dashboard:azurerm_portal_dashboard", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking azurerm_portal_dashboard.
type Azurerm_portal_dashboardArgs struct {
// JSON data representing dashboard body.
DashboardProperties *string `pulumi:"dashboardProperties"`
// Specifies the display name of the shared Azure Portal Dashboard.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the shared Azure Portal Dashboard.
Name *string `pulumi:"name"`
// Specifies the name of the resource group the shared Azure Portal Dashboard is located in.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by azurerm_portal_dashboard.
type Azurerm_portal_dashboardResult struct {
// JSON data representing dashboard body.
DashboardProperties string `pulumi:"dashboardProperties"`
DisplayName *string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the shared Azure Portal dashboard exists.
Location string `pulumi:"location"`
Name *string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the shared Azure Portal dashboard.
Tags map[string]string `pulumi:"tags"`
}
func Azurerm_portal_dashboardOutput(ctx *pulumi.Context, args Azurerm_portal_dashboardOutputArgs, opts ...pulumi.InvokeOption) Azurerm_portal_dashboardResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (Azurerm_portal_dashboardResultOutput, error) {
args := v.(Azurerm_portal_dashboardArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:portal/azurerm_portal_dashboard:azurerm_portal_dashboard", args, Azurerm_portal_dashboardResultOutput{}, options).(Azurerm_portal_dashboardResultOutput), nil
}).(Azurerm_portal_dashboardResultOutput)
}
// A collection of arguments for invoking azurerm_portal_dashboard.
type Azurerm_portal_dashboardOutputArgs struct {
// JSON data representing dashboard body.
DashboardProperties pulumi.StringPtrInput `pulumi:"dashboardProperties"`
// Specifies the display name of the shared Azure Portal Dashboard.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
// Specifies the name of the shared Azure Portal Dashboard.
Name pulumi.StringPtrInput `pulumi:"name"`
// Specifies the name of the resource group the shared Azure Portal Dashboard is located in.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (Azurerm_portal_dashboardOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*Azurerm_portal_dashboardArgs)(nil)).Elem()
}
// A collection of values returned by azurerm_portal_dashboard.
type Azurerm_portal_dashboardResultOutput struct{ *pulumi.OutputState }
func (Azurerm_portal_dashboardResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Azurerm_portal_dashboardResult)(nil)).Elem()
}
func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutput() Azurerm_portal_dashboardResultOutput {
return o
}
func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutputWithContext(ctx context.Context) Azurerm_portal_dashboardResultOutput {
return o
}
// JSON data representing dashboard body.
func (o Azurerm_portal_dashboardResultOutput) DashboardProperties() pulumi.StringOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.DashboardProperties }).(pulumi.StringOutput)
}
func (o Azurerm_portal_dashboardResultOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o Azurerm_portal_dashboardResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the shared Azure Portal dashboard exists.
func (o Azurerm_portal_dashboardResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o Azurerm_portal_dashboardResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
func (o Azurerm_portal_dashboardResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the shared Azure Portal dashboard.
func (o Azurerm_portal_dashboardResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v Azurerm_portal_dashboardResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(Azurerm_portal_dashboardResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/getWorkspace.go | sdk/go/azure/machinelearning/getWorkspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Machine Learning Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := machinelearning.LookupWorkspace(ctx, &machinelearning.LookupWorkspaceArgs{
// Name: "example-workspace",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", existingAzurermMachineLearningWorkspace.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupWorkspaceResult
err := ctx.Invoke("azure:machinelearning/getWorkspace:getWorkspace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getWorkspace.
type LookupWorkspaceArgs struct {
// The name of the Machine Learning Workspace exists.
Name string `pulumi:"name"`
// The name of the Resource Group where the Machine Learning Workspace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getWorkspace.
type LookupWorkspaceResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetWorkspaceIdentity `pulumi:"identities"`
// The location where the Machine Learning Workspace exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Machine Learning Workspace.
Tags map[string]string `pulumi:"tags"`
}
func LookupWorkspaceOutput(ctx *pulumi.Context, args LookupWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupWorkspaceResultOutput, error) {
args := v.(LookupWorkspaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:machinelearning/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil
}).(LookupWorkspaceResultOutput)
}
// A collection of arguments for invoking getWorkspace.
type LookupWorkspaceOutputArgs struct {
// The name of the Machine Learning Workspace exists.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Machine Learning Workspace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupWorkspaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceArgs)(nil)).Elem()
}
// A collection of values returned by getWorkspace.
type LookupWorkspaceResultOutput struct{ *pulumi.OutputState }
func (LookupWorkspaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceResult)(nil)).Elem()
}
func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput {
return o
}
func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupWorkspaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupWorkspaceResultOutput) Identities() GetWorkspaceIdentityArrayOutput {
return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceIdentity { return v.Identities }).(GetWorkspaceIdentityArrayOutput)
}
// The location where the Machine Learning Workspace exists.
func (o LookupWorkspaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Machine Learning Workspace.
func (o LookupWorkspaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupWorkspaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/init.go | sdk/go/azure/machinelearning/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:machinelearning/computeCluster:ComputeCluster":
r = &ComputeCluster{}
case "azure:machinelearning/computeInstance:ComputeInstance":
r = &ComputeInstance{}
case "azure:machinelearning/datastoreBlobstorage:DatastoreBlobstorage":
r = &DatastoreBlobstorage{}
case "azure:machinelearning/datastoreDatalakeGen2:DatastoreDatalakeGen2":
r = &DatastoreDatalakeGen2{}
case "azure:machinelearning/datastoreFileshare:DatastoreFileshare":
r = &DatastoreFileshare{}
case "azure:machinelearning/inferenceCluster:InferenceCluster":
r = &InferenceCluster{}
case "azure:machinelearning/synapseSpark:SynapseSpark":
r = &SynapseSpark{}
case "azure:machinelearning/workspace:Workspace":
r = &Workspace{}
case "azure:machinelearning/workspaceNetworkOutboundRuleFqdn:WorkspaceNetworkOutboundRuleFqdn":
r = &WorkspaceNetworkOutboundRuleFqdn{}
case "azure:machinelearning/workspaceNetworkOutboundRulePrivateEndpoint:WorkspaceNetworkOutboundRulePrivateEndpoint":
r = &WorkspaceNetworkOutboundRulePrivateEndpoint{}
case "azure:machinelearning/workspaceNetworkOutboundRuleServiceTag:WorkspaceNetworkOutboundRuleServiceTag":
r = &WorkspaceNetworkOutboundRuleServiceTag{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"machinelearning/computeCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/computeInstance",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/datastoreBlobstorage",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/datastoreDatalakeGen2",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/datastoreFileshare",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/inferenceCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/synapseSpark",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/workspace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/workspaceNetworkOutboundRuleFqdn",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/workspaceNetworkOutboundRulePrivateEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"machinelearning/workspaceNetworkOutboundRuleServiceTag",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/computeInstance.go | sdk/go/azure/machinelearning/computeInstance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning Compute Instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("west europe"),
// Tags: pulumi.StringMap{
// "stage": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-kv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-mlw"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.1.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// })
// if err != nil {
// return err
// }
// cfg := config.New(ctx, "")
// sshKey := "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+L2NxRIfQ781rxV6Iq5jSav6b2Q8z5KiseOlvKA/RF2wqU0UPYqQviQhLmW6THTpmrv/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+5N2Ta6UYH3lsDf9R9wTP2K/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+7HTcWfdu0qQqPWY5ujyMw/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt terraform@demo.tld"
// if param := cfg.Get("sshKey"); param != "" {
// sshKey = param
// }
// _, err = machinelearning.NewComputeInstance(ctx, "example", &machinelearning.ComputeInstanceArgs{
// Name: pulumi.String("example"),
// MachineLearningWorkspaceId: exampleWorkspace.ID(),
// VirtualMachineSize: pulumi.String("STANDARD_DS2_V2"),
// AuthorizationType: pulumi.String("personal"),
// Ssh: &machinelearning.ComputeInstanceSshArgs{
// PublicKey: pulumi.String(sshKey),
// },
// SubnetResourceId: exampleSubnet.ID(),
// Description: pulumi.String("foo"),
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Compute Instances can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/computeInstance:ComputeInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1
// ```
type ComputeInstance struct {
pulumi.CustomResourceState
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
AssignToUser ComputeInstanceAssignToUserPtrOutput `pulumi:"assignToUser"`
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
AuthorizationType pulumi.StringPtrOutput `pulumi:"authorizationType"`
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
Identity ComputeInstanceIdentityPtrOutput `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
MachineLearningWorkspaceId pulumi.StringOutput `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
NodePublicIpEnabled pulumi.BoolPtrOutput `pulumi:"nodePublicIpEnabled"`
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
Ssh ComputeInstanceSshPtrOutput `pulumi:"ssh"`
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
SubnetResourceId pulumi.StringPtrOutput `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
VirtualMachineSize pulumi.StringOutput `pulumi:"virtualMachineSize"`
}
// NewComputeInstance registers a new resource with the given unique name, arguments, and options.
func NewComputeInstance(ctx *pulumi.Context,
name string, args *ComputeInstanceArgs, opts ...pulumi.ResourceOption) (*ComputeInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MachineLearningWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'MachineLearningWorkspaceId'")
}
if args.VirtualMachineSize == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineSize'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ComputeInstance
err := ctx.RegisterResource("azure:machinelearning/computeInstance:ComputeInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetComputeInstance gets an existing ComputeInstance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetComputeInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ComputeInstanceState, opts ...pulumi.ResourceOption) (*ComputeInstance, error) {
var resource ComputeInstance
err := ctx.ReadResource("azure:machinelearning/computeInstance:ComputeInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ComputeInstance resources.
type computeInstanceState struct {
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
AssignToUser *ComputeInstanceAssignToUser `pulumi:"assignToUser"`
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
AuthorizationType *string `pulumi:"authorizationType"`
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
Identity *ComputeInstanceIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
MachineLearningWorkspaceId *string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Name *string `pulumi:"name"`
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
NodePublicIpEnabled *bool `pulumi:"nodePublicIpEnabled"`
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
Ssh *ComputeInstanceSsh `pulumi:"ssh"`
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
SubnetResourceId *string `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Tags map[string]string `pulumi:"tags"`
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
VirtualMachineSize *string `pulumi:"virtualMachineSize"`
}
type ComputeInstanceState struct {
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
AssignToUser ComputeInstanceAssignToUserPtrInput
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
AuthorizationType pulumi.StringPtrInput
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
Identity ComputeInstanceIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
MachineLearningWorkspaceId pulumi.StringPtrInput
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Name pulumi.StringPtrInput
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
NodePublicIpEnabled pulumi.BoolPtrInput
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
Ssh ComputeInstanceSshPtrInput
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
SubnetResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Tags pulumi.StringMapInput
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
VirtualMachineSize pulumi.StringPtrInput
}
func (ComputeInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*computeInstanceState)(nil)).Elem()
}
type computeInstanceArgs struct {
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
AssignToUser *ComputeInstanceAssignToUser `pulumi:"assignToUser"`
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
AuthorizationType *string `pulumi:"authorizationType"`
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
Identity *ComputeInstanceIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
MachineLearningWorkspaceId string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Name *string `pulumi:"name"`
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
NodePublicIpEnabled *bool `pulumi:"nodePublicIpEnabled"`
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
Ssh *ComputeInstanceSsh `pulumi:"ssh"`
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
SubnetResourceId *string `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Tags map[string]string `pulumi:"tags"`
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
VirtualMachineSize string `pulumi:"virtualMachineSize"`
}
// The set of arguments for constructing a ComputeInstance resource.
type ComputeInstanceArgs struct {
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
AssignToUser ComputeInstanceAssignToUserPtrInput
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
AuthorizationType pulumi.StringPtrInput
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
Identity ComputeInstanceIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
MachineLearningWorkspaceId pulumi.StringInput
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Name pulumi.StringPtrInput
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
NodePublicIpEnabled pulumi.BoolPtrInput
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
Ssh ComputeInstanceSshPtrInput
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
SubnetResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
Tags pulumi.StringMapInput
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
VirtualMachineSize pulumi.StringInput
}
func (ComputeInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*computeInstanceArgs)(nil)).Elem()
}
type ComputeInstanceInput interface {
pulumi.Input
ToComputeInstanceOutput() ComputeInstanceOutput
ToComputeInstanceOutputWithContext(ctx context.Context) ComputeInstanceOutput
}
func (*ComputeInstance) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeInstance)(nil)).Elem()
}
func (i *ComputeInstance) ToComputeInstanceOutput() ComputeInstanceOutput {
return i.ToComputeInstanceOutputWithContext(context.Background())
}
func (i *ComputeInstance) ToComputeInstanceOutputWithContext(ctx context.Context) ComputeInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceOutput)
}
// ComputeInstanceArrayInput is an input type that accepts ComputeInstanceArray and ComputeInstanceArrayOutput values.
// You can construct a concrete instance of `ComputeInstanceArrayInput` via:
//
// ComputeInstanceArray{ ComputeInstanceArgs{...} }
type ComputeInstanceArrayInput interface {
pulumi.Input
ToComputeInstanceArrayOutput() ComputeInstanceArrayOutput
ToComputeInstanceArrayOutputWithContext(context.Context) ComputeInstanceArrayOutput
}
type ComputeInstanceArray []ComputeInstanceInput
func (ComputeInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ComputeInstance)(nil)).Elem()
}
func (i ComputeInstanceArray) ToComputeInstanceArrayOutput() ComputeInstanceArrayOutput {
return i.ToComputeInstanceArrayOutputWithContext(context.Background())
}
func (i ComputeInstanceArray) ToComputeInstanceArrayOutputWithContext(ctx context.Context) ComputeInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceArrayOutput)
}
// ComputeInstanceMapInput is an input type that accepts ComputeInstanceMap and ComputeInstanceMapOutput values.
// You can construct a concrete instance of `ComputeInstanceMapInput` via:
//
// ComputeInstanceMap{ "key": ComputeInstanceArgs{...} }
type ComputeInstanceMapInput interface {
pulumi.Input
ToComputeInstanceMapOutput() ComputeInstanceMapOutput
ToComputeInstanceMapOutputWithContext(context.Context) ComputeInstanceMapOutput
}
type ComputeInstanceMap map[string]ComputeInstanceInput
func (ComputeInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ComputeInstance)(nil)).Elem()
}
func (i ComputeInstanceMap) ToComputeInstanceMapOutput() ComputeInstanceMapOutput {
return i.ToComputeInstanceMapOutputWithContext(context.Background())
}
func (i ComputeInstanceMap) ToComputeInstanceMapOutputWithContext(ctx context.Context) ComputeInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceMapOutput)
}
type ComputeInstanceOutput struct{ *pulumi.OutputState }
func (ComputeInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeInstance)(nil)).Elem()
}
func (o ComputeInstanceOutput) ToComputeInstanceOutput() ComputeInstanceOutput {
return o
}
func (o ComputeInstanceOutput) ToComputeInstanceOutputWithContext(ctx context.Context) ComputeInstanceOutput {
return o
}
// A `assignToUser` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) AssignToUser() ComputeInstanceAssignToUserPtrOutput {
return o.ApplyT(func(v *ComputeInstance) ComputeInstanceAssignToUserPtrOutput { return v.AssignToUser }).(ComputeInstanceAssignToUserPtrOutput)
}
// The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) AuthorizationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringPtrOutput { return v.AuthorizationType }).(pulumi.StringPtrOutput)
}
// The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// An `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) Identity() ComputeInstanceIdentityPtrOutput {
return o.ApplyT(func(v *ComputeInstance) ComputeInstanceIdentityPtrOutput { return v.Identity }).(ComputeInstanceIdentityPtrOutput)
}
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) MachineLearningWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringOutput { return v.MachineLearningWorkspaceId }).(pulumi.StringOutput)
}
// The name which should be used for this Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether the compute instance will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** The property `subnetResourceId` becomes required if `nodePublicIpEnabled` is set to `false`, and the instance's workspace is not using a managed network (i.e. the workspace's outbound isolation mode is `Disabled`).
func (o ComputeInstanceOutput) NodePublicIpEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.BoolPtrOutput { return v.NodePublicIpEnabled }).(pulumi.BoolPtrOutput)
}
// A `ssh` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) Ssh() ComputeInstanceSshPtrOutput {
return o.ApplyT(func(v *ComputeInstance) ComputeInstanceSshPtrOutput { return v.Ssh }).(ComputeInstanceSshPtrOutput)
}
// Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
//
// > **Note:** The property `subnetResourceId` can be set only if the instance's workspace is not using Azure-managed networking.
func (o ComputeInstanceOutput) SubnetResourceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringPtrOutput { return v.SubnetResourceId }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Virtual Machine Size. Changing this forces a new Machine Learning Compute Instance to be created.
func (o ComputeInstanceOutput) VirtualMachineSize() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeInstance) pulumi.StringOutput { return v.VirtualMachineSize }).(pulumi.StringOutput)
}
type ComputeInstanceArrayOutput struct{ *pulumi.OutputState }
func (ComputeInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ComputeInstance)(nil)).Elem()
}
func (o ComputeInstanceArrayOutput) ToComputeInstanceArrayOutput() ComputeInstanceArrayOutput {
return o
}
func (o ComputeInstanceArrayOutput) ToComputeInstanceArrayOutputWithContext(ctx context.Context) ComputeInstanceArrayOutput {
return o
}
func (o ComputeInstanceArrayOutput) Index(i pulumi.IntInput) ComputeInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ComputeInstance {
return vs[0].([]*ComputeInstance)[vs[1].(int)]
}).(ComputeInstanceOutput)
}
type ComputeInstanceMapOutput struct{ *pulumi.OutputState }
func (ComputeInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ComputeInstance)(nil)).Elem()
}
func (o ComputeInstanceMapOutput) ToComputeInstanceMapOutput() ComputeInstanceMapOutput {
return o
}
func (o ComputeInstanceMapOutput) ToComputeInstanceMapOutputWithContext(ctx context.Context) ComputeInstanceMapOutput {
return o
}
func (o ComputeInstanceMapOutput) MapIndex(k pulumi.StringInput) ComputeInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ComputeInstance {
return vs[0].(map[string]*ComputeInstance)[vs[1].(string)]
}).(ComputeInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ComputeInstanceInput)(nil)).Elem(), &ComputeInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*ComputeInstanceArrayInput)(nil)).Elem(), ComputeInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ComputeInstanceMapInput)(nil)).Elem(), ComputeInstanceMap{})
pulumi.RegisterOutputType(ComputeInstanceOutput{})
pulumi.RegisterOutputType(ComputeInstanceArrayOutput{})
pulumi.RegisterOutputType(ComputeInstanceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/workspaceNetworkOutboundRuleFqdn.go | sdk/go/azure/machinelearning/workspaceNetworkOutboundRuleFqdn.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Machine Learning Workspace FQDN Network Outbound Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// ManagedNetwork: &machinelearning.WorkspaceManagedNetworkArgs{
// IsolationMode: pulumi.String("AllowOnlyApprovedOutbound"),
// },
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewWorkspaceNetworkOutboundRuleFqdn(ctx, "example", &machinelearning.WorkspaceNetworkOutboundRuleFqdnArgs{
// Name: pulumi.String("example-outboundrule"),
// WorkspaceId: exampleWorkspace.ID(),
// DestinationFqdn: pulumi.String("example.com"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Workspace FQDN Network Outbound Rule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/workspaceNetworkOutboundRuleFqdn:WorkspaceNetworkOutboundRuleFqdn example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/outboundRules/rule1
// ```
type WorkspaceNetworkOutboundRuleFqdn struct {
pulumi.CustomResourceState
// Specifies the fully qualified domain name to allow for outbound traffic.
DestinationFqdn pulumi.StringOutput `pulumi:"destinationFqdn"`
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceNetworkOutboundRuleFqdn registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceNetworkOutboundRuleFqdn(ctx *pulumi.Context,
name string, args *WorkspaceNetworkOutboundRuleFqdnArgs, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRuleFqdn, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DestinationFqdn == nil {
return nil, errors.New("invalid value for required argument 'DestinationFqdn'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceNetworkOutboundRuleFqdn
err := ctx.RegisterResource("azure:machinelearning/workspaceNetworkOutboundRuleFqdn:WorkspaceNetworkOutboundRuleFqdn", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceNetworkOutboundRuleFqdn gets an existing WorkspaceNetworkOutboundRuleFqdn resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceNetworkOutboundRuleFqdn(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceNetworkOutboundRuleFqdnState, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRuleFqdn, error) {
var resource WorkspaceNetworkOutboundRuleFqdn
err := ctx.ReadResource("azure:machinelearning/workspaceNetworkOutboundRuleFqdn:WorkspaceNetworkOutboundRuleFqdn", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceNetworkOutboundRuleFqdn resources.
type workspaceNetworkOutboundRuleFqdnState struct {
// Specifies the fully qualified domain name to allow for outbound traffic.
DestinationFqdn *string `pulumi:"destinationFqdn"`
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceNetworkOutboundRuleFqdnState struct {
// Specifies the fully qualified domain name to allow for outbound traffic.
DestinationFqdn pulumi.StringPtrInput
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceNetworkOutboundRuleFqdnState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRuleFqdnState)(nil)).Elem()
}
type workspaceNetworkOutboundRuleFqdnArgs struct {
// Specifies the fully qualified domain name to allow for outbound traffic.
DestinationFqdn string `pulumi:"destinationFqdn"`
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceNetworkOutboundRuleFqdn resource.
type WorkspaceNetworkOutboundRuleFqdnArgs struct {
// Specifies the fully qualified domain name to allow for outbound traffic.
DestinationFqdn pulumi.StringInput
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringInput
}
func (WorkspaceNetworkOutboundRuleFqdnArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRuleFqdnArgs)(nil)).Elem()
}
type WorkspaceNetworkOutboundRuleFqdnInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleFqdnOutput() WorkspaceNetworkOutboundRuleFqdnOutput
ToWorkspaceNetworkOutboundRuleFqdnOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnOutput
}
func (*WorkspaceNetworkOutboundRuleFqdn) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (i *WorkspaceNetworkOutboundRuleFqdn) ToWorkspaceNetworkOutboundRuleFqdnOutput() WorkspaceNetworkOutboundRuleFqdnOutput {
return i.ToWorkspaceNetworkOutboundRuleFqdnOutputWithContext(context.Background())
}
func (i *WorkspaceNetworkOutboundRuleFqdn) ToWorkspaceNetworkOutboundRuleFqdnOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleFqdnOutput)
}
// WorkspaceNetworkOutboundRuleFqdnArrayInput is an input type that accepts WorkspaceNetworkOutboundRuleFqdnArray and WorkspaceNetworkOutboundRuleFqdnArrayOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRuleFqdnArrayInput` via:
//
// WorkspaceNetworkOutboundRuleFqdnArray{ WorkspaceNetworkOutboundRuleFqdnArgs{...} }
type WorkspaceNetworkOutboundRuleFqdnArrayInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleFqdnArrayOutput() WorkspaceNetworkOutboundRuleFqdnArrayOutput
ToWorkspaceNetworkOutboundRuleFqdnArrayOutputWithContext(context.Context) WorkspaceNetworkOutboundRuleFqdnArrayOutput
}
type WorkspaceNetworkOutboundRuleFqdnArray []WorkspaceNetworkOutboundRuleFqdnInput
func (WorkspaceNetworkOutboundRuleFqdnArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRuleFqdnArray) ToWorkspaceNetworkOutboundRuleFqdnArrayOutput() WorkspaceNetworkOutboundRuleFqdnArrayOutput {
return i.ToWorkspaceNetworkOutboundRuleFqdnArrayOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRuleFqdnArray) ToWorkspaceNetworkOutboundRuleFqdnArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleFqdnArrayOutput)
}
// WorkspaceNetworkOutboundRuleFqdnMapInput is an input type that accepts WorkspaceNetworkOutboundRuleFqdnMap and WorkspaceNetworkOutboundRuleFqdnMapOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRuleFqdnMapInput` via:
//
// WorkspaceNetworkOutboundRuleFqdnMap{ "key": WorkspaceNetworkOutboundRuleFqdnArgs{...} }
type WorkspaceNetworkOutboundRuleFqdnMapInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleFqdnMapOutput() WorkspaceNetworkOutboundRuleFqdnMapOutput
ToWorkspaceNetworkOutboundRuleFqdnMapOutputWithContext(context.Context) WorkspaceNetworkOutboundRuleFqdnMapOutput
}
type WorkspaceNetworkOutboundRuleFqdnMap map[string]WorkspaceNetworkOutboundRuleFqdnInput
func (WorkspaceNetworkOutboundRuleFqdnMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRuleFqdnMap) ToWorkspaceNetworkOutboundRuleFqdnMapOutput() WorkspaceNetworkOutboundRuleFqdnMapOutput {
return i.ToWorkspaceNetworkOutboundRuleFqdnMapOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRuleFqdnMap) ToWorkspaceNetworkOutboundRuleFqdnMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleFqdnMapOutput)
}
type WorkspaceNetworkOutboundRuleFqdnOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleFqdnOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleFqdnOutput) ToWorkspaceNetworkOutboundRuleFqdnOutput() WorkspaceNetworkOutboundRuleFqdnOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleFqdnOutput) ToWorkspaceNetworkOutboundRuleFqdnOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnOutput {
return o
}
// Specifies the fully qualified domain name to allow for outbound traffic.
func (o WorkspaceNetworkOutboundRuleFqdnOutput) DestinationFqdn() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleFqdn) pulumi.StringOutput { return v.DestinationFqdn }).(pulumi.StringOutput)
}
// Specifies the name of the Machine Learning Workspace FQDN Network Outbound Rule. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRuleFqdnOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleFqdn) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRuleFqdnOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleFqdn) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceNetworkOutboundRuleFqdnArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleFqdnArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleFqdnArrayOutput) ToWorkspaceNetworkOutboundRuleFqdnArrayOutput() WorkspaceNetworkOutboundRuleFqdnArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleFqdnArrayOutput) ToWorkspaceNetworkOutboundRuleFqdnArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleFqdnArrayOutput) Index(i pulumi.IntInput) WorkspaceNetworkOutboundRuleFqdnOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRuleFqdn {
return vs[0].([]*WorkspaceNetworkOutboundRuleFqdn)[vs[1].(int)]
}).(WorkspaceNetworkOutboundRuleFqdnOutput)
}
type WorkspaceNetworkOutboundRuleFqdnMapOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleFqdnMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRuleFqdn)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleFqdnMapOutput) ToWorkspaceNetworkOutboundRuleFqdnMapOutput() WorkspaceNetworkOutboundRuleFqdnMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleFqdnMapOutput) ToWorkspaceNetworkOutboundRuleFqdnMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleFqdnMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleFqdnMapOutput) MapIndex(k pulumi.StringInput) WorkspaceNetworkOutboundRuleFqdnOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRuleFqdn {
return vs[0].(map[string]*WorkspaceNetworkOutboundRuleFqdn)[vs[1].(string)]
}).(WorkspaceNetworkOutboundRuleFqdnOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleFqdnInput)(nil)).Elem(), &WorkspaceNetworkOutboundRuleFqdn{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleFqdnArrayInput)(nil)).Elem(), WorkspaceNetworkOutboundRuleFqdnArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleFqdnMapInput)(nil)).Elem(), WorkspaceNetworkOutboundRuleFqdnMap{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleFqdnOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleFqdnArrayOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleFqdnMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/pulumiTypes.go | sdk/go/azure/machinelearning/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type ComputeClusterIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Cluster.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Machine Learning Compute Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type string `pulumi:"type"`
}
// ComputeClusterIdentityInput is an input type that accepts ComputeClusterIdentityArgs and ComputeClusterIdentityOutput values.
// You can construct a concrete instance of `ComputeClusterIdentityInput` via:
//
// ComputeClusterIdentityArgs{...}
type ComputeClusterIdentityInput interface {
pulumi.Input
ToComputeClusterIdentityOutput() ComputeClusterIdentityOutput
ToComputeClusterIdentityOutputWithContext(context.Context) ComputeClusterIdentityOutput
}
type ComputeClusterIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Cluster.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Machine Learning Compute Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type pulumi.StringInput `pulumi:"type"`
}
func (ComputeClusterIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterIdentity)(nil)).Elem()
}
func (i ComputeClusterIdentityArgs) ToComputeClusterIdentityOutput() ComputeClusterIdentityOutput {
return i.ToComputeClusterIdentityOutputWithContext(context.Background())
}
func (i ComputeClusterIdentityArgs) ToComputeClusterIdentityOutputWithContext(ctx context.Context) ComputeClusterIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterIdentityOutput)
}
func (i ComputeClusterIdentityArgs) ToComputeClusterIdentityPtrOutput() ComputeClusterIdentityPtrOutput {
return i.ToComputeClusterIdentityPtrOutputWithContext(context.Background())
}
func (i ComputeClusterIdentityArgs) ToComputeClusterIdentityPtrOutputWithContext(ctx context.Context) ComputeClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterIdentityOutput).ToComputeClusterIdentityPtrOutputWithContext(ctx)
}
// ComputeClusterIdentityPtrInput is an input type that accepts ComputeClusterIdentityArgs, ComputeClusterIdentityPtr and ComputeClusterIdentityPtrOutput values.
// You can construct a concrete instance of `ComputeClusterIdentityPtrInput` via:
//
// ComputeClusterIdentityArgs{...}
//
// or:
//
// nil
type ComputeClusterIdentityPtrInput interface {
pulumi.Input
ToComputeClusterIdentityPtrOutput() ComputeClusterIdentityPtrOutput
ToComputeClusterIdentityPtrOutputWithContext(context.Context) ComputeClusterIdentityPtrOutput
}
type computeClusterIdentityPtrType ComputeClusterIdentityArgs
func ComputeClusterIdentityPtr(v *ComputeClusterIdentityArgs) ComputeClusterIdentityPtrInput {
return (*computeClusterIdentityPtrType)(v)
}
func (*computeClusterIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterIdentity)(nil)).Elem()
}
func (i *computeClusterIdentityPtrType) ToComputeClusterIdentityPtrOutput() ComputeClusterIdentityPtrOutput {
return i.ToComputeClusterIdentityPtrOutputWithContext(context.Background())
}
func (i *computeClusterIdentityPtrType) ToComputeClusterIdentityPtrOutputWithContext(ctx context.Context) ComputeClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterIdentityPtrOutput)
}
type ComputeClusterIdentityOutput struct{ *pulumi.OutputState }
func (ComputeClusterIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterIdentity)(nil)).Elem()
}
func (o ComputeClusterIdentityOutput) ToComputeClusterIdentityOutput() ComputeClusterIdentityOutput {
return o
}
func (o ComputeClusterIdentityOutput) ToComputeClusterIdentityOutputWithContext(ctx context.Context) ComputeClusterIdentityOutput {
return o
}
func (o ComputeClusterIdentityOutput) ToComputeClusterIdentityPtrOutput() ComputeClusterIdentityPtrOutput {
return o.ToComputeClusterIdentityPtrOutputWithContext(context.Background())
}
func (o ComputeClusterIdentityOutput) ToComputeClusterIdentityPtrOutputWithContext(ctx context.Context) ComputeClusterIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ComputeClusterIdentity) *ComputeClusterIdentity {
return &v
}).(ComputeClusterIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Cluster.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o ComputeClusterIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v ComputeClusterIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
func (o ComputeClusterIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeClusterIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
func (o ComputeClusterIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeClusterIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Machine Learning Compute Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o ComputeClusterIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ComputeClusterIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ComputeClusterIdentityPtrOutput struct{ *pulumi.OutputState }
func (ComputeClusterIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterIdentity)(nil)).Elem()
}
func (o ComputeClusterIdentityPtrOutput) ToComputeClusterIdentityPtrOutput() ComputeClusterIdentityPtrOutput {
return o
}
func (o ComputeClusterIdentityPtrOutput) ToComputeClusterIdentityPtrOutputWithContext(ctx context.Context) ComputeClusterIdentityPtrOutput {
return o
}
func (o ComputeClusterIdentityPtrOutput) Elem() ComputeClusterIdentityOutput {
return o.ApplyT(func(v *ComputeClusterIdentity) ComputeClusterIdentity {
if v != nil {
return *v
}
var ret ComputeClusterIdentity
return ret
}).(ComputeClusterIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Cluster.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o ComputeClusterIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ComputeClusterIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
func (o ComputeClusterIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Cluster.
func (o ComputeClusterIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Machine Learning Compute Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o ComputeClusterIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type ComputeClusterScaleSettings struct {
// Maximum node count.
MaxNodeCount int `pulumi:"maxNodeCount"`
// Minimal node count.
MinNodeCount int `pulumi:"minNodeCount"`
// Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration.
ScaleDownNodesAfterIdleDuration string `pulumi:"scaleDownNodesAfterIdleDuration"`
}
// ComputeClusterScaleSettingsInput is an input type that accepts ComputeClusterScaleSettingsArgs and ComputeClusterScaleSettingsOutput values.
// You can construct a concrete instance of `ComputeClusterScaleSettingsInput` via:
//
// ComputeClusterScaleSettingsArgs{...}
type ComputeClusterScaleSettingsInput interface {
pulumi.Input
ToComputeClusterScaleSettingsOutput() ComputeClusterScaleSettingsOutput
ToComputeClusterScaleSettingsOutputWithContext(context.Context) ComputeClusterScaleSettingsOutput
}
type ComputeClusterScaleSettingsArgs struct {
// Maximum node count.
MaxNodeCount pulumi.IntInput `pulumi:"maxNodeCount"`
// Minimal node count.
MinNodeCount pulumi.IntInput `pulumi:"minNodeCount"`
// Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration.
ScaleDownNodesAfterIdleDuration pulumi.StringInput `pulumi:"scaleDownNodesAfterIdleDuration"`
}
func (ComputeClusterScaleSettingsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterScaleSettings)(nil)).Elem()
}
func (i ComputeClusterScaleSettingsArgs) ToComputeClusterScaleSettingsOutput() ComputeClusterScaleSettingsOutput {
return i.ToComputeClusterScaleSettingsOutputWithContext(context.Background())
}
func (i ComputeClusterScaleSettingsArgs) ToComputeClusterScaleSettingsOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterScaleSettingsOutput)
}
func (i ComputeClusterScaleSettingsArgs) ToComputeClusterScaleSettingsPtrOutput() ComputeClusterScaleSettingsPtrOutput {
return i.ToComputeClusterScaleSettingsPtrOutputWithContext(context.Background())
}
func (i ComputeClusterScaleSettingsArgs) ToComputeClusterScaleSettingsPtrOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterScaleSettingsOutput).ToComputeClusterScaleSettingsPtrOutputWithContext(ctx)
}
// ComputeClusterScaleSettingsPtrInput is an input type that accepts ComputeClusterScaleSettingsArgs, ComputeClusterScaleSettingsPtr and ComputeClusterScaleSettingsPtrOutput values.
// You can construct a concrete instance of `ComputeClusterScaleSettingsPtrInput` via:
//
// ComputeClusterScaleSettingsArgs{...}
//
// or:
//
// nil
type ComputeClusterScaleSettingsPtrInput interface {
pulumi.Input
ToComputeClusterScaleSettingsPtrOutput() ComputeClusterScaleSettingsPtrOutput
ToComputeClusterScaleSettingsPtrOutputWithContext(context.Context) ComputeClusterScaleSettingsPtrOutput
}
type computeClusterScaleSettingsPtrType ComputeClusterScaleSettingsArgs
func ComputeClusterScaleSettingsPtr(v *ComputeClusterScaleSettingsArgs) ComputeClusterScaleSettingsPtrInput {
return (*computeClusterScaleSettingsPtrType)(v)
}
func (*computeClusterScaleSettingsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterScaleSettings)(nil)).Elem()
}
func (i *computeClusterScaleSettingsPtrType) ToComputeClusterScaleSettingsPtrOutput() ComputeClusterScaleSettingsPtrOutput {
return i.ToComputeClusterScaleSettingsPtrOutputWithContext(context.Background())
}
func (i *computeClusterScaleSettingsPtrType) ToComputeClusterScaleSettingsPtrOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterScaleSettingsPtrOutput)
}
type ComputeClusterScaleSettingsOutput struct{ *pulumi.OutputState }
func (ComputeClusterScaleSettingsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterScaleSettings)(nil)).Elem()
}
func (o ComputeClusterScaleSettingsOutput) ToComputeClusterScaleSettingsOutput() ComputeClusterScaleSettingsOutput {
return o
}
func (o ComputeClusterScaleSettingsOutput) ToComputeClusterScaleSettingsOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsOutput {
return o
}
func (o ComputeClusterScaleSettingsOutput) ToComputeClusterScaleSettingsPtrOutput() ComputeClusterScaleSettingsPtrOutput {
return o.ToComputeClusterScaleSettingsPtrOutputWithContext(context.Background())
}
func (o ComputeClusterScaleSettingsOutput) ToComputeClusterScaleSettingsPtrOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ComputeClusterScaleSettings) *ComputeClusterScaleSettings {
return &v
}).(ComputeClusterScaleSettingsPtrOutput)
}
// Maximum node count.
func (o ComputeClusterScaleSettingsOutput) MaxNodeCount() pulumi.IntOutput {
return o.ApplyT(func(v ComputeClusterScaleSettings) int { return v.MaxNodeCount }).(pulumi.IntOutput)
}
// Minimal node count.
func (o ComputeClusterScaleSettingsOutput) MinNodeCount() pulumi.IntOutput {
return o.ApplyT(func(v ComputeClusterScaleSettings) int { return v.MinNodeCount }).(pulumi.IntOutput)
}
// Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration.
func (o ComputeClusterScaleSettingsOutput) ScaleDownNodesAfterIdleDuration() pulumi.StringOutput {
return o.ApplyT(func(v ComputeClusterScaleSettings) string { return v.ScaleDownNodesAfterIdleDuration }).(pulumi.StringOutput)
}
type ComputeClusterScaleSettingsPtrOutput struct{ *pulumi.OutputState }
func (ComputeClusterScaleSettingsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterScaleSettings)(nil)).Elem()
}
func (o ComputeClusterScaleSettingsPtrOutput) ToComputeClusterScaleSettingsPtrOutput() ComputeClusterScaleSettingsPtrOutput {
return o
}
func (o ComputeClusterScaleSettingsPtrOutput) ToComputeClusterScaleSettingsPtrOutputWithContext(ctx context.Context) ComputeClusterScaleSettingsPtrOutput {
return o
}
func (o ComputeClusterScaleSettingsPtrOutput) Elem() ComputeClusterScaleSettingsOutput {
return o.ApplyT(func(v *ComputeClusterScaleSettings) ComputeClusterScaleSettings {
if v != nil {
return *v
}
var ret ComputeClusterScaleSettings
return ret
}).(ComputeClusterScaleSettingsOutput)
}
// Maximum node count.
func (o ComputeClusterScaleSettingsPtrOutput) MaxNodeCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ComputeClusterScaleSettings) *int {
if v == nil {
return nil
}
return &v.MaxNodeCount
}).(pulumi.IntPtrOutput)
}
// Minimal node count.
func (o ComputeClusterScaleSettingsPtrOutput) MinNodeCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ComputeClusterScaleSettings) *int {
if v == nil {
return nil
}
return &v.MinNodeCount
}).(pulumi.IntPtrOutput)
}
// Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration.
func (o ComputeClusterScaleSettingsPtrOutput) ScaleDownNodesAfterIdleDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterScaleSettings) *string {
if v == nil {
return nil
}
return &v.ScaleDownNodesAfterIdleDuration
}).(pulumi.StringPtrOutput)
}
type ComputeClusterSsh struct {
// Password of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
AdminPassword *string `pulumi:"adminPassword"`
// Name of the administrator user account which can be used to SSH to nodes. Changing this forces a new Machine Learning Compute Cluster to be created.
AdminUsername string `pulumi:"adminUsername"`
// SSH public key of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** At least one of `adminPassword` and `keyValue` shoud be specified.
KeyValue *string `pulumi:"keyValue"`
}
// ComputeClusterSshInput is an input type that accepts ComputeClusterSshArgs and ComputeClusterSshOutput values.
// You can construct a concrete instance of `ComputeClusterSshInput` via:
//
// ComputeClusterSshArgs{...}
type ComputeClusterSshInput interface {
pulumi.Input
ToComputeClusterSshOutput() ComputeClusterSshOutput
ToComputeClusterSshOutputWithContext(context.Context) ComputeClusterSshOutput
}
type ComputeClusterSshArgs struct {
// Password of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
AdminPassword pulumi.StringPtrInput `pulumi:"adminPassword"`
// Name of the administrator user account which can be used to SSH to nodes. Changing this forces a new Machine Learning Compute Cluster to be created.
AdminUsername pulumi.StringInput `pulumi:"adminUsername"`
// SSH public key of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** At least one of `adminPassword` and `keyValue` shoud be specified.
KeyValue pulumi.StringPtrInput `pulumi:"keyValue"`
}
func (ComputeClusterSshArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterSsh)(nil)).Elem()
}
func (i ComputeClusterSshArgs) ToComputeClusterSshOutput() ComputeClusterSshOutput {
return i.ToComputeClusterSshOutputWithContext(context.Background())
}
func (i ComputeClusterSshArgs) ToComputeClusterSshOutputWithContext(ctx context.Context) ComputeClusterSshOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterSshOutput)
}
func (i ComputeClusterSshArgs) ToComputeClusterSshPtrOutput() ComputeClusterSshPtrOutput {
return i.ToComputeClusterSshPtrOutputWithContext(context.Background())
}
func (i ComputeClusterSshArgs) ToComputeClusterSshPtrOutputWithContext(ctx context.Context) ComputeClusterSshPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterSshOutput).ToComputeClusterSshPtrOutputWithContext(ctx)
}
// ComputeClusterSshPtrInput is an input type that accepts ComputeClusterSshArgs, ComputeClusterSshPtr and ComputeClusterSshPtrOutput values.
// You can construct a concrete instance of `ComputeClusterSshPtrInput` via:
//
// ComputeClusterSshArgs{...}
//
// or:
//
// nil
type ComputeClusterSshPtrInput interface {
pulumi.Input
ToComputeClusterSshPtrOutput() ComputeClusterSshPtrOutput
ToComputeClusterSshPtrOutputWithContext(context.Context) ComputeClusterSshPtrOutput
}
type computeClusterSshPtrType ComputeClusterSshArgs
func ComputeClusterSshPtr(v *ComputeClusterSshArgs) ComputeClusterSshPtrInput {
return (*computeClusterSshPtrType)(v)
}
func (*computeClusterSshPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterSsh)(nil)).Elem()
}
func (i *computeClusterSshPtrType) ToComputeClusterSshPtrOutput() ComputeClusterSshPtrOutput {
return i.ToComputeClusterSshPtrOutputWithContext(context.Background())
}
func (i *computeClusterSshPtrType) ToComputeClusterSshPtrOutputWithContext(ctx context.Context) ComputeClusterSshPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterSshPtrOutput)
}
type ComputeClusterSshOutput struct{ *pulumi.OutputState }
func (ComputeClusterSshOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeClusterSsh)(nil)).Elem()
}
func (o ComputeClusterSshOutput) ToComputeClusterSshOutput() ComputeClusterSshOutput {
return o
}
func (o ComputeClusterSshOutput) ToComputeClusterSshOutputWithContext(ctx context.Context) ComputeClusterSshOutput {
return o
}
func (o ComputeClusterSshOutput) ToComputeClusterSshPtrOutput() ComputeClusterSshPtrOutput {
return o.ToComputeClusterSshPtrOutputWithContext(context.Background())
}
func (o ComputeClusterSshOutput) ToComputeClusterSshPtrOutputWithContext(ctx context.Context) ComputeClusterSshPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ComputeClusterSsh) *ComputeClusterSsh {
return &v
}).(ComputeClusterSshPtrOutput)
}
// Password of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterSshOutput) AdminPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeClusterSsh) *string { return v.AdminPassword }).(pulumi.StringPtrOutput)
}
// Name of the administrator user account which can be used to SSH to nodes. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterSshOutput) AdminUsername() pulumi.StringOutput {
return o.ApplyT(func(v ComputeClusterSsh) string { return v.AdminUsername }).(pulumi.StringOutput)
}
// SSH public key of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** At least one of `adminPassword` and `keyValue` shoud be specified.
func (o ComputeClusterSshOutput) KeyValue() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeClusterSsh) *string { return v.KeyValue }).(pulumi.StringPtrOutput)
}
type ComputeClusterSshPtrOutput struct{ *pulumi.OutputState }
func (ComputeClusterSshPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeClusterSsh)(nil)).Elem()
}
func (o ComputeClusterSshPtrOutput) ToComputeClusterSshPtrOutput() ComputeClusterSshPtrOutput {
return o
}
func (o ComputeClusterSshPtrOutput) ToComputeClusterSshPtrOutputWithContext(ctx context.Context) ComputeClusterSshPtrOutput {
return o
}
func (o ComputeClusterSshPtrOutput) Elem() ComputeClusterSshOutput {
return o.ApplyT(func(v *ComputeClusterSsh) ComputeClusterSsh {
if v != nil {
return *v
}
var ret ComputeClusterSsh
return ret
}).(ComputeClusterSshOutput)
}
// Password of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterSshPtrOutput) AdminPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterSsh) *string {
if v == nil {
return nil
}
return v.AdminPassword
}).(pulumi.StringPtrOutput)
}
// Name of the administrator user account which can be used to SSH to nodes. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterSshPtrOutput) AdminUsername() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterSsh) *string {
if v == nil {
return nil
}
return &v.AdminUsername
}).(pulumi.StringPtrOutput)
}
// SSH public key of the administrator user account. Changing this forces a new Machine Learning Compute Cluster to be created.
//
// > **Note:** At least one of `adminPassword` and `keyValue` shoud be specified.
func (o ComputeClusterSshPtrOutput) KeyValue() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeClusterSsh) *string {
if v == nil {
return nil
}
return v.KeyValue
}).(pulumi.StringPtrOutput)
}
type ComputeInstanceAssignToUser struct {
// User’s AAD Object Id.
ObjectId *string `pulumi:"objectId"`
// User’s AAD Tenant Id.
TenantId *string `pulumi:"tenantId"`
}
// ComputeInstanceAssignToUserInput is an input type that accepts ComputeInstanceAssignToUserArgs and ComputeInstanceAssignToUserOutput values.
// You can construct a concrete instance of `ComputeInstanceAssignToUserInput` via:
//
// ComputeInstanceAssignToUserArgs{...}
type ComputeInstanceAssignToUserInput interface {
pulumi.Input
ToComputeInstanceAssignToUserOutput() ComputeInstanceAssignToUserOutput
ToComputeInstanceAssignToUserOutputWithContext(context.Context) ComputeInstanceAssignToUserOutput
}
type ComputeInstanceAssignToUserArgs struct {
// User’s AAD Object Id.
ObjectId pulumi.StringPtrInput `pulumi:"objectId"`
// User’s AAD Tenant Id.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
}
func (ComputeInstanceAssignToUserArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeInstanceAssignToUser)(nil)).Elem()
}
func (i ComputeInstanceAssignToUserArgs) ToComputeInstanceAssignToUserOutput() ComputeInstanceAssignToUserOutput {
return i.ToComputeInstanceAssignToUserOutputWithContext(context.Background())
}
func (i ComputeInstanceAssignToUserArgs) ToComputeInstanceAssignToUserOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceAssignToUserOutput)
}
func (i ComputeInstanceAssignToUserArgs) ToComputeInstanceAssignToUserPtrOutput() ComputeInstanceAssignToUserPtrOutput {
return i.ToComputeInstanceAssignToUserPtrOutputWithContext(context.Background())
}
func (i ComputeInstanceAssignToUserArgs) ToComputeInstanceAssignToUserPtrOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceAssignToUserOutput).ToComputeInstanceAssignToUserPtrOutputWithContext(ctx)
}
// ComputeInstanceAssignToUserPtrInput is an input type that accepts ComputeInstanceAssignToUserArgs, ComputeInstanceAssignToUserPtr and ComputeInstanceAssignToUserPtrOutput values.
// You can construct a concrete instance of `ComputeInstanceAssignToUserPtrInput` via:
//
// ComputeInstanceAssignToUserArgs{...}
//
// or:
//
// nil
type ComputeInstanceAssignToUserPtrInput interface {
pulumi.Input
ToComputeInstanceAssignToUserPtrOutput() ComputeInstanceAssignToUserPtrOutput
ToComputeInstanceAssignToUserPtrOutputWithContext(context.Context) ComputeInstanceAssignToUserPtrOutput
}
type computeInstanceAssignToUserPtrType ComputeInstanceAssignToUserArgs
func ComputeInstanceAssignToUserPtr(v *ComputeInstanceAssignToUserArgs) ComputeInstanceAssignToUserPtrInput {
return (*computeInstanceAssignToUserPtrType)(v)
}
func (*computeInstanceAssignToUserPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeInstanceAssignToUser)(nil)).Elem()
}
func (i *computeInstanceAssignToUserPtrType) ToComputeInstanceAssignToUserPtrOutput() ComputeInstanceAssignToUserPtrOutput {
return i.ToComputeInstanceAssignToUserPtrOutputWithContext(context.Background())
}
func (i *computeInstanceAssignToUserPtrType) ToComputeInstanceAssignToUserPtrOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeInstanceAssignToUserPtrOutput)
}
type ComputeInstanceAssignToUserOutput struct{ *pulumi.OutputState }
func (ComputeInstanceAssignToUserOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ComputeInstanceAssignToUser)(nil)).Elem()
}
func (o ComputeInstanceAssignToUserOutput) ToComputeInstanceAssignToUserOutput() ComputeInstanceAssignToUserOutput {
return o
}
func (o ComputeInstanceAssignToUserOutput) ToComputeInstanceAssignToUserOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserOutput {
return o
}
func (o ComputeInstanceAssignToUserOutput) ToComputeInstanceAssignToUserPtrOutput() ComputeInstanceAssignToUserPtrOutput {
return o.ToComputeInstanceAssignToUserPtrOutputWithContext(context.Background())
}
func (o ComputeInstanceAssignToUserOutput) ToComputeInstanceAssignToUserPtrOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ComputeInstanceAssignToUser) *ComputeInstanceAssignToUser {
return &v
}).(ComputeInstanceAssignToUserPtrOutput)
}
// User’s AAD Object Id.
func (o ComputeInstanceAssignToUserOutput) ObjectId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeInstanceAssignToUser) *string { return v.ObjectId }).(pulumi.StringPtrOutput)
}
// User’s AAD Tenant Id.
func (o ComputeInstanceAssignToUserOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ComputeInstanceAssignToUser) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
type ComputeInstanceAssignToUserPtrOutput struct{ *pulumi.OutputState }
func (ComputeInstanceAssignToUserPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeInstanceAssignToUser)(nil)).Elem()
}
func (o ComputeInstanceAssignToUserPtrOutput) ToComputeInstanceAssignToUserPtrOutput() ComputeInstanceAssignToUserPtrOutput {
return o
}
func (o ComputeInstanceAssignToUserPtrOutput) ToComputeInstanceAssignToUserPtrOutputWithContext(ctx context.Context) ComputeInstanceAssignToUserPtrOutput {
return o
}
func (o ComputeInstanceAssignToUserPtrOutput) Elem() ComputeInstanceAssignToUserOutput {
return o.ApplyT(func(v *ComputeInstanceAssignToUser) ComputeInstanceAssignToUser {
if v != nil {
return *v
}
var ret ComputeInstanceAssignToUser
return ret
}).(ComputeInstanceAssignToUserOutput)
}
// User’s AAD Object Id.
func (o ComputeInstanceAssignToUserPtrOutput) ObjectId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeInstanceAssignToUser) *string {
if v == nil {
return nil
}
return v.ObjectId
}).(pulumi.StringPtrOutput)
}
// User’s AAD Tenant Id.
func (o ComputeInstanceAssignToUserPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeInstanceAssignToUser) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
type ComputeInstanceIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Instance. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Instance.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Machine Learning Compute Instance.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Machine Learning Compute Instance. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Changing this forces a new resource to be created.
Type string `pulumi:"type"`
}
// ComputeInstanceIdentityInput is an input type that accepts ComputeInstanceIdentityArgs and ComputeInstanceIdentityOutput values.
// You can construct a concrete instance of `ComputeInstanceIdentityInput` via:
//
// ComputeInstanceIdentityArgs{...}
type ComputeInstanceIdentityInput interface {
pulumi.Input
ToComputeInstanceIdentityOutput() ComputeInstanceIdentityOutput
ToComputeInstanceIdentityOutputWithContext(context.Context) ComputeInstanceIdentityOutput
}
type ComputeInstanceIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Machine Learning Compute Instance. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/datastoreDatalakeGen2.go | sdk/go/azure/machinelearning/datastoreDatalakeGen2.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning Data Lake Gen2 DataStore.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example-container"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewDatastoreDatalakeGen2(ctx, "example", &machinelearning.DatastoreDatalakeGen2Args{
// Name: pulumi.String("example-datastore"),
// WorkspaceId: exampleWorkspace.ID(),
// StorageContainerId: exampleContainer.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning DataStores can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/datastoreDatalakeGen2:DatastoreDatalakeGen2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/mlw1/dataStores/datastore1
// ```
type DatastoreDatalakeGen2 struct {
pulumi.CustomResourceState
// An URL used for authentication.
AuthorityUrl pulumi.StringPtrOutput `pulumi:"authorityUrl"`
// The object ID of the Service Principal.
ClientId pulumi.StringPtrOutput `pulumi:"clientId"`
// The secret of the Service Principal.
ClientSecret pulumi.StringPtrOutput `pulumi:"clientSecret"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Indicates whether this Machines Learning DataStore is the default for the Workspace.
IsDefault pulumi.BoolOutput `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrOutput `pulumi:"serviceDataIdentity"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringOutput `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Tenant which the Service Principal belongs to.
TenantId pulumi.StringPtrOutput `pulumi:"tenantId"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewDatastoreDatalakeGen2 registers a new resource with the given unique name, arguments, and options.
func NewDatastoreDatalakeGen2(ctx *pulumi.Context,
name string, args *DatastoreDatalakeGen2Args, opts ...pulumi.ResourceOption) (*DatastoreDatalakeGen2, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageContainerId == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerId'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientSecret",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatastoreDatalakeGen2
err := ctx.RegisterResource("azure:machinelearning/datastoreDatalakeGen2:DatastoreDatalakeGen2", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatastoreDatalakeGen2 gets an existing DatastoreDatalakeGen2 resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatastoreDatalakeGen2(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatastoreDatalakeGen2State, opts ...pulumi.ResourceOption) (*DatastoreDatalakeGen2, error) {
var resource DatastoreDatalakeGen2
err := ctx.ReadResource("azure:machinelearning/datastoreDatalakeGen2:DatastoreDatalakeGen2", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatastoreDatalakeGen2 resources.
type datastoreDatalakeGen2State struct {
// An URL used for authentication.
AuthorityUrl *string `pulumi:"authorityUrl"`
// The object ID of the Service Principal.
ClientId *string `pulumi:"clientId"`
// The secret of the Service Principal.
ClientSecret *string `pulumi:"clientSecret"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// Indicates whether this Machines Learning DataStore is the default for the Workspace.
IsDefault *bool `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity *string `pulumi:"serviceDataIdentity"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId *string `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Tenant which the Service Principal belongs to.
TenantId *string `pulumi:"tenantId"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type DatastoreDatalakeGen2State struct {
// An URL used for authentication.
AuthorityUrl pulumi.StringPtrInput
// The object ID of the Service Principal.
ClientId pulumi.StringPtrInput
// The secret of the Service Principal.
ClientSecret pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// Indicates whether this Machines Learning DataStore is the default for the Workspace.
IsDefault pulumi.BoolPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrInput
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Tenant which the Service Principal belongs to.
TenantId pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringPtrInput
}
func (DatastoreDatalakeGen2State) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreDatalakeGen2State)(nil)).Elem()
}
type datastoreDatalakeGen2Args struct {
// An URL used for authentication.
AuthorityUrl *string `pulumi:"authorityUrl"`
// The object ID of the Service Principal.
ClientId *string `pulumi:"clientId"`
// The secret of the Service Principal.
ClientSecret *string `pulumi:"clientSecret"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity *string `pulumi:"serviceDataIdentity"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId string `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Tenant which the Service Principal belongs to.
TenantId *string `pulumi:"tenantId"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a DatastoreDatalakeGen2 resource.
type DatastoreDatalakeGen2Args struct {
// An URL used for authentication.
AuthorityUrl pulumi.StringPtrInput
// The object ID of the Service Principal.
ClientId pulumi.StringPtrInput
// The secret of the Service Principal.
ClientSecret pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrInput
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Tenant which the Service Principal belongs to.
TenantId pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringInput
}
func (DatastoreDatalakeGen2Args) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreDatalakeGen2Args)(nil)).Elem()
}
type DatastoreDatalakeGen2Input interface {
pulumi.Input
ToDatastoreDatalakeGen2Output() DatastoreDatalakeGen2Output
ToDatastoreDatalakeGen2OutputWithContext(ctx context.Context) DatastoreDatalakeGen2Output
}
func (*DatastoreDatalakeGen2) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreDatalakeGen2)(nil)).Elem()
}
func (i *DatastoreDatalakeGen2) ToDatastoreDatalakeGen2Output() DatastoreDatalakeGen2Output {
return i.ToDatastoreDatalakeGen2OutputWithContext(context.Background())
}
func (i *DatastoreDatalakeGen2) ToDatastoreDatalakeGen2OutputWithContext(ctx context.Context) DatastoreDatalakeGen2Output {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreDatalakeGen2Output)
}
// DatastoreDatalakeGen2ArrayInput is an input type that accepts DatastoreDatalakeGen2Array and DatastoreDatalakeGen2ArrayOutput values.
// You can construct a concrete instance of `DatastoreDatalakeGen2ArrayInput` via:
//
// DatastoreDatalakeGen2Array{ DatastoreDatalakeGen2Args{...} }
type DatastoreDatalakeGen2ArrayInput interface {
pulumi.Input
ToDatastoreDatalakeGen2ArrayOutput() DatastoreDatalakeGen2ArrayOutput
ToDatastoreDatalakeGen2ArrayOutputWithContext(context.Context) DatastoreDatalakeGen2ArrayOutput
}
type DatastoreDatalakeGen2Array []DatastoreDatalakeGen2Input
func (DatastoreDatalakeGen2Array) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreDatalakeGen2)(nil)).Elem()
}
func (i DatastoreDatalakeGen2Array) ToDatastoreDatalakeGen2ArrayOutput() DatastoreDatalakeGen2ArrayOutput {
return i.ToDatastoreDatalakeGen2ArrayOutputWithContext(context.Background())
}
func (i DatastoreDatalakeGen2Array) ToDatastoreDatalakeGen2ArrayOutputWithContext(ctx context.Context) DatastoreDatalakeGen2ArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreDatalakeGen2ArrayOutput)
}
// DatastoreDatalakeGen2MapInput is an input type that accepts DatastoreDatalakeGen2Map and DatastoreDatalakeGen2MapOutput values.
// You can construct a concrete instance of `DatastoreDatalakeGen2MapInput` via:
//
// DatastoreDatalakeGen2Map{ "key": DatastoreDatalakeGen2Args{...} }
type DatastoreDatalakeGen2MapInput interface {
pulumi.Input
ToDatastoreDatalakeGen2MapOutput() DatastoreDatalakeGen2MapOutput
ToDatastoreDatalakeGen2MapOutputWithContext(context.Context) DatastoreDatalakeGen2MapOutput
}
type DatastoreDatalakeGen2Map map[string]DatastoreDatalakeGen2Input
func (DatastoreDatalakeGen2Map) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreDatalakeGen2)(nil)).Elem()
}
func (i DatastoreDatalakeGen2Map) ToDatastoreDatalakeGen2MapOutput() DatastoreDatalakeGen2MapOutput {
return i.ToDatastoreDatalakeGen2MapOutputWithContext(context.Background())
}
func (i DatastoreDatalakeGen2Map) ToDatastoreDatalakeGen2MapOutputWithContext(ctx context.Context) DatastoreDatalakeGen2MapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreDatalakeGen2MapOutput)
}
type DatastoreDatalakeGen2Output struct{ *pulumi.OutputState }
func (DatastoreDatalakeGen2Output) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreDatalakeGen2)(nil)).Elem()
}
func (o DatastoreDatalakeGen2Output) ToDatastoreDatalakeGen2Output() DatastoreDatalakeGen2Output {
return o
}
func (o DatastoreDatalakeGen2Output) ToDatastoreDatalakeGen2OutputWithContext(ctx context.Context) DatastoreDatalakeGen2Output {
return o
}
// An URL used for authentication.
func (o DatastoreDatalakeGen2Output) AuthorityUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.AuthorityUrl }).(pulumi.StringPtrOutput)
}
// The object ID of the Service Principal.
func (o DatastoreDatalakeGen2Output) ClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.ClientId }).(pulumi.StringPtrOutput)
}
// The secret of the Service Principal.
func (o DatastoreDatalakeGen2Output) ClientSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.ClientSecret }).(pulumi.StringPtrOutput)
}
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreDatalakeGen2Output) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Indicates whether this Machines Learning DataStore is the default for the Workspace.
func (o DatastoreDatalakeGen2Output) IsDefault() pulumi.BoolOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.BoolOutput { return v.IsDefault }).(pulumi.BoolOutput)
}
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreDatalakeGen2Output) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
func (o DatastoreDatalakeGen2Output) ServiceDataIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.ServiceDataIdentity }).(pulumi.StringPtrOutput)
}
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreDatalakeGen2Output) StorageContainerId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringOutput { return v.StorageContainerId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreDatalakeGen2Output) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Tenant which the Service Principal belongs to.
func (o DatastoreDatalakeGen2Output) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringPtrOutput { return v.TenantId }).(pulumi.StringPtrOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreDatalakeGen2Output) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreDatalakeGen2) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type DatastoreDatalakeGen2ArrayOutput struct{ *pulumi.OutputState }
func (DatastoreDatalakeGen2ArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreDatalakeGen2)(nil)).Elem()
}
func (o DatastoreDatalakeGen2ArrayOutput) ToDatastoreDatalakeGen2ArrayOutput() DatastoreDatalakeGen2ArrayOutput {
return o
}
func (o DatastoreDatalakeGen2ArrayOutput) ToDatastoreDatalakeGen2ArrayOutputWithContext(ctx context.Context) DatastoreDatalakeGen2ArrayOutput {
return o
}
func (o DatastoreDatalakeGen2ArrayOutput) Index(i pulumi.IntInput) DatastoreDatalakeGen2Output {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatastoreDatalakeGen2 {
return vs[0].([]*DatastoreDatalakeGen2)[vs[1].(int)]
}).(DatastoreDatalakeGen2Output)
}
type DatastoreDatalakeGen2MapOutput struct{ *pulumi.OutputState }
func (DatastoreDatalakeGen2MapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreDatalakeGen2)(nil)).Elem()
}
func (o DatastoreDatalakeGen2MapOutput) ToDatastoreDatalakeGen2MapOutput() DatastoreDatalakeGen2MapOutput {
return o
}
func (o DatastoreDatalakeGen2MapOutput) ToDatastoreDatalakeGen2MapOutputWithContext(ctx context.Context) DatastoreDatalakeGen2MapOutput {
return o
}
func (o DatastoreDatalakeGen2MapOutput) MapIndex(k pulumi.StringInput) DatastoreDatalakeGen2Output {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatastoreDatalakeGen2 {
return vs[0].(map[string]*DatastoreDatalakeGen2)[vs[1].(string)]
}).(DatastoreDatalakeGen2Output)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreDatalakeGen2Input)(nil)).Elem(), &DatastoreDatalakeGen2{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreDatalakeGen2ArrayInput)(nil)).Elem(), DatastoreDatalakeGen2Array{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreDatalakeGen2MapInput)(nil)).Elem(), DatastoreDatalakeGen2Map{})
pulumi.RegisterOutputType(DatastoreDatalakeGen2Output{})
pulumi.RegisterOutputType(DatastoreDatalakeGen2ArrayOutput{})
pulumi.RegisterOutputType(DatastoreDatalakeGen2MapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/workspaceNetworkOutboundRulePrivateEndpoint.go | sdk/go/azure/machinelearning/workspaceNetworkOutboundRulePrivateEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Machine Learning Workspace Network Outbound Rule Private Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// ManagedNetwork: &machinelearning.WorkspaceManagedNetworkArgs{
// IsolationMode: pulumi.String("AllowOnlyApprovedOutbound"),
// },
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// example2, err := storage.NewAccount(ctx, "example2", &storage.AccountArgs{
// Name: pulumi.String("example-sa"),
// Location: pulumi.Any(test.Location),
// ResourceGroupName: pulumi.Any(test.Name),
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewWorkspaceNetworkOutboundRulePrivateEndpoint(ctx, "example", &machinelearning.WorkspaceNetworkOutboundRulePrivateEndpointArgs{
// Name: pulumi.String("example-outboundrule"),
// WorkspaceId: exampleWorkspace.ID(),
// ServiceResourceId: example2.ID(),
// SubResourceTarget: pulumi.String("blob"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Workspace Network Outbound Rule Private Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/workspaceNetworkOutboundRulePrivateEndpoint:WorkspaceNetworkOutboundRulePrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/outboundRules/rule1
// ```
type WorkspaceNetworkOutboundRulePrivateEndpoint struct {
pulumi.CustomResourceState
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
ServiceResourceId pulumi.StringOutput `pulumi:"serviceResourceId"`
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
SparkEnabled pulumi.BoolPtrOutput `pulumi:"sparkEnabled"`
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
SubResourceTarget pulumi.StringOutput `pulumi:"subResourceTarget"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceNetworkOutboundRulePrivateEndpoint registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceNetworkOutboundRulePrivateEndpoint(ctx *pulumi.Context,
name string, args *WorkspaceNetworkOutboundRulePrivateEndpointArgs, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRulePrivateEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServiceResourceId == nil {
return nil, errors.New("invalid value for required argument 'ServiceResourceId'")
}
if args.SubResourceTarget == nil {
return nil, errors.New("invalid value for required argument 'SubResourceTarget'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceNetworkOutboundRulePrivateEndpoint
err := ctx.RegisterResource("azure:machinelearning/workspaceNetworkOutboundRulePrivateEndpoint:WorkspaceNetworkOutboundRulePrivateEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceNetworkOutboundRulePrivateEndpoint gets an existing WorkspaceNetworkOutboundRulePrivateEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceNetworkOutboundRulePrivateEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceNetworkOutboundRulePrivateEndpointState, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRulePrivateEndpoint, error) {
var resource WorkspaceNetworkOutboundRulePrivateEndpoint
err := ctx.ReadResource("azure:machinelearning/workspaceNetworkOutboundRulePrivateEndpoint:WorkspaceNetworkOutboundRulePrivateEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceNetworkOutboundRulePrivateEndpoint resources.
type workspaceNetworkOutboundRulePrivateEndpointState struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
ServiceResourceId *string `pulumi:"serviceResourceId"`
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
SparkEnabled *bool `pulumi:"sparkEnabled"`
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
SubResourceTarget *string `pulumi:"subResourceTarget"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceNetworkOutboundRulePrivateEndpointState struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
ServiceResourceId pulumi.StringPtrInput
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
SparkEnabled pulumi.BoolPtrInput
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
SubResourceTarget pulumi.StringPtrInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceNetworkOutboundRulePrivateEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRulePrivateEndpointState)(nil)).Elem()
}
type workspaceNetworkOutboundRulePrivateEndpointArgs struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
ServiceResourceId string `pulumi:"serviceResourceId"`
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
SparkEnabled *bool `pulumi:"sparkEnabled"`
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
SubResourceTarget string `pulumi:"subResourceTarget"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceNetworkOutboundRulePrivateEndpoint resource.
type WorkspaceNetworkOutboundRulePrivateEndpointArgs struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
ServiceResourceId pulumi.StringInput
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
SparkEnabled pulumi.BoolPtrInput
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
SubResourceTarget pulumi.StringInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringInput
}
func (WorkspaceNetworkOutboundRulePrivateEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRulePrivateEndpointArgs)(nil)).Elem()
}
type WorkspaceNetworkOutboundRulePrivateEndpointInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRulePrivateEndpointOutput() WorkspaceNetworkOutboundRulePrivateEndpointOutput
ToWorkspaceNetworkOutboundRulePrivateEndpointOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointOutput
}
func (*WorkspaceNetworkOutboundRulePrivateEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (i *WorkspaceNetworkOutboundRulePrivateEndpoint) ToWorkspaceNetworkOutboundRulePrivateEndpointOutput() WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return i.ToWorkspaceNetworkOutboundRulePrivateEndpointOutputWithContext(context.Background())
}
func (i *WorkspaceNetworkOutboundRulePrivateEndpoint) ToWorkspaceNetworkOutboundRulePrivateEndpointOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRulePrivateEndpointOutput)
}
// WorkspaceNetworkOutboundRulePrivateEndpointArrayInput is an input type that accepts WorkspaceNetworkOutboundRulePrivateEndpointArray and WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRulePrivateEndpointArrayInput` via:
//
// WorkspaceNetworkOutboundRulePrivateEndpointArray{ WorkspaceNetworkOutboundRulePrivateEndpointArgs{...} }
type WorkspaceNetworkOutboundRulePrivateEndpointArrayInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutput() WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput
ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutputWithContext(context.Context) WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput
}
type WorkspaceNetworkOutboundRulePrivateEndpointArray []WorkspaceNetworkOutboundRulePrivateEndpointInput
func (WorkspaceNetworkOutboundRulePrivateEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRulePrivateEndpointArray) ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutput() WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput {
return i.ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRulePrivateEndpointArray) ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput)
}
// WorkspaceNetworkOutboundRulePrivateEndpointMapInput is an input type that accepts WorkspaceNetworkOutboundRulePrivateEndpointMap and WorkspaceNetworkOutboundRulePrivateEndpointMapOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRulePrivateEndpointMapInput` via:
//
// WorkspaceNetworkOutboundRulePrivateEndpointMap{ "key": WorkspaceNetworkOutboundRulePrivateEndpointArgs{...} }
type WorkspaceNetworkOutboundRulePrivateEndpointMapInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutput() WorkspaceNetworkOutboundRulePrivateEndpointMapOutput
ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutputWithContext(context.Context) WorkspaceNetworkOutboundRulePrivateEndpointMapOutput
}
type WorkspaceNetworkOutboundRulePrivateEndpointMap map[string]WorkspaceNetworkOutboundRulePrivateEndpointInput
func (WorkspaceNetworkOutboundRulePrivateEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRulePrivateEndpointMap) ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutput() WorkspaceNetworkOutboundRulePrivateEndpointMapOutput {
return i.ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRulePrivateEndpointMap) ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRulePrivateEndpointMapOutput)
}
type WorkspaceNetworkOutboundRulePrivateEndpointOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRulePrivateEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointOutput() WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return o
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return o
}
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Private Endpoint. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRulePrivateEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the Service Resource ID to connect. Changing this forces a new resource to be created.
//
// > **Note:** Supported service resources: **Key Vault**, **Storage Account**, **Machine Learning Workspace**, **Redis**.
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) ServiceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRulePrivateEndpoint) pulumi.StringOutput { return v.ServiceResourceId }).(pulumi.StringOutput)
}
// Whether to enable an additional private endpoint to be used by jobs running on Spark. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) SparkEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRulePrivateEndpoint) pulumi.BoolPtrOutput { return v.SparkEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the Sub Resource of the service resource to connect to. Possible values are `vault`,`amlworkspace`,`blob`,`table`,`queue`,`file`,`web`,`dfs`, `redisCache`. Changing this forces a new resource to be created.
//
// | Service | Sub Resource Type |
// |----------------------------|-------------------------------------------|
// | Machine Learning Workspace | `amlworkspace` |
// | Redis | `redisCache` |
// | Storage Account | `blob`,`table`,`queue`,`file`,`web`,`dfs` |
// | Key Vault | `vault` |
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) SubResourceTarget() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRulePrivateEndpoint) pulumi.StringOutput { return v.SubResourceTarget }).(pulumi.StringOutput)
}
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRulePrivateEndpointOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRulePrivateEndpoint) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutput() WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput) Index(i pulumi.IntInput) WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRulePrivateEndpoint {
return vs[0].([]*WorkspaceNetworkOutboundRulePrivateEndpoint)[vs[1].(int)]
}).(WorkspaceNetworkOutboundRulePrivateEndpointOutput)
}
type WorkspaceNetworkOutboundRulePrivateEndpointMapOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRulePrivateEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRulePrivateEndpoint)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointMapOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutput() WorkspaceNetworkOutboundRulePrivateEndpointMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointMapOutput) ToWorkspaceNetworkOutboundRulePrivateEndpointMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRulePrivateEndpointMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRulePrivateEndpointMapOutput) MapIndex(k pulumi.StringInput) WorkspaceNetworkOutboundRulePrivateEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRulePrivateEndpoint {
return vs[0].(map[string]*WorkspaceNetworkOutboundRulePrivateEndpoint)[vs[1].(string)]
}).(WorkspaceNetworkOutboundRulePrivateEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRulePrivateEndpointInput)(nil)).Elem(), &WorkspaceNetworkOutboundRulePrivateEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRulePrivateEndpointArrayInput)(nil)).Elem(), WorkspaceNetworkOutboundRulePrivateEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRulePrivateEndpointMapInput)(nil)).Elem(), WorkspaceNetworkOutboundRulePrivateEndpointMap{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRulePrivateEndpointOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRulePrivateEndpointArrayOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRulePrivateEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/datastoreBlobstorage.go | sdk/go/azure/machinelearning/datastoreBlobstorage.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning Blob Storage DataStore.
//
// ## Example Usage
//
// ### With Azure Blob
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example-container"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewDatastoreBlobstorage(ctx, "example", &machinelearning.DatastoreBlobstorageArgs{
// Name: pulumi.String("example-datastore"),
// WorkspaceId: exampleWorkspace.ID(),
// StorageContainerId: exampleContainer.ID(),
// AccountKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning DataStores can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/datastoreBlobstorage:DatastoreBlobstorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/mlw1/dataStores/datastore1
// ```
type DatastoreBlobstorage struct {
pulumi.CustomResourceState
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrOutput `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
IsDefault pulumi.BoolPtrOutput `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataAuthIdentity pulumi.StringPtrOutput `pulumi:"serviceDataAuthIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
SharedAccessSignature pulumi.StringPtrOutput `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringOutput `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewDatastoreBlobstorage registers a new resource with the given unique name, arguments, and options.
func NewDatastoreBlobstorage(ctx *pulumi.Context,
name string, args *DatastoreBlobstorageArgs, opts ...pulumi.ResourceOption) (*DatastoreBlobstorage, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageContainerId == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerId'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
if args.AccountKey != nil {
args.AccountKey = pulumi.ToSecret(args.AccountKey).(pulumi.StringPtrInput)
}
if args.SharedAccessSignature != nil {
args.SharedAccessSignature = pulumi.ToSecret(args.SharedAccessSignature).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"accountKey",
"sharedAccessSignature",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatastoreBlobstorage
err := ctx.RegisterResource("azure:machinelearning/datastoreBlobstorage:DatastoreBlobstorage", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatastoreBlobstorage gets an existing DatastoreBlobstorage resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatastoreBlobstorage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatastoreBlobstorageState, opts ...pulumi.ResourceOption) (*DatastoreBlobstorage, error) {
var resource DatastoreBlobstorage
err := ctx.ReadResource("azure:machinelearning/datastoreBlobstorage:DatastoreBlobstorage", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatastoreBlobstorage resources.
type datastoreBlobstorageState struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey *string `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
IsDefault *bool `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataAuthIdentity *string `pulumi:"serviceDataAuthIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
SharedAccessSignature *string `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId *string `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type DatastoreBlobstorageState struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
IsDefault pulumi.BoolPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataAuthIdentity pulumi.StringPtrInput
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
SharedAccessSignature pulumi.StringPtrInput
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringPtrInput
}
func (DatastoreBlobstorageState) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreBlobstorageState)(nil)).Elem()
}
type datastoreBlobstorageArgs struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey *string `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
IsDefault *bool `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataAuthIdentity *string `pulumi:"serviceDataAuthIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
SharedAccessSignature *string `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId string `pulumi:"storageContainerId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a DatastoreBlobstorage resource.
type DatastoreBlobstorageArgs struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
IsDefault pulumi.BoolPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataAuthIdentity pulumi.StringPtrInput
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
SharedAccessSignature pulumi.StringPtrInput
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
StorageContainerId pulumi.StringInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringInput
}
func (DatastoreBlobstorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreBlobstorageArgs)(nil)).Elem()
}
type DatastoreBlobstorageInput interface {
pulumi.Input
ToDatastoreBlobstorageOutput() DatastoreBlobstorageOutput
ToDatastoreBlobstorageOutputWithContext(ctx context.Context) DatastoreBlobstorageOutput
}
func (*DatastoreBlobstorage) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreBlobstorage)(nil)).Elem()
}
func (i *DatastoreBlobstorage) ToDatastoreBlobstorageOutput() DatastoreBlobstorageOutput {
return i.ToDatastoreBlobstorageOutputWithContext(context.Background())
}
func (i *DatastoreBlobstorage) ToDatastoreBlobstorageOutputWithContext(ctx context.Context) DatastoreBlobstorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreBlobstorageOutput)
}
// DatastoreBlobstorageArrayInput is an input type that accepts DatastoreBlobstorageArray and DatastoreBlobstorageArrayOutput values.
// You can construct a concrete instance of `DatastoreBlobstorageArrayInput` via:
//
// DatastoreBlobstorageArray{ DatastoreBlobstorageArgs{...} }
type DatastoreBlobstorageArrayInput interface {
pulumi.Input
ToDatastoreBlobstorageArrayOutput() DatastoreBlobstorageArrayOutput
ToDatastoreBlobstorageArrayOutputWithContext(context.Context) DatastoreBlobstorageArrayOutput
}
type DatastoreBlobstorageArray []DatastoreBlobstorageInput
func (DatastoreBlobstorageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreBlobstorage)(nil)).Elem()
}
func (i DatastoreBlobstorageArray) ToDatastoreBlobstorageArrayOutput() DatastoreBlobstorageArrayOutput {
return i.ToDatastoreBlobstorageArrayOutputWithContext(context.Background())
}
func (i DatastoreBlobstorageArray) ToDatastoreBlobstorageArrayOutputWithContext(ctx context.Context) DatastoreBlobstorageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreBlobstorageArrayOutput)
}
// DatastoreBlobstorageMapInput is an input type that accepts DatastoreBlobstorageMap and DatastoreBlobstorageMapOutput values.
// You can construct a concrete instance of `DatastoreBlobstorageMapInput` via:
//
// DatastoreBlobstorageMap{ "key": DatastoreBlobstorageArgs{...} }
type DatastoreBlobstorageMapInput interface {
pulumi.Input
ToDatastoreBlobstorageMapOutput() DatastoreBlobstorageMapOutput
ToDatastoreBlobstorageMapOutputWithContext(context.Context) DatastoreBlobstorageMapOutput
}
type DatastoreBlobstorageMap map[string]DatastoreBlobstorageInput
func (DatastoreBlobstorageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreBlobstorage)(nil)).Elem()
}
func (i DatastoreBlobstorageMap) ToDatastoreBlobstorageMapOutput() DatastoreBlobstorageMapOutput {
return i.ToDatastoreBlobstorageMapOutputWithContext(context.Background())
}
func (i DatastoreBlobstorageMap) ToDatastoreBlobstorageMapOutputWithContext(ctx context.Context) DatastoreBlobstorageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreBlobstorageMapOutput)
}
type DatastoreBlobstorageOutput struct{ *pulumi.OutputState }
func (DatastoreBlobstorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreBlobstorage)(nil)).Elem()
}
func (o DatastoreBlobstorageOutput) ToDatastoreBlobstorageOutput() DatastoreBlobstorageOutput {
return o
}
func (o DatastoreBlobstorageOutput) ToDatastoreBlobstorageOutputWithContext(ctx context.Context) DatastoreBlobstorageOutput {
return o
}
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
func (o DatastoreBlobstorageOutput) AccountKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringPtrOutput { return v.AccountKey }).(pulumi.StringPtrOutput)
}
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreBlobstorageOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies whether this Machines Learning DataStore is the default for the Workspace. Defaults to `false`.
//
// > **Note:** `isDefault` can only be set to `true` on update.
func (o DatastoreBlobstorageOutput) IsDefault() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.BoolPtrOutput { return v.IsDefault }).(pulumi.BoolPtrOutput)
}
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreBlobstorageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
func (o DatastoreBlobstorageOutput) ServiceDataAuthIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringPtrOutput { return v.ServiceDataAuthIdentity }).(pulumi.StringPtrOutput)
}
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
//
// > **Note:** If `serviceDataAuthIdentity` is set to `None` or omitted, one of `accountKey` or `sharedAccessSignature` must be specified.
func (o DatastoreBlobstorageOutput) SharedAccessSignature() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringPtrOutput { return v.SharedAccessSignature }).(pulumi.StringPtrOutput)
}
// The ID of the Storage Account Container. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreBlobstorageOutput) StorageContainerId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringOutput { return v.StorageContainerId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreBlobstorageOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreBlobstorageOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreBlobstorage) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type DatastoreBlobstorageArrayOutput struct{ *pulumi.OutputState }
func (DatastoreBlobstorageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreBlobstorage)(nil)).Elem()
}
func (o DatastoreBlobstorageArrayOutput) ToDatastoreBlobstorageArrayOutput() DatastoreBlobstorageArrayOutput {
return o
}
func (o DatastoreBlobstorageArrayOutput) ToDatastoreBlobstorageArrayOutputWithContext(ctx context.Context) DatastoreBlobstorageArrayOutput {
return o
}
func (o DatastoreBlobstorageArrayOutput) Index(i pulumi.IntInput) DatastoreBlobstorageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatastoreBlobstorage {
return vs[0].([]*DatastoreBlobstorage)[vs[1].(int)]
}).(DatastoreBlobstorageOutput)
}
type DatastoreBlobstorageMapOutput struct{ *pulumi.OutputState }
func (DatastoreBlobstorageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreBlobstorage)(nil)).Elem()
}
func (o DatastoreBlobstorageMapOutput) ToDatastoreBlobstorageMapOutput() DatastoreBlobstorageMapOutput {
return o
}
func (o DatastoreBlobstorageMapOutput) ToDatastoreBlobstorageMapOutputWithContext(ctx context.Context) DatastoreBlobstorageMapOutput {
return o
}
func (o DatastoreBlobstorageMapOutput) MapIndex(k pulumi.StringInput) DatastoreBlobstorageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatastoreBlobstorage {
return vs[0].(map[string]*DatastoreBlobstorage)[vs[1].(string)]
}).(DatastoreBlobstorageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreBlobstorageInput)(nil)).Elem(), &DatastoreBlobstorage{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreBlobstorageArrayInput)(nil)).Elem(), DatastoreBlobstorageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreBlobstorageMapInput)(nil)).Elem(), DatastoreBlobstorageMap{})
pulumi.RegisterOutputType(DatastoreBlobstorageOutput{})
pulumi.RegisterOutputType(DatastoreBlobstorageArrayOutput{})
pulumi.RegisterOutputType(DatastoreBlobstorageMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/datastoreFileshare.go | sdk/go/azure/machinelearning/datastoreFileshare.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning File Share DataStore.
//
// ## Example Usage
//
// ### With Azure File Share
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// Quota: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewDatastoreFileshare(ctx, "example", &machinelearning.DatastoreFileshareArgs{
// Name: pulumi.String("example-datastore"),
// WorkspaceId: exampleWorkspace.ID(),
// StorageFileshareId: exampleShare.ResourceManagerId,
// AccountKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning DataStores can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/datastoreFileshare:DatastoreFileshare example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/mlw1/dataStores/datastore1
// ```
type DatastoreFileshare struct {
pulumi.CustomResourceState
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrOutput `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Indicate whether this Machines Learning DataStore is the default for the Workspace.
IsDefault pulumi.BoolOutput `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrOutput `pulumi:"serviceDataIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
SharedAccessSignature pulumi.StringPtrOutput `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
StorageFileshareId pulumi.StringOutput `pulumi:"storageFileshareId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewDatastoreFileshare registers a new resource with the given unique name, arguments, and options.
func NewDatastoreFileshare(ctx *pulumi.Context,
name string, args *DatastoreFileshareArgs, opts ...pulumi.ResourceOption) (*DatastoreFileshare, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageFileshareId == nil {
return nil, errors.New("invalid value for required argument 'StorageFileshareId'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
if args.AccountKey != nil {
args.AccountKey = pulumi.ToSecret(args.AccountKey).(pulumi.StringPtrInput)
}
if args.SharedAccessSignature != nil {
args.SharedAccessSignature = pulumi.ToSecret(args.SharedAccessSignature).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"accountKey",
"sharedAccessSignature",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatastoreFileshare
err := ctx.RegisterResource("azure:machinelearning/datastoreFileshare:DatastoreFileshare", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatastoreFileshare gets an existing DatastoreFileshare resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatastoreFileshare(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatastoreFileshareState, opts ...pulumi.ResourceOption) (*DatastoreFileshare, error) {
var resource DatastoreFileshare
err := ctx.ReadResource("azure:machinelearning/datastoreFileshare:DatastoreFileshare", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatastoreFileshare resources.
type datastoreFileshareState struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey *string `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// Indicate whether this Machines Learning DataStore is the default for the Workspace.
IsDefault *bool `pulumi:"isDefault"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity *string `pulumi:"serviceDataIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
SharedAccessSignature *string `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
StorageFileshareId *string `pulumi:"storageFileshareId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type DatastoreFileshareState struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// Indicate whether this Machines Learning DataStore is the default for the Workspace.
IsDefault pulumi.BoolPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrInput
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
SharedAccessSignature pulumi.StringPtrInput
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
StorageFileshareId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringPtrInput
}
func (DatastoreFileshareState) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreFileshareState)(nil)).Elem()
}
type datastoreFileshareArgs struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey *string `pulumi:"accountKey"`
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description *string `pulumi:"description"`
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name *string `pulumi:"name"`
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity *string `pulumi:"serviceDataIdentity"`
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
SharedAccessSignature *string `pulumi:"sharedAccessSignature"`
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
StorageFileshareId string `pulumi:"storageFileshareId"`
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a DatastoreFileshare resource.
type DatastoreFileshareArgs struct {
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
AccountKey pulumi.StringPtrInput
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
Description pulumi.StringPtrInput
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Name pulumi.StringPtrInput
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
ServiceDataIdentity pulumi.StringPtrInput
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
SharedAccessSignature pulumi.StringPtrInput
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
StorageFileshareId pulumi.StringInput
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
Tags pulumi.StringMapInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
WorkspaceId pulumi.StringInput
}
func (DatastoreFileshareArgs) ElementType() reflect.Type {
return reflect.TypeOf((*datastoreFileshareArgs)(nil)).Elem()
}
type DatastoreFileshareInput interface {
pulumi.Input
ToDatastoreFileshareOutput() DatastoreFileshareOutput
ToDatastoreFileshareOutputWithContext(ctx context.Context) DatastoreFileshareOutput
}
func (*DatastoreFileshare) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreFileshare)(nil)).Elem()
}
func (i *DatastoreFileshare) ToDatastoreFileshareOutput() DatastoreFileshareOutput {
return i.ToDatastoreFileshareOutputWithContext(context.Background())
}
func (i *DatastoreFileshare) ToDatastoreFileshareOutputWithContext(ctx context.Context) DatastoreFileshareOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreFileshareOutput)
}
// DatastoreFileshareArrayInput is an input type that accepts DatastoreFileshareArray and DatastoreFileshareArrayOutput values.
// You can construct a concrete instance of `DatastoreFileshareArrayInput` via:
//
// DatastoreFileshareArray{ DatastoreFileshareArgs{...} }
type DatastoreFileshareArrayInput interface {
pulumi.Input
ToDatastoreFileshareArrayOutput() DatastoreFileshareArrayOutput
ToDatastoreFileshareArrayOutputWithContext(context.Context) DatastoreFileshareArrayOutput
}
type DatastoreFileshareArray []DatastoreFileshareInput
func (DatastoreFileshareArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreFileshare)(nil)).Elem()
}
func (i DatastoreFileshareArray) ToDatastoreFileshareArrayOutput() DatastoreFileshareArrayOutput {
return i.ToDatastoreFileshareArrayOutputWithContext(context.Background())
}
func (i DatastoreFileshareArray) ToDatastoreFileshareArrayOutputWithContext(ctx context.Context) DatastoreFileshareArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreFileshareArrayOutput)
}
// DatastoreFileshareMapInput is an input type that accepts DatastoreFileshareMap and DatastoreFileshareMapOutput values.
// You can construct a concrete instance of `DatastoreFileshareMapInput` via:
//
// DatastoreFileshareMap{ "key": DatastoreFileshareArgs{...} }
type DatastoreFileshareMapInput interface {
pulumi.Input
ToDatastoreFileshareMapOutput() DatastoreFileshareMapOutput
ToDatastoreFileshareMapOutputWithContext(context.Context) DatastoreFileshareMapOutput
}
type DatastoreFileshareMap map[string]DatastoreFileshareInput
func (DatastoreFileshareMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreFileshare)(nil)).Elem()
}
func (i DatastoreFileshareMap) ToDatastoreFileshareMapOutput() DatastoreFileshareMapOutput {
return i.ToDatastoreFileshareMapOutputWithContext(context.Background())
}
func (i DatastoreFileshareMap) ToDatastoreFileshareMapOutputWithContext(ctx context.Context) DatastoreFileshareMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatastoreFileshareMapOutput)
}
type DatastoreFileshareOutput struct{ *pulumi.OutputState }
func (DatastoreFileshareOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatastoreFileshare)(nil)).Elem()
}
func (o DatastoreFileshareOutput) ToDatastoreFileshareOutput() DatastoreFileshareOutput {
return o
}
func (o DatastoreFileshareOutput) ToDatastoreFileshareOutputWithContext(ctx context.Context) DatastoreFileshareOutput {
return o
}
// The access key of the Storage Account. Conflicts with `sharedAccessSignature`.
func (o DatastoreFileshareOutput) AccountKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringPtrOutput { return v.AccountKey }).(pulumi.StringPtrOutput)
}
// Text used to describe the asset. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreFileshareOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Indicate whether this Machines Learning DataStore is the default for the Workspace.
func (o DatastoreFileshareOutput) IsDefault() pulumi.BoolOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.BoolOutput { return v.IsDefault }).(pulumi.BoolOutput)
}
// The name of the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreFileshareOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies which identity to use when retrieving data from the specified source. Defaults to `None`. Possible values are `None`, `WorkspaceSystemAssignedIdentity` and `WorkspaceUserAssignedIdentity`.
func (o DatastoreFileshareOutput) ServiceDataIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringPtrOutput { return v.ServiceDataIdentity }).(pulumi.StringPtrOutput)
}
// The Shared Access Signature of the Storage Account. Conflicts with `accountKey`.
func (o DatastoreFileshareOutput) SharedAccessSignature() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringPtrOutput { return v.SharedAccessSignature }).(pulumi.StringPtrOutput)
}
// The ID of the Storage Account File Share. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreFileshareOutput) StorageFileshareId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringOutput { return v.StorageFileshareId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Machine Learning DataStore. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreFileshareOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning DataStore to be created.
func (o DatastoreFileshareOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *DatastoreFileshare) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type DatastoreFileshareArrayOutput struct{ *pulumi.OutputState }
func (DatastoreFileshareArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatastoreFileshare)(nil)).Elem()
}
func (o DatastoreFileshareArrayOutput) ToDatastoreFileshareArrayOutput() DatastoreFileshareArrayOutput {
return o
}
func (o DatastoreFileshareArrayOutput) ToDatastoreFileshareArrayOutputWithContext(ctx context.Context) DatastoreFileshareArrayOutput {
return o
}
func (o DatastoreFileshareArrayOutput) Index(i pulumi.IntInput) DatastoreFileshareOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatastoreFileshare {
return vs[0].([]*DatastoreFileshare)[vs[1].(int)]
}).(DatastoreFileshareOutput)
}
type DatastoreFileshareMapOutput struct{ *pulumi.OutputState }
func (DatastoreFileshareMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatastoreFileshare)(nil)).Elem()
}
func (o DatastoreFileshareMapOutput) ToDatastoreFileshareMapOutput() DatastoreFileshareMapOutput {
return o
}
func (o DatastoreFileshareMapOutput) ToDatastoreFileshareMapOutputWithContext(ctx context.Context) DatastoreFileshareMapOutput {
return o
}
func (o DatastoreFileshareMapOutput) MapIndex(k pulumi.StringInput) DatastoreFileshareOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatastoreFileshare {
return vs[0].(map[string]*DatastoreFileshare)[vs[1].(string)]
}).(DatastoreFileshareOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreFileshareInput)(nil)).Elem(), &DatastoreFileshare{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreFileshareArrayInput)(nil)).Elem(), DatastoreFileshareArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatastoreFileshareMapInput)(nil)).Elem(), DatastoreFileshareMap{})
pulumi.RegisterOutputType(DatastoreFileshareOutput{})
pulumi.RegisterOutputType(DatastoreFileshareArrayOutput{})
pulumi.RegisterOutputType(DatastoreFileshareMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/inferenceCluster.go | sdk/go/azure/machinelearning/inferenceCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning Inference Cluster.
//
// > **Note:** The Machine Learning Inference Cluster resource is used to attach an existing AKS cluster to the Machine Learning Workspace, it doesn't create the AKS cluster itself. Therefore it can only be created and deleted, not updated. Any change to the configuration will recreate the resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("west europe"),
// Tags: pulumi.StringMap{
// "stage": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-kv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-mlw"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.1.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleKubernetesCluster, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
// Name: pulumi.String("example-aks"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// DnsPrefixPrivateCluster: pulumi.String("prefix"),
// DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
// Name: pulumi.String("default"),
// NodeCount: pulumi.Int(3),
// VmSize: pulumi.String("Standard_D3_v2"),
// VnetSubnetId: exampleSubnet.ID(),
// },
// Identity: &containerservice.KubernetesClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewInferenceCluster(ctx, "example", &machinelearning.InferenceClusterArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ClusterPurpose: pulumi.String("FastProd"),
// KubernetesClusterId: exampleKubernetesCluster.ID(),
// Description: pulumi.String("This is an example cluster used with Terraform"),
// MachineLearningWorkspaceId: exampleWorkspace.ID(),
// Tags: pulumi.StringMap{
// "stage": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ContainerService` - 2025-07-01
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Inference Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/inferenceCluster:InferenceCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/cluster1
// ```
type InferenceCluster struct {
pulumi.CustomResourceState
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
ClusterPurpose pulumi.StringPtrOutput `pulumi:"clusterPurpose"`
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Identity InferenceClusterIdentityPtrOutput `pulumi:"identity"`
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
KubernetesClusterId pulumi.StringOutput `pulumi:"kubernetesClusterId"`
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
MachineLearningWorkspaceId pulumi.StringOutput `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Ssl InferenceClusterSslPtrOutput `pulumi:"ssl"`
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewInferenceCluster registers a new resource with the given unique name, arguments, and options.
func NewInferenceCluster(ctx *pulumi.Context,
name string, args *InferenceClusterArgs, opts ...pulumi.ResourceOption) (*InferenceCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KubernetesClusterId == nil {
return nil, errors.New("invalid value for required argument 'KubernetesClusterId'")
}
if args.MachineLearningWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'MachineLearningWorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InferenceCluster
err := ctx.RegisterResource("azure:machinelearning/inferenceCluster:InferenceCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInferenceCluster gets an existing InferenceCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetInferenceCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InferenceClusterState, opts ...pulumi.ResourceOption) (*InferenceCluster, error) {
var resource InferenceCluster
err := ctx.ReadResource("azure:machinelearning/inferenceCluster:InferenceCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InferenceCluster resources.
type inferenceClusterState struct {
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
ClusterPurpose *string `pulumi:"clusterPurpose"`
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Identity *InferenceClusterIdentity `pulumi:"identity"`
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
KubernetesClusterId *string `pulumi:"kubernetesClusterId"`
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
MachineLearningWorkspaceId *string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Name *string `pulumi:"name"`
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Ssl *InferenceClusterSsl `pulumi:"ssl"`
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Tags map[string]string `pulumi:"tags"`
}
type InferenceClusterState struct {
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
ClusterPurpose pulumi.StringPtrInput
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Identity InferenceClusterIdentityPtrInput
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
KubernetesClusterId pulumi.StringPtrInput
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
MachineLearningWorkspaceId pulumi.StringPtrInput
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Name pulumi.StringPtrInput
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Ssl InferenceClusterSslPtrInput
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Tags pulumi.StringMapInput
}
func (InferenceClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*inferenceClusterState)(nil)).Elem()
}
type inferenceClusterArgs struct {
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
ClusterPurpose *string `pulumi:"clusterPurpose"`
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Identity *InferenceClusterIdentity `pulumi:"identity"`
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
KubernetesClusterId string `pulumi:"kubernetesClusterId"`
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
MachineLearningWorkspaceId string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Name *string `pulumi:"name"`
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Ssl *InferenceClusterSsl `pulumi:"ssl"`
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a InferenceCluster resource.
type InferenceClusterArgs struct {
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
ClusterPurpose pulumi.StringPtrInput
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Identity InferenceClusterIdentityPtrInput
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
KubernetesClusterId pulumi.StringInput
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
MachineLearningWorkspaceId pulumi.StringInput
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Name pulumi.StringPtrInput
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
Ssl InferenceClusterSslPtrInput
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
Tags pulumi.StringMapInput
}
func (InferenceClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*inferenceClusterArgs)(nil)).Elem()
}
type InferenceClusterInput interface {
pulumi.Input
ToInferenceClusterOutput() InferenceClusterOutput
ToInferenceClusterOutputWithContext(ctx context.Context) InferenceClusterOutput
}
func (*InferenceCluster) ElementType() reflect.Type {
return reflect.TypeOf((**InferenceCluster)(nil)).Elem()
}
func (i *InferenceCluster) ToInferenceClusterOutput() InferenceClusterOutput {
return i.ToInferenceClusterOutputWithContext(context.Background())
}
func (i *InferenceCluster) ToInferenceClusterOutputWithContext(ctx context.Context) InferenceClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(InferenceClusterOutput)
}
// InferenceClusterArrayInput is an input type that accepts InferenceClusterArray and InferenceClusterArrayOutput values.
// You can construct a concrete instance of `InferenceClusterArrayInput` via:
//
// InferenceClusterArray{ InferenceClusterArgs{...} }
type InferenceClusterArrayInput interface {
pulumi.Input
ToInferenceClusterArrayOutput() InferenceClusterArrayOutput
ToInferenceClusterArrayOutputWithContext(context.Context) InferenceClusterArrayOutput
}
type InferenceClusterArray []InferenceClusterInput
func (InferenceClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InferenceCluster)(nil)).Elem()
}
func (i InferenceClusterArray) ToInferenceClusterArrayOutput() InferenceClusterArrayOutput {
return i.ToInferenceClusterArrayOutputWithContext(context.Background())
}
func (i InferenceClusterArray) ToInferenceClusterArrayOutputWithContext(ctx context.Context) InferenceClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InferenceClusterArrayOutput)
}
// InferenceClusterMapInput is an input type that accepts InferenceClusterMap and InferenceClusterMapOutput values.
// You can construct a concrete instance of `InferenceClusterMapInput` via:
//
// InferenceClusterMap{ "key": InferenceClusterArgs{...} }
type InferenceClusterMapInput interface {
pulumi.Input
ToInferenceClusterMapOutput() InferenceClusterMapOutput
ToInferenceClusterMapOutputWithContext(context.Context) InferenceClusterMapOutput
}
type InferenceClusterMap map[string]InferenceClusterInput
func (InferenceClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InferenceCluster)(nil)).Elem()
}
func (i InferenceClusterMap) ToInferenceClusterMapOutput() InferenceClusterMapOutput {
return i.ToInferenceClusterMapOutputWithContext(context.Background())
}
func (i InferenceClusterMap) ToInferenceClusterMapOutputWithContext(ctx context.Context) InferenceClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InferenceClusterMapOutput)
}
type InferenceClusterOutput struct{ *pulumi.OutputState }
func (InferenceClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InferenceCluster)(nil)).Elem()
}
func (o InferenceClusterOutput) ToInferenceClusterOutput() InferenceClusterOutput {
return o
}
func (o InferenceClusterOutput) ToInferenceClusterOutputWithContext(ctx context.Context) InferenceClusterOutput {
return o
}
// The purpose of the Inference Cluster. Options are `DevTest`, `DenseProd` and `FastProd`. If used for Development or Testing, use `DevTest` here. Default purpose is `FastProd`, which is recommended for production workloads. Changing this forces a new Machine Learning Inference Cluster to be created.
//
// > **Note:** When creating or attaching a cluster, if the cluster will be used for production (`clusterPurpose = "FastProd"`), then it must contain at least 12 virtual CPUs. The number of virtual CPUs can be calculated by multiplying the number of nodes in the cluster by the number of cores provided by the VM size selected. For example, if you use a VM size of "Standard_D3_v2", which has 4 virtual cores, then you should select 3 or greater as the number of nodes.
func (o InferenceClusterOutput) ClusterPurpose() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringPtrOutput { return v.ClusterPurpose }).(pulumi.StringPtrOutput)
}
// The description of the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// An `identity` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Identity() InferenceClusterIdentityPtrOutput {
return o.ApplyT(func(v *InferenceCluster) InferenceClusterIdentityPtrOutput { return v.Identity }).(InferenceClusterIdentityPtrOutput)
}
// The ID of the Kubernetes Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) KubernetesClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringOutput { return v.KubernetesClusterId }).(pulumi.StringOutput)
}
// The Azure Region where the Machine Learning Inference Cluster should exist. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) MachineLearningWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringOutput { return v.MachineLearningWorkspaceId }).(pulumi.StringOutput)
}
// The name which should be used for this Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `ssl` block as defined below. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Ssl() InferenceClusterSslPtrOutput {
return o.ApplyT(func(v *InferenceCluster) InferenceClusterSslPtrOutput { return v.Ssl }).(InferenceClusterSslPtrOutput)
}
// A mapping of tags which should be assigned to the Machine Learning Inference Cluster. Changing this forces a new Machine Learning Inference Cluster to be created.
func (o InferenceClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *InferenceCluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type InferenceClusterArrayOutput struct{ *pulumi.OutputState }
func (InferenceClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InferenceCluster)(nil)).Elem()
}
func (o InferenceClusterArrayOutput) ToInferenceClusterArrayOutput() InferenceClusterArrayOutput {
return o
}
func (o InferenceClusterArrayOutput) ToInferenceClusterArrayOutputWithContext(ctx context.Context) InferenceClusterArrayOutput {
return o
}
func (o InferenceClusterArrayOutput) Index(i pulumi.IntInput) InferenceClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InferenceCluster {
return vs[0].([]*InferenceCluster)[vs[1].(int)]
}).(InferenceClusterOutput)
}
type InferenceClusterMapOutput struct{ *pulumi.OutputState }
func (InferenceClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InferenceCluster)(nil)).Elem()
}
func (o InferenceClusterMapOutput) ToInferenceClusterMapOutput() InferenceClusterMapOutput {
return o
}
func (o InferenceClusterMapOutput) ToInferenceClusterMapOutputWithContext(ctx context.Context) InferenceClusterMapOutput {
return o
}
func (o InferenceClusterMapOutput) MapIndex(k pulumi.StringInput) InferenceClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InferenceCluster {
return vs[0].(map[string]*InferenceCluster)[vs[1].(string)]
}).(InferenceClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InferenceClusterInput)(nil)).Elem(), &InferenceCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*InferenceClusterArrayInput)(nil)).Elem(), InferenceClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InferenceClusterMapInput)(nil)).Elem(), InferenceClusterMap{})
pulumi.RegisterOutputType(InferenceClusterOutput{})
pulumi.RegisterOutputType(InferenceClusterArrayOutput{})
pulumi.RegisterOutputType(InferenceClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/computeCluster.go | sdk/go/azure/machinelearning/computeCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Machine Learning Compute Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("west europe"),
// Tags: pulumi.StringMap{
// "stage": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-kv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-mlw"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.1.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewComputeCluster(ctx, "test", &machinelearning.ComputeClusterArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// VmPriority: pulumi.String("LowPriority"),
// VmSize: pulumi.String("Standard_DS2_v2"),
// MachineLearningWorkspaceId: exampleWorkspace.ID(),
// SubnetResourceId: exampleSubnet.ID(),
// ScaleSettings: &machinelearning.ComputeClusterScaleSettingsArgs{
// MinNodeCount: pulumi.Int(0),
// MaxNodeCount: pulumi.Int(1),
// ScaleDownNodesAfterIdleDuration: pulumi.String("PT30S"),
// },
// Identity: &machinelearning.ComputeClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Compute Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/computeCluster:ComputeCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/cluster1
// ```
type ComputeCluster struct {
pulumi.CustomResourceState
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An `identity` block as defined below.
Identity ComputeClusterIdentityPtrOutput `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
MachineLearningWorkspaceId pulumi.StringOutput `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
NodePublicIpEnabled pulumi.BoolPtrOutput `pulumi:"nodePublicIpEnabled"`
// A `scaleSettings` block as defined below.
ScaleSettings ComputeClusterScaleSettingsOutput `pulumi:"scaleSettings"`
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
Ssh ComputeClusterSshPtrOutput `pulumi:"ssh"`
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
SshPublicAccessEnabled pulumi.BoolPtrOutput `pulumi:"sshPublicAccessEnabled"`
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
SubnetResourceId pulumi.StringOutput `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
VmPriority pulumi.StringOutput `pulumi:"vmPriority"`
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
VmSize pulumi.StringOutput `pulumi:"vmSize"`
}
// NewComputeCluster registers a new resource with the given unique name, arguments, and options.
func NewComputeCluster(ctx *pulumi.Context,
name string, args *ComputeClusterArgs, opts ...pulumi.ResourceOption) (*ComputeCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MachineLearningWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'MachineLearningWorkspaceId'")
}
if args.ScaleSettings == nil {
return nil, errors.New("invalid value for required argument 'ScaleSettings'")
}
if args.VmPriority == nil {
return nil, errors.New("invalid value for required argument 'VmPriority'")
}
if args.VmSize == nil {
return nil, errors.New("invalid value for required argument 'VmSize'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ComputeCluster
err := ctx.RegisterResource("azure:machinelearning/computeCluster:ComputeCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetComputeCluster gets an existing ComputeCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetComputeCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ComputeClusterState, opts ...pulumi.ResourceOption) (*ComputeCluster, error) {
var resource ComputeCluster
err := ctx.ReadResource("azure:machinelearning/computeCluster:ComputeCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ComputeCluster resources.
type computeClusterState struct {
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below.
Identity *ComputeClusterIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
MachineLearningWorkspaceId *string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
Name *string `pulumi:"name"`
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
NodePublicIpEnabled *bool `pulumi:"nodePublicIpEnabled"`
// A `scaleSettings` block as defined below.
ScaleSettings *ComputeClusterScaleSettings `pulumi:"scaleSettings"`
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
Ssh *ComputeClusterSsh `pulumi:"ssh"`
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
SshPublicAccessEnabled *bool `pulumi:"sshPublicAccessEnabled"`
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
SubnetResourceId *string `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
Tags map[string]string `pulumi:"tags"`
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
VmPriority *string `pulumi:"vmPriority"`
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
VmSize *string `pulumi:"vmSize"`
}
type ComputeClusterState struct {
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ComputeClusterIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
MachineLearningWorkspaceId pulumi.StringPtrInput
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
Name pulumi.StringPtrInput
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
NodePublicIpEnabled pulumi.BoolPtrInput
// A `scaleSettings` block as defined below.
ScaleSettings ComputeClusterScaleSettingsPtrInput
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
Ssh ComputeClusterSshPtrInput
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
SshPublicAccessEnabled pulumi.BoolPtrInput
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
SubnetResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
Tags pulumi.StringMapInput
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
VmPriority pulumi.StringPtrInput
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
VmSize pulumi.StringPtrInput
}
func (ComputeClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*computeClusterState)(nil)).Elem()
}
type computeClusterArgs struct {
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below.
Identity *ComputeClusterIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
MachineLearningWorkspaceId string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
Name *string `pulumi:"name"`
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
NodePublicIpEnabled *bool `pulumi:"nodePublicIpEnabled"`
// A `scaleSettings` block as defined below.
ScaleSettings ComputeClusterScaleSettings `pulumi:"scaleSettings"`
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
Ssh *ComputeClusterSsh `pulumi:"ssh"`
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
SshPublicAccessEnabled *bool `pulumi:"sshPublicAccessEnabled"`
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
SubnetResourceId *string `pulumi:"subnetResourceId"`
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
Tags map[string]string `pulumi:"tags"`
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
VmPriority string `pulumi:"vmPriority"`
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
VmSize string `pulumi:"vmSize"`
}
// The set of arguments for constructing a ComputeCluster resource.
type ComputeClusterArgs struct {
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ComputeClusterIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
MachineLearningWorkspaceId pulumi.StringInput
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
Name pulumi.StringPtrInput
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
NodePublicIpEnabled pulumi.BoolPtrInput
// A `scaleSettings` block as defined below.
ScaleSettings ComputeClusterScaleSettingsInput
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
Ssh ComputeClusterSshPtrInput
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
SshPublicAccessEnabled pulumi.BoolPtrInput
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
SubnetResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
Tags pulumi.StringMapInput
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
VmPriority pulumi.StringInput
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
VmSize pulumi.StringInput
}
func (ComputeClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*computeClusterArgs)(nil)).Elem()
}
type ComputeClusterInput interface {
pulumi.Input
ToComputeClusterOutput() ComputeClusterOutput
ToComputeClusterOutputWithContext(ctx context.Context) ComputeClusterOutput
}
func (*ComputeCluster) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeCluster)(nil)).Elem()
}
func (i *ComputeCluster) ToComputeClusterOutput() ComputeClusterOutput {
return i.ToComputeClusterOutputWithContext(context.Background())
}
func (i *ComputeCluster) ToComputeClusterOutputWithContext(ctx context.Context) ComputeClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterOutput)
}
// ComputeClusterArrayInput is an input type that accepts ComputeClusterArray and ComputeClusterArrayOutput values.
// You can construct a concrete instance of `ComputeClusterArrayInput` via:
//
// ComputeClusterArray{ ComputeClusterArgs{...} }
type ComputeClusterArrayInput interface {
pulumi.Input
ToComputeClusterArrayOutput() ComputeClusterArrayOutput
ToComputeClusterArrayOutputWithContext(context.Context) ComputeClusterArrayOutput
}
type ComputeClusterArray []ComputeClusterInput
func (ComputeClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ComputeCluster)(nil)).Elem()
}
func (i ComputeClusterArray) ToComputeClusterArrayOutput() ComputeClusterArrayOutput {
return i.ToComputeClusterArrayOutputWithContext(context.Background())
}
func (i ComputeClusterArray) ToComputeClusterArrayOutputWithContext(ctx context.Context) ComputeClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterArrayOutput)
}
// ComputeClusterMapInput is an input type that accepts ComputeClusterMap and ComputeClusterMapOutput values.
// You can construct a concrete instance of `ComputeClusterMapInput` via:
//
// ComputeClusterMap{ "key": ComputeClusterArgs{...} }
type ComputeClusterMapInput interface {
pulumi.Input
ToComputeClusterMapOutput() ComputeClusterMapOutput
ToComputeClusterMapOutputWithContext(context.Context) ComputeClusterMapOutput
}
type ComputeClusterMap map[string]ComputeClusterInput
func (ComputeClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ComputeCluster)(nil)).Elem()
}
func (i ComputeClusterMap) ToComputeClusterMapOutput() ComputeClusterMapOutput {
return i.ToComputeClusterMapOutputWithContext(context.Background())
}
func (i ComputeClusterMap) ToComputeClusterMapOutputWithContext(ctx context.Context) ComputeClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ComputeClusterMapOutput)
}
type ComputeClusterOutput struct{ *pulumi.OutputState }
func (ComputeClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ComputeCluster)(nil)).Elem()
}
func (o ComputeClusterOutput) ToComputeClusterOutput() ComputeClusterOutput {
return o
}
func (o ComputeClusterOutput) ToComputeClusterOutputWithContext(ctx context.Context) ComputeClusterOutput {
return o
}
// The description of the Machine Learning compute. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// An `identity` block as defined below.
func (o ComputeClusterOutput) Identity() ComputeClusterIdentityPtrOutput {
return o.ApplyT(func(v *ComputeCluster) ComputeClusterIdentityPtrOutput { return v.Identity }).(ComputeClusterIdentityPtrOutput)
}
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// The Azure Region where the Machine Learning Compute Cluster should exist. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) MachineLearningWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.MachineLearningWorkspaceId }).(pulumi.StringOutput)
}
// The name which should be used for this Machine Learning Compute Cluster. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether the compute cluster will have a public ip. Defaults to `true`. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) NodePublicIpEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.BoolPtrOutput { return v.NodePublicIpEnabled }).(pulumi.BoolPtrOutput)
}
// A `scaleSettings` block as defined below.
func (o ComputeClusterOutput) ScaleSettings() ComputeClusterScaleSettingsOutput {
return o.ApplyT(func(v *ComputeCluster) ComputeClusterScaleSettingsOutput { return v.ScaleSettings }).(ComputeClusterScaleSettingsOutput)
}
// Credentials for an administrator user account that will be created on each compute node. A `ssh` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) Ssh() ComputeClusterSshPtrOutput {
return o.ApplyT(func(v *ComputeCluster) ComputeClusterSshPtrOutput { return v.Ssh }).(ComputeClusterSshPtrOutput)
}
// A boolean value indicating whether enable the public SSH port. Defaults to `false`. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) SshPublicAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.BoolPtrOutput { return v.SshPublicAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Subnet that the Compute Cluster should reside in. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) SubnetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.SubnetResourceId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Machine Learning Compute Cluster.
func (o ComputeClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. Accepted values are `Dedicated` and `LowPriority`.
func (o ComputeClusterOutput) VmPriority() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.VmPriority }).(pulumi.StringOutput)
}
// The size of the VM. Changing this forces a new Machine Learning Compute Cluster to be created.
func (o ComputeClusterOutput) VmSize() pulumi.StringOutput {
return o.ApplyT(func(v *ComputeCluster) pulumi.StringOutput { return v.VmSize }).(pulumi.StringOutput)
}
type ComputeClusterArrayOutput struct{ *pulumi.OutputState }
func (ComputeClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ComputeCluster)(nil)).Elem()
}
func (o ComputeClusterArrayOutput) ToComputeClusterArrayOutput() ComputeClusterArrayOutput {
return o
}
func (o ComputeClusterArrayOutput) ToComputeClusterArrayOutputWithContext(ctx context.Context) ComputeClusterArrayOutput {
return o
}
func (o ComputeClusterArrayOutput) Index(i pulumi.IntInput) ComputeClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ComputeCluster {
return vs[0].([]*ComputeCluster)[vs[1].(int)]
}).(ComputeClusterOutput)
}
type ComputeClusterMapOutput struct{ *pulumi.OutputState }
func (ComputeClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ComputeCluster)(nil)).Elem()
}
func (o ComputeClusterMapOutput) ToComputeClusterMapOutput() ComputeClusterMapOutput {
return o
}
func (o ComputeClusterMapOutput) ToComputeClusterMapOutputWithContext(ctx context.Context) ComputeClusterMapOutput {
return o
}
func (o ComputeClusterMapOutput) MapIndex(k pulumi.StringInput) ComputeClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ComputeCluster {
return vs[0].(map[string]*ComputeCluster)[vs[1].(string)]
}).(ComputeClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ComputeClusterInput)(nil)).Elem(), &ComputeCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ComputeClusterArrayInput)(nil)).Elem(), ComputeClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ComputeClusterMapInput)(nil)).Elem(), ComputeClusterMap{})
pulumi.RegisterOutputType(ComputeClusterOutput{})
pulumi.RegisterOutputType(ComputeClusterArrayOutput{})
pulumi.RegisterOutputType(ComputeClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/workspaceNetworkOutboundRuleServiceTag.go | sdk/go/azure/machinelearning/workspaceNetworkOutboundRuleServiceTag.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Machine Learning Workspace Network Outbound Rule Service Tag.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// ManagedNetwork: &machinelearning.WorkspaceManagedNetworkArgs{
// IsolationMode: pulumi.String("AllowOnlyApprovedOutbound"),
// },
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewWorkspaceNetworkOutboundRuleServiceTag(ctx, "example", &machinelearning.WorkspaceNetworkOutboundRuleServiceTagArgs{
// Name: pulumi.String("example-outboundrule"),
// WorkspaceId: exampleWorkspace.ID(),
// ServiceTag: pulumi.String("AppService"),
// Protocol: pulumi.String("TCP"),
// PortRanges: pulumi.String("443"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Workspace Network Outbound Rule Service Tag can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/workspaceNetworkOutboundRuleServiceTag:WorkspaceNetworkOutboundRuleServiceTag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/outboundRules/rule1
// ```
type WorkspaceNetworkOutboundRuleServiceTag struct {
pulumi.CustomResourceState
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
PortRanges pulumi.StringOutput `pulumi:"portRanges"`
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
Protocol pulumi.StringOutput `pulumi:"protocol"`
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
ServiceTag pulumi.StringOutput `pulumi:"serviceTag"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceNetworkOutboundRuleServiceTag registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceNetworkOutboundRuleServiceTag(ctx *pulumi.Context,
name string, args *WorkspaceNetworkOutboundRuleServiceTagArgs, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRuleServiceTag, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PortRanges == nil {
return nil, errors.New("invalid value for required argument 'PortRanges'")
}
if args.Protocol == nil {
return nil, errors.New("invalid value for required argument 'Protocol'")
}
if args.ServiceTag == nil {
return nil, errors.New("invalid value for required argument 'ServiceTag'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceNetworkOutboundRuleServiceTag
err := ctx.RegisterResource("azure:machinelearning/workspaceNetworkOutboundRuleServiceTag:WorkspaceNetworkOutboundRuleServiceTag", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceNetworkOutboundRuleServiceTag gets an existing WorkspaceNetworkOutboundRuleServiceTag resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceNetworkOutboundRuleServiceTag(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceNetworkOutboundRuleServiceTagState, opts ...pulumi.ResourceOption) (*WorkspaceNetworkOutboundRuleServiceTag, error) {
var resource WorkspaceNetworkOutboundRuleServiceTag
err := ctx.ReadResource("azure:machinelearning/workspaceNetworkOutboundRuleServiceTag:WorkspaceNetworkOutboundRuleServiceTag", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceNetworkOutboundRuleServiceTag resources.
type workspaceNetworkOutboundRuleServiceTagState struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
PortRanges *string `pulumi:"portRanges"`
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
Protocol *string `pulumi:"protocol"`
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
ServiceTag *string `pulumi:"serviceTag"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceNetworkOutboundRuleServiceTagState struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
PortRanges pulumi.StringPtrInput
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
Protocol pulumi.StringPtrInput
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
ServiceTag pulumi.StringPtrInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceNetworkOutboundRuleServiceTagState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRuleServiceTagState)(nil)).Elem()
}
type workspaceNetworkOutboundRuleServiceTagArgs struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
PortRanges string `pulumi:"portRanges"`
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
Protocol string `pulumi:"protocol"`
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
ServiceTag string `pulumi:"serviceTag"`
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceNetworkOutboundRuleServiceTag resource.
type WorkspaceNetworkOutboundRuleServiceTagArgs struct {
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
PortRanges pulumi.StringInput
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
Protocol pulumi.StringInput
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
ServiceTag pulumi.StringInput
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringInput
}
func (WorkspaceNetworkOutboundRuleServiceTagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceNetworkOutboundRuleServiceTagArgs)(nil)).Elem()
}
type WorkspaceNetworkOutboundRuleServiceTagInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleServiceTagOutput() WorkspaceNetworkOutboundRuleServiceTagOutput
ToWorkspaceNetworkOutboundRuleServiceTagOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagOutput
}
func (*WorkspaceNetworkOutboundRuleServiceTag) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (i *WorkspaceNetworkOutboundRuleServiceTag) ToWorkspaceNetworkOutboundRuleServiceTagOutput() WorkspaceNetworkOutboundRuleServiceTagOutput {
return i.ToWorkspaceNetworkOutboundRuleServiceTagOutputWithContext(context.Background())
}
func (i *WorkspaceNetworkOutboundRuleServiceTag) ToWorkspaceNetworkOutboundRuleServiceTagOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleServiceTagOutput)
}
// WorkspaceNetworkOutboundRuleServiceTagArrayInput is an input type that accepts WorkspaceNetworkOutboundRuleServiceTagArray and WorkspaceNetworkOutboundRuleServiceTagArrayOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRuleServiceTagArrayInput` via:
//
// WorkspaceNetworkOutboundRuleServiceTagArray{ WorkspaceNetworkOutboundRuleServiceTagArgs{...} }
type WorkspaceNetworkOutboundRuleServiceTagArrayInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleServiceTagArrayOutput() WorkspaceNetworkOutboundRuleServiceTagArrayOutput
ToWorkspaceNetworkOutboundRuleServiceTagArrayOutputWithContext(context.Context) WorkspaceNetworkOutboundRuleServiceTagArrayOutput
}
type WorkspaceNetworkOutboundRuleServiceTagArray []WorkspaceNetworkOutboundRuleServiceTagInput
func (WorkspaceNetworkOutboundRuleServiceTagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRuleServiceTagArray) ToWorkspaceNetworkOutboundRuleServiceTagArrayOutput() WorkspaceNetworkOutboundRuleServiceTagArrayOutput {
return i.ToWorkspaceNetworkOutboundRuleServiceTagArrayOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRuleServiceTagArray) ToWorkspaceNetworkOutboundRuleServiceTagArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleServiceTagArrayOutput)
}
// WorkspaceNetworkOutboundRuleServiceTagMapInput is an input type that accepts WorkspaceNetworkOutboundRuleServiceTagMap and WorkspaceNetworkOutboundRuleServiceTagMapOutput values.
// You can construct a concrete instance of `WorkspaceNetworkOutboundRuleServiceTagMapInput` via:
//
// WorkspaceNetworkOutboundRuleServiceTagMap{ "key": WorkspaceNetworkOutboundRuleServiceTagArgs{...} }
type WorkspaceNetworkOutboundRuleServiceTagMapInput interface {
pulumi.Input
ToWorkspaceNetworkOutboundRuleServiceTagMapOutput() WorkspaceNetworkOutboundRuleServiceTagMapOutput
ToWorkspaceNetworkOutboundRuleServiceTagMapOutputWithContext(context.Context) WorkspaceNetworkOutboundRuleServiceTagMapOutput
}
type WorkspaceNetworkOutboundRuleServiceTagMap map[string]WorkspaceNetworkOutboundRuleServiceTagInput
func (WorkspaceNetworkOutboundRuleServiceTagMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (i WorkspaceNetworkOutboundRuleServiceTagMap) ToWorkspaceNetworkOutboundRuleServiceTagMapOutput() WorkspaceNetworkOutboundRuleServiceTagMapOutput {
return i.ToWorkspaceNetworkOutboundRuleServiceTagMapOutputWithContext(context.Background())
}
func (i WorkspaceNetworkOutboundRuleServiceTagMap) ToWorkspaceNetworkOutboundRuleServiceTagMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceNetworkOutboundRuleServiceTagMapOutput)
}
type WorkspaceNetworkOutboundRuleServiceTagOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleServiceTagOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) ToWorkspaceNetworkOutboundRuleServiceTagOutput() WorkspaceNetworkOutboundRuleServiceTagOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) ToWorkspaceNetworkOutboundRuleServiceTagOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagOutput {
return o
}
// Specifies the name of the Machine Learning Workspace Network Outbound Rule Service Tag. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleServiceTag) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies which ports traffic will be allowed by this rule. You can specify a single port (e.g. ` 80 `) , a port range (e.g. `1024-655535`) or a comma-separated list of single ports and/or port ranges(e.g. `80,1024-655535`). `*` can be used to allow traffic on any port.
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) PortRanges() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleServiceTag) pulumi.StringOutput { return v.PortRanges }).(pulumi.StringOutput)
}
// Specifies the network protocol. Possible values are `*`, `TCP`, `UDP` and `ICMP`
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleServiceTag) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
}
// Specifies the fully qualified domain name to allow for outbound traffic. Possible values are `AppConfiguration`,`AppService`,`AzureActiveDirectory`,`AzureAdvancedThreatProtection`,`AzureArcInfrastructure`,`AzureAttestation`,`AzureBackup`,`AzureBotService`,`AzureContainerRegistry`,`AzureCosmosDB`,`AzureDataLake`,`AzureDevSpaces`,`AzureInformationProtection`,`AzureIoTHub`,`AzureKeyVault`,`AzureManagedGrafana`,`AzureMonitor`,`AzureOpenDatasets`,`AzurePlatformDNS`,`AzurePlatformIMDS`,`AzurePlatformLKM`,`AzureResourceManager`,`AzureSignalR`,`AzureSiteRecovery`,`AzureSpringCloud`,`AzureStack`,`AzureUpdateDelivery`,`DataFactoryManagement`,`EventHub`,`GuestAndHybridManagement`,`M365ManagementActivityApi`,`M365ManagementActivityApi`,`MicrosoftAzureFluidRelay`,`MicrosoftCloudAppSecurity`,`MicrosoftContainerRegistry`,`PowerPlatformInfra`,`ServiceBus`,`Sql`,`Storage`,`WindowsAdminCenter`,`AppServiceManagement`,`AutonomousDevelopmentPlatform`,`AzureActiveDirectoryDomainServices`,`AzureCloud`,`AzureConnectors`,`AzureContainerAppsService`,`AzureDatabricks`,`AzureDeviceUpdate`,`AzureEventGrid`,`AzureFrontDoor.Frontend`,`AzureFrontDoor.Backend`,`AzureFrontDoor.FirstParty`,`AzureHealthcareAPIs`,`AzureLoadBalancer`,`AzureMachineLearning`,`AzureSphere`,`AzureWebPubSub`,`BatchNodeManagement`,`ChaosStudio`,`CognitiveServicesFrontend`,`CognitiveServicesManagement`,`DataFactory`,`Dynamics365ForMarketingEmail`,`Dynamics365BusinessCentral`,`EOPExternalPublishedIPs`,`Internet`,`LogicApps`,`Marketplace`,`MicrosoftDefenderForEndpoint`,`PowerBI`,`PowerQueryOnline`,`ServiceFabric`,`SqlManagement`,`StorageSyncService`,`WindowsVirtualDesktop` and `VirtualNetwork`.
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) ServiceTag() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleServiceTag) pulumi.StringOutput { return v.ServiceTag }).(pulumi.StringOutput)
}
// Specifies the ID of the Machine Learning Workspace. Changing this forces a new resource to be created.
func (o WorkspaceNetworkOutboundRuleServiceTagOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceNetworkOutboundRuleServiceTag) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceNetworkOutboundRuleServiceTagArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleServiceTagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleServiceTagArrayOutput) ToWorkspaceNetworkOutboundRuleServiceTagArrayOutput() WorkspaceNetworkOutboundRuleServiceTagArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleServiceTagArrayOutput) ToWorkspaceNetworkOutboundRuleServiceTagArrayOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagArrayOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleServiceTagArrayOutput) Index(i pulumi.IntInput) WorkspaceNetworkOutboundRuleServiceTagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRuleServiceTag {
return vs[0].([]*WorkspaceNetworkOutboundRuleServiceTag)[vs[1].(int)]
}).(WorkspaceNetworkOutboundRuleServiceTagOutput)
}
type WorkspaceNetworkOutboundRuleServiceTagMapOutput struct{ *pulumi.OutputState }
func (WorkspaceNetworkOutboundRuleServiceTagMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceNetworkOutboundRuleServiceTag)(nil)).Elem()
}
func (o WorkspaceNetworkOutboundRuleServiceTagMapOutput) ToWorkspaceNetworkOutboundRuleServiceTagMapOutput() WorkspaceNetworkOutboundRuleServiceTagMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleServiceTagMapOutput) ToWorkspaceNetworkOutboundRuleServiceTagMapOutputWithContext(ctx context.Context) WorkspaceNetworkOutboundRuleServiceTagMapOutput {
return o
}
func (o WorkspaceNetworkOutboundRuleServiceTagMapOutput) MapIndex(k pulumi.StringInput) WorkspaceNetworkOutboundRuleServiceTagOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceNetworkOutboundRuleServiceTag {
return vs[0].(map[string]*WorkspaceNetworkOutboundRuleServiceTag)[vs[1].(string)]
}).(WorkspaceNetworkOutboundRuleServiceTagOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleServiceTagInput)(nil)).Elem(), &WorkspaceNetworkOutboundRuleServiceTag{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleServiceTagArrayInput)(nil)).Elem(), WorkspaceNetworkOutboundRuleServiceTagArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceNetworkOutboundRuleServiceTagMapInput)(nil)).Elem(), WorkspaceNetworkOutboundRuleServiceTagMap{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleServiceTagOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleServiceTagArrayOutput{})
pulumi.RegisterOutputType(WorkspaceNetworkOutboundRuleServiceTagMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/workspace.go | sdk/go/azure/machinelearning/workspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Data Encryption
//
// > **Note:** The Key Vault must enable purge protection.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("workspace-example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("workspaceexamplekeyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccessPolicy, err := keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("Delete"),
// pulumi.String("Purge"),
// pulumi.String("GetRotationPolicy"),
// },
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("workspacestorageaccount"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("workspaceexamplekeyvaultkey"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// exampleAccessPolicy,
// }))
// if err != nil {
// return err
// }
// _, err = machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Encryption: &machinelearning.WorkspaceEncryptionArgs{
// KeyVaultId: exampleKeyVault.ID(),
// KeyId: exampleKey.ID(),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Machine Learning Workspace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/workspace1
// ```
type Workspace struct {
pulumi.CustomResourceState
// The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"`
// The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `adminEnabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace.
ContainerRegistryId pulumi.StringPtrOutput `pulumi:"containerRegistryId"`
// The description of this Machine Learning Workspace.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The url for the discovery service to identify regional endpoints for machine learning experimentation services.
DiscoveryUrl pulumi.StringOutput `pulumi:"discoveryUrl"`
// An `encryption` block as defined below. Changing this forces a new resource to be created.
Encryption WorkspaceEncryptionPtrOutput `pulumi:"encryption"`
// A `featureStore` block as defined below.
FeatureStore WorkspaceFeatureStorePtrOutput `pulumi:"featureStore"`
// Display name for this Machine Learning Workspace.
FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"`
// Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service. Changing this forces a new resource to be created.
HighBusinessImpact pulumi.BoolPtrOutput `pulumi:"highBusinessImpact"`
// An `identity` block as defined below.
Identity WorkspaceIdentityOutput `pulumi:"identity"`
// The compute name for image build of the Machine Learning Workspace.
ImageBuildComputeName pulumi.StringPtrOutput `pulumi:"imageBuildComputeName"`
// The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"`
// The type of the Workspace. Possible values are `Default`, `FeatureStore`. Defaults to `Default`
Kind pulumi.StringPtrOutput `pulumi:"kind"`
// Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A `managedNetwork` block as defined below.
ManagedNetwork WorkspaceManagedNetworkOutput `pulumi:"managedNetwork"`
// Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The user assigned identity id that represents the workspace identity.
PrimaryUserAssignedIdentity pulumi.StringPtrOutput `pulumi:"primaryUserAssignedIdentity"`
// Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`.
//
// > **Note:** `publicAccessBehindVirtualNetworkEnabled` is deprecated and will be removed in favour of the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `serverlessCompute` block as defined below.
ServerlessCompute WorkspaceServerlessComputePtrOutput `pulumi:"serverlessCompute"`
// Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created.
//
// !> **Note:** Setting `serviceSideEncryptionEnabled` requires the `encryption` block to be set. When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
ServiceSideEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"serviceSideEncryptionEnabled"`
// SKU/edition of the Machine Learning Workspace, possible values are `Free`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`.
SkuName pulumi.StringPtrOutput `pulumi:"skuName"`
// The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `accountTier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Enable V1 API features, enabling `v1LegacyMode` may prevent you from using features provided by the v2 API. Defaults to `false`.
V1LegacyModeEnabled pulumi.BoolPtrOutput `pulumi:"v1LegacyModeEnabled"`
// The immutable id associated with this workspace.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspace registers a new resource with the given unique name, arguments, and options.
func NewWorkspace(ctx *pulumi.Context,
name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationInsightsId == nil {
return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.KeyVaultId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Workspace
err := ctx.RegisterResource("azure:machinelearning/workspace:Workspace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspace gets an existing Workspace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) {
var resource Workspace
err := ctx.ReadResource("azure:machinelearning/workspace:Workspace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Workspace resources.
type workspaceState struct {
// The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
ApplicationInsightsId *string `pulumi:"applicationInsightsId"`
// The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `adminEnabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace.
ContainerRegistryId *string `pulumi:"containerRegistryId"`
// The description of this Machine Learning Workspace.
Description *string `pulumi:"description"`
// The url for the discovery service to identify regional endpoints for machine learning experimentation services.
DiscoveryUrl *string `pulumi:"discoveryUrl"`
// An `encryption` block as defined below. Changing this forces a new resource to be created.
Encryption *WorkspaceEncryption `pulumi:"encryption"`
// A `featureStore` block as defined below.
FeatureStore *WorkspaceFeatureStore `pulumi:"featureStore"`
// Display name for this Machine Learning Workspace.
FriendlyName *string `pulumi:"friendlyName"`
// Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service. Changing this forces a new resource to be created.
HighBusinessImpact *bool `pulumi:"highBusinessImpact"`
// An `identity` block as defined below.
Identity *WorkspaceIdentity `pulumi:"identity"`
// The compute name for image build of the Machine Learning Workspace.
ImageBuildComputeName *string `pulumi:"imageBuildComputeName"`
// The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
KeyVaultId *string `pulumi:"keyVaultId"`
// The type of the Workspace. Possible values are `Default`, `FeatureStore`. Defaults to `Default`
Kind *string `pulumi:"kind"`
// Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `managedNetwork` block as defined below.
ManagedNetwork *WorkspaceManagedNetwork `pulumi:"managedNetwork"`
// Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The user assigned identity id that represents the workspace identity.
PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"`
// Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`.
//
// > **Note:** `publicAccessBehindVirtualNetworkEnabled` is deprecated and will be removed in favour of the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `serverlessCompute` block as defined below.
ServerlessCompute *WorkspaceServerlessCompute `pulumi:"serverlessCompute"`
// Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created.
//
// !> **Note:** Setting `serviceSideEncryptionEnabled` requires the `encryption` block to be set. When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
ServiceSideEncryptionEnabled *bool `pulumi:"serviceSideEncryptionEnabled"`
// SKU/edition of the Machine Learning Workspace, possible values are `Free`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`.
SkuName *string `pulumi:"skuName"`
// The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `accountTier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
StorageAccountId *string `pulumi:"storageAccountId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Enable V1 API features, enabling `v1LegacyMode` may prevent you from using features provided by the v2 API. Defaults to `false`.
V1LegacyModeEnabled *bool `pulumi:"v1LegacyModeEnabled"`
// The immutable id associated with this workspace.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceState struct {
// The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
ApplicationInsightsId pulumi.StringPtrInput
// The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `adminEnabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace.
ContainerRegistryId pulumi.StringPtrInput
// The description of this Machine Learning Workspace.
Description pulumi.StringPtrInput
// The url for the discovery service to identify regional endpoints for machine learning experimentation services.
DiscoveryUrl pulumi.StringPtrInput
// An `encryption` block as defined below. Changing this forces a new resource to be created.
Encryption WorkspaceEncryptionPtrInput
// A `featureStore` block as defined below.
FeatureStore WorkspaceFeatureStorePtrInput
// Display name for this Machine Learning Workspace.
FriendlyName pulumi.StringPtrInput
// Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service. Changing this forces a new resource to be created.
HighBusinessImpact pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity WorkspaceIdentityPtrInput
// The compute name for image build of the Machine Learning Workspace.
ImageBuildComputeName pulumi.StringPtrInput
// The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringPtrInput
// The type of the Workspace. Possible values are `Default`, `FeatureStore`. Defaults to `Default`
Kind pulumi.StringPtrInput
// Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `managedNetwork` block as defined below.
ManagedNetwork WorkspaceManagedNetworkPtrInput
// Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The user assigned identity id that represents the workspace identity.
PrimaryUserAssignedIdentity pulumi.StringPtrInput
// Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`.
//
// > **Note:** `publicAccessBehindVirtualNetworkEnabled` is deprecated and will be removed in favour of the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `serverlessCompute` block as defined below.
ServerlessCompute WorkspaceServerlessComputePtrInput
// Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created.
//
// !> **Note:** Setting `serviceSideEncryptionEnabled` requires the `encryption` block to be set. When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
ServiceSideEncryptionEnabled pulumi.BoolPtrInput
// SKU/edition of the Machine Learning Workspace, possible values are `Free`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`.
SkuName pulumi.StringPtrInput
// The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `accountTier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
StorageAccountId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Enable V1 API features, enabling `v1LegacyMode` may prevent you from using features provided by the v2 API. Defaults to `false`.
V1LegacyModeEnabled pulumi.BoolPtrInput
// The immutable id associated with this workspace.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceState)(nil)).Elem()
}
type workspaceArgs struct {
// The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
ApplicationInsightsId string `pulumi:"applicationInsightsId"`
// The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `adminEnabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace.
ContainerRegistryId *string `pulumi:"containerRegistryId"`
// The description of this Machine Learning Workspace.
Description *string `pulumi:"description"`
// An `encryption` block as defined below. Changing this forces a new resource to be created.
Encryption *WorkspaceEncryption `pulumi:"encryption"`
// A `featureStore` block as defined below.
FeatureStore *WorkspaceFeatureStore `pulumi:"featureStore"`
// Display name for this Machine Learning Workspace.
FriendlyName *string `pulumi:"friendlyName"`
// Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service. Changing this forces a new resource to be created.
HighBusinessImpact *bool `pulumi:"highBusinessImpact"`
// An `identity` block as defined below.
Identity WorkspaceIdentity `pulumi:"identity"`
// The compute name for image build of the Machine Learning Workspace.
ImageBuildComputeName *string `pulumi:"imageBuildComputeName"`
// The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
KeyVaultId string `pulumi:"keyVaultId"`
// The type of the Workspace. Possible values are `Default`, `FeatureStore`. Defaults to `Default`
Kind *string `pulumi:"kind"`
// Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `managedNetwork` block as defined below.
ManagedNetwork *WorkspaceManagedNetwork `pulumi:"managedNetwork"`
// Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The user assigned identity id that represents the workspace identity.
PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"`
// Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`.
//
// > **Note:** `publicAccessBehindVirtualNetworkEnabled` is deprecated and will be removed in favour of the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `serverlessCompute` block as defined below.
ServerlessCompute *WorkspaceServerlessCompute `pulumi:"serverlessCompute"`
// Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created.
//
// !> **Note:** Setting `serviceSideEncryptionEnabled` requires the `encryption` block to be set. When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
ServiceSideEncryptionEnabled *bool `pulumi:"serviceSideEncryptionEnabled"`
// SKU/edition of the Machine Learning Workspace, possible values are `Free`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`.
SkuName *string `pulumi:"skuName"`
// The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `accountTier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
StorageAccountId string `pulumi:"storageAccountId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Enable V1 API features, enabling `v1LegacyMode` may prevent you from using features provided by the v2 API. Defaults to `false`.
V1LegacyModeEnabled *bool `pulumi:"v1LegacyModeEnabled"`
}
// The set of arguments for constructing a Workspace resource.
type WorkspaceArgs struct {
// The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
ApplicationInsightsId pulumi.StringInput
// The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `adminEnabled` should be `true` in order to associate the Container Registry to this Machine Learning Workspace.
ContainerRegistryId pulumi.StringPtrInput
// The description of this Machine Learning Workspace.
Description pulumi.StringPtrInput
// An `encryption` block as defined below. Changing this forces a new resource to be created.
Encryption WorkspaceEncryptionPtrInput
// A `featureStore` block as defined below.
FeatureStore WorkspaceFeatureStorePtrInput
// Display name for this Machine Learning Workspace.
FriendlyName pulumi.StringPtrInput
// Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service. Changing this forces a new resource to be created.
HighBusinessImpact pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity WorkspaceIdentityInput
// The compute name for image build of the Machine Learning Workspace.
ImageBuildComputeName pulumi.StringPtrInput
// The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
KeyVaultId pulumi.StringInput
// The type of the Workspace. Possible values are `Default`, `FeatureStore`. Defaults to `Default`
Kind pulumi.StringPtrInput
// Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `managedNetwork` block as defined below.
ManagedNetwork WorkspaceManagedNetworkPtrInput
// Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The user assigned identity id that represents the workspace identity.
PrimaryUserAssignedIdentity pulumi.StringPtrInput
// Enable public access when this Machine Learning Workspace is behind VNet. Defaults to `true`.
//
// > **Note:** `publicAccessBehindVirtualNetworkEnabled` is deprecated and will be removed in favour of the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `serverlessCompute` block as defined below.
ServerlessCompute WorkspaceServerlessComputePtrInput
// Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created.
//
// !> **Note:** Setting `serviceSideEncryptionEnabled` requires the `encryption` block to be set. When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
ServiceSideEncryptionEnabled pulumi.BoolPtrInput
// SKU/edition of the Machine Learning Workspace, possible values are `Free`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`.
SkuName pulumi.StringPtrInput
// The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
//
// > **Note:** The `accountTier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
StorageAccountId pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Enable V1 API features, enabling `v1LegacyMode` may prevent you from using features provided by the v2 API. Defaults to `false`.
V1LegacyModeEnabled pulumi.BoolPtrInput
}
func (WorkspaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceArgs)(nil)).Elem()
}
type WorkspaceInput interface {
pulumi.Input
ToWorkspaceOutput() WorkspaceOutput
ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput
}
func (*Workspace) ElementType() reflect.Type {
return reflect.TypeOf((**Workspace)(nil)).Elem()
}
func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput {
return i.ToWorkspaceOutputWithContext(context.Background())
}
func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput)
}
// WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values.
// You can construct a concrete instance of `WorkspaceArrayInput` via:
//
// WorkspaceArray{ WorkspaceArgs{...} }
type WorkspaceArrayInput interface {
pulumi.Input
ToWorkspaceArrayOutput() WorkspaceArrayOutput
ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput
}
type WorkspaceArray []WorkspaceInput
func (WorkspaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
}
func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
return i.ToWorkspaceArrayOutputWithContext(context.Background())
}
func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput)
}
// WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values.
// You can construct a concrete instance of `WorkspaceMapInput` via:
//
// WorkspaceMap{ "key": WorkspaceArgs{...} }
type WorkspaceMapInput interface {
pulumi.Input
ToWorkspaceMapOutput() WorkspaceMapOutput
ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput
}
type WorkspaceMap map[string]WorkspaceInput
func (WorkspaceMap) ElementType() reflect.Type {
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/machinelearning/synapseSpark.go | sdk/go/azure/machinelearning/synapseSpark.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package machinelearning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the linked service to link an Azure Machine learning workspace to an Azure Synapse workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/machinelearning"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/synapse"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("west europe"),
// Tags: pulumi.StringMap{
// "stage": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
// Name: pulumi.String("example-ai"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationType: pulumi.String("web"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-kv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleWorkspace, err := machinelearning.NewWorkspace(ctx, "example", &machinelearning.WorkspaceArgs{
// Name: pulumi.String("example-mlw"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ApplicationInsightsId: exampleInsights.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// StorageAccountId: exampleAccount.ID(),
// Identity: &machinelearning.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{
// Name: pulumi.String("example"),
// StorageAccountId: exampleAccount.ID(),
// })
// if err != nil {
// return err
// }
// exampleWorkspace2, err := synapse.NewWorkspace(ctx, "example", &synapse.WorkspaceArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// StorageDataLakeGen2FilesystemId: exampleDataLakeGen2Filesystem.ID(),
// SqlAdministratorLogin: pulumi.String("sqladminuser"),
// SqlAdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
// Identity: &synapse.WorkspaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleSparkPool, err := synapse.NewSparkPool(ctx, "example", &synapse.SparkPoolArgs{
// Name: pulumi.String("example"),
// SynapseWorkspaceId: exampleWorkspace2.ID(),
// NodeSizeFamily: pulumi.String("MemoryOptimized"),
// NodeSize: pulumi.String("Small"),
// NodeCount: pulumi.Int(3),
// })
// if err != nil {
// return err
// }
// _, err = machinelearning.NewSynapseSpark(ctx, "example", &machinelearning.SynapseSparkArgs{
// Name: pulumi.String("example"),
// MachineLearningWorkspaceId: exampleWorkspace.ID(),
// Location: example.Location,
// SynapseSparkPoolId: exampleSparkPool.ID(),
// Identity: &machinelearning.SynapseSparkIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.MachineLearningServices` - 2025-06-01
//
// ## Import
//
// Machine Learning Synapse Sparks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:machinelearning/synapseSpark:SynapseSpark example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1
// ```
type SynapseSpark struct {
pulumi.CustomResourceState
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
Identity SynapseSparkIdentityPtrOutput `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
MachineLearningWorkspaceId pulumi.StringOutput `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
SynapseSparkPoolId pulumi.StringOutput `pulumi:"synapseSparkPoolId"`
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewSynapseSpark registers a new resource with the given unique name, arguments, and options.
func NewSynapseSpark(ctx *pulumi.Context,
name string, args *SynapseSparkArgs, opts ...pulumi.ResourceOption) (*SynapseSpark, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MachineLearningWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'MachineLearningWorkspaceId'")
}
if args.SynapseSparkPoolId == nil {
return nil, errors.New("invalid value for required argument 'SynapseSparkPoolId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SynapseSpark
err := ctx.RegisterResource("azure:machinelearning/synapseSpark:SynapseSpark", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSynapseSpark gets an existing SynapseSpark resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSynapseSpark(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SynapseSparkState, opts ...pulumi.ResourceOption) (*SynapseSpark, error) {
var resource SynapseSpark
err := ctx.ReadResource("azure:machinelearning/synapseSpark:SynapseSpark", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SynapseSpark resources.
type synapseSparkState struct {
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
Identity *SynapseSparkIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
MachineLearningWorkspaceId *string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Name *string `pulumi:"name"`
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
SynapseSparkPoolId *string `pulumi:"synapseSparkPoolId"`
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Tags map[string]string `pulumi:"tags"`
}
type SynapseSparkState struct {
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
Identity SynapseSparkIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
MachineLearningWorkspaceId pulumi.StringPtrInput
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Name pulumi.StringPtrInput
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
SynapseSparkPoolId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Tags pulumi.StringMapInput
}
func (SynapseSparkState) ElementType() reflect.Type {
return reflect.TypeOf((*synapseSparkState)(nil)).Elem()
}
type synapseSparkArgs struct {
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Description *string `pulumi:"description"`
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
Identity *SynapseSparkIdentity `pulumi:"identity"`
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
Location *string `pulumi:"location"`
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
MachineLearningWorkspaceId string `pulumi:"machineLearningWorkspaceId"`
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Name *string `pulumi:"name"`
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
SynapseSparkPoolId string `pulumi:"synapseSparkPoolId"`
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a SynapseSpark resource.
type SynapseSparkArgs struct {
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Description pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
Identity SynapseSparkIdentityPtrInput
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
LocalAuthEnabled pulumi.BoolPtrInput
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
Location pulumi.StringPtrInput
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
MachineLearningWorkspaceId pulumi.StringInput
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Name pulumi.StringPtrInput
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
SynapseSparkPoolId pulumi.StringInput
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
Tags pulumi.StringMapInput
}
func (SynapseSparkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*synapseSparkArgs)(nil)).Elem()
}
type SynapseSparkInput interface {
pulumi.Input
ToSynapseSparkOutput() SynapseSparkOutput
ToSynapseSparkOutputWithContext(ctx context.Context) SynapseSparkOutput
}
func (*SynapseSpark) ElementType() reflect.Type {
return reflect.TypeOf((**SynapseSpark)(nil)).Elem()
}
func (i *SynapseSpark) ToSynapseSparkOutput() SynapseSparkOutput {
return i.ToSynapseSparkOutputWithContext(context.Background())
}
func (i *SynapseSpark) ToSynapseSparkOutputWithContext(ctx context.Context) SynapseSparkOutput {
return pulumi.ToOutputWithContext(ctx, i).(SynapseSparkOutput)
}
// SynapseSparkArrayInput is an input type that accepts SynapseSparkArray and SynapseSparkArrayOutput values.
// You can construct a concrete instance of `SynapseSparkArrayInput` via:
//
// SynapseSparkArray{ SynapseSparkArgs{...} }
type SynapseSparkArrayInput interface {
pulumi.Input
ToSynapseSparkArrayOutput() SynapseSparkArrayOutput
ToSynapseSparkArrayOutputWithContext(context.Context) SynapseSparkArrayOutput
}
type SynapseSparkArray []SynapseSparkInput
func (SynapseSparkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SynapseSpark)(nil)).Elem()
}
func (i SynapseSparkArray) ToSynapseSparkArrayOutput() SynapseSparkArrayOutput {
return i.ToSynapseSparkArrayOutputWithContext(context.Background())
}
func (i SynapseSparkArray) ToSynapseSparkArrayOutputWithContext(ctx context.Context) SynapseSparkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SynapseSparkArrayOutput)
}
// SynapseSparkMapInput is an input type that accepts SynapseSparkMap and SynapseSparkMapOutput values.
// You can construct a concrete instance of `SynapseSparkMapInput` via:
//
// SynapseSparkMap{ "key": SynapseSparkArgs{...} }
type SynapseSparkMapInput interface {
pulumi.Input
ToSynapseSparkMapOutput() SynapseSparkMapOutput
ToSynapseSparkMapOutputWithContext(context.Context) SynapseSparkMapOutput
}
type SynapseSparkMap map[string]SynapseSparkInput
func (SynapseSparkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SynapseSpark)(nil)).Elem()
}
func (i SynapseSparkMap) ToSynapseSparkMapOutput() SynapseSparkMapOutput {
return i.ToSynapseSparkMapOutputWithContext(context.Background())
}
func (i SynapseSparkMap) ToSynapseSparkMapOutputWithContext(ctx context.Context) SynapseSparkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SynapseSparkMapOutput)
}
type SynapseSparkOutput struct{ *pulumi.OutputState }
func (SynapseSparkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SynapseSpark)(nil)).Elem()
}
func (o SynapseSparkOutput) ToSynapseSparkOutput() SynapseSparkOutput {
return o
}
func (o SynapseSparkOutput) ToSynapseSparkOutputWithContext(ctx context.Context) SynapseSparkOutput {
return o
}
// The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) Identity() SynapseSparkIdentityPtrOutput {
return o.ApplyT(func(v *SynapseSpark) SynapseSparkIdentityPtrOutput { return v.Identity }).(SynapseSparkIdentityPtrOutput)
}
// Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) MachineLearningWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringOutput { return v.MachineLearningWorkspaceId }).(pulumi.StringOutput)
}
// The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) SynapseSparkPoolId() pulumi.StringOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringOutput { return v.SynapseSparkPoolId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
func (o SynapseSparkOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SynapseSpark) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type SynapseSparkArrayOutput struct{ *pulumi.OutputState }
func (SynapseSparkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SynapseSpark)(nil)).Elem()
}
func (o SynapseSparkArrayOutput) ToSynapseSparkArrayOutput() SynapseSparkArrayOutput {
return o
}
func (o SynapseSparkArrayOutput) ToSynapseSparkArrayOutputWithContext(ctx context.Context) SynapseSparkArrayOutput {
return o
}
func (o SynapseSparkArrayOutput) Index(i pulumi.IntInput) SynapseSparkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SynapseSpark {
return vs[0].([]*SynapseSpark)[vs[1].(int)]
}).(SynapseSparkOutput)
}
type SynapseSparkMapOutput struct{ *pulumi.OutputState }
func (SynapseSparkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SynapseSpark)(nil)).Elem()
}
func (o SynapseSparkMapOutput) ToSynapseSparkMapOutput() SynapseSparkMapOutput {
return o
}
func (o SynapseSparkMapOutput) ToSynapseSparkMapOutputWithContext(ctx context.Context) SynapseSparkMapOutput {
return o
}
func (o SynapseSparkMapOutput) MapIndex(k pulumi.StringInput) SynapseSparkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SynapseSpark {
return vs[0].(map[string]*SynapseSpark)[vs[1].(string)]
}).(SynapseSparkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SynapseSparkInput)(nil)).Elem(), &SynapseSpark{})
pulumi.RegisterInputType(reflect.TypeOf((*SynapseSparkArrayInput)(nil)).Elem(), SynapseSparkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SynapseSparkMapInput)(nil)).Elem(), SynapseSparkMap{})
pulumi.RegisterOutputType(SynapseSparkOutput{})
pulumi.RegisterOutputType(SynapseSparkArrayOutput{})
pulumi.RegisterOutputType(SynapseSparkMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/newrelic/init.go | sdk/go/azure/newrelic/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package newrelic
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:newrelic/monitor:Monitor":
r = &Monitor{}
case "azure:newrelic/tagRule:TagRule":
r = &TagRule{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"newrelic/monitor",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"newrelic/tagRule",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/newrelic/pulumiTypes.go | sdk/go/azure/newrelic/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package newrelic
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type MonitorIdentity struct {
// The Principal ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
TenantId *string `pulumi:"tenantId"`
// Specifies the identity type of the Azure Native New Relic Monitor. The only possible value is `SystemAssigned`. Changing this forces a new Azure Native New Relic Monitor to be created.
Type string `pulumi:"type"`
}
// MonitorIdentityInput is an input type that accepts MonitorIdentityArgs and MonitorIdentityOutput values.
// You can construct a concrete instance of `MonitorIdentityInput` via:
//
// MonitorIdentityArgs{...}
type MonitorIdentityInput interface {
pulumi.Input
ToMonitorIdentityOutput() MonitorIdentityOutput
ToMonitorIdentityOutputWithContext(context.Context) MonitorIdentityOutput
}
type MonitorIdentityArgs struct {
// The Principal ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the identity type of the Azure Native New Relic Monitor. The only possible value is `SystemAssigned`. Changing this forces a new Azure Native New Relic Monitor to be created.
Type pulumi.StringInput `pulumi:"type"`
}
func (MonitorIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorIdentity)(nil)).Elem()
}
func (i MonitorIdentityArgs) ToMonitorIdentityOutput() MonitorIdentityOutput {
return i.ToMonitorIdentityOutputWithContext(context.Background())
}
func (i MonitorIdentityArgs) ToMonitorIdentityOutputWithContext(ctx context.Context) MonitorIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityOutput)
}
func (i MonitorIdentityArgs) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput {
return i.ToMonitorIdentityPtrOutputWithContext(context.Background())
}
func (i MonitorIdentityArgs) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityOutput).ToMonitorIdentityPtrOutputWithContext(ctx)
}
// MonitorIdentityPtrInput is an input type that accepts MonitorIdentityArgs, MonitorIdentityPtr and MonitorIdentityPtrOutput values.
// You can construct a concrete instance of `MonitorIdentityPtrInput` via:
//
// MonitorIdentityArgs{...}
//
// or:
//
// nil
type MonitorIdentityPtrInput interface {
pulumi.Input
ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput
ToMonitorIdentityPtrOutputWithContext(context.Context) MonitorIdentityPtrOutput
}
type monitorIdentityPtrType MonitorIdentityArgs
func MonitorIdentityPtr(v *MonitorIdentityArgs) MonitorIdentityPtrInput {
return (*monitorIdentityPtrType)(v)
}
func (*monitorIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorIdentity)(nil)).Elem()
}
func (i *monitorIdentityPtrType) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput {
return i.ToMonitorIdentityPtrOutputWithContext(context.Background())
}
func (i *monitorIdentityPtrType) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityPtrOutput)
}
type MonitorIdentityOutput struct{ *pulumi.OutputState }
func (MonitorIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorIdentity)(nil)).Elem()
}
func (o MonitorIdentityOutput) ToMonitorIdentityOutput() MonitorIdentityOutput {
return o
}
func (o MonitorIdentityOutput) ToMonitorIdentityOutputWithContext(ctx context.Context) MonitorIdentityOutput {
return o
}
func (o MonitorIdentityOutput) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput {
return o.ToMonitorIdentityPtrOutputWithContext(context.Background())
}
func (o MonitorIdentityOutput) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorIdentity) *MonitorIdentity {
return &v
}).(MonitorIdentityPtrOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
func (o MonitorIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v MonitorIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
func (o MonitorIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v MonitorIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the Azure Native New Relic Monitor. The only possible value is `SystemAssigned`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v MonitorIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type MonitorIdentityPtrOutput struct{ *pulumi.OutputState }
func (MonitorIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorIdentity)(nil)).Elem()
}
func (o MonitorIdentityPtrOutput) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput {
return o
}
func (o MonitorIdentityPtrOutput) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput {
return o
}
func (o MonitorIdentityPtrOutput) Elem() MonitorIdentityOutput {
return o.ApplyT(func(v *MonitorIdentity) MonitorIdentity {
if v != nil {
return *v
}
var ret MonitorIdentity
return ret
}).(MonitorIdentityOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
func (o MonitorIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Azure Native New Relic Monitor.
func (o MonitorIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the Azure Native New Relic Monitor. The only possible value is `SystemAssigned`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type MonitorPlan struct {
// Specifies the billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. Defaults to `MONTHLY`. Changing this forces a new Azure Native New Relic Monitor to be created.
BillingCycle *string `pulumi:"billingCycle"`
// Specifies the date when plan was applied. Changing this forces a new Azure Native New Relic Monitor to be created.
EffectiveDate string `pulumi:"effectiveDate"`
// Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created.
PlanId *string `pulumi:"planId"`
// Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created.
UsageType *string `pulumi:"usageType"`
}
// MonitorPlanInput is an input type that accepts MonitorPlanArgs and MonitorPlanOutput values.
// You can construct a concrete instance of `MonitorPlanInput` via:
//
// MonitorPlanArgs{...}
type MonitorPlanInput interface {
pulumi.Input
ToMonitorPlanOutput() MonitorPlanOutput
ToMonitorPlanOutputWithContext(context.Context) MonitorPlanOutput
}
type MonitorPlanArgs struct {
// Specifies the billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. Defaults to `MONTHLY`. Changing this forces a new Azure Native New Relic Monitor to be created.
BillingCycle pulumi.StringPtrInput `pulumi:"billingCycle"`
// Specifies the date when plan was applied. Changing this forces a new Azure Native New Relic Monitor to be created.
EffectiveDate pulumi.StringInput `pulumi:"effectiveDate"`
// Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created.
PlanId pulumi.StringPtrInput `pulumi:"planId"`
// Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created.
UsageType pulumi.StringPtrInput `pulumi:"usageType"`
}
func (MonitorPlanArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorPlan)(nil)).Elem()
}
func (i MonitorPlanArgs) ToMonitorPlanOutput() MonitorPlanOutput {
return i.ToMonitorPlanOutputWithContext(context.Background())
}
func (i MonitorPlanArgs) ToMonitorPlanOutputWithContext(ctx context.Context) MonitorPlanOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanOutput)
}
func (i MonitorPlanArgs) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput {
return i.ToMonitorPlanPtrOutputWithContext(context.Background())
}
func (i MonitorPlanArgs) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanOutput).ToMonitorPlanPtrOutputWithContext(ctx)
}
// MonitorPlanPtrInput is an input type that accepts MonitorPlanArgs, MonitorPlanPtr and MonitorPlanPtrOutput values.
// You can construct a concrete instance of `MonitorPlanPtrInput` via:
//
// MonitorPlanArgs{...}
//
// or:
//
// nil
type MonitorPlanPtrInput interface {
pulumi.Input
ToMonitorPlanPtrOutput() MonitorPlanPtrOutput
ToMonitorPlanPtrOutputWithContext(context.Context) MonitorPlanPtrOutput
}
type monitorPlanPtrType MonitorPlanArgs
func MonitorPlanPtr(v *MonitorPlanArgs) MonitorPlanPtrInput {
return (*monitorPlanPtrType)(v)
}
func (*monitorPlanPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorPlan)(nil)).Elem()
}
func (i *monitorPlanPtrType) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput {
return i.ToMonitorPlanPtrOutputWithContext(context.Background())
}
func (i *monitorPlanPtrType) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanPtrOutput)
}
type MonitorPlanOutput struct{ *pulumi.OutputState }
func (MonitorPlanOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorPlan)(nil)).Elem()
}
func (o MonitorPlanOutput) ToMonitorPlanOutput() MonitorPlanOutput {
return o
}
func (o MonitorPlanOutput) ToMonitorPlanOutputWithContext(ctx context.Context) MonitorPlanOutput {
return o
}
func (o MonitorPlanOutput) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput {
return o.ToMonitorPlanPtrOutputWithContext(context.Background())
}
func (o MonitorPlanOutput) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorPlan) *MonitorPlan {
return &v
}).(MonitorPlanPtrOutput)
}
// Specifies the billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. Defaults to `MONTHLY`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanOutput) BillingCycle() pulumi.StringPtrOutput {
return o.ApplyT(func(v MonitorPlan) *string { return v.BillingCycle }).(pulumi.StringPtrOutput)
}
// Specifies the date when plan was applied. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanOutput) EffectiveDate() pulumi.StringOutput {
return o.ApplyT(func(v MonitorPlan) string { return v.EffectiveDate }).(pulumi.StringOutput)
}
// Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v MonitorPlan) *string { return v.PlanId }).(pulumi.StringPtrOutput)
}
// Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanOutput) UsageType() pulumi.StringPtrOutput {
return o.ApplyT(func(v MonitorPlan) *string { return v.UsageType }).(pulumi.StringPtrOutput)
}
type MonitorPlanPtrOutput struct{ *pulumi.OutputState }
func (MonitorPlanPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorPlan)(nil)).Elem()
}
func (o MonitorPlanPtrOutput) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput {
return o
}
func (o MonitorPlanPtrOutput) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput {
return o
}
func (o MonitorPlanPtrOutput) Elem() MonitorPlanOutput {
return o.ApplyT(func(v *MonitorPlan) MonitorPlan {
if v != nil {
return *v
}
var ret MonitorPlan
return ret
}).(MonitorPlanOutput)
}
// Specifies the billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. Defaults to `MONTHLY`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanPtrOutput) BillingCycle() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorPlan) *string {
if v == nil {
return nil
}
return v.BillingCycle
}).(pulumi.StringPtrOutput)
}
// Specifies the date when plan was applied. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanPtrOutput) EffectiveDate() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorPlan) *string {
if v == nil {
return nil
}
return &v.EffectiveDate
}).(pulumi.StringPtrOutput)
}
// Specifies the plan id published by NewRelic. The only possible value is `newrelic-pay-as-you-go-free-live`. Defaults to `newrelic-pay-as-you-go-free-live`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanPtrOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorPlan) *string {
if v == nil {
return nil
}
return v.PlanId
}).(pulumi.StringPtrOutput)
}
// Specifies the usage type. Possible values are `COMMITTED` and `PAYG`. Defaults to `PAYG`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorPlanPtrOutput) UsageType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorPlan) *string {
if v == nil {
return nil
}
return v.UsageType
}).(pulumi.StringPtrOutput)
}
type MonitorUser struct {
// Specifies the user Email. Changing this forces a new Azure Native New Relic Monitor to be created.
Email string `pulumi:"email"`
// Specifies the first name. Changing this forces a new Azure Native New Relic Monitor to be created.
FirstName string `pulumi:"firstName"`
// Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created.
LastName string `pulumi:"lastName"`
// Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created.
PhoneNumber string `pulumi:"phoneNumber"`
}
// MonitorUserInput is an input type that accepts MonitorUserArgs and MonitorUserOutput values.
// You can construct a concrete instance of `MonitorUserInput` via:
//
// MonitorUserArgs{...}
type MonitorUserInput interface {
pulumi.Input
ToMonitorUserOutput() MonitorUserOutput
ToMonitorUserOutputWithContext(context.Context) MonitorUserOutput
}
type MonitorUserArgs struct {
// Specifies the user Email. Changing this forces a new Azure Native New Relic Monitor to be created.
Email pulumi.StringInput `pulumi:"email"`
// Specifies the first name. Changing this forces a new Azure Native New Relic Monitor to be created.
FirstName pulumi.StringInput `pulumi:"firstName"`
// Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created.
LastName pulumi.StringInput `pulumi:"lastName"`
// Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created.
PhoneNumber pulumi.StringInput `pulumi:"phoneNumber"`
}
func (MonitorUserArgs) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorUser)(nil)).Elem()
}
func (i MonitorUserArgs) ToMonitorUserOutput() MonitorUserOutput {
return i.ToMonitorUserOutputWithContext(context.Background())
}
func (i MonitorUserArgs) ToMonitorUserOutputWithContext(ctx context.Context) MonitorUserOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorUserOutput)
}
func (i MonitorUserArgs) ToMonitorUserPtrOutput() MonitorUserPtrOutput {
return i.ToMonitorUserPtrOutputWithContext(context.Background())
}
func (i MonitorUserArgs) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorUserOutput).ToMonitorUserPtrOutputWithContext(ctx)
}
// MonitorUserPtrInput is an input type that accepts MonitorUserArgs, MonitorUserPtr and MonitorUserPtrOutput values.
// You can construct a concrete instance of `MonitorUserPtrInput` via:
//
// MonitorUserArgs{...}
//
// or:
//
// nil
type MonitorUserPtrInput interface {
pulumi.Input
ToMonitorUserPtrOutput() MonitorUserPtrOutput
ToMonitorUserPtrOutputWithContext(context.Context) MonitorUserPtrOutput
}
type monitorUserPtrType MonitorUserArgs
func MonitorUserPtr(v *MonitorUserArgs) MonitorUserPtrInput {
return (*monitorUserPtrType)(v)
}
func (*monitorUserPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorUser)(nil)).Elem()
}
func (i *monitorUserPtrType) ToMonitorUserPtrOutput() MonitorUserPtrOutput {
return i.ToMonitorUserPtrOutputWithContext(context.Background())
}
func (i *monitorUserPtrType) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorUserPtrOutput)
}
type MonitorUserOutput struct{ *pulumi.OutputState }
func (MonitorUserOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MonitorUser)(nil)).Elem()
}
func (o MonitorUserOutput) ToMonitorUserOutput() MonitorUserOutput {
return o
}
func (o MonitorUserOutput) ToMonitorUserOutputWithContext(ctx context.Context) MonitorUserOutput {
return o
}
func (o MonitorUserOutput) ToMonitorUserPtrOutput() MonitorUserPtrOutput {
return o.ToMonitorUserPtrOutputWithContext(context.Background())
}
func (o MonitorUserOutput) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorUser) *MonitorUser {
return &v
}).(MonitorUserPtrOutput)
}
// Specifies the user Email. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v MonitorUser) string { return v.Email }).(pulumi.StringOutput)
}
// Specifies the first name. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserOutput) FirstName() pulumi.StringOutput {
return o.ApplyT(func(v MonitorUser) string { return v.FirstName }).(pulumi.StringOutput)
}
// Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserOutput) LastName() pulumi.StringOutput {
return o.ApplyT(func(v MonitorUser) string { return v.LastName }).(pulumi.StringOutput)
}
// Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserOutput) PhoneNumber() pulumi.StringOutput {
return o.ApplyT(func(v MonitorUser) string { return v.PhoneNumber }).(pulumi.StringOutput)
}
type MonitorUserPtrOutput struct{ *pulumi.OutputState }
func (MonitorUserPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MonitorUser)(nil)).Elem()
}
func (o MonitorUserPtrOutput) ToMonitorUserPtrOutput() MonitorUserPtrOutput {
return o
}
func (o MonitorUserPtrOutput) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput {
return o
}
func (o MonitorUserPtrOutput) Elem() MonitorUserOutput {
return o.ApplyT(func(v *MonitorUser) MonitorUser {
if v != nil {
return *v
}
var ret MonitorUser
return ret
}).(MonitorUserOutput)
}
// Specifies the user Email. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserPtrOutput) Email() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorUser) *string {
if v == nil {
return nil
}
return &v.Email
}).(pulumi.StringPtrOutput)
}
// Specifies the first name. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserPtrOutput) FirstName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorUser) *string {
if v == nil {
return nil
}
return &v.FirstName
}).(pulumi.StringPtrOutput)
}
// Specifies the last name. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserPtrOutput) LastName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorUser) *string {
if v == nil {
return nil
}
return &v.LastName
}).(pulumi.StringPtrOutput)
}
// Specifies the contact phone number. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorUserPtrOutput) PhoneNumber() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MonitorUser) *string {
if v == nil {
return nil
}
return &v.PhoneNumber
}).(pulumi.StringPtrOutput)
}
type TagRuleLogTagFilter struct {
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
Action string `pulumi:"action"`
// Specifies the name (also known as the key) of the tag.
Name string `pulumi:"name"`
// Specifies the value of the tag.
Value string `pulumi:"value"`
}
// TagRuleLogTagFilterInput is an input type that accepts TagRuleLogTagFilterArgs and TagRuleLogTagFilterOutput values.
// You can construct a concrete instance of `TagRuleLogTagFilterInput` via:
//
// TagRuleLogTagFilterArgs{...}
type TagRuleLogTagFilterInput interface {
pulumi.Input
ToTagRuleLogTagFilterOutput() TagRuleLogTagFilterOutput
ToTagRuleLogTagFilterOutputWithContext(context.Context) TagRuleLogTagFilterOutput
}
type TagRuleLogTagFilterArgs struct {
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
Action pulumi.StringInput `pulumi:"action"`
// Specifies the name (also known as the key) of the tag.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the value of the tag.
Value pulumi.StringInput `pulumi:"value"`
}
func (TagRuleLogTagFilterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TagRuleLogTagFilter)(nil)).Elem()
}
func (i TagRuleLogTagFilterArgs) ToTagRuleLogTagFilterOutput() TagRuleLogTagFilterOutput {
return i.ToTagRuleLogTagFilterOutputWithContext(context.Background())
}
func (i TagRuleLogTagFilterArgs) ToTagRuleLogTagFilterOutputWithContext(ctx context.Context) TagRuleLogTagFilterOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleLogTagFilterOutput)
}
// TagRuleLogTagFilterArrayInput is an input type that accepts TagRuleLogTagFilterArray and TagRuleLogTagFilterArrayOutput values.
// You can construct a concrete instance of `TagRuleLogTagFilterArrayInput` via:
//
// TagRuleLogTagFilterArray{ TagRuleLogTagFilterArgs{...} }
type TagRuleLogTagFilterArrayInput interface {
pulumi.Input
ToTagRuleLogTagFilterArrayOutput() TagRuleLogTagFilterArrayOutput
ToTagRuleLogTagFilterArrayOutputWithContext(context.Context) TagRuleLogTagFilterArrayOutput
}
type TagRuleLogTagFilterArray []TagRuleLogTagFilterInput
func (TagRuleLogTagFilterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TagRuleLogTagFilter)(nil)).Elem()
}
func (i TagRuleLogTagFilterArray) ToTagRuleLogTagFilterArrayOutput() TagRuleLogTagFilterArrayOutput {
return i.ToTagRuleLogTagFilterArrayOutputWithContext(context.Background())
}
func (i TagRuleLogTagFilterArray) ToTagRuleLogTagFilterArrayOutputWithContext(ctx context.Context) TagRuleLogTagFilterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleLogTagFilterArrayOutput)
}
type TagRuleLogTagFilterOutput struct{ *pulumi.OutputState }
func (TagRuleLogTagFilterOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TagRuleLogTagFilter)(nil)).Elem()
}
func (o TagRuleLogTagFilterOutput) ToTagRuleLogTagFilterOutput() TagRuleLogTagFilterOutput {
return o
}
func (o TagRuleLogTagFilterOutput) ToTagRuleLogTagFilterOutputWithContext(ctx context.Context) TagRuleLogTagFilterOutput {
return o
}
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
func (o TagRuleLogTagFilterOutput) Action() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleLogTagFilter) string { return v.Action }).(pulumi.StringOutput)
}
// Specifies the name (also known as the key) of the tag.
func (o TagRuleLogTagFilterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleLogTagFilter) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies the value of the tag.
func (o TagRuleLogTagFilterOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleLogTagFilter) string { return v.Value }).(pulumi.StringOutput)
}
type TagRuleLogTagFilterArrayOutput struct{ *pulumi.OutputState }
func (TagRuleLogTagFilterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TagRuleLogTagFilter)(nil)).Elem()
}
func (o TagRuleLogTagFilterArrayOutput) ToTagRuleLogTagFilterArrayOutput() TagRuleLogTagFilterArrayOutput {
return o
}
func (o TagRuleLogTagFilterArrayOutput) ToTagRuleLogTagFilterArrayOutputWithContext(ctx context.Context) TagRuleLogTagFilterArrayOutput {
return o
}
func (o TagRuleLogTagFilterArrayOutput) Index(i pulumi.IntInput) TagRuleLogTagFilterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TagRuleLogTagFilter {
return vs[0].([]TagRuleLogTagFilter)[vs[1].(int)]
}).(TagRuleLogTagFilterOutput)
}
type TagRuleMetricTagFilter struct {
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
Action string `pulumi:"action"`
// Specifies the name (also known as the key) of the tag.
Name string `pulumi:"name"`
// Specifies the value of the tag.
Value string `pulumi:"value"`
}
// TagRuleMetricTagFilterInput is an input type that accepts TagRuleMetricTagFilterArgs and TagRuleMetricTagFilterOutput values.
// You can construct a concrete instance of `TagRuleMetricTagFilterInput` via:
//
// TagRuleMetricTagFilterArgs{...}
type TagRuleMetricTagFilterInput interface {
pulumi.Input
ToTagRuleMetricTagFilterOutput() TagRuleMetricTagFilterOutput
ToTagRuleMetricTagFilterOutputWithContext(context.Context) TagRuleMetricTagFilterOutput
}
type TagRuleMetricTagFilterArgs struct {
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
Action pulumi.StringInput `pulumi:"action"`
// Specifies the name (also known as the key) of the tag.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the value of the tag.
Value pulumi.StringInput `pulumi:"value"`
}
func (TagRuleMetricTagFilterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TagRuleMetricTagFilter)(nil)).Elem()
}
func (i TagRuleMetricTagFilterArgs) ToTagRuleMetricTagFilterOutput() TagRuleMetricTagFilterOutput {
return i.ToTagRuleMetricTagFilterOutputWithContext(context.Background())
}
func (i TagRuleMetricTagFilterArgs) ToTagRuleMetricTagFilterOutputWithContext(ctx context.Context) TagRuleMetricTagFilterOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleMetricTagFilterOutput)
}
// TagRuleMetricTagFilterArrayInput is an input type that accepts TagRuleMetricTagFilterArray and TagRuleMetricTagFilterArrayOutput values.
// You can construct a concrete instance of `TagRuleMetricTagFilterArrayInput` via:
//
// TagRuleMetricTagFilterArray{ TagRuleMetricTagFilterArgs{...} }
type TagRuleMetricTagFilterArrayInput interface {
pulumi.Input
ToTagRuleMetricTagFilterArrayOutput() TagRuleMetricTagFilterArrayOutput
ToTagRuleMetricTagFilterArrayOutputWithContext(context.Context) TagRuleMetricTagFilterArrayOutput
}
type TagRuleMetricTagFilterArray []TagRuleMetricTagFilterInput
func (TagRuleMetricTagFilterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TagRuleMetricTagFilter)(nil)).Elem()
}
func (i TagRuleMetricTagFilterArray) ToTagRuleMetricTagFilterArrayOutput() TagRuleMetricTagFilterArrayOutput {
return i.ToTagRuleMetricTagFilterArrayOutputWithContext(context.Background())
}
func (i TagRuleMetricTagFilterArray) ToTagRuleMetricTagFilterArrayOutputWithContext(ctx context.Context) TagRuleMetricTagFilterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleMetricTagFilterArrayOutput)
}
type TagRuleMetricTagFilterOutput struct{ *pulumi.OutputState }
func (TagRuleMetricTagFilterOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TagRuleMetricTagFilter)(nil)).Elem()
}
func (o TagRuleMetricTagFilterOutput) ToTagRuleMetricTagFilterOutput() TagRuleMetricTagFilterOutput {
return o
}
func (o TagRuleMetricTagFilterOutput) ToTagRuleMetricTagFilterOutputWithContext(ctx context.Context) TagRuleMetricTagFilterOutput {
return o
}
// Valid actions for a filtering tag. Possible values are `Exclude` and `Include`. Exclusion takes priority over inclusion.
func (o TagRuleMetricTagFilterOutput) Action() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleMetricTagFilter) string { return v.Action }).(pulumi.StringOutput)
}
// Specifies the name (also known as the key) of the tag.
func (o TagRuleMetricTagFilterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleMetricTagFilter) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies the value of the tag.
func (o TagRuleMetricTagFilterOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v TagRuleMetricTagFilter) string { return v.Value }).(pulumi.StringOutput)
}
type TagRuleMetricTagFilterArrayOutput struct{ *pulumi.OutputState }
func (TagRuleMetricTagFilterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TagRuleMetricTagFilter)(nil)).Elem()
}
func (o TagRuleMetricTagFilterArrayOutput) ToTagRuleMetricTagFilterArrayOutput() TagRuleMetricTagFilterArrayOutput {
return o
}
func (o TagRuleMetricTagFilterArrayOutput) ToTagRuleMetricTagFilterArrayOutputWithContext(ctx context.Context) TagRuleMetricTagFilterArrayOutput {
return o
}
func (o TagRuleMetricTagFilterArrayOutput) Index(i pulumi.IntInput) TagRuleMetricTagFilterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TagRuleMetricTagFilter {
return vs[0].([]TagRuleMetricTagFilter)[vs[1].(int)]
}).(TagRuleMetricTagFilterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MonitorIdentityInput)(nil)).Elem(), MonitorIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorIdentityPtrInput)(nil)).Elem(), MonitorIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorPlanInput)(nil)).Elem(), MonitorPlanArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorPlanPtrInput)(nil)).Elem(), MonitorPlanArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorUserInput)(nil)).Elem(), MonitorUserArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorUserPtrInput)(nil)).Elem(), MonitorUserArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleLogTagFilterInput)(nil)).Elem(), TagRuleLogTagFilterArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleLogTagFilterArrayInput)(nil)).Elem(), TagRuleLogTagFilterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleMetricTagFilterInput)(nil)).Elem(), TagRuleMetricTagFilterArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleMetricTagFilterArrayInput)(nil)).Elem(), TagRuleMetricTagFilterArray{})
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/newrelic/tagRule.go | sdk/go/azure/newrelic/tagRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package newrelic
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Native New Relic Tag Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/newrelic"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleMonitor, err := newrelic.NewMonitor(ctx, "example", &newrelic.MonitorArgs{
// Name: pulumi.String("example-nrm"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Plan: &newrelic.MonitorPlanArgs{
// EffectiveDate: pulumi.String("2023-06-06T00:00:00Z"),
// },
// User: &newrelic.MonitorUserArgs{
// Email: pulumi.String("user@example.com"),
// FirstName: pulumi.String("Example"),
// LastName: pulumi.String("User"),
// PhoneNumber: pulumi.String("+12313803556"),
// },
// })
// if err != nil {
// return err
// }
// _, err = newrelic.NewTagRule(ctx, "example", &newrelic.TagRuleArgs{
// MonitorId: exampleMonitor.ID(),
// AzureActiveDirectoryLogEnabled: pulumi.Bool(true),
// ActivityLogEnabled: pulumi.Bool(true),
// MetricEnabled: pulumi.Bool(true),
// SubscriptionLogEnabled: pulumi.Bool(true),
// LogTagFilters: newrelic.TagRuleLogTagFilterArray{
// &newrelic.TagRuleLogTagFilterArgs{
// Name: pulumi.String("key"),
// Action: pulumi.String("Include"),
// Value: pulumi.String("value"),
// },
// },
// MetricTagFilters: newrelic.TagRuleMetricTagFilterArray{
// &newrelic.TagRuleMetricTagFilterArgs{
// Name: pulumi.String("key"),
// Action: pulumi.String("Exclude"),
// Value: pulumi.String("value"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `NewRelic.Observability` - 2024-03-01
//
// ## Import
//
// Azure Native New Relic Tag Rule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:newrelic/tagRule:TagRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/NewRelic.Observability/monitors/monitor1/tagRules/ruleSet1
// ```
type TagRule struct {
pulumi.CustomResourceState
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
ActivityLogEnabled pulumi.BoolPtrOutput `pulumi:"activityLogEnabled"`
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
AzureActiveDirectoryLogEnabled pulumi.BoolPtrOutput `pulumi:"azureActiveDirectoryLogEnabled"`
// A `logTagFilter` block as defined below.
LogTagFilters TagRuleLogTagFilterArrayOutput `pulumi:"logTagFilters"`
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
MetricEnabled pulumi.BoolPtrOutput `pulumi:"metricEnabled"`
// A `metricTagFilter` block as defined below.
MetricTagFilters TagRuleMetricTagFilterArrayOutput `pulumi:"metricTagFilters"`
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
MonitorId pulumi.StringOutput `pulumi:"monitorId"`
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
SubscriptionLogEnabled pulumi.BoolPtrOutput `pulumi:"subscriptionLogEnabled"`
}
// NewTagRule registers a new resource with the given unique name, arguments, and options.
func NewTagRule(ctx *pulumi.Context,
name string, args *TagRuleArgs, opts ...pulumi.ResourceOption) (*TagRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MonitorId == nil {
return nil, errors.New("invalid value for required argument 'MonitorId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource TagRule
err := ctx.RegisterResource("azure:newrelic/tagRule:TagRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTagRule gets an existing TagRule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTagRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TagRuleState, opts ...pulumi.ResourceOption) (*TagRule, error) {
var resource TagRule
err := ctx.ReadResource("azure:newrelic/tagRule:TagRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TagRule resources.
type tagRuleState struct {
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
ActivityLogEnabled *bool `pulumi:"activityLogEnabled"`
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
AzureActiveDirectoryLogEnabled *bool `pulumi:"azureActiveDirectoryLogEnabled"`
// A `logTagFilter` block as defined below.
LogTagFilters []TagRuleLogTagFilter `pulumi:"logTagFilters"`
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
MetricEnabled *bool `pulumi:"metricEnabled"`
// A `metricTagFilter` block as defined below.
MetricTagFilters []TagRuleMetricTagFilter `pulumi:"metricTagFilters"`
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
MonitorId *string `pulumi:"monitorId"`
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
SubscriptionLogEnabled *bool `pulumi:"subscriptionLogEnabled"`
}
type TagRuleState struct {
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
ActivityLogEnabled pulumi.BoolPtrInput
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
AzureActiveDirectoryLogEnabled pulumi.BoolPtrInput
// A `logTagFilter` block as defined below.
LogTagFilters TagRuleLogTagFilterArrayInput
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
MetricEnabled pulumi.BoolPtrInput
// A `metricTagFilter` block as defined below.
MetricTagFilters TagRuleMetricTagFilterArrayInput
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
MonitorId pulumi.StringPtrInput
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
SubscriptionLogEnabled pulumi.BoolPtrInput
}
func (TagRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*tagRuleState)(nil)).Elem()
}
type tagRuleArgs struct {
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
ActivityLogEnabled *bool `pulumi:"activityLogEnabled"`
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
AzureActiveDirectoryLogEnabled *bool `pulumi:"azureActiveDirectoryLogEnabled"`
// A `logTagFilter` block as defined below.
LogTagFilters []TagRuleLogTagFilter `pulumi:"logTagFilters"`
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
MetricEnabled *bool `pulumi:"metricEnabled"`
// A `metricTagFilter` block as defined below.
MetricTagFilters []TagRuleMetricTagFilter `pulumi:"metricTagFilters"`
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
MonitorId string `pulumi:"monitorId"`
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
SubscriptionLogEnabled *bool `pulumi:"subscriptionLogEnabled"`
}
// The set of arguments for constructing a TagRule resource.
type TagRuleArgs struct {
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
ActivityLogEnabled pulumi.BoolPtrInput
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
AzureActiveDirectoryLogEnabled pulumi.BoolPtrInput
// A `logTagFilter` block as defined below.
LogTagFilters TagRuleLogTagFilterArrayInput
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
MetricEnabled pulumi.BoolPtrInput
// A `metricTagFilter` block as defined below.
MetricTagFilters TagRuleMetricTagFilterArrayInput
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
MonitorId pulumi.StringInput
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
SubscriptionLogEnabled pulumi.BoolPtrInput
}
func (TagRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*tagRuleArgs)(nil)).Elem()
}
type TagRuleInput interface {
pulumi.Input
ToTagRuleOutput() TagRuleOutput
ToTagRuleOutputWithContext(ctx context.Context) TagRuleOutput
}
func (*TagRule) ElementType() reflect.Type {
return reflect.TypeOf((**TagRule)(nil)).Elem()
}
func (i *TagRule) ToTagRuleOutput() TagRuleOutput {
return i.ToTagRuleOutputWithContext(context.Background())
}
func (i *TagRule) ToTagRuleOutputWithContext(ctx context.Context) TagRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleOutput)
}
// TagRuleArrayInput is an input type that accepts TagRuleArray and TagRuleArrayOutput values.
// You can construct a concrete instance of `TagRuleArrayInput` via:
//
// TagRuleArray{ TagRuleArgs{...} }
type TagRuleArrayInput interface {
pulumi.Input
ToTagRuleArrayOutput() TagRuleArrayOutput
ToTagRuleArrayOutputWithContext(context.Context) TagRuleArrayOutput
}
type TagRuleArray []TagRuleInput
func (TagRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TagRule)(nil)).Elem()
}
func (i TagRuleArray) ToTagRuleArrayOutput() TagRuleArrayOutput {
return i.ToTagRuleArrayOutputWithContext(context.Background())
}
func (i TagRuleArray) ToTagRuleArrayOutputWithContext(ctx context.Context) TagRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleArrayOutput)
}
// TagRuleMapInput is an input type that accepts TagRuleMap and TagRuleMapOutput values.
// You can construct a concrete instance of `TagRuleMapInput` via:
//
// TagRuleMap{ "key": TagRuleArgs{...} }
type TagRuleMapInput interface {
pulumi.Input
ToTagRuleMapOutput() TagRuleMapOutput
ToTagRuleMapOutputWithContext(context.Context) TagRuleMapOutput
}
type TagRuleMap map[string]TagRuleInput
func (TagRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TagRule)(nil)).Elem()
}
func (i TagRuleMap) ToTagRuleMapOutput() TagRuleMapOutput {
return i.ToTagRuleMapOutputWithContext(context.Background())
}
func (i TagRuleMap) ToTagRuleMapOutputWithContext(ctx context.Context) TagRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TagRuleMapOutput)
}
type TagRuleOutput struct{ *pulumi.OutputState }
func (TagRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TagRule)(nil)).Elem()
}
func (o TagRuleOutput) ToTagRuleOutput() TagRuleOutput {
return o
}
func (o TagRuleOutput) ToTagRuleOutputWithContext(ctx context.Context) TagRuleOutput {
return o
}
// Whether activity logs from Azure resources should be sent for the Monitor resource. Defaults to `false`.
func (o TagRuleOutput) ActivityLogEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TagRule) pulumi.BoolPtrOutput { return v.ActivityLogEnabled }).(pulumi.BoolPtrOutput)
}
// Whether Azure Active Directory logs should be sent for the Monitor resource. Defaults to `false`.
func (o TagRuleOutput) AzureActiveDirectoryLogEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TagRule) pulumi.BoolPtrOutput { return v.AzureActiveDirectoryLogEnabled }).(pulumi.BoolPtrOutput)
}
// A `logTagFilter` block as defined below.
func (o TagRuleOutput) LogTagFilters() TagRuleLogTagFilterArrayOutput {
return o.ApplyT(func(v *TagRule) TagRuleLogTagFilterArrayOutput { return v.LogTagFilters }).(TagRuleLogTagFilterArrayOutput)
}
// Whether metrics should be sent for the Monitor resource. Defaults to `false`.
func (o TagRuleOutput) MetricEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TagRule) pulumi.BoolPtrOutput { return v.MetricEnabled }).(pulumi.BoolPtrOutput)
}
// A `metricTagFilter` block as defined below.
func (o TagRuleOutput) MetricTagFilters() TagRuleMetricTagFilterArrayOutput {
return o.ApplyT(func(v *TagRule) TagRuleMetricTagFilterArrayOutput { return v.MetricTagFilters }).(TagRuleMetricTagFilterArrayOutput)
}
// Specifies the ID of the New Relic Monitor this Tag Rule should be created within. Changing this forces a new Azure Native New Relic Tag Rule to be created.
func (o TagRuleOutput) MonitorId() pulumi.StringOutput {
return o.ApplyT(func(v *TagRule) pulumi.StringOutput { return v.MonitorId }).(pulumi.StringOutput)
}
// Whether subscription logs should be sent for the Monitor resource. Defaults to `false`.
func (o TagRuleOutput) SubscriptionLogEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TagRule) pulumi.BoolPtrOutput { return v.SubscriptionLogEnabled }).(pulumi.BoolPtrOutput)
}
type TagRuleArrayOutput struct{ *pulumi.OutputState }
func (TagRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TagRule)(nil)).Elem()
}
func (o TagRuleArrayOutput) ToTagRuleArrayOutput() TagRuleArrayOutput {
return o
}
func (o TagRuleArrayOutput) ToTagRuleArrayOutputWithContext(ctx context.Context) TagRuleArrayOutput {
return o
}
func (o TagRuleArrayOutput) Index(i pulumi.IntInput) TagRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TagRule {
return vs[0].([]*TagRule)[vs[1].(int)]
}).(TagRuleOutput)
}
type TagRuleMapOutput struct{ *pulumi.OutputState }
func (TagRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TagRule)(nil)).Elem()
}
func (o TagRuleMapOutput) ToTagRuleMapOutput() TagRuleMapOutput {
return o
}
func (o TagRuleMapOutput) ToTagRuleMapOutputWithContext(ctx context.Context) TagRuleMapOutput {
return o
}
func (o TagRuleMapOutput) MapIndex(k pulumi.StringInput) TagRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TagRule {
return vs[0].(map[string]*TagRule)[vs[1].(string)]
}).(TagRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleInput)(nil)).Elem(), &TagRule{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleArrayInput)(nil)).Elem(), TagRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TagRuleMapInput)(nil)).Elem(), TagRuleMap{})
pulumi.RegisterOutputType(TagRuleOutput{})
pulumi.RegisterOutputType(TagRuleArrayOutput{})
pulumi.RegisterOutputType(TagRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/newrelic/monitor.go | sdk/go/azure/newrelic/monitor.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package newrelic
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure Native New Relic Monitor.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/newrelic"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// _, err = newrelic.NewMonitor(ctx, "example", &newrelic.MonitorArgs{
// Name: pulumi.String("example-nrm"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Plan: &newrelic.MonitorPlanArgs{
// EffectiveDate: pulumi.String("2023-06-06T00:00:00Z"),
// },
// User: &newrelic.MonitorUserArgs{
// Email: pulumi.String("user@example.com"),
// FirstName: pulumi.String("Example"),
// LastName: pulumi.String("User"),
// PhoneNumber: pulumi.String("+12313803556"),
// },
// Identity: &newrelic.MonitorIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Role Assignment
//
// To enable metrics flow, perform role assignment on the identity created above. `Monitoring reader(43d0d8ad-25c7-4714-9337-8ba259a9fe05)` role is required .
//
// ### Role assignment on the monitor created
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// monitoringReader, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
// Name: pulumi.StringRef("Monitoring Reader"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: pulumi.String(primary.Id),
// RoleDefinitionId: pulumi.Sprintf("%v%v", primary.Id, monitoringReader.Id),
// PrincipalId: pulumi.Any(exampleAzurermNewRelicMonitor.Identity[0].PrincipalId),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `NewRelic.Observability` - 2024-03-01
//
// ## Import
//
// Azure Native New Relic Monitor can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:newrelic/monitor:Monitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/NewRelic.Observability/monitors/monitor1
// ```
type Monitor struct {
pulumi.CustomResourceState
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
AccountCreationSource pulumi.StringPtrOutput `pulumi:"accountCreationSource"`
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
AccountId pulumi.StringOutput `pulumi:"accountId"`
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Identity MonitorIdentityPtrOutput `pulumi:"identity"`
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
IngestionKey pulumi.StringPtrOutput `pulumi:"ingestionKey"`
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
OrgCreationSource pulumi.StringPtrOutput `pulumi:"orgCreationSource"`
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Plan MonitorPlanOutput `pulumi:"plan"`
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
User MonitorUserOutput `pulumi:"user"`
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
UserId pulumi.StringPtrOutput `pulumi:"userId"`
}
// NewMonitor registers a new resource with the given unique name, arguments, and options.
func NewMonitor(ctx *pulumi.Context,
name string, args *MonitorArgs, opts ...pulumi.ResourceOption) (*Monitor, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Plan == nil {
return nil, errors.New("invalid value for required argument 'Plan'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.User == nil {
return nil, errors.New("invalid value for required argument 'User'")
}
if args.IngestionKey != nil {
args.IngestionKey = pulumi.ToSecret(args.IngestionKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"ingestionKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Monitor
err := ctx.RegisterResource("azure:newrelic/monitor:Monitor", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMonitor gets an existing Monitor resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMonitor(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MonitorState, opts ...pulumi.ResourceOption) (*Monitor, error) {
var resource Monitor
err := ctx.ReadResource("azure:newrelic/monitor:Monitor", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Monitor resources.
type monitorState struct {
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
AccountCreationSource *string `pulumi:"accountCreationSource"`
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
AccountId *string `pulumi:"accountId"`
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Identity *MonitorIdentity `pulumi:"identity"`
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
IngestionKey *string `pulumi:"ingestionKey"`
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
Name *string `pulumi:"name"`
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
OrgCreationSource *string `pulumi:"orgCreationSource"`
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
OrganizationId *string `pulumi:"organizationId"`
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Plan *MonitorPlan `pulumi:"plan"`
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
User *MonitorUser `pulumi:"user"`
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
UserId *string `pulumi:"userId"`
}
type MonitorState struct {
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
AccountCreationSource pulumi.StringPtrInput
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
AccountId pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Identity MonitorIdentityPtrInput
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
IngestionKey pulumi.StringPtrInput
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
Name pulumi.StringPtrInput
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
OrgCreationSource pulumi.StringPtrInput
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
OrganizationId pulumi.StringPtrInput
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Plan MonitorPlanPtrInput
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
ResourceGroupName pulumi.StringPtrInput
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
User MonitorUserPtrInput
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
UserId pulumi.StringPtrInput
}
func (MonitorState) ElementType() reflect.Type {
return reflect.TypeOf((*monitorState)(nil)).Elem()
}
type monitorArgs struct {
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
AccountCreationSource *string `pulumi:"accountCreationSource"`
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
AccountId *string `pulumi:"accountId"`
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Identity *MonitorIdentity `pulumi:"identity"`
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
IngestionKey *string `pulumi:"ingestionKey"`
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
Name *string `pulumi:"name"`
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
OrgCreationSource *string `pulumi:"orgCreationSource"`
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
OrganizationId *string `pulumi:"organizationId"`
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Plan MonitorPlan `pulumi:"plan"`
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
User MonitorUser `pulumi:"user"`
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
UserId *string `pulumi:"userId"`
}
// The set of arguments for constructing a Monitor resource.
type MonitorArgs struct {
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
AccountCreationSource pulumi.StringPtrInput
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
AccountId pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Identity MonitorIdentityPtrInput
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
IngestionKey pulumi.StringPtrInput
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
Name pulumi.StringPtrInput
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
OrgCreationSource pulumi.StringPtrInput
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
OrganizationId pulumi.StringPtrInput
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
Plan MonitorPlanInput
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
ResourceGroupName pulumi.StringInput
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
User MonitorUserInput
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
UserId pulumi.StringPtrInput
}
func (MonitorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*monitorArgs)(nil)).Elem()
}
type MonitorInput interface {
pulumi.Input
ToMonitorOutput() MonitorOutput
ToMonitorOutputWithContext(ctx context.Context) MonitorOutput
}
func (*Monitor) ElementType() reflect.Type {
return reflect.TypeOf((**Monitor)(nil)).Elem()
}
func (i *Monitor) ToMonitorOutput() MonitorOutput {
return i.ToMonitorOutputWithContext(context.Background())
}
func (i *Monitor) ToMonitorOutputWithContext(ctx context.Context) MonitorOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorOutput)
}
// MonitorArrayInput is an input type that accepts MonitorArray and MonitorArrayOutput values.
// You can construct a concrete instance of `MonitorArrayInput` via:
//
// MonitorArray{ MonitorArgs{...} }
type MonitorArrayInput interface {
pulumi.Input
ToMonitorArrayOutput() MonitorArrayOutput
ToMonitorArrayOutputWithContext(context.Context) MonitorArrayOutput
}
type MonitorArray []MonitorInput
func (MonitorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Monitor)(nil)).Elem()
}
func (i MonitorArray) ToMonitorArrayOutput() MonitorArrayOutput {
return i.ToMonitorArrayOutputWithContext(context.Background())
}
func (i MonitorArray) ToMonitorArrayOutputWithContext(ctx context.Context) MonitorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorArrayOutput)
}
// MonitorMapInput is an input type that accepts MonitorMap and MonitorMapOutput values.
// You can construct a concrete instance of `MonitorMapInput` via:
//
// MonitorMap{ "key": MonitorArgs{...} }
type MonitorMapInput interface {
pulumi.Input
ToMonitorMapOutput() MonitorMapOutput
ToMonitorMapOutputWithContext(context.Context) MonitorMapOutput
}
type MonitorMap map[string]MonitorInput
func (MonitorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Monitor)(nil)).Elem()
}
func (i MonitorMap) ToMonitorMapOutput() MonitorMapOutput {
return i.ToMonitorMapOutputWithContext(context.Background())
}
func (i MonitorMap) ToMonitorMapOutputWithContext(ctx context.Context) MonitorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MonitorMapOutput)
}
type MonitorOutput struct{ *pulumi.OutputState }
func (MonitorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Monitor)(nil)).Elem()
}
func (o MonitorOutput) ToMonitorOutput() MonitorOutput {
return o
}
func (o MonitorOutput) ToMonitorOutputWithContext(ctx context.Context) MonitorOutput {
return o
}
// Specifies the source of account creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) AccountCreationSource() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringPtrOutput { return v.AccountCreationSource }).(pulumi.StringPtrOutput)
}
// Specifies the account id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `accountId` must come from an Azure Native New Relic Monitor instance of another different subscription.
func (o MonitorOutput) AccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput)
}
// An `identity` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) Identity() MonitorIdentityPtrOutput {
return o.ApplyT(func(v *Monitor) MonitorIdentityPtrOutput { return v.Identity }).(MonitorIdentityPtrOutput)
}
// Specifies the ingestion key of account. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) IngestionKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringPtrOutput { return v.IngestionKey }).(pulumi.StringPtrOutput)
}
// Specifies the Azure Region where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Azure Native New Relic Monitor. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the source of org creation. Possible values are `LIFTR` and `NEWRELIC`. Defaults to `LIFTR`. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) OrgCreationSource() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringPtrOutput { return v.OrgCreationSource }).(pulumi.StringPtrOutput)
}
// Specifies the organization id. Changing this forces a new Azure Native New Relic Monitor to be created.
//
// > **Note:** The value of `organizationId` must come from an Azure Native New Relic Monitor instance of another different subscription.
func (o MonitorOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// A `plan` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) Plan() MonitorPlanOutput {
return o.ApplyT(func(v *Monitor) MonitorPlanOutput { return v.Plan }).(MonitorPlanOutput)
}
// Specifies the name of the Resource Group where the Azure Native New Relic Monitor should exist. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `user` block as defined below. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) User() MonitorUserOutput {
return o.ApplyT(func(v *Monitor) MonitorUserOutput { return v.User }).(MonitorUserOutput)
}
// Specifies the user id. Changing this forces a new Azure Native New Relic Monitor to be created.
func (o MonitorOutput) UserId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Monitor) pulumi.StringPtrOutput { return v.UserId }).(pulumi.StringPtrOutput)
}
type MonitorArrayOutput struct{ *pulumi.OutputState }
func (MonitorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Monitor)(nil)).Elem()
}
func (o MonitorArrayOutput) ToMonitorArrayOutput() MonitorArrayOutput {
return o
}
func (o MonitorArrayOutput) ToMonitorArrayOutputWithContext(ctx context.Context) MonitorArrayOutput {
return o
}
func (o MonitorArrayOutput) Index(i pulumi.IntInput) MonitorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Monitor {
return vs[0].([]*Monitor)[vs[1].(int)]
}).(MonitorOutput)
}
type MonitorMapOutput struct{ *pulumi.OutputState }
func (MonitorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Monitor)(nil)).Elem()
}
func (o MonitorMapOutput) ToMonitorMapOutput() MonitorMapOutput {
return o
}
func (o MonitorMapOutput) ToMonitorMapOutputWithContext(ctx context.Context) MonitorMapOutput {
return o
}
func (o MonitorMapOutput) MapIndex(k pulumi.StringInput) MonitorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Monitor {
return vs[0].(map[string]*Monitor)[vs[1].(string)]
}).(MonitorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MonitorInput)(nil)).Elem(), &Monitor{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorArrayInput)(nil)).Elem(), MonitorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MonitorMapInput)(nil)).Elem(), MonitorMap{})
pulumi.RegisterOutputType(MonitorOutput{})
pulumi.RegisterOutputType(MonitorArrayOutput{})
pulumi.RegisterOutputType(MonitorMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/dataExportRule.go | sdk/go/azure/loganalytics/dataExportRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Data Export Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("exampleworkspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplestoracc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewDataExportRule(ctx, "example", &loganalytics.DataExportRuleArgs{
// Name: pulumi.String("dataExport1"),
// ResourceGroupName: example.Name,
// WorkspaceResourceId: exampleAnalyticsWorkspace.ID(),
// DestinationResourceId: exampleAccount.ID(),
// TableNames: pulumi.StringArray{
// pulumi.String("Heartbeat"),
// },
// Enabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Data Export Rule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/dataExportRule:DataExportRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataExports/dataExport1
// ```
type DataExportRule struct {
pulumi.CustomResourceState
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
DestinationResourceId pulumi.StringOutput `pulumi:"destinationResourceId"`
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// The ID of the created Data Export Rule.
ExportRuleId pulumi.StringOutput `pulumi:"exportRuleId"`
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
TableNames pulumi.StringArrayOutput `pulumi:"tableNames"`
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
WorkspaceResourceId pulumi.StringOutput `pulumi:"workspaceResourceId"`
}
// NewDataExportRule registers a new resource with the given unique name, arguments, and options.
func NewDataExportRule(ctx *pulumi.Context,
name string, args *DataExportRuleArgs, opts ...pulumi.ResourceOption) (*DataExportRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DestinationResourceId == nil {
return nil, errors.New("invalid value for required argument 'DestinationResourceId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.TableNames == nil {
return nil, errors.New("invalid value for required argument 'TableNames'")
}
if args.WorkspaceResourceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DataExportRule
err := ctx.RegisterResource("azure:loganalytics/dataExportRule:DataExportRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataExportRule gets an existing DataExportRule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDataExportRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataExportRuleState, opts ...pulumi.ResourceOption) (*DataExportRule, error) {
var resource DataExportRule
err := ctx.ReadResource("azure:loganalytics/dataExportRule:DataExportRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataExportRule resources.
type dataExportRuleState struct {
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
DestinationResourceId *string `pulumi:"destinationResourceId"`
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
Enabled *bool `pulumi:"enabled"`
// The ID of the created Data Export Rule.
ExportRuleId *string `pulumi:"exportRuleId"`
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
TableNames []string `pulumi:"tableNames"`
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
WorkspaceResourceId *string `pulumi:"workspaceResourceId"`
}
type DataExportRuleState struct {
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
DestinationResourceId pulumi.StringPtrInput
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
Enabled pulumi.BoolPtrInput
// The ID of the created Data Export Rule.
ExportRuleId pulumi.StringPtrInput
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
ResourceGroupName pulumi.StringPtrInput
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
TableNames pulumi.StringArrayInput
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
WorkspaceResourceId pulumi.StringPtrInput
}
func (DataExportRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*dataExportRuleState)(nil)).Elem()
}
type dataExportRuleArgs struct {
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
DestinationResourceId string `pulumi:"destinationResourceId"`
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
Enabled *bool `pulumi:"enabled"`
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
TableNames []string `pulumi:"tableNames"`
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
WorkspaceResourceId string `pulumi:"workspaceResourceId"`
}
// The set of arguments for constructing a DataExportRule resource.
type DataExportRuleArgs struct {
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
DestinationResourceId pulumi.StringInput
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
Enabled pulumi.BoolPtrInput
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
ResourceGroupName pulumi.StringInput
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
TableNames pulumi.StringArrayInput
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
WorkspaceResourceId pulumi.StringInput
}
func (DataExportRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataExportRuleArgs)(nil)).Elem()
}
type DataExportRuleInput interface {
pulumi.Input
ToDataExportRuleOutput() DataExportRuleOutput
ToDataExportRuleOutputWithContext(ctx context.Context) DataExportRuleOutput
}
func (*DataExportRule) ElementType() reflect.Type {
return reflect.TypeOf((**DataExportRule)(nil)).Elem()
}
func (i *DataExportRule) ToDataExportRuleOutput() DataExportRuleOutput {
return i.ToDataExportRuleOutputWithContext(context.Background())
}
func (i *DataExportRule) ToDataExportRuleOutputWithContext(ctx context.Context) DataExportRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataExportRuleOutput)
}
// DataExportRuleArrayInput is an input type that accepts DataExportRuleArray and DataExportRuleArrayOutput values.
// You can construct a concrete instance of `DataExportRuleArrayInput` via:
//
// DataExportRuleArray{ DataExportRuleArgs{...} }
type DataExportRuleArrayInput interface {
pulumi.Input
ToDataExportRuleArrayOutput() DataExportRuleArrayOutput
ToDataExportRuleArrayOutputWithContext(context.Context) DataExportRuleArrayOutput
}
type DataExportRuleArray []DataExportRuleInput
func (DataExportRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataExportRule)(nil)).Elem()
}
func (i DataExportRuleArray) ToDataExportRuleArrayOutput() DataExportRuleArrayOutput {
return i.ToDataExportRuleArrayOutputWithContext(context.Background())
}
func (i DataExportRuleArray) ToDataExportRuleArrayOutputWithContext(ctx context.Context) DataExportRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataExportRuleArrayOutput)
}
// DataExportRuleMapInput is an input type that accepts DataExportRuleMap and DataExportRuleMapOutput values.
// You can construct a concrete instance of `DataExportRuleMapInput` via:
//
// DataExportRuleMap{ "key": DataExportRuleArgs{...} }
type DataExportRuleMapInput interface {
pulumi.Input
ToDataExportRuleMapOutput() DataExportRuleMapOutput
ToDataExportRuleMapOutputWithContext(context.Context) DataExportRuleMapOutput
}
type DataExportRuleMap map[string]DataExportRuleInput
func (DataExportRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataExportRule)(nil)).Elem()
}
func (i DataExportRuleMap) ToDataExportRuleMapOutput() DataExportRuleMapOutput {
return i.ToDataExportRuleMapOutputWithContext(context.Background())
}
func (i DataExportRuleMap) ToDataExportRuleMapOutputWithContext(ctx context.Context) DataExportRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataExportRuleMapOutput)
}
type DataExportRuleOutput struct{ *pulumi.OutputState }
func (DataExportRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataExportRule)(nil)).Elem()
}
func (o DataExportRuleOutput) ToDataExportRuleOutput() DataExportRuleOutput {
return o
}
func (o DataExportRuleOutput) ToDataExportRuleOutputWithContext(ctx context.Context) DataExportRuleOutput {
return o
}
// The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.
func (o DataExportRuleOutput) DestinationResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringOutput { return v.DestinationResourceId }).(pulumi.StringOutput)
}
// Is this Log Analytics Data Export Rule enabled? Possible values include `true` or `false`. Defaults to `false`.
func (o DataExportRuleOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// The ID of the created Data Export Rule.
func (o DataExportRuleOutput) ExportRuleId() pulumi.StringOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringOutput { return v.ExportRuleId }).(pulumi.StringOutput)
}
// The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.
func (o DataExportRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Data Export should exist. Changing this forces a new Log Analytics Data Export Rule to be created.
func (o DataExportRuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A list of table names to export to the destination resource, for example: `["Heartbeat", "SecurityEvent"]`.
func (o DataExportRuleOutput) TableNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringArrayOutput { return v.TableNames }).(pulumi.StringArrayOutput)
}
// The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.
func (o DataExportRuleOutput) WorkspaceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *DataExportRule) pulumi.StringOutput { return v.WorkspaceResourceId }).(pulumi.StringOutput)
}
type DataExportRuleArrayOutput struct{ *pulumi.OutputState }
func (DataExportRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataExportRule)(nil)).Elem()
}
func (o DataExportRuleArrayOutput) ToDataExportRuleArrayOutput() DataExportRuleArrayOutput {
return o
}
func (o DataExportRuleArrayOutput) ToDataExportRuleArrayOutputWithContext(ctx context.Context) DataExportRuleArrayOutput {
return o
}
func (o DataExportRuleArrayOutput) Index(i pulumi.IntInput) DataExportRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataExportRule {
return vs[0].([]*DataExportRule)[vs[1].(int)]
}).(DataExportRuleOutput)
}
type DataExportRuleMapOutput struct{ *pulumi.OutputState }
func (DataExportRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataExportRule)(nil)).Elem()
}
func (o DataExportRuleMapOutput) ToDataExportRuleMapOutput() DataExportRuleMapOutput {
return o
}
func (o DataExportRuleMapOutput) ToDataExportRuleMapOutputWithContext(ctx context.Context) DataExportRuleMapOutput {
return o
}
func (o DataExportRuleMapOutput) MapIndex(k pulumi.StringInput) DataExportRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataExportRule {
return vs[0].(map[string]*DataExportRule)[vs[1].(string)]
}).(DataExportRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataExportRuleInput)(nil)).Elem(), &DataExportRule{})
pulumi.RegisterInputType(reflect.TypeOf((*DataExportRuleArrayInput)(nil)).Elem(), DataExportRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataExportRuleMapInput)(nil)).Elem(), DataExportRuleMap{})
pulumi.RegisterOutputType(DataExportRuleOutput{})
pulumi.RegisterOutputType(DataExportRuleArrayOutput{})
pulumi.RegisterOutputType(DataExportRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/init.go | sdk/go/azure/loganalytics/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:loganalytics/cluster:Cluster":
r = &Cluster{}
case "azure:loganalytics/clusterCustomerManagedKey:ClusterCustomerManagedKey":
r = &ClusterCustomerManagedKey{}
case "azure:loganalytics/dataExportRule:DataExportRule":
r = &DataExportRule{}
case "azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent":
r = &DataSourceWindowsEvent{}
case "azure:loganalytics/dataSourceWindowsPerformanceCounter:DataSourceWindowsPerformanceCounter":
r = &DataSourceWindowsPerformanceCounter{}
case "azure:loganalytics/linkedService:LinkedService":
r = &LinkedService{}
case "azure:loganalytics/linkedStorageAccount:LinkedStorageAccount":
r = &LinkedStorageAccount{}
case "azure:loganalytics/queryPack:QueryPack":
r = &QueryPack{}
case "azure:loganalytics/savedSearch:SavedSearch":
r = &SavedSearch{}
case "azure:loganalytics/storageInsights:StorageInsights":
r = &StorageInsights{}
case "azure:loganalytics/workspaceTable:WorkspaceTable":
r = &WorkspaceTable{}
case "azure:loganalytics/workspaceTableCustomLog:WorkspaceTableCustomLog":
r = &WorkspaceTableCustomLog{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"loganalytics/cluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/clusterCustomerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/dataExportRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/dataSourceWindowsEvent",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/dataSourceWindowsPerformanceCounter",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/linkedService",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/linkedStorageAccount",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/queryPack",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/savedSearch",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/storageInsights",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/workspaceTable",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"loganalytics/workspaceTableCustomLog",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/pulumiTypes.go | sdk/go/azure/loganalytics/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type ClusterIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Windows Web App Slot. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Log Analytics Cluster. Possible values are `SystemAssigned` and `UserAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Log Analytics Cluster has been created. More details are available below.
Type string `pulumi:"type"`
}
// ClusterIdentityInput is an input type that accepts ClusterIdentityArgs and ClusterIdentityOutput values.
// You can construct a concrete instance of `ClusterIdentityInput` via:
//
// ClusterIdentityArgs{...}
type ClusterIdentityInput interface {
pulumi.Input
ToClusterIdentityOutput() ClusterIdentityOutput
ToClusterIdentityOutputWithContext(context.Context) ClusterIdentityOutput
}
type ClusterIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Windows Web App Slot. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Log Analytics Cluster. Possible values are `SystemAssigned` and `UserAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Log Analytics Cluster has been created. More details are available below.
Type pulumi.StringInput `pulumi:"type"`
}
func (ClusterIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIdentity)(nil)).Elem()
}
func (i ClusterIdentityArgs) ToClusterIdentityOutput() ClusterIdentityOutput {
return i.ToClusterIdentityOutputWithContext(context.Background())
}
func (i ClusterIdentityArgs) ToClusterIdentityOutputWithContext(ctx context.Context) ClusterIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityOutput)
}
func (i ClusterIdentityArgs) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return i.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (i ClusterIdentityArgs) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityOutput).ToClusterIdentityPtrOutputWithContext(ctx)
}
// ClusterIdentityPtrInput is an input type that accepts ClusterIdentityArgs, ClusterIdentityPtr and ClusterIdentityPtrOutput values.
// You can construct a concrete instance of `ClusterIdentityPtrInput` via:
//
// ClusterIdentityArgs{...}
//
// or:
//
// nil
type ClusterIdentityPtrInput interface {
pulumi.Input
ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput
ToClusterIdentityPtrOutputWithContext(context.Context) ClusterIdentityPtrOutput
}
type clusterIdentityPtrType ClusterIdentityArgs
func ClusterIdentityPtr(v *ClusterIdentityArgs) ClusterIdentityPtrInput {
return (*clusterIdentityPtrType)(v)
}
func (*clusterIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIdentity)(nil)).Elem()
}
func (i *clusterIdentityPtrType) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return i.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (i *clusterIdentityPtrType) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityPtrOutput)
}
type ClusterIdentityOutput struct{ *pulumi.OutputState }
func (ClusterIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIdentity)(nil)).Elem()
}
func (o ClusterIdentityOutput) ToClusterIdentityOutput() ClusterIdentityOutput {
return o
}
func (o ClusterIdentityOutput) ToClusterIdentityOutputWithContext(ctx context.Context) ClusterIdentityOutput {
return o
}
func (o ClusterIdentityOutput) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return o.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (o ClusterIdentityOutput) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterIdentity) *ClusterIdentity {
return &v
}).(ClusterIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Windows Web App Slot. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o ClusterIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v ClusterIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Log Analytics Cluster. Possible values are `SystemAssigned` and `UserAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Log Analytics Cluster has been created. More details are available below.
func (o ClusterIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ClusterIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ClusterIdentityPtrOutput struct{ *pulumi.OutputState }
func (ClusterIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIdentity)(nil)).Elem()
}
func (o ClusterIdentityPtrOutput) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return o
}
func (o ClusterIdentityPtrOutput) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return o
}
func (o ClusterIdentityPtrOutput) Elem() ClusterIdentityOutput {
return o.ApplyT(func(v *ClusterIdentity) ClusterIdentity {
if v != nil {
return *v
}
var ret ClusterIdentity
return ret
}).(ClusterIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Windows Web App Slot. Changing this forces a new resource to be created.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o ClusterIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ClusterIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Log Analytics Cluster. Possible values are `SystemAssigned` and `UserAssigned`. Changing this forces a new resource to be created.
//
// > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Log Analytics Cluster has been created. More details are available below.
func (o ClusterIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type WorkspaceTableCustomLogColumn struct {
// The description of the column.
Description *string `pulumi:"description"`
// The display name of the column.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the column.
Name string `pulumi:"name"`
// The data type of the column. Possible values are `boolean`, `datetime`, `dynamic`, `guid`, `int`, `long`, `real`, and `string`.
Type string `pulumi:"type"`
}
// WorkspaceTableCustomLogColumnInput is an input type that accepts WorkspaceTableCustomLogColumnArgs and WorkspaceTableCustomLogColumnOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogColumnInput` via:
//
// WorkspaceTableCustomLogColumnArgs{...}
type WorkspaceTableCustomLogColumnInput interface {
pulumi.Input
ToWorkspaceTableCustomLogColumnOutput() WorkspaceTableCustomLogColumnOutput
ToWorkspaceTableCustomLogColumnOutputWithContext(context.Context) WorkspaceTableCustomLogColumnOutput
}
type WorkspaceTableCustomLogColumnArgs struct {
// The description of the column.
Description pulumi.StringPtrInput `pulumi:"description"`
// The display name of the column.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
// Specifies the name of the column.
Name pulumi.StringInput `pulumi:"name"`
// The data type of the column. Possible values are `boolean`, `datetime`, `dynamic`, `guid`, `int`, `long`, `real`, and `string`.
Type pulumi.StringInput `pulumi:"type"`
}
func (WorkspaceTableCustomLogColumnArgs) ElementType() reflect.Type {
return reflect.TypeOf((*WorkspaceTableCustomLogColumn)(nil)).Elem()
}
func (i WorkspaceTableCustomLogColumnArgs) ToWorkspaceTableCustomLogColumnOutput() WorkspaceTableCustomLogColumnOutput {
return i.ToWorkspaceTableCustomLogColumnOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogColumnArgs) ToWorkspaceTableCustomLogColumnOutputWithContext(ctx context.Context) WorkspaceTableCustomLogColumnOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogColumnOutput)
}
// WorkspaceTableCustomLogColumnArrayInput is an input type that accepts WorkspaceTableCustomLogColumnArray and WorkspaceTableCustomLogColumnArrayOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogColumnArrayInput` via:
//
// WorkspaceTableCustomLogColumnArray{ WorkspaceTableCustomLogColumnArgs{...} }
type WorkspaceTableCustomLogColumnArrayInput interface {
pulumi.Input
ToWorkspaceTableCustomLogColumnArrayOutput() WorkspaceTableCustomLogColumnArrayOutput
ToWorkspaceTableCustomLogColumnArrayOutputWithContext(context.Context) WorkspaceTableCustomLogColumnArrayOutput
}
type WorkspaceTableCustomLogColumnArray []WorkspaceTableCustomLogColumnInput
func (WorkspaceTableCustomLogColumnArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]WorkspaceTableCustomLogColumn)(nil)).Elem()
}
func (i WorkspaceTableCustomLogColumnArray) ToWorkspaceTableCustomLogColumnArrayOutput() WorkspaceTableCustomLogColumnArrayOutput {
return i.ToWorkspaceTableCustomLogColumnArrayOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogColumnArray) ToWorkspaceTableCustomLogColumnArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogColumnArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogColumnArrayOutput)
}
type WorkspaceTableCustomLogColumnOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogColumnOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WorkspaceTableCustomLogColumn)(nil)).Elem()
}
func (o WorkspaceTableCustomLogColumnOutput) ToWorkspaceTableCustomLogColumnOutput() WorkspaceTableCustomLogColumnOutput {
return o
}
func (o WorkspaceTableCustomLogColumnOutput) ToWorkspaceTableCustomLogColumnOutputWithContext(ctx context.Context) WorkspaceTableCustomLogColumnOutput {
return o
}
// The description of the column.
func (o WorkspaceTableCustomLogColumnOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogColumn) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of the column.
func (o WorkspaceTableCustomLogColumnOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogColumn) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the column.
func (o WorkspaceTableCustomLogColumnOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogColumn) string { return v.Name }).(pulumi.StringOutput)
}
// The data type of the column. Possible values are `boolean`, `datetime`, `dynamic`, `guid`, `int`, `long`, `real`, and `string`.
func (o WorkspaceTableCustomLogColumnOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogColumn) string { return v.Type }).(pulumi.StringOutput)
}
type WorkspaceTableCustomLogColumnArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogColumnArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]WorkspaceTableCustomLogColumn)(nil)).Elem()
}
func (o WorkspaceTableCustomLogColumnArrayOutput) ToWorkspaceTableCustomLogColumnArrayOutput() WorkspaceTableCustomLogColumnArrayOutput {
return o
}
func (o WorkspaceTableCustomLogColumnArrayOutput) ToWorkspaceTableCustomLogColumnArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogColumnArrayOutput {
return o
}
func (o WorkspaceTableCustomLogColumnArrayOutput) Index(i pulumi.IntInput) WorkspaceTableCustomLogColumnOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) WorkspaceTableCustomLogColumn {
return vs[0].([]WorkspaceTableCustomLogColumn)[vs[1].(int)]
}).(WorkspaceTableCustomLogColumnOutput)
}
type WorkspaceTableCustomLogStandardColumn struct {
// The description of the table.
Description *string `pulumi:"description"`
// The display name of the table.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name *string `pulumi:"name"`
// The data type of the standard column.
Type *string `pulumi:"type"`
}
// WorkspaceTableCustomLogStandardColumnInput is an input type that accepts WorkspaceTableCustomLogStandardColumnArgs and WorkspaceTableCustomLogStandardColumnOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogStandardColumnInput` via:
//
// WorkspaceTableCustomLogStandardColumnArgs{...}
type WorkspaceTableCustomLogStandardColumnInput interface {
pulumi.Input
ToWorkspaceTableCustomLogStandardColumnOutput() WorkspaceTableCustomLogStandardColumnOutput
ToWorkspaceTableCustomLogStandardColumnOutputWithContext(context.Context) WorkspaceTableCustomLogStandardColumnOutput
}
type WorkspaceTableCustomLogStandardColumnArgs struct {
// The description of the table.
Description pulumi.StringPtrInput `pulumi:"description"`
// The display name of the table.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name pulumi.StringPtrInput `pulumi:"name"`
// The data type of the standard column.
Type pulumi.StringPtrInput `pulumi:"type"`
}
func (WorkspaceTableCustomLogStandardColumnArgs) ElementType() reflect.Type {
return reflect.TypeOf((*WorkspaceTableCustomLogStandardColumn)(nil)).Elem()
}
func (i WorkspaceTableCustomLogStandardColumnArgs) ToWorkspaceTableCustomLogStandardColumnOutput() WorkspaceTableCustomLogStandardColumnOutput {
return i.ToWorkspaceTableCustomLogStandardColumnOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogStandardColumnArgs) ToWorkspaceTableCustomLogStandardColumnOutputWithContext(ctx context.Context) WorkspaceTableCustomLogStandardColumnOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogStandardColumnOutput)
}
// WorkspaceTableCustomLogStandardColumnArrayInput is an input type that accepts WorkspaceTableCustomLogStandardColumnArray and WorkspaceTableCustomLogStandardColumnArrayOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogStandardColumnArrayInput` via:
//
// WorkspaceTableCustomLogStandardColumnArray{ WorkspaceTableCustomLogStandardColumnArgs{...} }
type WorkspaceTableCustomLogStandardColumnArrayInput interface {
pulumi.Input
ToWorkspaceTableCustomLogStandardColumnArrayOutput() WorkspaceTableCustomLogStandardColumnArrayOutput
ToWorkspaceTableCustomLogStandardColumnArrayOutputWithContext(context.Context) WorkspaceTableCustomLogStandardColumnArrayOutput
}
type WorkspaceTableCustomLogStandardColumnArray []WorkspaceTableCustomLogStandardColumnInput
func (WorkspaceTableCustomLogStandardColumnArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]WorkspaceTableCustomLogStandardColumn)(nil)).Elem()
}
func (i WorkspaceTableCustomLogStandardColumnArray) ToWorkspaceTableCustomLogStandardColumnArrayOutput() WorkspaceTableCustomLogStandardColumnArrayOutput {
return i.ToWorkspaceTableCustomLogStandardColumnArrayOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogStandardColumnArray) ToWorkspaceTableCustomLogStandardColumnArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogStandardColumnArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogStandardColumnArrayOutput)
}
type WorkspaceTableCustomLogStandardColumnOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogStandardColumnOutput) ElementType() reflect.Type {
return reflect.TypeOf((*WorkspaceTableCustomLogStandardColumn)(nil)).Elem()
}
func (o WorkspaceTableCustomLogStandardColumnOutput) ToWorkspaceTableCustomLogStandardColumnOutput() WorkspaceTableCustomLogStandardColumnOutput {
return o
}
func (o WorkspaceTableCustomLogStandardColumnOutput) ToWorkspaceTableCustomLogStandardColumnOutputWithContext(ctx context.Context) WorkspaceTableCustomLogStandardColumnOutput {
return o
}
// The description of the table.
func (o WorkspaceTableCustomLogStandardColumnOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogStandardColumn) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of the table.
func (o WorkspaceTableCustomLogStandardColumnOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogStandardColumn) *string { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
func (o WorkspaceTableCustomLogStandardColumnOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogStandardColumn) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The data type of the standard column.
func (o WorkspaceTableCustomLogStandardColumnOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v WorkspaceTableCustomLogStandardColumn) *string { return v.Type }).(pulumi.StringPtrOutput)
}
type WorkspaceTableCustomLogStandardColumnArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogStandardColumnArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]WorkspaceTableCustomLogStandardColumn)(nil)).Elem()
}
func (o WorkspaceTableCustomLogStandardColumnArrayOutput) ToWorkspaceTableCustomLogStandardColumnArrayOutput() WorkspaceTableCustomLogStandardColumnArrayOutput {
return o
}
func (o WorkspaceTableCustomLogStandardColumnArrayOutput) ToWorkspaceTableCustomLogStandardColumnArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogStandardColumnArrayOutput {
return o
}
func (o WorkspaceTableCustomLogStandardColumnArrayOutput) Index(i pulumi.IntInput) WorkspaceTableCustomLogStandardColumnOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) WorkspaceTableCustomLogStandardColumn {
return vs[0].([]WorkspaceTableCustomLogStandardColumn)[vs[1].(int)]
}).(WorkspaceTableCustomLogStandardColumnOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterIdentityInput)(nil)).Elem(), ClusterIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterIdentityPtrInput)(nil)).Elem(), ClusterIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogColumnInput)(nil)).Elem(), WorkspaceTableCustomLogColumnArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogColumnArrayInput)(nil)).Elem(), WorkspaceTableCustomLogColumnArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogStandardColumnInput)(nil)).Elem(), WorkspaceTableCustomLogStandardColumnArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogStandardColumnArrayInput)(nil)).Elem(), WorkspaceTableCustomLogStandardColumnArray{})
pulumi.RegisterOutputType(ClusterIdentityOutput{})
pulumi.RegisterOutputType(ClusterIdentityPtrOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogColumnOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogColumnArrayOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogStandardColumnOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogStandardColumnArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/getWorkspaceTable.go | sdk/go/azure/loganalytics/getWorkspaceTable.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Log Analytics Workspace Table.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := loganalytics.LookupWorkspaceTable(ctx, &loganalytics.LookupWorkspaceTableArgs{
// Name: "InsightsMetrics",
// WorkspaceId: exampleAzurermLogAnalyticsWorkspace.Id,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("retentionInDays", example.RetentionInDays)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2022-10-01
func LookupWorkspaceTable(ctx *pulumi.Context, args *LookupWorkspaceTableArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceTableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupWorkspaceTableResult
err := ctx.Invoke("azure:loganalytics/getWorkspaceTable:getWorkspaceTable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getWorkspaceTable.
type LookupWorkspaceTableArgs struct {
// The name of this Log Analytics Workspace Table.
Name string `pulumi:"name"`
// The ID of the Log Analytics Workspace the table belongs to.
WorkspaceId string `pulumi:"workspaceId"`
}
// A collection of values returned by getWorkspaceTable.
type LookupWorkspaceTableResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The billing plan information for the Log Analytics Workspace Table.
Plan string `pulumi:"plan"`
// The table's data retention in days.
RetentionInDays int `pulumi:"retentionInDays"`
// The table's total data retention in days.
TotalRetentionInDays int `pulumi:"totalRetentionInDays"`
WorkspaceId string `pulumi:"workspaceId"`
}
func LookupWorkspaceTableOutput(ctx *pulumi.Context, args LookupWorkspaceTableOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceTableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupWorkspaceTableResultOutput, error) {
args := v.(LookupWorkspaceTableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:loganalytics/getWorkspaceTable:getWorkspaceTable", args, LookupWorkspaceTableResultOutput{}, options).(LookupWorkspaceTableResultOutput), nil
}).(LookupWorkspaceTableResultOutput)
}
// A collection of arguments for invoking getWorkspaceTable.
type LookupWorkspaceTableOutputArgs struct {
// The name of this Log Analytics Workspace Table.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the Log Analytics Workspace the table belongs to.
WorkspaceId pulumi.StringInput `pulumi:"workspaceId"`
}
func (LookupWorkspaceTableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceTableArgs)(nil)).Elem()
}
// A collection of values returned by getWorkspaceTable.
type LookupWorkspaceTableResultOutput struct{ *pulumi.OutputState }
func (LookupWorkspaceTableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceTableResult)(nil)).Elem()
}
func (o LookupWorkspaceTableResultOutput) ToLookupWorkspaceTableResultOutput() LookupWorkspaceTableResultOutput {
return o
}
func (o LookupWorkspaceTableResultOutput) ToLookupWorkspaceTableResultOutputWithContext(ctx context.Context) LookupWorkspaceTableResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupWorkspaceTableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupWorkspaceTableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) string { return v.Name }).(pulumi.StringOutput)
}
// The billing plan information for the Log Analytics Workspace Table.
func (o LookupWorkspaceTableResultOutput) Plan() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) string { return v.Plan }).(pulumi.StringOutput)
}
// The table's data retention in days.
func (o LookupWorkspaceTableResultOutput) RetentionInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) int { return v.RetentionInDays }).(pulumi.IntOutput)
}
// The table's total data retention in days.
func (o LookupWorkspaceTableResultOutput) TotalRetentionInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) int { return v.TotalRetentionInDays }).(pulumi.IntOutput)
}
func (o LookupWorkspaceTableResultOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceTableResult) string { return v.WorkspaceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupWorkspaceTableResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/savedSearch.go | sdk/go/azure/loganalytics/savedSearch.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics (formally Operational Insights) Saved Search.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("acctest-01"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewSavedSearch(ctx, "example", &loganalytics.SavedSearchArgs{
// Name: pulumi.String("exampleSavedSearch"),
// LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(),
// Category: pulumi.String("exampleCategory"),
// DisplayName: pulumi.String("exampleDisplayName"),
// Query: pulumi.String("exampleQuery"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Saved Searches can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/savedSearch:SavedSearch search1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/savedSearches/search1
// ```
type SavedSearch struct {
pulumi.CustomResourceState
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
Category pulumi.StringOutput `pulumi:"category"`
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
FunctionAlias pulumi.StringPtrOutput `pulumi:"functionAlias"`
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
FunctionParameters pulumi.StringArrayOutput `pulumi:"functionParameters"`
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"`
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The query expression for the saved search. Changing this forces a new resource to be created.
Query pulumi.StringOutput `pulumi:"query"`
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewSavedSearch registers a new resource with the given unique name, arguments, and options.
func NewSavedSearch(ctx *pulumi.Context,
name string, args *SavedSearchArgs, opts ...pulumi.ResourceOption) (*SavedSearch, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Category == nil {
return nil, errors.New("invalid value for required argument 'Category'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.LogAnalyticsWorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'")
}
if args.Query == nil {
return nil, errors.New("invalid value for required argument 'Query'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SavedSearch
err := ctx.RegisterResource("azure:loganalytics/savedSearch:SavedSearch", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSavedSearch gets an existing SavedSearch resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSavedSearch(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SavedSearchState, opts ...pulumi.ResourceOption) (*SavedSearch, error) {
var resource SavedSearch
err := ctx.ReadResource("azure:loganalytics/savedSearch:SavedSearch", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SavedSearch resources.
type savedSearchState struct {
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
Category *string `pulumi:"category"`
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
DisplayName *string `pulumi:"displayName"`
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
FunctionAlias *string `pulumi:"functionAlias"`
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
FunctionParameters []string `pulumi:"functionParameters"`
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"`
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The query expression for the saved search. Changing this forces a new resource to be created.
Query *string `pulumi:"query"`
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
Tags map[string]string `pulumi:"tags"`
}
type SavedSearchState struct {
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
Category pulumi.StringPtrInput
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
DisplayName pulumi.StringPtrInput
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
FunctionAlias pulumi.StringPtrInput
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
FunctionParameters pulumi.StringArrayInput
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId pulumi.StringPtrInput
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The query expression for the saved search. Changing this forces a new resource to be created.
Query pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
Tags pulumi.StringMapInput
}
func (SavedSearchState) ElementType() reflect.Type {
return reflect.TypeOf((*savedSearchState)(nil)).Elem()
}
type savedSearchArgs struct {
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
Category string `pulumi:"category"`
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
DisplayName string `pulumi:"displayName"`
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
FunctionAlias *string `pulumi:"functionAlias"`
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
FunctionParameters []string `pulumi:"functionParameters"`
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"`
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The query expression for the saved search. Changing this forces a new resource to be created.
Query string `pulumi:"query"`
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a SavedSearch resource.
type SavedSearchArgs struct {
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
Category pulumi.StringInput
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
DisplayName pulumi.StringInput
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
FunctionAlias pulumi.StringPtrInput
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
FunctionParameters pulumi.StringArrayInput
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId pulumi.StringInput
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The query expression for the saved search. Changing this forces a new resource to be created.
Query pulumi.StringInput
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
Tags pulumi.StringMapInput
}
func (SavedSearchArgs) ElementType() reflect.Type {
return reflect.TypeOf((*savedSearchArgs)(nil)).Elem()
}
type SavedSearchInput interface {
pulumi.Input
ToSavedSearchOutput() SavedSearchOutput
ToSavedSearchOutputWithContext(ctx context.Context) SavedSearchOutput
}
func (*SavedSearch) ElementType() reflect.Type {
return reflect.TypeOf((**SavedSearch)(nil)).Elem()
}
func (i *SavedSearch) ToSavedSearchOutput() SavedSearchOutput {
return i.ToSavedSearchOutputWithContext(context.Background())
}
func (i *SavedSearch) ToSavedSearchOutputWithContext(ctx context.Context) SavedSearchOutput {
return pulumi.ToOutputWithContext(ctx, i).(SavedSearchOutput)
}
// SavedSearchArrayInput is an input type that accepts SavedSearchArray and SavedSearchArrayOutput values.
// You can construct a concrete instance of `SavedSearchArrayInput` via:
//
// SavedSearchArray{ SavedSearchArgs{...} }
type SavedSearchArrayInput interface {
pulumi.Input
ToSavedSearchArrayOutput() SavedSearchArrayOutput
ToSavedSearchArrayOutputWithContext(context.Context) SavedSearchArrayOutput
}
type SavedSearchArray []SavedSearchInput
func (SavedSearchArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SavedSearch)(nil)).Elem()
}
func (i SavedSearchArray) ToSavedSearchArrayOutput() SavedSearchArrayOutput {
return i.ToSavedSearchArrayOutputWithContext(context.Background())
}
func (i SavedSearchArray) ToSavedSearchArrayOutputWithContext(ctx context.Context) SavedSearchArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SavedSearchArrayOutput)
}
// SavedSearchMapInput is an input type that accepts SavedSearchMap and SavedSearchMapOutput values.
// You can construct a concrete instance of `SavedSearchMapInput` via:
//
// SavedSearchMap{ "key": SavedSearchArgs{...} }
type SavedSearchMapInput interface {
pulumi.Input
ToSavedSearchMapOutput() SavedSearchMapOutput
ToSavedSearchMapOutputWithContext(context.Context) SavedSearchMapOutput
}
type SavedSearchMap map[string]SavedSearchInput
func (SavedSearchMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SavedSearch)(nil)).Elem()
}
func (i SavedSearchMap) ToSavedSearchMapOutput() SavedSearchMapOutput {
return i.ToSavedSearchMapOutputWithContext(context.Background())
}
func (i SavedSearchMap) ToSavedSearchMapOutputWithContext(ctx context.Context) SavedSearchMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SavedSearchMapOutput)
}
type SavedSearchOutput struct{ *pulumi.OutputState }
func (SavedSearchOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SavedSearch)(nil)).Elem()
}
func (o SavedSearchOutput) ToSavedSearchOutput() SavedSearchOutput {
return o
}
func (o SavedSearchOutput) ToSavedSearchOutputWithContext(ctx context.Context) SavedSearchOutput {
return o
}
// The category that the Saved Search will be listed under. Changing this forces a new resource to be created.
func (o SavedSearchOutput) Category() pulumi.StringOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringOutput { return v.Category }).(pulumi.StringOutput)
}
// The name that Saved Search will be displayed as. Changing this forces a new resource to be created.
func (o SavedSearchOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The function alias if the query serves as a function. Changing this forces a new resource to be created.
func (o SavedSearchOutput) FunctionAlias() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringPtrOutput { return v.FunctionAlias }).(pulumi.StringPtrOutput)
}
// The function parameters if the query serves as a function. Changing this forces a new resource to be created. For more examples and proper syntax please refer to [this document](https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions).
func (o SavedSearchOutput) FunctionParameters() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringArrayOutput { return v.FunctionParameters }).(pulumi.StringArrayOutput)
}
// Specifies the ID of the Log Analytics Workspace that the Saved Search will be associated with. Changing this forces a new resource to be created.
func (o SavedSearchOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput)
}
// Specifies the name of the Log Analytics Saved Search. Changing this forces a new resource to be created.
func (o SavedSearchOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The query expression for the saved search. Changing this forces a new resource to be created.
func (o SavedSearchOutput) Query() pulumi.StringOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringOutput { return v.Query }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Logs Analytics Saved Search. Changing this forces a new resource to be created.
func (o SavedSearchOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SavedSearch) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type SavedSearchArrayOutput struct{ *pulumi.OutputState }
func (SavedSearchArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SavedSearch)(nil)).Elem()
}
func (o SavedSearchArrayOutput) ToSavedSearchArrayOutput() SavedSearchArrayOutput {
return o
}
func (o SavedSearchArrayOutput) ToSavedSearchArrayOutputWithContext(ctx context.Context) SavedSearchArrayOutput {
return o
}
func (o SavedSearchArrayOutput) Index(i pulumi.IntInput) SavedSearchOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SavedSearch {
return vs[0].([]*SavedSearch)[vs[1].(int)]
}).(SavedSearchOutput)
}
type SavedSearchMapOutput struct{ *pulumi.OutputState }
func (SavedSearchMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SavedSearch)(nil)).Elem()
}
func (o SavedSearchMapOutput) ToSavedSearchMapOutput() SavedSearchMapOutput {
return o
}
func (o SavedSearchMapOutput) ToSavedSearchMapOutputWithContext(ctx context.Context) SavedSearchMapOutput {
return o
}
func (o SavedSearchMapOutput) MapIndex(k pulumi.StringInput) SavedSearchOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SavedSearch {
return vs[0].(map[string]*SavedSearch)[vs[1].(string)]
}).(SavedSearchOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SavedSearchInput)(nil)).Elem(), &SavedSearch{})
pulumi.RegisterInputType(reflect.TypeOf((*SavedSearchArrayInput)(nil)).Elem(), SavedSearchArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SavedSearchMapInput)(nil)).Elem(), SavedSearchMap{})
pulumi.RegisterOutputType(SavedSearchOutput{})
pulumi.RegisterOutputType(SavedSearchArrayOutput{})
pulumi.RegisterOutputType(SavedSearchMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/dataSourceWindowsEvent.go | sdk/go/azure/loganalytics/dataSourceWindowsEvent.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Windows Event DataSource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("example-law"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewDataSourceWindowsEvent(ctx, "example", &loganalytics.DataSourceWindowsEventArgs{
// Name: pulumi.String("example-lad-wpc"),
// ResourceGroupName: example.Name,
// WorkspaceName: exampleAnalyticsWorkspace.Name,
// EventLogName: pulumi.String("Application"),
// EventTypes: pulumi.StringArray{
// pulumi.String("Error"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Windows Event DataSources can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataSources/datasource1
// ```
type DataSourceWindowsEvent struct {
pulumi.CustomResourceState
// Specifies the name of the Windows Event Log to collect events from.
EventLogName pulumi.StringOutput `pulumi:"eventLogName"`
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
EventTypes pulumi.StringArrayOutput `pulumi:"eventTypes"`
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
}
// NewDataSourceWindowsEvent registers a new resource with the given unique name, arguments, and options.
func NewDataSourceWindowsEvent(ctx *pulumi.Context,
name string, args *DataSourceWindowsEventArgs, opts ...pulumi.ResourceOption) (*DataSourceWindowsEvent, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EventLogName == nil {
return nil, errors.New("invalid value for required argument 'EventLogName'")
}
if args.EventTypes == nil {
return nil, errors.New("invalid value for required argument 'EventTypes'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.WorkspaceName == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DataSourceWindowsEvent
err := ctx.RegisterResource("azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataSourceWindowsEvent gets an existing DataSourceWindowsEvent resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDataSourceWindowsEvent(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataSourceWindowsEventState, opts ...pulumi.ResourceOption) (*DataSourceWindowsEvent, error) {
var resource DataSourceWindowsEvent
err := ctx.ReadResource("azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataSourceWindowsEvent resources.
type dataSourceWindowsEventState struct {
// Specifies the name of the Windows Event Log to collect events from.
EventLogName *string `pulumi:"eventLogName"`
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
EventTypes []string `pulumi:"eventTypes"`
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
WorkspaceName *string `pulumi:"workspaceName"`
}
type DataSourceWindowsEventState struct {
// Specifies the name of the Windows Event Log to collect events from.
EventLogName pulumi.StringPtrInput
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
EventTypes pulumi.StringArrayInput
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
ResourceGroupName pulumi.StringPtrInput
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
WorkspaceName pulumi.StringPtrInput
}
func (DataSourceWindowsEventState) ElementType() reflect.Type {
return reflect.TypeOf((*dataSourceWindowsEventState)(nil)).Elem()
}
type dataSourceWindowsEventArgs struct {
// Specifies the name of the Windows Event Log to collect events from.
EventLogName string `pulumi:"eventLogName"`
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
EventTypes []string `pulumi:"eventTypes"`
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
WorkspaceName string `pulumi:"workspaceName"`
}
// The set of arguments for constructing a DataSourceWindowsEvent resource.
type DataSourceWindowsEventArgs struct {
// Specifies the name of the Windows Event Log to collect events from.
EventLogName pulumi.StringInput
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
EventTypes pulumi.StringArrayInput
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
ResourceGroupName pulumi.StringInput
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
WorkspaceName pulumi.StringInput
}
func (DataSourceWindowsEventArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataSourceWindowsEventArgs)(nil)).Elem()
}
type DataSourceWindowsEventInput interface {
pulumi.Input
ToDataSourceWindowsEventOutput() DataSourceWindowsEventOutput
ToDataSourceWindowsEventOutputWithContext(ctx context.Context) DataSourceWindowsEventOutput
}
func (*DataSourceWindowsEvent) ElementType() reflect.Type {
return reflect.TypeOf((**DataSourceWindowsEvent)(nil)).Elem()
}
func (i *DataSourceWindowsEvent) ToDataSourceWindowsEventOutput() DataSourceWindowsEventOutput {
return i.ToDataSourceWindowsEventOutputWithContext(context.Background())
}
func (i *DataSourceWindowsEvent) ToDataSourceWindowsEventOutputWithContext(ctx context.Context) DataSourceWindowsEventOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsEventOutput)
}
// DataSourceWindowsEventArrayInput is an input type that accepts DataSourceWindowsEventArray and DataSourceWindowsEventArrayOutput values.
// You can construct a concrete instance of `DataSourceWindowsEventArrayInput` via:
//
// DataSourceWindowsEventArray{ DataSourceWindowsEventArgs{...} }
type DataSourceWindowsEventArrayInput interface {
pulumi.Input
ToDataSourceWindowsEventArrayOutput() DataSourceWindowsEventArrayOutput
ToDataSourceWindowsEventArrayOutputWithContext(context.Context) DataSourceWindowsEventArrayOutput
}
type DataSourceWindowsEventArray []DataSourceWindowsEventInput
func (DataSourceWindowsEventArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataSourceWindowsEvent)(nil)).Elem()
}
func (i DataSourceWindowsEventArray) ToDataSourceWindowsEventArrayOutput() DataSourceWindowsEventArrayOutput {
return i.ToDataSourceWindowsEventArrayOutputWithContext(context.Background())
}
func (i DataSourceWindowsEventArray) ToDataSourceWindowsEventArrayOutputWithContext(ctx context.Context) DataSourceWindowsEventArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsEventArrayOutput)
}
// DataSourceWindowsEventMapInput is an input type that accepts DataSourceWindowsEventMap and DataSourceWindowsEventMapOutput values.
// You can construct a concrete instance of `DataSourceWindowsEventMapInput` via:
//
// DataSourceWindowsEventMap{ "key": DataSourceWindowsEventArgs{...} }
type DataSourceWindowsEventMapInput interface {
pulumi.Input
ToDataSourceWindowsEventMapOutput() DataSourceWindowsEventMapOutput
ToDataSourceWindowsEventMapOutputWithContext(context.Context) DataSourceWindowsEventMapOutput
}
type DataSourceWindowsEventMap map[string]DataSourceWindowsEventInput
func (DataSourceWindowsEventMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataSourceWindowsEvent)(nil)).Elem()
}
func (i DataSourceWindowsEventMap) ToDataSourceWindowsEventMapOutput() DataSourceWindowsEventMapOutput {
return i.ToDataSourceWindowsEventMapOutputWithContext(context.Background())
}
func (i DataSourceWindowsEventMap) ToDataSourceWindowsEventMapOutputWithContext(ctx context.Context) DataSourceWindowsEventMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsEventMapOutput)
}
type DataSourceWindowsEventOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsEventOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataSourceWindowsEvent)(nil)).Elem()
}
func (o DataSourceWindowsEventOutput) ToDataSourceWindowsEventOutput() DataSourceWindowsEventOutput {
return o
}
func (o DataSourceWindowsEventOutput) ToDataSourceWindowsEventOutputWithContext(ctx context.Context) DataSourceWindowsEventOutput {
return o
}
// Specifies the name of the Windows Event Log to collect events from.
func (o DataSourceWindowsEventOutput) EventLogName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsEvent) pulumi.StringOutput { return v.EventLogName }).(pulumi.StringOutput)
}
// Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
func (o DataSourceWindowsEventOutput) EventTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DataSourceWindowsEvent) pulumi.StringArrayOutput { return v.EventTypes }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
func (o DataSourceWindowsEventOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsEvent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
func (o DataSourceWindowsEventOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsEvent) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
func (o DataSourceWindowsEventOutput) WorkspaceName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsEvent) pulumi.StringOutput { return v.WorkspaceName }).(pulumi.StringOutput)
}
type DataSourceWindowsEventArrayOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsEventArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataSourceWindowsEvent)(nil)).Elem()
}
func (o DataSourceWindowsEventArrayOutput) ToDataSourceWindowsEventArrayOutput() DataSourceWindowsEventArrayOutput {
return o
}
func (o DataSourceWindowsEventArrayOutput) ToDataSourceWindowsEventArrayOutputWithContext(ctx context.Context) DataSourceWindowsEventArrayOutput {
return o
}
func (o DataSourceWindowsEventArrayOutput) Index(i pulumi.IntInput) DataSourceWindowsEventOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataSourceWindowsEvent {
return vs[0].([]*DataSourceWindowsEvent)[vs[1].(int)]
}).(DataSourceWindowsEventOutput)
}
type DataSourceWindowsEventMapOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsEventMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataSourceWindowsEvent)(nil)).Elem()
}
func (o DataSourceWindowsEventMapOutput) ToDataSourceWindowsEventMapOutput() DataSourceWindowsEventMapOutput {
return o
}
func (o DataSourceWindowsEventMapOutput) ToDataSourceWindowsEventMapOutputWithContext(ctx context.Context) DataSourceWindowsEventMapOutput {
return o
}
func (o DataSourceWindowsEventMapOutput) MapIndex(k pulumi.StringInput) DataSourceWindowsEventOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataSourceWindowsEvent {
return vs[0].(map[string]*DataSourceWindowsEvent)[vs[1].(string)]
}).(DataSourceWindowsEventOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsEventInput)(nil)).Elem(), &DataSourceWindowsEvent{})
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsEventArrayInput)(nil)).Elem(), DataSourceWindowsEventArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsEventMapInput)(nil)).Elem(), DataSourceWindowsEventMap{})
pulumi.RegisterOutputType(DataSourceWindowsEventOutput{})
pulumi.RegisterOutputType(DataSourceWindowsEventArrayOutput{})
pulumi.RegisterOutputType(DataSourceWindowsEventMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/cluster.go | sdk/go/azure/loganalytics/cluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// > **Note:** Log Analytics Clusters are subject to 14-day soft delete policy. Clusters created with the same resource group & name as a previously deleted cluster will be recovered rather than creating anew.
//
// Manages a Log Analytics Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewCluster(ctx, "example", &loganalytics.ClusterArgs{
// Name: pulumi.String("example-cluster"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Identity: &loganalytics.ClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2022-10-01
//
// ## Import
//
// Log Analytics Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/cluster:Cluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/clusters/cluster1
// ```
type Cluster struct {
pulumi.CustomResourceState
// The GUID of the cluster.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
Identity ClusterIdentityOutput `pulumi:"identity"`
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
SizeGb pulumi.IntPtrOutput `pulumi:"sizeGb"`
// A mapping of tags which should be assigned to the Log Analytics Cluster.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewCluster registers a new resource with the given unique name, arguments, and options.
func NewCluster(ctx *pulumi.Context,
name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Cluster
err := ctx.RegisterResource("azure:loganalytics/cluster:Cluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCluster gets an existing Cluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
var resource Cluster
err := ctx.ReadResource("azure:loganalytics/cluster:Cluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cluster resources.
type clusterState struct {
// The GUID of the cluster.
ClusterId *string `pulumi:"clusterId"`
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
Identity *ClusterIdentity `pulumi:"identity"`
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
SizeGb *int `pulumi:"sizeGb"`
// A mapping of tags which should be assigned to the Log Analytics Cluster.
Tags map[string]string `pulumi:"tags"`
}
type ClusterState struct {
// The GUID of the cluster.
ClusterId pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
Identity ClusterIdentityPtrInput
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
ResourceGroupName pulumi.StringPtrInput
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
SizeGb pulumi.IntPtrInput
// A mapping of tags which should be assigned to the Log Analytics Cluster.
Tags pulumi.StringMapInput
}
func (ClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterState)(nil)).Elem()
}
type clusterArgs struct {
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
Identity ClusterIdentity `pulumi:"identity"`
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
SizeGb *int `pulumi:"sizeGb"`
// A mapping of tags which should be assigned to the Log Analytics Cluster.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Cluster resource.
type ClusterArgs struct {
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
Identity ClusterIdentityInput
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
ResourceGroupName pulumi.StringInput
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
SizeGb pulumi.IntPtrInput
// A mapping of tags which should be assigned to the Log Analytics Cluster.
Tags pulumi.StringMapInput
}
func (ClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterArgs)(nil)).Elem()
}
type ClusterInput interface {
pulumi.Input
ToClusterOutput() ClusterOutput
ToClusterOutputWithContext(ctx context.Context) ClusterOutput
}
func (*Cluster) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (i *Cluster) ToClusterOutput() ClusterOutput {
return i.ToClusterOutputWithContext(context.Background())
}
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
}
// ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
// You can construct a concrete instance of `ClusterArrayInput` via:
//
// ClusterArray{ ClusterArgs{...} }
type ClusterArrayInput interface {
pulumi.Input
ToClusterArrayOutput() ClusterArrayOutput
ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
}
type ClusterArray []ClusterInput
func (ClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
return i.ToClusterArrayOutputWithContext(context.Background())
}
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
}
// ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
// You can construct a concrete instance of `ClusterMapInput` via:
//
// ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapInput interface {
pulumi.Input
ToClusterMapOutput() ClusterMapOutput
ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
}
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
return i.ToClusterMapOutputWithContext(context.Background())
}
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
}
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (o ClusterOutput) ToClusterOutput() ClusterOutput {
return o
}
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return o
}
// The GUID of the cluster.
func (o ClusterOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// An `identity` block as defined below. Changing this forces a new Log Analytics Cluster to be created.
func (o ClusterOutput) Identity() ClusterIdentityOutput {
return o.ApplyT(func(v *Cluster) ClusterIdentityOutput { return v.Identity }).(ClusterIdentityOutput)
}
// The Azure Region where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
func (o ClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Log Analytics Cluster. Changing this forces a new Log Analytics Cluster to be created.
func (o ClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Cluster should exist. Changing this forces a new Log Analytics Cluster to be created.
func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The capacity of the Log Analytics Cluster is specified in GB/day. Possible values include `100`, `200`, `300`, `400`, `500`, `1000`, `2000`, `5000`, `10000`, `25000`, or `50000`. Defaults to `100`.
//
// > **Note:** The cluster capacity must start at 100 GB and can be set to 500, 1000, 2000 or 5000 GB/day. For more information on cluster costs, see [Dedicated clusters](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/cost-logs#dedicated-clusters).
func (o ClusterOutput) SizeGb() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.SizeGb }).(pulumi.IntPtrOutput)
}
// A mapping of tags which should be assigned to the Log Analytics Cluster.
func (o ClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].([]*Cluster)[vs[1].(int)]
}).(ClusterOutput)
}
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
return o
}
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return o
}
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].(map[string]*Cluster)[vs[1].(string)]
}).(ClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
pulumi.RegisterOutputType(ClusterOutput{})
pulumi.RegisterOutputType(ClusterArrayOutput{})
pulumi.RegisterOutputType(ClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/storageInsights.go | sdk/go/azure/loganalytics/storageInsights.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Storage Insights resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("exampleworkspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplestoracc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewStorageInsights(ctx, "example", &loganalytics.StorageInsightsArgs{
// Name: pulumi.String("example-storageinsightconfig"),
// ResourceGroupName: example.Name,
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// StorageAccountId: exampleAccount.ID(),
// StorageAccountKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Storage Insight Configs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/storageInsights:StorageInsights example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/storageInsightConfigs/storageInsight1
// ```
type StorageInsights struct {
pulumi.CustomResourceState
// The names of the blob containers that the workspace should read.
BlobContainerNames pulumi.StringArrayOutput `pulumi:"blobContainerNames"`
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Storage Account used by this Log Analytics Storage Insights.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// The storage access key to be used to connect to the storage account.
StorageAccountKey pulumi.StringOutput `pulumi:"storageAccountKey"`
// The names of the Azure tables that the workspace should read.
TableNames pulumi.StringArrayOutput `pulumi:"tableNames"`
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewStorageInsights registers a new resource with the given unique name, arguments, and options.
func NewStorageInsights(ctx *pulumi.Context,
name string, args *StorageInsightsArgs, opts ...pulumi.ResourceOption) (*StorageInsights, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
if args.StorageAccountKey == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountKey'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
if args.StorageAccountKey != nil {
args.StorageAccountKey = pulumi.ToSecret(args.StorageAccountKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource StorageInsights
err := ctx.RegisterResource("azure:loganalytics/storageInsights:StorageInsights", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStorageInsights gets an existing StorageInsights resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetStorageInsights(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StorageInsightsState, opts ...pulumi.ResourceOption) (*StorageInsights, error) {
var resource StorageInsights
err := ctx.ReadResource("azure:loganalytics/storageInsights:StorageInsights", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StorageInsights resources.
type storageInsightsState struct {
// The names of the blob containers that the workspace should read.
BlobContainerNames []string `pulumi:"blobContainerNames"`
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Storage Account used by this Log Analytics Storage Insights.
StorageAccountId *string `pulumi:"storageAccountId"`
// The storage access key to be used to connect to the storage account.
StorageAccountKey *string `pulumi:"storageAccountKey"`
// The names of the Azure tables that the workspace should read.
TableNames []string `pulumi:"tableNames"`
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type StorageInsightsState struct {
// The names of the blob containers that the workspace should read.
BlobContainerNames pulumi.StringArrayInput
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Storage Account used by this Log Analytics Storage Insights.
StorageAccountId pulumi.StringPtrInput
// The storage access key to be used to connect to the storage account.
StorageAccountKey pulumi.StringPtrInput
// The names of the Azure tables that the workspace should read.
TableNames pulumi.StringArrayInput
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
WorkspaceId pulumi.StringPtrInput
}
func (StorageInsightsState) ElementType() reflect.Type {
return reflect.TypeOf((*storageInsightsState)(nil)).Elem()
}
type storageInsightsArgs struct {
// The names of the blob containers that the workspace should read.
BlobContainerNames []string `pulumi:"blobContainerNames"`
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Storage Account used by this Log Analytics Storage Insights.
StorageAccountId string `pulumi:"storageAccountId"`
// The storage access key to be used to connect to the storage account.
StorageAccountKey string `pulumi:"storageAccountKey"`
// The names of the Azure tables that the workspace should read.
TableNames []string `pulumi:"tableNames"`
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a StorageInsights resource.
type StorageInsightsArgs struct {
// The names of the blob containers that the workspace should read.
BlobContainerNames pulumi.StringArrayInput
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Storage Account used by this Log Analytics Storage Insights.
StorageAccountId pulumi.StringInput
// The storage access key to be used to connect to the storage account.
StorageAccountKey pulumi.StringInput
// The names of the Azure tables that the workspace should read.
TableNames pulumi.StringArrayInput
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
WorkspaceId pulumi.StringInput
}
func (StorageInsightsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*storageInsightsArgs)(nil)).Elem()
}
type StorageInsightsInput interface {
pulumi.Input
ToStorageInsightsOutput() StorageInsightsOutput
ToStorageInsightsOutputWithContext(ctx context.Context) StorageInsightsOutput
}
func (*StorageInsights) ElementType() reflect.Type {
return reflect.TypeOf((**StorageInsights)(nil)).Elem()
}
func (i *StorageInsights) ToStorageInsightsOutput() StorageInsightsOutput {
return i.ToStorageInsightsOutputWithContext(context.Background())
}
func (i *StorageInsights) ToStorageInsightsOutputWithContext(ctx context.Context) StorageInsightsOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageInsightsOutput)
}
// StorageInsightsArrayInput is an input type that accepts StorageInsightsArray and StorageInsightsArrayOutput values.
// You can construct a concrete instance of `StorageInsightsArrayInput` via:
//
// StorageInsightsArray{ StorageInsightsArgs{...} }
type StorageInsightsArrayInput interface {
pulumi.Input
ToStorageInsightsArrayOutput() StorageInsightsArrayOutput
ToStorageInsightsArrayOutputWithContext(context.Context) StorageInsightsArrayOutput
}
type StorageInsightsArray []StorageInsightsInput
func (StorageInsightsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageInsights)(nil)).Elem()
}
func (i StorageInsightsArray) ToStorageInsightsArrayOutput() StorageInsightsArrayOutput {
return i.ToStorageInsightsArrayOutputWithContext(context.Background())
}
func (i StorageInsightsArray) ToStorageInsightsArrayOutputWithContext(ctx context.Context) StorageInsightsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageInsightsArrayOutput)
}
// StorageInsightsMapInput is an input type that accepts StorageInsightsMap and StorageInsightsMapOutput values.
// You can construct a concrete instance of `StorageInsightsMapInput` via:
//
// StorageInsightsMap{ "key": StorageInsightsArgs{...} }
type StorageInsightsMapInput interface {
pulumi.Input
ToStorageInsightsMapOutput() StorageInsightsMapOutput
ToStorageInsightsMapOutputWithContext(context.Context) StorageInsightsMapOutput
}
type StorageInsightsMap map[string]StorageInsightsInput
func (StorageInsightsMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageInsights)(nil)).Elem()
}
func (i StorageInsightsMap) ToStorageInsightsMapOutput() StorageInsightsMapOutput {
return i.ToStorageInsightsMapOutputWithContext(context.Background())
}
func (i StorageInsightsMap) ToStorageInsightsMapOutputWithContext(ctx context.Context) StorageInsightsMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageInsightsMapOutput)
}
type StorageInsightsOutput struct{ *pulumi.OutputState }
func (StorageInsightsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StorageInsights)(nil)).Elem()
}
func (o StorageInsightsOutput) ToStorageInsightsOutput() StorageInsightsOutput {
return o
}
func (o StorageInsightsOutput) ToStorageInsightsOutputWithContext(ctx context.Context) StorageInsightsOutput {
return o
}
// The names of the blob containers that the workspace should read.
func (o StorageInsightsOutput) BlobContainerNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringArrayOutput { return v.BlobContainerNames }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Log Analytics Storage Insights. Changing this forces a new Log Analytics Storage Insights to be created.
func (o StorageInsightsOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
func (o StorageInsightsOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the Storage Account used by this Log Analytics Storage Insights.
func (o StorageInsightsOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// The storage access key to be used to connect to the storage account.
func (o StorageInsightsOutput) StorageAccountKey() pulumi.StringOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringOutput { return v.StorageAccountKey }).(pulumi.StringOutput)
}
// The names of the Azure tables that the workspace should read.
func (o StorageInsightsOutput) TableNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringArrayOutput { return v.TableNames }).(pulumi.StringArrayOutput)
}
// The ID of the Log Analytics Workspace within which the Storage Insights should exist. Changing this forces a new Log Analytics Storage Insights to be created.
func (o StorageInsightsOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *StorageInsights) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type StorageInsightsArrayOutput struct{ *pulumi.OutputState }
func (StorageInsightsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageInsights)(nil)).Elem()
}
func (o StorageInsightsArrayOutput) ToStorageInsightsArrayOutput() StorageInsightsArrayOutput {
return o
}
func (o StorageInsightsArrayOutput) ToStorageInsightsArrayOutputWithContext(ctx context.Context) StorageInsightsArrayOutput {
return o
}
func (o StorageInsightsArrayOutput) Index(i pulumi.IntInput) StorageInsightsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageInsights {
return vs[0].([]*StorageInsights)[vs[1].(int)]
}).(StorageInsightsOutput)
}
type StorageInsightsMapOutput struct{ *pulumi.OutputState }
func (StorageInsightsMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageInsights)(nil)).Elem()
}
func (o StorageInsightsMapOutput) ToStorageInsightsMapOutput() StorageInsightsMapOutput {
return o
}
func (o StorageInsightsMapOutput) ToStorageInsightsMapOutputWithContext(ctx context.Context) StorageInsightsMapOutput {
return o
}
func (o StorageInsightsMapOutput) MapIndex(k pulumi.StringInput) StorageInsightsOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageInsights {
return vs[0].(map[string]*StorageInsights)[vs[1].(string)]
}).(StorageInsightsOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StorageInsightsInput)(nil)).Elem(), &StorageInsights{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageInsightsArrayInput)(nil)).Elem(), StorageInsightsArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageInsightsMapInput)(nil)).Elem(), StorageInsightsMap{})
pulumi.RegisterOutputType(StorageInsightsOutput{})
pulumi.RegisterOutputType(StorageInsightsArrayOutput{})
pulumi.RegisterOutputType(StorageInsightsMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/clusterCustomerManagedKey.go | sdk/go/azure/loganalytics/clusterCustomerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Cluster Customer Managed Key.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleCluster, err := loganalytics.NewCluster(ctx, "example", &loganalytics.ClusterArgs{
// Name: pulumi.String("example-cluster"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Identity: &loganalytics.ClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("keyvaultkeyexample"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleCluster.Identity.ApplyT(func(identity loganalytics.ClusterIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleCluster.Identity.ApplyT(func(identity loganalytics.ClusterIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Unwrapkey"),
// pulumi.String("Wrapkey"),
// },
// },
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("generated-certificate"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewClusterCustomerManagedKey(ctx, "example", &loganalytics.ClusterCustomerManagedKeyArgs{
// LogAnalyticsClusterId: exampleCluster.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2022-10-01
//
// ## Import
//
// Log Analytics Cluster Customer Managed Keys can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/clusterCustomerManagedKey:ClusterCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/clusters/cluster1
// ```
type ClusterCustomerManagedKey struct {
pulumi.CustomResourceState
// The ID of the Key Vault Key to use for encryption.
KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"`
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
LogAnalyticsClusterId pulumi.StringOutput `pulumi:"logAnalyticsClusterId"`
}
// NewClusterCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewClusterCustomerManagedKey(ctx *pulumi.Context,
name string, args *ClusterCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*ClusterCustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KeyVaultKeyId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultKeyId'")
}
if args.LogAnalyticsClusterId == nil {
return nil, errors.New("invalid value for required argument 'LogAnalyticsClusterId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ClusterCustomerManagedKey
err := ctx.RegisterResource("azure:loganalytics/clusterCustomerManagedKey:ClusterCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetClusterCustomerManagedKey gets an existing ClusterCustomerManagedKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetClusterCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*ClusterCustomerManagedKey, error) {
var resource ClusterCustomerManagedKey
err := ctx.ReadResource("azure:loganalytics/clusterCustomerManagedKey:ClusterCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ClusterCustomerManagedKey resources.
type clusterCustomerManagedKeyState struct {
// The ID of the Key Vault Key to use for encryption.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
LogAnalyticsClusterId *string `pulumi:"logAnalyticsClusterId"`
}
type ClusterCustomerManagedKeyState struct {
// The ID of the Key Vault Key to use for encryption.
KeyVaultKeyId pulumi.StringPtrInput
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
LogAnalyticsClusterId pulumi.StringPtrInput
}
func (ClusterCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterCustomerManagedKeyState)(nil)).Elem()
}
type clusterCustomerManagedKeyArgs struct {
// The ID of the Key Vault Key to use for encryption.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
LogAnalyticsClusterId string `pulumi:"logAnalyticsClusterId"`
}
// The set of arguments for constructing a ClusterCustomerManagedKey resource.
type ClusterCustomerManagedKeyArgs struct {
// The ID of the Key Vault Key to use for encryption.
KeyVaultKeyId pulumi.StringInput
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
LogAnalyticsClusterId pulumi.StringInput
}
func (ClusterCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterCustomerManagedKeyArgs)(nil)).Elem()
}
type ClusterCustomerManagedKeyInput interface {
pulumi.Input
ToClusterCustomerManagedKeyOutput() ClusterCustomerManagedKeyOutput
ToClusterCustomerManagedKeyOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyOutput
}
func (*ClusterCustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterCustomerManagedKey)(nil)).Elem()
}
func (i *ClusterCustomerManagedKey) ToClusterCustomerManagedKeyOutput() ClusterCustomerManagedKeyOutput {
return i.ToClusterCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *ClusterCustomerManagedKey) ToClusterCustomerManagedKeyOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterCustomerManagedKeyOutput)
}
// ClusterCustomerManagedKeyArrayInput is an input type that accepts ClusterCustomerManagedKeyArray and ClusterCustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `ClusterCustomerManagedKeyArrayInput` via:
//
// ClusterCustomerManagedKeyArray{ ClusterCustomerManagedKeyArgs{...} }
type ClusterCustomerManagedKeyArrayInput interface {
pulumi.Input
ToClusterCustomerManagedKeyArrayOutput() ClusterCustomerManagedKeyArrayOutput
ToClusterCustomerManagedKeyArrayOutputWithContext(context.Context) ClusterCustomerManagedKeyArrayOutput
}
type ClusterCustomerManagedKeyArray []ClusterCustomerManagedKeyInput
func (ClusterCustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterCustomerManagedKey)(nil)).Elem()
}
func (i ClusterCustomerManagedKeyArray) ToClusterCustomerManagedKeyArrayOutput() ClusterCustomerManagedKeyArrayOutput {
return i.ToClusterCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i ClusterCustomerManagedKeyArray) ToClusterCustomerManagedKeyArrayOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterCustomerManagedKeyArrayOutput)
}
// ClusterCustomerManagedKeyMapInput is an input type that accepts ClusterCustomerManagedKeyMap and ClusterCustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `ClusterCustomerManagedKeyMapInput` via:
//
// ClusterCustomerManagedKeyMap{ "key": ClusterCustomerManagedKeyArgs{...} }
type ClusterCustomerManagedKeyMapInput interface {
pulumi.Input
ToClusterCustomerManagedKeyMapOutput() ClusterCustomerManagedKeyMapOutput
ToClusterCustomerManagedKeyMapOutputWithContext(context.Context) ClusterCustomerManagedKeyMapOutput
}
type ClusterCustomerManagedKeyMap map[string]ClusterCustomerManagedKeyInput
func (ClusterCustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterCustomerManagedKey)(nil)).Elem()
}
func (i ClusterCustomerManagedKeyMap) ToClusterCustomerManagedKeyMapOutput() ClusterCustomerManagedKeyMapOutput {
return i.ToClusterCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i ClusterCustomerManagedKeyMap) ToClusterCustomerManagedKeyMapOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterCustomerManagedKeyMapOutput)
}
type ClusterCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (ClusterCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterCustomerManagedKey)(nil)).Elem()
}
func (o ClusterCustomerManagedKeyOutput) ToClusterCustomerManagedKeyOutput() ClusterCustomerManagedKeyOutput {
return o
}
func (o ClusterCustomerManagedKeyOutput) ToClusterCustomerManagedKeyOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyOutput {
return o
}
// The ID of the Key Vault Key to use for encryption.
func (o ClusterCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
// The ID of the Log Analytics Cluster. Changing this forces a new Log Analytics Cluster Customer Managed Key to be created.
func (o ClusterCustomerManagedKeyOutput) LogAnalyticsClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringOutput { return v.LogAnalyticsClusterId }).(pulumi.StringOutput)
}
type ClusterCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (ClusterCustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterCustomerManagedKey)(nil)).Elem()
}
func (o ClusterCustomerManagedKeyArrayOutput) ToClusterCustomerManagedKeyArrayOutput() ClusterCustomerManagedKeyArrayOutput {
return o
}
func (o ClusterCustomerManagedKeyArrayOutput) ToClusterCustomerManagedKeyArrayOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyArrayOutput {
return o
}
func (o ClusterCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) ClusterCustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterCustomerManagedKey {
return vs[0].([]*ClusterCustomerManagedKey)[vs[1].(int)]
}).(ClusterCustomerManagedKeyOutput)
}
type ClusterCustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (ClusterCustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterCustomerManagedKey)(nil)).Elem()
}
func (o ClusterCustomerManagedKeyMapOutput) ToClusterCustomerManagedKeyMapOutput() ClusterCustomerManagedKeyMapOutput {
return o
}
func (o ClusterCustomerManagedKeyMapOutput) ToClusterCustomerManagedKeyMapOutputWithContext(ctx context.Context) ClusterCustomerManagedKeyMapOutput {
return o
}
func (o ClusterCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) ClusterCustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterCustomerManagedKey {
return vs[0].(map[string]*ClusterCustomerManagedKey)[vs[1].(string)]
}).(ClusterCustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterCustomerManagedKeyInput)(nil)).Elem(), &ClusterCustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterCustomerManagedKeyArrayInput)(nil)).Elem(), ClusterCustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterCustomerManagedKeyMapInput)(nil)).Elem(), ClusterCustomerManagedKeyMap{})
pulumi.RegisterOutputType(ClusterCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(ClusterCustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(ClusterCustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/workspaceTable.go | sdk/go/azure/loganalytics/workspaceTable.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Table in a Log Analytics (formally Operational Insights) Workspace.
//
// > **Note:** This resource does not create or destroy tables. This resource is used to update attributes (currently only retention_in_days) of the tables created when a Log Analytics Workspace is created. Deleting an loganalytics.WorkspaceTable resource will not delete the table. Instead, the table's retentionInDays field will be set to the value of operationalinsights.AnalyticsWorkspace retention_in_days
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewWorkspaceTable(ctx, "example", &loganalytics.WorkspaceTableArgs{
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// Name: pulumi.String("AppMetrics"),
// RetentionInDays: pulumi.Int(60),
// TotalRetentionInDays: pulumi.Int(180),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2022-10-01
type WorkspaceTable struct {
pulumi.CustomResourceState
// Specifies the name of a table in a Log Analytics Workspace.
Name pulumi.StringOutput `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
Plan pulumi.StringPtrOutput `pulumi:"plan"`
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
TotalRetentionInDays pulumi.IntPtrOutput `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceTable registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceTable(ctx *pulumi.Context,
name string, args *WorkspaceTableArgs, opts ...pulumi.ResourceOption) (*WorkspaceTable, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceTable
err := ctx.RegisterResource("azure:loganalytics/workspaceTable:WorkspaceTable", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceTable gets an existing WorkspaceTable resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceTable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceTableState, opts ...pulumi.ResourceOption) (*WorkspaceTable, error) {
var resource WorkspaceTable
err := ctx.ReadResource("azure:loganalytics/workspaceTable:WorkspaceTable", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceTable resources.
type workspaceTableState struct {
// Specifies the name of a table in a Log Analytics Workspace.
Name *string `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
Plan *string `pulumi:"plan"`
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
TotalRetentionInDays *int `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceTableState struct {
// Specifies the name of a table in a Log Analytics Workspace.
Name pulumi.StringPtrInput
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
Plan pulumi.StringPtrInput
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
RetentionInDays pulumi.IntPtrInput
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
TotalRetentionInDays pulumi.IntPtrInput
// The object ID of the Log Analytics Workspace that contains the table.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceTableState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceTableState)(nil)).Elem()
}
type workspaceTableArgs struct {
// Specifies the name of a table in a Log Analytics Workspace.
Name *string `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
Plan *string `pulumi:"plan"`
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
TotalRetentionInDays *int `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceTable resource.
type WorkspaceTableArgs struct {
// Specifies the name of a table in a Log Analytics Workspace.
Name pulumi.StringPtrInput
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
Plan pulumi.StringPtrInput
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
RetentionInDays pulumi.IntPtrInput
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
TotalRetentionInDays pulumi.IntPtrInput
// The object ID of the Log Analytics Workspace that contains the table.
WorkspaceId pulumi.StringInput
}
func (WorkspaceTableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceTableArgs)(nil)).Elem()
}
type WorkspaceTableInput interface {
pulumi.Input
ToWorkspaceTableOutput() WorkspaceTableOutput
ToWorkspaceTableOutputWithContext(ctx context.Context) WorkspaceTableOutput
}
func (*WorkspaceTable) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceTable)(nil)).Elem()
}
func (i *WorkspaceTable) ToWorkspaceTableOutput() WorkspaceTableOutput {
return i.ToWorkspaceTableOutputWithContext(context.Background())
}
func (i *WorkspaceTable) ToWorkspaceTableOutputWithContext(ctx context.Context) WorkspaceTableOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableOutput)
}
// WorkspaceTableArrayInput is an input type that accepts WorkspaceTableArray and WorkspaceTableArrayOutput values.
// You can construct a concrete instance of `WorkspaceTableArrayInput` via:
//
// WorkspaceTableArray{ WorkspaceTableArgs{...} }
type WorkspaceTableArrayInput interface {
pulumi.Input
ToWorkspaceTableArrayOutput() WorkspaceTableArrayOutput
ToWorkspaceTableArrayOutputWithContext(context.Context) WorkspaceTableArrayOutput
}
type WorkspaceTableArray []WorkspaceTableInput
func (WorkspaceTableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceTable)(nil)).Elem()
}
func (i WorkspaceTableArray) ToWorkspaceTableArrayOutput() WorkspaceTableArrayOutput {
return i.ToWorkspaceTableArrayOutputWithContext(context.Background())
}
func (i WorkspaceTableArray) ToWorkspaceTableArrayOutputWithContext(ctx context.Context) WorkspaceTableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableArrayOutput)
}
// WorkspaceTableMapInput is an input type that accepts WorkspaceTableMap and WorkspaceTableMapOutput values.
// You can construct a concrete instance of `WorkspaceTableMapInput` via:
//
// WorkspaceTableMap{ "key": WorkspaceTableArgs{...} }
type WorkspaceTableMapInput interface {
pulumi.Input
ToWorkspaceTableMapOutput() WorkspaceTableMapOutput
ToWorkspaceTableMapOutputWithContext(context.Context) WorkspaceTableMapOutput
}
type WorkspaceTableMap map[string]WorkspaceTableInput
func (WorkspaceTableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceTable)(nil)).Elem()
}
func (i WorkspaceTableMap) ToWorkspaceTableMapOutput() WorkspaceTableMapOutput {
return i.ToWorkspaceTableMapOutputWithContext(context.Background())
}
func (i WorkspaceTableMap) ToWorkspaceTableMapOutputWithContext(ctx context.Context) WorkspaceTableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableMapOutput)
}
type WorkspaceTableOutput struct{ *pulumi.OutputState }
func (WorkspaceTableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceTable)(nil)).Elem()
}
func (o WorkspaceTableOutput) ToWorkspaceTableOutput() WorkspaceTableOutput {
return o
}
func (o WorkspaceTableOutput) ToWorkspaceTableOutputWithContext(ctx context.Context) WorkspaceTableOutput {
return o
}
// Specifies the name of a table in a Log Analytics Workspace.
func (o WorkspaceTableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceTable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** The `name` of tables currently supported by the `Basic` plan can be found [here](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-azure-tables).
func (o WorkspaceTableOutput) Plan() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceTable) pulumi.StringPtrOutput { return v.Plan }).(pulumi.StringPtrOutput)
}
// The table's retention in days. Possible values are either `8` (Basic Tier only) or range between `4` and `730`.
func (o WorkspaceTableOutput) RetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *WorkspaceTable) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput)
}
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
//
// > **Note:** `retentionInDays` and `totalRetentionInDays` will revert back to the value of operationalinsights.AnalyticsWorkspace retention_in_days when a loganalytics.WorkspaceTable is deleted.
//
// > **Note:** The `retentionInDays` cannot be specified when `plan` is `Basic` because the retention is fixed at eight days.
func (o WorkspaceTableOutput) TotalRetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *WorkspaceTable) pulumi.IntPtrOutput { return v.TotalRetentionInDays }).(pulumi.IntPtrOutput)
}
// The object ID of the Log Analytics Workspace that contains the table.
func (o WorkspaceTableOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceTable) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceTableArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceTableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceTable)(nil)).Elem()
}
func (o WorkspaceTableArrayOutput) ToWorkspaceTableArrayOutput() WorkspaceTableArrayOutput {
return o
}
func (o WorkspaceTableArrayOutput) ToWorkspaceTableArrayOutputWithContext(ctx context.Context) WorkspaceTableArrayOutput {
return o
}
func (o WorkspaceTableArrayOutput) Index(i pulumi.IntInput) WorkspaceTableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceTable {
return vs[0].([]*WorkspaceTable)[vs[1].(int)]
}).(WorkspaceTableOutput)
}
type WorkspaceTableMapOutput struct{ *pulumi.OutputState }
func (WorkspaceTableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceTable)(nil)).Elem()
}
func (o WorkspaceTableMapOutput) ToWorkspaceTableMapOutput() WorkspaceTableMapOutput {
return o
}
func (o WorkspaceTableMapOutput) ToWorkspaceTableMapOutputWithContext(ctx context.Context) WorkspaceTableMapOutput {
return o
}
func (o WorkspaceTableMapOutput) MapIndex(k pulumi.StringInput) WorkspaceTableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceTable {
return vs[0].(map[string]*WorkspaceTable)[vs[1].(string)]
}).(WorkspaceTableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableInput)(nil)).Elem(), &WorkspaceTable{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableArrayInput)(nil)).Elem(), WorkspaceTableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableMapInput)(nil)).Elem(), WorkspaceTableMap{})
pulumi.RegisterOutputType(WorkspaceTableOutput{})
pulumi.RegisterOutputType(WorkspaceTableArrayOutput{})
pulumi.RegisterOutputType(WorkspaceTableMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/dataSourceWindowsPerformanceCounter.go | sdk/go/azure/loganalytics/dataSourceWindowsPerformanceCounter.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics (formally Operational Insights) Windows Performance Counter DataSource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("example-law"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewDataSourceWindowsPerformanceCounter(ctx, "example", &loganalytics.DataSourceWindowsPerformanceCounterArgs{
// Name: pulumi.String("example-lad-wpc"),
// ResourceGroupName: example.Name,
// WorkspaceName: exampleAnalyticsWorkspace.Name,
// ObjectName: pulumi.String("CPU"),
// InstanceName: pulumi.String("*"),
// CounterName: pulumi.String("CPU"),
// IntervalSeconds: pulumi.Int(10),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Windows Performance Counter DataSources can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/dataSourceWindowsPerformanceCounter:DataSourceWindowsPerformanceCounter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataSources/datasource1
// ```
type DataSourceWindowsPerformanceCounter struct {
pulumi.CustomResourceState
// The friendly name of the performance counter.
CounterName pulumi.StringOutput `pulumi:"counterName"`
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
InstanceName pulumi.StringOutput `pulumi:"instanceName"`
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
IntervalSeconds pulumi.IntOutput `pulumi:"intervalSeconds"`
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The object name of the Log Analytics Windows Performance Counter DataSource.
ObjectName pulumi.StringOutput `pulumi:"objectName"`
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
WorkspaceName pulumi.StringOutput `pulumi:"workspaceName"`
}
// NewDataSourceWindowsPerformanceCounter registers a new resource with the given unique name, arguments, and options.
func NewDataSourceWindowsPerformanceCounter(ctx *pulumi.Context,
name string, args *DataSourceWindowsPerformanceCounterArgs, opts ...pulumi.ResourceOption) (*DataSourceWindowsPerformanceCounter, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CounterName == nil {
return nil, errors.New("invalid value for required argument 'CounterName'")
}
if args.InstanceName == nil {
return nil, errors.New("invalid value for required argument 'InstanceName'")
}
if args.IntervalSeconds == nil {
return nil, errors.New("invalid value for required argument 'IntervalSeconds'")
}
if args.ObjectName == nil {
return nil, errors.New("invalid value for required argument 'ObjectName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.WorkspaceName == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DataSourceWindowsPerformanceCounter
err := ctx.RegisterResource("azure:loganalytics/dataSourceWindowsPerformanceCounter:DataSourceWindowsPerformanceCounter", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataSourceWindowsPerformanceCounter gets an existing DataSourceWindowsPerformanceCounter resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDataSourceWindowsPerformanceCounter(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataSourceWindowsPerformanceCounterState, opts ...pulumi.ResourceOption) (*DataSourceWindowsPerformanceCounter, error) {
var resource DataSourceWindowsPerformanceCounter
err := ctx.ReadResource("azure:loganalytics/dataSourceWindowsPerformanceCounter:DataSourceWindowsPerformanceCounter", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataSourceWindowsPerformanceCounter resources.
type dataSourceWindowsPerformanceCounterState struct {
// The friendly name of the performance counter.
CounterName *string `pulumi:"counterName"`
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
InstanceName *string `pulumi:"instanceName"`
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
IntervalSeconds *int `pulumi:"intervalSeconds"`
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
Name *string `pulumi:"name"`
// The object name of the Log Analytics Windows Performance Counter DataSource.
ObjectName *string `pulumi:"objectName"`
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
WorkspaceName *string `pulumi:"workspaceName"`
}
type DataSourceWindowsPerformanceCounterState struct {
// The friendly name of the performance counter.
CounterName pulumi.StringPtrInput
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
InstanceName pulumi.StringPtrInput
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
IntervalSeconds pulumi.IntPtrInput
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
Name pulumi.StringPtrInput
// The object name of the Log Analytics Windows Performance Counter DataSource.
ObjectName pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
ResourceGroupName pulumi.StringPtrInput
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
WorkspaceName pulumi.StringPtrInput
}
func (DataSourceWindowsPerformanceCounterState) ElementType() reflect.Type {
return reflect.TypeOf((*dataSourceWindowsPerformanceCounterState)(nil)).Elem()
}
type dataSourceWindowsPerformanceCounterArgs struct {
// The friendly name of the performance counter.
CounterName string `pulumi:"counterName"`
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
InstanceName string `pulumi:"instanceName"`
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
IntervalSeconds int `pulumi:"intervalSeconds"`
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
Name *string `pulumi:"name"`
// The object name of the Log Analytics Windows Performance Counter DataSource.
ObjectName string `pulumi:"objectName"`
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
WorkspaceName string `pulumi:"workspaceName"`
}
// The set of arguments for constructing a DataSourceWindowsPerformanceCounter resource.
type DataSourceWindowsPerformanceCounterArgs struct {
// The friendly name of the performance counter.
CounterName pulumi.StringInput
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
InstanceName pulumi.StringInput
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
IntervalSeconds pulumi.IntInput
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
Name pulumi.StringPtrInput
// The object name of the Log Analytics Windows Performance Counter DataSource.
ObjectName pulumi.StringInput
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
ResourceGroupName pulumi.StringInput
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
WorkspaceName pulumi.StringInput
}
func (DataSourceWindowsPerformanceCounterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataSourceWindowsPerformanceCounterArgs)(nil)).Elem()
}
type DataSourceWindowsPerformanceCounterInput interface {
pulumi.Input
ToDataSourceWindowsPerformanceCounterOutput() DataSourceWindowsPerformanceCounterOutput
ToDataSourceWindowsPerformanceCounterOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterOutput
}
func (*DataSourceWindowsPerformanceCounter) ElementType() reflect.Type {
return reflect.TypeOf((**DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (i *DataSourceWindowsPerformanceCounter) ToDataSourceWindowsPerformanceCounterOutput() DataSourceWindowsPerformanceCounterOutput {
return i.ToDataSourceWindowsPerformanceCounterOutputWithContext(context.Background())
}
func (i *DataSourceWindowsPerformanceCounter) ToDataSourceWindowsPerformanceCounterOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsPerformanceCounterOutput)
}
// DataSourceWindowsPerformanceCounterArrayInput is an input type that accepts DataSourceWindowsPerformanceCounterArray and DataSourceWindowsPerformanceCounterArrayOutput values.
// You can construct a concrete instance of `DataSourceWindowsPerformanceCounterArrayInput` via:
//
// DataSourceWindowsPerformanceCounterArray{ DataSourceWindowsPerformanceCounterArgs{...} }
type DataSourceWindowsPerformanceCounterArrayInput interface {
pulumi.Input
ToDataSourceWindowsPerformanceCounterArrayOutput() DataSourceWindowsPerformanceCounterArrayOutput
ToDataSourceWindowsPerformanceCounterArrayOutputWithContext(context.Context) DataSourceWindowsPerformanceCounterArrayOutput
}
type DataSourceWindowsPerformanceCounterArray []DataSourceWindowsPerformanceCounterInput
func (DataSourceWindowsPerformanceCounterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (i DataSourceWindowsPerformanceCounterArray) ToDataSourceWindowsPerformanceCounterArrayOutput() DataSourceWindowsPerformanceCounterArrayOutput {
return i.ToDataSourceWindowsPerformanceCounterArrayOutputWithContext(context.Background())
}
func (i DataSourceWindowsPerformanceCounterArray) ToDataSourceWindowsPerformanceCounterArrayOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsPerformanceCounterArrayOutput)
}
// DataSourceWindowsPerformanceCounterMapInput is an input type that accepts DataSourceWindowsPerformanceCounterMap and DataSourceWindowsPerformanceCounterMapOutput values.
// You can construct a concrete instance of `DataSourceWindowsPerformanceCounterMapInput` via:
//
// DataSourceWindowsPerformanceCounterMap{ "key": DataSourceWindowsPerformanceCounterArgs{...} }
type DataSourceWindowsPerformanceCounterMapInput interface {
pulumi.Input
ToDataSourceWindowsPerformanceCounterMapOutput() DataSourceWindowsPerformanceCounterMapOutput
ToDataSourceWindowsPerformanceCounterMapOutputWithContext(context.Context) DataSourceWindowsPerformanceCounterMapOutput
}
type DataSourceWindowsPerformanceCounterMap map[string]DataSourceWindowsPerformanceCounterInput
func (DataSourceWindowsPerformanceCounterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (i DataSourceWindowsPerformanceCounterMap) ToDataSourceWindowsPerformanceCounterMapOutput() DataSourceWindowsPerformanceCounterMapOutput {
return i.ToDataSourceWindowsPerformanceCounterMapOutputWithContext(context.Background())
}
func (i DataSourceWindowsPerformanceCounterMap) ToDataSourceWindowsPerformanceCounterMapOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataSourceWindowsPerformanceCounterMapOutput)
}
type DataSourceWindowsPerformanceCounterOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsPerformanceCounterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (o DataSourceWindowsPerformanceCounterOutput) ToDataSourceWindowsPerformanceCounterOutput() DataSourceWindowsPerformanceCounterOutput {
return o
}
func (o DataSourceWindowsPerformanceCounterOutput) ToDataSourceWindowsPerformanceCounterOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterOutput {
return o
}
// The friendly name of the performance counter.
func (o DataSourceWindowsPerformanceCounterOutput) CounterName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.CounterName }).(pulumi.StringOutput)
}
// The name of the virtual machine instance to which the Windows Performance Counter DataSource be applied. Specify a `*` will apply to all instances.
func (o DataSourceWindowsPerformanceCounterOutput) InstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.InstanceName }).(pulumi.StringOutput)
}
// The time of sample interval in seconds. Supports values between 10 and 2147483647.
func (o DataSourceWindowsPerformanceCounterOutput) IntervalSeconds() pulumi.IntOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.IntOutput { return v.IntervalSeconds }).(pulumi.IntOutput)
}
// The Name which should be used for this Log Analytics Windows Performance Counter DataSource. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
func (o DataSourceWindowsPerformanceCounterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The object name of the Log Analytics Windows Performance Counter DataSource.
func (o DataSourceWindowsPerformanceCounterOutput) ObjectName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.ObjectName }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
func (o DataSourceWindowsPerformanceCounterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The name of the Log Analytics Workspace where the Log Analytics Windows Performance Counter DataSource should exist. Changing this forces a new Log Analytics Windows Performance Counter DataSource to be created.
func (o DataSourceWindowsPerformanceCounterOutput) WorkspaceName() pulumi.StringOutput {
return o.ApplyT(func(v *DataSourceWindowsPerformanceCounter) pulumi.StringOutput { return v.WorkspaceName }).(pulumi.StringOutput)
}
type DataSourceWindowsPerformanceCounterArrayOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsPerformanceCounterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (o DataSourceWindowsPerformanceCounterArrayOutput) ToDataSourceWindowsPerformanceCounterArrayOutput() DataSourceWindowsPerformanceCounterArrayOutput {
return o
}
func (o DataSourceWindowsPerformanceCounterArrayOutput) ToDataSourceWindowsPerformanceCounterArrayOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterArrayOutput {
return o
}
func (o DataSourceWindowsPerformanceCounterArrayOutput) Index(i pulumi.IntInput) DataSourceWindowsPerformanceCounterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataSourceWindowsPerformanceCounter {
return vs[0].([]*DataSourceWindowsPerformanceCounter)[vs[1].(int)]
}).(DataSourceWindowsPerformanceCounterOutput)
}
type DataSourceWindowsPerformanceCounterMapOutput struct{ *pulumi.OutputState }
func (DataSourceWindowsPerformanceCounterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataSourceWindowsPerformanceCounter)(nil)).Elem()
}
func (o DataSourceWindowsPerformanceCounterMapOutput) ToDataSourceWindowsPerformanceCounterMapOutput() DataSourceWindowsPerformanceCounterMapOutput {
return o
}
func (o DataSourceWindowsPerformanceCounterMapOutput) ToDataSourceWindowsPerformanceCounterMapOutputWithContext(ctx context.Context) DataSourceWindowsPerformanceCounterMapOutput {
return o
}
func (o DataSourceWindowsPerformanceCounterMapOutput) MapIndex(k pulumi.StringInput) DataSourceWindowsPerformanceCounterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataSourceWindowsPerformanceCounter {
return vs[0].(map[string]*DataSourceWindowsPerformanceCounter)[vs[1].(string)]
}).(DataSourceWindowsPerformanceCounterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsPerformanceCounterInput)(nil)).Elem(), &DataSourceWindowsPerformanceCounter{})
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsPerformanceCounterArrayInput)(nil)).Elem(), DataSourceWindowsPerformanceCounterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataSourceWindowsPerformanceCounterMapInput)(nil)).Elem(), DataSourceWindowsPerformanceCounterMap{})
pulumi.RegisterOutputType(DataSourceWindowsPerformanceCounterOutput{})
pulumi.RegisterOutputType(DataSourceWindowsPerformanceCounterArrayOutput{})
pulumi.RegisterOutputType(DataSourceWindowsPerformanceCounterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/linkedService.go | sdk/go/azure/loganalytics/linkedService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Linked Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourcegroup-01"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("automation-01"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("development"),
// },
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("workspace-01"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewLinkedService(ctx, "example", &loganalytics.LinkedServiceArgs{
// ResourceGroupName: example.Name,
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// ReadAccessId: exampleAccount.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Workspaces can be imported using the `resource id`, e.g.
//
// When `read_access_id` has been specified:
//
// ```sh
// $ pulumi import azure:loganalytics/linkedService:LinkedService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/linkedServices/Automation
// ```
//
// When `read_access_id` has been omitted:
//
// ```sh
// $ pulumi import azure:loganalytics/linkedService:LinkedService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/linkedServices/Cluster
// ```
type LinkedService struct {
pulumi.CustomResourceState
// The generated name of the Linked Service. The format for this attribute is always `<workspace name>/<linked service type>`(e.g. `workspace1/Automation` or `workspace1/Cluster`)
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
ReadAccessId pulumi.StringOutput `pulumi:"readAccessId"`
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
WriteAccessId pulumi.StringPtrOutput `pulumi:"writeAccessId"`
}
// NewLinkedService registers a new resource with the given unique name, arguments, and options.
func NewLinkedService(ctx *pulumi.Context,
name string, args *LinkedServiceArgs, opts ...pulumi.ResourceOption) (*LinkedService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LinkedService
err := ctx.RegisterResource("azure:loganalytics/linkedService:LinkedService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLinkedService gets an existing LinkedService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLinkedService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LinkedServiceState, opts ...pulumi.ResourceOption) (*LinkedService, error) {
var resource LinkedService
err := ctx.ReadResource("azure:loganalytics/linkedService:LinkedService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LinkedService resources.
type linkedServiceState struct {
// The generated name of the Linked Service. The format for this attribute is always `<workspace name>/<linked service type>`(e.g. `workspace1/Automation` or `workspace1/Cluster`)
Name *string `pulumi:"name"`
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
ReadAccessId *string `pulumi:"readAccessId"`
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
WorkspaceId *string `pulumi:"workspaceId"`
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
WriteAccessId *string `pulumi:"writeAccessId"`
}
type LinkedServiceState struct {
// The generated name of the Linked Service. The format for this attribute is always `<workspace name>/<linked service type>`(e.g. `workspace1/Automation` or `workspace1/Cluster`)
Name pulumi.StringPtrInput
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
ReadAccessId pulumi.StringPtrInput
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
WorkspaceId pulumi.StringPtrInput
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
WriteAccessId pulumi.StringPtrInput
}
func (LinkedServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*linkedServiceState)(nil)).Elem()
}
type linkedServiceArgs struct {
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
ReadAccessId *string `pulumi:"readAccessId"`
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
WorkspaceId string `pulumi:"workspaceId"`
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
WriteAccessId *string `pulumi:"writeAccessId"`
}
// The set of arguments for constructing a LinkedService resource.
type LinkedServiceArgs struct {
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
ReadAccessId pulumi.StringPtrInput
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
WorkspaceId pulumi.StringInput
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
WriteAccessId pulumi.StringPtrInput
}
func (LinkedServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*linkedServiceArgs)(nil)).Elem()
}
type LinkedServiceInput interface {
pulumi.Input
ToLinkedServiceOutput() LinkedServiceOutput
ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput
}
func (*LinkedService) ElementType() reflect.Type {
return reflect.TypeOf((**LinkedService)(nil)).Elem()
}
func (i *LinkedService) ToLinkedServiceOutput() LinkedServiceOutput {
return i.ToLinkedServiceOutputWithContext(context.Background())
}
func (i *LinkedService) ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceOutput)
}
// LinkedServiceArrayInput is an input type that accepts LinkedServiceArray and LinkedServiceArrayOutput values.
// You can construct a concrete instance of `LinkedServiceArrayInput` via:
//
// LinkedServiceArray{ LinkedServiceArgs{...} }
type LinkedServiceArrayInput interface {
pulumi.Input
ToLinkedServiceArrayOutput() LinkedServiceArrayOutput
ToLinkedServiceArrayOutputWithContext(context.Context) LinkedServiceArrayOutput
}
type LinkedServiceArray []LinkedServiceInput
func (LinkedServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkedService)(nil)).Elem()
}
func (i LinkedServiceArray) ToLinkedServiceArrayOutput() LinkedServiceArrayOutput {
return i.ToLinkedServiceArrayOutputWithContext(context.Background())
}
func (i LinkedServiceArray) ToLinkedServiceArrayOutputWithContext(ctx context.Context) LinkedServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceArrayOutput)
}
// LinkedServiceMapInput is an input type that accepts LinkedServiceMap and LinkedServiceMapOutput values.
// You can construct a concrete instance of `LinkedServiceMapInput` via:
//
// LinkedServiceMap{ "key": LinkedServiceArgs{...} }
type LinkedServiceMapInput interface {
pulumi.Input
ToLinkedServiceMapOutput() LinkedServiceMapOutput
ToLinkedServiceMapOutputWithContext(context.Context) LinkedServiceMapOutput
}
type LinkedServiceMap map[string]LinkedServiceInput
func (LinkedServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkedService)(nil)).Elem()
}
func (i LinkedServiceMap) ToLinkedServiceMapOutput() LinkedServiceMapOutput {
return i.ToLinkedServiceMapOutputWithContext(context.Background())
}
func (i LinkedServiceMap) ToLinkedServiceMapOutputWithContext(ctx context.Context) LinkedServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedServiceMapOutput)
}
type LinkedServiceOutput struct{ *pulumi.OutputState }
func (LinkedServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LinkedService)(nil)).Elem()
}
func (o LinkedServiceOutput) ToLinkedServiceOutput() LinkedServiceOutput {
return o
}
func (o LinkedServiceOutput) ToLinkedServiceOutputWithContext(ctx context.Context) LinkedServiceOutput {
return o
}
// The generated name of the Linked Service. The format for this attribute is always `<workspace name>/<linked service type>`(e.g. `workspace1/Automation` or `workspace1/Cluster`)
func (o LinkedServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the readable Resource that will be linked to the workspace. This should be used for linking to an Automation Account resource.
func (o LinkedServiceOutput) ReadAccessId() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.ReadAccessId }).(pulumi.StringOutput)
}
// The name of the resource group in which the Log Analytics Linked Service is created. Changing this forces a new resource to be created.
func (o LinkedServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the Log Analytics Workspace that will contain the Log Analytics Linked Service resource.
func (o LinkedServiceOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedService) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
// The ID of the writable Resource that will be linked to the workspace. This should be used for linking to a Log Analytics Cluster resource.
//
// > **Note:** You must define at least one of the above access resource id attributes (e.g. `readAccessId` or `writeAccessId`).
func (o LinkedServiceOutput) WriteAccessId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LinkedService) pulumi.StringPtrOutput { return v.WriteAccessId }).(pulumi.StringPtrOutput)
}
type LinkedServiceArrayOutput struct{ *pulumi.OutputState }
func (LinkedServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkedService)(nil)).Elem()
}
func (o LinkedServiceArrayOutput) ToLinkedServiceArrayOutput() LinkedServiceArrayOutput {
return o
}
func (o LinkedServiceArrayOutput) ToLinkedServiceArrayOutputWithContext(ctx context.Context) LinkedServiceArrayOutput {
return o
}
func (o LinkedServiceArrayOutput) Index(i pulumi.IntInput) LinkedServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LinkedService {
return vs[0].([]*LinkedService)[vs[1].(int)]
}).(LinkedServiceOutput)
}
type LinkedServiceMapOutput struct{ *pulumi.OutputState }
func (LinkedServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkedService)(nil)).Elem()
}
func (o LinkedServiceMapOutput) ToLinkedServiceMapOutput() LinkedServiceMapOutput {
return o
}
func (o LinkedServiceMapOutput) ToLinkedServiceMapOutputWithContext(ctx context.Context) LinkedServiceMapOutput {
return o
}
func (o LinkedServiceMapOutput) MapIndex(k pulumi.StringInput) LinkedServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LinkedService {
return vs[0].(map[string]*LinkedService)[vs[1].(string)]
}).(LinkedServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceInput)(nil)).Elem(), &LinkedService{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceArrayInput)(nil)).Elem(), LinkedServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkedServiceMapInput)(nil)).Elem(), LinkedServiceMap{})
pulumi.RegisterOutputType(LinkedServiceOutput{})
pulumi.RegisterOutputType(LinkedServiceArrayOutput{})
pulumi.RegisterOutputType(LinkedServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/queryPack.go | sdk/go/azure/loganalytics/queryPack.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Query Pack.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewQueryPack(ctx, "example", &loganalytics.QueryPackArgs{
// Name: pulumi.String("example-laqp"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2019-09-01
//
// ## Import
//
// Log Analytics Query Packs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/queryPack:QueryPack example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.OperationalInsights/queryPacks/queryPack1
// ```
type QueryPack struct {
pulumi.CustomResourceState
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewQueryPack registers a new resource with the given unique name, arguments, and options.
func NewQueryPack(ctx *pulumi.Context,
name string, args *QueryPackArgs, opts ...pulumi.ResourceOption) (*QueryPack, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource QueryPack
err := ctx.RegisterResource("azure:loganalytics/queryPack:QueryPack", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueryPack gets an existing QueryPack resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetQueryPack(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueryPackState, opts ...pulumi.ResourceOption) (*QueryPack, error) {
var resource QueryPack
err := ctx.ReadResource("azure:loganalytics/queryPack:QueryPack", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering QueryPack resources.
type queryPackState struct {
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
Tags map[string]string `pulumi:"tags"`
}
type QueryPackState struct {
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
Tags pulumi.StringMapInput
}
func (QueryPackState) ElementType() reflect.Type {
return reflect.TypeOf((*queryPackState)(nil)).Elem()
}
type queryPackArgs struct {
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a QueryPack resource.
type QueryPackArgs struct {
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
Tags pulumi.StringMapInput
}
func (QueryPackArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queryPackArgs)(nil)).Elem()
}
type QueryPackInput interface {
pulumi.Input
ToQueryPackOutput() QueryPackOutput
ToQueryPackOutputWithContext(ctx context.Context) QueryPackOutput
}
func (*QueryPack) ElementType() reflect.Type {
return reflect.TypeOf((**QueryPack)(nil)).Elem()
}
func (i *QueryPack) ToQueryPackOutput() QueryPackOutput {
return i.ToQueryPackOutputWithContext(context.Background())
}
func (i *QueryPack) ToQueryPackOutputWithContext(ctx context.Context) QueryPackOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueryPackOutput)
}
// QueryPackArrayInput is an input type that accepts QueryPackArray and QueryPackArrayOutput values.
// You can construct a concrete instance of `QueryPackArrayInput` via:
//
// QueryPackArray{ QueryPackArgs{...} }
type QueryPackArrayInput interface {
pulumi.Input
ToQueryPackArrayOutput() QueryPackArrayOutput
ToQueryPackArrayOutputWithContext(context.Context) QueryPackArrayOutput
}
type QueryPackArray []QueryPackInput
func (QueryPackArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueryPack)(nil)).Elem()
}
func (i QueryPackArray) ToQueryPackArrayOutput() QueryPackArrayOutput {
return i.ToQueryPackArrayOutputWithContext(context.Background())
}
func (i QueryPackArray) ToQueryPackArrayOutputWithContext(ctx context.Context) QueryPackArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueryPackArrayOutput)
}
// QueryPackMapInput is an input type that accepts QueryPackMap and QueryPackMapOutput values.
// You can construct a concrete instance of `QueryPackMapInput` via:
//
// QueryPackMap{ "key": QueryPackArgs{...} }
type QueryPackMapInput interface {
pulumi.Input
ToQueryPackMapOutput() QueryPackMapOutput
ToQueryPackMapOutputWithContext(context.Context) QueryPackMapOutput
}
type QueryPackMap map[string]QueryPackInput
func (QueryPackMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueryPack)(nil)).Elem()
}
func (i QueryPackMap) ToQueryPackMapOutput() QueryPackMapOutput {
return i.ToQueryPackMapOutputWithContext(context.Background())
}
func (i QueryPackMap) ToQueryPackMapOutputWithContext(ctx context.Context) QueryPackMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueryPackMapOutput)
}
type QueryPackOutput struct{ *pulumi.OutputState }
func (QueryPackOutput) ElementType() reflect.Type {
return reflect.TypeOf((**QueryPack)(nil)).Elem()
}
func (o QueryPackOutput) ToQueryPackOutput() QueryPackOutput {
return o
}
func (o QueryPackOutput) ToQueryPackOutputWithContext(ctx context.Context) QueryPackOutput {
return o
}
// The Azure Region where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
func (o QueryPackOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *QueryPack) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Log Analytics Query Pack. Changing this forces a new resource to be created.
func (o QueryPackOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *QueryPack) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Query Pack should exist. Changing this forces a new resource to be created.
func (o QueryPackOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *QueryPack) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Log Analytics Query Pack.
func (o QueryPackOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *QueryPack) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type QueryPackArrayOutput struct{ *pulumi.OutputState }
func (QueryPackArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueryPack)(nil)).Elem()
}
func (o QueryPackArrayOutput) ToQueryPackArrayOutput() QueryPackArrayOutput {
return o
}
func (o QueryPackArrayOutput) ToQueryPackArrayOutputWithContext(ctx context.Context) QueryPackArrayOutput {
return o
}
func (o QueryPackArrayOutput) Index(i pulumi.IntInput) QueryPackOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *QueryPack {
return vs[0].([]*QueryPack)[vs[1].(int)]
}).(QueryPackOutput)
}
type QueryPackMapOutput struct{ *pulumi.OutputState }
func (QueryPackMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueryPack)(nil)).Elem()
}
func (o QueryPackMapOutput) ToQueryPackMapOutput() QueryPackMapOutput {
return o
}
func (o QueryPackMapOutput) ToQueryPackMapOutputWithContext(ctx context.Context) QueryPackMapOutput {
return o
}
func (o QueryPackMapOutput) MapIndex(k pulumi.StringInput) QueryPackOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *QueryPack {
return vs[0].(map[string]*QueryPack)[vs[1].(string)]
}).(QueryPackOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*QueryPackInput)(nil)).Elem(), &QueryPack{})
pulumi.RegisterInputType(reflect.TypeOf((*QueryPackArrayInput)(nil)).Elem(), QueryPackArray{})
pulumi.RegisterInputType(reflect.TypeOf((*QueryPackMapInput)(nil)).Elem(), QueryPackMap{})
pulumi.RegisterOutputType(QueryPackOutput{})
pulumi.RegisterOutputType(QueryPackArrayOutput{})
pulumi.RegisterOutputType(QueryPackMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/linkedStorageAccount.go | sdk/go/azure/loganalytics/linkedStorageAccount.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Log Analytics Linked Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("exampleworkspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewLinkedStorageAccount(ctx, "example", &loganalytics.LinkedStorageAccountArgs{
// DataSourceType: pulumi.String("CustomLogs"),
// ResourceGroupName: example.Name,
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// StorageAccountIds: pulumi.StringArray{
// exampleAccount.ID(),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2020-08-01
//
// ## Import
//
// Log Analytics Linked Storage Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/linkedStorageAccount:LinkedStorageAccount example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/linkedStorageAccounts/{dataSourceType}
// ```
type LinkedStorageAccount struct {
pulumi.CustomResourceState
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
DataSourceType pulumi.StringOutput `pulumi:"dataSourceType"`
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The storage account resource ids to be linked.
StorageAccountIds pulumi.StringArrayOutput `pulumi:"storageAccountIds"`
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
WorkspaceResourceId pulumi.StringOutput `pulumi:"workspaceResourceId"`
}
// NewLinkedStorageAccount registers a new resource with the given unique name, arguments, and options.
func NewLinkedStorageAccount(ctx *pulumi.Context,
name string, args *LinkedStorageAccountArgs, opts ...pulumi.ResourceOption) (*LinkedStorageAccount, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DataSourceType == nil {
return nil, errors.New("invalid value for required argument 'DataSourceType'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageAccountIds == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountIds'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LinkedStorageAccount
err := ctx.RegisterResource("azure:loganalytics/linkedStorageAccount:LinkedStorageAccount", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLinkedStorageAccount gets an existing LinkedStorageAccount resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLinkedStorageAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LinkedStorageAccountState, opts ...pulumi.ResourceOption) (*LinkedStorageAccount, error) {
var resource LinkedStorageAccount
err := ctx.ReadResource("azure:loganalytics/linkedStorageAccount:LinkedStorageAccount", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LinkedStorageAccount resources.
type linkedStorageAccountState struct {
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
DataSourceType *string `pulumi:"dataSourceType"`
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The storage account resource ids to be linked.
StorageAccountIds []string `pulumi:"storageAccountIds"`
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
WorkspaceId *string `pulumi:"workspaceId"`
WorkspaceResourceId *string `pulumi:"workspaceResourceId"`
}
type LinkedStorageAccountState struct {
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
DataSourceType pulumi.StringPtrInput
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
ResourceGroupName pulumi.StringPtrInput
// The storage account resource ids to be linked.
StorageAccountIds pulumi.StringArrayInput
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
WorkspaceId pulumi.StringPtrInput
WorkspaceResourceId pulumi.StringPtrInput
}
func (LinkedStorageAccountState) ElementType() reflect.Type {
return reflect.TypeOf((*linkedStorageAccountState)(nil)).Elem()
}
type linkedStorageAccountArgs struct {
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
DataSourceType string `pulumi:"dataSourceType"`
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The storage account resource ids to be linked.
StorageAccountIds []string `pulumi:"storageAccountIds"`
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
WorkspaceId *string `pulumi:"workspaceId"`
WorkspaceResourceId *string `pulumi:"workspaceResourceId"`
}
// The set of arguments for constructing a LinkedStorageAccount resource.
type LinkedStorageAccountArgs struct {
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
DataSourceType pulumi.StringInput
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
ResourceGroupName pulumi.StringInput
// The storage account resource ids to be linked.
StorageAccountIds pulumi.StringArrayInput
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
WorkspaceId pulumi.StringPtrInput
WorkspaceResourceId pulumi.StringPtrInput
}
func (LinkedStorageAccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*linkedStorageAccountArgs)(nil)).Elem()
}
type LinkedStorageAccountInput interface {
pulumi.Input
ToLinkedStorageAccountOutput() LinkedStorageAccountOutput
ToLinkedStorageAccountOutputWithContext(ctx context.Context) LinkedStorageAccountOutput
}
func (*LinkedStorageAccount) ElementType() reflect.Type {
return reflect.TypeOf((**LinkedStorageAccount)(nil)).Elem()
}
func (i *LinkedStorageAccount) ToLinkedStorageAccountOutput() LinkedStorageAccountOutput {
return i.ToLinkedStorageAccountOutputWithContext(context.Background())
}
func (i *LinkedStorageAccount) ToLinkedStorageAccountOutputWithContext(ctx context.Context) LinkedStorageAccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedStorageAccountOutput)
}
// LinkedStorageAccountArrayInput is an input type that accepts LinkedStorageAccountArray and LinkedStorageAccountArrayOutput values.
// You can construct a concrete instance of `LinkedStorageAccountArrayInput` via:
//
// LinkedStorageAccountArray{ LinkedStorageAccountArgs{...} }
type LinkedStorageAccountArrayInput interface {
pulumi.Input
ToLinkedStorageAccountArrayOutput() LinkedStorageAccountArrayOutput
ToLinkedStorageAccountArrayOutputWithContext(context.Context) LinkedStorageAccountArrayOutput
}
type LinkedStorageAccountArray []LinkedStorageAccountInput
func (LinkedStorageAccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkedStorageAccount)(nil)).Elem()
}
func (i LinkedStorageAccountArray) ToLinkedStorageAccountArrayOutput() LinkedStorageAccountArrayOutput {
return i.ToLinkedStorageAccountArrayOutputWithContext(context.Background())
}
func (i LinkedStorageAccountArray) ToLinkedStorageAccountArrayOutputWithContext(ctx context.Context) LinkedStorageAccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedStorageAccountArrayOutput)
}
// LinkedStorageAccountMapInput is an input type that accepts LinkedStorageAccountMap and LinkedStorageAccountMapOutput values.
// You can construct a concrete instance of `LinkedStorageAccountMapInput` via:
//
// LinkedStorageAccountMap{ "key": LinkedStorageAccountArgs{...} }
type LinkedStorageAccountMapInput interface {
pulumi.Input
ToLinkedStorageAccountMapOutput() LinkedStorageAccountMapOutput
ToLinkedStorageAccountMapOutputWithContext(context.Context) LinkedStorageAccountMapOutput
}
type LinkedStorageAccountMap map[string]LinkedStorageAccountInput
func (LinkedStorageAccountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkedStorageAccount)(nil)).Elem()
}
func (i LinkedStorageAccountMap) ToLinkedStorageAccountMapOutput() LinkedStorageAccountMapOutput {
return i.ToLinkedStorageAccountMapOutputWithContext(context.Background())
}
func (i LinkedStorageAccountMap) ToLinkedStorageAccountMapOutputWithContext(ctx context.Context) LinkedStorageAccountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LinkedStorageAccountMapOutput)
}
type LinkedStorageAccountOutput struct{ *pulumi.OutputState }
func (LinkedStorageAccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LinkedStorageAccount)(nil)).Elem()
}
func (o LinkedStorageAccountOutput) ToLinkedStorageAccountOutput() LinkedStorageAccountOutput {
return o
}
func (o LinkedStorageAccountOutput) ToLinkedStorageAccountOutputWithContext(ctx context.Context) LinkedStorageAccountOutput {
return o
}
// The data source type which should be used for this Log Analytics Linked Storage Account. Possible values are `CustomLogs`, `AzureWatson`, `Query`, `Ingestion` and `Alerts`. Changing this forces a new Log Analytics Linked Storage Account to be created.
func (o LinkedStorageAccountOutput) DataSourceType() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedStorageAccount) pulumi.StringOutput { return v.DataSourceType }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Log Analytics Linked Storage Account should exist. Changing this forces a new Log Analytics Linked Storage Account to be created.
func (o LinkedStorageAccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedStorageAccount) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The storage account resource ids to be linked.
func (o LinkedStorageAccountOutput) StorageAccountIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LinkedStorageAccount) pulumi.StringArrayOutput { return v.StorageAccountIds }).(pulumi.StringArrayOutput)
}
// The resource ID of the Log Analytics Workspace. Changing this forces a new Log Analytics Linked Storage Account to be created.
func (o LinkedStorageAccountOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedStorageAccount) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
func (o LinkedStorageAccountOutput) WorkspaceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *LinkedStorageAccount) pulumi.StringOutput { return v.WorkspaceResourceId }).(pulumi.StringOutput)
}
type LinkedStorageAccountArrayOutput struct{ *pulumi.OutputState }
func (LinkedStorageAccountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LinkedStorageAccount)(nil)).Elem()
}
func (o LinkedStorageAccountArrayOutput) ToLinkedStorageAccountArrayOutput() LinkedStorageAccountArrayOutput {
return o
}
func (o LinkedStorageAccountArrayOutput) ToLinkedStorageAccountArrayOutputWithContext(ctx context.Context) LinkedStorageAccountArrayOutput {
return o
}
func (o LinkedStorageAccountArrayOutput) Index(i pulumi.IntInput) LinkedStorageAccountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LinkedStorageAccount {
return vs[0].([]*LinkedStorageAccount)[vs[1].(int)]
}).(LinkedStorageAccountOutput)
}
type LinkedStorageAccountMapOutput struct{ *pulumi.OutputState }
func (LinkedStorageAccountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LinkedStorageAccount)(nil)).Elem()
}
func (o LinkedStorageAccountMapOutput) ToLinkedStorageAccountMapOutput() LinkedStorageAccountMapOutput {
return o
}
func (o LinkedStorageAccountMapOutput) ToLinkedStorageAccountMapOutputWithContext(ctx context.Context) LinkedStorageAccountMapOutput {
return o
}
func (o LinkedStorageAccountMapOutput) MapIndex(k pulumi.StringInput) LinkedStorageAccountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LinkedStorageAccount {
return vs[0].(map[string]*LinkedStorageAccount)[vs[1].(string)]
}).(LinkedStorageAccountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LinkedStorageAccountInput)(nil)).Elem(), &LinkedStorageAccount{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkedStorageAccountArrayInput)(nil)).Elem(), LinkedStorageAccountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LinkedStorageAccountMapInput)(nil)).Elem(), LinkedStorageAccountMap{})
pulumi.RegisterOutputType(LinkedStorageAccountOutput{})
pulumi.RegisterOutputType(LinkedStorageAccountArrayOutput{})
pulumi.RegisterOutputType(LinkedStorageAccountMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loganalytics/workspaceTableCustomLog.go | sdk/go/azure/loganalytics/workspaceTableCustomLog.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package loganalytics
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Custom Log Table in a Log Analytics (formally Operational Insights) Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loganalytics"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// RetentionInDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = loganalytics.NewWorkspaceTableCustomLog(ctx, "example", &loganalytics.WorkspaceTableCustomLogArgs{
// Name: pulumi.String("example_CL"),
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// Columns: loganalytics.WorkspaceTableCustomLogColumnArray{
// &loganalytics.WorkspaceTableCustomLogColumnArgs{
// Name: pulumi.String("TimeGenerated"),
// Type: pulumi.String("datetime"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.OperationalInsights` - 2022-10-01
//
// ## Import
//
// Log Analytics Workspace Table Custom Logs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:loganalytics/workspaceTableCustomLog:WorkspaceTableCustomLog example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/tables/table1
// ```
type WorkspaceTableCustomLog struct {
pulumi.CustomResourceState
// One or more `column` blocks as defined below.
Columns WorkspaceTableCustomLogColumnArrayOutput `pulumi:"columns"`
// The description of the table.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of the table.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name pulumi.StringOutput `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
Plan pulumi.StringPtrOutput `pulumi:"plan"`
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"`
// A list of solutions associated with the table.
Solutions pulumi.StringArrayOutput `pulumi:"solutions"`
// One or more `standardColumn` blocks as defined below.
StandardColumns WorkspaceTableCustomLogStandardColumnArrayOutput `pulumi:"standardColumns"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
TotalRetentionInDays pulumi.IntPtrOutput `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceTableCustomLog registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceTableCustomLog(ctx *pulumi.Context,
name string, args *WorkspaceTableCustomLogArgs, opts ...pulumi.ResourceOption) (*WorkspaceTableCustomLog, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Columns == nil {
return nil, errors.New("invalid value for required argument 'Columns'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceTableCustomLog
err := ctx.RegisterResource("azure:loganalytics/workspaceTableCustomLog:WorkspaceTableCustomLog", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceTableCustomLog gets an existing WorkspaceTableCustomLog resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceTableCustomLog(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceTableCustomLogState, opts ...pulumi.ResourceOption) (*WorkspaceTableCustomLog, error) {
var resource WorkspaceTableCustomLog
err := ctx.ReadResource("azure:loganalytics/workspaceTableCustomLog:WorkspaceTableCustomLog", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceTableCustomLog resources.
type workspaceTableCustomLogState struct {
// One or more `column` blocks as defined below.
Columns []WorkspaceTableCustomLogColumn `pulumi:"columns"`
// The description of the table.
Description *string `pulumi:"description"`
// The display name of the table.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name *string `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
Plan *string `pulumi:"plan"`
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
RetentionInDays *int `pulumi:"retentionInDays"`
// A list of solutions associated with the table.
Solutions []string `pulumi:"solutions"`
// One or more `standardColumn` blocks as defined below.
StandardColumns []WorkspaceTableCustomLogStandardColumn `pulumi:"standardColumns"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
TotalRetentionInDays *int `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceTableCustomLogState struct {
// One or more `column` blocks as defined below.
Columns WorkspaceTableCustomLogColumnArrayInput
// The description of the table.
Description pulumi.StringPtrInput
// The display name of the table.
DisplayName pulumi.StringPtrInput
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name pulumi.StringPtrInput
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
Plan pulumi.StringPtrInput
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
RetentionInDays pulumi.IntPtrInput
// A list of solutions associated with the table.
Solutions pulumi.StringArrayInput
// One or more `standardColumn` blocks as defined below.
StandardColumns WorkspaceTableCustomLogStandardColumnArrayInput
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
TotalRetentionInDays pulumi.IntPtrInput
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceTableCustomLogState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceTableCustomLogState)(nil)).Elem()
}
type workspaceTableCustomLogArgs struct {
// One or more `column` blocks as defined below.
Columns []WorkspaceTableCustomLogColumn `pulumi:"columns"`
// The description of the table.
Description *string `pulumi:"description"`
// The display name of the table.
DisplayName *string `pulumi:"displayName"`
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name *string `pulumi:"name"`
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
Plan *string `pulumi:"plan"`
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
RetentionInDays *int `pulumi:"retentionInDays"`
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
TotalRetentionInDays *int `pulumi:"totalRetentionInDays"`
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceTableCustomLog resource.
type WorkspaceTableCustomLogArgs struct {
// One or more `column` blocks as defined below.
Columns WorkspaceTableCustomLogColumnArrayInput
// The description of the table.
Description pulumi.StringPtrInput
// The display name of the table.
DisplayName pulumi.StringPtrInput
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
Name pulumi.StringPtrInput
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
Plan pulumi.StringPtrInput
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
RetentionInDays pulumi.IntPtrInput
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
TotalRetentionInDays pulumi.IntPtrInput
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringInput
}
func (WorkspaceTableCustomLogArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceTableCustomLogArgs)(nil)).Elem()
}
type WorkspaceTableCustomLogInput interface {
pulumi.Input
ToWorkspaceTableCustomLogOutput() WorkspaceTableCustomLogOutput
ToWorkspaceTableCustomLogOutputWithContext(ctx context.Context) WorkspaceTableCustomLogOutput
}
func (*WorkspaceTableCustomLog) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceTableCustomLog)(nil)).Elem()
}
func (i *WorkspaceTableCustomLog) ToWorkspaceTableCustomLogOutput() WorkspaceTableCustomLogOutput {
return i.ToWorkspaceTableCustomLogOutputWithContext(context.Background())
}
func (i *WorkspaceTableCustomLog) ToWorkspaceTableCustomLogOutputWithContext(ctx context.Context) WorkspaceTableCustomLogOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogOutput)
}
// WorkspaceTableCustomLogArrayInput is an input type that accepts WorkspaceTableCustomLogArray and WorkspaceTableCustomLogArrayOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogArrayInput` via:
//
// WorkspaceTableCustomLogArray{ WorkspaceTableCustomLogArgs{...} }
type WorkspaceTableCustomLogArrayInput interface {
pulumi.Input
ToWorkspaceTableCustomLogArrayOutput() WorkspaceTableCustomLogArrayOutput
ToWorkspaceTableCustomLogArrayOutputWithContext(context.Context) WorkspaceTableCustomLogArrayOutput
}
type WorkspaceTableCustomLogArray []WorkspaceTableCustomLogInput
func (WorkspaceTableCustomLogArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceTableCustomLog)(nil)).Elem()
}
func (i WorkspaceTableCustomLogArray) ToWorkspaceTableCustomLogArrayOutput() WorkspaceTableCustomLogArrayOutput {
return i.ToWorkspaceTableCustomLogArrayOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogArray) ToWorkspaceTableCustomLogArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogArrayOutput)
}
// WorkspaceTableCustomLogMapInput is an input type that accepts WorkspaceTableCustomLogMap and WorkspaceTableCustomLogMapOutput values.
// You can construct a concrete instance of `WorkspaceTableCustomLogMapInput` via:
//
// WorkspaceTableCustomLogMap{ "key": WorkspaceTableCustomLogArgs{...} }
type WorkspaceTableCustomLogMapInput interface {
pulumi.Input
ToWorkspaceTableCustomLogMapOutput() WorkspaceTableCustomLogMapOutput
ToWorkspaceTableCustomLogMapOutputWithContext(context.Context) WorkspaceTableCustomLogMapOutput
}
type WorkspaceTableCustomLogMap map[string]WorkspaceTableCustomLogInput
func (WorkspaceTableCustomLogMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceTableCustomLog)(nil)).Elem()
}
func (i WorkspaceTableCustomLogMap) ToWorkspaceTableCustomLogMapOutput() WorkspaceTableCustomLogMapOutput {
return i.ToWorkspaceTableCustomLogMapOutputWithContext(context.Background())
}
func (i WorkspaceTableCustomLogMap) ToWorkspaceTableCustomLogMapOutputWithContext(ctx context.Context) WorkspaceTableCustomLogMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceTableCustomLogMapOutput)
}
type WorkspaceTableCustomLogOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceTableCustomLog)(nil)).Elem()
}
func (o WorkspaceTableCustomLogOutput) ToWorkspaceTableCustomLogOutput() WorkspaceTableCustomLogOutput {
return o
}
func (o WorkspaceTableCustomLogOutput) ToWorkspaceTableCustomLogOutputWithContext(ctx context.Context) WorkspaceTableCustomLogOutput {
return o
}
// One or more `column` blocks as defined below.
func (o WorkspaceTableCustomLogOutput) Columns() WorkspaceTableCustomLogColumnArrayOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) WorkspaceTableCustomLogColumnArrayOutput { return v.Columns }).(WorkspaceTableCustomLogColumnArrayOutput)
}
// The description of the table.
func (o WorkspaceTableCustomLogOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of the table.
func (o WorkspaceTableCustomLogOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Log Analytics Workspace Table Custom Log. Changing this forces a new resource to be created.
//
// > **Note:** `name` must end with `_CL`.
func (o WorkspaceTableCustomLogOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specify the system how to handle and charge the logs ingested to the table. Possible values are `Analytics` and `Basic`. Defaults to `Analytics`.
//
// > **Note:** Changing the table's `plan` is limited to once a week.
func (o WorkspaceTableCustomLogOutput) Plan() pulumi.StringPtrOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringPtrOutput { return v.Plan }).(pulumi.StringPtrOutput)
}
// The table's retention in days. Possible values range between `4` and `730`.
//
// > **Note:** `retentionInDays` cannot be set when `plan` is set to `Basic` because the retention is fixed.
func (o WorkspaceTableCustomLogOutput) RetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput)
}
// A list of solutions associated with the table.
func (o WorkspaceTableCustomLogOutput) Solutions() pulumi.StringArrayOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringArrayOutput { return v.Solutions }).(pulumi.StringArrayOutput)
}
// One or more `standardColumn` blocks as defined below.
func (o WorkspaceTableCustomLogOutput) StandardColumns() WorkspaceTableCustomLogStandardColumnArrayOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) WorkspaceTableCustomLogStandardColumnArrayOutput {
return v.StandardColumns
}).(WorkspaceTableCustomLogStandardColumnArrayOutput)
}
// The table's total retention in days. Possible values range between `4` and `730`; or `1095`, `1460`, `1826`, `2191`, `2556`, `2922`, `3288`, `3653`, `4018`, or `4383`.
func (o WorkspaceTableCustomLogOutput) TotalRetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.IntPtrOutput { return v.TotalRetentionInDays }).(pulumi.IntPtrOutput)
}
// The object ID of the Log Analytics Workspace that contains the table. Changing this forces a new resource to be created.
func (o WorkspaceTableCustomLogOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceTableCustomLog) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceTableCustomLogArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceTableCustomLog)(nil)).Elem()
}
func (o WorkspaceTableCustomLogArrayOutput) ToWorkspaceTableCustomLogArrayOutput() WorkspaceTableCustomLogArrayOutput {
return o
}
func (o WorkspaceTableCustomLogArrayOutput) ToWorkspaceTableCustomLogArrayOutputWithContext(ctx context.Context) WorkspaceTableCustomLogArrayOutput {
return o
}
func (o WorkspaceTableCustomLogArrayOutput) Index(i pulumi.IntInput) WorkspaceTableCustomLogOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceTableCustomLog {
return vs[0].([]*WorkspaceTableCustomLog)[vs[1].(int)]
}).(WorkspaceTableCustomLogOutput)
}
type WorkspaceTableCustomLogMapOutput struct{ *pulumi.OutputState }
func (WorkspaceTableCustomLogMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceTableCustomLog)(nil)).Elem()
}
func (o WorkspaceTableCustomLogMapOutput) ToWorkspaceTableCustomLogMapOutput() WorkspaceTableCustomLogMapOutput {
return o
}
func (o WorkspaceTableCustomLogMapOutput) ToWorkspaceTableCustomLogMapOutputWithContext(ctx context.Context) WorkspaceTableCustomLogMapOutput {
return o
}
func (o WorkspaceTableCustomLogMapOutput) MapIndex(k pulumi.StringInput) WorkspaceTableCustomLogOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceTableCustomLog {
return vs[0].(map[string]*WorkspaceTableCustomLog)[vs[1].(string)]
}).(WorkspaceTableCustomLogOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogInput)(nil)).Elem(), &WorkspaceTableCustomLog{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogArrayInput)(nil)).Elem(), WorkspaceTableCustomLogArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceTableCustomLogMapInput)(nil)).Elem(), WorkspaceTableCustomLogMap{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogArrayOutput{})
pulumi.RegisterOutputType(WorkspaceTableCustomLogMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/getInstance.go | sdk/go/azure/digitaltwins/getInstance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Digital Twins instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := digitaltwins.LookupInstance(ctx, &digitaltwins.LookupInstanceArgs{
// Name: "existing-digital-twins",
// ResourceGroupName: "existing-resgroup",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
func LookupInstance(ctx *pulumi.Context, args *LookupInstanceArgs, opts ...pulumi.InvokeOption) (*LookupInstanceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupInstanceResult
err := ctx.Invoke("azure:digitaltwins/getInstance:getInstance", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getInstance.
type LookupInstanceArgs struct {
// The name of this Digital Twins instance.
Name string `pulumi:"name"`
// The name of the Resource Group where the Digital Twins instance exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getInstance.
type LookupInstanceResult struct {
// The API endpoint to work with this Digital Twins instance.
HostName string `pulumi:"hostName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Digital Twins instance exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Digital Twins instance.
Tags map[string]string `pulumi:"tags"`
}
func LookupInstanceOutput(ctx *pulumi.Context, args LookupInstanceOutputArgs, opts ...pulumi.InvokeOption) LookupInstanceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupInstanceResultOutput, error) {
args := v.(LookupInstanceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:digitaltwins/getInstance:getInstance", args, LookupInstanceResultOutput{}, options).(LookupInstanceResultOutput), nil
}).(LookupInstanceResultOutput)
}
// A collection of arguments for invoking getInstance.
type LookupInstanceOutputArgs struct {
// The name of this Digital Twins instance.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Digital Twins instance exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupInstanceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupInstanceArgs)(nil)).Elem()
}
// A collection of values returned by getInstance.
type LookupInstanceResultOutput struct{ *pulumi.OutputState }
func (LookupInstanceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupInstanceResult)(nil)).Elem()
}
func (o LookupInstanceResultOutput) ToLookupInstanceResultOutput() LookupInstanceResultOutput {
return o
}
func (o LookupInstanceResultOutput) ToLookupInstanceResultOutputWithContext(ctx context.Context) LookupInstanceResultOutput {
return o
}
// The API endpoint to work with this Digital Twins instance.
func (o LookupInstanceResultOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v LookupInstanceResult) string { return v.HostName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupInstanceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupInstanceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Digital Twins instance exists.
func (o LookupInstanceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupInstanceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupInstanceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupInstanceResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupInstanceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupInstanceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Digital Twins instance.
func (o LookupInstanceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupInstanceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupInstanceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/init.go | sdk/go/azure/digitaltwins/init.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"fmt"
"github.com/blang/semver"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type module struct {
version semver.Version
}
func (m *module) Version() semver.Version {
return m.version
}
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ {
case "azure:digitaltwins/endpointEventGrid:EndpointEventGrid":
r = &EndpointEventGrid{}
case "azure:digitaltwins/endpointEventHub:EndpointEventHub":
r = &EndpointEventHub{}
case "azure:digitaltwins/endpointServicebus:EndpointServicebus":
r = &EndpointServicebus{}
case "azure:digitaltwins/instance:Instance":
r = &Instance{}
case "azure:digitaltwins/timeSeriesDatabaseConnection:TimeSeriesDatabaseConnection":
r = &TimeSeriesDatabaseConnection{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"digitaltwins/endpointEventGrid",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"digitaltwins/endpointEventHub",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"digitaltwins/endpointServicebus",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"digitaltwins/instance",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"digitaltwins/timeSeriesDatabaseConnection",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/pulumiTypes.go | sdk/go/azure/digitaltwins/pulumiTypes.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type InstanceIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Digital Twins instance.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Digital Twins instance. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type string `pulumi:"type"`
}
// InstanceIdentityInput is an input type that accepts InstanceIdentityArgs and InstanceIdentityOutput values.
// You can construct a concrete instance of `InstanceIdentityInput` via:
//
// InstanceIdentityArgs{...}
type InstanceIdentityInput interface {
pulumi.Input
ToInstanceIdentityOutput() InstanceIdentityOutput
ToInstanceIdentityOutputWithContext(context.Context) InstanceIdentityOutput
}
type InstanceIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Digital Twins instance.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Digital Twins instance. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type pulumi.StringInput `pulumi:"type"`
}
func (InstanceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*InstanceIdentity)(nil)).Elem()
}
func (i InstanceIdentityArgs) ToInstanceIdentityOutput() InstanceIdentityOutput {
return i.ToInstanceIdentityOutputWithContext(context.Background())
}
func (i InstanceIdentityArgs) ToInstanceIdentityOutputWithContext(ctx context.Context) InstanceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceIdentityOutput)
}
func (i InstanceIdentityArgs) ToInstanceIdentityPtrOutput() InstanceIdentityPtrOutput {
return i.ToInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i InstanceIdentityArgs) ToInstanceIdentityPtrOutputWithContext(ctx context.Context) InstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceIdentityOutput).ToInstanceIdentityPtrOutputWithContext(ctx)
}
// InstanceIdentityPtrInput is an input type that accepts InstanceIdentityArgs, InstanceIdentityPtr and InstanceIdentityPtrOutput values.
// You can construct a concrete instance of `InstanceIdentityPtrInput` via:
//
// InstanceIdentityArgs{...}
//
// or:
//
// nil
type InstanceIdentityPtrInput interface {
pulumi.Input
ToInstanceIdentityPtrOutput() InstanceIdentityPtrOutput
ToInstanceIdentityPtrOutputWithContext(context.Context) InstanceIdentityPtrOutput
}
type instanceIdentityPtrType InstanceIdentityArgs
func InstanceIdentityPtr(v *InstanceIdentityArgs) InstanceIdentityPtrInput {
return (*instanceIdentityPtrType)(v)
}
func (*instanceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceIdentity)(nil)).Elem()
}
func (i *instanceIdentityPtrType) ToInstanceIdentityPtrOutput() InstanceIdentityPtrOutput {
return i.ToInstanceIdentityPtrOutputWithContext(context.Background())
}
func (i *instanceIdentityPtrType) ToInstanceIdentityPtrOutputWithContext(ctx context.Context) InstanceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceIdentityPtrOutput)
}
type InstanceIdentityOutput struct{ *pulumi.OutputState }
func (InstanceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*InstanceIdentity)(nil)).Elem()
}
func (o InstanceIdentityOutput) ToInstanceIdentityOutput() InstanceIdentityOutput {
return o
}
func (o InstanceIdentityOutput) ToInstanceIdentityOutputWithContext(ctx context.Context) InstanceIdentityOutput {
return o
}
func (o InstanceIdentityOutput) ToInstanceIdentityPtrOutput() InstanceIdentityPtrOutput {
return o.ToInstanceIdentityPtrOutputWithContext(context.Background())
}
func (o InstanceIdentityOutput) ToInstanceIdentityPtrOutputWithContext(ctx context.Context) InstanceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v InstanceIdentity) *InstanceIdentity {
return &v
}).(InstanceIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Digital Twins instance.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o InstanceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v InstanceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o InstanceIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v InstanceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o InstanceIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v InstanceIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Digital Twins instance. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o InstanceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v InstanceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type InstanceIdentityPtrOutput struct{ *pulumi.OutputState }
func (InstanceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceIdentity)(nil)).Elem()
}
func (o InstanceIdentityPtrOutput) ToInstanceIdentityPtrOutput() InstanceIdentityPtrOutput {
return o
}
func (o InstanceIdentityPtrOutput) ToInstanceIdentityPtrOutputWithContext(ctx context.Context) InstanceIdentityPtrOutput {
return o
}
func (o InstanceIdentityPtrOutput) Elem() InstanceIdentityOutput {
return o.ApplyT(func(v *InstanceIdentity) InstanceIdentity {
if v != nil {
return *v
}
var ret InstanceIdentity
return ret
}).(InstanceIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Digital Twins instance.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o InstanceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *InstanceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o InstanceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o InstanceIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Digital Twins instance. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o InstanceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceIdentityInput)(nil)).Elem(), InstanceIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceIdentityPtrInput)(nil)).Elem(), InstanceIdentityArgs{})
pulumi.RegisterOutputType(InstanceIdentityOutput{})
pulumi.RegisterOutputType(InstanceIdentityPtrOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/endpointEventGrid.go | sdk/go/azure/digitaltwins/endpointEventGrid.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Digital Twins Event Grid Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventgrid"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example_resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := digitaltwins.NewInstance(ctx, "example", &digitaltwins.InstanceArgs{
// Name: pulumi.String("example-DT"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleTopic, err := eventgrid.NewTopic(ctx, "example", &eventgrid.TopicArgs{
// Name: pulumi.String("example-topic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = digitaltwins.NewEndpointEventGrid(ctx, "example", &digitaltwins.EndpointEventGridArgs{
// Name: pulumi.String("example-EG"),
// DigitalTwinsId: exampleInstance.ID(),
// EventgridTopicEndpoint: exampleTopic.Endpoint,
// EventgridTopicPrimaryAccessKey: exampleTopic.PrimaryAccessKey,
// EventgridTopicSecondaryAccessKey: exampleTopic.SecondaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
//
// ## Import
//
// Digital Twins Eventgrid Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:digitaltwins/endpointEventGrid:EndpointEventGrid example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1/endpoints/ep1
// ```
type EndpointEventGrid struct {
pulumi.CustomResourceState
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrOutput `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
DigitalTwinsId pulumi.StringOutput `pulumi:"digitalTwinsId"`
// The endpoint of the Event Grid Topic.
EventgridTopicEndpoint pulumi.StringOutput `pulumi:"eventgridTopicEndpoint"`
// The primary access key of the Event Grid Topic.
EventgridTopicPrimaryAccessKey pulumi.StringOutput `pulumi:"eventgridTopicPrimaryAccessKey"`
// The secondary access key of the Event Grid Topic.
EventgridTopicSecondaryAccessKey pulumi.StringOutput `pulumi:"eventgridTopicSecondaryAccessKey"`
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewEndpointEventGrid registers a new resource with the given unique name, arguments, and options.
func NewEndpointEventGrid(ctx *pulumi.Context,
name string, args *EndpointEventGridArgs, opts ...pulumi.ResourceOption) (*EndpointEventGrid, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DigitalTwinsId == nil {
return nil, errors.New("invalid value for required argument 'DigitalTwinsId'")
}
if args.EventgridTopicEndpoint == nil {
return nil, errors.New("invalid value for required argument 'EventgridTopicEndpoint'")
}
if args.EventgridTopicPrimaryAccessKey == nil {
return nil, errors.New("invalid value for required argument 'EventgridTopicPrimaryAccessKey'")
}
if args.EventgridTopicSecondaryAccessKey == nil {
return nil, errors.New("invalid value for required argument 'EventgridTopicSecondaryAccessKey'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EndpointEventGrid
err := ctx.RegisterResource("azure:digitaltwins/endpointEventGrid:EndpointEventGrid", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointEventGrid gets an existing EndpointEventGrid resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpointEventGrid(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointEventGridState, opts ...pulumi.ResourceOption) (*EndpointEventGrid, error) {
var resource EndpointEventGrid
err := ctx.ReadResource("azure:digitaltwins/endpointEventGrid:EndpointEventGrid", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointEventGrid resources.
type endpointEventGridState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
DigitalTwinsId *string `pulumi:"digitalTwinsId"`
// The endpoint of the Event Grid Topic.
EventgridTopicEndpoint *string `pulumi:"eventgridTopicEndpoint"`
// The primary access key of the Event Grid Topic.
EventgridTopicPrimaryAccessKey *string `pulumi:"eventgridTopicPrimaryAccessKey"`
// The secondary access key of the Event Grid Topic.
EventgridTopicSecondaryAccessKey *string `pulumi:"eventgridTopicSecondaryAccessKey"`
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
Name *string `pulumi:"name"`
}
type EndpointEventGridState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
DigitalTwinsId pulumi.StringPtrInput
// The endpoint of the Event Grid Topic.
EventgridTopicEndpoint pulumi.StringPtrInput
// The primary access key of the Event Grid Topic.
EventgridTopicPrimaryAccessKey pulumi.StringPtrInput
// The secondary access key of the Event Grid Topic.
EventgridTopicSecondaryAccessKey pulumi.StringPtrInput
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
Name pulumi.StringPtrInput
}
func (EndpointEventGridState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventGridState)(nil)).Elem()
}
type endpointEventGridArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
DigitalTwinsId string `pulumi:"digitalTwinsId"`
// The endpoint of the Event Grid Topic.
EventgridTopicEndpoint string `pulumi:"eventgridTopicEndpoint"`
// The primary access key of the Event Grid Topic.
EventgridTopicPrimaryAccessKey string `pulumi:"eventgridTopicPrimaryAccessKey"`
// The secondary access key of the Event Grid Topic.
EventgridTopicSecondaryAccessKey string `pulumi:"eventgridTopicSecondaryAccessKey"`
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a EndpointEventGrid resource.
type EndpointEventGridArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
DigitalTwinsId pulumi.StringInput
// The endpoint of the Event Grid Topic.
EventgridTopicEndpoint pulumi.StringInput
// The primary access key of the Event Grid Topic.
EventgridTopicPrimaryAccessKey pulumi.StringInput
// The secondary access key of the Event Grid Topic.
EventgridTopicSecondaryAccessKey pulumi.StringInput
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
Name pulumi.StringPtrInput
}
func (EndpointEventGridArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventGridArgs)(nil)).Elem()
}
type EndpointEventGridInput interface {
pulumi.Input
ToEndpointEventGridOutput() EndpointEventGridOutput
ToEndpointEventGridOutputWithContext(ctx context.Context) EndpointEventGridOutput
}
func (*EndpointEventGrid) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventGrid)(nil)).Elem()
}
func (i *EndpointEventGrid) ToEndpointEventGridOutput() EndpointEventGridOutput {
return i.ToEndpointEventGridOutputWithContext(context.Background())
}
func (i *EndpointEventGrid) ToEndpointEventGridOutputWithContext(ctx context.Context) EndpointEventGridOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventGridOutput)
}
// EndpointEventGridArrayInput is an input type that accepts EndpointEventGridArray and EndpointEventGridArrayOutput values.
// You can construct a concrete instance of `EndpointEventGridArrayInput` via:
//
// EndpointEventGridArray{ EndpointEventGridArgs{...} }
type EndpointEventGridArrayInput interface {
pulumi.Input
ToEndpointEventGridArrayOutput() EndpointEventGridArrayOutput
ToEndpointEventGridArrayOutputWithContext(context.Context) EndpointEventGridArrayOutput
}
type EndpointEventGridArray []EndpointEventGridInput
func (EndpointEventGridArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventGrid)(nil)).Elem()
}
func (i EndpointEventGridArray) ToEndpointEventGridArrayOutput() EndpointEventGridArrayOutput {
return i.ToEndpointEventGridArrayOutputWithContext(context.Background())
}
func (i EndpointEventGridArray) ToEndpointEventGridArrayOutputWithContext(ctx context.Context) EndpointEventGridArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventGridArrayOutput)
}
// EndpointEventGridMapInput is an input type that accepts EndpointEventGridMap and EndpointEventGridMapOutput values.
// You can construct a concrete instance of `EndpointEventGridMapInput` via:
//
// EndpointEventGridMap{ "key": EndpointEventGridArgs{...} }
type EndpointEventGridMapInput interface {
pulumi.Input
ToEndpointEventGridMapOutput() EndpointEventGridMapOutput
ToEndpointEventGridMapOutputWithContext(context.Context) EndpointEventGridMapOutput
}
type EndpointEventGridMap map[string]EndpointEventGridInput
func (EndpointEventGridMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventGrid)(nil)).Elem()
}
func (i EndpointEventGridMap) ToEndpointEventGridMapOutput() EndpointEventGridMapOutput {
return i.ToEndpointEventGridMapOutputWithContext(context.Background())
}
func (i EndpointEventGridMap) ToEndpointEventGridMapOutputWithContext(ctx context.Context) EndpointEventGridMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventGridMapOutput)
}
type EndpointEventGridOutput struct{ *pulumi.OutputState }
func (EndpointEventGridOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventGrid)(nil)).Elem()
}
func (o EndpointEventGridOutput) ToEndpointEventGridOutput() EndpointEventGridOutput {
return o
}
func (o EndpointEventGridOutput) ToEndpointEventGridOutputWithContext(ctx context.Context) EndpointEventGridOutput {
return o
}
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
func (o EndpointEventGridOutput) DeadLetterStorageSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringPtrOutput { return v.DeadLetterStorageSecret }).(pulumi.StringPtrOutput)
}
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
func (o EndpointEventGridOutput) DigitalTwinsId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringOutput { return v.DigitalTwinsId }).(pulumi.StringOutput)
}
// The endpoint of the Event Grid Topic.
func (o EndpointEventGridOutput) EventgridTopicEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringOutput { return v.EventgridTopicEndpoint }).(pulumi.StringOutput)
}
// The primary access key of the Event Grid Topic.
func (o EndpointEventGridOutput) EventgridTopicPrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringOutput { return v.EventgridTopicPrimaryAccessKey }).(pulumi.StringOutput)
}
// The secondary access key of the Event Grid Topic.
func (o EndpointEventGridOutput) EventgridTopicSecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringOutput { return v.EventgridTopicSecondaryAccessKey }).(pulumi.StringOutput)
}
// The name which should be used for this Digital Twins Eventgrid Endpoint. Changing this forces a new Digital Twins Eventgrid Endpoint to be created.
func (o EndpointEventGridOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventGrid) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type EndpointEventGridArrayOutput struct{ *pulumi.OutputState }
func (EndpointEventGridArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventGrid)(nil)).Elem()
}
func (o EndpointEventGridArrayOutput) ToEndpointEventGridArrayOutput() EndpointEventGridArrayOutput {
return o
}
func (o EndpointEventGridArrayOutput) ToEndpointEventGridArrayOutputWithContext(ctx context.Context) EndpointEventGridArrayOutput {
return o
}
func (o EndpointEventGridArrayOutput) Index(i pulumi.IntInput) EndpointEventGridOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointEventGrid {
return vs[0].([]*EndpointEventGrid)[vs[1].(int)]
}).(EndpointEventGridOutput)
}
type EndpointEventGridMapOutput struct{ *pulumi.OutputState }
func (EndpointEventGridMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventGrid)(nil)).Elem()
}
func (o EndpointEventGridMapOutput) ToEndpointEventGridMapOutput() EndpointEventGridMapOutput {
return o
}
func (o EndpointEventGridMapOutput) ToEndpointEventGridMapOutputWithContext(ctx context.Context) EndpointEventGridMapOutput {
return o
}
func (o EndpointEventGridMapOutput) MapIndex(k pulumi.StringInput) EndpointEventGridOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointEventGrid {
return vs[0].(map[string]*EndpointEventGrid)[vs[1].(string)]
}).(EndpointEventGridOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventGridInput)(nil)).Elem(), &EndpointEventGrid{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventGridArrayInput)(nil)).Elem(), EndpointEventGridArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventGridMapInput)(nil)).Elem(), EndpointEventGridMap{})
pulumi.RegisterOutputType(EndpointEventGridOutput{})
pulumi.RegisterOutputType(EndpointEventGridArrayOutput{})
pulumi.RegisterOutputType(EndpointEventGridMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/endpointEventHub.go | sdk/go/azure/digitaltwins/endpointEventHub.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Digital Twins Event Hub Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example_resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := digitaltwins.NewInstance(ctx, "example", &digitaltwins.InstanceArgs{
// Name: pulumi.String("example-DT"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-eh-ns"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("example-eh"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("example-ar"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(false),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = digitaltwins.NewEndpointEventHub(ctx, "example", &digitaltwins.EndpointEventHubArgs{
// Name: pulumi.String("example-EH"),
// DigitalTwinsId: exampleInstance.ID(),
// EventhubPrimaryConnectionString: exampleAuthorizationRule.PrimaryConnectionString,
// EventhubSecondaryConnectionString: exampleAuthorizationRule.SecondaryConnectionString,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
//
// ## Import
//
// Digital Twins Eventhub Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:digitaltwins/endpointEventHub:EndpointEventHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1/endpoints/ep1
// ```
type EndpointEventHub struct {
pulumi.CustomResourceState
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrOutput `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
DigitalTwinsId pulumi.StringOutput `pulumi:"digitalTwinsId"`
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubPrimaryConnectionString pulumi.StringOutput `pulumi:"eventhubPrimaryConnectionString"`
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubSecondaryConnectionString pulumi.StringOutput `pulumi:"eventhubSecondaryConnectionString"`
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewEndpointEventHub registers a new resource with the given unique name, arguments, and options.
func NewEndpointEventHub(ctx *pulumi.Context,
name string, args *EndpointEventHubArgs, opts ...pulumi.ResourceOption) (*EndpointEventHub, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DigitalTwinsId == nil {
return nil, errors.New("invalid value for required argument 'DigitalTwinsId'")
}
if args.EventhubPrimaryConnectionString == nil {
return nil, errors.New("invalid value for required argument 'EventhubPrimaryConnectionString'")
}
if args.EventhubSecondaryConnectionString == nil {
return nil, errors.New("invalid value for required argument 'EventhubSecondaryConnectionString'")
}
if args.DeadLetterStorageSecret != nil {
args.DeadLetterStorageSecret = pulumi.ToSecret(args.DeadLetterStorageSecret).(pulumi.StringPtrInput)
}
if args.EventhubPrimaryConnectionString != nil {
args.EventhubPrimaryConnectionString = pulumi.ToSecret(args.EventhubPrimaryConnectionString).(pulumi.StringInput)
}
if args.EventhubSecondaryConnectionString != nil {
args.EventhubSecondaryConnectionString = pulumi.ToSecret(args.EventhubSecondaryConnectionString).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"deadLetterStorageSecret",
"eventhubPrimaryConnectionString",
"eventhubSecondaryConnectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EndpointEventHub
err := ctx.RegisterResource("azure:digitaltwins/endpointEventHub:EndpointEventHub", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointEventHub gets an existing EndpointEventHub resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpointEventHub(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointEventHubState, opts ...pulumi.ResourceOption) (*EndpointEventHub, error) {
var resource EndpointEventHub
err := ctx.ReadResource("azure:digitaltwins/endpointEventHub:EndpointEventHub", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointEventHub resources.
type endpointEventHubState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
DigitalTwinsId *string `pulumi:"digitalTwinsId"`
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubPrimaryConnectionString *string `pulumi:"eventhubPrimaryConnectionString"`
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubSecondaryConnectionString *string `pulumi:"eventhubSecondaryConnectionString"`
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
Name *string `pulumi:"name"`
}
type EndpointEventHubState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
DigitalTwinsId pulumi.StringPtrInput
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubPrimaryConnectionString pulumi.StringPtrInput
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubSecondaryConnectionString pulumi.StringPtrInput
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
Name pulumi.StringPtrInput
}
func (EndpointEventHubState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventHubState)(nil)).Elem()
}
type endpointEventHubArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
DigitalTwinsId string `pulumi:"digitalTwinsId"`
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubPrimaryConnectionString string `pulumi:"eventhubPrimaryConnectionString"`
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubSecondaryConnectionString string `pulumi:"eventhubSecondaryConnectionString"`
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a EndpointEventHub resource.
type EndpointEventHubArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
DigitalTwinsId pulumi.StringInput
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubPrimaryConnectionString pulumi.StringInput
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
EventhubSecondaryConnectionString pulumi.StringInput
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
Name pulumi.StringPtrInput
}
func (EndpointEventHubArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventHubArgs)(nil)).Elem()
}
type EndpointEventHubInput interface {
pulumi.Input
ToEndpointEventHubOutput() EndpointEventHubOutput
ToEndpointEventHubOutputWithContext(ctx context.Context) EndpointEventHubOutput
}
func (*EndpointEventHub) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventHub)(nil)).Elem()
}
func (i *EndpointEventHub) ToEndpointEventHubOutput() EndpointEventHubOutput {
return i.ToEndpointEventHubOutputWithContext(context.Background())
}
func (i *EndpointEventHub) ToEndpointEventHubOutputWithContext(ctx context.Context) EndpointEventHubOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventHubOutput)
}
// EndpointEventHubArrayInput is an input type that accepts EndpointEventHubArray and EndpointEventHubArrayOutput values.
// You can construct a concrete instance of `EndpointEventHubArrayInput` via:
//
// EndpointEventHubArray{ EndpointEventHubArgs{...} }
type EndpointEventHubArrayInput interface {
pulumi.Input
ToEndpointEventHubArrayOutput() EndpointEventHubArrayOutput
ToEndpointEventHubArrayOutputWithContext(context.Context) EndpointEventHubArrayOutput
}
type EndpointEventHubArray []EndpointEventHubInput
func (EndpointEventHubArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventHub)(nil)).Elem()
}
func (i EndpointEventHubArray) ToEndpointEventHubArrayOutput() EndpointEventHubArrayOutput {
return i.ToEndpointEventHubArrayOutputWithContext(context.Background())
}
func (i EndpointEventHubArray) ToEndpointEventHubArrayOutputWithContext(ctx context.Context) EndpointEventHubArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventHubArrayOutput)
}
// EndpointEventHubMapInput is an input type that accepts EndpointEventHubMap and EndpointEventHubMapOutput values.
// You can construct a concrete instance of `EndpointEventHubMapInput` via:
//
// EndpointEventHubMap{ "key": EndpointEventHubArgs{...} }
type EndpointEventHubMapInput interface {
pulumi.Input
ToEndpointEventHubMapOutput() EndpointEventHubMapOutput
ToEndpointEventHubMapOutputWithContext(context.Context) EndpointEventHubMapOutput
}
type EndpointEventHubMap map[string]EndpointEventHubInput
func (EndpointEventHubMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventHub)(nil)).Elem()
}
func (i EndpointEventHubMap) ToEndpointEventHubMapOutput() EndpointEventHubMapOutput {
return i.ToEndpointEventHubMapOutputWithContext(context.Background())
}
func (i EndpointEventHubMap) ToEndpointEventHubMapOutputWithContext(ctx context.Context) EndpointEventHubMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventHubMapOutput)
}
type EndpointEventHubOutput struct{ *pulumi.OutputState }
func (EndpointEventHubOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventHub)(nil)).Elem()
}
func (o EndpointEventHubOutput) ToEndpointEventHubOutput() EndpointEventHubOutput {
return o
}
func (o EndpointEventHubOutput) ToEndpointEventHubOutputWithContext(ctx context.Context) EndpointEventHubOutput {
return o
}
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
func (o EndpointEventHubOutput) DeadLetterStorageSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventHub) pulumi.StringPtrOutput { return v.DeadLetterStorageSecret }).(pulumi.StringPtrOutput)
}
// The resource ID of the Digital Twins Instance. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
func (o EndpointEventHubOutput) DigitalTwinsId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventHub) pulumi.StringOutput { return v.DigitalTwinsId }).(pulumi.StringOutput)
}
// The primary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
func (o EndpointEventHubOutput) EventhubPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventHub) pulumi.StringOutput { return v.EventhubPrimaryConnectionString }).(pulumi.StringOutput)
}
// The secondary connection string of the Event Hub Authorization Rule with a minimum of `send` permission.
func (o EndpointEventHubOutput) EventhubSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventHub) pulumi.StringOutput { return v.EventhubSecondaryConnectionString }).(pulumi.StringOutput)
}
// The name which should be used for this Digital Twins Event Hub Endpoint. Changing this forces a new Digital Twins Event Hub Endpoint to be created.
func (o EndpointEventHubOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type EndpointEventHubArrayOutput struct{ *pulumi.OutputState }
func (EndpointEventHubArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventHub)(nil)).Elem()
}
func (o EndpointEventHubArrayOutput) ToEndpointEventHubArrayOutput() EndpointEventHubArrayOutput {
return o
}
func (o EndpointEventHubArrayOutput) ToEndpointEventHubArrayOutputWithContext(ctx context.Context) EndpointEventHubArrayOutput {
return o
}
func (o EndpointEventHubArrayOutput) Index(i pulumi.IntInput) EndpointEventHubOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointEventHub {
return vs[0].([]*EndpointEventHub)[vs[1].(int)]
}).(EndpointEventHubOutput)
}
type EndpointEventHubMapOutput struct{ *pulumi.OutputState }
func (EndpointEventHubMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventHub)(nil)).Elem()
}
func (o EndpointEventHubMapOutput) ToEndpointEventHubMapOutput() EndpointEventHubMapOutput {
return o
}
func (o EndpointEventHubMapOutput) ToEndpointEventHubMapOutputWithContext(ctx context.Context) EndpointEventHubMapOutput {
return o
}
func (o EndpointEventHubMapOutput) MapIndex(k pulumi.StringInput) EndpointEventHubOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointEventHub {
return vs[0].(map[string]*EndpointEventHub)[vs[1].(string)]
}).(EndpointEventHubOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventHubInput)(nil)).Elem(), &EndpointEventHub{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventHubArrayInput)(nil)).Elem(), EndpointEventHubArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventHubMapInput)(nil)).Elem(), EndpointEventHubMap{})
pulumi.RegisterOutputType(EndpointEventHubOutput{})
pulumi.RegisterOutputType(EndpointEventHubArrayOutput{})
pulumi.RegisterOutputType(EndpointEventHubMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/instance.go | sdk/go/azure/digitaltwins/instance.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Digital Twins instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example_resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = digitaltwins.NewInstance(ctx, "example", &digitaltwins.InstanceArgs{
// Name: pulumi.String("example-DT"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
//
// ## Import
//
// Digital Twins instances can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:digitaltwins/instance:Instance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1
// ```
type Instance struct {
pulumi.CustomResourceState
// The API endpoint to work with this Digital Twins instance.
HostName pulumi.StringOutput `pulumi:"hostName"`
// An `identity` block as defined below.
Identity InstanceIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Digital Twins instance.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewInstance registers a new resource with the given unique name, arguments, and options.
func NewInstance(ctx *pulumi.Context,
name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Instance
err := ctx.RegisterResource("azure:digitaltwins/instance:Instance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstance gets an existing Instance resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error) {
var resource Instance
err := ctx.ReadResource("azure:digitaltwins/instance:Instance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Instance resources.
type instanceState struct {
// The API endpoint to work with this Digital Twins instance.
HostName *string `pulumi:"hostName"`
// An `identity` block as defined below.
Identity *InstanceIdentity `pulumi:"identity"`
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Digital Twins instance.
Tags map[string]string `pulumi:"tags"`
}
type InstanceState struct {
// The API endpoint to work with this Digital Twins instance.
HostName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity InstanceIdentityPtrInput
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Digital Twins instance.
Tags pulumi.StringMapInput
}
func (InstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceState)(nil)).Elem()
}
type instanceArgs struct {
// An `identity` block as defined below.
Identity *InstanceIdentity `pulumi:"identity"`
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Digital Twins instance.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Instance resource.
type InstanceArgs struct {
// An `identity` block as defined below.
Identity InstanceIdentityPtrInput
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Digital Twins instance.
Tags pulumi.StringMapInput
}
func (InstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceArgs)(nil)).Elem()
}
type InstanceInput interface {
pulumi.Input
ToInstanceOutput() InstanceOutput
ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
}
func (*Instance) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil)).Elem()
}
func (i *Instance) ToInstanceOutput() InstanceOutput {
return i.ToInstanceOutputWithContext(context.Background())
}
func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceOutput)
}
// InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values.
// You can construct a concrete instance of `InstanceArrayInput` via:
//
// InstanceArray{ InstanceArgs{...} }
type InstanceArrayInput interface {
pulumi.Input
ToInstanceArrayOutput() InstanceArrayOutput
ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
}
type InstanceArray []InstanceInput
func (InstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Instance)(nil)).Elem()
}
func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput {
return i.ToInstanceArrayOutputWithContext(context.Background())
}
func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceArrayOutput)
}
// InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values.
// You can construct a concrete instance of `InstanceMapInput` via:
//
// InstanceMap{ "key": InstanceArgs{...} }
type InstanceMapInput interface {
pulumi.Input
ToInstanceMapOutput() InstanceMapOutput
ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
}
type InstanceMap map[string]InstanceInput
func (InstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
}
func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput {
return i.ToInstanceMapOutputWithContext(context.Background())
}
func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceMapOutput)
}
type InstanceOutput struct{ *pulumi.OutputState }
func (InstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Instance)(nil)).Elem()
}
func (o InstanceOutput) ToInstanceOutput() InstanceOutput {
return o
}
func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
return o
}
// The API endpoint to work with this Digital Twins instance.
func (o InstanceOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.HostName }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o InstanceOutput) Identity() InstanceIdentityPtrOutput {
return o.ApplyT(func(v *Instance) InstanceIdentityPtrOutput { return v.Identity }).(InstanceIdentityPtrOutput)
}
// The Azure Region where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
func (o InstanceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Digital Twins instance. Changing this forces a new Digital Twins instance to be created.
func (o InstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Digital Twins instance should exist. Changing this forces a new Digital Twins instance to be created.
func (o InstanceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Digital Twins instance.
func (o InstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Instance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type InstanceArrayOutput struct{ *pulumi.OutputState }
func (InstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Instance)(nil)).Elem()
}
func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
return o
}
func (o InstanceArrayOutput) Index(i pulumi.IntInput) InstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Instance {
return vs[0].([]*Instance)[vs[1].(int)]
}).(InstanceOutput)
}
type InstanceMapOutput struct{ *pulumi.OutputState }
func (InstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
}
func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput {
return o
}
func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
return o
}
func (o InstanceMapOutput) MapIndex(k pulumi.StringInput) InstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Instance {
return vs[0].(map[string]*Instance)[vs[1].(string)]
}).(InstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceInput)(nil)).Elem(), &Instance{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceArrayInput)(nil)).Elem(), InstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceMapInput)(nil)).Elem(), InstanceMap{})
pulumi.RegisterOutputType(InstanceOutput{})
pulumi.RegisterOutputType(InstanceArrayOutput{})
pulumi.RegisterOutputType(InstanceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/timeSeriesDatabaseConnection.go | sdk/go/azure/digitaltwins/timeSeriesDatabaseConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Digital Twins Time Series Database Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := digitaltwins.NewInstance(ctx, "example", &digitaltwins.InstanceArgs{
// Name: pulumi.String("example-DT"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Identity: &digitaltwins.InstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("exampleEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("exampleEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(7),
// })
// if err != nil {
// return err
// }
// exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{
// Name: pulumi.String("example-consumergroup"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
// Name: pulumi.String("examplekc"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{
// Name: pulumi.String("example-kusto-database"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ClusterName: exampleCluster.Name,
// })
// if err != nil {
// return err
// }
// databaseContributor, err := authorization.NewAssignment(ctx, "database_contributor", &authorization.AssignmentArgs{
// Scope: exampleDatabase.ID(),
// PrincipalId: pulumi.String(exampleInstance.Identity.ApplyT(func(identity digitaltwins.InstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// RoleDefinitionName: pulumi.String("Contributor"),
// })
// if err != nil {
// return err
// }
// eventhubDataOwner, err := authorization.NewAssignment(ctx, "eventhub_data_owner", &authorization.AssignmentArgs{
// Scope: exampleEventHub.ID(),
// PrincipalId: pulumi.String(exampleInstance.Identity.ApplyT(func(identity digitaltwins.InstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// RoleDefinitionName: pulumi.String("Azure Event Hubs Data Owner"),
// })
// if err != nil {
// return err
// }
// exampleDatabasePrincipalAssignment, err := kusto.NewDatabasePrincipalAssignment(ctx, "example", &kusto.DatabasePrincipalAssignmentArgs{
// Name: pulumi.String("dataadmin"),
// ResourceGroupName: example.Name,
// ClusterName: exampleCluster.Name,
// DatabaseName: exampleDatabase.Name,
// TenantId: pulumi.String(exampleInstance.Identity.ApplyT(func(identity digitaltwins.InstanceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput)),
// PrincipalId: pulumi.String(exampleInstance.Identity.ApplyT(func(identity digitaltwins.InstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// PrincipalType: pulumi.String("App"),
// Role: pulumi.String("Admin"),
// })
// if err != nil {
// return err
// }
// _, err = digitaltwins.NewTimeSeriesDatabaseConnection(ctx, "example", &digitaltwins.TimeSeriesDatabaseConnectionArgs{
// Name: pulumi.String("example-connection"),
// DigitalTwinsId: exampleInstance.ID(),
// EventhubName: exampleEventHub.Name,
// EventhubNamespaceId: exampleEventHubNamespace.ID(),
// EventhubNamespaceEndpointUri: exampleEventHubNamespace.Name.ApplyT(func(name string) (string, error) {
// return fmt.Sprintf("sb://%v.servicebus.windows.net", name), nil
// }).(pulumi.StringOutput),
// EventhubConsumerGroupName: exampleConsumerGroup.Name,
// KustoClusterId: exampleCluster.ID(),
// KustoClusterUri: exampleCluster.Uri,
// KustoDatabaseName: exampleDatabase.Name,
// KustoTableName: pulumi.String("exampleTable"),
// }, pulumi.DependsOn([]pulumi.Resource{
// databaseContributor,
// eventhubDataOwner,
// exampleDatabasePrincipalAssignment,
// }))
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
//
// ## Import
//
// Digital Twins Time Series Database Connections can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:digitaltwins/timeSeriesDatabaseConnection:TimeSeriesDatabaseConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1/timeSeriesDatabaseConnections/connection1
// ```
type TimeSeriesDatabaseConnection struct {
pulumi.CustomResourceState
// The ID of the Digital Twins. Changing this forces a new resource to be created.
DigitalTwinsId pulumi.StringOutput `pulumi:"digitalTwinsId"`
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
EventhubConsumerGroupName pulumi.StringPtrOutput `pulumi:"eventhubConsumerGroupName"`
// Name of the Event Hub. Changing this forces a new resource to be created.
EventhubName pulumi.StringOutput `pulumi:"eventhubName"`
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceEndpointUri pulumi.StringOutput `pulumi:"eventhubNamespaceEndpointUri"`
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringOutput `pulumi:"eventhubNamespaceId"`
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterId pulumi.StringOutput `pulumi:"kustoClusterId"`
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterUri pulumi.StringOutput `pulumi:"kustoClusterUri"`
// Name of the Kusto Database. Changing this forces a new resource to be created.
KustoDatabaseName pulumi.StringOutput `pulumi:"kustoDatabaseName"`
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
KustoTableName pulumi.StringPtrOutput `pulumi:"kustoTableName"`
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewTimeSeriesDatabaseConnection registers a new resource with the given unique name, arguments, and options.
func NewTimeSeriesDatabaseConnection(ctx *pulumi.Context,
name string, args *TimeSeriesDatabaseConnectionArgs, opts ...pulumi.ResourceOption) (*TimeSeriesDatabaseConnection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DigitalTwinsId == nil {
return nil, errors.New("invalid value for required argument 'DigitalTwinsId'")
}
if args.EventhubName == nil {
return nil, errors.New("invalid value for required argument 'EventhubName'")
}
if args.EventhubNamespaceEndpointUri == nil {
return nil, errors.New("invalid value for required argument 'EventhubNamespaceEndpointUri'")
}
if args.EventhubNamespaceId == nil {
return nil, errors.New("invalid value for required argument 'EventhubNamespaceId'")
}
if args.KustoClusterId == nil {
return nil, errors.New("invalid value for required argument 'KustoClusterId'")
}
if args.KustoClusterUri == nil {
return nil, errors.New("invalid value for required argument 'KustoClusterUri'")
}
if args.KustoDatabaseName == nil {
return nil, errors.New("invalid value for required argument 'KustoDatabaseName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource TimeSeriesDatabaseConnection
err := ctx.RegisterResource("azure:digitaltwins/timeSeriesDatabaseConnection:TimeSeriesDatabaseConnection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTimeSeriesDatabaseConnection gets an existing TimeSeriesDatabaseConnection resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTimeSeriesDatabaseConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TimeSeriesDatabaseConnectionState, opts ...pulumi.ResourceOption) (*TimeSeriesDatabaseConnection, error) {
var resource TimeSeriesDatabaseConnection
err := ctx.ReadResource("azure:digitaltwins/timeSeriesDatabaseConnection:TimeSeriesDatabaseConnection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TimeSeriesDatabaseConnection resources.
type timeSeriesDatabaseConnectionState struct {
// The ID of the Digital Twins. Changing this forces a new resource to be created.
DigitalTwinsId *string `pulumi:"digitalTwinsId"`
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"`
// Name of the Event Hub. Changing this forces a new resource to be created.
EventhubName *string `pulumi:"eventhubName"`
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceEndpointUri *string `pulumi:"eventhubNamespaceEndpointUri"`
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId *string `pulumi:"eventhubNamespaceId"`
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterId *string `pulumi:"kustoClusterId"`
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterUri *string `pulumi:"kustoClusterUri"`
// Name of the Kusto Database. Changing this forces a new resource to be created.
KustoDatabaseName *string `pulumi:"kustoDatabaseName"`
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
KustoTableName *string `pulumi:"kustoTableName"`
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
type TimeSeriesDatabaseConnectionState struct {
// The ID of the Digital Twins. Changing this forces a new resource to be created.
DigitalTwinsId pulumi.StringPtrInput
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
EventhubConsumerGroupName pulumi.StringPtrInput
// Name of the Event Hub. Changing this forces a new resource to be created.
EventhubName pulumi.StringPtrInput
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceEndpointUri pulumi.StringPtrInput
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringPtrInput
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterId pulumi.StringPtrInput
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterUri pulumi.StringPtrInput
// Name of the Kusto Database. Changing this forces a new resource to be created.
KustoDatabaseName pulumi.StringPtrInput
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
KustoTableName pulumi.StringPtrInput
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
}
func (TimeSeriesDatabaseConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesDatabaseConnectionState)(nil)).Elem()
}
type timeSeriesDatabaseConnectionArgs struct {
// The ID of the Digital Twins. Changing this forces a new resource to be created.
DigitalTwinsId string `pulumi:"digitalTwinsId"`
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"`
// Name of the Event Hub. Changing this forces a new resource to be created.
EventhubName string `pulumi:"eventhubName"`
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceEndpointUri string `pulumi:"eventhubNamespaceEndpointUri"`
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId string `pulumi:"eventhubNamespaceId"`
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterId string `pulumi:"kustoClusterId"`
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterUri string `pulumi:"kustoClusterUri"`
// Name of the Kusto Database. Changing this forces a new resource to be created.
KustoDatabaseName string `pulumi:"kustoDatabaseName"`
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
KustoTableName *string `pulumi:"kustoTableName"`
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a TimeSeriesDatabaseConnection resource.
type TimeSeriesDatabaseConnectionArgs struct {
// The ID of the Digital Twins. Changing this forces a new resource to be created.
DigitalTwinsId pulumi.StringInput
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
EventhubConsumerGroupName pulumi.StringPtrInput
// Name of the Event Hub. Changing this forces a new resource to be created.
EventhubName pulumi.StringInput
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceEndpointUri pulumi.StringInput
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringInput
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterId pulumi.StringInput
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
KustoClusterUri pulumi.StringInput
// Name of the Kusto Database. Changing this forces a new resource to be created.
KustoDatabaseName pulumi.StringInput
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
KustoTableName pulumi.StringPtrInput
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
}
func (TimeSeriesDatabaseConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*timeSeriesDatabaseConnectionArgs)(nil)).Elem()
}
type TimeSeriesDatabaseConnectionInput interface {
pulumi.Input
ToTimeSeriesDatabaseConnectionOutput() TimeSeriesDatabaseConnectionOutput
ToTimeSeriesDatabaseConnectionOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionOutput
}
func (*TimeSeriesDatabaseConnection) ElementType() reflect.Type {
return reflect.TypeOf((**TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (i *TimeSeriesDatabaseConnection) ToTimeSeriesDatabaseConnectionOutput() TimeSeriesDatabaseConnectionOutput {
return i.ToTimeSeriesDatabaseConnectionOutputWithContext(context.Background())
}
func (i *TimeSeriesDatabaseConnection) ToTimeSeriesDatabaseConnectionOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(TimeSeriesDatabaseConnectionOutput)
}
// TimeSeriesDatabaseConnectionArrayInput is an input type that accepts TimeSeriesDatabaseConnectionArray and TimeSeriesDatabaseConnectionArrayOutput values.
// You can construct a concrete instance of `TimeSeriesDatabaseConnectionArrayInput` via:
//
// TimeSeriesDatabaseConnectionArray{ TimeSeriesDatabaseConnectionArgs{...} }
type TimeSeriesDatabaseConnectionArrayInput interface {
pulumi.Input
ToTimeSeriesDatabaseConnectionArrayOutput() TimeSeriesDatabaseConnectionArrayOutput
ToTimeSeriesDatabaseConnectionArrayOutputWithContext(context.Context) TimeSeriesDatabaseConnectionArrayOutput
}
type TimeSeriesDatabaseConnectionArray []TimeSeriesDatabaseConnectionInput
func (TimeSeriesDatabaseConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (i TimeSeriesDatabaseConnectionArray) ToTimeSeriesDatabaseConnectionArrayOutput() TimeSeriesDatabaseConnectionArrayOutput {
return i.ToTimeSeriesDatabaseConnectionArrayOutputWithContext(context.Background())
}
func (i TimeSeriesDatabaseConnectionArray) ToTimeSeriesDatabaseConnectionArrayOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TimeSeriesDatabaseConnectionArrayOutput)
}
// TimeSeriesDatabaseConnectionMapInput is an input type that accepts TimeSeriesDatabaseConnectionMap and TimeSeriesDatabaseConnectionMapOutput values.
// You can construct a concrete instance of `TimeSeriesDatabaseConnectionMapInput` via:
//
// TimeSeriesDatabaseConnectionMap{ "key": TimeSeriesDatabaseConnectionArgs{...} }
type TimeSeriesDatabaseConnectionMapInput interface {
pulumi.Input
ToTimeSeriesDatabaseConnectionMapOutput() TimeSeriesDatabaseConnectionMapOutput
ToTimeSeriesDatabaseConnectionMapOutputWithContext(context.Context) TimeSeriesDatabaseConnectionMapOutput
}
type TimeSeriesDatabaseConnectionMap map[string]TimeSeriesDatabaseConnectionInput
func (TimeSeriesDatabaseConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (i TimeSeriesDatabaseConnectionMap) ToTimeSeriesDatabaseConnectionMapOutput() TimeSeriesDatabaseConnectionMapOutput {
return i.ToTimeSeriesDatabaseConnectionMapOutputWithContext(context.Background())
}
func (i TimeSeriesDatabaseConnectionMap) ToTimeSeriesDatabaseConnectionMapOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TimeSeriesDatabaseConnectionMapOutput)
}
type TimeSeriesDatabaseConnectionOutput struct{ *pulumi.OutputState }
func (TimeSeriesDatabaseConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (o TimeSeriesDatabaseConnectionOutput) ToTimeSeriesDatabaseConnectionOutput() TimeSeriesDatabaseConnectionOutput {
return o
}
func (o TimeSeriesDatabaseConnectionOutput) ToTimeSeriesDatabaseConnectionOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionOutput {
return o
}
// The ID of the Digital Twins. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) DigitalTwinsId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.DigitalTwinsId }).(pulumi.StringOutput)
}
// Name of the Event Hub Consumer Group. Changing this forces a new resource to be created. Defaults to `$Default`.
func (o TimeSeriesDatabaseConnectionOutput) EventhubConsumerGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringPtrOutput { return v.EventhubConsumerGroupName }).(pulumi.StringPtrOutput)
}
// Name of the Event Hub. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput)
}
// URI of the Event Hub Namespace. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) EventhubNamespaceEndpointUri() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.EventhubNamespaceEndpointUri }).(pulumi.StringOutput)
}
// The ID of the Event Hub Namespace. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) EventhubNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.EventhubNamespaceId }).(pulumi.StringOutput)
}
// The ID of the Kusto Cluster. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) KustoClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.KustoClusterId }).(pulumi.StringOutput)
}
// URI of the Kusto Cluster. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) KustoClusterUri() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.KustoClusterUri }).(pulumi.StringOutput)
}
// Name of the Kusto Database. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) KustoDatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.KustoDatabaseName }).(pulumi.StringOutput)
}
// Name of the Kusto Table. Defaults to `AdtPropertyEvents`. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) KustoTableName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringPtrOutput { return v.KustoTableName }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Digital Twins Time Series Database Connection. Changing this forces a new resource to be created.
func (o TimeSeriesDatabaseConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TimeSeriesDatabaseConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type TimeSeriesDatabaseConnectionArrayOutput struct{ *pulumi.OutputState }
func (TimeSeriesDatabaseConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (o TimeSeriesDatabaseConnectionArrayOutput) ToTimeSeriesDatabaseConnectionArrayOutput() TimeSeriesDatabaseConnectionArrayOutput {
return o
}
func (o TimeSeriesDatabaseConnectionArrayOutput) ToTimeSeriesDatabaseConnectionArrayOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionArrayOutput {
return o
}
func (o TimeSeriesDatabaseConnectionArrayOutput) Index(i pulumi.IntInput) TimeSeriesDatabaseConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TimeSeriesDatabaseConnection {
return vs[0].([]*TimeSeriesDatabaseConnection)[vs[1].(int)]
}).(TimeSeriesDatabaseConnectionOutput)
}
type TimeSeriesDatabaseConnectionMapOutput struct{ *pulumi.OutputState }
func (TimeSeriesDatabaseConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TimeSeriesDatabaseConnection)(nil)).Elem()
}
func (o TimeSeriesDatabaseConnectionMapOutput) ToTimeSeriesDatabaseConnectionMapOutput() TimeSeriesDatabaseConnectionMapOutput {
return o
}
func (o TimeSeriesDatabaseConnectionMapOutput) ToTimeSeriesDatabaseConnectionMapOutputWithContext(ctx context.Context) TimeSeriesDatabaseConnectionMapOutput {
return o
}
func (o TimeSeriesDatabaseConnectionMapOutput) MapIndex(k pulumi.StringInput) TimeSeriesDatabaseConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TimeSeriesDatabaseConnection {
return vs[0].(map[string]*TimeSeriesDatabaseConnection)[vs[1].(string)]
}).(TimeSeriesDatabaseConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TimeSeriesDatabaseConnectionInput)(nil)).Elem(), &TimeSeriesDatabaseConnection{})
pulumi.RegisterInputType(reflect.TypeOf((*TimeSeriesDatabaseConnectionArrayInput)(nil)).Elem(), TimeSeriesDatabaseConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TimeSeriesDatabaseConnectionMapInput)(nil)).Elem(), TimeSeriesDatabaseConnectionMap{})
pulumi.RegisterOutputType(TimeSeriesDatabaseConnectionOutput{})
pulumi.RegisterOutputType(TimeSeriesDatabaseConnectionArrayOutput{})
pulumi.RegisterOutputType(TimeSeriesDatabaseConnectionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/digitaltwins/endpointServicebus.go | sdk/go/azure/digitaltwins/endpointServicebus.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package digitaltwins
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Digital Twins Service Bus Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/digitaltwins"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example_resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleInstance, err := digitaltwins.NewInstance(ctx, "example", &digitaltwins.InstanceArgs{
// Name: pulumi.String("example-DT"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("exampleservicebusnamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("exampleservicebustopic"),
// NamespaceId: exampleNamespace.ID(),
// })
// if err != nil {
// return err
// }
// exampleTopicAuthorizationRule, err := servicebus.NewTopicAuthorizationRule(ctx, "example", &servicebus.TopicAuthorizationRuleArgs{
// Name: pulumi.String("example-rule"),
// TopicId: exampleTopic.ID(),
// Listen: pulumi.Bool(false),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = digitaltwins.NewEndpointServicebus(ctx, "example", &digitaltwins.EndpointServicebusArgs{
// Name: pulumi.String("example-EndpointSB"),
// DigitalTwinsId: exampleInstance.ID(),
// ServicebusPrimaryConnectionString: exampleTopicAuthorizationRule.PrimaryConnectionString,
// ServicebusSecondaryConnectionString: exampleTopicAuthorizationRule.SecondaryConnectionString,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DigitalTwins` - 2023-01-31
//
// ## Import
//
// Digital Twins Service Bus Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:digitaltwins/endpointServicebus:EndpointServicebus example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DigitalTwins/digitalTwinsInstances/dt1/endpoints/ep1
// ```
type EndpointServicebus struct {
pulumi.CustomResourceState
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrOutput `pulumi:"deadLetterStorageSecret"`
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
DigitalTwinsId pulumi.StringOutput `pulumi:"digitalTwinsId"`
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
ServicebusPrimaryConnectionString pulumi.StringOutput `pulumi:"servicebusPrimaryConnectionString"`
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
ServicebusSecondaryConnectionString pulumi.StringOutput `pulumi:"servicebusSecondaryConnectionString"`
}
// NewEndpointServicebus registers a new resource with the given unique name, arguments, and options.
func NewEndpointServicebus(ctx *pulumi.Context,
name string, args *EndpointServicebusArgs, opts ...pulumi.ResourceOption) (*EndpointServicebus, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DigitalTwinsId == nil {
return nil, errors.New("invalid value for required argument 'DigitalTwinsId'")
}
if args.ServicebusPrimaryConnectionString == nil {
return nil, errors.New("invalid value for required argument 'ServicebusPrimaryConnectionString'")
}
if args.ServicebusSecondaryConnectionString == nil {
return nil, errors.New("invalid value for required argument 'ServicebusSecondaryConnectionString'")
}
if args.DeadLetterStorageSecret != nil {
args.DeadLetterStorageSecret = pulumi.ToSecret(args.DeadLetterStorageSecret).(pulumi.StringPtrInput)
}
if args.ServicebusPrimaryConnectionString != nil {
args.ServicebusPrimaryConnectionString = pulumi.ToSecret(args.ServicebusPrimaryConnectionString).(pulumi.StringInput)
}
if args.ServicebusSecondaryConnectionString != nil {
args.ServicebusSecondaryConnectionString = pulumi.ToSecret(args.ServicebusSecondaryConnectionString).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"deadLetterStorageSecret",
"servicebusPrimaryConnectionString",
"servicebusSecondaryConnectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EndpointServicebus
err := ctx.RegisterResource("azure:digitaltwins/endpointServicebus:EndpointServicebus", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointServicebus gets an existing EndpointServicebus resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEndpointServicebus(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointServicebusState, opts ...pulumi.ResourceOption) (*EndpointServicebus, error) {
var resource EndpointServicebus
err := ctx.ReadResource("azure:digitaltwins/endpointServicebus:EndpointServicebus", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointServicebus resources.
type endpointServicebusState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
DigitalTwinsId *string `pulumi:"digitalTwinsId"`
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
Name *string `pulumi:"name"`
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
ServicebusPrimaryConnectionString *string `pulumi:"servicebusPrimaryConnectionString"`
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
ServicebusSecondaryConnectionString *string `pulumi:"servicebusSecondaryConnectionString"`
}
type EndpointServicebusState struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
DigitalTwinsId pulumi.StringPtrInput
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
Name pulumi.StringPtrInput
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
ServicebusPrimaryConnectionString pulumi.StringPtrInput
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
ServicebusSecondaryConnectionString pulumi.StringPtrInput
}
func (EndpointServicebusState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusState)(nil)).Elem()
}
type endpointServicebusArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret *string `pulumi:"deadLetterStorageSecret"`
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
DigitalTwinsId string `pulumi:"digitalTwinsId"`
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
Name *string `pulumi:"name"`
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
ServicebusPrimaryConnectionString string `pulumi:"servicebusPrimaryConnectionString"`
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
ServicebusSecondaryConnectionString string `pulumi:"servicebusSecondaryConnectionString"`
}
// The set of arguments for constructing a EndpointServicebus resource.
type EndpointServicebusArgs struct {
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
DeadLetterStorageSecret pulumi.StringPtrInput
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
DigitalTwinsId pulumi.StringInput
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
Name pulumi.StringPtrInput
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
ServicebusPrimaryConnectionString pulumi.StringInput
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
ServicebusSecondaryConnectionString pulumi.StringInput
}
func (EndpointServicebusArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusArgs)(nil)).Elem()
}
type EndpointServicebusInput interface {
pulumi.Input
ToEndpointServicebusOutput() EndpointServicebusOutput
ToEndpointServicebusOutputWithContext(ctx context.Context) EndpointServicebusOutput
}
func (*EndpointServicebus) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointServicebus)(nil)).Elem()
}
func (i *EndpointServicebus) ToEndpointServicebusOutput() EndpointServicebusOutput {
return i.ToEndpointServicebusOutputWithContext(context.Background())
}
func (i *EndpointServicebus) ToEndpointServicebusOutputWithContext(ctx context.Context) EndpointServicebusOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusOutput)
}
// EndpointServicebusArrayInput is an input type that accepts EndpointServicebusArray and EndpointServicebusArrayOutput values.
// You can construct a concrete instance of `EndpointServicebusArrayInput` via:
//
// EndpointServicebusArray{ EndpointServicebusArgs{...} }
type EndpointServicebusArrayInput interface {
pulumi.Input
ToEndpointServicebusArrayOutput() EndpointServicebusArrayOutput
ToEndpointServicebusArrayOutputWithContext(context.Context) EndpointServicebusArrayOutput
}
type EndpointServicebusArray []EndpointServicebusInput
func (EndpointServicebusArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointServicebus)(nil)).Elem()
}
func (i EndpointServicebusArray) ToEndpointServicebusArrayOutput() EndpointServicebusArrayOutput {
return i.ToEndpointServicebusArrayOutputWithContext(context.Background())
}
func (i EndpointServicebusArray) ToEndpointServicebusArrayOutputWithContext(ctx context.Context) EndpointServicebusArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusArrayOutput)
}
// EndpointServicebusMapInput is an input type that accepts EndpointServicebusMap and EndpointServicebusMapOutput values.
// You can construct a concrete instance of `EndpointServicebusMapInput` via:
//
// EndpointServicebusMap{ "key": EndpointServicebusArgs{...} }
type EndpointServicebusMapInput interface {
pulumi.Input
ToEndpointServicebusMapOutput() EndpointServicebusMapOutput
ToEndpointServicebusMapOutputWithContext(context.Context) EndpointServicebusMapOutput
}
type EndpointServicebusMap map[string]EndpointServicebusInput
func (EndpointServicebusMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointServicebus)(nil)).Elem()
}
func (i EndpointServicebusMap) ToEndpointServicebusMapOutput() EndpointServicebusMapOutput {
return i.ToEndpointServicebusMapOutputWithContext(context.Background())
}
func (i EndpointServicebusMap) ToEndpointServicebusMapOutputWithContext(ctx context.Context) EndpointServicebusMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusMapOutput)
}
type EndpointServicebusOutput struct{ *pulumi.OutputState }
func (EndpointServicebusOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointServicebus)(nil)).Elem()
}
func (o EndpointServicebusOutput) ToEndpointServicebusOutput() EndpointServicebusOutput {
return o
}
func (o EndpointServicebusOutput) ToEndpointServicebusOutputWithContext(ctx context.Context) EndpointServicebusOutput {
return o
}
// The storage secret of the dead-lettering, whose format is `https://<storageAccountname>.blob.core.windows.net/<containerName>?<SASToken>`. When an endpoint can't deliver an event within a certain time period or after trying to deliver the event a certain number of times, it can send the undelivered event to a storage account.
func (o EndpointServicebusOutput) DeadLetterStorageSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebus) pulumi.StringPtrOutput { return v.DeadLetterStorageSecret }).(pulumi.StringPtrOutput)
}
// The ID of the Digital Twins Instance. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
func (o EndpointServicebusOutput) DigitalTwinsId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebus) pulumi.StringOutput { return v.DigitalTwinsId }).(pulumi.StringOutput)
}
// The name which should be used for this Digital Twins Service Bus Endpoint. Changing this forces a new Digital Twins Service Bus Endpoint to be created.
func (o EndpointServicebusOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebus) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission. .
func (o EndpointServicebusOutput) ServicebusPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebus) pulumi.StringOutput { return v.ServicebusPrimaryConnectionString }).(pulumi.StringOutput)
}
// The secondary connection string of the Service Bus Topic Authorization Rule with a minimum of `send` permission.
func (o EndpointServicebusOutput) ServicebusSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebus) pulumi.StringOutput { return v.ServicebusSecondaryConnectionString }).(pulumi.StringOutput)
}
type EndpointServicebusArrayOutput struct{ *pulumi.OutputState }
func (EndpointServicebusArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointServicebus)(nil)).Elem()
}
func (o EndpointServicebusArrayOutput) ToEndpointServicebusArrayOutput() EndpointServicebusArrayOutput {
return o
}
func (o EndpointServicebusArrayOutput) ToEndpointServicebusArrayOutputWithContext(ctx context.Context) EndpointServicebusArrayOutput {
return o
}
func (o EndpointServicebusArrayOutput) Index(i pulumi.IntInput) EndpointServicebusOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointServicebus {
return vs[0].([]*EndpointServicebus)[vs[1].(int)]
}).(EndpointServicebusOutput)
}
type EndpointServicebusMapOutput struct{ *pulumi.OutputState }
func (EndpointServicebusMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointServicebus)(nil)).Elem()
}
func (o EndpointServicebusMapOutput) ToEndpointServicebusMapOutput() EndpointServicebusMapOutput {
return o
}
func (o EndpointServicebusMapOutput) ToEndpointServicebusMapOutputWithContext(ctx context.Context) EndpointServicebusMapOutput {
return o
}
func (o EndpointServicebusMapOutput) MapIndex(k pulumi.StringInput) EndpointServicebusOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointServicebus {
return vs[0].(map[string]*EndpointServicebus)[vs[1].(string)]
}).(EndpointServicebusOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusInput)(nil)).Elem(), &EndpointServicebus{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusArrayInput)(nil)).Elem(), EndpointServicebusArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusMapInput)(nil)).Elem(), EndpointServicebusMap{})
pulumi.RegisterOutputType(EndpointServicebusOutput{})
pulumi.RegisterOutputType(EndpointServicebusArrayOutput{})
pulumi.RegisterOutputType(EndpointServicebusMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.