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/compute/getConfidentialLedger.go
sdk/go/azure/compute/getConfidentialLedger.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 compute 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 existing Confidential Ledger. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := compute.GetConfidentialLedger(ctx, &compute.GetConfidentialLedgerArgs{ // Name: "example-ledger", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("ledgerEndpoint", current.LedgerEndpoint) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ConfidentialLedger` - 2022-05-13 func GetConfidentialLedger(ctx *pulumi.Context, args *GetConfidentialLedgerArgs, opts ...pulumi.InvokeOption) (*GetConfidentialLedgerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetConfidentialLedgerResult err := ctx.Invoke("azure:compute/getConfidentialLedger:getConfidentialLedger", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getConfidentialLedger. type GetConfidentialLedgerArgs struct { // Specifies the name of this Confidential Ledger. Name string `pulumi:"name"` // Specifies the name of the Resource Group where this Confidential Ledger exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getConfidentialLedger. type GetConfidentialLedgerResult struct { AzureadBasedServicePrincipals []GetConfidentialLedgerAzureadBasedServicePrincipal `pulumi:"azureadBasedServicePrincipals"` CertificateBasedSecurityPrincipals []GetConfidentialLedgerCertificateBasedSecurityPrincipal `pulumi:"certificateBasedSecurityPrincipals"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Identity Service Endpoint for this Confidential Ledger. IdentityServiceEndpoint string `pulumi:"identityServiceEndpoint"` // The Endpoint for this Confidential Ledger. LedgerEndpoint string `pulumi:"ledgerEndpoint"` // The type of Confidential Ledger. LedgerType string `pulumi:"ledgerType"` // The supported Azure location where the Confidential Ledger exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Confidential Ledger. Tags map[string]string `pulumi:"tags"` } func GetConfidentialLedgerOutput(ctx *pulumi.Context, args GetConfidentialLedgerOutputArgs, opts ...pulumi.InvokeOption) GetConfidentialLedgerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetConfidentialLedgerResultOutput, error) { args := v.(GetConfidentialLedgerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getConfidentialLedger:getConfidentialLedger", args, GetConfidentialLedgerResultOutput{}, options).(GetConfidentialLedgerResultOutput), nil }).(GetConfidentialLedgerResultOutput) } // A collection of arguments for invoking getConfidentialLedger. type GetConfidentialLedgerOutputArgs struct { // Specifies the name of this Confidential Ledger. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Resource Group where this Confidential Ledger exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetConfidentialLedgerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetConfidentialLedgerArgs)(nil)).Elem() } // A collection of values returned by getConfidentialLedger. type GetConfidentialLedgerResultOutput struct{ *pulumi.OutputState } func (GetConfidentialLedgerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetConfidentialLedgerResult)(nil)).Elem() } func (o GetConfidentialLedgerResultOutput) ToGetConfidentialLedgerResultOutput() GetConfidentialLedgerResultOutput { return o } func (o GetConfidentialLedgerResultOutput) ToGetConfidentialLedgerResultOutputWithContext(ctx context.Context) GetConfidentialLedgerResultOutput { return o } func (o GetConfidentialLedgerResultOutput) AzureadBasedServicePrincipals() GetConfidentialLedgerAzureadBasedServicePrincipalArrayOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) []GetConfidentialLedgerAzureadBasedServicePrincipal { return v.AzureadBasedServicePrincipals }).(GetConfidentialLedgerAzureadBasedServicePrincipalArrayOutput) } func (o GetConfidentialLedgerResultOutput) CertificateBasedSecurityPrincipals() GetConfidentialLedgerCertificateBasedSecurityPrincipalArrayOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) []GetConfidentialLedgerCertificateBasedSecurityPrincipal { return v.CertificateBasedSecurityPrincipals }).(GetConfidentialLedgerCertificateBasedSecurityPrincipalArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetConfidentialLedgerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.Id }).(pulumi.StringOutput) } // The Identity Service Endpoint for this Confidential Ledger. func (o GetConfidentialLedgerResultOutput) IdentityServiceEndpoint() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.IdentityServiceEndpoint }).(pulumi.StringOutput) } // The Endpoint for this Confidential Ledger. func (o GetConfidentialLedgerResultOutput) LedgerEndpoint() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.LedgerEndpoint }).(pulumi.StringOutput) } // The type of Confidential Ledger. func (o GetConfidentialLedgerResultOutput) LedgerType() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.LedgerType }).(pulumi.StringOutput) } // The supported Azure location where the Confidential Ledger exists. func (o GetConfidentialLedgerResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetConfidentialLedgerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetConfidentialLedgerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the Confidential Ledger. func (o GetConfidentialLedgerResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetConfidentialLedgerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetConfidentialLedgerResultOutput{}) }
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/compute/diskEncryptionSet.go
sdk/go/azure/compute/diskEncryptionSet.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Disk Encryption Set. // // > **NOTE:** At this time the Key Vault used to store the Active Key for this Disk Encryption Set must have both Soft Delete & Purge Protection enabled - which are not yet supported by this provider. // // ## 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/compute" // "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 Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("des-example-keyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // EnabledForDiskEncryption: pulumi.Bool(true), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // example_user, err := keyvault.NewAccessPolicy(ctx, "example-user", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("des-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"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // example_user, // })) // if err != nil { // return err // } // exampleDiskEncryptionSet, err := compute.NewDiskEncryptionSet(ctx, "example", &compute.DiskEncryptionSetArgs{ // Name: pulumi.String("des"), // ResourceGroupName: example.Name, // Location: example.Location, // KeyVaultKeyId: exampleKey.ID(), // Identity: &compute.DiskEncryptionSetIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewAccessPolicy(ctx, "example-disk", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.TenantId, nil // }).(pulumi.StringPtrOutput)), // ObjectId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example-disk", &authorization.AssignmentArgs{ // Scope: exampleKeyVault.ID(), // RoleDefinitionName: pulumi.String("Key Vault Crypto Service Encryption User"), // PrincipalId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### With Automatic Key Rotation Enabled // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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 Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("des-example-keyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // EnabledForDiskEncryption: pulumi.Bool(true), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // example_user, err := keyvault.NewAccessPolicy(ctx, "example-user", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("des-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"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // example_user, // })) // if err != nil { // return err // } // exampleDiskEncryptionSet, err := compute.NewDiskEncryptionSet(ctx, "example", &compute.DiskEncryptionSetArgs{ // Name: pulumi.String("des"), // ResourceGroupName: example.Name, // Location: example.Location, // KeyVaultKeyId: exampleKey.VersionlessId, // AutoKeyRotationEnabled: pulumi.Bool(true), // Identity: &compute.DiskEncryptionSetIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewAccessPolicy(ctx, "example-disk", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.TenantId, nil // }).(pulumi.StringPtrOutput)), // ObjectId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example-disk", &authorization.AssignmentArgs{ // Scope: exampleKeyVault.ID(), // RoleDefinitionName: pulumi.String("Key Vault Crypto Service Encryption User"), // PrincipalId: pulumi.String(exampleDiskEncryptionSet.Identity.ApplyT(func(identity compute.DiskEncryptionSetIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // }) // 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.Compute` - 2022-03-02 // // ## Import // // Disk Encryption Sets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/diskEncryptionSet:DiskEncryptionSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/diskEncryptionSets/encryptionSet1 // ``` type DiskEncryptionSet struct { pulumi.CustomResourceState AutoKeyRotationEnabled pulumi.BoolPtrOutput `pulumi:"autoKeyRotationEnabled"` // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. EncryptionType pulumi.StringPtrOutput `pulumi:"encryptionType"` // Multi-tenant application client id to access key vault in a different tenant. FederatedClientId pulumi.StringPtrOutput `pulumi:"federatedClientId"` // An `identity` block as defined below. Identity DiskEncryptionSetIdentityOutput `pulumi:"identity"` // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"` // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. KeyVaultKeyUrl pulumi.StringOutput `pulumi:"keyVaultKeyUrl"` // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. ManagedHsmKeyId pulumi.StringPtrOutput `pulumi:"managedHsmKeyId"` // The name of the Disk Encryption Set. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Disk Encryption Set. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewDiskEncryptionSet registers a new resource with the given unique name, arguments, and options. func NewDiskEncryptionSet(ctx *pulumi.Context, name string, args *DiskEncryptionSetArgs, opts ...pulumi.ResourceOption) (*DiskEncryptionSet, 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 DiskEncryptionSet err := ctx.RegisterResource("azure:compute/diskEncryptionSet:DiskEncryptionSet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDiskEncryptionSet gets an existing DiskEncryptionSet 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 GetDiskEncryptionSet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DiskEncryptionSetState, opts ...pulumi.ResourceOption) (*DiskEncryptionSet, error) { var resource DiskEncryptionSet err := ctx.ReadResource("azure:compute/diskEncryptionSet:DiskEncryptionSet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DiskEncryptionSet resources. type diskEncryptionSetState struct { AutoKeyRotationEnabled *bool `pulumi:"autoKeyRotationEnabled"` // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. EncryptionType *string `pulumi:"encryptionType"` // Multi-tenant application client id to access key vault in a different tenant. FederatedClientId *string `pulumi:"federatedClientId"` // An `identity` block as defined below. Identity *DiskEncryptionSetIdentity `pulumi:"identity"` // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. KeyVaultKeyUrl *string `pulumi:"keyVaultKeyUrl"` // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // The name of the Disk Encryption Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Disk Encryption Set. Tags map[string]string `pulumi:"tags"` } type DiskEncryptionSetState struct { AutoKeyRotationEnabled pulumi.BoolPtrInput // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. EncryptionType pulumi.StringPtrInput // Multi-tenant application client id to access key vault in a different tenant. FederatedClientId pulumi.StringPtrInput // An `identity` block as defined below. Identity DiskEncryptionSetIdentityPtrInput // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. KeyVaultKeyId pulumi.StringPtrInput // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. KeyVaultKeyUrl pulumi.StringPtrInput // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. ManagedHsmKeyId pulumi.StringPtrInput // The name of the Disk Encryption Set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the Disk Encryption Set. Tags pulumi.StringMapInput } func (DiskEncryptionSetState) ElementType() reflect.Type { return reflect.TypeOf((*diskEncryptionSetState)(nil)).Elem() } type diskEncryptionSetArgs struct { AutoKeyRotationEnabled *bool `pulumi:"autoKeyRotationEnabled"` // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. EncryptionType *string `pulumi:"encryptionType"` // Multi-tenant application client id to access key vault in a different tenant. FederatedClientId *string `pulumi:"federatedClientId"` // An `identity` block as defined below. Identity DiskEncryptionSetIdentity `pulumi:"identity"` // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // The name of the Disk Encryption Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Disk Encryption Set. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a DiskEncryptionSet resource. type DiskEncryptionSetArgs struct { AutoKeyRotationEnabled pulumi.BoolPtrInput // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. EncryptionType pulumi.StringPtrInput // Multi-tenant application client id to access key vault in a different tenant. FederatedClientId pulumi.StringPtrInput // An `identity` block as defined below. Identity DiskEncryptionSetIdentityInput // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. KeyVaultKeyId pulumi.StringPtrInput // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. ManagedHsmKeyId pulumi.StringPtrInput // The name of the Disk Encryption Set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the Disk Encryption Set. Tags pulumi.StringMapInput } func (DiskEncryptionSetArgs) ElementType() reflect.Type { return reflect.TypeOf((*diskEncryptionSetArgs)(nil)).Elem() } type DiskEncryptionSetInput interface { pulumi.Input ToDiskEncryptionSetOutput() DiskEncryptionSetOutput ToDiskEncryptionSetOutputWithContext(ctx context.Context) DiskEncryptionSetOutput } func (*DiskEncryptionSet) ElementType() reflect.Type { return reflect.TypeOf((**DiskEncryptionSet)(nil)).Elem() } func (i *DiskEncryptionSet) ToDiskEncryptionSetOutput() DiskEncryptionSetOutput { return i.ToDiskEncryptionSetOutputWithContext(context.Background()) } func (i *DiskEncryptionSet) ToDiskEncryptionSetOutputWithContext(ctx context.Context) DiskEncryptionSetOutput { return pulumi.ToOutputWithContext(ctx, i).(DiskEncryptionSetOutput) } // DiskEncryptionSetArrayInput is an input type that accepts DiskEncryptionSetArray and DiskEncryptionSetArrayOutput values. // You can construct a concrete instance of `DiskEncryptionSetArrayInput` via: // // DiskEncryptionSetArray{ DiskEncryptionSetArgs{...} } type DiskEncryptionSetArrayInput interface { pulumi.Input ToDiskEncryptionSetArrayOutput() DiskEncryptionSetArrayOutput ToDiskEncryptionSetArrayOutputWithContext(context.Context) DiskEncryptionSetArrayOutput } type DiskEncryptionSetArray []DiskEncryptionSetInput func (DiskEncryptionSetArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DiskEncryptionSet)(nil)).Elem() } func (i DiskEncryptionSetArray) ToDiskEncryptionSetArrayOutput() DiskEncryptionSetArrayOutput { return i.ToDiskEncryptionSetArrayOutputWithContext(context.Background()) } func (i DiskEncryptionSetArray) ToDiskEncryptionSetArrayOutputWithContext(ctx context.Context) DiskEncryptionSetArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DiskEncryptionSetArrayOutput) } // DiskEncryptionSetMapInput is an input type that accepts DiskEncryptionSetMap and DiskEncryptionSetMapOutput values. // You can construct a concrete instance of `DiskEncryptionSetMapInput` via: // // DiskEncryptionSetMap{ "key": DiskEncryptionSetArgs{...} } type DiskEncryptionSetMapInput interface { pulumi.Input ToDiskEncryptionSetMapOutput() DiskEncryptionSetMapOutput ToDiskEncryptionSetMapOutputWithContext(context.Context) DiskEncryptionSetMapOutput } type DiskEncryptionSetMap map[string]DiskEncryptionSetInput func (DiskEncryptionSetMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DiskEncryptionSet)(nil)).Elem() } func (i DiskEncryptionSetMap) ToDiskEncryptionSetMapOutput() DiskEncryptionSetMapOutput { return i.ToDiskEncryptionSetMapOutputWithContext(context.Background()) } func (i DiskEncryptionSetMap) ToDiskEncryptionSetMapOutputWithContext(ctx context.Context) DiskEncryptionSetMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DiskEncryptionSetMapOutput) } type DiskEncryptionSetOutput struct{ *pulumi.OutputState } func (DiskEncryptionSetOutput) ElementType() reflect.Type { return reflect.TypeOf((**DiskEncryptionSet)(nil)).Elem() } func (o DiskEncryptionSetOutput) ToDiskEncryptionSetOutput() DiskEncryptionSetOutput { return o } func (o DiskEncryptionSetOutput) ToDiskEncryptionSetOutputWithContext(ctx context.Context) DiskEncryptionSetOutput { return o } func (o DiskEncryptionSetOutput) AutoKeyRotationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.BoolPtrOutput { return v.AutoKeyRotationEnabled }).(pulumi.BoolPtrOutput) } // The type of key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerKey`, `EncryptionAtRestWithPlatformAndCustomerKeys` and `ConfidentialVmEncryptedWithCustomerKey`. Defaults to `EncryptionAtRestWithCustomerKey`. Changing this forces a new resource to be created. func (o DiskEncryptionSetOutput) EncryptionType() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringPtrOutput { return v.EncryptionType }).(pulumi.StringPtrOutput) } // Multi-tenant application client id to access key vault in a different tenant. func (o DiskEncryptionSetOutput) FederatedClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringPtrOutput { return v.FederatedClientId }).(pulumi.StringPtrOutput) } // An `identity` block as defined below. func (o DiskEncryptionSetOutput) Identity() DiskEncryptionSetIdentityOutput { return o.ApplyT(func(v *DiskEncryptionSet) DiskEncryptionSetIdentityOutput { return v.Identity }).(DiskEncryptionSetIdentityOutput) } // Specifies the URL to a Key Vault Key (either from a Key Vault Key, or the Key URL for the Key Vault Secret). Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. // // > **Note:** Access to the KeyVault must be granted for this Disk Encryption Set, if you want to further use this Disk Encryption Set in a Managed Disk or Virtual Machine, or Virtual Machine Scale Set. For instructions, please refer to the doc of [Server side encryption of Azure managed disks](https://docs.microsoft.com/azure/virtual-machines/linux/disk-encryption). // // > **Note:** A KeyVault or Managed HSM using enableRbacAuthorization requires to use `authorization.Assignment` to assign the role `Key Vault Crypto Service Encryption User` to this Disk Encryption Set. // In this case, `keyvault.AccessPolicy` is not needed. func (o DiskEncryptionSetOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. func (o DiskEncryptionSetOutput) KeyVaultKeyUrl() pulumi.StringOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringOutput { return v.KeyVaultKeyUrl }).(pulumi.StringOutput) } // Specifies the Azure Region where the Disk Encryption Set exists. Changing this forces a new resource to be created. func (o DiskEncryptionSetOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultKeyId` must be specified. func (o DiskEncryptionSetOutput) ManagedHsmKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringPtrOutput { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput) } // The name of the Disk Encryption Set. Changing this forces a new resource to be created. func (o DiskEncryptionSetOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Disk Encryption Set should exist. Changing this forces a new resource to be created. func (o DiskEncryptionSetOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the Disk Encryption Set. func (o DiskEncryptionSetOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *DiskEncryptionSet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type DiskEncryptionSetArrayOutput struct{ *pulumi.OutputState } func (DiskEncryptionSetArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DiskEncryptionSet)(nil)).Elem() } func (o DiskEncryptionSetArrayOutput) ToDiskEncryptionSetArrayOutput() DiskEncryptionSetArrayOutput { return o } func (o DiskEncryptionSetArrayOutput) ToDiskEncryptionSetArrayOutputWithContext(ctx context.Context) DiskEncryptionSetArrayOutput { return o } func (o DiskEncryptionSetArrayOutput) Index(i pulumi.IntInput) DiskEncryptionSetOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DiskEncryptionSet { return vs[0].([]*DiskEncryptionSet)[vs[1].(int)] }).(DiskEncryptionSetOutput) } type DiskEncryptionSetMapOutput struct{ *pulumi.OutputState } func (DiskEncryptionSetMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DiskEncryptionSet)(nil)).Elem() } func (o DiskEncryptionSetMapOutput) ToDiskEncryptionSetMapOutput() DiskEncryptionSetMapOutput { return o } func (o DiskEncryptionSetMapOutput) ToDiskEncryptionSetMapOutputWithContext(ctx context.Context) DiskEncryptionSetMapOutput { return o } func (o DiskEncryptionSetMapOutput) MapIndex(k pulumi.StringInput) DiskEncryptionSetOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DiskEncryptionSet { return vs[0].(map[string]*DiskEncryptionSet)[vs[1].(string)] }).(DiskEncryptionSetOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DiskEncryptionSetInput)(nil)).Elem(), &DiskEncryptionSet{}) pulumi.RegisterInputType(reflect.TypeOf((*DiskEncryptionSetArrayInput)(nil)).Elem(), DiskEncryptionSetArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DiskEncryptionSetMapInput)(nil)).Elem(), DiskEncryptionSetMap{})
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/compute/virtualMachineScaleSetExtension.go
sdk/go/azure/compute/virtualMachineScaleSetExtension.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Extension for a Virtual Machine Scale Set. // // > **Note:** This resource is not intended to be used with the `compute.ScaleSet` resource - instead it's intended for this to be used with the `compute.LinuxVirtualMachineScaleSet` and `compute.WindowsVirtualMachineScaleSet` resources. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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 // } // exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // Instances: pulumi.Int(1), // SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("example"), // IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // }, // }, // }, // }, // OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{ // StorageAccountType: pulumi.String("Standard_LRS"), // Caching: pulumi.String("ReadWrite"), // }, // }) // if err != nil { // return err // } // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "commandToExecute": "echo $HOSTNAME", // }) // if err != nil { // return err // } // json0 := string(tmpJSON0) // _, err = compute.NewVirtualMachineScaleSetExtension(ctx, "example", &compute.VirtualMachineScaleSetExtensionArgs{ // Name: pulumi.String("example"), // VirtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.ID(), // Publisher: pulumi.String("Microsoft.Azure.Extensions"), // Type: pulumi.String("CustomScript"), // TypeHandlerVersion: pulumi.String("2.0"), // Settings: pulumi.String(json0), // }) // 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.Compute` - 2024-11-01, 2024-03-01 // // ## Import // // Virtual Machine Scale Set Extensions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/virtualMachineScaleSetExtension:VirtualMachineScaleSetExtension test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleSet1/extensions/extension1 // ``` type VirtualMachineScaleSetExtension struct { pulumi.CustomResourceState // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. AutoUpgradeMinorVersion pulumi.BoolPtrOutput `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrOutput `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrOutput `pulumi:"failureSuppressionEnabled"` // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. ForceUpdateTag pulumi.StringPtrOutput `pulumi:"forceUpdateTag"` // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. ProtectedSettings pulumi.StringPtrOutput `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrOutput `pulumi:"protectedSettingsFromKeyVault"` // An ordered list of Extension names which this should be provisioned after. ProvisionAfterExtensions pulumi.StringArrayOutput `pulumi:"provisionAfterExtensions"` // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. Publisher pulumi.StringOutput `pulumi:"publisher"` // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. Settings pulumi.StringPtrOutput `pulumi:"settings"` // Specifies the Type of the Extension. Changing this forces a new resource to be created. Type pulumi.StringOutput `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: TypeHandlerVersion pulumi.StringOutput `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. VirtualMachineScaleSetId pulumi.StringOutput `pulumi:"virtualMachineScaleSetId"` } // NewVirtualMachineScaleSetExtension registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineScaleSetExtension(ctx *pulumi.Context, name string, args *VirtualMachineScaleSetExtensionArgs, opts ...pulumi.ResourceOption) (*VirtualMachineScaleSetExtension, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Publisher == nil { return nil, errors.New("invalid value for required argument 'Publisher'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } if args.TypeHandlerVersion == nil { return nil, errors.New("invalid value for required argument 'TypeHandlerVersion'") } if args.VirtualMachineScaleSetId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineScaleSetId'") } if args.ProtectedSettings != nil { args.ProtectedSettings = pulumi.ToSecret(args.ProtectedSettings).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "protectedSettings", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineScaleSetExtension err := ctx.RegisterResource("azure:compute/virtualMachineScaleSetExtension:VirtualMachineScaleSetExtension", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineScaleSetExtension gets an existing VirtualMachineScaleSetExtension 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 GetVirtualMachineScaleSetExtension(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineScaleSetExtensionState, opts ...pulumi.ResourceOption) (*VirtualMachineScaleSetExtension, error) { var resource VirtualMachineScaleSetExtension err := ctx.ReadResource("azure:compute/virtualMachineScaleSetExtension:VirtualMachineScaleSetExtension", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineScaleSetExtension resources. type virtualMachineScaleSetExtensionState struct { // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. AutoUpgradeMinorVersion *bool `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled *bool `pulumi:"failureSuppressionEnabled"` // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. ProtectedSettings *string `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault *VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault `pulumi:"protectedSettingsFromKeyVault"` // An ordered list of Extension names which this should be provisioned after. ProvisionAfterExtensions []string `pulumi:"provisionAfterExtensions"` // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. Publisher *string `pulumi:"publisher"` // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. Settings *string `pulumi:"settings"` // Specifies the Type of the Extension. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: TypeHandlerVersion *string `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. VirtualMachineScaleSetId *string `pulumi:"virtualMachineScaleSetId"` } type VirtualMachineScaleSetExtensionState struct { // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. AutoUpgradeMinorVersion pulumi.BoolPtrInput // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrInput // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrInput // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. ForceUpdateTag pulumi.StringPtrInput // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. ProtectedSettings pulumi.StringPtrInput // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrInput // An ordered list of Extension names which this should be provisioned after. ProvisionAfterExtensions pulumi.StringArrayInput // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. Publisher pulumi.StringPtrInput // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. Settings pulumi.StringPtrInput // Specifies the Type of the Extension. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: TypeHandlerVersion pulumi.StringPtrInput // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. VirtualMachineScaleSetId pulumi.StringPtrInput } func (VirtualMachineScaleSetExtensionState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineScaleSetExtensionState)(nil)).Elem() } type virtualMachineScaleSetExtensionArgs struct { // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. AutoUpgradeMinorVersion *bool `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled *bool `pulumi:"failureSuppressionEnabled"` // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. ForceUpdateTag *string `pulumi:"forceUpdateTag"` // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. ProtectedSettings *string `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault *VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVault `pulumi:"protectedSettingsFromKeyVault"` // An ordered list of Extension names which this should be provisioned after. ProvisionAfterExtensions []string `pulumi:"provisionAfterExtensions"` // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. Publisher string `pulumi:"publisher"` // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. Settings *string `pulumi:"settings"` // Specifies the Type of the Extension. Changing this forces a new resource to be created. Type string `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: TypeHandlerVersion string `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. VirtualMachineScaleSetId string `pulumi:"virtualMachineScaleSetId"` } // The set of arguments for constructing a VirtualMachineScaleSetExtension resource. type VirtualMachineScaleSetExtensionArgs struct { // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. AutoUpgradeMinorVersion pulumi.BoolPtrInput // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrInput // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrInput // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. ForceUpdateTag pulumi.StringPtrInput // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. ProtectedSettings pulumi.StringPtrInput // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrInput // An ordered list of Extension names which this should be provisioned after. ProvisionAfterExtensions pulumi.StringArrayInput // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. Publisher pulumi.StringInput // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. Settings pulumi.StringPtrInput // Specifies the Type of the Extension. Changing this forces a new resource to be created. Type pulumi.StringInput // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: TypeHandlerVersion pulumi.StringInput // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** This should be the ID from the `compute.LinuxVirtualMachineScaleSet` or `compute.WindowsVirtualMachineScaleSet` resource - when using the older `compute.ScaleSet` resource extensions should instead be defined inline. VirtualMachineScaleSetId pulumi.StringInput } func (VirtualMachineScaleSetExtensionArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineScaleSetExtensionArgs)(nil)).Elem() } type VirtualMachineScaleSetExtensionInput interface { pulumi.Input ToVirtualMachineScaleSetExtensionOutput() VirtualMachineScaleSetExtensionOutput ToVirtualMachineScaleSetExtensionOutputWithContext(ctx context.Context) VirtualMachineScaleSetExtensionOutput } func (*VirtualMachineScaleSetExtension) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineScaleSetExtension)(nil)).Elem() } func (i *VirtualMachineScaleSetExtension) ToVirtualMachineScaleSetExtensionOutput() VirtualMachineScaleSetExtensionOutput { return i.ToVirtualMachineScaleSetExtensionOutputWithContext(context.Background()) } func (i *VirtualMachineScaleSetExtension) ToVirtualMachineScaleSetExtensionOutputWithContext(ctx context.Context) VirtualMachineScaleSetExtensionOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineScaleSetExtensionOutput) } // VirtualMachineScaleSetExtensionArrayInput is an input type that accepts VirtualMachineScaleSetExtensionArray and VirtualMachineScaleSetExtensionArrayOutput values. // You can construct a concrete instance of `VirtualMachineScaleSetExtensionArrayInput` via: // // VirtualMachineScaleSetExtensionArray{ VirtualMachineScaleSetExtensionArgs{...} } type VirtualMachineScaleSetExtensionArrayInput interface { pulumi.Input ToVirtualMachineScaleSetExtensionArrayOutput() VirtualMachineScaleSetExtensionArrayOutput ToVirtualMachineScaleSetExtensionArrayOutputWithContext(context.Context) VirtualMachineScaleSetExtensionArrayOutput } type VirtualMachineScaleSetExtensionArray []VirtualMachineScaleSetExtensionInput func (VirtualMachineScaleSetExtensionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineScaleSetExtension)(nil)).Elem() } func (i VirtualMachineScaleSetExtensionArray) ToVirtualMachineScaleSetExtensionArrayOutput() VirtualMachineScaleSetExtensionArrayOutput { return i.ToVirtualMachineScaleSetExtensionArrayOutputWithContext(context.Background()) } func (i VirtualMachineScaleSetExtensionArray) ToVirtualMachineScaleSetExtensionArrayOutputWithContext(ctx context.Context) VirtualMachineScaleSetExtensionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineScaleSetExtensionArrayOutput) } // VirtualMachineScaleSetExtensionMapInput is an input type that accepts VirtualMachineScaleSetExtensionMap and VirtualMachineScaleSetExtensionMapOutput values. // You can construct a concrete instance of `VirtualMachineScaleSetExtensionMapInput` via: // // VirtualMachineScaleSetExtensionMap{ "key": VirtualMachineScaleSetExtensionArgs{...} } type VirtualMachineScaleSetExtensionMapInput interface { pulumi.Input ToVirtualMachineScaleSetExtensionMapOutput() VirtualMachineScaleSetExtensionMapOutput ToVirtualMachineScaleSetExtensionMapOutputWithContext(context.Context) VirtualMachineScaleSetExtensionMapOutput } type VirtualMachineScaleSetExtensionMap map[string]VirtualMachineScaleSetExtensionInput func (VirtualMachineScaleSetExtensionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineScaleSetExtension)(nil)).Elem() } func (i VirtualMachineScaleSetExtensionMap) ToVirtualMachineScaleSetExtensionMapOutput() VirtualMachineScaleSetExtensionMapOutput { return i.ToVirtualMachineScaleSetExtensionMapOutputWithContext(context.Background()) } func (i VirtualMachineScaleSetExtensionMap) ToVirtualMachineScaleSetExtensionMapOutputWithContext(ctx context.Context) VirtualMachineScaleSetExtensionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineScaleSetExtensionMapOutput) } type VirtualMachineScaleSetExtensionOutput struct{ *pulumi.OutputState } func (VirtualMachineScaleSetExtensionOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineScaleSetExtension)(nil)).Elem() } func (o VirtualMachineScaleSetExtensionOutput) ToVirtualMachineScaleSetExtensionOutput() VirtualMachineScaleSetExtensionOutput { return o } func (o VirtualMachineScaleSetExtensionOutput) ToVirtualMachineScaleSetExtensionOutputWithContext(ctx context.Context) VirtualMachineScaleSetExtensionOutput { return o } // Should the latest version of the Extension be used at Deployment Time, if one is available? This won't auto-update the extension on existing installation. Defaults to `true`. func (o VirtualMachineScaleSetExtensionOutput) AutoUpgradeMinorVersion() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.BoolPtrOutput { return v.AutoUpgradeMinorVersion }).(pulumi.BoolPtrOutput) } // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? func (o VirtualMachineScaleSetExtensionOutput) AutomaticUpgradeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.BoolPtrOutput { return v.AutomaticUpgradeEnabled }).(pulumi.BoolPtrOutput) } // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. func (o VirtualMachineScaleSetExtensionOutput) FailureSuppressionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.BoolPtrOutput { return v.FailureSuppressionEnabled }).(pulumi.BoolPtrOutput) } // A value which, when different to the previous value can be used to force-run the Extension even if the Extension Configuration hasn't changed. func (o VirtualMachineScaleSetExtensionOutput) ForceUpdateTag() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringPtrOutput { return v.ForceUpdateTag }).(pulumi.StringPtrOutput) } // The name for the Virtual Machine Scale Set Extension. Changing this forces a new resource to be created. func (o VirtualMachineScaleSetExtensionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A JSON String which specifies Sensitive Settings (such as Passwords) for the Extension. // // > **Note:** Keys within the `protectedSettings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. func (o VirtualMachineScaleSetExtensionOutput) ProtectedSettings() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringPtrOutput { return v.ProtectedSettings }).(pulumi.StringPtrOutput) } // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` func (o VirtualMachineScaleSetExtensionOutput) ProtectedSettingsFromKeyVault() VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrOutput { return v.ProtectedSettingsFromKeyVault }).(VirtualMachineScaleSetExtensionProtectedSettingsFromKeyVaultPtrOutput) } // An ordered list of Extension names which this should be provisioned after. func (o VirtualMachineScaleSetExtensionOutput) ProvisionAfterExtensions() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringArrayOutput { return v.ProvisionAfterExtensions }).(pulumi.StringArrayOutput) } // Specifies the Publisher of the Extension. Changing this forces a new resource to be created. func (o VirtualMachineScaleSetExtensionOutput) Publisher() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringOutput { return v.Publisher }).(pulumi.StringOutput) } // A JSON String which specifies Settings for the Extension. // // > **Note:** Keys within the `settings` block are notoriously case-sensitive, where the casing required (e.g. TitleCase vs snakeCase) depends on the Extension being used. Please refer to the documentation for the specific Virtual Machine Extension you're looking to use for more information. func (o VirtualMachineScaleSetExtensionOutput) Settings() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringPtrOutput { return v.Settings }).(pulumi.StringPtrOutput) } // Specifies the Type of the Extension. Changing this forces a new resource to be created. func (o VirtualMachineScaleSetExtensionOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) } // Specifies the version of the extension to use, available versions can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Scale Set Extensions can be found using the Azure CLI, via: func (o VirtualMachineScaleSetExtensionOutput) TypeHandlerVersion() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineScaleSetExtension) pulumi.StringOutput { return v.TypeHandlerVersion }).(pulumi.StringOutput) } // The ID of the Virtual Machine Scale Set. Changing this forces a new resource to be created. //
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/compute/runCommand.go
sdk/go/azure/compute/runCommand.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Machine Run Command. // // ## 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/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "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 { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: exampleResourceGroup.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-uai"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("example-VM"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Size: pulumi.String("Standard_B2s"), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@$$w0rd1234!"), // DisablePasswordAuthentication: pulumi.Bool(false), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Premium_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // Identity: &compute.LinuxVirtualMachineIdentityArgs{ // Type: pulumi.String("SystemAssigned, UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("exampleaccount"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Scope: exampleAccount.ID(), // RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"), // PrincipalId: exampleUserAssignedIdentity.PrincipalId, // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example-sc"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("blob"), // }) // if err != nil { // return err // } // example1, err := storage.NewBlob(ctx, "example1", &storage.BlobArgs{ // Name: pulumi.String("script1"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Block"), // SourceContent: pulumi.String("echo 'hello world'"), // }) // if err != nil { // return err // } // example2, err := storage.NewBlob(ctx, "example2", &storage.BlobArgs{ // Name: pulumi.String("output"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Append"), // }) // if err != nil { // return err // } // example3, err := storage.NewBlob(ctx, "example3", &storage.BlobArgs{ // Name: pulumi.String("error"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Append"), // }) // if err != nil { // return err // } // example := storage.GetAccountSASOutput(ctx, storage.GetAccountSASOutputArgs{ // ConnectionString: exampleAccount.PrimaryConnectionString, // HttpsOnly: pulumi.Bool(true), // SignedVersion: pulumi.String("2019-10-10"), // Start: pulumi.String("2023-04-01T00:00:00Z"), // Expiry: pulumi.String("2024-04-01T00:00:00Z"), // ResourceTypes: &storage.GetAccountSASResourceTypesArgs{ // Service: pulumi.Bool(false), // Container: pulumi.Bool(false), // Object: pulumi.Bool(true), // }, // Services: &storage.GetAccountSASServicesArgs{ // Blob: pulumi.Bool(true), // Queue: pulumi.Bool(false), // Table: pulumi.Bool(false), // File: pulumi.Bool(false), // }, // Permissions: &storage.GetAccountSASPermissionsArgs{ // Read: pulumi.Bool(true), // Write: pulumi.Bool(true), // Delete: pulumi.Bool(false), // List: pulumi.Bool(false), // Add: pulumi.Bool(true), // Create: pulumi.Bool(true), // Update: pulumi.Bool(false), // Process: pulumi.Bool(false), // Tag: pulumi.Bool(false), // Filter: pulumi.Bool(false), // }, // }, nil) // // basic example // _, err = compute.NewRunCommand(ctx, "example", &compute.RunCommandArgs{ // Name: pulumi.String("example-vmrc"), // Location: exampleResourceGroup.Location, // VirtualMachineId: exampleLinuxVirtualMachine.ID(), // Source: &compute.RunCommandSourceArgs{ // Script: pulumi.String("echo 'hello world'"), // }, // }) // if err != nil { // return err // } // // authorize to storage blob using user assigned identity // _, err = compute.NewRunCommand(ctx, "example2", &compute.RunCommandArgs{ // Location: exampleResourceGroup.Location, // Name: pulumi.String("example2-vmrc"), // VirtualMachineId: exampleLinuxVirtualMachine.ID(), // OutputBlobUri: example2.ID(), // ErrorBlobUri: example3.ID(), // RunAsPassword: pulumi.String("P@$$w0rd1234!"), // RunAsUser: pulumi.String("adminuser"), // Source: &compute.RunCommandSourceArgs{ // ScriptUri: example1.ID(), // ScriptUriManagedIdentity: &compute.RunCommandSourceScriptUriManagedIdentityArgs{ // ClientId: exampleUserAssignedIdentity.ClientId, // }, // }, // ErrorBlobManagedIdentity: &compute.RunCommandErrorBlobManagedIdentityArgs{ // ClientId: exampleUserAssignedIdentity.ClientId, // }, // OutputBlobManagedIdentity: &compute.RunCommandOutputBlobManagedIdentityArgs{ // ClientId: exampleUserAssignedIdentity.ClientId, // }, // Parameters: compute.RunCommandParameterArray{ // &compute.RunCommandParameterArgs{ // Name: pulumi.String("examplev1"), // Value: pulumi.String("val1"), // }, // }, // ProtectedParameters: compute.RunCommandProtectedParameterArray{ // &compute.RunCommandProtectedParameterArgs{ // Name: pulumi.String("examplev2"), // Value: pulumi.String("val2"), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("terraform-examples"), // "some_key": pulumi.String("some-value"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleAssignment, // })) // if err != nil { // return err // } // // authorize to storage blob using SAS token // _, err = compute.NewRunCommand(ctx, "example3", &compute.RunCommandArgs{ // Location: exampleResourceGroup.Location, // Name: pulumi.String("example3-vmrc"), // VirtualMachineId: exampleLinuxVirtualMachine.ID(), // RunAsPassword: pulumi.String("P@$$w0rd1234!"), // RunAsUser: pulumi.String("adminuser"), // ErrorBlobUri: pulumi.All(example3.ID(), example).ApplyT(func(_args []interface{}) (string, error) { // id := _args[0].(string) // example := _args[1].(storage.GetAccountSASResult) // return fmt.Sprintf("%v%v", id, example.Sas), nil // }).(pulumi.StringOutput), // OutputBlobUri: pulumi.All(example2.ID(), example).ApplyT(func(_args []interface{}) (string, error) { // id := _args[0].(string) // example := _args[1].(storage.GetAccountSASResult) // return fmt.Sprintf("%v%v", id, example.Sas), nil // }).(pulumi.StringOutput), // Source: &compute.RunCommandSourceArgs{ // ScriptUri: pulumi.All(example1.ID(), example).ApplyT(func(_args []interface{}) (string, error) { // id := _args[0].(string) // example := _args[1].(storage.GetAccountSASResult) // return fmt.Sprintf("%v%v", id, example.Sas), nil // }).(pulumi.StringOutput), // }, // Parameters: compute.RunCommandParameterArray{ // &compute.RunCommandParameterArgs{ // Name: pulumi.String("example-vm1"), // Value: pulumi.String("val1"), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("terraform-example-s"), // "some_key": pulumi.String("some-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: // // * `Microsoft.Compute` - 2023-03-01 // // ## Import // // An existing Virtual Machine Run Command can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/runCommand:RunCommand example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/vm1/runCommands/rc1 // ``` type RunCommand struct { pulumi.CustomResourceState // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. ErrorBlobManagedIdentity RunCommandErrorBlobManagedIdentityPtrOutput `pulumi:"errorBlobManagedIdentity"` // Specifies the Azure storage blob where script error stream will be uploaded. ErrorBlobUri pulumi.StringPtrOutput `pulumi:"errorBlobUri"` InstanceViews RunCommandInstanceViewArrayOutput `pulumi:"instanceViews"` // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. Name pulumi.StringOutput `pulumi:"name"` // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. OutputBlobManagedIdentity RunCommandOutputBlobManagedIdentityPtrOutput `pulumi:"outputBlobManagedIdentity"` // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. OutputBlobUri pulumi.StringPtrOutput `pulumi:"outputBlobUri"` // A list of `parameter` blocks as defined below. The parameters used by the script. Parameters RunCommandParameterArrayOutput `pulumi:"parameters"` // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. ProtectedParameters RunCommandProtectedParameterArrayOutput `pulumi:"protectedParameters"` // Specifies the user account password on the VM when executing the Virtual Machine Run Command. RunAsPassword pulumi.StringPtrOutput `pulumi:"runAsPassword"` // Specifies the user account on the VM when executing the Virtual Machine Run Command. RunAsUser pulumi.StringPtrOutput `pulumi:"runAsUser"` // A `source` block as defined below. The source of the run command script. Source RunCommandSourceOutput `pulumi:"source"` // A mapping of tags which should be assigned to the Virtual Machine Run Command. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` } // NewRunCommand registers a new resource with the given unique name, arguments, and options. func NewRunCommand(ctx *pulumi.Context, name string, args *RunCommandArgs, opts ...pulumi.ResourceOption) (*RunCommand, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Source == nil { return nil, errors.New("invalid value for required argument 'Source'") } if args.VirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineId'") } if args.ErrorBlobManagedIdentity != nil { args.ErrorBlobManagedIdentity = pulumi.ToSecret(args.ErrorBlobManagedIdentity).(RunCommandErrorBlobManagedIdentityPtrInput) } if args.OutputBlobManagedIdentity != nil { args.OutputBlobManagedIdentity = pulumi.ToSecret(args.OutputBlobManagedIdentity).(RunCommandOutputBlobManagedIdentityPtrInput) } if args.ProtectedParameters != nil { args.ProtectedParameters = pulumi.ToSecret(args.ProtectedParameters).(RunCommandProtectedParameterArrayInput) } if args.RunAsPassword != nil { args.RunAsPassword = pulumi.ToSecret(args.RunAsPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "errorBlobManagedIdentity", "outputBlobManagedIdentity", "protectedParameters", "runAsPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource RunCommand err := ctx.RegisterResource("azure:compute/runCommand:RunCommand", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRunCommand gets an existing RunCommand 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 GetRunCommand(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RunCommandState, opts ...pulumi.ResourceOption) (*RunCommand, error) { var resource RunCommand err := ctx.ReadResource("azure:compute/runCommand:RunCommand", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RunCommand resources. type runCommandState struct { // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. ErrorBlobManagedIdentity *RunCommandErrorBlobManagedIdentity `pulumi:"errorBlobManagedIdentity"` // Specifies the Azure storage blob where script error stream will be uploaded. ErrorBlobUri *string `pulumi:"errorBlobUri"` InstanceViews []RunCommandInstanceView `pulumi:"instanceViews"` // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. Location *string `pulumi:"location"` // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. Name *string `pulumi:"name"` // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. OutputBlobManagedIdentity *RunCommandOutputBlobManagedIdentity `pulumi:"outputBlobManagedIdentity"` // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. OutputBlobUri *string `pulumi:"outputBlobUri"` // A list of `parameter` blocks as defined below. The parameters used by the script. Parameters []RunCommandParameter `pulumi:"parameters"` // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. ProtectedParameters []RunCommandProtectedParameter `pulumi:"protectedParameters"` // Specifies the user account password on the VM when executing the Virtual Machine Run Command. RunAsPassword *string `pulumi:"runAsPassword"` // Specifies the user account on the VM when executing the Virtual Machine Run Command. RunAsUser *string `pulumi:"runAsUser"` // A `source` block as defined below. The source of the run command script. Source *RunCommandSource `pulumi:"source"` // A mapping of tags which should be assigned to the Virtual Machine Run Command. Tags map[string]string `pulumi:"tags"` // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. VirtualMachineId *string `pulumi:"virtualMachineId"` } type RunCommandState struct { // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. ErrorBlobManagedIdentity RunCommandErrorBlobManagedIdentityPtrInput // Specifies the Azure storage blob where script error stream will be uploaded. ErrorBlobUri pulumi.StringPtrInput InstanceViews RunCommandInstanceViewArrayInput // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. Location pulumi.StringPtrInput // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. Name pulumi.StringPtrInput // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. OutputBlobManagedIdentity RunCommandOutputBlobManagedIdentityPtrInput // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. OutputBlobUri pulumi.StringPtrInput // A list of `parameter` blocks as defined below. The parameters used by the script. Parameters RunCommandParameterArrayInput // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. ProtectedParameters RunCommandProtectedParameterArrayInput // Specifies the user account password on the VM when executing the Virtual Machine Run Command. RunAsPassword pulumi.StringPtrInput // Specifies the user account on the VM when executing the Virtual Machine Run Command. RunAsUser pulumi.StringPtrInput // A `source` block as defined below. The source of the run command script. Source RunCommandSourcePtrInput // A mapping of tags which should be assigned to the Virtual Machine Run Command. Tags pulumi.StringMapInput // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. VirtualMachineId pulumi.StringPtrInput } func (RunCommandState) ElementType() reflect.Type { return reflect.TypeOf((*runCommandState)(nil)).Elem() } type runCommandArgs struct { // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. ErrorBlobManagedIdentity *RunCommandErrorBlobManagedIdentity `pulumi:"errorBlobManagedIdentity"` // Specifies the Azure storage blob where script error stream will be uploaded. ErrorBlobUri *string `pulumi:"errorBlobUri"` // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. Location *string `pulumi:"location"` // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. Name *string `pulumi:"name"` // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. OutputBlobManagedIdentity *RunCommandOutputBlobManagedIdentity `pulumi:"outputBlobManagedIdentity"` // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. OutputBlobUri *string `pulumi:"outputBlobUri"` // A list of `parameter` blocks as defined below. The parameters used by the script. Parameters []RunCommandParameter `pulumi:"parameters"` // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. ProtectedParameters []RunCommandProtectedParameter `pulumi:"protectedParameters"` // Specifies the user account password on the VM when executing the Virtual Machine Run Command. RunAsPassword *string `pulumi:"runAsPassword"` // Specifies the user account on the VM when executing the Virtual Machine Run Command. RunAsUser *string `pulumi:"runAsUser"` // A `source` block as defined below. The source of the run command script. Source RunCommandSource `pulumi:"source"` // A mapping of tags which should be assigned to the Virtual Machine Run Command. Tags map[string]string `pulumi:"tags"` // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. VirtualMachineId string `pulumi:"virtualMachineId"` } // The set of arguments for constructing a RunCommand resource. type RunCommandArgs struct { // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. ErrorBlobManagedIdentity RunCommandErrorBlobManagedIdentityPtrInput // Specifies the Azure storage blob where script error stream will be uploaded. ErrorBlobUri pulumi.StringPtrInput // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. Location pulumi.StringPtrInput // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. Name pulumi.StringPtrInput // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. OutputBlobManagedIdentity RunCommandOutputBlobManagedIdentityPtrInput // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. OutputBlobUri pulumi.StringPtrInput // A list of `parameter` blocks as defined below. The parameters used by the script. Parameters RunCommandParameterArrayInput // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. ProtectedParameters RunCommandProtectedParameterArrayInput // Specifies the user account password on the VM when executing the Virtual Machine Run Command. RunAsPassword pulumi.StringPtrInput // Specifies the user account on the VM when executing the Virtual Machine Run Command. RunAsUser pulumi.StringPtrInput // A `source` block as defined below. The source of the run command script. Source RunCommandSourceInput // A mapping of tags which should be assigned to the Virtual Machine Run Command. Tags pulumi.StringMapInput // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. VirtualMachineId pulumi.StringInput } func (RunCommandArgs) ElementType() reflect.Type { return reflect.TypeOf((*runCommandArgs)(nil)).Elem() } type RunCommandInput interface { pulumi.Input ToRunCommandOutput() RunCommandOutput ToRunCommandOutputWithContext(ctx context.Context) RunCommandOutput } func (*RunCommand) ElementType() reflect.Type { return reflect.TypeOf((**RunCommand)(nil)).Elem() } func (i *RunCommand) ToRunCommandOutput() RunCommandOutput { return i.ToRunCommandOutputWithContext(context.Background()) } func (i *RunCommand) ToRunCommandOutputWithContext(ctx context.Context) RunCommandOutput { return pulumi.ToOutputWithContext(ctx, i).(RunCommandOutput) } // RunCommandArrayInput is an input type that accepts RunCommandArray and RunCommandArrayOutput values. // You can construct a concrete instance of `RunCommandArrayInput` via: // // RunCommandArray{ RunCommandArgs{...} } type RunCommandArrayInput interface { pulumi.Input ToRunCommandArrayOutput() RunCommandArrayOutput ToRunCommandArrayOutputWithContext(context.Context) RunCommandArrayOutput } type RunCommandArray []RunCommandInput func (RunCommandArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RunCommand)(nil)).Elem() } func (i RunCommandArray) ToRunCommandArrayOutput() RunCommandArrayOutput { return i.ToRunCommandArrayOutputWithContext(context.Background()) } func (i RunCommandArray) ToRunCommandArrayOutputWithContext(ctx context.Context) RunCommandArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RunCommandArrayOutput) } // RunCommandMapInput is an input type that accepts RunCommandMap and RunCommandMapOutput values. // You can construct a concrete instance of `RunCommandMapInput` via: // // RunCommandMap{ "key": RunCommandArgs{...} } type RunCommandMapInput interface { pulumi.Input ToRunCommandMapOutput() RunCommandMapOutput ToRunCommandMapOutputWithContext(context.Context) RunCommandMapOutput } type RunCommandMap map[string]RunCommandInput func (RunCommandMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RunCommand)(nil)).Elem() } func (i RunCommandMap) ToRunCommandMapOutput() RunCommandMapOutput { return i.ToRunCommandMapOutputWithContext(context.Background()) } func (i RunCommandMap) ToRunCommandMapOutputWithContext(ctx context.Context) RunCommandMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RunCommandMapOutput) } type RunCommandOutput struct{ *pulumi.OutputState } func (RunCommandOutput) ElementType() reflect.Type { return reflect.TypeOf((**RunCommand)(nil)).Elem() } func (o RunCommandOutput) ToRunCommandOutput() RunCommandOutput { return o } func (o RunCommandOutput) ToRunCommandOutputWithContext(ctx context.Context) RunCommandOutput { return o } // An `errorBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to errorBlobUri storage blob. func (o RunCommandOutput) ErrorBlobManagedIdentity() RunCommandErrorBlobManagedIdentityPtrOutput { return o.ApplyT(func(v *RunCommand) RunCommandErrorBlobManagedIdentityPtrOutput { return v.ErrorBlobManagedIdentity }).(RunCommandErrorBlobManagedIdentityPtrOutput) } // Specifies the Azure storage blob where script error stream will be uploaded. func (o RunCommandOutput) ErrorBlobUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringPtrOutput { return v.ErrorBlobUri }).(pulumi.StringPtrOutput) } func (o RunCommandOutput) InstanceViews() RunCommandInstanceViewArrayOutput { return o.ApplyT(func(v *RunCommand) RunCommandInstanceViewArrayOutput { return v.InstanceViews }).(RunCommandInstanceViewArrayOutput) } // The Azure Region where the Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. func (o RunCommandOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Virtual Machine Run Command. Changing this forces a new Virtual Machine Run Command to be created. func (o RunCommandOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An `outputBlobManagedIdentity` block as defined below. User-assigned managed Identity that has access to outputBlobUri storage blob. func (o RunCommandOutput) OutputBlobManagedIdentity() RunCommandOutputBlobManagedIdentityPtrOutput { return o.ApplyT(func(v *RunCommand) RunCommandOutputBlobManagedIdentityPtrOutput { return v.OutputBlobManagedIdentity }).(RunCommandOutputBlobManagedIdentityPtrOutput) } // Specifies the Azure storage blob where script output stream will be uploaded. It can be basic blob URI with SAS token. func (o RunCommandOutput) OutputBlobUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringPtrOutput { return v.OutputBlobUri }).(pulumi.StringPtrOutput) } // A list of `parameter` blocks as defined below. The parameters used by the script. func (o RunCommandOutput) Parameters() RunCommandParameterArrayOutput { return o.ApplyT(func(v *RunCommand) RunCommandParameterArrayOutput { return v.Parameters }).(RunCommandParameterArrayOutput) } // A list of `protectedParameter` blocks as defined below. The protected parameters used by the script. func (o RunCommandOutput) ProtectedParameters() RunCommandProtectedParameterArrayOutput { return o.ApplyT(func(v *RunCommand) RunCommandProtectedParameterArrayOutput { return v.ProtectedParameters }).(RunCommandProtectedParameterArrayOutput) } // Specifies the user account password on the VM when executing the Virtual Machine Run Command. func (o RunCommandOutput) RunAsPassword() pulumi.StringPtrOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringPtrOutput { return v.RunAsPassword }).(pulumi.StringPtrOutput) } // Specifies the user account on the VM when executing the Virtual Machine Run Command. func (o RunCommandOutput) RunAsUser() pulumi.StringPtrOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringPtrOutput { return v.RunAsUser }).(pulumi.StringPtrOutput) } // A `source` block as defined below. The source of the run command script. func (o RunCommandOutput) Source() RunCommandSourceOutput { return o.ApplyT(func(v *RunCommand) RunCommandSourceOutput { return v.Source }).(RunCommandSourceOutput) } // A mapping of tags which should be assigned to the Virtual Machine Run Command. func (o RunCommandOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the Virtual Machine ID within which this Virtual Machine Run Command should exist. Changing this forces a new Virtual Machine Run Command to be created. func (o RunCommandOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *RunCommand) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput) } type RunCommandArrayOutput struct{ *pulumi.OutputState } func (RunCommandArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RunCommand)(nil)).Elem() } func (o RunCommandArrayOutput) ToRunCommandArrayOutput() RunCommandArrayOutput { 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/compute/automanageConfigurationAssignment.go
sdk/go/azure/compute/automanageConfigurationAssignment.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Machine Automanage Configuration Profile Assignment. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automanage" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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-rg"), // Location: pulumi.String("westus"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("examplevnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("exampleni"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("examplevm"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@$$w0rd1234!"), // DisablePasswordAuthentication: pulumi.Bool(false), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // exampleConfiguration, err := automanage.NewConfiguration(ctx, "example", &automanage.ConfigurationArgs{ // Name: pulumi.String("exampleconfig"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = compute.NewAutomanageConfigurationAssignment(ctx, "example", &compute.AutomanageConfigurationAssignmentArgs{ // VirtualMachineId: exampleLinuxVirtualMachine.ID(), // ConfigurationId: exampleConfiguration.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.Compute` - 2022-05-04 // // ## Import // // Virtual Machine Automanage Configuration Profile Assignment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/automanageConfigurationAssignment:AutomanageConfigurationAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AutoManage/configurationProfileAssignments/default // ``` type AutomanageConfigurationAssignment struct { pulumi.CustomResourceState // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. ConfigurationId pulumi.StringOutput `pulumi:"configurationId"` // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` } // NewAutomanageConfigurationAssignment registers a new resource with the given unique name, arguments, and options. func NewAutomanageConfigurationAssignment(ctx *pulumi.Context, name string, args *AutomanageConfigurationAssignmentArgs, opts ...pulumi.ResourceOption) (*AutomanageConfigurationAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConfigurationId == nil { return nil, errors.New("invalid value for required argument 'ConfigurationId'") } if args.VirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AutomanageConfigurationAssignment err := ctx.RegisterResource("azure:compute/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAutomanageConfigurationAssignment gets an existing AutomanageConfigurationAssignment 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 GetAutomanageConfigurationAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AutomanageConfigurationAssignmentState, opts ...pulumi.ResourceOption) (*AutomanageConfigurationAssignment, error) { var resource AutomanageConfigurationAssignment err := ctx.ReadResource("azure:compute/automanageConfigurationAssignment:AutomanageConfigurationAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AutomanageConfigurationAssignment resources. type automanageConfigurationAssignmentState struct { // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. ConfigurationId *string `pulumi:"configurationId"` // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. VirtualMachineId *string `pulumi:"virtualMachineId"` } type AutomanageConfigurationAssignmentState struct { // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. ConfigurationId pulumi.StringPtrInput // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringPtrInput } func (AutomanageConfigurationAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*automanageConfigurationAssignmentState)(nil)).Elem() } type automanageConfigurationAssignmentArgs struct { // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. ConfigurationId string `pulumi:"configurationId"` // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. VirtualMachineId string `pulumi:"virtualMachineId"` } // The set of arguments for constructing a AutomanageConfigurationAssignment resource. type AutomanageConfigurationAssignmentArgs struct { // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. ConfigurationId pulumi.StringInput // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringInput } func (AutomanageConfigurationAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*automanageConfigurationAssignmentArgs)(nil)).Elem() } type AutomanageConfigurationAssignmentInput interface { pulumi.Input ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput } func (*AutomanageConfigurationAssignment) ElementType() reflect.Type { return reflect.TypeOf((**AutomanageConfigurationAssignment)(nil)).Elem() } func (i *AutomanageConfigurationAssignment) ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput { return i.ToAutomanageConfigurationAssignmentOutputWithContext(context.Background()) } func (i *AutomanageConfigurationAssignment) ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentOutput) } // AutomanageConfigurationAssignmentArrayInput is an input type that accepts AutomanageConfigurationAssignmentArray and AutomanageConfigurationAssignmentArrayOutput values. // You can construct a concrete instance of `AutomanageConfigurationAssignmentArrayInput` via: // // AutomanageConfigurationAssignmentArray{ AutomanageConfigurationAssignmentArgs{...} } type AutomanageConfigurationAssignmentArrayInput interface { pulumi.Input ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput ToAutomanageConfigurationAssignmentArrayOutputWithContext(context.Context) AutomanageConfigurationAssignmentArrayOutput } type AutomanageConfigurationAssignmentArray []AutomanageConfigurationAssignmentInput func (AutomanageConfigurationAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AutomanageConfigurationAssignment)(nil)).Elem() } func (i AutomanageConfigurationAssignmentArray) ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput { return i.ToAutomanageConfigurationAssignmentArrayOutputWithContext(context.Background()) } func (i AutomanageConfigurationAssignmentArray) ToAutomanageConfigurationAssignmentArrayOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentArrayOutput) } // AutomanageConfigurationAssignmentMapInput is an input type that accepts AutomanageConfigurationAssignmentMap and AutomanageConfigurationAssignmentMapOutput values. // You can construct a concrete instance of `AutomanageConfigurationAssignmentMapInput` via: // // AutomanageConfigurationAssignmentMap{ "key": AutomanageConfigurationAssignmentArgs{...} } type AutomanageConfigurationAssignmentMapInput interface { pulumi.Input ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput ToAutomanageConfigurationAssignmentMapOutputWithContext(context.Context) AutomanageConfigurationAssignmentMapOutput } type AutomanageConfigurationAssignmentMap map[string]AutomanageConfigurationAssignmentInput func (AutomanageConfigurationAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AutomanageConfigurationAssignment)(nil)).Elem() } func (i AutomanageConfigurationAssignmentMap) ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput { return i.ToAutomanageConfigurationAssignmentMapOutputWithContext(context.Background()) } func (i AutomanageConfigurationAssignmentMap) ToAutomanageConfigurationAssignmentMapOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomanageConfigurationAssignmentMapOutput) } type AutomanageConfigurationAssignmentOutput struct{ *pulumi.OutputState } func (AutomanageConfigurationAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**AutomanageConfigurationAssignment)(nil)).Elem() } func (o AutomanageConfigurationAssignmentOutput) ToAutomanageConfigurationAssignmentOutput() AutomanageConfigurationAssignmentOutput { return o } func (o AutomanageConfigurationAssignmentOutput) ToAutomanageConfigurationAssignmentOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentOutput { return o } // The ARM resource ID of the Automanage Configuration to assign to the Virtual Machine. Changing this forces a new resource to be created. func (o AutomanageConfigurationAssignmentOutput) ConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *AutomanageConfigurationAssignment) pulumi.StringOutput { return v.ConfigurationId }).(pulumi.StringOutput) } // The ARM resource ID of the Virtual Machine to assign the Automanage Configuration to. Changing this forces a new resource to be created. func (o AutomanageConfigurationAssignmentOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *AutomanageConfigurationAssignment) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput) } type AutomanageConfigurationAssignmentArrayOutput struct{ *pulumi.OutputState } func (AutomanageConfigurationAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AutomanageConfigurationAssignment)(nil)).Elem() } func (o AutomanageConfigurationAssignmentArrayOutput) ToAutomanageConfigurationAssignmentArrayOutput() AutomanageConfigurationAssignmentArrayOutput { return o } func (o AutomanageConfigurationAssignmentArrayOutput) ToAutomanageConfigurationAssignmentArrayOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentArrayOutput { return o } func (o AutomanageConfigurationAssignmentArrayOutput) Index(i pulumi.IntInput) AutomanageConfigurationAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AutomanageConfigurationAssignment { return vs[0].([]*AutomanageConfigurationAssignment)[vs[1].(int)] }).(AutomanageConfigurationAssignmentOutput) } type AutomanageConfigurationAssignmentMapOutput struct{ *pulumi.OutputState } func (AutomanageConfigurationAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AutomanageConfigurationAssignment)(nil)).Elem() } func (o AutomanageConfigurationAssignmentMapOutput) ToAutomanageConfigurationAssignmentMapOutput() AutomanageConfigurationAssignmentMapOutput { return o } func (o AutomanageConfigurationAssignmentMapOutput) ToAutomanageConfigurationAssignmentMapOutputWithContext(ctx context.Context) AutomanageConfigurationAssignmentMapOutput { return o } func (o AutomanageConfigurationAssignmentMapOutput) MapIndex(k pulumi.StringInput) AutomanageConfigurationAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AutomanageConfigurationAssignment { return vs[0].(map[string]*AutomanageConfigurationAssignment)[vs[1].(string)] }).(AutomanageConfigurationAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentInput)(nil)).Elem(), &AutomanageConfigurationAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentArrayInput)(nil)).Elem(), AutomanageConfigurationAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AutomanageConfigurationAssignmentMapInput)(nil)).Elem(), AutomanageConfigurationAssignmentMap{}) pulumi.RegisterOutputType(AutomanageConfigurationAssignmentOutput{}) pulumi.RegisterOutputType(AutomanageConfigurationAssignmentArrayOutput{}) pulumi.RegisterOutputType(AutomanageConfigurationAssignmentMapOutput{}) }
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/compute/getSshPublicKey.go
sdk/go/azure/compute/getSshPublicKey.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 compute 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 SSH Public Key. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.LookupSshPublicKey(ctx, &compute.LookupSshPublicKeyArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, 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.Compute` - 2024-03-01 func LookupSshPublicKey(ctx *pulumi.Context, args *LookupSshPublicKeyArgs, opts ...pulumi.InvokeOption) (*LookupSshPublicKeyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSshPublicKeyResult err := ctx.Invoke("azure:compute/getSshPublicKey:getSshPublicKey", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSshPublicKey. type LookupSshPublicKeyArgs struct { // The name of this SSH Public Key. Name string `pulumi:"name"` // The name of the Resource Group where the SSH Public Key exists. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the SSH Public Key. Tags map[string]string `pulumi:"tags"` } // A collection of values returned by getSshPublicKey. type LookupSshPublicKeyResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The SSH public key used to authenticate to a virtual machine through ssh. PublicKey string `pulumi:"publicKey"` ResourceGroupName string `pulumi:"resourceGroupName"` Tags map[string]string `pulumi:"tags"` } func LookupSshPublicKeyOutput(ctx *pulumi.Context, args LookupSshPublicKeyOutputArgs, opts ...pulumi.InvokeOption) LookupSshPublicKeyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSshPublicKeyResultOutput, error) { args := v.(LookupSshPublicKeyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getSshPublicKey:getSshPublicKey", args, LookupSshPublicKeyResultOutput{}, options).(LookupSshPublicKeyResultOutput), nil }).(LookupSshPublicKeyResultOutput) } // A collection of arguments for invoking getSshPublicKey. type LookupSshPublicKeyOutputArgs struct { // The name of this SSH Public Key. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the SSH Public Key exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the SSH Public Key. Tags pulumi.StringMapInput `pulumi:"tags"` } func (LookupSshPublicKeyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSshPublicKeyArgs)(nil)).Elem() } // A collection of values returned by getSshPublicKey. type LookupSshPublicKeyResultOutput struct{ *pulumi.OutputState } func (LookupSshPublicKeyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSshPublicKeyResult)(nil)).Elem() } func (o LookupSshPublicKeyResultOutput) ToLookupSshPublicKeyResultOutput() LookupSshPublicKeyResultOutput { return o } func (o LookupSshPublicKeyResultOutput) ToLookupSshPublicKeyResultOutputWithContext(ctx context.Context) LookupSshPublicKeyResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupSshPublicKeyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSshPublicKeyResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSshPublicKeyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSshPublicKeyResult) string { return v.Name }).(pulumi.StringOutput) } // The SSH public key used to authenticate to a virtual machine through ssh. func (o LookupSshPublicKeyResultOutput) PublicKey() pulumi.StringOutput { return o.ApplyT(func(v LookupSshPublicKeyResult) string { return v.PublicKey }).(pulumi.StringOutput) } func (o LookupSshPublicKeyResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupSshPublicKeyResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupSshPublicKeyResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSshPublicKeyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupSshPublicKeyResultOutput{}) }
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/compute/sharedImageVersion.go
sdk/go/azure/compute/sharedImageVersion.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Version of a Shared Image within a Shared Image Gallery. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // existing, err := compute.LookupImage(ctx, &compute.LookupImageArgs{ // Name: pulumi.StringRef("search-api"), // ResourceGroupName: "packerimages", // }, nil) // if err != nil { // return err // } // existingGetSharedImage, err := compute.LookupSharedImage(ctx, &compute.LookupSharedImageArgs{ // Name: "existing-image", // GalleryName: "existing_gallery", // ResourceGroupName: "existing-resources", // }, nil) // if err != nil { // return err // } // _, err = compute.NewSharedImageVersion(ctx, "example", &compute.SharedImageVersionArgs{ // Name: pulumi.String("0.0.1"), // GalleryName: pulumi.String(existingGetSharedImage.GalleryName), // ImageName: pulumi.String(existingGetSharedImage.Name), // ResourceGroupName: pulumi.String(existingGetSharedImage.ResourceGroupName), // Location: pulumi.String(existingGetSharedImage.Location), // ManagedImageId: pulumi.String(existing.Id), // TargetRegions: compute.SharedImageVersionTargetRegionArray{ // &compute.SharedImageVersionTargetRegionArgs{ // Name: pulumi.String(existingGetSharedImage.Location), // RegionalReplicaCount: pulumi.Int(5), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // }, // }) // 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.Compute` - 2023-07-03 // // ## Import // // Shared Image Versions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/sharedImageVersion:SharedImageVersion version /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/galleries/gallery1/images/image1/versions/1.2.3 // ``` type SharedImageVersion struct { pulumi.CustomResourceState // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together BlobUri pulumi.StringPtrOutput `pulumi:"blobUri"` // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. DeletionOfReplicatedLocationsEnabled pulumi.BoolPtrOutput `pulumi:"deletionOfReplicatedLocationsEnabled"` // The end of life date in RFC3339 format of the Image Version. EndOfLifeDate pulumi.StringPtrOutput `pulumi:"endOfLifeDate"` // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrOutput `pulumi:"excludeFromLatest"` // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. GalleryName pulumi.StringOutput `pulumi:"galleryName"` // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. ImageName pulumi.StringOutput `pulumi:"imageName"` // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. ManagedImageId pulumi.StringPtrOutput `pulumi:"managedImageId"` // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. OsDiskSnapshotId pulumi.StringPtrOutput `pulumi:"osDiskSnapshotId"` // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. ReplicationMode pulumi.StringPtrOutput `pulumi:"replicationMode"` // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"` // A collection of tags which should be applied to this resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // One or more `targetRegion` blocks as documented below. TargetRegions SharedImageVersionTargetRegionArrayOutput `pulumi:"targetRegions"` } // NewSharedImageVersion registers a new resource with the given unique name, arguments, and options. func NewSharedImageVersion(ctx *pulumi.Context, name string, args *SharedImageVersionArgs, opts ...pulumi.ResourceOption) (*SharedImageVersion, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.GalleryName == nil { return nil, errors.New("invalid value for required argument 'GalleryName'") } if args.ImageName == nil { return nil, errors.New("invalid value for required argument 'ImageName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TargetRegions == nil { return nil, errors.New("invalid value for required argument 'TargetRegions'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SharedImageVersion err := ctx.RegisterResource("azure:compute/sharedImageVersion:SharedImageVersion", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSharedImageVersion gets an existing SharedImageVersion 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 GetSharedImageVersion(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SharedImageVersionState, opts ...pulumi.ResourceOption) (*SharedImageVersion, error) { var resource SharedImageVersion err := ctx.ReadResource("azure:compute/sharedImageVersion:SharedImageVersion", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SharedImageVersion resources. type sharedImageVersionState struct { // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together BlobUri *string `pulumi:"blobUri"` // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. DeletionOfReplicatedLocationsEnabled *bool `pulumi:"deletionOfReplicatedLocationsEnabled"` // The end of life date in RFC3339 format of the Image Version. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest *bool `pulumi:"excludeFromLatest"` // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. GalleryName *string `pulumi:"galleryName"` // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. ImageName *string `pulumi:"imageName"` // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. ManagedImageId *string `pulumi:"managedImageId"` // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. OsDiskSnapshotId *string `pulumi:"osDiskSnapshotId"` // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. ReplicationMode *string `pulumi:"replicationMode"` // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together StorageAccountId *string `pulumi:"storageAccountId"` // A collection of tags which should be applied to this resource. Tags map[string]string `pulumi:"tags"` // One or more `targetRegion` blocks as documented below. TargetRegions []SharedImageVersionTargetRegion `pulumi:"targetRegions"` } type SharedImageVersionState struct { // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together BlobUri pulumi.StringPtrInput // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. DeletionOfReplicatedLocationsEnabled pulumi.BoolPtrInput // The end of life date in RFC3339 format of the Image Version. EndOfLifeDate pulumi.StringPtrInput // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrInput // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. GalleryName pulumi.StringPtrInput // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. ImageName pulumi.StringPtrInput // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. ManagedImageId pulumi.StringPtrInput // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. OsDiskSnapshotId pulumi.StringPtrInput // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. ReplicationMode pulumi.StringPtrInput // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together StorageAccountId pulumi.StringPtrInput // A collection of tags which should be applied to this resource. Tags pulumi.StringMapInput // One or more `targetRegion` blocks as documented below. TargetRegions SharedImageVersionTargetRegionArrayInput } func (SharedImageVersionState) ElementType() reflect.Type { return reflect.TypeOf((*sharedImageVersionState)(nil)).Elem() } type sharedImageVersionArgs struct { // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together BlobUri *string `pulumi:"blobUri"` // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. DeletionOfReplicatedLocationsEnabled *bool `pulumi:"deletionOfReplicatedLocationsEnabled"` // The end of life date in RFC3339 format of the Image Version. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest *bool `pulumi:"excludeFromLatest"` // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. GalleryName string `pulumi:"galleryName"` // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. ImageName string `pulumi:"imageName"` // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. ManagedImageId *string `pulumi:"managedImageId"` // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. OsDiskSnapshotId *string `pulumi:"osDiskSnapshotId"` // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. ReplicationMode *string `pulumi:"replicationMode"` // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together StorageAccountId *string `pulumi:"storageAccountId"` // A collection of tags which should be applied to this resource. Tags map[string]string `pulumi:"tags"` // One or more `targetRegion` blocks as documented below. TargetRegions []SharedImageVersionTargetRegion `pulumi:"targetRegions"` } // The set of arguments for constructing a SharedImageVersion resource. type SharedImageVersionArgs struct { // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together BlobUri pulumi.StringPtrInput // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. DeletionOfReplicatedLocationsEnabled pulumi.BoolPtrInput // The end of life date in RFC3339 format of the Image Version. EndOfLifeDate pulumi.StringPtrInput // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrInput // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. GalleryName pulumi.StringInput // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. ImageName pulumi.StringInput // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. ManagedImageId pulumi.StringPtrInput // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. OsDiskSnapshotId pulumi.StringPtrInput // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. ReplicationMode pulumi.StringPtrInput // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together StorageAccountId pulumi.StringPtrInput // A collection of tags which should be applied to this resource. Tags pulumi.StringMapInput // One or more `targetRegion` blocks as documented below. TargetRegions SharedImageVersionTargetRegionArrayInput } func (SharedImageVersionArgs) ElementType() reflect.Type { return reflect.TypeOf((*sharedImageVersionArgs)(nil)).Elem() } type SharedImageVersionInput interface { pulumi.Input ToSharedImageVersionOutput() SharedImageVersionOutput ToSharedImageVersionOutputWithContext(ctx context.Context) SharedImageVersionOutput } func (*SharedImageVersion) ElementType() reflect.Type { return reflect.TypeOf((**SharedImageVersion)(nil)).Elem() } func (i *SharedImageVersion) ToSharedImageVersionOutput() SharedImageVersionOutput { return i.ToSharedImageVersionOutputWithContext(context.Background()) } func (i *SharedImageVersion) ToSharedImageVersionOutputWithContext(ctx context.Context) SharedImageVersionOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedImageVersionOutput) } // SharedImageVersionArrayInput is an input type that accepts SharedImageVersionArray and SharedImageVersionArrayOutput values. // You can construct a concrete instance of `SharedImageVersionArrayInput` via: // // SharedImageVersionArray{ SharedImageVersionArgs{...} } type SharedImageVersionArrayInput interface { pulumi.Input ToSharedImageVersionArrayOutput() SharedImageVersionArrayOutput ToSharedImageVersionArrayOutputWithContext(context.Context) SharedImageVersionArrayOutput } type SharedImageVersionArray []SharedImageVersionInput func (SharedImageVersionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedImageVersion)(nil)).Elem() } func (i SharedImageVersionArray) ToSharedImageVersionArrayOutput() SharedImageVersionArrayOutput { return i.ToSharedImageVersionArrayOutputWithContext(context.Background()) } func (i SharedImageVersionArray) ToSharedImageVersionArrayOutputWithContext(ctx context.Context) SharedImageVersionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedImageVersionArrayOutput) } // SharedImageVersionMapInput is an input type that accepts SharedImageVersionMap and SharedImageVersionMapOutput values. // You can construct a concrete instance of `SharedImageVersionMapInput` via: // // SharedImageVersionMap{ "key": SharedImageVersionArgs{...} } type SharedImageVersionMapInput interface { pulumi.Input ToSharedImageVersionMapOutput() SharedImageVersionMapOutput ToSharedImageVersionMapOutputWithContext(context.Context) SharedImageVersionMapOutput } type SharedImageVersionMap map[string]SharedImageVersionInput func (SharedImageVersionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedImageVersion)(nil)).Elem() } func (i SharedImageVersionMap) ToSharedImageVersionMapOutput() SharedImageVersionMapOutput { return i.ToSharedImageVersionMapOutputWithContext(context.Background()) } func (i SharedImageVersionMap) ToSharedImageVersionMapOutputWithContext(ctx context.Context) SharedImageVersionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedImageVersionMapOutput) } type SharedImageVersionOutput struct{ *pulumi.OutputState } func (SharedImageVersionOutput) ElementType() reflect.Type { return reflect.TypeOf((**SharedImageVersion)(nil)).Elem() } func (o SharedImageVersionOutput) ToSharedImageVersionOutput() SharedImageVersionOutput { return o } func (o SharedImageVersionOutput) ToSharedImageVersionOutputWithContext(ctx context.Context) SharedImageVersionOutput { return o } // URI of the Azure Storage Blob used to create the Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together func (o SharedImageVersionOutput) BlobUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.BlobUri }).(pulumi.StringPtrOutput) } // Specifies whether this Shared Image Version can be deleted from the Azure Regions this is replicated to. Defaults to `false`. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) DeletionOfReplicatedLocationsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.BoolPtrOutput { return v.DeletionOfReplicatedLocationsEnabled }).(pulumi.BoolPtrOutput) } // The end of life date in RFC3339 format of the Image Version. func (o SharedImageVersionOutput) EndOfLifeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.EndOfLifeDate }).(pulumi.StringPtrOutput) } // Should this Image Version be excluded from the `latest` filter? If set to `true` this Image Version won't be returned for the `latest` version. Defaults to `false`. func (o SharedImageVersionOutput) ExcludeFromLatest() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.BoolPtrOutput { return v.ExcludeFromLatest }).(pulumi.BoolPtrOutput) } // The name of the Shared Image Gallery in which the Shared Image exists. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) GalleryName() pulumi.StringOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringOutput { return v.GalleryName }).(pulumi.StringOutput) } // The name of the Shared Image within the Shared Image Gallery in which this Version should be created. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) ImageName() pulumi.StringOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringOutput { return v.ImageName }).(pulumi.StringOutput) } // The Azure Region in which the Shared Image Gallery exists. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The ID of the Managed Image or Virtual Machine ID which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** The ID can be sourced from the `compute.Image` data source or resource // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. func (o SharedImageVersionOutput) ManagedImageId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.ManagedImageId }).(pulumi.StringPtrOutput) } // The version number for this Image Version, such as `1.0.0`. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the OS disk snapshot which should be used for this Shared Image Version. Changing this forces a new resource to be created. // // > **NOTE:** You must specify exact one of `blobUri`, `managedImageId` and `osDiskSnapshotId`. func (o SharedImageVersionOutput) OsDiskSnapshotId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.OsDiskSnapshotId }).(pulumi.StringPtrOutput) } // Mode to be used for replication. Possible values are `Full` and `Shallow`. Defaults to `Full`. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) ReplicationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.ReplicationMode }).(pulumi.StringPtrOutput) } // The name of the Resource Group in which the Shared Image Gallery exists. Changing this forces a new resource to be created. func (o SharedImageVersionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the Storage Account where the Blob exists. Changing this forces a new resource to be created. // // > **NOTE:** `blobUri` and `storageAccountId` must be specified together func (o SharedImageVersionOutput) StorageAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput) } // A collection of tags which should be applied to this resource. func (o SharedImageVersionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SharedImageVersion) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // One or more `targetRegion` blocks as documented below. func (o SharedImageVersionOutput) TargetRegions() SharedImageVersionTargetRegionArrayOutput { return o.ApplyT(func(v *SharedImageVersion) SharedImageVersionTargetRegionArrayOutput { return v.TargetRegions }).(SharedImageVersionTargetRegionArrayOutput) } type SharedImageVersionArrayOutput struct{ *pulumi.OutputState } func (SharedImageVersionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedImageVersion)(nil)).Elem() } func (o SharedImageVersionArrayOutput) ToSharedImageVersionArrayOutput() SharedImageVersionArrayOutput { return o } func (o SharedImageVersionArrayOutput) ToSharedImageVersionArrayOutputWithContext(ctx context.Context) SharedImageVersionArrayOutput { return o } func (o SharedImageVersionArrayOutput) Index(i pulumi.IntInput) SharedImageVersionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SharedImageVersion { return vs[0].([]*SharedImageVersion)[vs[1].(int)] }).(SharedImageVersionOutput) } type SharedImageVersionMapOutput struct{ *pulumi.OutputState } func (SharedImageVersionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedImageVersion)(nil)).Elem() } func (o SharedImageVersionMapOutput) ToSharedImageVersionMapOutput() SharedImageVersionMapOutput { return o } func (o SharedImageVersionMapOutput) ToSharedImageVersionMapOutputWithContext(ctx context.Context) SharedImageVersionMapOutput { return o } func (o SharedImageVersionMapOutput) MapIndex(k pulumi.StringInput) SharedImageVersionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SharedImageVersion { return vs[0].(map[string]*SharedImageVersion)[vs[1].(string)] }).(SharedImageVersionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SharedImageVersionInput)(nil)).Elem(), &SharedImageVersion{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedImageVersionArrayInput)(nil)).Elem(), SharedImageVersionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedImageVersionMapInput)(nil)).Elem(), SharedImageVersionMap{}) pulumi.RegisterOutputType(SharedImageVersionOutput{}) pulumi.RegisterOutputType(SharedImageVersionArrayOutput{}) pulumi.RegisterOutputType(SharedImageVersionMapOutput{}) }
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/compute/galleryApplicationVersion.go
sdk/go/azure/compute/galleryApplicationVersion.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Gallery Application Version. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleSharedImageGallery, err := compute.NewSharedImageGallery(ctx, "example", &compute.SharedImageGalleryArgs{ // Name: pulumi.String("examplegallery"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleGalleryApplication, err := compute.NewGalleryApplication(ctx, "example", &compute.GalleryApplicationArgs{ // Name: pulumi.String("example-app"), // GalleryId: exampleSharedImageGallery.ID(), // Location: example.Location, // SupportedOsType: pulumi.String("Linux"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorage"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("example-container"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("blob"), // }) // if err != nil { // return err // } // exampleBlob, err := storage.NewBlob(ctx, "example", &storage.BlobArgs{ // Name: pulumi.String("scripts"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Block"), // SourceContent: pulumi.String("[scripts file content]"), // }) // if err != nil { // return err // } // _, err = compute.NewGalleryApplicationVersion(ctx, "example", &compute.GalleryApplicationVersionArgs{ // Name: pulumi.String("0.0.1"), // GalleryApplicationId: exampleGalleryApplication.ID(), // Location: exampleGalleryApplication.Location, // ManageAction: &compute.GalleryApplicationVersionManageActionArgs{ // Install: pulumi.String("[install command]"), // Remove: pulumi.String("[remove command]"), // }, // Source: &compute.GalleryApplicationVersionSourceArgs{ // MediaLink: exampleBlob.ID(), // }, // TargetRegions: compute.GalleryApplicationVersionTargetRegionArray{ // &compute.GalleryApplicationVersionTargetRegionArgs{ // Name: exampleGalleryApplication.Location, // RegionalReplicaCount: pulumi.Int(1), // }, // }, // }) // 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.Compute` - 2022-03-03 // // ## Import // // Gallery Application Versions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/galleryApplicationVersion:GalleryApplicationVersion example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1/versions/galleryApplicationVersion1 // ``` type GalleryApplicationVersion struct { pulumi.CustomResourceState // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. ConfigFile pulumi.StringPtrOutput `pulumi:"configFile"` // Should the Gallery Application reports health. Defaults to `false`. EnableHealthCheck pulumi.BoolPtrOutput `pulumi:"enableHealthCheck"` // The end of life date in RFC3339 format of the Gallery Application Version. EndOfLifeDate pulumi.StringPtrOutput `pulumi:"endOfLifeDate"` // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrOutput `pulumi:"excludeFromLatest"` // The ID of the Gallery Application. Changing this forces a new resource to be created. GalleryApplicationId pulumi.StringOutput `pulumi:"galleryApplicationId"` // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // A `manageAction` block as defined below. ManageAction GalleryApplicationVersionManageActionOutput `pulumi:"manageAction"` // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. PackageFile pulumi.StringPtrOutput `pulumi:"packageFile"` // A `source` block as defined below. Source GalleryApplicationVersionSourceOutput `pulumi:"source"` // A mapping of tags to assign to the Gallery Application Version. Tags pulumi.StringMapOutput `pulumi:"tags"` // One or more `targetRegion` blocks as defined below. TargetRegions GalleryApplicationVersionTargetRegionArrayOutput `pulumi:"targetRegions"` } // NewGalleryApplicationVersion registers a new resource with the given unique name, arguments, and options. func NewGalleryApplicationVersion(ctx *pulumi.Context, name string, args *GalleryApplicationVersionArgs, opts ...pulumi.ResourceOption) (*GalleryApplicationVersion, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.GalleryApplicationId == nil { return nil, errors.New("invalid value for required argument 'GalleryApplicationId'") } if args.ManageAction == nil { return nil, errors.New("invalid value for required argument 'ManageAction'") } if args.Source == nil { return nil, errors.New("invalid value for required argument 'Source'") } if args.TargetRegions == nil { return nil, errors.New("invalid value for required argument 'TargetRegions'") } opts = internal.PkgResourceDefaultOpts(opts) var resource GalleryApplicationVersion err := ctx.RegisterResource("azure:compute/galleryApplicationVersion:GalleryApplicationVersion", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetGalleryApplicationVersion gets an existing GalleryApplicationVersion 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 GetGalleryApplicationVersion(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GalleryApplicationVersionState, opts ...pulumi.ResourceOption) (*GalleryApplicationVersion, error) { var resource GalleryApplicationVersion err := ctx.ReadResource("azure:compute/galleryApplicationVersion:GalleryApplicationVersion", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering GalleryApplicationVersion resources. type galleryApplicationVersionState struct { // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. ConfigFile *string `pulumi:"configFile"` // Should the Gallery Application reports health. Defaults to `false`. EnableHealthCheck *bool `pulumi:"enableHealthCheck"` // The end of life date in RFC3339 format of the Gallery Application Version. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest *bool `pulumi:"excludeFromLatest"` // The ID of the Gallery Application. Changing this forces a new resource to be created. GalleryApplicationId *string `pulumi:"galleryApplicationId"` // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `manageAction` block as defined below. ManageAction *GalleryApplicationVersionManageAction `pulumi:"manageAction"` // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. PackageFile *string `pulumi:"packageFile"` // A `source` block as defined below. Source *GalleryApplicationVersionSource `pulumi:"source"` // A mapping of tags to assign to the Gallery Application Version. Tags map[string]string `pulumi:"tags"` // One or more `targetRegion` blocks as defined below. TargetRegions []GalleryApplicationVersionTargetRegion `pulumi:"targetRegions"` } type GalleryApplicationVersionState struct { // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. ConfigFile pulumi.StringPtrInput // Should the Gallery Application reports health. Defaults to `false`. EnableHealthCheck pulumi.BoolPtrInput // The end of life date in RFC3339 format of the Gallery Application Version. EndOfLifeDate pulumi.StringPtrInput // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrInput // The ID of the Gallery Application. Changing this forces a new resource to be created. GalleryApplicationId pulumi.StringPtrInput // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `manageAction` block as defined below. ManageAction GalleryApplicationVersionManageActionPtrInput // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. PackageFile pulumi.StringPtrInput // A `source` block as defined below. Source GalleryApplicationVersionSourcePtrInput // A mapping of tags to assign to the Gallery Application Version. Tags pulumi.StringMapInput // One or more `targetRegion` blocks as defined below. TargetRegions GalleryApplicationVersionTargetRegionArrayInput } func (GalleryApplicationVersionState) ElementType() reflect.Type { return reflect.TypeOf((*galleryApplicationVersionState)(nil)).Elem() } type galleryApplicationVersionArgs struct { // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. ConfigFile *string `pulumi:"configFile"` // Should the Gallery Application reports health. Defaults to `false`. EnableHealthCheck *bool `pulumi:"enableHealthCheck"` // The end of life date in RFC3339 format of the Gallery Application Version. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest *bool `pulumi:"excludeFromLatest"` // The ID of the Gallery Application. Changing this forces a new resource to be created. GalleryApplicationId string `pulumi:"galleryApplicationId"` // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `manageAction` block as defined below. ManageAction GalleryApplicationVersionManageAction `pulumi:"manageAction"` // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. PackageFile *string `pulumi:"packageFile"` // A `source` block as defined below. Source GalleryApplicationVersionSource `pulumi:"source"` // A mapping of tags to assign to the Gallery Application Version. Tags map[string]string `pulumi:"tags"` // One or more `targetRegion` blocks as defined below. TargetRegions []GalleryApplicationVersionTargetRegion `pulumi:"targetRegions"` } // The set of arguments for constructing a GalleryApplicationVersion resource. type GalleryApplicationVersionArgs struct { // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. ConfigFile pulumi.StringPtrInput // Should the Gallery Application reports health. Defaults to `false`. EnableHealthCheck pulumi.BoolPtrInput // The end of life date in RFC3339 format of the Gallery Application Version. EndOfLifeDate pulumi.StringPtrInput // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. ExcludeFromLatest pulumi.BoolPtrInput // The ID of the Gallery Application. Changing this forces a new resource to be created. GalleryApplicationId pulumi.StringInput // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `manageAction` block as defined below. ManageAction GalleryApplicationVersionManageActionInput // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. PackageFile pulumi.StringPtrInput // A `source` block as defined below. Source GalleryApplicationVersionSourceInput // A mapping of tags to assign to the Gallery Application Version. Tags pulumi.StringMapInput // One or more `targetRegion` blocks as defined below. TargetRegions GalleryApplicationVersionTargetRegionArrayInput } func (GalleryApplicationVersionArgs) ElementType() reflect.Type { return reflect.TypeOf((*galleryApplicationVersionArgs)(nil)).Elem() } type GalleryApplicationVersionInput interface { pulumi.Input ToGalleryApplicationVersionOutput() GalleryApplicationVersionOutput ToGalleryApplicationVersionOutputWithContext(ctx context.Context) GalleryApplicationVersionOutput } func (*GalleryApplicationVersion) ElementType() reflect.Type { return reflect.TypeOf((**GalleryApplicationVersion)(nil)).Elem() } func (i *GalleryApplicationVersion) ToGalleryApplicationVersionOutput() GalleryApplicationVersionOutput { return i.ToGalleryApplicationVersionOutputWithContext(context.Background()) } func (i *GalleryApplicationVersion) ToGalleryApplicationVersionOutputWithContext(ctx context.Context) GalleryApplicationVersionOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationVersionOutput) } // GalleryApplicationVersionArrayInput is an input type that accepts GalleryApplicationVersionArray and GalleryApplicationVersionArrayOutput values. // You can construct a concrete instance of `GalleryApplicationVersionArrayInput` via: // // GalleryApplicationVersionArray{ GalleryApplicationVersionArgs{...} } type GalleryApplicationVersionArrayInput interface { pulumi.Input ToGalleryApplicationVersionArrayOutput() GalleryApplicationVersionArrayOutput ToGalleryApplicationVersionArrayOutputWithContext(context.Context) GalleryApplicationVersionArrayOutput } type GalleryApplicationVersionArray []GalleryApplicationVersionInput func (GalleryApplicationVersionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*GalleryApplicationVersion)(nil)).Elem() } func (i GalleryApplicationVersionArray) ToGalleryApplicationVersionArrayOutput() GalleryApplicationVersionArrayOutput { return i.ToGalleryApplicationVersionArrayOutputWithContext(context.Background()) } func (i GalleryApplicationVersionArray) ToGalleryApplicationVersionArrayOutputWithContext(ctx context.Context) GalleryApplicationVersionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationVersionArrayOutput) } // GalleryApplicationVersionMapInput is an input type that accepts GalleryApplicationVersionMap and GalleryApplicationVersionMapOutput values. // You can construct a concrete instance of `GalleryApplicationVersionMapInput` via: // // GalleryApplicationVersionMap{ "key": GalleryApplicationVersionArgs{...} } type GalleryApplicationVersionMapInput interface { pulumi.Input ToGalleryApplicationVersionMapOutput() GalleryApplicationVersionMapOutput ToGalleryApplicationVersionMapOutputWithContext(context.Context) GalleryApplicationVersionMapOutput } type GalleryApplicationVersionMap map[string]GalleryApplicationVersionInput func (GalleryApplicationVersionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GalleryApplicationVersion)(nil)).Elem() } func (i GalleryApplicationVersionMap) ToGalleryApplicationVersionMapOutput() GalleryApplicationVersionMapOutput { return i.ToGalleryApplicationVersionMapOutputWithContext(context.Background()) } func (i GalleryApplicationVersionMap) ToGalleryApplicationVersionMapOutputWithContext(ctx context.Context) GalleryApplicationVersionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationVersionMapOutput) } type GalleryApplicationVersionOutput struct{ *pulumi.OutputState } func (GalleryApplicationVersionOutput) ElementType() reflect.Type { return reflect.TypeOf((**GalleryApplicationVersion)(nil)).Elem() } func (o GalleryApplicationVersionOutput) ToGalleryApplicationVersionOutput() GalleryApplicationVersionOutput { return o } func (o GalleryApplicationVersionOutput) ToGalleryApplicationVersionOutputWithContext(ctx context.Context) GalleryApplicationVersionOutput { return o } // Specifies the name of the config file on the VM. Changing this forces a new resource to be created. func (o GalleryApplicationVersionOutput) ConfigFile() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringPtrOutput { return v.ConfigFile }).(pulumi.StringPtrOutput) } // Should the Gallery Application reports health. Defaults to `false`. func (o GalleryApplicationVersionOutput) EnableHealthCheck() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.BoolPtrOutput { return v.EnableHealthCheck }).(pulumi.BoolPtrOutput) } // The end of life date in RFC3339 format of the Gallery Application Version. func (o GalleryApplicationVersionOutput) EndOfLifeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringPtrOutput { return v.EndOfLifeDate }).(pulumi.StringPtrOutput) } // Should the Gallery Application Version be excluded from the `latest` filter? If set to `true` this Gallery Application Version won't be returned for the `latest` version. Defaults to `false`. func (o GalleryApplicationVersionOutput) ExcludeFromLatest() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.BoolPtrOutput { return v.ExcludeFromLatest }).(pulumi.BoolPtrOutput) } // The ID of the Gallery Application. Changing this forces a new resource to be created. func (o GalleryApplicationVersionOutput) GalleryApplicationId() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringOutput { return v.GalleryApplicationId }).(pulumi.StringOutput) } // The Azure Region where the Gallery Application Version exists. Changing this forces a new resource to be created. func (o GalleryApplicationVersionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `manageAction` block as defined below. func (o GalleryApplicationVersionOutput) ManageAction() GalleryApplicationVersionManageActionOutput { return o.ApplyT(func(v *GalleryApplicationVersion) GalleryApplicationVersionManageActionOutput { return v.ManageAction }).(GalleryApplicationVersionManageActionOutput) } // The version name of the Gallery Application Version, such as `1.0.0`. Changing this forces a new resource to be created. func (o GalleryApplicationVersionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the package file on the VM. Changing this forces a new resource to be created. func (o GalleryApplicationVersionOutput) PackageFile() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringPtrOutput { return v.PackageFile }).(pulumi.StringPtrOutput) } // A `source` block as defined below. func (o GalleryApplicationVersionOutput) Source() GalleryApplicationVersionSourceOutput { return o.ApplyT(func(v *GalleryApplicationVersion) GalleryApplicationVersionSourceOutput { return v.Source }).(GalleryApplicationVersionSourceOutput) } // A mapping of tags to assign to the Gallery Application Version. func (o GalleryApplicationVersionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *GalleryApplicationVersion) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // One or more `targetRegion` blocks as defined below. func (o GalleryApplicationVersionOutput) TargetRegions() GalleryApplicationVersionTargetRegionArrayOutput { return o.ApplyT(func(v *GalleryApplicationVersion) GalleryApplicationVersionTargetRegionArrayOutput { return v.TargetRegions }).(GalleryApplicationVersionTargetRegionArrayOutput) } type GalleryApplicationVersionArrayOutput struct{ *pulumi.OutputState } func (GalleryApplicationVersionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*GalleryApplicationVersion)(nil)).Elem() } func (o GalleryApplicationVersionArrayOutput) ToGalleryApplicationVersionArrayOutput() GalleryApplicationVersionArrayOutput { return o } func (o GalleryApplicationVersionArrayOutput) ToGalleryApplicationVersionArrayOutputWithContext(ctx context.Context) GalleryApplicationVersionArrayOutput { return o } func (o GalleryApplicationVersionArrayOutput) Index(i pulumi.IntInput) GalleryApplicationVersionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GalleryApplicationVersion { return vs[0].([]*GalleryApplicationVersion)[vs[1].(int)] }).(GalleryApplicationVersionOutput) } type GalleryApplicationVersionMapOutput struct{ *pulumi.OutputState } func (GalleryApplicationVersionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GalleryApplicationVersion)(nil)).Elem() } func (o GalleryApplicationVersionMapOutput) ToGalleryApplicationVersionMapOutput() GalleryApplicationVersionMapOutput { return o } func (o GalleryApplicationVersionMapOutput) ToGalleryApplicationVersionMapOutputWithContext(ctx context.Context) GalleryApplicationVersionMapOutput { return o } func (o GalleryApplicationVersionMapOutput) MapIndex(k pulumi.StringInput) GalleryApplicationVersionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GalleryApplicationVersion { return vs[0].(map[string]*GalleryApplicationVersion)[vs[1].(string)] }).(GalleryApplicationVersionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationVersionInput)(nil)).Elem(), &GalleryApplicationVersion{}) pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationVersionArrayInput)(nil)).Elem(), GalleryApplicationVersionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationVersionMapInput)(nil)).Elem(), GalleryApplicationVersionMap{}) pulumi.RegisterOutputType(GalleryApplicationVersionOutput{}) pulumi.RegisterOutputType(GalleryApplicationVersionArrayOutput{}) pulumi.RegisterOutputType(GalleryApplicationVersionMapOutput{}) }
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/compute/implicitDataDiskFromSource.go
sdk/go/azure/compute/implicitDataDiskFromSource.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an implicit Data Disk of a Virtual Machine. // // > **Note:** The Implicit Data Disk will be deleted instantly after this resource is destroyed. If you want to detach this disk only, you may set `detachImplicitDataDiskOnDeletion` field to `true` within the `virtualMachine` block in the provider `features` block. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 { // cfg := config.New(ctx, "") // prefix := "example" // if param := cfg.Get("prefix"); param != "" { // prefix = param // } // vmName := fmt.Sprintf("%v-vm", prefix) // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.Sprintf("%v-resources", prefix), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // main, err := network.NewVirtualNetwork(ctx, "main", &network.VirtualNetworkArgs{ // Name: pulumi.Sprintf("%v-network", prefix), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: main.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // mainNetworkInterface, err := network.NewNetworkInterface(ctx, "main", &network.NetworkInterfaceArgs{ // Name: pulumi.Sprintf("%v-nic", prefix), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: internal.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = compute.NewVirtualMachine(ctx, "example", &compute.VirtualMachineArgs{ // Name: pulumi.String(vmName), // Location: example.Location, // ResourceGroupName: example.Name, // NetworkInterfaceIds: pulumi.StringArray{ // mainNetworkInterface.ID(), // }, // VmSize: pulumi.String("Standard_F2"), // StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{ // Name: pulumi.String("myosdisk1"), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // ManagedDiskType: pulumi.String("Standard_LRS"), // }, // OsProfile: &compute.VirtualMachineOsProfileArgs{ // ComputerName: pulumi.String(vmName), // AdminUsername: pulumi.String("testadmin"), // AdminPassword: pulumi.String("Password1234!"), // }, // OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(false), // }, // }) // if err != nil { // return err // } // exampleManagedDisk, err := compute.NewManagedDisk(ctx, "example", &compute.ManagedDiskArgs{ // Name: pulumi.Sprintf("%v-disk1", vmName), // Location: example.Location, // ResourceGroupName: example.Name, // StorageAccountType: pulumi.String("Standard_LRS"), // CreateOption: pulumi.String("Empty"), // DiskSizeGb: pulumi.Int(10), // }) // if err != nil { // return err // } // _, err = compute.NewSnapshot(ctx, "example", &compute.SnapshotArgs{ // Name: pulumi.Sprintf("%v-snapshot1", vmName), // Location: example.Location, // ResourceGroupName: example.Name, // CreateOption: pulumi.String("Copy"), // SourceUri: exampleManagedDisk.ID(), // }) // if err != nil { // return err // } // _, err = compute.NewImplicitDataDiskFromSource(ctx, "example", &compute.ImplicitDataDiskFromSourceArgs{ // Name: pulumi.Sprintf("%v-implicitdisk1", vmName), // VirtualMachineId: pulumi.Any(testAzurermVirtualMachine.Id), // Lun: pulumi.Int(0), // Caching: pulumi.String("None"), // CreateOption: pulumi.String("Copy"), // DiskSizeGb: pulumi.Int(20), // SourceResourceId: pulumi.Any(test.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.Compute` - 2024-03-01, 2023-04-02 // // ## Import // // The implicit Data Disk of the Virtual Machine can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/implicitDataDiskFromSource:ImplicitDataDiskFromSource example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/machine1/dataDisks/disk1 // ``` type ImplicitDataDiskFromSource struct { pulumi.CustomResourceState // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. Caching pulumi.StringPtrOutput `pulumi:"caching"` // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. CreateOption pulumi.StringOutput `pulumi:"createOption"` DiskSizeGb pulumi.IntOutput `pulumi:"diskSizeGb"` // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. Lun pulumi.IntOutput `pulumi:"lun"` // Specifies the name of this Data Disk. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. SourceResourceId pulumi.StringOutput `pulumi:"sourceResourceId"` // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. WriteAcceleratorEnabled pulumi.BoolPtrOutput `pulumi:"writeAcceleratorEnabled"` } // NewImplicitDataDiskFromSource registers a new resource with the given unique name, arguments, and options. func NewImplicitDataDiskFromSource(ctx *pulumi.Context, name string, args *ImplicitDataDiskFromSourceArgs, opts ...pulumi.ResourceOption) (*ImplicitDataDiskFromSource, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CreateOption == nil { return nil, errors.New("invalid value for required argument 'CreateOption'") } if args.DiskSizeGb == nil { return nil, errors.New("invalid value for required argument 'DiskSizeGb'") } if args.Lun == nil { return nil, errors.New("invalid value for required argument 'Lun'") } if args.SourceResourceId == nil { return nil, errors.New("invalid value for required argument 'SourceResourceId'") } if args.VirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ImplicitDataDiskFromSource err := ctx.RegisterResource("azure:compute/implicitDataDiskFromSource:ImplicitDataDiskFromSource", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetImplicitDataDiskFromSource gets an existing ImplicitDataDiskFromSource 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 GetImplicitDataDiskFromSource(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ImplicitDataDiskFromSourceState, opts ...pulumi.ResourceOption) (*ImplicitDataDiskFromSource, error) { var resource ImplicitDataDiskFromSource err := ctx.ReadResource("azure:compute/implicitDataDiskFromSource:ImplicitDataDiskFromSource", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ImplicitDataDiskFromSource resources. type implicitDataDiskFromSourceState struct { // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. Caching *string `pulumi:"caching"` // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. CreateOption *string `pulumi:"createOption"` DiskSizeGb *int `pulumi:"diskSizeGb"` // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. Lun *int `pulumi:"lun"` // Specifies the name of this Data Disk. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. SourceResourceId *string `pulumi:"sourceResourceId"` // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. VirtualMachineId *string `pulumi:"virtualMachineId"` // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. WriteAcceleratorEnabled *bool `pulumi:"writeAcceleratorEnabled"` } type ImplicitDataDiskFromSourceState struct { // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. Caching pulumi.StringPtrInput // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. CreateOption pulumi.StringPtrInput DiskSizeGb pulumi.IntPtrInput // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. Lun pulumi.IntPtrInput // Specifies the name of this Data Disk. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. SourceResourceId pulumi.StringPtrInput // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringPtrInput // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. WriteAcceleratorEnabled pulumi.BoolPtrInput } func (ImplicitDataDiskFromSourceState) ElementType() reflect.Type { return reflect.TypeOf((*implicitDataDiskFromSourceState)(nil)).Elem() } type implicitDataDiskFromSourceArgs struct { // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. Caching *string `pulumi:"caching"` // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. CreateOption string `pulumi:"createOption"` DiskSizeGb int `pulumi:"diskSizeGb"` // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. Lun int `pulumi:"lun"` // Specifies the name of this Data Disk. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. SourceResourceId string `pulumi:"sourceResourceId"` // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. VirtualMachineId string `pulumi:"virtualMachineId"` // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. WriteAcceleratorEnabled *bool `pulumi:"writeAcceleratorEnabled"` } // The set of arguments for constructing a ImplicitDataDiskFromSource resource. type ImplicitDataDiskFromSourceArgs struct { // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. Caching pulumi.StringPtrInput // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. CreateOption pulumi.StringInput DiskSizeGb pulumi.IntInput // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. Lun pulumi.IntInput // Specifies the name of this Data Disk. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. SourceResourceId pulumi.StringInput // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. VirtualMachineId pulumi.StringInput // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. WriteAcceleratorEnabled pulumi.BoolPtrInput } func (ImplicitDataDiskFromSourceArgs) ElementType() reflect.Type { return reflect.TypeOf((*implicitDataDiskFromSourceArgs)(nil)).Elem() } type ImplicitDataDiskFromSourceInput interface { pulumi.Input ToImplicitDataDiskFromSourceOutput() ImplicitDataDiskFromSourceOutput ToImplicitDataDiskFromSourceOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceOutput } func (*ImplicitDataDiskFromSource) ElementType() reflect.Type { return reflect.TypeOf((**ImplicitDataDiskFromSource)(nil)).Elem() } func (i *ImplicitDataDiskFromSource) ToImplicitDataDiskFromSourceOutput() ImplicitDataDiskFromSourceOutput { return i.ToImplicitDataDiskFromSourceOutputWithContext(context.Background()) } func (i *ImplicitDataDiskFromSource) ToImplicitDataDiskFromSourceOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceOutput { return pulumi.ToOutputWithContext(ctx, i).(ImplicitDataDiskFromSourceOutput) } // ImplicitDataDiskFromSourceArrayInput is an input type that accepts ImplicitDataDiskFromSourceArray and ImplicitDataDiskFromSourceArrayOutput values. // You can construct a concrete instance of `ImplicitDataDiskFromSourceArrayInput` via: // // ImplicitDataDiskFromSourceArray{ ImplicitDataDiskFromSourceArgs{...} } type ImplicitDataDiskFromSourceArrayInput interface { pulumi.Input ToImplicitDataDiskFromSourceArrayOutput() ImplicitDataDiskFromSourceArrayOutput ToImplicitDataDiskFromSourceArrayOutputWithContext(context.Context) ImplicitDataDiskFromSourceArrayOutput } type ImplicitDataDiskFromSourceArray []ImplicitDataDiskFromSourceInput func (ImplicitDataDiskFromSourceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ImplicitDataDiskFromSource)(nil)).Elem() } func (i ImplicitDataDiskFromSourceArray) ToImplicitDataDiskFromSourceArrayOutput() ImplicitDataDiskFromSourceArrayOutput { return i.ToImplicitDataDiskFromSourceArrayOutputWithContext(context.Background()) } func (i ImplicitDataDiskFromSourceArray) ToImplicitDataDiskFromSourceArrayOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ImplicitDataDiskFromSourceArrayOutput) } // ImplicitDataDiskFromSourceMapInput is an input type that accepts ImplicitDataDiskFromSourceMap and ImplicitDataDiskFromSourceMapOutput values. // You can construct a concrete instance of `ImplicitDataDiskFromSourceMapInput` via: // // ImplicitDataDiskFromSourceMap{ "key": ImplicitDataDiskFromSourceArgs{...} } type ImplicitDataDiskFromSourceMapInput interface { pulumi.Input ToImplicitDataDiskFromSourceMapOutput() ImplicitDataDiskFromSourceMapOutput ToImplicitDataDiskFromSourceMapOutputWithContext(context.Context) ImplicitDataDiskFromSourceMapOutput } type ImplicitDataDiskFromSourceMap map[string]ImplicitDataDiskFromSourceInput func (ImplicitDataDiskFromSourceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ImplicitDataDiskFromSource)(nil)).Elem() } func (i ImplicitDataDiskFromSourceMap) ToImplicitDataDiskFromSourceMapOutput() ImplicitDataDiskFromSourceMapOutput { return i.ToImplicitDataDiskFromSourceMapOutputWithContext(context.Background()) } func (i ImplicitDataDiskFromSourceMap) ToImplicitDataDiskFromSourceMapOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ImplicitDataDiskFromSourceMapOutput) } type ImplicitDataDiskFromSourceOutput struct{ *pulumi.OutputState } func (ImplicitDataDiskFromSourceOutput) ElementType() reflect.Type { return reflect.TypeOf((**ImplicitDataDiskFromSource)(nil)).Elem() } func (o ImplicitDataDiskFromSourceOutput) ToImplicitDataDiskFromSourceOutput() ImplicitDataDiskFromSourceOutput { return o } func (o ImplicitDataDiskFromSourceOutput) ToImplicitDataDiskFromSourceOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceOutput { return o } // Specifies the caching requirements for this Data Disk. Possible values are `ReadOnly` and `ReadWrite`. func (o ImplicitDataDiskFromSourceOutput) Caching() pulumi.StringPtrOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.StringPtrOutput { return v.Caching }).(pulumi.StringPtrOutput) } // Specifies the Create Option of the Data Disk. The only possible value is `Copy`. Changing this forces a new resource to be created. func (o ImplicitDataDiskFromSourceOutput) CreateOption() pulumi.StringOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.StringOutput { return v.CreateOption }).(pulumi.StringOutput) } func (o ImplicitDataDiskFromSourceOutput) DiskSizeGb() pulumi.IntOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.IntOutput { return v.DiskSizeGb }).(pulumi.IntOutput) } // The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine. Changing this forces a new resource to be created. func (o ImplicitDataDiskFromSourceOutput) Lun() pulumi.IntOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.IntOutput { return v.Lun }).(pulumi.IntOutput) } // Specifies the name of this Data Disk. Changing this forces a new resource to be created. func (o ImplicitDataDiskFromSourceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the source resource which this Data Disk was created from. Changing this forces a new resource to be created. func (o ImplicitDataDiskFromSourceOutput) SourceResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.StringOutput { return v.SourceResourceId }).(pulumi.StringOutput) } // The ID of the Virtual Machine to which the Data Disk should be attached. Changing this forces a new resource to be created. func (o ImplicitDataDiskFromSourceOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput) } // Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`. func (o ImplicitDataDiskFromSourceOutput) WriteAcceleratorEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ImplicitDataDiskFromSource) pulumi.BoolPtrOutput { return v.WriteAcceleratorEnabled }).(pulumi.BoolPtrOutput) } type ImplicitDataDiskFromSourceArrayOutput struct{ *pulumi.OutputState } func (ImplicitDataDiskFromSourceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ImplicitDataDiskFromSource)(nil)).Elem() } func (o ImplicitDataDiskFromSourceArrayOutput) ToImplicitDataDiskFromSourceArrayOutput() ImplicitDataDiskFromSourceArrayOutput { return o } func (o ImplicitDataDiskFromSourceArrayOutput) ToImplicitDataDiskFromSourceArrayOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceArrayOutput { return o } func (o ImplicitDataDiskFromSourceArrayOutput) Index(i pulumi.IntInput) ImplicitDataDiskFromSourceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ImplicitDataDiskFromSource { return vs[0].([]*ImplicitDataDiskFromSource)[vs[1].(int)] }).(ImplicitDataDiskFromSourceOutput) } type ImplicitDataDiskFromSourceMapOutput struct{ *pulumi.OutputState } func (ImplicitDataDiskFromSourceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ImplicitDataDiskFromSource)(nil)).Elem() } func (o ImplicitDataDiskFromSourceMapOutput) ToImplicitDataDiskFromSourceMapOutput() ImplicitDataDiskFromSourceMapOutput { return o } func (o ImplicitDataDiskFromSourceMapOutput) ToImplicitDataDiskFromSourceMapOutputWithContext(ctx context.Context) ImplicitDataDiskFromSourceMapOutput { return o } func (o ImplicitDataDiskFromSourceMapOutput) MapIndex(k pulumi.StringInput) ImplicitDataDiskFromSourceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ImplicitDataDiskFromSource { return vs[0].(map[string]*ImplicitDataDiskFromSource)[vs[1].(string)] }).(ImplicitDataDiskFromSourceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ImplicitDataDiskFromSourceInput)(nil)).Elem(), &ImplicitDataDiskFromSource{}) pulumi.RegisterInputType(reflect.TypeOf((*ImplicitDataDiskFromSourceArrayInput)(nil)).Elem(), ImplicitDataDiskFromSourceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ImplicitDataDiskFromSourceMapInput)(nil)).Elem(), ImplicitDataDiskFromSourceMap{}) pulumi.RegisterOutputType(ImplicitDataDiskFromSourceOutput{}) pulumi.RegisterOutputType(ImplicitDataDiskFromSourceArrayOutput{}) pulumi.RegisterOutputType(ImplicitDataDiskFromSourceMapOutput{}) }
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/compute/orchestratedVirtualMachineScaleSet.go
sdk/go/azure/compute/orchestratedVirtualMachineScaleSet.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Virtual Machine Scale Set in Flexible Orchestration Mode. // // ## Disclaimers // // > **Note:** As of the **v2.86.0** (November 19, 2021) release of the provider this resource will only create Virtual Machine Scale Sets with the **Flexible** Orchestration Mode. // // > **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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 = compute.NewOrchestratedVirtualMachineScaleSet(ctx, "example", &compute.OrchestratedVirtualMachineScaleSetArgs{ // Name: pulumi.String("example-VMSS"), // Location: example.Location, // ResourceGroupName: example.Name, // PlatformFaultDomainCount: pulumi.Int(1), // Zones: pulumi.StringArray{ // pulumi.String("1"), // }, // }) // 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.Compute` - 2024-11-01 // // ## Import // // An Virtual Machine Scale Set can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/orchestratedVirtualMachineScaleSet:OrchestratedVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1 // ``` type OrchestratedVirtualMachineScaleSet struct { pulumi.CustomResourceState // An `additionalCapabilities` block as defined below. AdditionalCapabilities OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesPtrOutput `pulumi:"additionalCapabilities"` // An `automaticInstanceRepair` block as defined below. // // > **Note:** To enable the `automaticInstanceRepair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension). AutomaticInstanceRepair OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairOutput `pulumi:"automaticInstanceRepair"` // A `bootDiagnostics` block as defined below. BootDiagnostics OrchestratedVirtualMachineScaleSetBootDiagnosticsPtrOutput `pulumi:"bootDiagnostics"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created. // // > **Note:** `capacityReservationGroupId` cannot be specified with `proximityPlacementGroupId` // // > **Note:** If `capacityReservationGroupId` is specified the `singlePlacementGroup` must be set to `false`. CapacityReservationGroupId pulumi.StringPtrOutput `pulumi:"capacityReservationGroupId"` // One or more `dataDisk` blocks as defined below. DataDisks OrchestratedVirtualMachineScaleSetDataDiskArrayOutput `pulumi:"dataDisks"` // Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled pulumi.BoolPtrOutput `pulumi:"encryptionAtHostEnabled"` // The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. EvictionPolicy pulumi.StringPtrOutput `pulumi:"evictionPolicy"` // Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created. // // > **Note:** `extensionOperationsEnabled` may only be set to `false` if there are no extensions defined in the `extension` field. ExtensionOperationsEnabled pulumi.BoolPtrOutput `pulumi:"extensionOperationsEnabled"` // One or more `extension` blocks as defined below Extensions OrchestratedVirtualMachineScaleSetExtensionArrayOutput `pulumi:"extensions"` // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget pulumi.StringPtrOutput `pulumi:"extensionsTimeBudget"` // An `identity` block as defined below. Identity OrchestratedVirtualMachineScaleSetIdentityPtrOutput `pulumi:"identity"` // The number of Virtual Machines in the Virtual Machine Scale Set. Instances pulumi.IntOutput `pulumi:"instances"` // Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` // The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons. MaxBidPrice pulumi.Float64PtrOutput `pulumi:"maxBidPrice"` // The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set. Possible values are `2020-11-01` and `2022-11-01`. Defaults to `2020-11-01`. NetworkApiVersion pulumi.StringPtrOutput `pulumi:"networkApiVersion"` // One or more `networkInterface` blocks as defined below. NetworkInterfaces OrchestratedVirtualMachineScaleSetNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"` // An `osDisk` block as defined below. OsDisk OrchestratedVirtualMachineScaleSetOsDiskPtrOutput `pulumi:"osDisk"` // An `osProfile` block as defined below. OsProfile OrchestratedVirtualMachineScaleSetOsProfilePtrOutput `pulumi:"osProfile"` // A `plan` block as documented below. Changing this forces a new resource to be created. Plan OrchestratedVirtualMachineScaleSetPlanPtrOutput `pulumi:"plan"` // Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount pulumi.IntOutput `pulumi:"platformFaultDomainCount"` // The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource. Priority pulumi.StringPtrOutput `pulumi:"priority"` // a `priorityMix` block as defined below PriorityMix OrchestratedVirtualMachineScaleSetPriorityMixPtrOutput `pulumi:"priorityMix"` // The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"proximityPlacementGroupId"` // The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `rollingUpgradePolicy` block as defined below. This is Required when `upgradeMode` is set to `Rolling` and cannot be specified when `upgradeMode` is set to `Manual`. Changing this forces a new resource to be created. RollingUpgradePolicy OrchestratedVirtualMachineScaleSetRollingUpgradePolicyPtrOutput `pulumi:"rollingUpgradePolicy"` // Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`. // // > **Note:** `singlePlacementGroup` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `singlePlacementGroup` field in your configuration file as the service will determine what this value should be based off of the value contained within the `skuName` field of your configuration file. You may set the `singlePlacementGroup` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`. SinglePlacementGroup pulumi.BoolOutput `pulumi:"singlePlacementGroup"` // The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs. SkuName pulumi.StringPtrOutput `pulumi:"skuName"` // An `skuProfile` block as defined below. Changing this forces a new resource to be created. // // > **Note:** If `skuProfile` is specified the `skuName` must be set to `Mix`. SkuProfile OrchestratedVirtualMachineScaleSetSkuProfilePtrOutput `pulumi:"skuProfile"` // The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s. SourceImageId pulumi.StringPtrOutput `pulumi:"sourceImageId"` // A `sourceImageReference` block as defined below. SourceImageReference OrchestratedVirtualMachineScaleSetSourceImageReferencePtrOutput `pulumi:"sourceImageReference"` // A mapping of tags which should be assigned to this Virtual Machine Scale Set. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `terminationNotification` block as defined below. TerminationNotification OrchestratedVirtualMachineScaleSetTerminationNotificationOutput `pulumi:"terminationNotification"` // The Unique ID for the Virtual Machine Scale Set. UniqueId pulumi.StringOutput `pulumi:"uniqueId"` // Specifies how upgrades (e.g. changing the Image/SKU) should be performed to Virtual Machine Instances. Possible values are `Automatic`, `Manual` and `Rolling`. Defaults to `Manual`. Changing this forces a new resource to be created. UpgradeMode pulumi.StringPtrOutput `pulumi:"upgradeMode"` // The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set. UserDataBase64 pulumi.StringPtrOutput `pulumi:"userDataBase64"` // Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** This can only be set to `true` when one or more `zones` are configured. ZoneBalance pulumi.BoolPtrOutput `pulumi:"zoneBalance"` // Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances. // // > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewOrchestratedVirtualMachineScaleSet registers a new resource with the given unique name, arguments, and options. func NewOrchestratedVirtualMachineScaleSet(ctx *pulumi.Context, name string, args *OrchestratedVirtualMachineScaleSetArgs, opts ...pulumi.ResourceOption) (*OrchestratedVirtualMachineScaleSet, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PlatformFaultDomainCount == nil { return nil, errors.New("invalid value for required argument 'PlatformFaultDomainCount'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.UserDataBase64 != nil { args.UserDataBase64 = pulumi.ToSecret(args.UserDataBase64).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "userDataBase64", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource OrchestratedVirtualMachineScaleSet err := ctx.RegisterResource("azure:compute/orchestratedVirtualMachineScaleSet:OrchestratedVirtualMachineScaleSet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetOrchestratedVirtualMachineScaleSet gets an existing OrchestratedVirtualMachineScaleSet 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 GetOrchestratedVirtualMachineScaleSet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *OrchestratedVirtualMachineScaleSetState, opts ...pulumi.ResourceOption) (*OrchestratedVirtualMachineScaleSet, error) { var resource OrchestratedVirtualMachineScaleSet err := ctx.ReadResource("azure:compute/orchestratedVirtualMachineScaleSet:OrchestratedVirtualMachineScaleSet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering OrchestratedVirtualMachineScaleSet resources. type orchestratedVirtualMachineScaleSetState struct { // An `additionalCapabilities` block as defined below. AdditionalCapabilities *OrchestratedVirtualMachineScaleSetAdditionalCapabilities `pulumi:"additionalCapabilities"` // An `automaticInstanceRepair` block as defined below. // // > **Note:** To enable the `automaticInstanceRepair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension). AutomaticInstanceRepair *OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair `pulumi:"automaticInstanceRepair"` // A `bootDiagnostics` block as defined below. BootDiagnostics *OrchestratedVirtualMachineScaleSetBootDiagnostics `pulumi:"bootDiagnostics"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created. // // > **Note:** `capacityReservationGroupId` cannot be specified with `proximityPlacementGroupId` // // > **Note:** If `capacityReservationGroupId` is specified the `singlePlacementGroup` must be set to `false`. CapacityReservationGroupId *string `pulumi:"capacityReservationGroupId"` // One or more `dataDisk` blocks as defined below. DataDisks []OrchestratedVirtualMachineScaleSetDataDisk `pulumi:"dataDisks"` // Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled *bool `pulumi:"encryptionAtHostEnabled"` // The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. EvictionPolicy *string `pulumi:"evictionPolicy"` // Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created. // // > **Note:** `extensionOperationsEnabled` may only be set to `false` if there are no extensions defined in the `extension` field. ExtensionOperationsEnabled *bool `pulumi:"extensionOperationsEnabled"` // One or more `extension` blocks as defined below Extensions []OrchestratedVirtualMachineScaleSetExtension `pulumi:"extensions"` // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget *string `pulumi:"extensionsTimeBudget"` // An `identity` block as defined below. Identity *OrchestratedVirtualMachineScaleSetIdentity `pulumi:"identity"` // The number of Virtual Machines in the Virtual Machine Scale Set. Instances *int `pulumi:"instances"` // Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType *string `pulumi:"licenseType"` // The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons. MaxBidPrice *float64 `pulumi:"maxBidPrice"` // The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set. Possible values are `2020-11-01` and `2022-11-01`. Defaults to `2020-11-01`. NetworkApiVersion *string `pulumi:"networkApiVersion"` // One or more `networkInterface` blocks as defined below. NetworkInterfaces []OrchestratedVirtualMachineScaleSetNetworkInterface `pulumi:"networkInterfaces"` // An `osDisk` block as defined below. OsDisk *OrchestratedVirtualMachineScaleSetOsDisk `pulumi:"osDisk"` // An `osProfile` block as defined below. OsProfile *OrchestratedVirtualMachineScaleSetOsProfile `pulumi:"osProfile"` // A `plan` block as documented below. Changing this forces a new resource to be created. Plan *OrchestratedVirtualMachineScaleSetPlan `pulumi:"plan"` // Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount *int `pulumi:"platformFaultDomainCount"` // The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource. Priority *string `pulumi:"priority"` // a `priorityMix` block as defined below PriorityMix *OrchestratedVirtualMachineScaleSetPriorityMix `pulumi:"priorityMix"` // The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created. ProximityPlacementGroupId *string `pulumi:"proximityPlacementGroupId"` // The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `rollingUpgradePolicy` block as defined below. This is Required when `upgradeMode` is set to `Rolling` and cannot be specified when `upgradeMode` is set to `Manual`. Changing this forces a new resource to be created. RollingUpgradePolicy *OrchestratedVirtualMachineScaleSetRollingUpgradePolicy `pulumi:"rollingUpgradePolicy"` // Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`. // // > **Note:** `singlePlacementGroup` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `singlePlacementGroup` field in your configuration file as the service will determine what this value should be based off of the value contained within the `skuName` field of your configuration file. You may set the `singlePlacementGroup` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`. SinglePlacementGroup *bool `pulumi:"singlePlacementGroup"` // The `name` of the SKU to be used by this Virtual Machine Scale Set. Valid values include: any of the [General purpose](https://docs.microsoft.com/azure/virtual-machines/sizes-general), [Compute optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-compute), [Memory optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-memory), [Storage optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-storage), [GPU optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-gpu), [FPGA optimized](https://docs.microsoft.com/azure/virtual-machines/sizes-field-programmable-gate-arrays), [High performance](https://docs.microsoft.com/azure/virtual-machines/sizes-hpc), or [Previous generation](https://docs.microsoft.com/azure/virtual-machines/sizes-previous-gen) virtual machine SKUs. SkuName *string `pulumi:"skuName"` // An `skuProfile` block as defined below. Changing this forces a new resource to be created. // // > **Note:** If `skuProfile` is specified the `skuName` must be set to `Mix`. SkuProfile *OrchestratedVirtualMachineScaleSetSkuProfile `pulumi:"skuProfile"` // The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s. SourceImageId *string `pulumi:"sourceImageId"` // A `sourceImageReference` block as defined below. SourceImageReference *OrchestratedVirtualMachineScaleSetSourceImageReference `pulumi:"sourceImageReference"` // A mapping of tags which should be assigned to this Virtual Machine Scale Set. Tags map[string]string `pulumi:"tags"` // A `terminationNotification` block as defined below. TerminationNotification *OrchestratedVirtualMachineScaleSetTerminationNotification `pulumi:"terminationNotification"` // The Unique ID for the Virtual Machine Scale Set. UniqueId *string `pulumi:"uniqueId"` // Specifies how upgrades (e.g. changing the Image/SKU) should be performed to Virtual Machine Instances. Possible values are `Automatic`, `Manual` and `Rolling`. Defaults to `Manual`. Changing this forces a new resource to be created. UpgradeMode *string `pulumi:"upgradeMode"` // The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set. UserDataBase64 *string `pulumi:"userDataBase64"` // Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** This can only be set to `true` when one or more `zones` are configured. ZoneBalance *bool `pulumi:"zoneBalance"` // Specifies a list of Availability Zones across which the Virtual Machine Scale Set will create instances. // // > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } type OrchestratedVirtualMachineScaleSetState struct { // An `additionalCapabilities` block as defined below. AdditionalCapabilities OrchestratedVirtualMachineScaleSetAdditionalCapabilitiesPtrInput // An `automaticInstanceRepair` block as defined below. // // > **Note:** To enable the `automaticInstanceRepair`, the Orchestrated Virtual Machine Scale Set must have a valid [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension). AutomaticInstanceRepair OrchestratedVirtualMachineScaleSetAutomaticInstanceRepairPtrInput // A `bootDiagnostics` block as defined below. BootDiagnostics OrchestratedVirtualMachineScaleSetBootDiagnosticsPtrInput // Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created. // // > **Note:** `capacityReservationGroupId` cannot be specified with `proximityPlacementGroupId` // // > **Note:** If `capacityReservationGroupId` is specified the `singlePlacementGroup` must be set to `false`. CapacityReservationGroupId pulumi.StringPtrInput // One or more `dataDisk` blocks as defined below. DataDisks OrchestratedVirtualMachineScaleSetDataDiskArrayInput // Should disks attached to this Virtual Machine Scale Set be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled pulumi.BoolPtrInput // The Policy which should be used by Spot Virtual Machines that are Evicted from the Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. EvictionPolicy pulumi.StringPtrInput // Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Virtual Machine Scale Set to be created. // // > **Note:** `extensionOperationsEnabled` may only be set to `false` if there are no extensions defined in the `extension` field. ExtensionOperationsEnabled pulumi.BoolPtrInput // One or more `extension` blocks as defined below Extensions OrchestratedVirtualMachineScaleSetExtensionArrayInput // Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget pulumi.StringPtrInput // An `identity` block as defined below. Identity OrchestratedVirtualMachineScaleSetIdentityPtrInput // The number of Virtual Machines in the Virtual Machine Scale Set. Instances pulumi.IntPtrInput // Specifies the type of on-premise license (also known as Azure Hybrid Use Benefit) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType pulumi.StringPtrInput // The Azure location where the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the eviction_policy. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons. MaxBidPrice pulumi.Float64PtrInput // The name of the Virtual Machine Scale Set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set. Possible values are `2020-11-01` and `2022-11-01`. Defaults to `2020-11-01`. NetworkApiVersion pulumi.StringPtrInput // One or more `networkInterface` blocks as defined below. NetworkInterfaces OrchestratedVirtualMachineScaleSetNetworkInterfaceArrayInput // An `osDisk` block as defined below. OsDisk OrchestratedVirtualMachineScaleSetOsDiskPtrInput // An `osProfile` block as defined below. OsProfile OrchestratedVirtualMachineScaleSetOsProfilePtrInput // A `plan` block as documented below. Changing this forces a new resource to be created. Plan OrchestratedVirtualMachineScaleSetPlanPtrInput // Specifies the number of fault domains that are used by this Virtual Machine Scale Set. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount pulumi.IntPtrInput // The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource. Priority pulumi.StringPtrInput // a `priorityMix` block as defined below PriorityMix OrchestratedVirtualMachineScaleSetPriorityMixPtrInput // The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrInput // The name of the Resource Group in which the Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `rollingUpgradePolicy` block as defined below. This is Required when `upgradeMode` is set to `Rolling` and cannot be specified when `upgradeMode` is set to `Manual`. Changing this forces a new resource to be created. RollingUpgradePolicy OrchestratedVirtualMachineScaleSetRollingUpgradePolicyPtrInput // Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Possible values are `true` or `false`. // // > **Note:** `singlePlacementGroup` behaves differently for Flexible orchestration Virtual Machine Scale Sets than it does for Uniform orchestration Virtual Machine Scale Sets. It is recommended that you do not define the `singlePlacementGroup` field in your configuration file as the service will determine what this value should be based off of the value contained within the `skuName` field of your configuration file. You may set the `singlePlacementGroup` field to `true`, however once you set it to `false` you will not be able to revert it back to `true`. SinglePlacementGroup pulumi.BoolPtrInput
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/compute/windowsVirtualMachineScaleSet.go
sdk/go/azure/compute/windowsVirtualMachineScaleSet.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Windows Virtual Machine Scale Set. // // ## Disclaimers // // > **Note:** This resource will only create Virtual Machine Scale Sets with the **Uniform** Orchestration Mode. For Virtual Machine Scale Sets with **Flexible** orchestration mode, use `compute.OrchestratedVirtualMachineScaleSet`. Flexible orchestration mode is recommended for workloads on Azure. // // > **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about [sensitive data](https://www.terraform.io/docs/state/sensitive-data.html) in state. // // > **Note:** This provider will automatically update & reimage the nodes in the Scale Set (if Required) during an Update - this behaviour can be configured using the `features` setting within the Provider block. // // > **Note:** This resource does not support Unmanaged Disks. If you need to use Unmanaged Disks you can continue to use the `compute.ScaleSet` resource instead. // // ## Example Usage // // This example provisions a basic Windows Virtual Machine Scale Set on an internal network. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // ResourceGroupName: example.Name, // Location: example.Location, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // _, err = compute.NewWindowsVirtualMachineScaleSet(ctx, "example", &compute.WindowsVirtualMachineScaleSetArgs{ // Name: pulumi.String("example-vmss"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard_F2"), // Instances: pulumi.Int(1), // AdminPassword: pulumi.String("P@55w0rd1234!"), // AdminUsername: pulumi.String("adminuser"), // ComputerNamePrefix: pulumi.String("vm-"), // SourceImageReference: &compute.WindowsVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("MicrosoftWindowsServer"), // Offer: pulumi.String("WindowsServer"), // Sku: pulumi.String("2016-Datacenter-Server-Core"), // Version: pulumi.String("latest"), // }, // OsDisk: &compute.WindowsVirtualMachineScaleSetOsDiskArgs{ // StorageAccountType: pulumi.String("Standard_LRS"), // Caching: pulumi.String("ReadWrite"), // }, // NetworkInterfaces: compute.WindowsVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.WindowsVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("example"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.WindowsVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // Primary: pulumi.Bool(true), // SubnetId: internal.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.Compute` - 2024-11-01 // // ## Import // // Windows Virtual Machine Scale Sets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1 // ``` type WindowsVirtualMachineScaleSet struct { pulumi.CustomResourceState // An `additionalCapabilities` block as defined below. AdditionalCapabilities WindowsVirtualMachineScaleSetAdditionalCapabilitiesPtrOutput `pulumi:"additionalCapabilities"` // One or more `additionalUnattendContent` blocks as defined below. Changing this forces a new resource to be created. AdditionalUnattendContents WindowsVirtualMachineScaleSetAdditionalUnattendContentArrayOutput `pulumi:"additionalUnattendContents"` // The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. AdminPassword pulumi.StringOutput `pulumi:"adminPassword"` // The username of the local administrator on each Virtual Machine Scale Set instance. Changing this forces a new resource to be created. AdminUsername pulumi.StringOutput `pulumi:"adminUsername"` // An `automaticInstanceRepair` block as defined below. To enable the automatic instance repair, this Virtual Machine Scale Set must have a valid `healthProbeId` or an [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension). // // > **Note:** For more information about Automatic Instance Repair, please refer to [this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-instance-repairs). AutomaticInstanceRepair WindowsVirtualMachineScaleSetAutomaticInstanceRepairOutput `pulumi:"automaticInstanceRepair"` // An `automaticOsUpgradePolicy` block as defined below. This can only be specified when `upgradeMode` is set to either `Automatic` or `Rolling`. AutomaticOsUpgradePolicy WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicyPtrOutput `pulumi:"automaticOsUpgradePolicy"` // A `bootDiagnostics` block as defined below. BootDiagnostics WindowsVirtualMachineScaleSetBootDiagnosticsPtrOutput `pulumi:"bootDiagnostics"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created. // // > **Note:** `capacityReservationGroupId` cannot be used with `proximityPlacementGroupId` // // > **Note:** `singlePlacementGroup` must be set to `false` when `capacityReservationGroupId` is specified. CapacityReservationGroupId pulumi.StringPtrOutput `pulumi:"capacityReservationGroupId"` // The prefix which should be used for the name of the Virtual Machines in this Scale Set. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computerNamePrefix`, then you must specify `computerNamePrefix`. Changing this forces a new resource to be created. ComputerNamePrefix pulumi.StringOutput `pulumi:"computerNamePrefix"` // The Base64-Encoded Custom Data which should be used for this Virtual Machine Scale Set. // // > **Note:** When Custom Data has been configured, it's not possible to remove it without tainting the Virtual Machine Scale Set, due to a limitation of the Azure API. CustomData pulumi.StringPtrOutput `pulumi:"customData"` // One or more `dataDisk` blocks as defined below. DataDisks WindowsVirtualMachineScaleSetDataDiskArrayOutput `pulumi:"dataDisks"` // Should Virtual Machine Extensions be run on Overprovisioned Virtual Machines in the Scale Set? Defaults to `false`. DoNotRunExtensionsOnOverprovisionedMachines pulumi.BoolPtrOutput `pulumi:"doNotRunExtensionsOnOverprovisionedMachines"` // Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine Scale Set should exist. Changing this forces a new Windows Virtual Machine Scale Set to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // Are automatic updates enabled for this Virtual Machine? Defaults to `true`. EnableAutomaticUpdates pulumi.BoolPtrOutput `pulumi:"enableAutomaticUpdates"` // Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled pulumi.BoolPtrOutput `pulumi:"encryptionAtHostEnabled"` // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **Note:** This can only be configured when `priority` is set to `Spot`. EvictionPolicy pulumi.StringPtrOutput `pulumi:"evictionPolicy"` // Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Windows Virtual Machine Scale Set to be created. // // > **Note:** `extensionOperationsEnabled` may only be set to `false` if there are no extensions defined in the `extension` field. ExtensionOperationsEnabled pulumi.BoolPtrOutput `pulumi:"extensionOperationsEnabled"` // One or more `extension` blocks as defined below Extensions WindowsVirtualMachineScaleSetExtensionArrayOutput `pulumi:"extensions"` // Specifies the duration allocated for all extensions to start. The time duration should be between `15` minutes and `120` minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget pulumi.StringPtrOutput `pulumi:"extensionsTimeBudget"` // One or more `galleryApplication` blocks as defined below. GalleryApplications WindowsVirtualMachineScaleSetGalleryApplicationArrayOutput `pulumi:"galleryApplications"` // The ID of a Load Balancer Probe which should be used to determine the health of an instance. This is Required and can only be specified when `upgradeMode` is set to `Automatic` or `Rolling`. HealthProbeId pulumi.StringPtrOutput `pulumi:"healthProbeId"` // Specifies the ID of the dedicated host group that the virtual machine scale set resides in. Changing this forces a new resource to be created. HostGroupId pulumi.StringPtrOutput `pulumi:"hostGroupId"` // An `identity` block as defined below. Identity WindowsVirtualMachineScaleSetIdentityPtrOutput `pulumi:"identity"` // The number of Virtual Machines in the Scale Set. // // > **NOTE:** If you're using AutoScaling, you may wish to use [`Ignore Changes` functionality](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) to ignore changes to this field. Instances pulumi.IntOutput `pulumi:"instances"` // Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing)) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` // The Azure location where the Windows Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the `evictionPolicy`. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons. // // > **Note:** This can only be configured when `priority` is set to `Spot`. MaxBidPrice pulumi.Float64PtrOutput `pulumi:"maxBidPrice"` // The name of the Windows Virtual Machine Scale Set. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `networkInterface` blocks as defined below. NetworkInterfaces WindowsVirtualMachineScaleSetNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"` // An `osDisk` block as defined below. OsDisk WindowsVirtualMachineScaleSetOsDiskOutput `pulumi:"osDisk"` // Should Azure over-provision Virtual Machines in this Scale Set? This means that multiple Virtual Machines will be provisioned and Azure will keep the instances which become available first - which improves provisioning success rates and improves deployment time. You're not billed for these over-provisioned VM's and they don't count towards the Subscription Quota. Defaults to `true`. Overprovision pulumi.BoolPtrOutput `pulumi:"overprovision"` // A `plan` block as defined below. Changing this forces a new resource to be created. // // > **Note:** When using an image from Azure Marketplace a `plan` must be specified. Plan WindowsVirtualMachineScaleSetPlanPtrOutput `pulumi:"plan"` // Specifies the number of fault domains that are used by this Linux Virtual Machine Scale Set. Changing this forces a new resource to be created. PlatformFaultDomainCount pulumi.IntOutput `pulumi:"platformFaultDomainCount"` // The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource. // // > **Note:** When `priority` is set to `Spot` an `evictionPolicy` must be specified. Priority pulumi.StringPtrOutput `pulumi:"priority"` // Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults to `true`. Changing this value forces a new resource to be created. ProvisionVmAgent pulumi.BoolPtrOutput `pulumi:"provisionVmAgent"` // The ID of the Proximity Placement Group in which the Virtual Machine Scale Set should be assigned to. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"proximityPlacementGroupId"` // Should resilient VM creation be enabled? When enabled, the service will attempt to create VMs in alternative fault domains or zones if the primary location fails during creation. Defaults to `false`. // // > **Note:** `resilientVmCreationEnabled` is currently not supported in the `austriaeast`, `belgiumcentral`, `centraluseuap`, `chilecentral`, `indonesiacentral`, `israelnorthwest`, `malaysiawest`, `mexicocentral`, `newzealandnorth`, `southcentralus2`, `southindia`, `southeastus3`, `southwestus`, `eastasia`, `eastus`, `southcentralus`, `southeastasia`, and `westeurope` regions. ResilientVmCreationEnabled pulumi.BoolPtrOutput `pulumi:"resilientVmCreationEnabled"` // Should resilient VM deletion be enabled? When enabled, the service will use a more resilient deletion process that attempts to gracefully handle failures during VM termination. Defaults to `false`. // // > **Note:** `resilientVmDeletionEnabled` is currently not supported in the `austriaeast`, `belgiumcentral`, `centraluseuap`, `chilecentral`, `indonesiacentral`, `israelnorthwest`, `malaysiawest`, `mexicocentral`, `newzealandnorth`, `southcentralus2`, `southindia`, `southeastus3`, `southwestus`, `eastasia`, `eastus`, `southcentralus`, `southeastasia`, and `westeurope` regions. ResilientVmDeletionEnabled pulumi.BoolPtrOutput `pulumi:"resilientVmDeletionEnabled"` // The name of the Resource Group in which the Windows Virtual Machine Scale Set should be exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `rollingUpgradePolicy` block as defined below. This is Required and can only be specified when `upgradeMode` is set to `Automatic` or `Rolling`. Changing this forces a new resource to be created. RollingUpgradePolicy WindowsVirtualMachineScaleSetRollingUpgradePolicyPtrOutput `pulumi:"rollingUpgradePolicy"` // A `scaleIn` block as defined below. ScaleIn WindowsVirtualMachineScaleSetScaleInPtrOutput `pulumi:"scaleIn"` // One or more `secret` blocks as defined below. Secrets WindowsVirtualMachineScaleSetSecretArrayOutput `pulumi:"secrets"` // Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created. SecureBootEnabled pulumi.BoolPtrOutput `pulumi:"secureBootEnabled"` // Should this Virtual Machine Scale Set be limited to a Single Placement Group, which means the number of instances will be capped at 100 Virtual Machines. Defaults to `true`. SinglePlacementGroup pulumi.BoolPtrOutput `pulumi:"singlePlacementGroup"` // The Virtual Machine SKU for the Scale Set, such as `Standard_F2`. Sku pulumi.StringOutput `pulumi:"sku"` // The ID of an Image which each Virtual Machine in this Scale Set should be based on. Possible Image ID types include `Image ID`, `Shared Image ID`, `Shared Image Version ID`, `Community Gallery Image ID`, `Community Gallery Image Version ID`, `Shared Gallery Image ID` and `Shared Gallery Image Version ID`. // // > **Note:** One of either `sourceImageId` or `sourceImageReference` must be set. SourceImageId pulumi.StringPtrOutput `pulumi:"sourceImageId"` // A `sourceImageReference` block as defined below. // // > **Note:** One of either `sourceImageId` or `sourceImageReference` must be set. SourceImageReference WindowsVirtualMachineScaleSetSourceImageReferencePtrOutput `pulumi:"sourceImageReference"` // A `spotRestore` block as defined below. SpotRestore WindowsVirtualMachineScaleSetSpotRestoreOutput `pulumi:"spotRestore"` // A mapping of tags which should be assigned to this Virtual Machine Scale Set. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `terminationNotification` block as defined below. TerminationNotification WindowsVirtualMachineScaleSetTerminationNotificationOutput `pulumi:"terminationNotification"` // Specifies the time zone of the virtual machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Timezone pulumi.StringPtrOutput `pulumi:"timezone"` // The Unique ID for this Windows Virtual Machine Scale Set. UniqueId pulumi.StringOutput `pulumi:"uniqueId"` UpgradeMode pulumi.StringPtrOutput `pulumi:"upgradeMode"` // The Base64-Encoded User Data which should be used for this Virtual Machine Scale Set. UserData pulumi.StringPtrOutput `pulumi:"userData"` // Specifies if vTPM (Virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created. VtpmEnabled pulumi.BoolPtrOutput `pulumi:"vtpmEnabled"` // One or more `winrmListener` blocks as defined below. Changing this forces a new resource to be created. WinrmListeners WindowsVirtualMachineScaleSetWinrmListenerArrayOutput `pulumi:"winrmListeners"` // Should the Virtual Machines in this Scale Set be strictly evenly distributed across Availability Zones? Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** This can only be set to `true` when one or more `zones` are configured. ZoneBalance pulumi.BoolPtrOutput `pulumi:"zoneBalance"` // Specifies a list of Availability Zones in which this Windows Virtual Machine Scale Set should be located. // // > **Note:** Updating `zones` to remove an existing zone forces a new Virtual Machine Scale Set to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewWindowsVirtualMachineScaleSet registers a new resource with the given unique name, arguments, and options. func NewWindowsVirtualMachineScaleSet(ctx *pulumi.Context, name string, args *WindowsVirtualMachineScaleSetArgs, opts ...pulumi.ResourceOption) (*WindowsVirtualMachineScaleSet, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AdminPassword == nil { return nil, errors.New("invalid value for required argument 'AdminPassword'") } if args.AdminUsername == nil { return nil, errors.New("invalid value for required argument 'AdminUsername'") } if args.Instances == nil { return nil, errors.New("invalid value for required argument 'Instances'") } if args.NetworkInterfaces == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaces'") } if args.OsDisk == nil { return nil, errors.New("invalid value for required argument 'OsDisk'") } 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'") } if args.AdminPassword != nil { args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringInput) } if args.CustomData != nil { args.CustomData = pulumi.ToSecret(args.CustomData).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "adminPassword", "customData", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WindowsVirtualMachineScaleSet err := ctx.RegisterResource("azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWindowsVirtualMachineScaleSet gets an existing WindowsVirtualMachineScaleSet 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 GetWindowsVirtualMachineScaleSet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WindowsVirtualMachineScaleSetState, opts ...pulumi.ResourceOption) (*WindowsVirtualMachineScaleSet, error) { var resource WindowsVirtualMachineScaleSet err := ctx.ReadResource("azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WindowsVirtualMachineScaleSet resources. type windowsVirtualMachineScaleSetState struct { // An `additionalCapabilities` block as defined below. AdditionalCapabilities *WindowsVirtualMachineScaleSetAdditionalCapabilities `pulumi:"additionalCapabilities"` // One or more `additionalUnattendContent` blocks as defined below. Changing this forces a new resource to be created. AdditionalUnattendContents []WindowsVirtualMachineScaleSetAdditionalUnattendContent `pulumi:"additionalUnattendContents"` // The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. AdminPassword *string `pulumi:"adminPassword"` // The username of the local administrator on each Virtual Machine Scale Set instance. Changing this forces a new resource to be created. AdminUsername *string `pulumi:"adminUsername"` // An `automaticInstanceRepair` block as defined below. To enable the automatic instance repair, this Virtual Machine Scale Set must have a valid `healthProbeId` or an [Application Health Extension](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension). // // > **Note:** For more information about Automatic Instance Repair, please refer to [this doc](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-automatic-instance-repairs). AutomaticInstanceRepair *WindowsVirtualMachineScaleSetAutomaticInstanceRepair `pulumi:"automaticInstanceRepair"` // An `automaticOsUpgradePolicy` block as defined below. This can only be specified when `upgradeMode` is set to either `Automatic` or `Rolling`. AutomaticOsUpgradePolicy *WindowsVirtualMachineScaleSetAutomaticOsUpgradePolicy `pulumi:"automaticOsUpgradePolicy"` // A `bootDiagnostics` block as defined below. BootDiagnostics *WindowsVirtualMachineScaleSetBootDiagnostics `pulumi:"bootDiagnostics"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine Scale Set should be allocated to. Changing this forces a new resource to be created. // // > **Note:** `capacityReservationGroupId` cannot be used with `proximityPlacementGroupId` // // > **Note:** `singlePlacementGroup` must be set to `false` when `capacityReservationGroupId` is specified. CapacityReservationGroupId *string `pulumi:"capacityReservationGroupId"` // The prefix which should be used for the name of the Virtual Machines in this Scale Set. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computerNamePrefix`, then you must specify `computerNamePrefix`. Changing this forces a new resource to be created. ComputerNamePrefix *string `pulumi:"computerNamePrefix"` // The Base64-Encoded Custom Data which should be used for this Virtual Machine Scale Set. // // > **Note:** When Custom Data has been configured, it's not possible to remove it without tainting the Virtual Machine Scale Set, due to a limitation of the Azure API. CustomData *string `pulumi:"customData"` // One or more `dataDisk` blocks as defined below. DataDisks []WindowsVirtualMachineScaleSetDataDisk `pulumi:"dataDisks"` // Should Virtual Machine Extensions be run on Overprovisioned Virtual Machines in the Scale Set? Defaults to `false`. DoNotRunExtensionsOnOverprovisionedMachines *bool `pulumi:"doNotRunExtensionsOnOverprovisionedMachines"` // Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine Scale Set should exist. Changing this forces a new Windows Virtual Machine Scale Set to be created. EdgeZone *string `pulumi:"edgeZone"` // Are automatic updates enabled for this Virtual Machine? Defaults to `true`. EnableAutomaticUpdates *bool `pulumi:"enableAutomaticUpdates"` // Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled *bool `pulumi:"encryptionAtHostEnabled"` // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **Note:** This can only be configured when `priority` is set to `Spot`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Should extension operations be allowed on the Virtual Machine Scale Set? Possible values are `true` or `false`. Defaults to `true`. Changing this forces a new Windows Virtual Machine Scale Set to be created. // // > **Note:** `extensionOperationsEnabled` may only be set to `false` if there are no extensions defined in the `extension` field. ExtensionOperationsEnabled *bool `pulumi:"extensionOperationsEnabled"` // One or more `extension` blocks as defined below Extensions []WindowsVirtualMachineScaleSetExtension `pulumi:"extensions"` // Specifies the duration allocated for all extensions to start. The time duration should be between `15` minutes and `120` minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget *string `pulumi:"extensionsTimeBudget"` // One or more `galleryApplication` blocks as defined below. GalleryApplications []WindowsVirtualMachineScaleSetGalleryApplication `pulumi:"galleryApplications"` // The ID of a Load Balancer Probe which should be used to determine the health of an instance. This is Required and can only be specified when `upgradeMode` is set to `Automatic` or `Rolling`. HealthProbeId *string `pulumi:"healthProbeId"` // Specifies the ID of the dedicated host group that the virtual machine scale set resides in. Changing this forces a new resource to be created. HostGroupId *string `pulumi:"hostGroupId"` // An `identity` block as defined below. Identity *WindowsVirtualMachineScaleSetIdentity `pulumi:"identity"` // The number of Virtual Machines in the Scale Set. // // > **NOTE:** If you're using AutoScaling, you may wish to use [`Ignore Changes` functionality](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) to ignore changes to this field. Instances *int `pulumi:"instances"` // Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing)) which should be used for this Virtual Machine Scale Set. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType *string `pulumi:"licenseType"` // The Azure location where the Windows Virtual Machine Scale Set should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The maximum price you're willing to pay for each Virtual Machine in this Scale Set, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machines in the Scale Set will be evicted using the `evictionPolicy`. Defaults to `-1`, which means that each Virtual Machine in the Scale Set should not be evicted for price reasons. // // > **Note:** This can only be configured when `priority` is set to `Spot`. MaxBidPrice *float64 `pulumi:"maxBidPrice"` // The name of the Windows Virtual Machine Scale Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkInterface` blocks as defined below. NetworkInterfaces []WindowsVirtualMachineScaleSetNetworkInterface `pulumi:"networkInterfaces"` // An `osDisk` block as defined below. OsDisk *WindowsVirtualMachineScaleSetOsDisk `pulumi:"osDisk"` // Should Azure over-provision Virtual Machines in this Scale Set? This means that multiple Virtual Machines will be provisioned and Azure will keep the instances which become available first - which improves provisioning success rates and improves deployment time. You're not billed for these over-provisioned VM's and they don't count towards the Subscription Quota. Defaults to `true`. Overprovision *bool `pulumi:"overprovision"` // A `plan` block as defined below. Changing this forces a new resource to be created. // // > **Note:** When using an image from Azure Marketplace a `plan` must be specified. Plan *WindowsVirtualMachineScaleSetPlan `pulumi:"plan"` // Specifies the number of fault domains that are used by this Linux Virtual Machine Scale Set. Changing this forces a new resource to be created. PlatformFaultDomainCount *int `pulumi:"platformFaultDomainCount"` // The Priority of this Virtual Machine Scale Set. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this value forces a new resource. // // > **Note:** When `priority` is set to `Spot` an `evictionPolicy` must be specified. Priority *string `pulumi:"priority"` // Should the Azure VM Agent be provisioned on each Virtual Machine in the Scale Set? Defaults to `true`. Changing this value forces a new resource to be created. ProvisionVmAgent *bool `pulumi:"provisionVmAgent"` // The ID of the Proximity Placement Group in which the Virtual Machine Scale Set should be assigned to. Changing this forces a new resource to be created. ProximityPlacementGroupId *string `pulumi:"proximityPlacementGroupId"` // Should resilient VM creation be enabled? When enabled, the service will attempt to create VMs in alternative fault domains or zones if the primary location fails during creation. Defaults to `false`. // // > **Note:** `resilientVmCreationEnabled` is currently not supported in the `austriaeast`, `belgiumcentral`, `centraluseuap`, `chilecentral`, `indonesiacentral`, `israelnorthwest`, `malaysiawest`, `mexicocentral`, `newzealandnorth`, `southcentralus2`, `southindia`, `southeastus3`, `southwestus`, `eastasia`, `eastus`, `southcentralus`, `southeastasia`, and `westeurope` regions. ResilientVmCreationEnabled *bool `pulumi:"resilientVmCreationEnabled"` // Should resilient VM deletion be enabled? When enabled, the service will use a more resilient deletion process that attempts to gracefully handle failures during VM termination. Defaults to `false`. //
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/compute/getBastionHost.go
sdk/go/azure/compute/getBastionHost.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 compute 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 Bastion Host. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.LookupBastionHost(ctx, &compute.LookupBastionHostArgs{ // Name: "existing-bastion", // ResourceGroupName: "existing-resources", // }, 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.Network` - 2024-01-01 func LookupBastionHost(ctx *pulumi.Context, args *LookupBastionHostArgs, opts ...pulumi.InvokeOption) (*LookupBastionHostResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupBastionHostResult err := ctx.Invoke("azure:compute/getBastionHost:getBastionHost", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getBastionHost. type LookupBastionHostArgs struct { // The name of the Bastion Host. Name string `pulumi:"name"` // The name of the Resource Group where the Bastion Host exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getBastionHost. type LookupBastionHostResult struct { // Is Copy/Paste feature enabled for the Bastion Host. CopyPasteEnabled bool `pulumi:"copyPasteEnabled"` // The FQDN for the Bastion Host. DnsName string `pulumi:"dnsName"` // Is File Copy feature enabled for the Bastion Host. FileCopyEnabled bool `pulumi:"fileCopyEnabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `ipConfiguration` block as defined below. IpConfigurations []GetBastionHostIpConfiguration `pulumi:"ipConfigurations"` // Is IP Connect feature enabled for the Bastion Host. IpConnectEnabled bool `pulumi:"ipConnectEnabled"` // The Azure Region where the Bastion Host exists. Location string `pulumi:"location"` // The name of the IP configuration. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The number of scale units provisioned for the Bastion Host. ScaleUnits int `pulumi:"scaleUnits"` // Is Session Recording feature enabled for the Bastion Host. SessionRecordingEnabled bool `pulumi:"sessionRecordingEnabled"` // Is Shareable Link feature enabled for the Bastion Host. ShareableLinkEnabled bool `pulumi:"shareableLinkEnabled"` // The SKU of the Bastion Host. Sku string `pulumi:"sku"` // A mapping of tags assigned to the Bastion Host. Tags map[string]string `pulumi:"tags"` // Is Tunneling feature enabled for the Bastion Host. TunnelingEnabled bool `pulumi:"tunnelingEnabled"` // A list of Availability Zones in which this Bastion Host is located. Zones []string `pulumi:"zones"` } func LookupBastionHostOutput(ctx *pulumi.Context, args LookupBastionHostOutputArgs, opts ...pulumi.InvokeOption) LookupBastionHostResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupBastionHostResultOutput, error) { args := v.(LookupBastionHostArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getBastionHost:getBastionHost", args, LookupBastionHostResultOutput{}, options).(LookupBastionHostResultOutput), nil }).(LookupBastionHostResultOutput) } // A collection of arguments for invoking getBastionHost. type LookupBastionHostOutputArgs struct { // The name of the Bastion Host. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Bastion Host exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupBastionHostOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupBastionHostArgs)(nil)).Elem() } // A collection of values returned by getBastionHost. type LookupBastionHostResultOutput struct{ *pulumi.OutputState } func (LookupBastionHostResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupBastionHostResult)(nil)).Elem() } func (o LookupBastionHostResultOutput) ToLookupBastionHostResultOutput() LookupBastionHostResultOutput { return o } func (o LookupBastionHostResultOutput) ToLookupBastionHostResultOutputWithContext(ctx context.Context) LookupBastionHostResultOutput { return o } // Is Copy/Paste feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) CopyPasteEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.CopyPasteEnabled }).(pulumi.BoolOutput) } // The FQDN for the Bastion Host. func (o LookupBastionHostResultOutput) DnsName() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.DnsName }).(pulumi.StringOutput) } // Is File Copy feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) FileCopyEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.FileCopyEnabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupBastionHostResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.Id }).(pulumi.StringOutput) } // A `ipConfiguration` block as defined below. func (o LookupBastionHostResultOutput) IpConfigurations() GetBastionHostIpConfigurationArrayOutput { return o.ApplyT(func(v LookupBastionHostResult) []GetBastionHostIpConfiguration { return v.IpConfigurations }).(GetBastionHostIpConfigurationArrayOutput) } // Is IP Connect feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) IpConnectEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.IpConnectEnabled }).(pulumi.BoolOutput) } // The Azure Region where the Bastion Host exists. func (o LookupBastionHostResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the IP configuration. func (o LookupBastionHostResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupBastionHostResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The number of scale units provisioned for the Bastion Host. func (o LookupBastionHostResultOutput) ScaleUnits() pulumi.IntOutput { return o.ApplyT(func(v LookupBastionHostResult) int { return v.ScaleUnits }).(pulumi.IntOutput) } // Is Session Recording feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) SessionRecordingEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.SessionRecordingEnabled }).(pulumi.BoolOutput) } // Is Shareable Link feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) ShareableLinkEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.ShareableLinkEnabled }).(pulumi.BoolOutput) } // The SKU of the Bastion Host. func (o LookupBastionHostResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupBastionHostResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags assigned to the Bastion Host. func (o LookupBastionHostResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupBastionHostResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Is Tunneling feature enabled for the Bastion Host. func (o LookupBastionHostResultOutput) TunnelingEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupBastionHostResult) bool { return v.TunnelingEnabled }).(pulumi.BoolOutput) } // A list of Availability Zones in which this Bastion Host is located. func (o LookupBastionHostResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupBastionHostResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupBastionHostResultOutput{}) }
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/compute/capacityReservationGroup.go
sdk/go/azure/compute/capacityReservationGroup.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Capacity Reservation Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = compute.NewCapacityReservationGroup(ctx, "example", &compute.CapacityReservationGroupArgs{ // Name: pulumi.String("example-capacity-reservation-group"), // 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.Compute` - 2022-03-01 // // ## Import // // Capacity Reservation Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/capacityReservationGroup:CapacityReservationGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/capacityReservationGroups/capacityReservationGroup1 // ``` type CapacityReservationGroup struct { pulumi.CustomResourceState // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the resource group the Capacity Reservation Group is located in. 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"` // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewCapacityReservationGroup registers a new resource with the given unique name, arguments, and options. func NewCapacityReservationGroup(ctx *pulumi.Context, name string, args *CapacityReservationGroupArgs, opts ...pulumi.ResourceOption) (*CapacityReservationGroup, 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 CapacityReservationGroup err := ctx.RegisterResource("azure:compute/capacityReservationGroup:CapacityReservationGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCapacityReservationGroup gets an existing CapacityReservationGroup 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 GetCapacityReservationGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CapacityReservationGroupState, opts ...pulumi.ResourceOption) (*CapacityReservationGroup, error) { var resource CapacityReservationGroup err := ctx.ReadResource("azure:compute/capacityReservationGroup:CapacityReservationGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CapacityReservationGroup resources. type capacityReservationGroupState struct { // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the resource group the Capacity Reservation Group is located in. 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"` // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } type CapacityReservationGroupState struct { // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (CapacityReservationGroupState) ElementType() reflect.Type { return reflect.TypeOf((*capacityReservationGroupState)(nil)).Elem() } type capacityReservationGroupArgs struct { // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the resource group the Capacity Reservation Group is located in. 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"` // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a CapacityReservationGroup resource. type CapacityReservationGroupArgs struct { // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (CapacityReservationGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*capacityReservationGroupArgs)(nil)).Elem() } type CapacityReservationGroupInput interface { pulumi.Input ToCapacityReservationGroupOutput() CapacityReservationGroupOutput ToCapacityReservationGroupOutputWithContext(ctx context.Context) CapacityReservationGroupOutput } func (*CapacityReservationGroup) ElementType() reflect.Type { return reflect.TypeOf((**CapacityReservationGroup)(nil)).Elem() } func (i *CapacityReservationGroup) ToCapacityReservationGroupOutput() CapacityReservationGroupOutput { return i.ToCapacityReservationGroupOutputWithContext(context.Background()) } func (i *CapacityReservationGroup) ToCapacityReservationGroupOutputWithContext(ctx context.Context) CapacityReservationGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationGroupOutput) } // CapacityReservationGroupArrayInput is an input type that accepts CapacityReservationGroupArray and CapacityReservationGroupArrayOutput values. // You can construct a concrete instance of `CapacityReservationGroupArrayInput` via: // // CapacityReservationGroupArray{ CapacityReservationGroupArgs{...} } type CapacityReservationGroupArrayInput interface { pulumi.Input ToCapacityReservationGroupArrayOutput() CapacityReservationGroupArrayOutput ToCapacityReservationGroupArrayOutputWithContext(context.Context) CapacityReservationGroupArrayOutput } type CapacityReservationGroupArray []CapacityReservationGroupInput func (CapacityReservationGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CapacityReservationGroup)(nil)).Elem() } func (i CapacityReservationGroupArray) ToCapacityReservationGroupArrayOutput() CapacityReservationGroupArrayOutput { return i.ToCapacityReservationGroupArrayOutputWithContext(context.Background()) } func (i CapacityReservationGroupArray) ToCapacityReservationGroupArrayOutputWithContext(ctx context.Context) CapacityReservationGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationGroupArrayOutput) } // CapacityReservationGroupMapInput is an input type that accepts CapacityReservationGroupMap and CapacityReservationGroupMapOutput values. // You can construct a concrete instance of `CapacityReservationGroupMapInput` via: // // CapacityReservationGroupMap{ "key": CapacityReservationGroupArgs{...} } type CapacityReservationGroupMapInput interface { pulumi.Input ToCapacityReservationGroupMapOutput() CapacityReservationGroupMapOutput ToCapacityReservationGroupMapOutputWithContext(context.Context) CapacityReservationGroupMapOutput } type CapacityReservationGroupMap map[string]CapacityReservationGroupInput func (CapacityReservationGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CapacityReservationGroup)(nil)).Elem() } func (i CapacityReservationGroupMap) ToCapacityReservationGroupMapOutput() CapacityReservationGroupMapOutput { return i.ToCapacityReservationGroupMapOutputWithContext(context.Background()) } func (i CapacityReservationGroupMap) ToCapacityReservationGroupMapOutputWithContext(ctx context.Context) CapacityReservationGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CapacityReservationGroupMapOutput) } type CapacityReservationGroupOutput struct{ *pulumi.OutputState } func (CapacityReservationGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**CapacityReservationGroup)(nil)).Elem() } func (o CapacityReservationGroupOutput) ToCapacityReservationGroupOutput() CapacityReservationGroupOutput { return o } func (o CapacityReservationGroupOutput) ToCapacityReservationGroupOutputWithContext(ctx context.Context) CapacityReservationGroupOutput { return o } // The Azure location where the Capacity Reservation Group exists. Changing this forces a new resource to be created. func (o CapacityReservationGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *CapacityReservationGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Capacity Reservation Group. Changing this forces a new resource to be created. func (o CapacityReservationGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CapacityReservationGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the resource group the Capacity Reservation Group is located in. Changing this forces a new resource to be created. func (o CapacityReservationGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *CapacityReservationGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o CapacityReservationGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *CapacityReservationGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies a list of Availability Zones for this Capacity Reservation Group. Changing this forces a new resource to be created. func (o CapacityReservationGroupOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *CapacityReservationGroup) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type CapacityReservationGroupArrayOutput struct{ *pulumi.OutputState } func (CapacityReservationGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CapacityReservationGroup)(nil)).Elem() } func (o CapacityReservationGroupArrayOutput) ToCapacityReservationGroupArrayOutput() CapacityReservationGroupArrayOutput { return o } func (o CapacityReservationGroupArrayOutput) ToCapacityReservationGroupArrayOutputWithContext(ctx context.Context) CapacityReservationGroupArrayOutput { return o } func (o CapacityReservationGroupArrayOutput) Index(i pulumi.IntInput) CapacityReservationGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CapacityReservationGroup { return vs[0].([]*CapacityReservationGroup)[vs[1].(int)] }).(CapacityReservationGroupOutput) } type CapacityReservationGroupMapOutput struct{ *pulumi.OutputState } func (CapacityReservationGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CapacityReservationGroup)(nil)).Elem() } func (o CapacityReservationGroupMapOutput) ToCapacityReservationGroupMapOutput() CapacityReservationGroupMapOutput { return o } func (o CapacityReservationGroupMapOutput) ToCapacityReservationGroupMapOutputWithContext(ctx context.Context) CapacityReservationGroupMapOutput { return o } func (o CapacityReservationGroupMapOutput) MapIndex(k pulumi.StringInput) CapacityReservationGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CapacityReservationGroup { return vs[0].(map[string]*CapacityReservationGroup)[vs[1].(string)] }).(CapacityReservationGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationGroupInput)(nil)).Elem(), &CapacityReservationGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationGroupArrayInput)(nil)).Elem(), CapacityReservationGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CapacityReservationGroupMapInput)(nil)).Elem(), CapacityReservationGroupMap{}) pulumi.RegisterOutputType(CapacityReservationGroupOutput{}) pulumi.RegisterOutputType(CapacityReservationGroupArrayOutput{}) pulumi.RegisterOutputType(CapacityReservationGroupMapOutput{}) }
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/compute/getSnapshot.go
sdk/go/azure/compute/getSnapshot.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 compute 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 Snapshot. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := compute.LookupSnapshot(ctx, &compute.LookupSnapshotArgs{ // Name: "my-snapshot", // ResourceGroupName: "my-resource-group", // }, 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.Compute` - 2022-03-02 func LookupSnapshot(ctx *pulumi.Context, args *LookupSnapshotArgs, opts ...pulumi.InvokeOption) (*LookupSnapshotResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSnapshotResult err := ctx.Invoke("azure:compute/getSnapshot:getSnapshot", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSnapshot. type LookupSnapshotArgs struct { // Specifies the name of the Snapshot. Name string `pulumi:"name"` // Specifies the name of the resource group the Snapshot is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getSnapshot. type LookupSnapshotResult struct { CreationOption string `pulumi:"creationOption"` // The size of the Snapshotted Disk in GB. DiskSizeGb int `pulumi:"diskSizeGb"` EncryptionSettings []GetSnapshotEncryptionSetting `pulumi:"encryptionSettings"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` OsType string `pulumi:"osType"` ResourceGroupName string `pulumi:"resourceGroupName"` // The reference to an existing snapshot. SourceResourceId string `pulumi:"sourceResourceId"` // The URI to a Managed or Unmanaged Disk. SourceUri string `pulumi:"sourceUri"` // The ID of an storage account. StorageAccountId string `pulumi:"storageAccountId"` TimeCreated string `pulumi:"timeCreated"` // Whether Trusted Launch is enabled for the Snapshot. TrustedLaunchEnabled bool `pulumi:"trustedLaunchEnabled"` } func LookupSnapshotOutput(ctx *pulumi.Context, args LookupSnapshotOutputArgs, opts ...pulumi.InvokeOption) LookupSnapshotResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSnapshotResultOutput, error) { args := v.(LookupSnapshotArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getSnapshot:getSnapshot", args, LookupSnapshotResultOutput{}, options).(LookupSnapshotResultOutput), nil }).(LookupSnapshotResultOutput) } // A collection of arguments for invoking getSnapshot. type LookupSnapshotOutputArgs struct { // Specifies the name of the Snapshot. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Snapshot is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupSnapshotOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSnapshotArgs)(nil)).Elem() } // A collection of values returned by getSnapshot. type LookupSnapshotResultOutput struct{ *pulumi.OutputState } func (LookupSnapshotResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSnapshotResult)(nil)).Elem() } func (o LookupSnapshotResultOutput) ToLookupSnapshotResultOutput() LookupSnapshotResultOutput { return o } func (o LookupSnapshotResultOutput) ToLookupSnapshotResultOutputWithContext(ctx context.Context) LookupSnapshotResultOutput { return o } func (o LookupSnapshotResultOutput) CreationOption() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.CreationOption }).(pulumi.StringOutput) } // The size of the Snapshotted Disk in GB. func (o LookupSnapshotResultOutput) DiskSizeGb() pulumi.IntOutput { return o.ApplyT(func(v LookupSnapshotResult) int { return v.DiskSizeGb }).(pulumi.IntOutput) } func (o LookupSnapshotResultOutput) EncryptionSettings() GetSnapshotEncryptionSettingArrayOutput { return o.ApplyT(func(v LookupSnapshotResult) []GetSnapshotEncryptionSetting { return v.EncryptionSettings }).(GetSnapshotEncryptionSettingArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSnapshotResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSnapshotResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupSnapshotResultOutput) OsType() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.OsType }).(pulumi.StringOutput) } func (o LookupSnapshotResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The reference to an existing snapshot. func (o LookupSnapshotResultOutput) SourceResourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.SourceResourceId }).(pulumi.StringOutput) } // The URI to a Managed or Unmanaged Disk. func (o LookupSnapshotResultOutput) SourceUri() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.SourceUri }).(pulumi.StringOutput) } // The ID of an storage account. func (o LookupSnapshotResultOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.StorageAccountId }).(pulumi.StringOutput) } func (o LookupSnapshotResultOutput) TimeCreated() pulumi.StringOutput { return o.ApplyT(func(v LookupSnapshotResult) string { return v.TimeCreated }).(pulumi.StringOutput) } // Whether Trusted Launch is enabled for the Snapshot. func (o LookupSnapshotResultOutput) TrustedLaunchEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupSnapshotResult) bool { return v.TrustedLaunchEnabled }).(pulumi.BoolOutput) } func init() { pulumi.RegisterOutputType(LookupSnapshotResultOutput{}) }
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/compute/bastionHost.go
sdk/go/azure/compute/bastionHost.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Bastion Host. // // ## Example Usage // // This example deploys an Azure Bastion Host Instance to a target virtual network. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("examplevnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("AzureBastionSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("192.168.1.224/27"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("examplepip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = compute.NewBastionHost(ctx, "example", &compute.BastionHostArgs{ // Name: pulumi.String("examplebastion"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfiguration: &compute.BastionHostIpConfigurationArgs{ // Name: pulumi.String("configuration"), // SubnetId: exampleSubnet.ID(), // PublicIpAddressId: examplePublicIp.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.Network` - 2024-01-01 // // ## Import // // Bastion Hosts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/bastionHost:BastionHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/bastionHosts/instance1 // ``` type BastionHost struct { pulumi.CustomResourceState // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. CopyPasteEnabled pulumi.BoolPtrOutput `pulumi:"copyPasteEnabled"` // The FQDN for the Bastion Host. DnsName pulumi.StringOutput `pulumi:"dnsName"` // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. FileCopyEnabled pulumi.BoolPtrOutput `pulumi:"fileCopyEnabled"` // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. IpConfiguration BastionHostIpConfigurationPtrOutput `pulumi:"ipConfiguration"` // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. IpConnectEnabled pulumi.BoolPtrOutput `pulumi:"ipConnectEnabled"` // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. KerberosEnabled pulumi.BoolPtrOutput `pulumi:"kerberosEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Bastion Host. 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 Bastion Host. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. ScaleUnits pulumi.IntPtrOutput `pulumi:"scaleUnits"` // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. SessionRecordingEnabled pulumi.BoolPtrOutput `pulumi:"sessionRecordingEnabled"` // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. ShareableLinkEnabled pulumi.BoolPtrOutput `pulumi:"shareableLinkEnabled"` // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. Sku pulumi.StringPtrOutput `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. TunnelingEnabled pulumi.BoolPtrOutput `pulumi:"tunnelingEnabled"` // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"` // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewBastionHost registers a new resource with the given unique name, arguments, and options. func NewBastionHost(ctx *pulumi.Context, name string, args *BastionHostArgs, opts ...pulumi.ResourceOption) (*BastionHost, 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 BastionHost err := ctx.RegisterResource("azure:compute/bastionHost:BastionHost", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBastionHost gets an existing BastionHost 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 GetBastionHost(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BastionHostState, opts ...pulumi.ResourceOption) (*BastionHost, error) { var resource BastionHost err := ctx.ReadResource("azure:compute/bastionHost:BastionHost", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BastionHost resources. type bastionHostState struct { // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. CopyPasteEnabled *bool `pulumi:"copyPasteEnabled"` // The FQDN for the Bastion Host. DnsName *string `pulumi:"dnsName"` // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. FileCopyEnabled *bool `pulumi:"fileCopyEnabled"` // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. IpConfiguration *BastionHostIpConfiguration `pulumi:"ipConfiguration"` // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. IpConnectEnabled *bool `pulumi:"ipConnectEnabled"` // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. KerberosEnabled *bool `pulumi:"kerberosEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. Location *string `pulumi:"location"` // Specifies the name of the Bastion Host. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. ScaleUnits *int `pulumi:"scaleUnits"` // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. SessionRecordingEnabled *bool `pulumi:"sessionRecordingEnabled"` // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. ShareableLinkEnabled *bool `pulumi:"shareableLinkEnabled"` // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. TunnelingEnabled *bool `pulumi:"tunnelingEnabled"` // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. VirtualNetworkId *string `pulumi:"virtualNetworkId"` // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } type BastionHostState struct { // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. CopyPasteEnabled pulumi.BoolPtrInput // The FQDN for the Bastion Host. DnsName pulumi.StringPtrInput // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. FileCopyEnabled pulumi.BoolPtrInput // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. IpConfiguration BastionHostIpConfigurationPtrInput // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. IpConnectEnabled pulumi.BoolPtrInput // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. KerberosEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. Location pulumi.StringPtrInput // Specifies the name of the Bastion Host. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. ScaleUnits pulumi.IntPtrInput // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. SessionRecordingEnabled pulumi.BoolPtrInput // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. ShareableLinkEnabled pulumi.BoolPtrInput // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. Sku pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. TunnelingEnabled pulumi.BoolPtrInput // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringPtrInput // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (BastionHostState) ElementType() reflect.Type { return reflect.TypeOf((*bastionHostState)(nil)).Elem() } type bastionHostArgs struct { // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. CopyPasteEnabled *bool `pulumi:"copyPasteEnabled"` // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. FileCopyEnabled *bool `pulumi:"fileCopyEnabled"` // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. IpConfiguration *BastionHostIpConfiguration `pulumi:"ipConfiguration"` // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. IpConnectEnabled *bool `pulumi:"ipConnectEnabled"` // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. KerberosEnabled *bool `pulumi:"kerberosEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. Location *string `pulumi:"location"` // Specifies the name of the Bastion Host. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. ScaleUnits *int `pulumi:"scaleUnits"` // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. SessionRecordingEnabled *bool `pulumi:"sessionRecordingEnabled"` // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. ShareableLinkEnabled *bool `pulumi:"shareableLinkEnabled"` // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. TunnelingEnabled *bool `pulumi:"tunnelingEnabled"` // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. VirtualNetworkId *string `pulumi:"virtualNetworkId"` // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a BastionHost resource. type BastionHostArgs struct { // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. CopyPasteEnabled pulumi.BoolPtrInput // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. FileCopyEnabled pulumi.BoolPtrInput // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. IpConfiguration BastionHostIpConfigurationPtrInput // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. IpConnectEnabled pulumi.BoolPtrInput // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. KerberosEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. Location pulumi.StringPtrInput // Specifies the name of the Bastion Host. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. ScaleUnits pulumi.IntPtrInput // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. SessionRecordingEnabled pulumi.BoolPtrInput // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. ShareableLinkEnabled pulumi.BoolPtrInput // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. Sku pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. TunnelingEnabled pulumi.BoolPtrInput // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringPtrInput // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (BastionHostArgs) ElementType() reflect.Type { return reflect.TypeOf((*bastionHostArgs)(nil)).Elem() } type BastionHostInput interface { pulumi.Input ToBastionHostOutput() BastionHostOutput ToBastionHostOutputWithContext(ctx context.Context) BastionHostOutput } func (*BastionHost) ElementType() reflect.Type { return reflect.TypeOf((**BastionHost)(nil)).Elem() } func (i *BastionHost) ToBastionHostOutput() BastionHostOutput { return i.ToBastionHostOutputWithContext(context.Background()) } func (i *BastionHost) ToBastionHostOutputWithContext(ctx context.Context) BastionHostOutput { return pulumi.ToOutputWithContext(ctx, i).(BastionHostOutput) } // BastionHostArrayInput is an input type that accepts BastionHostArray and BastionHostArrayOutput values. // You can construct a concrete instance of `BastionHostArrayInput` via: // // BastionHostArray{ BastionHostArgs{...} } type BastionHostArrayInput interface { pulumi.Input ToBastionHostArrayOutput() BastionHostArrayOutput ToBastionHostArrayOutputWithContext(context.Context) BastionHostArrayOutput } type BastionHostArray []BastionHostInput func (BastionHostArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BastionHost)(nil)).Elem() } func (i BastionHostArray) ToBastionHostArrayOutput() BastionHostArrayOutput { return i.ToBastionHostArrayOutputWithContext(context.Background()) } func (i BastionHostArray) ToBastionHostArrayOutputWithContext(ctx context.Context) BastionHostArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BastionHostArrayOutput) } // BastionHostMapInput is an input type that accepts BastionHostMap and BastionHostMapOutput values. // You can construct a concrete instance of `BastionHostMapInput` via: // // BastionHostMap{ "key": BastionHostArgs{...} } type BastionHostMapInput interface { pulumi.Input ToBastionHostMapOutput() BastionHostMapOutput ToBastionHostMapOutputWithContext(context.Context) BastionHostMapOutput } type BastionHostMap map[string]BastionHostInput func (BastionHostMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BastionHost)(nil)).Elem() } func (i BastionHostMap) ToBastionHostMapOutput() BastionHostMapOutput { return i.ToBastionHostMapOutputWithContext(context.Background()) } func (i BastionHostMap) ToBastionHostMapOutputWithContext(ctx context.Context) BastionHostMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BastionHostMapOutput) } type BastionHostOutput struct{ *pulumi.OutputState } func (BastionHostOutput) ElementType() reflect.Type { return reflect.TypeOf((**BastionHost)(nil)).Elem() } func (o BastionHostOutput) ToBastionHostOutput() BastionHostOutput { return o } func (o BastionHostOutput) ToBastionHostOutputWithContext(ctx context.Context) BastionHostOutput { return o } // Is Copy/Paste feature enabled for the Bastion Host. Defaults to `true`. func (o BastionHostOutput) CopyPasteEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.CopyPasteEnabled }).(pulumi.BoolPtrOutput) } // The FQDN for the Bastion Host. func (o BastionHostOutput) DnsName() pulumi.StringOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput) } // Is File Copy feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `fileCopyEnabled` is only supported when `sku` is `Standard` or `Premium`. func (o BastionHostOutput) FileCopyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.FileCopyEnabled }).(pulumi.BoolPtrOutput) } // A `ipConfiguration` block as defined below. Changing this forces a new resource to be created. func (o BastionHostOutput) IpConfiguration() BastionHostIpConfigurationPtrOutput { return o.ApplyT(func(v *BastionHost) BastionHostIpConfigurationPtrOutput { return v.IpConfiguration }).(BastionHostIpConfigurationPtrOutput) } // Is IP Connect feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `ipConnectEnabled` is only supported when `sku` is `Standard` or `Premium`. func (o BastionHostOutput) IpConnectEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.IpConnectEnabled }).(pulumi.BoolPtrOutput) } // Is Kerberos authentication feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `kerberosEnabled` is only supported when `sku` is `Standard` or `Premium`. func (o BastionHostOutput) KerberosEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.KerberosEnabled }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Review [Azure Bastion Host FAQ](https://docs.microsoft.com/azure/bastion/bastion-faq) for supported locations. func (o BastionHostOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Bastion Host. Changing this forces a new resource to be created. func (o BastionHostOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Bastion Host. Changing this forces a new resource to be created. func (o BastionHostOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The number of scale units with which to provision the Bastion Host. Possible values are between `2` and `50`. Defaults to `2`. // // > **Note:** `scaleUnits` only can be changed when `sku` is `Standard` or `Premium`. `scaleUnits` is always `2` when `sku` is `Basic`. func (o BastionHostOutput) ScaleUnits() pulumi.IntPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.IntPtrOutput { return v.ScaleUnits }).(pulumi.IntPtrOutput) } // Is Session Recording feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `sessionRecordingEnabled` is only supported when `sku` is `Premium`. func (o BastionHostOutput) SessionRecordingEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.SessionRecordingEnabled }).(pulumi.BoolPtrOutput) } // Is Shareable Link feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `shareableLinkEnabled` is only supported when `sku` is `Standard` or `Premium`. func (o BastionHostOutput) ShareableLinkEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.ShareableLinkEnabled }).(pulumi.BoolPtrOutput) } // The SKU of the Bastion Host. Accepted values are `Developer`, `Basic`, `Standard` and `Premium`. Defaults to `Basic`. // // > **Note:** Downgrading the SKU will force a new resource to be created. func (o BastionHostOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o BastionHostOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Is Tunneling feature enabled for the Bastion Host. Defaults to `false`. // // > **Note:** `tunnelingEnabled` is only supported when `sku` is `Standard` or `Premium`. func (o BastionHostOutput) TunnelingEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.BoolPtrOutput { return v.TunnelingEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Virtual Network for the Developer Bastion Host. Changing this forces a new resource to be created. func (o BastionHostOutput) VirtualNetworkId() pulumi.StringPtrOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringPtrOutput { return v.VirtualNetworkId }).(pulumi.StringPtrOutput) } // Specifies a list of Availability Zones in which this Public Bastion Host should be located. Changing this forces a new resource to be created. func (o BastionHostOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *BastionHost) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type BastionHostArrayOutput struct{ *pulumi.OutputState } func (BastionHostArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BastionHost)(nil)).Elem() } func (o BastionHostArrayOutput) ToBastionHostArrayOutput() BastionHostArrayOutput { return o } func (o BastionHostArrayOutput) ToBastionHostArrayOutputWithContext(ctx context.Context) BastionHostArrayOutput { return o } func (o BastionHostArrayOutput) Index(i pulumi.IntInput) BastionHostOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BastionHost { return vs[0].([]*BastionHost)[vs[1].(int)] }).(BastionHostOutput) } type BastionHostMapOutput struct{ *pulumi.OutputState } func (BastionHostMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BastionHost)(nil)).Elem() } func (o BastionHostMapOutput) ToBastionHostMapOutput() BastionHostMapOutput { return o } func (o BastionHostMapOutput) ToBastionHostMapOutputWithContext(ctx context.Context) BastionHostMapOutput { return o } func (o BastionHostMapOutput) MapIndex(k pulumi.StringInput) BastionHostOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BastionHost { return vs[0].(map[string]*BastionHost)[vs[1].(string)] }).(BastionHostOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BastionHostInput)(nil)).Elem(), &BastionHost{}) pulumi.RegisterInputType(reflect.TypeOf((*BastionHostArrayInput)(nil)).Elem(), BastionHostArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BastionHostMapInput)(nil)).Elem(), BastionHostMap{}) pulumi.RegisterOutputType(BastionHostOutput{}) pulumi.RegisterOutputType(BastionHostArrayOutput{}) pulumi.RegisterOutputType(BastionHostMapOutput{}) }
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/compute/getManagedDisk.go
sdk/go/azure/compute/getManagedDisk.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 compute 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 Managed Disk. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // existing, err := compute.LookupManagedDisk(ctx, &compute.LookupManagedDiskArgs{ // Name: "example-datadisk", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("id", existing.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2023-04-02 func LookupManagedDisk(ctx *pulumi.Context, args *LookupManagedDiskArgs, opts ...pulumi.InvokeOption) (*LookupManagedDiskResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupManagedDiskResult err := ctx.Invoke("azure:compute/getManagedDisk:getManagedDisk", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagedDisk. type LookupManagedDiskArgs struct { // Specifies the name of the Managed Disk. Name string `pulumi:"name"` // Specifies the name of the Resource Group where this Managed Disk exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getManagedDisk. type LookupManagedDiskResult struct { CreateOption string `pulumi:"createOption"` // The ID of the disk access resource for using private endpoints on disks. DiskAccessId string `pulumi:"diskAccessId"` // The ID of the Disk Encryption Set used to encrypt this Managed Disk. DiskEncryptionSetId string `pulumi:"diskEncryptionSetId"` // The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes. DiskIopsReadWrite int `pulumi:"diskIopsReadWrite"` // The bandwidth allowed for this disk. DiskMbpsReadWrite int `pulumi:"diskMbpsReadWrite"` // The size of the Managed Disk in gigabytes. DiskSizeGb int `pulumi:"diskSizeGb"` // A `encryptionSettings` block as defined below. EncryptionSettings []GetManagedDiskEncryptionSetting `pulumi:"encryptionSettings"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The ID of the source image used for creating this Managed Disk. ImageReferenceId string `pulumi:"imageReferenceId"` // The Azure location of the Managed Disk. Location string `pulumi:"location"` Name string `pulumi:"name"` // Policy for accessing the disk via network. NetworkAccessPolicy string `pulumi:"networkAccessPolicy"` // The operating system used for this Managed Disk. OsType string `pulumi:"osType"` ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of an existing Managed Disk which this Disk was created from. SourceResourceId string `pulumi:"sourceResourceId"` // The Source URI for this Managed Disk. SourceUri string `pulumi:"sourceUri"` // The ID of the Storage Account where the `sourceUri` is located. StorageAccountId string `pulumi:"storageAccountId"` // The storage account type for the Managed Disk. StorageAccountType string `pulumi:"storageAccountType"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones where the Managed Disk exists. Zones []string `pulumi:"zones"` } func LookupManagedDiskOutput(ctx *pulumi.Context, args LookupManagedDiskOutputArgs, opts ...pulumi.InvokeOption) LookupManagedDiskResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupManagedDiskResultOutput, error) { args := v.(LookupManagedDiskArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getManagedDisk:getManagedDisk", args, LookupManagedDiskResultOutput{}, options).(LookupManagedDiskResultOutput), nil }).(LookupManagedDiskResultOutput) } // A collection of arguments for invoking getManagedDisk. type LookupManagedDiskOutputArgs struct { // Specifies the name of the Managed Disk. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Resource Group where this Managed Disk exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupManagedDiskOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedDiskArgs)(nil)).Elem() } // A collection of values returned by getManagedDisk. type LookupManagedDiskResultOutput struct{ *pulumi.OutputState } func (LookupManagedDiskResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedDiskResult)(nil)).Elem() } func (o LookupManagedDiskResultOutput) ToLookupManagedDiskResultOutput() LookupManagedDiskResultOutput { return o } func (o LookupManagedDiskResultOutput) ToLookupManagedDiskResultOutputWithContext(ctx context.Context) LookupManagedDiskResultOutput { return o } func (o LookupManagedDiskResultOutput) CreateOption() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.CreateOption }).(pulumi.StringOutput) } // The ID of the disk access resource for using private endpoints on disks. func (o LookupManagedDiskResultOutput) DiskAccessId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.DiskAccessId }).(pulumi.StringOutput) } // The ID of the Disk Encryption Set used to encrypt this Managed Disk. func (o LookupManagedDiskResultOutput) DiskEncryptionSetId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.DiskEncryptionSetId }).(pulumi.StringOutput) } // The number of IOPS allowed for this disk, where one operation can transfer between 4k and 256k bytes. func (o LookupManagedDiskResultOutput) DiskIopsReadWrite() pulumi.IntOutput { return o.ApplyT(func(v LookupManagedDiskResult) int { return v.DiskIopsReadWrite }).(pulumi.IntOutput) } // The bandwidth allowed for this disk. func (o LookupManagedDiskResultOutput) DiskMbpsReadWrite() pulumi.IntOutput { return o.ApplyT(func(v LookupManagedDiskResult) int { return v.DiskMbpsReadWrite }).(pulumi.IntOutput) } // The size of the Managed Disk in gigabytes. func (o LookupManagedDiskResultOutput) DiskSizeGb() pulumi.IntOutput { return o.ApplyT(func(v LookupManagedDiskResult) int { return v.DiskSizeGb }).(pulumi.IntOutput) } // A `encryptionSettings` block as defined below. func (o LookupManagedDiskResultOutput) EncryptionSettings() GetManagedDiskEncryptionSettingArrayOutput { return o.ApplyT(func(v LookupManagedDiskResult) []GetManagedDiskEncryptionSetting { return v.EncryptionSettings }).(GetManagedDiskEncryptionSettingArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupManagedDiskResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.Id }).(pulumi.StringOutput) } // The ID of the source image used for creating this Managed Disk. func (o LookupManagedDiskResultOutput) ImageReferenceId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.ImageReferenceId }).(pulumi.StringOutput) } // The Azure location of the Managed Disk. func (o LookupManagedDiskResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupManagedDiskResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.Name }).(pulumi.StringOutput) } // Policy for accessing the disk via network. func (o LookupManagedDiskResultOutput) NetworkAccessPolicy() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.NetworkAccessPolicy }).(pulumi.StringOutput) } // The operating system used for this Managed Disk. func (o LookupManagedDiskResultOutput) OsType() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.OsType }).(pulumi.StringOutput) } func (o LookupManagedDiskResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of an existing Managed Disk which this Disk was created from. func (o LookupManagedDiskResultOutput) SourceResourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.SourceResourceId }).(pulumi.StringOutput) } // The Source URI for this Managed Disk. func (o LookupManagedDiskResultOutput) SourceUri() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.SourceUri }).(pulumi.StringOutput) } // The ID of the Storage Account where the `sourceUri` is located. func (o LookupManagedDiskResultOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.StorageAccountId }).(pulumi.StringOutput) } // The storage account type for the Managed Disk. func (o LookupManagedDiskResultOutput) StorageAccountType() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedDiskResult) string { return v.StorageAccountType }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupManagedDiskResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupManagedDiskResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones where the Managed Disk exists. func (o LookupManagedDiskResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagedDiskResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupManagedDiskResultOutput{}) }
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/compute/getSharedImageVersion.go
sdk/go/azure/compute/getSharedImageVersion.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 compute 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 Version of a Shared Image within a Shared Image Gallery. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := compute.LookupSharedImageVersion(ctx, &compute.LookupSharedImageVersionArgs{ // Name: "1.0.0", // ImageName: "my-image", // GalleryName: "my-image-gallery", // ResourceGroupName: "example-resources", // }, 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.Compute` - 2023-07-03 func LookupSharedImageVersion(ctx *pulumi.Context, args *LookupSharedImageVersionArgs, opts ...pulumi.InvokeOption) (*LookupSharedImageVersionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSharedImageVersionResult err := ctx.Invoke("azure:compute/getSharedImageVersion:getSharedImageVersion", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSharedImageVersion. type LookupSharedImageVersionArgs struct { // The name of the Shared Image Gallery in which the Shared Image exists. GalleryName string `pulumi:"galleryName"` // The name of the Shared Image in which this Version exists. ImageName string `pulumi:"imageName"` // The name of the Image Version. // // > **Note:** You may specify `latest` to obtain the latest version or `recent` to obtain the most recently updated version. // // > **Note:** In 3.0, `latest` may return an image version with `excludeFromLatest` set to `true`. Starting from 4.0 onwards `latest` will not return image versions with `exludeFromLatest` set to `true`. Name string `pulumi:"name"` // The name of the Resource Group in which the Shared Image Gallery exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Sort available versions taking SemVer versioning scheme into account. Defaults to `false`. SortVersionsBySemver *bool `pulumi:"sortVersionsBySemver"` // A mapping of tags assigned to the Shared Image. Tags map[string]string `pulumi:"tags"` } // A collection of values returned by getSharedImageVersion. type LookupSharedImageVersionResult struct { // Is this Image Version excluded from the `latest` filter? ExcludeFromLatest bool `pulumi:"excludeFromLatest"` GalleryName string `pulumi:"galleryName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ImageName string `pulumi:"imageName"` // The supported Azure location where the Shared Image Gallery exists. Location string `pulumi:"location"` // The ID of the Managed Image which was the source of this Shared Image Version. ManagedImageId string `pulumi:"managedImageId"` // The Azure Region in which this Image Version exists. Name string `pulumi:"name"` // The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version. OsDiskImageSizeGb int `pulumi:"osDiskImageSizeGb"` // The ID of the OS disk snapshot which was the source of this Shared Image Version. OsDiskSnapshotId string `pulumi:"osDiskSnapshotId"` ResourceGroupName string `pulumi:"resourceGroupName"` SortVersionsBySemver *bool `pulumi:"sortVersionsBySemver"` // A mapping of tags assigned to the Shared Image. Tags map[string]string `pulumi:"tags"` // One or more `targetRegion` blocks as documented below. TargetRegions []GetSharedImageVersionTargetRegion `pulumi:"targetRegions"` } func LookupSharedImageVersionOutput(ctx *pulumi.Context, args LookupSharedImageVersionOutputArgs, opts ...pulumi.InvokeOption) LookupSharedImageVersionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSharedImageVersionResultOutput, error) { args := v.(LookupSharedImageVersionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getSharedImageVersion:getSharedImageVersion", args, LookupSharedImageVersionResultOutput{}, options).(LookupSharedImageVersionResultOutput), nil }).(LookupSharedImageVersionResultOutput) } // A collection of arguments for invoking getSharedImageVersion. type LookupSharedImageVersionOutputArgs struct { // The name of the Shared Image Gallery in which the Shared Image exists. GalleryName pulumi.StringInput `pulumi:"galleryName"` // The name of the Shared Image in which this Version exists. ImageName pulumi.StringInput `pulumi:"imageName"` // The name of the Image Version. // // > **Note:** You may specify `latest` to obtain the latest version or `recent` to obtain the most recently updated version. // // > **Note:** In 3.0, `latest` may return an image version with `excludeFromLatest` set to `true`. Starting from 4.0 onwards `latest` will not return image versions with `exludeFromLatest` set to `true`. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Shared Image Gallery exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Sort available versions taking SemVer versioning scheme into account. Defaults to `false`. SortVersionsBySemver pulumi.BoolPtrInput `pulumi:"sortVersionsBySemver"` // A mapping of tags assigned to the Shared Image. Tags pulumi.StringMapInput `pulumi:"tags"` } func (LookupSharedImageVersionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSharedImageVersionArgs)(nil)).Elem() } // A collection of values returned by getSharedImageVersion. type LookupSharedImageVersionResultOutput struct{ *pulumi.OutputState } func (LookupSharedImageVersionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSharedImageVersionResult)(nil)).Elem() } func (o LookupSharedImageVersionResultOutput) ToLookupSharedImageVersionResultOutput() LookupSharedImageVersionResultOutput { return o } func (o LookupSharedImageVersionResultOutput) ToLookupSharedImageVersionResultOutputWithContext(ctx context.Context) LookupSharedImageVersionResultOutput { return o } // Is this Image Version excluded from the `latest` filter? func (o LookupSharedImageVersionResultOutput) ExcludeFromLatest() pulumi.BoolOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) bool { return v.ExcludeFromLatest }).(pulumi.BoolOutput) } func (o LookupSharedImageVersionResultOutput) GalleryName() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.GalleryName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSharedImageVersionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSharedImageVersionResultOutput) ImageName() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.ImageName }).(pulumi.StringOutput) } // The supported Azure location where the Shared Image Gallery exists. func (o LookupSharedImageVersionResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.Location }).(pulumi.StringOutput) } // The ID of the Managed Image which was the source of this Shared Image Version. func (o LookupSharedImageVersionResultOutput) ManagedImageId() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.ManagedImageId }).(pulumi.StringOutput) } // The Azure Region in which this Image Version exists. func (o LookupSharedImageVersionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.Name }).(pulumi.StringOutput) } // The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version. func (o LookupSharedImageVersionResultOutput) OsDiskImageSizeGb() pulumi.IntOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) int { return v.OsDiskImageSizeGb }).(pulumi.IntOutput) } // The ID of the OS disk snapshot which was the source of this Shared Image Version. func (o LookupSharedImageVersionResultOutput) OsDiskSnapshotId() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.OsDiskSnapshotId }).(pulumi.StringOutput) } func (o LookupSharedImageVersionResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupSharedImageVersionResultOutput) SortVersionsBySemver() pulumi.BoolPtrOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) *bool { return v.SortVersionsBySemver }).(pulumi.BoolPtrOutput) } // A mapping of tags assigned to the Shared Image. func (o LookupSharedImageVersionResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // One or more `targetRegion` blocks as documented below. func (o LookupSharedImageVersionResultOutput) TargetRegions() GetSharedImageVersionTargetRegionArrayOutput { return o.ApplyT(func(v LookupSharedImageVersionResult) []GetSharedImageVersionTargetRegion { return v.TargetRegions }).(GetSharedImageVersionTargetRegionArrayOutput) } func init() { pulumi.RegisterOutputType(LookupSharedImageVersionResultOutput{}) }
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/compute/getManagedDisks.go
sdk/go/azure/compute/getManagedDisks.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 compute 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 Managed Disk. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := compute.GetManagedDisks(ctx, &compute.GetManagedDisksArgs{ // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("firstDiskId", existingAzurermManagedDisk.Disk[0].Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2023-04-02 func GetManagedDisks(ctx *pulumi.Context, args *GetManagedDisksArgs, opts ...pulumi.InvokeOption) (*GetManagedDisksResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetManagedDisksResult err := ctx.Invoke("azure:compute/getManagedDisks:getManagedDisks", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagedDisks. type GetManagedDisksArgs struct { // Specifies the name of the Resource Group where this Managed Disk exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getManagedDisks. type GetManagedDisksResult struct { // a `disk` block as detailed below. Disks []GetManagedDisksDisk `pulumi:"disks"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ResourceGroupName string `pulumi:"resourceGroupName"` } func GetManagedDisksOutput(ctx *pulumi.Context, args GetManagedDisksOutputArgs, opts ...pulumi.InvokeOption) GetManagedDisksResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetManagedDisksResultOutput, error) { args := v.(GetManagedDisksArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getManagedDisks:getManagedDisks", args, GetManagedDisksResultOutput{}, options).(GetManagedDisksResultOutput), nil }).(GetManagedDisksResultOutput) } // A collection of arguments for invoking getManagedDisks. type GetManagedDisksOutputArgs struct { // Specifies the name of the Resource Group where this Managed Disk exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetManagedDisksOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetManagedDisksArgs)(nil)).Elem() } // A collection of values returned by getManagedDisks. type GetManagedDisksResultOutput struct{ *pulumi.OutputState } func (GetManagedDisksResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetManagedDisksResult)(nil)).Elem() } func (o GetManagedDisksResultOutput) ToGetManagedDisksResultOutput() GetManagedDisksResultOutput { return o } func (o GetManagedDisksResultOutput) ToGetManagedDisksResultOutputWithContext(ctx context.Context) GetManagedDisksResultOutput { return o } // a `disk` block as detailed below. func (o GetManagedDisksResultOutput) Disks() GetManagedDisksDiskArrayOutput { return o.ApplyT(func(v GetManagedDisksResult) []GetManagedDisksDisk { return v.Disks }).(GetManagedDisksDiskArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetManagedDisksResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetManagedDisksResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetManagedDisksResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetManagedDisksResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetManagedDisksResultOutput{}) }
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/compute/extension.go
sdk/go/azure/compute/extension.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Machine Extension to provide post deployment configuration // and run automated tasks. // // > **Note:** Custom Script Extensions for Linux & Windows require that the `commandToExecute` returns a `0` exit code to be classified as successfully deployed. You can achieve this by appending `exit 0` to the end of your `commandToExecute`. // // > **Note:** Custom Script Extensions require that the Azure Virtual Machine Guest Agent is running on the Virtual Machine. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("acctni"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "~/.ssh/id_rsa.pub", // }, nil) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("example-machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{ // &compute.LinuxVirtualMachineAdminSshKeyArgs{ // Username: pulumi.String("adminuser"), // PublicKey: pulumi.String(invokeFile.Result), // }, // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = compute.NewExtension(ctx, "example", &compute.ExtensionArgs{ // Name: pulumi.String("hostname"), // VirtualMachineId: exampleLinuxVirtualMachine.ID(), // Publisher: pulumi.String("Microsoft.Azure.Extensions"), // Type: pulumi.String("CustomScript"), // TypeHandlerVersion: pulumi.String("2.0"), // Settings: pulumi.String(" {\n \\\"commandToExecute\\\": \\\"hostname && uptime\\\"\n }\n"), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // 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.Compute` - 2024-03-01 // // ## Import // // Virtual Machine Extensions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/extension:Extension example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/myVM/extensions/extensionName // ``` type Extension struct { pulumi.CustomResourceState // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. AutoUpgradeMinorVersion pulumi.BoolPtrOutput `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrOutput `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrOutput `pulumi:"failureSuppressionEnabled"` // The name of the virtual machine extension peering. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) ProtectedSettings pulumi.StringPtrOutput `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVaultPtrOutput `pulumi:"protectedSettingsFromKeyVault"` // Specifies the collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions pulumi.StringArrayOutput `pulumi:"provisionAfterExtensions"` // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. Publisher pulumi.StringOutput `pulumi:"publisher"` // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) Settings pulumi.StringPtrOutput `pulumi:"settings"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: Type pulumi.StringOutput `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. TypeHandlerVersion pulumi.StringOutput `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine. Changing this forces a new resource to be created VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` } // NewExtension registers a new resource with the given unique name, arguments, and options. func NewExtension(ctx *pulumi.Context, name string, args *ExtensionArgs, opts ...pulumi.ResourceOption) (*Extension, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Publisher == nil { return nil, errors.New("invalid value for required argument 'Publisher'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } if args.TypeHandlerVersion == nil { return nil, errors.New("invalid value for required argument 'TypeHandlerVersion'") } if args.VirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineId'") } if args.ProtectedSettings != nil { args.ProtectedSettings = pulumi.ToSecret(args.ProtectedSettings).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "protectedSettings", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Extension err := ctx.RegisterResource("azure:compute/extension:Extension", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExtension gets an existing Extension 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 GetExtension(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExtensionState, opts ...pulumi.ResourceOption) (*Extension, error) { var resource Extension err := ctx.ReadResource("azure:compute/extension:Extension", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Extension resources. type extensionState struct { // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. AutoUpgradeMinorVersion *bool `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled *bool `pulumi:"failureSuppressionEnabled"` // The name of the virtual machine extension peering. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) ProtectedSettings *string `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault *ExtensionProtectedSettingsFromKeyVault `pulumi:"protectedSettingsFromKeyVault"` // Specifies the collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions []string `pulumi:"provisionAfterExtensions"` // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. Publisher *string `pulumi:"publisher"` // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) Settings *string `pulumi:"settings"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: Type *string `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. TypeHandlerVersion *string `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine. Changing this forces a new resource to be created VirtualMachineId *string `pulumi:"virtualMachineId"` } type ExtensionState struct { // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. AutoUpgradeMinorVersion pulumi.BoolPtrInput // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrInput // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrInput // The name of the virtual machine extension peering. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) ProtectedSettings pulumi.StringPtrInput // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVaultPtrInput // Specifies the collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions pulumi.StringArrayInput // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. Publisher pulumi.StringPtrInput // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) Settings pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: Type pulumi.StringPtrInput // Specifies the version of the extension to use, available versions can be found using the Azure CLI. TypeHandlerVersion pulumi.StringPtrInput // The ID of the Virtual Machine. Changing this forces a new resource to be created VirtualMachineId pulumi.StringPtrInput } func (ExtensionState) ElementType() reflect.Type { return reflect.TypeOf((*extensionState)(nil)).Elem() } type extensionArgs struct { // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. AutoUpgradeMinorVersion *bool `pulumi:"autoUpgradeMinorVersion"` // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled *bool `pulumi:"automaticUpgradeEnabled"` // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled *bool `pulumi:"failureSuppressionEnabled"` // The name of the virtual machine extension peering. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) ProtectedSettings *string `pulumi:"protectedSettings"` // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault *ExtensionProtectedSettingsFromKeyVault `pulumi:"protectedSettingsFromKeyVault"` // Specifies the collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions []string `pulumi:"provisionAfterExtensions"` // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. Publisher string `pulumi:"publisher"` // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) Settings *string `pulumi:"settings"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: Type string `pulumi:"type"` // Specifies the version of the extension to use, available versions can be found using the Azure CLI. TypeHandlerVersion string `pulumi:"typeHandlerVersion"` // The ID of the Virtual Machine. Changing this forces a new resource to be created VirtualMachineId string `pulumi:"virtualMachineId"` } // The set of arguments for constructing a Extension resource. type ExtensionArgs struct { // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. AutoUpgradeMinorVersion pulumi.BoolPtrInput // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? AutomaticUpgradeEnabled pulumi.BoolPtrInput // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. FailureSuppressionEnabled pulumi.BoolPtrInput // The name of the virtual machine extension peering. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) ProtectedSettings pulumi.StringPtrInput // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` ProtectedSettingsFromKeyVault ExtensionProtectedSettingsFromKeyVaultPtrInput // Specifies the collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions pulumi.StringArrayInput // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. Publisher pulumi.StringInput // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) Settings pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: Type pulumi.StringInput // Specifies the version of the extension to use, available versions can be found using the Azure CLI. TypeHandlerVersion pulumi.StringInput // The ID of the Virtual Machine. Changing this forces a new resource to be created VirtualMachineId pulumi.StringInput } func (ExtensionArgs) ElementType() reflect.Type { return reflect.TypeOf((*extensionArgs)(nil)).Elem() } type ExtensionInput interface { pulumi.Input ToExtensionOutput() ExtensionOutput ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput } func (*Extension) ElementType() reflect.Type { return reflect.TypeOf((**Extension)(nil)).Elem() } func (i *Extension) ToExtensionOutput() ExtensionOutput { return i.ToExtensionOutputWithContext(context.Background()) } func (i *Extension) ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput { return pulumi.ToOutputWithContext(ctx, i).(ExtensionOutput) } // ExtensionArrayInput is an input type that accepts ExtensionArray and ExtensionArrayOutput values. // You can construct a concrete instance of `ExtensionArrayInput` via: // // ExtensionArray{ ExtensionArgs{...} } type ExtensionArrayInput interface { pulumi.Input ToExtensionArrayOutput() ExtensionArrayOutput ToExtensionArrayOutputWithContext(context.Context) ExtensionArrayOutput } type ExtensionArray []ExtensionInput func (ExtensionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Extension)(nil)).Elem() } func (i ExtensionArray) ToExtensionArrayOutput() ExtensionArrayOutput { return i.ToExtensionArrayOutputWithContext(context.Background()) } func (i ExtensionArray) ToExtensionArrayOutputWithContext(ctx context.Context) ExtensionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExtensionArrayOutput) } // ExtensionMapInput is an input type that accepts ExtensionMap and ExtensionMapOutput values. // You can construct a concrete instance of `ExtensionMapInput` via: // // ExtensionMap{ "key": ExtensionArgs{...} } type ExtensionMapInput interface { pulumi.Input ToExtensionMapOutput() ExtensionMapOutput ToExtensionMapOutputWithContext(context.Context) ExtensionMapOutput } type ExtensionMap map[string]ExtensionInput func (ExtensionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Extension)(nil)).Elem() } func (i ExtensionMap) ToExtensionMapOutput() ExtensionMapOutput { return i.ToExtensionMapOutputWithContext(context.Background()) } func (i ExtensionMap) ToExtensionMapOutputWithContext(ctx context.Context) ExtensionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExtensionMapOutput) } type ExtensionOutput struct{ *pulumi.OutputState } func (ExtensionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Extension)(nil)).Elem() } func (o ExtensionOutput) ToExtensionOutput() ExtensionOutput { return o } func (o ExtensionOutput) ToExtensionOutputWithContext(ctx context.Context) ExtensionOutput { return o } // Specifies if the platform deploys the latest minor version update to the `typeHandlerVersion` specified. func (o ExtensionOutput) AutoUpgradeMinorVersion() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Extension) pulumi.BoolPtrOutput { return v.AutoUpgradeMinorVersion }).(pulumi.BoolPtrOutput) } // Should the Extension be automatically updated whenever the Publisher releases a new version of this VM Extension? func (o ExtensionOutput) AutomaticUpgradeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Extension) pulumi.BoolPtrOutput { return v.AutomaticUpgradeEnabled }).(pulumi.BoolPtrOutput) } // Should failures from the extension be suppressed? Possible values are `true` or `false`. Defaults to `false`. // // > **Note:** Operational failures such as not connecting to the VM will not be suppressed regardless of the `failureSuppressionEnabled` value. func (o ExtensionOutput) FailureSuppressionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Extension) pulumi.BoolPtrOutput { return v.FailureSuppressionEnabled }).(pulumi.BoolPtrOutput) } // The name of the virtual machine extension peering. Changing this forces a new resource to be created. func (o ExtensionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The protectedSettings passed to the extension, like settings, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `protectedSettings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) func (o ExtensionOutput) ProtectedSettings() pulumi.StringPtrOutput { return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.ProtectedSettings }).(pulumi.StringPtrOutput) } // A `protectedSettingsFromKeyVault` block as defined below. // // > **Note:** `protectedSettingsFromKeyVault` cannot be used with `protectedSettings` func (o ExtensionOutput) ProtectedSettingsFromKeyVault() ExtensionProtectedSettingsFromKeyVaultPtrOutput { return o.ApplyT(func(v *Extension) ExtensionProtectedSettingsFromKeyVaultPtrOutput { return v.ProtectedSettingsFromKeyVault }).(ExtensionProtectedSettingsFromKeyVaultPtrOutput) } // Specifies the collection of extension names after which this extension needs to be provisioned. func (o ExtensionOutput) ProvisionAfterExtensions() pulumi.StringArrayOutput { return o.ApplyT(func(v *Extension) pulumi.StringArrayOutput { return v.ProvisionAfterExtensions }).(pulumi.StringArrayOutput) } // The publisher of the extension, available publishers can be found by using the Azure CLI. Changing this forces a new resource to be created. func (o ExtensionOutput) Publisher() pulumi.StringOutput { return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Publisher }).(pulumi.StringOutput) } // The settings passed to the extension, these are specified as a JSON object in a string. // // > **Note:** Certain VM Extensions require that the keys in the `settings` block are case sensitive. If you're seeing unhelpful errors, please ensure the keys are consistent with how Azure is expecting them (for instance, for the `JsonADDomainExtension` extension, the keys are expected to be in `TitleCase`.) func (o ExtensionOutput) Settings() pulumi.StringPtrOutput { return o.ApplyT(func(v *Extension) pulumi.StringPtrOutput { return v.Settings }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o ExtensionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Extension) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The type of extension, available types for a publisher can be found using the Azure CLI. // // > **Note:** The `Publisher` and `Type` of Virtual Machine Extensions can be found using the Azure CLI, via: func (o ExtensionOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) } // Specifies the version of the extension to use, available versions can be found using the Azure CLI. func (o ExtensionOutput) TypeHandlerVersion() pulumi.StringOutput { return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.TypeHandlerVersion }).(pulumi.StringOutput) } // The ID of the Virtual Machine. Changing this forces a new resource to be created func (o ExtensionOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *Extension) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput) } type ExtensionArrayOutput struct{ *pulumi.OutputState } func (ExtensionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Extension)(nil)).Elem() } func (o ExtensionArrayOutput) ToExtensionArrayOutput() ExtensionArrayOutput { return o } func (o ExtensionArrayOutput) ToExtensionArrayOutputWithContext(ctx context.Context) ExtensionArrayOutput { return o } func (o ExtensionArrayOutput) Index(i pulumi.IntInput) ExtensionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Extension { return vs[0].([]*Extension)[vs[1].(int)] }).(ExtensionOutput) } type ExtensionMapOutput struct{ *pulumi.OutputState } func (ExtensionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Extension)(nil)).Elem() } func (o ExtensionMapOutput) ToExtensionMapOutput() ExtensionMapOutput { return o } func (o ExtensionMapOutput) ToExtensionMapOutputWithContext(ctx context.Context) ExtensionMapOutput { return o } func (o ExtensionMapOutput) MapIndex(k pulumi.StringInput) ExtensionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Extension { return vs[0].(map[string]*Extension)[vs[1].(string)] }).(ExtensionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExtensionInput)(nil)).Elem(), &Extension{}) pulumi.RegisterInputType(reflect.TypeOf((*ExtensionArrayInput)(nil)).Elem(), ExtensionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExtensionMapInput)(nil)).Elem(), ExtensionMap{}) pulumi.RegisterOutputType(ExtensionOutput{}) pulumi.RegisterOutputType(ExtensionArrayOutput{}) pulumi.RegisterOutputType(ExtensionMapOutput{}) }
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/compute/restorePointCollection.go
sdk/go/azure/compute/restorePointCollection.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Machine Restore Point Collection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "~/.ssh/id_rsa.pub", // }, nil) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("example-machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{ // &compute.LinuxVirtualMachineAdminSshKeyArgs{ // Username: pulumi.String("adminuser"), // PublicKey: pulumi.String(invokeFile.Result), // }, // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = compute.NewRestorePointCollection(ctx, "example", &compute.RestorePointCollectionArgs{ // Name: pulumi.String("example-collection"), // ResourceGroupName: example.Name, // Location: exampleLinuxVirtualMachine.Location, // SourceVirtualMachineId: exampleLinuxVirtualMachine.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.Compute` - 2024-03-01 // // ## Import // // Virtual Machine Restore Point Collections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/restorePointCollection:RestorePointCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/restorePointCollections/collection1 // ``` type RestorePointCollection struct { pulumi.CustomResourceState // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. SourceVirtualMachineId pulumi.StringOutput `pulumi:"sourceVirtualMachineId"` // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewRestorePointCollection registers a new resource with the given unique name, arguments, and options. func NewRestorePointCollection(ctx *pulumi.Context, name string, args *RestorePointCollectionArgs, opts ...pulumi.ResourceOption) (*RestorePointCollection, 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.SourceVirtualMachineId == nil { return nil, errors.New("invalid value for required argument 'SourceVirtualMachineId'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:compute/virtualMachineRestorePointCollection:VirtualMachineRestorePointCollection"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource RestorePointCollection err := ctx.RegisterResource("azure:compute/restorePointCollection:RestorePointCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRestorePointCollection gets an existing RestorePointCollection 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 GetRestorePointCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RestorePointCollectionState, opts ...pulumi.ResourceOption) (*RestorePointCollection, error) { var resource RestorePointCollection err := ctx.ReadResource("azure:compute/restorePointCollection:RestorePointCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RestorePointCollection resources. type restorePointCollectionState struct { // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. SourceVirtualMachineId *string `pulumi:"sourceVirtualMachineId"` // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. Tags map[string]string `pulumi:"tags"` } type RestorePointCollectionState struct { // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. SourceVirtualMachineId pulumi.StringPtrInput // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. Tags pulumi.StringMapInput } func (RestorePointCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*restorePointCollectionState)(nil)).Elem() } type restorePointCollectionArgs struct { // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. SourceVirtualMachineId string `pulumi:"sourceVirtualMachineId"` // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a RestorePointCollection resource. type RestorePointCollectionArgs struct { // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. SourceVirtualMachineId pulumi.StringInput // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. Tags pulumi.StringMapInput } func (RestorePointCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*restorePointCollectionArgs)(nil)).Elem() } type RestorePointCollectionInput interface { pulumi.Input ToRestorePointCollectionOutput() RestorePointCollectionOutput ToRestorePointCollectionOutputWithContext(ctx context.Context) RestorePointCollectionOutput } func (*RestorePointCollection) ElementType() reflect.Type { return reflect.TypeOf((**RestorePointCollection)(nil)).Elem() } func (i *RestorePointCollection) ToRestorePointCollectionOutput() RestorePointCollectionOutput { return i.ToRestorePointCollectionOutputWithContext(context.Background()) } func (i *RestorePointCollection) ToRestorePointCollectionOutputWithContext(ctx context.Context) RestorePointCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointCollectionOutput) } // RestorePointCollectionArrayInput is an input type that accepts RestorePointCollectionArray and RestorePointCollectionArrayOutput values. // You can construct a concrete instance of `RestorePointCollectionArrayInput` via: // // RestorePointCollectionArray{ RestorePointCollectionArgs{...} } type RestorePointCollectionArrayInput interface { pulumi.Input ToRestorePointCollectionArrayOutput() RestorePointCollectionArrayOutput ToRestorePointCollectionArrayOutputWithContext(context.Context) RestorePointCollectionArrayOutput } type RestorePointCollectionArray []RestorePointCollectionInput func (RestorePointCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RestorePointCollection)(nil)).Elem() } func (i RestorePointCollectionArray) ToRestorePointCollectionArrayOutput() RestorePointCollectionArrayOutput { return i.ToRestorePointCollectionArrayOutputWithContext(context.Background()) } func (i RestorePointCollectionArray) ToRestorePointCollectionArrayOutputWithContext(ctx context.Context) RestorePointCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointCollectionArrayOutput) } // RestorePointCollectionMapInput is an input type that accepts RestorePointCollectionMap and RestorePointCollectionMapOutput values. // You can construct a concrete instance of `RestorePointCollectionMapInput` via: // // RestorePointCollectionMap{ "key": RestorePointCollectionArgs{...} } type RestorePointCollectionMapInput interface { pulumi.Input ToRestorePointCollectionMapOutput() RestorePointCollectionMapOutput ToRestorePointCollectionMapOutputWithContext(context.Context) RestorePointCollectionMapOutput } type RestorePointCollectionMap map[string]RestorePointCollectionInput func (RestorePointCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RestorePointCollection)(nil)).Elem() } func (i RestorePointCollectionMap) ToRestorePointCollectionMapOutput() RestorePointCollectionMapOutput { return i.ToRestorePointCollectionMapOutputWithContext(context.Background()) } func (i RestorePointCollectionMap) ToRestorePointCollectionMapOutputWithContext(ctx context.Context) RestorePointCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointCollectionMapOutput) } type RestorePointCollectionOutput struct{ *pulumi.OutputState } func (RestorePointCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**RestorePointCollection)(nil)).Elem() } func (o RestorePointCollectionOutput) ToRestorePointCollectionOutput() RestorePointCollectionOutput { return o } func (o RestorePointCollectionOutput) ToRestorePointCollectionOutputWithContext(ctx context.Context) RestorePointCollectionOutput { return o } // The Azure location where the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. func (o RestorePointCollectionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *RestorePointCollection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. func (o RestorePointCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RestorePointCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group in which the Virtual Machine Restore Point Collection should exist. Changing this forces a new resource to be created. func (o RestorePointCollectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *RestorePointCollection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the virtual machine that will be associated with this Virtual Machine Restore Point Collection. Changing this forces a new resource to be created. func (o RestorePointCollectionOutput) SourceVirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v *RestorePointCollection) pulumi.StringOutput { return v.SourceVirtualMachineId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to this Virtual Machine Restore Point Collection. func (o RestorePointCollectionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *RestorePointCollection) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type RestorePointCollectionArrayOutput struct{ *pulumi.OutputState } func (RestorePointCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RestorePointCollection)(nil)).Elem() } func (o RestorePointCollectionArrayOutput) ToRestorePointCollectionArrayOutput() RestorePointCollectionArrayOutput { return o } func (o RestorePointCollectionArrayOutput) ToRestorePointCollectionArrayOutputWithContext(ctx context.Context) RestorePointCollectionArrayOutput { return o } func (o RestorePointCollectionArrayOutput) Index(i pulumi.IntInput) RestorePointCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RestorePointCollection { return vs[0].([]*RestorePointCollection)[vs[1].(int)] }).(RestorePointCollectionOutput) } type RestorePointCollectionMapOutput struct{ *pulumi.OutputState } func (RestorePointCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RestorePointCollection)(nil)).Elem() } func (o RestorePointCollectionMapOutput) ToRestorePointCollectionMapOutput() RestorePointCollectionMapOutput { return o } func (o RestorePointCollectionMapOutput) ToRestorePointCollectionMapOutputWithContext(ctx context.Context) RestorePointCollectionMapOutput { return o } func (o RestorePointCollectionMapOutput) MapIndex(k pulumi.StringInput) RestorePointCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RestorePointCollection { return vs[0].(map[string]*RestorePointCollection)[vs[1].(string)] }).(RestorePointCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RestorePointCollectionInput)(nil)).Elem(), &RestorePointCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*RestorePointCollectionArrayInput)(nil)).Elem(), RestorePointCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RestorePointCollectionMapInput)(nil)).Elem(), RestorePointCollectionMap{}) pulumi.RegisterOutputType(RestorePointCollectionOutput{}) pulumi.RegisterOutputType(RestorePointCollectionArrayOutput{}) pulumi.RegisterOutputType(RestorePointCollectionMapOutput{}) }
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/compute/getDedicatedHost.go
sdk/go/azure/compute/getDedicatedHost.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 compute 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 Dedicated Host. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.LookupDedicatedHost(ctx, &compute.LookupDedicatedHostArgs{ // Name: "example-host", // DedicatedHostGroupName: "example-host-group", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("dedicatedHostId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2024-03-01 func LookupDedicatedHost(ctx *pulumi.Context, args *LookupDedicatedHostArgs, opts ...pulumi.InvokeOption) (*LookupDedicatedHostResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDedicatedHostResult err := ctx.Invoke("azure:compute/getDedicatedHost:getDedicatedHost", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDedicatedHost. type LookupDedicatedHostArgs struct { // Specifies the name of the Dedicated Host Group the Dedicated Host is located in. DedicatedHostGroupName string `pulumi:"dedicatedHostGroupName"` // Specifies the name of the Dedicated Host. Name string `pulumi:"name"` // Specifies the name of the resource group the Dedicated Host is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDedicatedHost. type LookupDedicatedHostResult struct { DedicatedHostGroupName string `pulumi:"dedicatedHostGroupName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The location where the Dedicated Host exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Dedicated Host. Tags map[string]string `pulumi:"tags"` } func LookupDedicatedHostOutput(ctx *pulumi.Context, args LookupDedicatedHostOutputArgs, opts ...pulumi.InvokeOption) LookupDedicatedHostResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDedicatedHostResultOutput, error) { args := v.(LookupDedicatedHostArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getDedicatedHost:getDedicatedHost", args, LookupDedicatedHostResultOutput{}, options).(LookupDedicatedHostResultOutput), nil }).(LookupDedicatedHostResultOutput) } // A collection of arguments for invoking getDedicatedHost. type LookupDedicatedHostOutputArgs struct { // Specifies the name of the Dedicated Host Group the Dedicated Host is located in. DedicatedHostGroupName pulumi.StringInput `pulumi:"dedicatedHostGroupName"` // Specifies the name of the Dedicated Host. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Dedicated Host is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDedicatedHostOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDedicatedHostArgs)(nil)).Elem() } // A collection of values returned by getDedicatedHost. type LookupDedicatedHostResultOutput struct{ *pulumi.OutputState } func (LookupDedicatedHostResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDedicatedHostResult)(nil)).Elem() } func (o LookupDedicatedHostResultOutput) ToLookupDedicatedHostResultOutput() LookupDedicatedHostResultOutput { return o } func (o LookupDedicatedHostResultOutput) ToLookupDedicatedHostResultOutputWithContext(ctx context.Context) LookupDedicatedHostResultOutput { return o } func (o LookupDedicatedHostResultOutput) DedicatedHostGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDedicatedHostResult) string { return v.DedicatedHostGroupName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupDedicatedHostResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDedicatedHostResult) string { return v.Id }).(pulumi.StringOutput) } // The location where the Dedicated Host exists. func (o LookupDedicatedHostResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupDedicatedHostResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupDedicatedHostResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupDedicatedHostResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupDedicatedHostResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDedicatedHostResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Dedicated Host. func (o LookupDedicatedHostResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupDedicatedHostResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupDedicatedHostResultOutput{}) }
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/compute/getAvailabilitySet.go
sdk/go/azure/compute/getAvailabilitySet.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 compute 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 Availability Set. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.LookupAvailabilitySet(ctx, &compute.LookupAvailabilitySetArgs{ // Name: "tf-appsecuritygroup", // ResourceGroupName: "my-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("availabilitySetId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2024-03-01 func LookupAvailabilitySet(ctx *pulumi.Context, args *LookupAvailabilitySetArgs, opts ...pulumi.InvokeOption) (*LookupAvailabilitySetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAvailabilitySetResult err := ctx.Invoke("azure:compute/getAvailabilitySet:getAvailabilitySet", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAvailabilitySet. type LookupAvailabilitySetArgs struct { // The name of the Availability Set. Name string `pulumi:"name"` // The name of the resource group in which the Availability Set exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getAvailabilitySet. type LookupAvailabilitySetResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The supported Azure location where the Availability Set exists. Location string `pulumi:"location"` // Whether the availability set is managed or not. Managed bool `pulumi:"managed"` Name string `pulumi:"name"` // The number of fault domains that are used. PlatformFaultDomainCount string `pulumi:"platformFaultDomainCount"` // The number of update domains that are used. PlatformUpdateDomainCount string `pulumi:"platformUpdateDomainCount"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupAvailabilitySetOutput(ctx *pulumi.Context, args LookupAvailabilitySetOutputArgs, opts ...pulumi.InvokeOption) LookupAvailabilitySetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAvailabilitySetResultOutput, error) { args := v.(LookupAvailabilitySetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getAvailabilitySet:getAvailabilitySet", args, LookupAvailabilitySetResultOutput{}, options).(LookupAvailabilitySetResultOutput), nil }).(LookupAvailabilitySetResultOutput) } // A collection of arguments for invoking getAvailabilitySet. type LookupAvailabilitySetOutputArgs struct { // The name of the Availability Set. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group in which the Availability Set exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupAvailabilitySetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupAvailabilitySetArgs)(nil)).Elem() } // A collection of values returned by getAvailabilitySet. type LookupAvailabilitySetResultOutput struct{ *pulumi.OutputState } func (LookupAvailabilitySetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupAvailabilitySetResult)(nil)).Elem() } func (o LookupAvailabilitySetResultOutput) ToLookupAvailabilitySetResultOutput() LookupAvailabilitySetResultOutput { return o } func (o LookupAvailabilitySetResultOutput) ToLookupAvailabilitySetResultOutputWithContext(ctx context.Context) LookupAvailabilitySetResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupAvailabilitySetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.Id }).(pulumi.StringOutput) } // The supported Azure location where the Availability Set exists. func (o LookupAvailabilitySetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.Location }).(pulumi.StringOutput) } // Whether the availability set is managed or not. func (o LookupAvailabilitySetResultOutput) Managed() pulumi.BoolOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) bool { return v.Managed }).(pulumi.BoolOutput) } func (o LookupAvailabilitySetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.Name }).(pulumi.StringOutput) } // The number of fault domains that are used. func (o LookupAvailabilitySetResultOutput) PlatformFaultDomainCount() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.PlatformFaultDomainCount }).(pulumi.StringOutput) } // The number of update domains that are used. func (o LookupAvailabilitySetResultOutput) PlatformUpdateDomainCount() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.PlatformUpdateDomainCount }).(pulumi.StringOutput) } func (o LookupAvailabilitySetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupAvailabilitySetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupAvailabilitySetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupAvailabilitySetResultOutput{}) }
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/compute/scaleSet.go
sdk/go/azure/compute/scaleSet.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a virtual machine scale set. // // ## Example Usage // // ### With Managed Disks (Recommended) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // DomainNameLabel: example.Name, // Tags: pulumi.StringMap{ // "environment": pulumi.String("staging"), // }, // }) // if err != nil { // return err // } // exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("PublicIPAddress"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // bpepool, err := lb.NewBackendAddressPool(ctx, "bpepool", &lb.BackendAddressPoolArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("BackEndAddressPool"), // }) // if err != nil { // return err // } // lbnatpool, err := lb.NewNatPool(ctx, "lbnatpool", &lb.NatPoolArgs{ // ResourceGroupName: example.Name, // Name: pulumi.String("ssh"), // LoadbalancerId: exampleLoadBalancer.ID(), // Protocol: pulumi.String("Tcp"), // FrontendPortStart: pulumi.Int(50000), // FrontendPortEnd: pulumi.Int(50119), // BackendPort: pulumi.Int(22), // FrontendIpConfigurationName: pulumi.String("PublicIPAddress"), // }) // if err != nil { // return err // } // exampleProbe, err := lb.NewProbe(ctx, "example", &lb.ProbeArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("http-probe"), // Protocol: pulumi.String("Http"), // RequestPath: pulumi.String("/health"), // Port: pulumi.Int(8080), // }) // if err != nil { // return err // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "~/.ssh/demo_key.pub", // }, nil) // if err != nil { // return err // } // _, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{ // Name: pulumi.String("mytestscaleset-1"), // Location: example.Location, // ResourceGroupName: example.Name, // AutomaticOsUpgrade: pulumi.Bool(true), // UpgradePolicyMode: pulumi.String("Rolling"), // RollingUpgradePolicy: &compute.ScaleSetRollingUpgradePolicyArgs{ // MaxBatchInstancePercent: pulumi.Int(20), // MaxUnhealthyInstancePercent: pulumi.Int(20), // MaxUnhealthyUpgradedInstancePercent: pulumi.Int(5), // PauseTimeBetweenBatches: pulumi.String("PT0S"), // }, // HealthProbeId: exampleProbe.ID(), // Sku: &compute.ScaleSetSkuArgs{ // Name: pulumi.String("Standard_F2"), // Tier: pulumi.String("Standard"), // Capacity: pulumi.Int(2), // }, // StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // StorageProfileOsDisk: &compute.ScaleSetStorageProfileOsDiskArgs{ // Name: pulumi.String(""), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // ManagedDiskType: pulumi.String("Standard_LRS"), // }, // StorageProfileDataDisks: compute.ScaleSetStorageProfileDataDiskArray{ // &compute.ScaleSetStorageProfileDataDiskArgs{ // Lun: pulumi.Int(0), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("Empty"), // DiskSizeGb: pulumi.Int(10), // }, // }, // OsProfile: &compute.ScaleSetOsProfileArgs{ // ComputerNamePrefix: pulumi.String("testvm"), // AdminUsername: pulumi.String("myadmin"), // }, // OsProfileLinuxConfig: &compute.ScaleSetOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(true), // SshKeys: compute.ScaleSetOsProfileLinuxConfigSshKeyArray{ // &compute.ScaleSetOsProfileLinuxConfigSshKeyArgs{ // Path: pulumi.String("/home/myadmin/.ssh/authorized_keys"), // KeyData: pulumi.String(invokeFile.Result), // }, // }, // }, // NetworkProfiles: compute.ScaleSetNetworkProfileArray{ // &compute.ScaleSetNetworkProfileArgs{ // Name: pulumi.String("mynetworkprofile"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.ScaleSetNetworkProfileIpConfigurationArray{ // &compute.ScaleSetNetworkProfileIpConfigurationArgs{ // Name: pulumi.String("TestIPConfiguration"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // LoadBalancerBackendAddressPoolIds: pulumi.StringArray{ // bpepool.ID(), // }, // LoadBalancerInboundNatRulesIds: pulumi.StringArray{ // lbnatpool.ID(), // }, // }, // }, // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("staging"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### With Unmanaged Disks // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("accsa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // Tags: pulumi.StringMap{ // "environment": pulumi.String("staging"), // }, // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("vhds"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "~/.ssh/demo_key.pub", // }, nil) // if err != nil { // return err // } // _, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{ // Name: pulumi.String("mytestscaleset-1"), // Location: example.Location, // ResourceGroupName: example.Name, // UpgradePolicyMode: pulumi.String("Manual"), // Sku: &compute.ScaleSetSkuArgs{ // Name: pulumi.String("Standard_F2"), // Tier: pulumi.String("Standard"), // Capacity: pulumi.Int(2), // }, // OsProfile: &compute.ScaleSetOsProfileArgs{ // ComputerNamePrefix: pulumi.String("testvm"), // AdminUsername: pulumi.String("myadmin"), // }, // OsProfileLinuxConfig: &compute.ScaleSetOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(true), // SshKeys: compute.ScaleSetOsProfileLinuxConfigSshKeyArray{ // &compute.ScaleSetOsProfileLinuxConfigSshKeyArgs{ // Path: pulumi.String("/home/myadmin/.ssh/authorized_keys"), // KeyData: pulumi.String(invokeFile.Result), // }, // }, // }, // NetworkProfiles: compute.ScaleSetNetworkProfileArray{ // &compute.ScaleSetNetworkProfileArgs{ // Name: pulumi.String("TestNetworkProfile"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.ScaleSetNetworkProfileIpConfigurationArray{ // &compute.ScaleSetNetworkProfileIpConfigurationArgs{ // Name: pulumi.String("TestIPConfiguration"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }, // StorageProfileOsDisk: &compute.ScaleSetStorageProfileOsDiskArgs{ // Name: pulumi.String("osDiskProfile"), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // VhdContainers: pulumi.StringArray{ // pulumi.All(exampleAccount.PrimaryBlobEndpoint, exampleContainer.Name).ApplyT(func(_args []interface{}) (string, error) { // primaryBlobEndpoint := _args[0].(string) // name := _args[1].(string) // return fmt.Sprintf("%v%v", primaryBlobEndpoint, name), nil // }).(pulumi.StringOutput), // }, // }, // StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Example of storageProfileImageReference with id // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.NewImage(ctx, "example", &compute.ImageArgs{ // Name: pulumi.String("test"), // }) // if err != nil { // return err // } // _, err = compute.NewScaleSet(ctx, "example", &compute.ScaleSetArgs{ // Name: pulumi.String("test"), // StorageProfileImageReference: &compute.ScaleSetStorageProfileImageReferenceArgs{ // Id: example.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.Compute` - 2024-11-01 // // ## Import // // Virtual Machine Scale Sets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/scaleSet:ScaleSet scaleset1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachineScaleSets/scaleset1 // ``` type ScaleSet struct { pulumi.CustomResourceState // Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when `upgradePolicyMode` is set to `Rolling`. Defaults to `false`. AutomaticOsUpgrade pulumi.BoolPtrOutput `pulumi:"automaticOsUpgrade"` // A `bootDiagnostics` block as referenced below. BootDiagnostics ScaleSetBootDiagnosticsPtrOutput `pulumi:"bootDiagnostics"` // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** `evictionPolicy` can only be set when `priority` is set to `Low`. EvictionPolicy pulumi.StringPtrOutput `pulumi:"evictionPolicy"` // Can be specified multiple times to add extension profiles to the scale set. Each `extension` block supports the fields documented below. Extensions ScaleSetExtensionArrayOutput `pulumi:"extensions"` // Specifies the identifier for the load balancer health probe. Required when using `Rolling` as your `upgradePolicyMode`. HealthProbeId pulumi.StringPtrOutput `pulumi:"healthProbeId"` // An `identity` block as defined below. Identity ScaleSetIdentityPtrOutput `pulumi:"identity"` // (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are `Windows_Client` and `Windows_Server`. LicenseType pulumi.StringOutput `pulumi:"licenseType"` // 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 virtual machine scale set resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A collection of `networkProfile` blocks as documented below. NetworkProfiles ScaleSetNetworkProfileArrayOutput `pulumi:"networkProfiles"` // A `osProfile` block as documented below. OsProfile ScaleSetOsProfileOutput `pulumi:"osProfile"` // A `osProfileLinuxConfig` block as documented below. OsProfileLinuxConfig ScaleSetOsProfileLinuxConfigOutput `pulumi:"osProfileLinuxConfig"` // A collection of `osProfileSecrets` blocks as documented below. OsProfileSecrets ScaleSetOsProfileSecretArrayOutput `pulumi:"osProfileSecrets"` // A `osProfileWindowsConfig` block as documented below. OsProfileWindowsConfig ScaleSetOsProfileWindowsConfigPtrOutput `pulumi:"osProfileWindowsConfig"` // Specifies whether the virtual machine scale set should be overprovisioned. Defaults to `true`. Overprovision pulumi.BoolPtrOutput `pulumi:"overprovision"` // A `plan` block as documented below. Plan ScaleSetPlanPtrOutput `pulumi:"plan"` // Specifies the priority for the Virtual Machines in the Scale Set. Possible values are `Low` and `Regular`. Changing this forces a new resource to be created. Priority pulumi.StringPtrOutput `pulumi:"priority"` // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created ProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"proximityPlacementGroupId"` // The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `rollingUpgradePolicy` block as defined below. This is only applicable when the `upgradePolicyMode` is `Rolling`. RollingUpgradePolicy ScaleSetRollingUpgradePolicyPtrOutput `pulumi:"rollingUpgradePolicy"` // Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See [documentation](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups) for more information. Defaults to `true`. SinglePlacementGroup pulumi.BoolPtrOutput `pulumi:"singlePlacementGroup"` // A `sku` block as documented below. Sku ScaleSetSkuOutput `pulumi:"sku"` // A `storageProfileDataDisk` block as documented below. StorageProfileDataDisks ScaleSetStorageProfileDataDiskArrayOutput `pulumi:"storageProfileDataDisks"` // A `storageProfileImageReference` block as documented below. StorageProfileImageReference ScaleSetStorageProfileImageReferenceOutput `pulumi:"storageProfileImageReference"` // A `storageProfileOsDisk` block as documented below. StorageProfileOsDisk ScaleSetStorageProfileOsDiskOutput `pulumi:"storageProfileOsDisk"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, `Rolling`, `Manual`, or `Automatic`. When choosing `Rolling`, you will need to set a health probe. UpgradePolicyMode pulumi.StringOutput `pulumi:"upgradePolicyMode"` // A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created. // // > **NOTE:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewScaleSet registers a new resource with the given unique name, arguments, and options. func NewScaleSet(ctx *pulumi.Context, name string, args *ScaleSetArgs, opts ...pulumi.ResourceOption) (*ScaleSet, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkProfiles == nil { return nil, errors.New("invalid value for required argument 'NetworkProfiles'") } if args.OsProfile == nil { return nil, errors.New("invalid value for required argument 'OsProfile'") } 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'") } if args.StorageProfileOsDisk == nil { return nil, errors.New("invalid value for required argument 'StorageProfileOsDisk'") } if args.UpgradePolicyMode == nil { return nil, errors.New("invalid value for required argument 'UpgradePolicyMode'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScaleSet err := ctx.RegisterResource("azure:compute/scaleSet:ScaleSet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScaleSet gets an existing ScaleSet 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 GetScaleSet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScaleSetState, opts ...pulumi.ResourceOption) (*ScaleSet, error) { var resource ScaleSet err := ctx.ReadResource("azure:compute/scaleSet:ScaleSet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScaleSet resources. type scaleSetState struct { // Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when `upgradePolicyMode` is set to `Rolling`. Defaults to `false`. AutomaticOsUpgrade *bool `pulumi:"automaticOsUpgrade"` // A `bootDiagnostics` block as referenced below. BootDiagnostics *ScaleSetBootDiagnostics `pulumi:"bootDiagnostics"` // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** `evictionPolicy` can only be set when `priority` is set to `Low`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Can be specified multiple times to add extension profiles to the scale set. Each `extension` block supports the fields documented below. Extensions []ScaleSetExtension `pulumi:"extensions"` // Specifies the identifier for the load balancer health probe. Required when using `Rolling` as your `upgradePolicyMode`. HealthProbeId *string `pulumi:"healthProbeId"` // An `identity` block as defined below. Identity *ScaleSetIdentity `pulumi:"identity"` // (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are `Windows_Client` and `Windows_Server`. LicenseType *string `pulumi:"licenseType"` // 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 virtual machine scale set resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A collection of `networkProfile` blocks as documented below. NetworkProfiles []ScaleSetNetworkProfile `pulumi:"networkProfiles"` // A `osProfile` block as documented below. OsProfile *ScaleSetOsProfile `pulumi:"osProfile"` // A `osProfileLinuxConfig` block as documented below. OsProfileLinuxConfig *ScaleSetOsProfileLinuxConfig `pulumi:"osProfileLinuxConfig"` // A collection of `osProfileSecrets` blocks as documented below. OsProfileSecrets []ScaleSetOsProfileSecret `pulumi:"osProfileSecrets"` // A `osProfileWindowsConfig` block as documented below. OsProfileWindowsConfig *ScaleSetOsProfileWindowsConfig `pulumi:"osProfileWindowsConfig"` // Specifies whether the virtual machine scale set should be overprovisioned. Defaults to `true`. Overprovision *bool `pulumi:"overprovision"` // A `plan` block as documented below. Plan *ScaleSetPlan `pulumi:"plan"` // Specifies the priority for the Virtual Machines in the Scale Set. Possible values are `Low` and `Regular`. Changing this forces a new resource to be created. Priority *string `pulumi:"priority"` // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created ProximityPlacementGroupId *string `pulumi:"proximityPlacementGroupId"` // The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `rollingUpgradePolicy` block as defined below. This is only applicable when the `upgradePolicyMode` is `Rolling`. RollingUpgradePolicy *ScaleSetRollingUpgradePolicy `pulumi:"rollingUpgradePolicy"` // Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See [documentation](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups) for more information. Defaults to `true`. SinglePlacementGroup *bool `pulumi:"singlePlacementGroup"` // A `sku` block as documented below. Sku *ScaleSetSku `pulumi:"sku"` // A `storageProfileDataDisk` block as documented below. StorageProfileDataDisks []ScaleSetStorageProfileDataDisk `pulumi:"storageProfileDataDisks"` // A `storageProfileImageReference` block as documented below. StorageProfileImageReference *ScaleSetStorageProfileImageReference `pulumi:"storageProfileImageReference"` // A `storageProfileOsDisk` block as documented below. StorageProfileOsDisk *ScaleSetStorageProfileOsDisk `pulumi:"storageProfileOsDisk"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, `Rolling`, `Manual`, or `Automatic`. When choosing `Rolling`, you will need to set a health probe. UpgradePolicyMode *string `pulumi:"upgradePolicyMode"` // A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created. // // > **NOTE:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } type ScaleSetState struct { // Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when `upgradePolicyMode` is set to `Rolling`. Defaults to `false`. AutomaticOsUpgrade pulumi.BoolPtrInput // A `bootDiagnostics` block as referenced below. BootDiagnostics ScaleSetBootDiagnosticsPtrInput // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** `evictionPolicy` can only be set when `priority` is set to `Low`. EvictionPolicy pulumi.StringPtrInput // Can be specified multiple times to add extension profiles to the scale set. Each `extension` block supports the fields documented below. Extensions ScaleSetExtensionArrayInput // Specifies the identifier for the load balancer health probe. Required when using `Rolling` as your `upgradePolicyMode`. HealthProbeId pulumi.StringPtrInput // An `identity` block as defined below. Identity ScaleSetIdentityPtrInput // (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are `Windows_Client` and `Windows_Server`. LicenseType 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 virtual machine scale set resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A collection of `networkProfile` blocks as documented below. NetworkProfiles ScaleSetNetworkProfileArrayInput // A `osProfile` block as documented below. OsProfile ScaleSetOsProfilePtrInput // A `osProfileLinuxConfig` block as documented below. OsProfileLinuxConfig ScaleSetOsProfileLinuxConfigPtrInput // A collection of `osProfileSecrets` blocks as documented below. OsProfileSecrets ScaleSetOsProfileSecretArrayInput // A `osProfileWindowsConfig` block as documented below. OsProfileWindowsConfig ScaleSetOsProfileWindowsConfigPtrInput // Specifies whether the virtual machine scale set should be overprovisioned. Defaults to `true`. Overprovision pulumi.BoolPtrInput // A `plan` block as documented below. Plan ScaleSetPlanPtrInput // Specifies the priority for the Virtual Machines in the Scale Set. Possible values are `Low` and `Regular`. Changing this forces a new resource to be created. Priority pulumi.StringPtrInput // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created ProximityPlacementGroupId pulumi.StringPtrInput // The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `rollingUpgradePolicy` block as defined below. This is only applicable when the `upgradePolicyMode` is `Rolling`. RollingUpgradePolicy ScaleSetRollingUpgradePolicyPtrInput // Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Changing this forces a new resource to be created. See [documentation](https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups) for more information. Defaults to `true`. SinglePlacementGroup pulumi.BoolPtrInput // A `sku` block as documented below. Sku ScaleSetSkuPtrInput // A `storageProfileDataDisk` block as documented below. StorageProfileDataDisks ScaleSetStorageProfileDataDiskArrayInput // A `storageProfileImageReference` block as documented below. StorageProfileImageReference ScaleSetStorageProfileImageReferencePtrInput // A `storageProfileOsDisk` block as documented below. StorageProfileOsDisk ScaleSetStorageProfileOsDiskPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, `Rolling`, `Manual`, or `Automatic`. When choosing `Rolling`, you will need to set a health probe. UpgradePolicyMode pulumi.StringPtrInput // A collection of availability zones to spread the Virtual Machines over. Changing this forces a new resource to be created. // // > **NOTE:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayInput } func (ScaleSetState) ElementType() reflect.Type { return reflect.TypeOf((*scaleSetState)(nil)).Elem() } type scaleSetArgs struct { // Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when `upgradePolicyMode` is set to `Rolling`. Defaults to `false`. AutomaticOsUpgrade *bool `pulumi:"automaticOsUpgrade"` // A `bootDiagnostics` block as referenced below. BootDiagnostics *ScaleSetBootDiagnostics `pulumi:"bootDiagnostics"` // Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** `evictionPolicy` can only be set when `priority` is set to `Low`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Can be specified multiple times to add extension profiles to the scale set. Each `extension` block supports the fields documented below. Extensions []ScaleSetExtension `pulumi:"extensions"` // Specifies the identifier for the load balancer health probe. Required when using `Rolling` as your `upgradePolicyMode`. HealthProbeId *string `pulumi:"healthProbeId"` // An `identity` block as defined below. Identity *ScaleSetIdentity `pulumi:"identity"` // (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are `Windows_Client` and `Windows_Server`. LicenseType *string `pulumi:"licenseType"` // 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 virtual machine scale set resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A collection of `networkProfile` blocks as documented below. NetworkProfiles []ScaleSetNetworkProfile `pulumi:"networkProfiles"` // A `osProfile` block as documented below. OsProfile ScaleSetOsProfile `pulumi:"osProfile"` // A `osProfileLinuxConfig` block as documented below. OsProfileLinuxConfig *ScaleSetOsProfileLinuxConfig `pulumi:"osProfileLinuxConfig"` // A collection of `osProfileSecrets` blocks as documented below. OsProfileSecrets []ScaleSetOsProfileSecret `pulumi:"osProfileSecrets"` // A `osProfileWindowsConfig` block as documented below. OsProfileWindowsConfig *ScaleSetOsProfileWindowsConfig `pulumi:"osProfileWindowsConfig"` // Specifies whether the virtual machine scale set should be overprovisioned. Defaults to `true`. Overprovision *bool `pulumi:"overprovision"` // A `plan` block as documented below. Plan *ScaleSetPlan `pulumi:"plan"`
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/compute/getOrchestratedVirtualMachineScaleSet.go
sdk/go/azure/compute/getOrchestratedVirtualMachineScaleSet.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 compute 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 Orchestrated Virtual Machine Scale Set. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := compute.LookupOrchestratedVirtualMachineScaleSet(ctx, &compute.LookupOrchestratedVirtualMachineScaleSetArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, 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.Compute` - 2024-11-01 func LookupOrchestratedVirtualMachineScaleSet(ctx *pulumi.Context, args *LookupOrchestratedVirtualMachineScaleSetArgs, opts ...pulumi.InvokeOption) (*LookupOrchestratedVirtualMachineScaleSetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupOrchestratedVirtualMachineScaleSetResult err := ctx.Invoke("azure:compute/getOrchestratedVirtualMachineScaleSet:getOrchestratedVirtualMachineScaleSet", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getOrchestratedVirtualMachineScaleSet. type LookupOrchestratedVirtualMachineScaleSetArgs struct { // The name of this Orchestrated Virtual Machine Scale Set. Name string `pulumi:"name"` // The name of the Resource Group where the Orchestrated Virtual Machine Scale Set exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getOrchestratedVirtualMachineScaleSet. type LookupOrchestratedVirtualMachineScaleSetResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `identity` block as defined below. Identities []GetOrchestratedVirtualMachineScaleSetIdentity `pulumi:"identities"` // The Azure Region in which this Orchestrated Virtual Machine Scale Set exists. Location string `pulumi:"location"` // The name of the public IP address configuration Name string `pulumi:"name"` // A list of `networkInterface` blocks as defined below. NetworkInterfaces []GetOrchestratedVirtualMachineScaleSetNetworkInterface `pulumi:"networkInterfaces"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupOrchestratedVirtualMachineScaleSetOutput(ctx *pulumi.Context, args LookupOrchestratedVirtualMachineScaleSetOutputArgs, opts ...pulumi.InvokeOption) LookupOrchestratedVirtualMachineScaleSetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupOrchestratedVirtualMachineScaleSetResultOutput, error) { args := v.(LookupOrchestratedVirtualMachineScaleSetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getOrchestratedVirtualMachineScaleSet:getOrchestratedVirtualMachineScaleSet", args, LookupOrchestratedVirtualMachineScaleSetResultOutput{}, options).(LookupOrchestratedVirtualMachineScaleSetResultOutput), nil }).(LookupOrchestratedVirtualMachineScaleSetResultOutput) } // A collection of arguments for invoking getOrchestratedVirtualMachineScaleSet. type LookupOrchestratedVirtualMachineScaleSetOutputArgs struct { // The name of this Orchestrated Virtual Machine Scale Set. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Orchestrated Virtual Machine Scale Set exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupOrchestratedVirtualMachineScaleSetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupOrchestratedVirtualMachineScaleSetArgs)(nil)).Elem() } // A collection of values returned by getOrchestratedVirtualMachineScaleSet. type LookupOrchestratedVirtualMachineScaleSetResultOutput struct{ *pulumi.OutputState } func (LookupOrchestratedVirtualMachineScaleSetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupOrchestratedVirtualMachineScaleSetResult)(nil)).Elem() } func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) ToLookupOrchestratedVirtualMachineScaleSetResultOutput() LookupOrchestratedVirtualMachineScaleSetResultOutput { return o } func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) ToLookupOrchestratedVirtualMachineScaleSetResultOutputWithContext(ctx context.Context) LookupOrchestratedVirtualMachineScaleSetResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) string { return v.Id }).(pulumi.StringOutput) } // A `identity` block as defined below. func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) Identities() GetOrchestratedVirtualMachineScaleSetIdentityArrayOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) []GetOrchestratedVirtualMachineScaleSetIdentity { return v.Identities }).(GetOrchestratedVirtualMachineScaleSetIdentityArrayOutput) } // The Azure Region in which this Orchestrated Virtual Machine Scale Set exists. func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the public IP address configuration func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) string { return v.Name }).(pulumi.StringOutput) } // A list of `networkInterface` blocks as defined below. func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) NetworkInterfaces() GetOrchestratedVirtualMachineScaleSetNetworkInterfaceArrayOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) []GetOrchestratedVirtualMachineScaleSetNetworkInterface { return v.NetworkInterfaces }).(GetOrchestratedVirtualMachineScaleSetNetworkInterfaceArrayOutput) } func (o LookupOrchestratedVirtualMachineScaleSetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupOrchestratedVirtualMachineScaleSetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupOrchestratedVirtualMachineScaleSetResultOutput{}) }
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/compute/getDiskEncryptionSet.go
sdk/go/azure/compute/getDiskEncryptionSet.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 compute 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 Disk Encryption Set. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // existing, err := compute.LookupDiskEncryptionSet(ctx, &compute.LookupDiskEncryptionSetArgs{ // Name: "example-des", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("id", existing.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Compute` - 2022-03-02 func LookupDiskEncryptionSet(ctx *pulumi.Context, args *LookupDiskEncryptionSetArgs, opts ...pulumi.InvokeOption) (*LookupDiskEncryptionSetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDiskEncryptionSetResult err := ctx.Invoke("azure:compute/getDiskEncryptionSet:getDiskEncryptionSet", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDiskEncryptionSet. type LookupDiskEncryptionSetArgs struct { // The name of the existing Disk Encryption Set. Name string `pulumi:"name"` // The name of the Resource Group where the Disk Encryption Set exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDiskEncryptionSet. type LookupDiskEncryptionSetResult struct { // Is the Azure Disk Encryption Set Key automatically rotated to latest version? AutoKeyRotationEnabled bool `pulumi:"autoKeyRotationEnabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetDiskEncryptionSetIdentity `pulumi:"identities"` // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. KeyVaultKeyUrl string `pulumi:"keyVaultKeyUrl"` // The location where the Disk Encryption Set exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Disk Encryption Set. Tags map[string]string `pulumi:"tags"` } func LookupDiskEncryptionSetOutput(ctx *pulumi.Context, args LookupDiskEncryptionSetOutputArgs, opts ...pulumi.InvokeOption) LookupDiskEncryptionSetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDiskEncryptionSetResultOutput, error) { args := v.(LookupDiskEncryptionSetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getDiskEncryptionSet:getDiskEncryptionSet", args, LookupDiskEncryptionSetResultOutput{}, options).(LookupDiskEncryptionSetResultOutput), nil }).(LookupDiskEncryptionSetResultOutput) } // A collection of arguments for invoking getDiskEncryptionSet. type LookupDiskEncryptionSetOutputArgs struct { // The name of the existing Disk Encryption Set. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Disk Encryption Set exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDiskEncryptionSetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDiskEncryptionSetArgs)(nil)).Elem() } // A collection of values returned by getDiskEncryptionSet. type LookupDiskEncryptionSetResultOutput struct{ *pulumi.OutputState } func (LookupDiskEncryptionSetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDiskEncryptionSetResult)(nil)).Elem() } func (o LookupDiskEncryptionSetResultOutput) ToLookupDiskEncryptionSetResultOutput() LookupDiskEncryptionSetResultOutput { return o } func (o LookupDiskEncryptionSetResultOutput) ToLookupDiskEncryptionSetResultOutputWithContext(ctx context.Context) LookupDiskEncryptionSetResultOutput { return o } // Is the Azure Disk Encryption Set Key automatically rotated to latest version? func (o LookupDiskEncryptionSetResultOutput) AutoKeyRotationEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) bool { return v.AutoKeyRotationEnabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupDiskEncryptionSetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupDiskEncryptionSetResultOutput) Identities() GetDiskEncryptionSetIdentityArrayOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) []GetDiskEncryptionSetIdentity { return v.Identities }).(GetDiskEncryptionSetIdentityArrayOutput) } // The URL for the Key Vault Key or Key Vault Secret that is currently being used by the service. func (o LookupDiskEncryptionSetResultOutput) KeyVaultKeyUrl() pulumi.StringOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) string { return v.KeyVaultKeyUrl }).(pulumi.StringOutput) } // The location where the Disk Encryption Set exists. func (o LookupDiskEncryptionSetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupDiskEncryptionSetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupDiskEncryptionSetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Disk Encryption Set. func (o LookupDiskEncryptionSetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupDiskEncryptionSetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupDiskEncryptionSetResultOutput{}) }
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/compute/restorePoint.go
sdk/go/azure/compute/restorePoint.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Machine Restore Point. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "~/.ssh/id_rsa.pub", // }, nil) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("example-machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{ // &compute.LinuxVirtualMachineAdminSshKeyArgs{ // Username: pulumi.String("adminuser"), // PublicKey: pulumi.String(invokeFile.Result), // }, // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // exampleRestorePointCollection, err := compute.NewRestorePointCollection(ctx, "example", &compute.RestorePointCollectionArgs{ // Name: pulumi.String("example-collection"), // ResourceGroupName: example.Name, // Location: exampleLinuxVirtualMachine.Location, // SourceVirtualMachineId: exampleLinuxVirtualMachine.ID(), // }) // if err != nil { // return err // } // _, err = compute.NewRestorePoint(ctx, "example", &compute.RestorePointArgs{ // Name: pulumi.String("example-restore-point"), // VirtualMachineRestorePointCollectionId: exampleRestorePointCollection.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.Compute` - 2024-03-01 // // ## Import // // Virtual Machine Restore Point can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/restorePoint:RestorePoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/restorePointCollections/collection1/restorePoints/restorePoint1 // ``` type RestorePoint struct { pulumi.CustomResourceState // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. CrashConsistencyModeEnabled pulumi.BoolPtrOutput `pulumi:"crashConsistencyModeEnabled"` // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. ExcludedDisks pulumi.StringArrayOutput `pulumi:"excludedDisks"` // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. VirtualMachineRestorePointCollectionId pulumi.StringOutput `pulumi:"virtualMachineRestorePointCollectionId"` } // NewRestorePoint registers a new resource with the given unique name, arguments, and options. func NewRestorePoint(ctx *pulumi.Context, name string, args *RestorePointArgs, opts ...pulumi.ResourceOption) (*RestorePoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.VirtualMachineRestorePointCollectionId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineRestorePointCollectionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RestorePoint err := ctx.RegisterResource("azure:compute/restorePoint:RestorePoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRestorePoint gets an existing RestorePoint 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 GetRestorePoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RestorePointState, opts ...pulumi.ResourceOption) (*RestorePoint, error) { var resource RestorePoint err := ctx.ReadResource("azure:compute/restorePoint:RestorePoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RestorePoint resources. type restorePointState struct { // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. CrashConsistencyModeEnabled *bool `pulumi:"crashConsistencyModeEnabled"` // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. ExcludedDisks []string `pulumi:"excludedDisks"` // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. VirtualMachineRestorePointCollectionId *string `pulumi:"virtualMachineRestorePointCollectionId"` } type RestorePointState struct { // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. CrashConsistencyModeEnabled pulumi.BoolPtrInput // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. ExcludedDisks pulumi.StringArrayInput // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. VirtualMachineRestorePointCollectionId pulumi.StringPtrInput } func (RestorePointState) ElementType() reflect.Type { return reflect.TypeOf((*restorePointState)(nil)).Elem() } type restorePointArgs struct { // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. CrashConsistencyModeEnabled *bool `pulumi:"crashConsistencyModeEnabled"` // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. ExcludedDisks []string `pulumi:"excludedDisks"` // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. VirtualMachineRestorePointCollectionId string `pulumi:"virtualMachineRestorePointCollectionId"` } // The set of arguments for constructing a RestorePoint resource. type RestorePointArgs struct { // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. CrashConsistencyModeEnabled pulumi.BoolPtrInput // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. ExcludedDisks pulumi.StringArrayInput // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. VirtualMachineRestorePointCollectionId pulumi.StringInput } func (RestorePointArgs) ElementType() reflect.Type { return reflect.TypeOf((*restorePointArgs)(nil)).Elem() } type RestorePointInput interface { pulumi.Input ToRestorePointOutput() RestorePointOutput ToRestorePointOutputWithContext(ctx context.Context) RestorePointOutput } func (*RestorePoint) ElementType() reflect.Type { return reflect.TypeOf((**RestorePoint)(nil)).Elem() } func (i *RestorePoint) ToRestorePointOutput() RestorePointOutput { return i.ToRestorePointOutputWithContext(context.Background()) } func (i *RestorePoint) ToRestorePointOutputWithContext(ctx context.Context) RestorePointOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointOutput) } // RestorePointArrayInput is an input type that accepts RestorePointArray and RestorePointArrayOutput values. // You can construct a concrete instance of `RestorePointArrayInput` via: // // RestorePointArray{ RestorePointArgs{...} } type RestorePointArrayInput interface { pulumi.Input ToRestorePointArrayOutput() RestorePointArrayOutput ToRestorePointArrayOutputWithContext(context.Context) RestorePointArrayOutput } type RestorePointArray []RestorePointInput func (RestorePointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RestorePoint)(nil)).Elem() } func (i RestorePointArray) ToRestorePointArrayOutput() RestorePointArrayOutput { return i.ToRestorePointArrayOutputWithContext(context.Background()) } func (i RestorePointArray) ToRestorePointArrayOutputWithContext(ctx context.Context) RestorePointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointArrayOutput) } // RestorePointMapInput is an input type that accepts RestorePointMap and RestorePointMapOutput values. // You can construct a concrete instance of `RestorePointMapInput` via: // // RestorePointMap{ "key": RestorePointArgs{...} } type RestorePointMapInput interface { pulumi.Input ToRestorePointMapOutput() RestorePointMapOutput ToRestorePointMapOutputWithContext(context.Context) RestorePointMapOutput } type RestorePointMap map[string]RestorePointInput func (RestorePointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RestorePoint)(nil)).Elem() } func (i RestorePointMap) ToRestorePointMapOutput() RestorePointMapOutput { return i.ToRestorePointMapOutputWithContext(context.Background()) } func (i RestorePointMap) ToRestorePointMapOutputWithContext(ctx context.Context) RestorePointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RestorePointMapOutput) } type RestorePointOutput struct{ *pulumi.OutputState } func (RestorePointOutput) ElementType() reflect.Type { return reflect.TypeOf((**RestorePoint)(nil)).Elem() } func (o RestorePointOutput) ToRestorePointOutput() RestorePointOutput { return o } func (o RestorePointOutput) ToRestorePointOutputWithContext(ctx context.Context) RestorePointOutput { return o } // Whether the Consistency Mode of the Virtual Machine Restore Point is set to `CrashConsistent`. Defaults to `false`. Changing this forces a new resource to be created. func (o RestorePointOutput) CrashConsistencyModeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *RestorePoint) pulumi.BoolPtrOutput { return v.CrashConsistencyModeEnabled }).(pulumi.BoolPtrOutput) } // A list of disks that will be excluded from the Virtual Machine Restore Point. Changing this forces a new resource to be created. func (o RestorePointOutput) ExcludedDisks() pulumi.StringArrayOutput { return o.ApplyT(func(v *RestorePoint) pulumi.StringArrayOutput { return v.ExcludedDisks }).(pulumi.StringArrayOutput) } // Specifies the name of the Virtual Machine Restore Point. Changing this forces a new resource to be created. func (o RestorePointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RestorePoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Virtual Machine Restore Point Collection the Virtual Machine Restore Point will be associated with. Changing this forces a new resource to be created. func (o RestorePointOutput) VirtualMachineRestorePointCollectionId() pulumi.StringOutput { return o.ApplyT(func(v *RestorePoint) pulumi.StringOutput { return v.VirtualMachineRestorePointCollectionId }).(pulumi.StringOutput) } type RestorePointArrayOutput struct{ *pulumi.OutputState } func (RestorePointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RestorePoint)(nil)).Elem() } func (o RestorePointArrayOutput) ToRestorePointArrayOutput() RestorePointArrayOutput { return o } func (o RestorePointArrayOutput) ToRestorePointArrayOutputWithContext(ctx context.Context) RestorePointArrayOutput { return o } func (o RestorePointArrayOutput) Index(i pulumi.IntInput) RestorePointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RestorePoint { return vs[0].([]*RestorePoint)[vs[1].(int)] }).(RestorePointOutput) } type RestorePointMapOutput struct{ *pulumi.OutputState } func (RestorePointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RestorePoint)(nil)).Elem() } func (o RestorePointMapOutput) ToRestorePointMapOutput() RestorePointMapOutput { return o } func (o RestorePointMapOutput) ToRestorePointMapOutputWithContext(ctx context.Context) RestorePointMapOutput { return o } func (o RestorePointMapOutput) MapIndex(k pulumi.StringInput) RestorePointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RestorePoint { return vs[0].(map[string]*RestorePoint)[vs[1].(string)] }).(RestorePointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RestorePointInput)(nil)).Elem(), &RestorePoint{}) pulumi.RegisterInputType(reflect.TypeOf((*RestorePointArrayInput)(nil)).Elem(), RestorePointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RestorePointMapInput)(nil)).Elem(), RestorePointMap{}) pulumi.RegisterOutputType(RestorePointOutput{}) pulumi.RegisterOutputType(RestorePointArrayOutput{}) pulumi.RegisterOutputType(RestorePointMapOutput{}) }
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/compute/getSharedImageVersions.go
sdk/go/azure/compute/getSharedImageVersions.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 compute 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 existing Versions of a Shared Image within a Shared Image Gallery. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := compute.GetSharedImageVersions(ctx, &compute.GetSharedImageVersionsArgs{ // ImageName: "my-image", // GalleryName: "my-image-gallery", // ResourceGroupName: "example-resources", // }, 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.Compute` - 2023-07-03 func GetSharedImageVersions(ctx *pulumi.Context, args *GetSharedImageVersionsArgs, opts ...pulumi.InvokeOption) (*GetSharedImageVersionsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetSharedImageVersionsResult err := ctx.Invoke("azure:compute/getSharedImageVersions:getSharedImageVersions", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSharedImageVersions. type GetSharedImageVersionsArgs struct { // The name of the Shared Image in which the Shared Image exists. GalleryName string `pulumi:"galleryName"` // The name of the Shared Image in which this Version exists. ImageName string `pulumi:"imageName"` // The name of the Resource Group in which the Shared Image Gallery exists. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to filter the list of images against. TagsFilter map[string]string `pulumi:"tagsFilter"` } // A collection of values returned by getSharedImageVersions. type GetSharedImageVersionsResult struct { GalleryName string `pulumi:"galleryName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ImageName string `pulumi:"imageName"` // An `images` block as defined below: Images []GetSharedImageVersionsImage `pulumi:"images"` ResourceGroupName string `pulumi:"resourceGroupName"` TagsFilter map[string]string `pulumi:"tagsFilter"` } func GetSharedImageVersionsOutput(ctx *pulumi.Context, args GetSharedImageVersionsOutputArgs, opts ...pulumi.InvokeOption) GetSharedImageVersionsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSharedImageVersionsResultOutput, error) { args := v.(GetSharedImageVersionsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getSharedImageVersions:getSharedImageVersions", args, GetSharedImageVersionsResultOutput{}, options).(GetSharedImageVersionsResultOutput), nil }).(GetSharedImageVersionsResultOutput) } // A collection of arguments for invoking getSharedImageVersions. type GetSharedImageVersionsOutputArgs struct { // The name of the Shared Image in which the Shared Image exists. GalleryName pulumi.StringInput `pulumi:"galleryName"` // The name of the Shared Image in which this Version exists. ImageName pulumi.StringInput `pulumi:"imageName"` // The name of the Resource Group in which the Shared Image Gallery exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // A mapping of tags to filter the list of images against. TagsFilter pulumi.StringMapInput `pulumi:"tagsFilter"` } func (GetSharedImageVersionsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetSharedImageVersionsArgs)(nil)).Elem() } // A collection of values returned by getSharedImageVersions. type GetSharedImageVersionsResultOutput struct{ *pulumi.OutputState } func (GetSharedImageVersionsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetSharedImageVersionsResult)(nil)).Elem() } func (o GetSharedImageVersionsResultOutput) ToGetSharedImageVersionsResultOutput() GetSharedImageVersionsResultOutput { return o } func (o GetSharedImageVersionsResultOutput) ToGetSharedImageVersionsResultOutputWithContext(ctx context.Context) GetSharedImageVersionsResultOutput { return o } func (o GetSharedImageVersionsResultOutput) GalleryName() pulumi.StringOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) string { return v.GalleryName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetSharedImageVersionsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetSharedImageVersionsResultOutput) ImageName() pulumi.StringOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) string { return v.ImageName }).(pulumi.StringOutput) } // An `images` block as defined below: func (o GetSharedImageVersionsResultOutput) Images() GetSharedImageVersionsImageArrayOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) []GetSharedImageVersionsImage { return v.Images }).(GetSharedImageVersionsImageArrayOutput) } func (o GetSharedImageVersionsResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o GetSharedImageVersionsResultOutput) TagsFilter() pulumi.StringMapOutput { return o.ApplyT(func(v GetSharedImageVersionsResult) map[string]string { return v.TagsFilter }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetSharedImageVersionsResultOutput{}) }
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/compute/scaleSetPacketCapture.go
sdk/go/azure/compute/scaleSetPacketCapture.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Configures Network Packet Capturing against a Virtual Machine Scale Set using a Network Watcher. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 // } // exampleNetworkWatcher, err := network.NewNetworkWatcher(ctx, "example", &network.NetworkWatcherArgs{ // Name: pulumi.String("example-nw"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{ // Name: pulumi.String("example-vmss"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard_F2"), // Instances: pulumi.Int(4), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@ssword1234!"), // ComputerNamePrefix: pulumi.String("my-linux-computer-name-prefix"), // UpgradeMode: pulumi.String("Automatic"), // DisablePasswordAuthentication: pulumi.Bool(false), // SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{ // StorageAccountType: pulumi.String("Standard_LRS"), // Caching: pulumi.String("ReadWrite"), // }, // NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("example"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }, // }) // if err != nil { // return err // } // exampleVirtualMachineScaleSetExtension, err := compute.NewVirtualMachineScaleSetExtension(ctx, "example", &compute.VirtualMachineScaleSetExtensionArgs{ // Name: pulumi.String("network-watcher"), // VirtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.ID(), // Publisher: pulumi.String("Microsoft.Azure.NetworkWatcher"), // Type: pulumi.String("NetworkWatcherAgentLinux"), // TypeHandlerVersion: pulumi.String("1.4"), // AutoUpgradeMinorVersion: pulumi.Bool(true), // AutomaticUpgradeEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = compute.NewScaleSetPacketCapture(ctx, "example", &compute.ScaleSetPacketCaptureArgs{ // Name: pulumi.String("example-pc"), // NetworkWatcherId: exampleNetworkWatcher.ID(), // VirtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.ID(), // StorageLocation: &compute.ScaleSetPacketCaptureStorageLocationArgs{ // FilePath: pulumi.String("/var/captures/packet.cap"), // }, // MachineScope: &compute.ScaleSetPacketCaptureMachineScopeArgs{ // IncludeInstanceIds: pulumi.StringArray{ // pulumi.String("0"), // }, // ExcludeInstanceIds: pulumi.StringArray{ // pulumi.String("1"), // }, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleVirtualMachineScaleSetExtension, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // > **Note:** This Resource requires that [the Network Watcher Extension](https://docs.microsoft.com/azure/network-watcher/network-watcher-packet-capture-manage-portal#before-you-begin) is installed on the Virtual Machine Scale Set before capturing can be enabled which can be installed via the `compute.VirtualMachineScaleSetExtension` resource. // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Machine Scale Set Packet Captures can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture capture1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/packetCaptures/capture1 // ``` type ScaleSetPacketCapture struct { pulumi.CustomResourceState // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. Filters ScaleSetPacketCaptureFilterArrayOutput `pulumi:"filters"` // A `machineScope` block as defined below. Changing this forces a new resource to be created. MachineScope ScaleSetPacketCaptureMachineScopePtrOutput `pulumi:"machineScope"` // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. MaximumBytesPerPacket pulumi.IntPtrOutput `pulumi:"maximumBytesPerPacket"` // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. MaximumBytesPerSession pulumi.IntPtrOutput `pulumi:"maximumBytesPerSession"` // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. MaximumCaptureDurationInSeconds pulumi.IntPtrOutput `pulumi:"maximumCaptureDurationInSeconds"` // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The resource ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringOutput `pulumi:"networkWatcherId"` // A `storageLocation` block as defined below. Changing this forces a new resource to be created. StorageLocation ScaleSetPacketCaptureStorageLocationOutput `pulumi:"storageLocation"` // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. VirtualMachineScaleSetId pulumi.StringOutput `pulumi:"virtualMachineScaleSetId"` } // NewScaleSetPacketCapture registers a new resource with the given unique name, arguments, and options. func NewScaleSetPacketCapture(ctx *pulumi.Context, name string, args *ScaleSetPacketCaptureArgs, opts ...pulumi.ResourceOption) (*ScaleSetPacketCapture, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkWatcherId == nil { return nil, errors.New("invalid value for required argument 'NetworkWatcherId'") } if args.StorageLocation == nil { return nil, errors.New("invalid value for required argument 'StorageLocation'") } if args.VirtualMachineScaleSetId == nil { return nil, errors.New("invalid value for required argument 'VirtualMachineScaleSetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScaleSetPacketCapture err := ctx.RegisterResource("azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScaleSetPacketCapture gets an existing ScaleSetPacketCapture 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 GetScaleSetPacketCapture(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScaleSetPacketCaptureState, opts ...pulumi.ResourceOption) (*ScaleSetPacketCapture, error) { var resource ScaleSetPacketCapture err := ctx.ReadResource("azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScaleSetPacketCapture resources. type scaleSetPacketCaptureState struct { // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. Filters []ScaleSetPacketCaptureFilter `pulumi:"filters"` // A `machineScope` block as defined below. Changing this forces a new resource to be created. MachineScope *ScaleSetPacketCaptureMachineScope `pulumi:"machineScope"` // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. MaximumBytesPerPacket *int `pulumi:"maximumBytesPerPacket"` // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. MaximumBytesPerSession *int `pulumi:"maximumBytesPerSession"` // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. MaximumCaptureDurationInSeconds *int `pulumi:"maximumCaptureDurationInSeconds"` // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The resource ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId *string `pulumi:"networkWatcherId"` // A `storageLocation` block as defined below. Changing this forces a new resource to be created. StorageLocation *ScaleSetPacketCaptureStorageLocation `pulumi:"storageLocation"` // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. VirtualMachineScaleSetId *string `pulumi:"virtualMachineScaleSetId"` } type ScaleSetPacketCaptureState struct { // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. Filters ScaleSetPacketCaptureFilterArrayInput // A `machineScope` block as defined below. Changing this forces a new resource to be created. MachineScope ScaleSetPacketCaptureMachineScopePtrInput // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. MaximumBytesPerPacket pulumi.IntPtrInput // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. MaximumBytesPerSession pulumi.IntPtrInput // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. MaximumCaptureDurationInSeconds pulumi.IntPtrInput // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The resource ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringPtrInput // A `storageLocation` block as defined below. Changing this forces a new resource to be created. StorageLocation ScaleSetPacketCaptureStorageLocationPtrInput // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. VirtualMachineScaleSetId pulumi.StringPtrInput } func (ScaleSetPacketCaptureState) ElementType() reflect.Type { return reflect.TypeOf((*scaleSetPacketCaptureState)(nil)).Elem() } type scaleSetPacketCaptureArgs struct { // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. Filters []ScaleSetPacketCaptureFilter `pulumi:"filters"` // A `machineScope` block as defined below. Changing this forces a new resource to be created. MachineScope *ScaleSetPacketCaptureMachineScope `pulumi:"machineScope"` // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. MaximumBytesPerPacket *int `pulumi:"maximumBytesPerPacket"` // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. MaximumBytesPerSession *int `pulumi:"maximumBytesPerSession"` // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. MaximumCaptureDurationInSeconds *int `pulumi:"maximumCaptureDurationInSeconds"` // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The resource ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId string `pulumi:"networkWatcherId"` // A `storageLocation` block as defined below. Changing this forces a new resource to be created. StorageLocation ScaleSetPacketCaptureStorageLocation `pulumi:"storageLocation"` // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. VirtualMachineScaleSetId string `pulumi:"virtualMachineScaleSetId"` } // The set of arguments for constructing a ScaleSetPacketCapture resource. type ScaleSetPacketCaptureArgs struct { // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. Filters ScaleSetPacketCaptureFilterArrayInput // A `machineScope` block as defined below. Changing this forces a new resource to be created. MachineScope ScaleSetPacketCaptureMachineScopePtrInput // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. MaximumBytesPerPacket pulumi.IntPtrInput // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. MaximumBytesPerSession pulumi.IntPtrInput // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. MaximumCaptureDurationInSeconds pulumi.IntPtrInput // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The resource ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringInput // A `storageLocation` block as defined below. Changing this forces a new resource to be created. StorageLocation ScaleSetPacketCaptureStorageLocationInput // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. VirtualMachineScaleSetId pulumi.StringInput } func (ScaleSetPacketCaptureArgs) ElementType() reflect.Type { return reflect.TypeOf((*scaleSetPacketCaptureArgs)(nil)).Elem() } type ScaleSetPacketCaptureInput interface { pulumi.Input ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput } func (*ScaleSetPacketCapture) ElementType() reflect.Type { return reflect.TypeOf((**ScaleSetPacketCapture)(nil)).Elem() } func (i *ScaleSetPacketCapture) ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput { return i.ToScaleSetPacketCaptureOutputWithContext(context.Background()) } func (i *ScaleSetPacketCapture) ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput { return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureOutput) } // ScaleSetPacketCaptureArrayInput is an input type that accepts ScaleSetPacketCaptureArray and ScaleSetPacketCaptureArrayOutput values. // You can construct a concrete instance of `ScaleSetPacketCaptureArrayInput` via: // // ScaleSetPacketCaptureArray{ ScaleSetPacketCaptureArgs{...} } type ScaleSetPacketCaptureArrayInput interface { pulumi.Input ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput ToScaleSetPacketCaptureArrayOutputWithContext(context.Context) ScaleSetPacketCaptureArrayOutput } type ScaleSetPacketCaptureArray []ScaleSetPacketCaptureInput func (ScaleSetPacketCaptureArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScaleSetPacketCapture)(nil)).Elem() } func (i ScaleSetPacketCaptureArray) ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput { return i.ToScaleSetPacketCaptureArrayOutputWithContext(context.Background()) } func (i ScaleSetPacketCaptureArray) ToScaleSetPacketCaptureArrayOutputWithContext(ctx context.Context) ScaleSetPacketCaptureArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureArrayOutput) } // ScaleSetPacketCaptureMapInput is an input type that accepts ScaleSetPacketCaptureMap and ScaleSetPacketCaptureMapOutput values. // You can construct a concrete instance of `ScaleSetPacketCaptureMapInput` via: // // ScaleSetPacketCaptureMap{ "key": ScaleSetPacketCaptureArgs{...} } type ScaleSetPacketCaptureMapInput interface { pulumi.Input ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput ToScaleSetPacketCaptureMapOutputWithContext(context.Context) ScaleSetPacketCaptureMapOutput } type ScaleSetPacketCaptureMap map[string]ScaleSetPacketCaptureInput func (ScaleSetPacketCaptureMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScaleSetPacketCapture)(nil)).Elem() } func (i ScaleSetPacketCaptureMap) ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput { return i.ToScaleSetPacketCaptureMapOutputWithContext(context.Background()) } func (i ScaleSetPacketCaptureMap) ToScaleSetPacketCaptureMapOutputWithContext(ctx context.Context) ScaleSetPacketCaptureMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureMapOutput) } type ScaleSetPacketCaptureOutput struct{ *pulumi.OutputState } func (ScaleSetPacketCaptureOutput) ElementType() reflect.Type { return reflect.TypeOf((**ScaleSetPacketCapture)(nil)).Elem() } func (o ScaleSetPacketCaptureOutput) ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput { return o } func (o ScaleSetPacketCaptureOutput) ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput { return o } // One or more `filter` blocks as defined below. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) Filters() ScaleSetPacketCaptureFilterArrayOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureFilterArrayOutput { return v.Filters }).(ScaleSetPacketCaptureFilterArrayOutput) } // A `machineScope` block as defined below. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) MachineScope() ScaleSetPacketCaptureMachineScopePtrOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureMachineScopePtrOutput { return v.MachineScope }).(ScaleSetPacketCaptureMachineScopePtrOutput) } // The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) MaximumBytesPerPacket() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumBytesPerPacket }).(pulumi.IntPtrOutput) } // Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) MaximumBytesPerSession() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumBytesPerSession }).(pulumi.IntPtrOutput) } // The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) MaximumCaptureDurationInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumCaptureDurationInSeconds }).(pulumi.IntPtrOutput) } // The name to use for this Network Packet Capture. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The resource ID of the Network Watcher. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) NetworkWatcherId() pulumi.StringOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.NetworkWatcherId }).(pulumi.StringOutput) } // A `storageLocation` block as defined below. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) StorageLocation() ScaleSetPacketCaptureStorageLocationOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureStorageLocationOutput { return v.StorageLocation }).(ScaleSetPacketCaptureStorageLocationOutput) } // The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created. func (o ScaleSetPacketCaptureOutput) VirtualMachineScaleSetId() pulumi.StringOutput { return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.VirtualMachineScaleSetId }).(pulumi.StringOutput) } type ScaleSetPacketCaptureArrayOutput struct{ *pulumi.OutputState } func (ScaleSetPacketCaptureArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScaleSetPacketCapture)(nil)).Elem() } func (o ScaleSetPacketCaptureArrayOutput) ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput { return o } func (o ScaleSetPacketCaptureArrayOutput) ToScaleSetPacketCaptureArrayOutputWithContext(ctx context.Context) ScaleSetPacketCaptureArrayOutput { return o } func (o ScaleSetPacketCaptureArrayOutput) Index(i pulumi.IntInput) ScaleSetPacketCaptureOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScaleSetPacketCapture { return vs[0].([]*ScaleSetPacketCapture)[vs[1].(int)] }).(ScaleSetPacketCaptureOutput) } type ScaleSetPacketCaptureMapOutput struct{ *pulumi.OutputState } func (ScaleSetPacketCaptureMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScaleSetPacketCapture)(nil)).Elem() } func (o ScaleSetPacketCaptureMapOutput) ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput { return o } func (o ScaleSetPacketCaptureMapOutput) ToScaleSetPacketCaptureMapOutputWithContext(ctx context.Context) ScaleSetPacketCaptureMapOutput { return o } func (o ScaleSetPacketCaptureMapOutput) MapIndex(k pulumi.StringInput) ScaleSetPacketCaptureOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScaleSetPacketCapture { return vs[0].(map[string]*ScaleSetPacketCapture)[vs[1].(string)] }).(ScaleSetPacketCaptureOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureInput)(nil)).Elem(), &ScaleSetPacketCapture{}) pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureArrayInput)(nil)).Elem(), ScaleSetPacketCaptureArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureMapInput)(nil)).Elem(), ScaleSetPacketCaptureMap{}) pulumi.RegisterOutputType(ScaleSetPacketCaptureOutput{}) pulumi.RegisterOutputType(ScaleSetPacketCaptureArrayOutput{}) pulumi.RegisterOutputType(ScaleSetPacketCaptureMapOutput{}) }
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/compute/windowsVirtualMachine.go
sdk/go/azure/compute/windowsVirtualMachine.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Windows Virtual Machine. // // ## Disclaimers // // > **Note** This provider will automatically remove the OS Disk by default - this behaviour can be configured using the `features` setting within the Provider block. // // > **Note** All arguments including the administrator login and password will be stored in the raw state as plain-text. // // > **Note** This resource does not support Unmanaged Disks. If you need to use Unmanaged Disks you can continue to use the `compute.VirtualMachine` resource instead. // // > **Note** This resource does not support attaching existing OS Disks. You can instead capture an image of the OS Disk or continue to use the `compute.VirtualMachine` resource instead. // // > In this release there's a known issue where the `publicIpAddress` and `publicIpAddresses` fields may not be fully populated for Dynamic Public IP's. // // ## Example Usage // // This example provisions a basic Windows Virtual Machine on an internal network. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "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 // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.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("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = compute.NewWindowsVirtualMachine(ctx, "example", &compute.WindowsVirtualMachineArgs{ // Name: pulumi.String("example-machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_F2"), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@$$w0rd1234!"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // OsDisk: &compute.WindowsVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.WindowsVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("MicrosoftWindowsServer"), // Offer: pulumi.String("WindowsServer"), // Sku: pulumi.String("2016-Datacenter"), // Version: pulumi.String("latest"), // }, // }) // 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.Compute` - 2024-03-01, 2023-04-02 // // ## Import // // Windows Virtual Machines can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/windowsVirtualMachine:WindowsVirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/virtualMachines/machine1 // ``` type WindowsVirtualMachine struct { pulumi.CustomResourceState // A `additionalCapabilities` block as defined below. AdditionalCapabilities WindowsVirtualMachineAdditionalCapabilitiesPtrOutput `pulumi:"additionalCapabilities"` // One or more `additionalUnattendContent` blocks as defined below. Changing this forces a new resource to be created. AdditionalUnattendContents WindowsVirtualMachineAdditionalUnattendContentArrayOutput `pulumi:"additionalUnattendContents"` // The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** This is required unless using an existing OS Managed Disk by specifying `osManagedDiskId`. AdminPassword pulumi.StringPtrOutput `pulumi:"adminPassword"` // The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** This is required unless using an existing OS Managed Disk by specifying `osManagedDiskId`. AdminUsername pulumi.StringPtrOutput `pulumi:"adminUsername"` // Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`. AllowExtensionOperations pulumi.BoolOutput `pulumi:"allowExtensionOperations"` // Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`. AutomaticUpdatesEnabled pulumi.BoolOutput `pulumi:"automaticUpdatesEnabled"` // Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created. AvailabilitySetId pulumi.StringPtrOutput `pulumi:"availabilitySetId"` // A `bootDiagnostics` block as defined below. BootDiagnostics WindowsVirtualMachineBootDiagnosticsPtrOutput `pulumi:"bootDiagnostics"` // Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`. // // > **NOTE:** `bypassPlatformSafetyChecksOnUserScheduleEnabled` can only be set to `true` when `patchMode` is set to `AutomaticByPlatform`. BypassPlatformSafetyChecksOnUserScheduleEnabled pulumi.BoolPtrOutput `pulumi:"bypassPlatformSafetyChecksOnUserScheduleEnabled"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to. // // > **NOTE:** `capacityReservationGroupId` cannot be used with `availabilitySetId` or `proximityPlacementGroupId` CapacityReservationGroupId pulumi.StringPtrOutput `pulumi:"capacityReservationGroupId"` // Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computerName`, then you must specify `computerName`. Changing this forces a new resource to be created. ComputerName pulumi.StringOutput `pulumi:"computerName"` // The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created. CustomData pulumi.StringPtrOutput `pulumi:"customData"` // The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicatedHostId`. DedicatedHostGroupId pulumi.StringPtrOutput `pulumi:"dedicatedHostGroupId"` // The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicatedHostGroupId`. DedicatedHostId pulumi.StringPtrOutput `pulumi:"dedicatedHostId"` // Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`. DiskControllerType pulumi.StringOutput `pulumi:"diskControllerType"` // Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // Deprecated: this property has been deprecated in favour of automaticUpdatesEnabled and will be removed in 5.0 of the provider. EnableAutomaticUpdates pulumi.BoolOutput `pulumi:"enableAutomaticUpdates"` // Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled pulumi.BoolPtrOutput `pulumi:"encryptionAtHostEnabled"` // Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** This can only be configured when `priority` is set to `Spot`. EvictionPolicy pulumi.StringPtrOutput `pulumi:"evictionPolicy"` // Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget pulumi.StringPtrOutput `pulumi:"extensionsTimeBudget"` // One or more `galleryApplication` blocks as defined below. // // > **Note** Gallery Application Assignments can be defined either directly on `compute.WindowsVirtualMachine` resource, or using the `compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `compute.GalleryApplicationAssignment` is used, it's recommended to use `ignoreChanges` for the `galleryApplication` block on the corresponding `compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource. GalleryApplications WindowsVirtualMachineGalleryApplicationArrayOutput `pulumi:"galleryApplications"` // Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch). // // > **NOTE:** Hotpatching can only be enabled if the `patchMode` is set to `AutomaticByPlatform`, the `provisionVmAgent` is set to `true`, your `sourceImageReference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatchingEnabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository. HotpatchingEnabled pulumi.BoolOutput `pulumi:"hotpatchingEnabled"` // An `identity` block as defined below. Identity WindowsVirtualMachineIdentityPtrOutput `pulumi:"identity"` // Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` // The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `evictionPolicy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons. // // > **NOTE:** This can only be configured when `priority` is set to `Spot`. MaxBidPrice pulumi.Float64PtrOutput `pulumi:"maxBidPrice"` // The name of the Windows Virtual Machine. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine. NetworkInterfaceIds pulumi.StringArrayOutput `pulumi:"networkInterfaceIds"` // An `osDisk` block as defined below. OsDisk WindowsVirtualMachineOsDiskOutput `pulumi:"osDisk"` // A `osImageNotification` block as defined below. OsImageNotification WindowsVirtualMachineOsImageNotificationPtrOutput `pulumi:"osImageNotification"` // The ID of an existing Managed Disk to use as the OS Disk for this Windows Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** When specifying an existing Managed Disk it is not currently possible to subsequently manage the Operating System Profile properties: `adminUsername`, `adminPassword`, `bypassPlatformSafetyChecksOnUserScheduleEnabled`, `computerName`, `customData`, `provisionVmAgent`, `patchMode`, `patchAssessmentMode`, or `rebootSetting`. OsManagedDiskId pulumi.StringOutput `pulumi:"osManagedDiskId"` // Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`. // // > **NOTE:** If the `patchAssessmentMode` is set to `AutomaticByPlatform` then the `provisionVmAgent` field must be set to `true`. PatchAssessmentMode pulumi.StringOutput `pulumi:"patchAssessmentMode"` // Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes). // // > **NOTE:** If `patchMode` is set to `AutomaticByPlatform` then `provisionVmAgent` must also be set to `true`. If the Virtual Machine is using a hotpatching enabled image the `patchMode` must always be set to `AutomaticByPlatform`. PatchMode pulumi.StringOutput `pulumi:"patchMode"` // A `plan` block as defined below. Changing this forces a new resource to be created. Plan WindowsVirtualMachinePlanPtrOutput `pulumi:"plan"` // Specifies the Platform Fault Domain in which this Windows Virtual Machine should be created. Defaults to `-1`, which means this will be automatically assigned to a fault domain that best maintains balance across the available fault domains. Changing this forces a new Windows Virtual Machine to be created. PlatformFaultDomain pulumi.IntPtrOutput `pulumi:"platformFaultDomain"` // Specifies the priority of this Virtual Machine. Possible values are `Regular` and `Spot`. Defaults to `Regular`. Changing this forces a new resource to be created. Priority pulumi.StringPtrOutput `pulumi:"priority"` // The Primary Private IP Address assigned to this Virtual Machine. PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"` // A list of Private IP Addresses assigned to this Virtual Machine. PrivateIpAddresses pulumi.StringArrayOutput `pulumi:"privateIpAddresses"` // Should the Azure VM Agent be provisioned on this Virtual Machine? Defaults to `true`. Changing this forces a new resource to be created. // // > **NOTE:** If `provisionVmAgent` is set to `false` then `allowExtensionOperations` must also be set to `false`. ProvisionVmAgent pulumi.BoolOutput `pulumi:"provisionVmAgent"` // The ID of the Proximity Placement Group which the Virtual Machine should be assigned to. ProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"proximityPlacementGroupId"` // The Primary Public IP Address assigned to this Virtual Machine. PublicIpAddress pulumi.StringOutput `pulumi:"publicIpAddress"` // A list of the Public IP Addresses assigned to this Virtual Machine. PublicIpAddresses pulumi.StringArrayOutput `pulumi:"publicIpAddresses"` // Specifies the reboot setting for platform scheduled patching. Possible values are `Always`, `IfRequired` and `Never`. // // > **NOTE:** `rebootSetting` can only be set when `patchMode` is set to `AutomaticByPlatform`. RebootSetting pulumi.StringPtrOutput `pulumi:"rebootSetting"` // The name of the Resource Group in which the Windows Virtual Machine should be exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `secret` blocks as defined below. Secrets WindowsVirtualMachineSecretArrayOutput `pulumi:"secrets"` // Specifies if Secure Boot and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created. SecureBootEnabled pulumi.BoolPtrOutput `pulumi:"secureBootEnabled"` // The SKU which should be used for this Virtual Machine, such as `Standard_F2`. Size pulumi.StringOutput `pulumi:"size"` // The ID of the Image which this Virtual Machine should be created from. Changing this forces a new resource to be created. Possible Image ID types include `Image ID`s, `Shared Image ID`s, `Shared Image Version ID`s, `Community Gallery Image ID`s, `Community Gallery Image Version ID`s, `Shared Gallery Image ID`s and `Shared Gallery Image Version ID`s. // // > **NOTE:** One of either `sourceImageId` or `sourceImageReference` must be set. SourceImageId pulumi.StringPtrOutput `pulumi:"sourceImageId"` // A `sourceImageReference` block as defined below. Changing this forces a new resource to be created. // // > **NOTE:** One of either `sourceImageId` or `sourceImageReference` must be set. SourceImageReference WindowsVirtualMachineSourceImageReferencePtrOutput `pulumi:"sourceImageReference"` // A mapping of tags which should be assigned to this Virtual Machine. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `terminationNotification` block as defined below. TerminationNotification WindowsVirtualMachineTerminationNotificationOutput `pulumi:"terminationNotification"` // Specifies the Time Zone which should be used by the Virtual Machine, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Changing this forces a new resource to be created. Timezone pulumi.StringPtrOutput `pulumi:"timezone"` // The Base64-Encoded User Data which should be used for this Virtual Machine. UserData pulumi.StringPtrOutput `pulumi:"userData"` // A 128-bit identifier which uniquely identifies this Virtual Machine. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` // Specifies the Orchestrated Virtual Machine Scale Set that this Virtual Machine should be created within. // // > **NOTE:** To update `virtualMachineScaleSetId` the Preview Feature `Microsoft.Compute/SingleFDAttachDetachVMToVmss` needs to be enabled, see [the documentation](https://review.learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm#enroll-in-the-preview) for more information. // // > **NOTE:** Orchestrated Virtual Machine Scale Sets can be provisioned using [the `compute.OrchestratedVirtualMachineScaleSet` resource](https://www.terraform.io/docs/providers/azurerm/r/orchestrated_virtual_machine_scale_set.html). // // > **NOTE:** To attach an existing VM to a Virtual Machine Scale Set, the scale set must have `singlePlacementGroup` set to `false`, see [the documentation](https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-attach-detach-vm?tabs=portal-1%2Cportal-2%2Cportal-3#limitations-for-attaching-an-existing-vm-to-a-scale-set) for more information. VirtualMachineScaleSetId pulumi.StringPtrOutput `pulumi:"virtualMachineScaleSetId"` // Specifies whether VMAgent Platform Updates is enabled. Defaults to `false`. // // Deprecated: this property has been deprecated due to a breaking change introduced by the Service team, which redefined it as a read-only field within the API VmAgentPlatformUpdatesEnabled pulumi.BoolOutput `pulumi:"vmAgentPlatformUpdatesEnabled"` // Specifies if vTPM (virtual Trusted Platform Module) and Trusted Launch is enabled for the Virtual Machine. Changing this forces a new resource to be created. VtpmEnabled pulumi.BoolPtrOutput `pulumi:"vtpmEnabled"` // One or more `winrmListener` blocks as defined below. Changing this forces a new resource to be created. WinrmListeners WindowsVirtualMachineWinrmListenerArrayOutput `pulumi:"winrmListeners"` // * `zones` - (Optional) Specifies the Availability Zone in which this Windows Virtual Machine should be located. Changing this forces a new Windows Virtual Machine to be created. Zone pulumi.StringPtrOutput `pulumi:"zone"` } // NewWindowsVirtualMachine registers a new resource with the given unique name, arguments, and options. func NewWindowsVirtualMachine(ctx *pulumi.Context, name string, args *WindowsVirtualMachineArgs, opts ...pulumi.ResourceOption) (*WindowsVirtualMachine, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkInterfaceIds == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceIds'") } if args.OsDisk == nil { return nil, errors.New("invalid value for required argument 'OsDisk'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Size == nil { return nil, errors.New("invalid value for required argument 'Size'") } if args.AdminPassword != nil { args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringPtrInput) } if args.CustomData != nil { args.CustomData = pulumi.ToSecret(args.CustomData).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "adminPassword", "customData", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WindowsVirtualMachine err := ctx.RegisterResource("azure:compute/windowsVirtualMachine:WindowsVirtualMachine", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWindowsVirtualMachine gets an existing WindowsVirtualMachine 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 GetWindowsVirtualMachine(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WindowsVirtualMachineState, opts ...pulumi.ResourceOption) (*WindowsVirtualMachine, error) { var resource WindowsVirtualMachine err := ctx.ReadResource("azure:compute/windowsVirtualMachine:WindowsVirtualMachine", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WindowsVirtualMachine resources. type windowsVirtualMachineState struct { // A `additionalCapabilities` block as defined below. AdditionalCapabilities *WindowsVirtualMachineAdditionalCapabilities `pulumi:"additionalCapabilities"` // One or more `additionalUnattendContent` blocks as defined below. Changing this forces a new resource to be created. AdditionalUnattendContents []WindowsVirtualMachineAdditionalUnattendContent `pulumi:"additionalUnattendContents"` // The Password which should be used for the local-administrator on this Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** This is required unless using an existing OS Managed Disk by specifying `osManagedDiskId`. AdminPassword *string `pulumi:"adminPassword"` // The username of the local administrator used for the Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** This is required unless using an existing OS Managed Disk by specifying `osManagedDiskId`. AdminUsername *string `pulumi:"adminUsername"` // Should Extension Operations be allowed on this Virtual Machine? Defaults to `true`. AllowExtensionOperations *bool `pulumi:"allowExtensionOperations"` // Specifies if Automatic Updates are Enabled for the Windows Virtual Machine. Changing this forces a new resource to be created. Defaults to `true`. AutomaticUpdatesEnabled *bool `pulumi:"automaticUpdatesEnabled"` // Specifies the ID of the Availability Set in which the Virtual Machine should exist. Changing this forces a new resource to be created. AvailabilitySetId *string `pulumi:"availabilitySetId"` // A `bootDiagnostics` block as defined below. BootDiagnostics *WindowsVirtualMachineBootDiagnostics `pulumi:"bootDiagnostics"` // Specifies whether to skip platform scheduled patching when a user schedule is associated with the VM. Defaults to `false`. // // > **NOTE:** `bypassPlatformSafetyChecksOnUserScheduleEnabled` can only be set to `true` when `patchMode` is set to `AutomaticByPlatform`. BypassPlatformSafetyChecksOnUserScheduleEnabled *bool `pulumi:"bypassPlatformSafetyChecksOnUserScheduleEnabled"` // Specifies the ID of the Capacity Reservation Group which the Virtual Machine should be allocated to. // // > **NOTE:** `capacityReservationGroupId` cannot be used with `availabilitySetId` or `proximityPlacementGroupId` CapacityReservationGroupId *string `pulumi:"capacityReservationGroupId"` // Specifies the Hostname which should be used for this Virtual Machine. If unspecified this defaults to the value for the `name` field. If the value of the `name` field is not a valid `computerName`, then you must specify `computerName`. Changing this forces a new resource to be created. ComputerName *string `pulumi:"computerName"` // The Base64-Encoded Custom Data which should be used for this Virtual Machine. Changing this forces a new resource to be created. CustomData *string `pulumi:"customData"` // The ID of a Dedicated Host Group that this Windows Virtual Machine should be run within. Conflicts with `dedicatedHostId`. DedicatedHostGroupId *string `pulumi:"dedicatedHostGroupId"` // The ID of a Dedicated Host where this machine should be run on. Conflicts with `dedicatedHostGroupId`. DedicatedHostId *string `pulumi:"dedicatedHostId"` // Specifies the Disk Controller Type used for this Virtual Machine. Possible values are `SCSI` and `NVMe`. DiskControllerType *string `pulumi:"diskControllerType"` // Specifies the Edge Zone within the Azure Region where this Windows Virtual Machine should exist. Changing this forces a new Windows Virtual Machine to be created. EdgeZone *string `pulumi:"edgeZone"` // Deprecated: this property has been deprecated in favour of automaticUpdatesEnabled and will be removed in 5.0 of the provider. EnableAutomaticUpdates *bool `pulumi:"enableAutomaticUpdates"` // Should all of the disks (including the temp disk) attached to this Virtual Machine be encrypted by enabling Encryption at Host? EncryptionAtHostEnabled *bool `pulumi:"encryptionAtHostEnabled"` // Specifies what should happen when the Virtual Machine is evicted for price reasons when using a Spot instance. Possible values are `Deallocate` and `Delete`. Changing this forces a new resource to be created. // // > **NOTE:** This can only be configured when `priority` is set to `Spot`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Specifies the duration allocated for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. Defaults to `PT1H30M`. ExtensionsTimeBudget *string `pulumi:"extensionsTimeBudget"` // One or more `galleryApplication` blocks as defined below. // // > **Note** Gallery Application Assignments can be defined either directly on `compute.WindowsVirtualMachine` resource, or using the `compute.GalleryApplicationAssignment` resource - but the two approaches cannot be used together. If both are used with the same Virtual Machine, spurious changes will occur. If `compute.GalleryApplicationAssignment` is used, it's recommended to use `ignoreChanges` for the `galleryApplication` block on the corresponding `compute.WindowsVirtualMachine` resource, to avoid a persistent diff when using this resource. GalleryApplications []WindowsVirtualMachineGalleryApplication `pulumi:"galleryApplications"` // Should the VM be patched without requiring a reboot? Possible values are `true` or `false`. Defaults to `false`. For more information about hot patching please see the [product documentation](https://docs.microsoft.com/azure/automanage/automanage-hotpatch). // // > **NOTE:** Hotpatching can only be enabled if the `patchMode` is set to `AutomaticByPlatform`, the `provisionVmAgent` is set to `true`, your `sourceImageReference` references a hotpatching enabled image, and the VM's `size` is set to a [Azure generation 2](https://docs.microsoft.com/azure/virtual-machines/generation-2#generation-2-vm-sizes) VM. An example of how to correctly configure a Windows Virtual Machine to use the `hotpatchingEnabled` field can be found in the `./examples/virtual-machines/windows/hotpatching-enabled` directory within the GitHub Repository. HotpatchingEnabled *bool `pulumi:"hotpatchingEnabled"` // An `identity` block as defined below. Identity *WindowsVirtualMachineIdentity `pulumi:"identity"` // Specifies the type of on-premise license (also known as [Azure Hybrid Use Benefit](https://docs.microsoft.com/windows-server/get-started/azure-hybrid-benefit)) which should be used for this Virtual Machine. Possible values are `None`, `Windows_Client` and `Windows_Server`. LicenseType *string `pulumi:"licenseType"` // The Azure location where the Windows Virtual Machine should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The maximum price you're willing to pay for this Virtual Machine, in US Dollars; which must be greater than the current spot price. If this bid price falls below the current spot price the Virtual Machine will be evicted using the `evictionPolicy`. Defaults to `-1`, which means that the Virtual Machine should not be evicted for price reasons. // // > **NOTE:** This can only be configured when `priority` is set to `Spot`. MaxBidPrice *float64 `pulumi:"maxBidPrice"` // The name of the Windows Virtual Machine. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // . A list of Network Interface IDs which should be attached to this Virtual Machine. The first Network Interface ID in this list will be the Primary Network Interface on the Virtual Machine. NetworkInterfaceIds []string `pulumi:"networkInterfaceIds"` // An `osDisk` block as defined below. OsDisk *WindowsVirtualMachineOsDisk `pulumi:"osDisk"` // A `osImageNotification` block as defined below. OsImageNotification *WindowsVirtualMachineOsImageNotification `pulumi:"osImageNotification"` // The ID of an existing Managed Disk to use as the OS Disk for this Windows Virtual Machine. Changing this forces a new resource to be created. // // > **Note:** When specifying an existing Managed Disk it is not currently possible to subsequently manage the Operating System Profile properties: `adminUsername`, `adminPassword`, `bypassPlatformSafetyChecksOnUserScheduleEnabled`, `computerName`, `customData`, `provisionVmAgent`, `patchMode`, `patchAssessmentMode`, or `rebootSetting`. OsManagedDiskId *string `pulumi:"osManagedDiskId"` // Specifies the mode of VM Guest Patching for the Virtual Machine. Possible values are `AutomaticByPlatform` or `ImageDefault`. Defaults to `ImageDefault`. // // > **NOTE:** If the `patchAssessmentMode` is set to `AutomaticByPlatform` then the `provisionVmAgent` field must be set to `true`. PatchAssessmentMode *string `pulumi:"patchAssessmentMode"` // Specifies the mode of in-guest patching to this Windows Virtual Machine. Possible values are `Manual`, `AutomaticByOS` and `AutomaticByPlatform`. Defaults to `AutomaticByOS`. For more information on patch modes please see the [product documentation](https://docs.microsoft.com/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes). //
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/compute/availabilitySet.go
sdk/go/azure/compute/availabilitySet.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Availability Set for Virtual Machines. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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 = compute.NewAvailabilitySet(ctx, "example", &compute.AvailabilitySetArgs{ // Name: pulumi.String("example-aset"), // Location: example.Location, // ResourceGroupName: example.Name, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // 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.Compute` - 2024-03-01 // // ## Import // // Availability Sets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/availabilitySet:AvailabilitySet group1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/availabilitySets/webAvailSet // ``` type AvailabilitySet struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. Managed pulumi.BoolPtrOutput `pulumi:"managed"` // Specifies the name of the availability set. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount pulumi.IntPtrOutput `pulumi:"platformFaultDomainCount"` // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformUpdateDomainCount pulumi.IntPtrOutput `pulumi:"platformUpdateDomainCount"` // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"proximityPlacementGroupId"` // The name of the resource group in which to create the availability set. 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"` } // NewAvailabilitySet registers a new resource with the given unique name, arguments, and options. func NewAvailabilitySet(ctx *pulumi.Context, name string, args *AvailabilitySetArgs, opts ...pulumi.ResourceOption) (*AvailabilitySet, 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 AvailabilitySet err := ctx.RegisterResource("azure:compute/availabilitySet:AvailabilitySet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAvailabilitySet gets an existing AvailabilitySet 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 GetAvailabilitySet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AvailabilitySetState, opts ...pulumi.ResourceOption) (*AvailabilitySet, error) { var resource AvailabilitySet err := ctx.ReadResource("azure:compute/availabilitySet:AvailabilitySet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AvailabilitySet resources. type availabilitySetState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. Managed *bool `pulumi:"managed"` // Specifies the name of the availability set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount *int `pulumi:"platformFaultDomainCount"` // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformUpdateDomainCount *int `pulumi:"platformUpdateDomainCount"` // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. ProximityPlacementGroupId *string `pulumi:"proximityPlacementGroupId"` // The name of the resource group in which to create the availability set. 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 AvailabilitySetState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. Managed pulumi.BoolPtrInput // Specifies the name of the availability set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount pulumi.IntPtrInput // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformUpdateDomainCount pulumi.IntPtrInput // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrInput // The name of the resource group in which to create the availability set. 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 (AvailabilitySetState) ElementType() reflect.Type { return reflect.TypeOf((*availabilitySetState)(nil)).Elem() } type availabilitySetArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. Managed *bool `pulumi:"managed"` // Specifies the name of the availability set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount *int `pulumi:"platformFaultDomainCount"` // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformUpdateDomainCount *int `pulumi:"platformUpdateDomainCount"` // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. ProximityPlacementGroupId *string `pulumi:"proximityPlacementGroupId"` // The name of the resource group in which to create the availability set. 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 AvailabilitySet resource. type AvailabilitySetArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. Managed pulumi.BoolPtrInput // Specifies the name of the availability set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformFaultDomainCount pulumi.IntPtrInput // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). PlatformUpdateDomainCount pulumi.IntPtrInput // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. ProximityPlacementGroupId pulumi.StringPtrInput // The name of the resource group in which to create the availability set. 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 (AvailabilitySetArgs) ElementType() reflect.Type { return reflect.TypeOf((*availabilitySetArgs)(nil)).Elem() } type AvailabilitySetInput interface { pulumi.Input ToAvailabilitySetOutput() AvailabilitySetOutput ToAvailabilitySetOutputWithContext(ctx context.Context) AvailabilitySetOutput } func (*AvailabilitySet) ElementType() reflect.Type { return reflect.TypeOf((**AvailabilitySet)(nil)).Elem() } func (i *AvailabilitySet) ToAvailabilitySetOutput() AvailabilitySetOutput { return i.ToAvailabilitySetOutputWithContext(context.Background()) } func (i *AvailabilitySet) ToAvailabilitySetOutputWithContext(ctx context.Context) AvailabilitySetOutput { return pulumi.ToOutputWithContext(ctx, i).(AvailabilitySetOutput) } // AvailabilitySetArrayInput is an input type that accepts AvailabilitySetArray and AvailabilitySetArrayOutput values. // You can construct a concrete instance of `AvailabilitySetArrayInput` via: // // AvailabilitySetArray{ AvailabilitySetArgs{...} } type AvailabilitySetArrayInput interface { pulumi.Input ToAvailabilitySetArrayOutput() AvailabilitySetArrayOutput ToAvailabilitySetArrayOutputWithContext(context.Context) AvailabilitySetArrayOutput } type AvailabilitySetArray []AvailabilitySetInput func (AvailabilitySetArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AvailabilitySet)(nil)).Elem() } func (i AvailabilitySetArray) ToAvailabilitySetArrayOutput() AvailabilitySetArrayOutput { return i.ToAvailabilitySetArrayOutputWithContext(context.Background()) } func (i AvailabilitySetArray) ToAvailabilitySetArrayOutputWithContext(ctx context.Context) AvailabilitySetArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AvailabilitySetArrayOutput) } // AvailabilitySetMapInput is an input type that accepts AvailabilitySetMap and AvailabilitySetMapOutput values. // You can construct a concrete instance of `AvailabilitySetMapInput` via: // // AvailabilitySetMap{ "key": AvailabilitySetArgs{...} } type AvailabilitySetMapInput interface { pulumi.Input ToAvailabilitySetMapOutput() AvailabilitySetMapOutput ToAvailabilitySetMapOutputWithContext(context.Context) AvailabilitySetMapOutput } type AvailabilitySetMap map[string]AvailabilitySetInput func (AvailabilitySetMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AvailabilitySet)(nil)).Elem() } func (i AvailabilitySetMap) ToAvailabilitySetMapOutput() AvailabilitySetMapOutput { return i.ToAvailabilitySetMapOutputWithContext(context.Background()) } func (i AvailabilitySetMap) ToAvailabilitySetMapOutputWithContext(ctx context.Context) AvailabilitySetMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AvailabilitySetMapOutput) } type AvailabilitySetOutput struct{ *pulumi.OutputState } func (AvailabilitySetOutput) ElementType() reflect.Type { return reflect.TypeOf((**AvailabilitySet)(nil)).Elem() } func (o AvailabilitySetOutput) ToAvailabilitySetOutput() AvailabilitySetOutput { return o } func (o AvailabilitySetOutput) ToAvailabilitySetOutputWithContext(ctx context.Context) AvailabilitySetOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o AvailabilitySetOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies whether the availability set is managed or not. Possible values are `true` (to specify aligned) or `false` (to specify classic). Default is `true`. Changing this forces a new resource to be created. func (o AvailabilitySetOutput) Managed() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.BoolPtrOutput { return v.Managed }).(pulumi.BoolPtrOutput) } // Specifies the name of the availability set. Changing this forces a new resource to be created. func (o AvailabilitySetOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the number of fault domains that are used. Defaults to `3`. Changing this forces a new resource to be created. // // > **Note:** The number of Fault Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). func (o AvailabilitySetOutput) PlatformFaultDomainCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.IntPtrOutput { return v.PlatformFaultDomainCount }).(pulumi.IntPtrOutput) } // Specifies the number of update domains that are used. Defaults to `5`. Changing this forces a new resource to be created. // // > **Note:** The number of Update Domains varies depending on which Azure Region you're using. More information about update and fault domains and how they work can be found [here](https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview). func (o AvailabilitySetOutput) PlatformUpdateDomainCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.IntPtrOutput { return v.PlatformUpdateDomainCount }).(pulumi.IntPtrOutput) } // The ID of the Proximity Placement Group to which this Virtual Machine should be assigned. Changing this forces a new resource to be created. func (o AvailabilitySetOutput) ProximityPlacementGroupId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.StringPtrOutput { return v.ProximityPlacementGroupId }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the availability set. Changing this forces a new resource to be created. func (o AvailabilitySetOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o AvailabilitySetOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AvailabilitySet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type AvailabilitySetArrayOutput struct{ *pulumi.OutputState } func (AvailabilitySetArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AvailabilitySet)(nil)).Elem() } func (o AvailabilitySetArrayOutput) ToAvailabilitySetArrayOutput() AvailabilitySetArrayOutput { return o } func (o AvailabilitySetArrayOutput) ToAvailabilitySetArrayOutputWithContext(ctx context.Context) AvailabilitySetArrayOutput { return o } func (o AvailabilitySetArrayOutput) Index(i pulumi.IntInput) AvailabilitySetOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AvailabilitySet { return vs[0].([]*AvailabilitySet)[vs[1].(int)] }).(AvailabilitySetOutput) } type AvailabilitySetMapOutput struct{ *pulumi.OutputState } func (AvailabilitySetMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AvailabilitySet)(nil)).Elem() } func (o AvailabilitySetMapOutput) ToAvailabilitySetMapOutput() AvailabilitySetMapOutput { return o } func (o AvailabilitySetMapOutput) ToAvailabilitySetMapOutputWithContext(ctx context.Context) AvailabilitySetMapOutput { return o } func (o AvailabilitySetMapOutput) MapIndex(k pulumi.StringInput) AvailabilitySetOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AvailabilitySet { return vs[0].(map[string]*AvailabilitySet)[vs[1].(string)] }).(AvailabilitySetOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AvailabilitySetInput)(nil)).Elem(), &AvailabilitySet{}) pulumi.RegisterInputType(reflect.TypeOf((*AvailabilitySetArrayInput)(nil)).Elem(), AvailabilitySetArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AvailabilitySetMapInput)(nil)).Elem(), AvailabilitySetMap{}) pulumi.RegisterOutputType(AvailabilitySetOutput{}) pulumi.RegisterOutputType(AvailabilitySetArrayOutput{}) pulumi.RegisterOutputType(AvailabilitySetMapOutput{}) }
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/compute/galleryApplication.go
sdk/go/azure/compute/galleryApplication.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Gallery Application. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleSharedImageGallery, err := compute.NewSharedImageGallery(ctx, "example", &compute.SharedImageGalleryArgs{ // Name: pulumi.String("examplegallery"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = compute.NewGalleryApplication(ctx, "example", &compute.GalleryApplicationArgs{ // Name: pulumi.String("example-app"), // GalleryId: exampleSharedImageGallery.ID(), // Location: example.Location, // SupportedOsType: pulumi.String("Linux"), // }) // 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.Compute` - 2022-03-03 // // ## Import // // Gallery Applications can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/galleryApplication:GalleryApplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/galleries/gallery1/applications/galleryApplication1 // ``` type GalleryApplication struct { pulumi.CustomResourceState // A description of the Gallery Application. Description pulumi.StringPtrOutput `pulumi:"description"` // The end of life date in RFC3339 format of the Gallery Application. EndOfLifeDate pulumi.StringPtrOutput `pulumi:"endOfLifeDate"` // The End User Licence Agreement of the Gallery Application. Eula pulumi.StringPtrOutput `pulumi:"eula"` // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. GalleryId pulumi.StringOutput `pulumi:"galleryId"` // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Gallery Application. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The URI containing the Privacy Statement associated with the Gallery Application. PrivacyStatementUri pulumi.StringPtrOutput `pulumi:"privacyStatementUri"` // The URI containing the Release Notes associated with the Gallery Application. ReleaseNoteUri pulumi.StringPtrOutput `pulumi:"releaseNoteUri"` // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. SupportedOsType pulumi.StringOutput `pulumi:"supportedOsType"` // A mapping of tags to assign to the Gallery Application. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewGalleryApplication registers a new resource with the given unique name, arguments, and options. func NewGalleryApplication(ctx *pulumi.Context, name string, args *GalleryApplicationArgs, opts ...pulumi.ResourceOption) (*GalleryApplication, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.GalleryId == nil { return nil, errors.New("invalid value for required argument 'GalleryId'") } if args.SupportedOsType == nil { return nil, errors.New("invalid value for required argument 'SupportedOsType'") } opts = internal.PkgResourceDefaultOpts(opts) var resource GalleryApplication err := ctx.RegisterResource("azure:compute/galleryApplication:GalleryApplication", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetGalleryApplication gets an existing GalleryApplication 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 GetGalleryApplication(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GalleryApplicationState, opts ...pulumi.ResourceOption) (*GalleryApplication, error) { var resource GalleryApplication err := ctx.ReadResource("azure:compute/galleryApplication:GalleryApplication", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering GalleryApplication resources. type galleryApplicationState struct { // A description of the Gallery Application. Description *string `pulumi:"description"` // The end of life date in RFC3339 format of the Gallery Application. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // The End User Licence Agreement of the Gallery Application. Eula *string `pulumi:"eula"` // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. GalleryId *string `pulumi:"galleryId"` // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Gallery Application. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The URI containing the Privacy Statement associated with the Gallery Application. PrivacyStatementUri *string `pulumi:"privacyStatementUri"` // The URI containing the Release Notes associated with the Gallery Application. ReleaseNoteUri *string `pulumi:"releaseNoteUri"` // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. SupportedOsType *string `pulumi:"supportedOsType"` // A mapping of tags to assign to the Gallery Application. Tags map[string]string `pulumi:"tags"` } type GalleryApplicationState struct { // A description of the Gallery Application. Description pulumi.StringPtrInput // The end of life date in RFC3339 format of the Gallery Application. EndOfLifeDate pulumi.StringPtrInput // The End User Licence Agreement of the Gallery Application. Eula pulumi.StringPtrInput // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. GalleryId pulumi.StringPtrInput // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Gallery Application. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The URI containing the Privacy Statement associated with the Gallery Application. PrivacyStatementUri pulumi.StringPtrInput // The URI containing the Release Notes associated with the Gallery Application. ReleaseNoteUri pulumi.StringPtrInput // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. SupportedOsType pulumi.StringPtrInput // A mapping of tags to assign to the Gallery Application. Tags pulumi.StringMapInput } func (GalleryApplicationState) ElementType() reflect.Type { return reflect.TypeOf((*galleryApplicationState)(nil)).Elem() } type galleryApplicationArgs struct { // A description of the Gallery Application. Description *string `pulumi:"description"` // The end of life date in RFC3339 format of the Gallery Application. EndOfLifeDate *string `pulumi:"endOfLifeDate"` // The End User Licence Agreement of the Gallery Application. Eula *string `pulumi:"eula"` // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. GalleryId string `pulumi:"galleryId"` // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Gallery Application. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The URI containing the Privacy Statement associated with the Gallery Application. PrivacyStatementUri *string `pulumi:"privacyStatementUri"` // The URI containing the Release Notes associated with the Gallery Application. ReleaseNoteUri *string `pulumi:"releaseNoteUri"` // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. SupportedOsType string `pulumi:"supportedOsType"` // A mapping of tags to assign to the Gallery Application. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a GalleryApplication resource. type GalleryApplicationArgs struct { // A description of the Gallery Application. Description pulumi.StringPtrInput // The end of life date in RFC3339 format of the Gallery Application. EndOfLifeDate pulumi.StringPtrInput // The End User Licence Agreement of the Gallery Application. Eula pulumi.StringPtrInput // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. GalleryId pulumi.StringInput // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Gallery Application. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The URI containing the Privacy Statement associated with the Gallery Application. PrivacyStatementUri pulumi.StringPtrInput // The URI containing the Release Notes associated with the Gallery Application. ReleaseNoteUri pulumi.StringPtrInput // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. SupportedOsType pulumi.StringInput // A mapping of tags to assign to the Gallery Application. Tags pulumi.StringMapInput } func (GalleryApplicationArgs) ElementType() reflect.Type { return reflect.TypeOf((*galleryApplicationArgs)(nil)).Elem() } type GalleryApplicationInput interface { pulumi.Input ToGalleryApplicationOutput() GalleryApplicationOutput ToGalleryApplicationOutputWithContext(ctx context.Context) GalleryApplicationOutput } func (*GalleryApplication) ElementType() reflect.Type { return reflect.TypeOf((**GalleryApplication)(nil)).Elem() } func (i *GalleryApplication) ToGalleryApplicationOutput() GalleryApplicationOutput { return i.ToGalleryApplicationOutputWithContext(context.Background()) } func (i *GalleryApplication) ToGalleryApplicationOutputWithContext(ctx context.Context) GalleryApplicationOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationOutput) } // GalleryApplicationArrayInput is an input type that accepts GalleryApplicationArray and GalleryApplicationArrayOutput values. // You can construct a concrete instance of `GalleryApplicationArrayInput` via: // // GalleryApplicationArray{ GalleryApplicationArgs{...} } type GalleryApplicationArrayInput interface { pulumi.Input ToGalleryApplicationArrayOutput() GalleryApplicationArrayOutput ToGalleryApplicationArrayOutputWithContext(context.Context) GalleryApplicationArrayOutput } type GalleryApplicationArray []GalleryApplicationInput func (GalleryApplicationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*GalleryApplication)(nil)).Elem() } func (i GalleryApplicationArray) ToGalleryApplicationArrayOutput() GalleryApplicationArrayOutput { return i.ToGalleryApplicationArrayOutputWithContext(context.Background()) } func (i GalleryApplicationArray) ToGalleryApplicationArrayOutputWithContext(ctx context.Context) GalleryApplicationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationArrayOutput) } // GalleryApplicationMapInput is an input type that accepts GalleryApplicationMap and GalleryApplicationMapOutput values. // You can construct a concrete instance of `GalleryApplicationMapInput` via: // // GalleryApplicationMap{ "key": GalleryApplicationArgs{...} } type GalleryApplicationMapInput interface { pulumi.Input ToGalleryApplicationMapOutput() GalleryApplicationMapOutput ToGalleryApplicationMapOutputWithContext(context.Context) GalleryApplicationMapOutput } type GalleryApplicationMap map[string]GalleryApplicationInput func (GalleryApplicationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GalleryApplication)(nil)).Elem() } func (i GalleryApplicationMap) ToGalleryApplicationMapOutput() GalleryApplicationMapOutput { return i.ToGalleryApplicationMapOutputWithContext(context.Background()) } func (i GalleryApplicationMap) ToGalleryApplicationMapOutputWithContext(ctx context.Context) GalleryApplicationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(GalleryApplicationMapOutput) } type GalleryApplicationOutput struct{ *pulumi.OutputState } func (GalleryApplicationOutput) ElementType() reflect.Type { return reflect.TypeOf((**GalleryApplication)(nil)).Elem() } func (o GalleryApplicationOutput) ToGalleryApplicationOutput() GalleryApplicationOutput { return o } func (o GalleryApplicationOutput) ToGalleryApplicationOutputWithContext(ctx context.Context) GalleryApplicationOutput { return o } // A description of the Gallery Application. func (o GalleryApplicationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The end of life date in RFC3339 format of the Gallery Application. func (o GalleryApplicationOutput) EndOfLifeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringPtrOutput { return v.EndOfLifeDate }).(pulumi.StringPtrOutput) } // The End User Licence Agreement of the Gallery Application. func (o GalleryApplicationOutput) Eula() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringPtrOutput { return v.Eula }).(pulumi.StringPtrOutput) } // The ID of the Shared Image Gallery. Changing this forces a new resource to be created. func (o GalleryApplicationOutput) GalleryId() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringOutput { return v.GalleryId }).(pulumi.StringOutput) } // The Azure Region where the Gallery Application exists. Changing this forces a new resource to be created. func (o GalleryApplicationOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Gallery Application. Changing this forces a new resource to be created. func (o GalleryApplicationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The URI containing the Privacy Statement associated with the Gallery Application. func (o GalleryApplicationOutput) PrivacyStatementUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringPtrOutput { return v.PrivacyStatementUri }).(pulumi.StringPtrOutput) } // The URI containing the Release Notes associated with the Gallery Application. func (o GalleryApplicationOutput) ReleaseNoteUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringPtrOutput { return v.ReleaseNoteUri }).(pulumi.StringPtrOutput) } // The type of the Operating System supported for the Gallery Application. Possible values are `Linux` and `Windows`. Changing this forces a new resource to be created. func (o GalleryApplicationOutput) SupportedOsType() pulumi.StringOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringOutput { return v.SupportedOsType }).(pulumi.StringOutput) } // A mapping of tags to assign to the Gallery Application. func (o GalleryApplicationOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *GalleryApplication) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type GalleryApplicationArrayOutput struct{ *pulumi.OutputState } func (GalleryApplicationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*GalleryApplication)(nil)).Elem() } func (o GalleryApplicationArrayOutput) ToGalleryApplicationArrayOutput() GalleryApplicationArrayOutput { return o } func (o GalleryApplicationArrayOutput) ToGalleryApplicationArrayOutputWithContext(ctx context.Context) GalleryApplicationArrayOutput { return o } func (o GalleryApplicationArrayOutput) Index(i pulumi.IntInput) GalleryApplicationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GalleryApplication { return vs[0].([]*GalleryApplication)[vs[1].(int)] }).(GalleryApplicationOutput) } type GalleryApplicationMapOutput struct{ *pulumi.OutputState } func (GalleryApplicationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GalleryApplication)(nil)).Elem() } func (o GalleryApplicationMapOutput) ToGalleryApplicationMapOutput() GalleryApplicationMapOutput { return o } func (o GalleryApplicationMapOutput) ToGalleryApplicationMapOutputWithContext(ctx context.Context) GalleryApplicationMapOutput { return o } func (o GalleryApplicationMapOutput) MapIndex(k pulumi.StringInput) GalleryApplicationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GalleryApplication { return vs[0].(map[string]*GalleryApplication)[vs[1].(string)] }).(GalleryApplicationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationInput)(nil)).Elem(), &GalleryApplication{}) pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationArrayInput)(nil)).Elem(), GalleryApplicationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GalleryApplicationMapInput)(nil)).Elem(), GalleryApplicationMap{}) pulumi.RegisterOutputType(GalleryApplicationOutput{}) pulumi.RegisterOutputType(GalleryApplicationArrayOutput{}) pulumi.RegisterOutputType(GalleryApplicationMapOutput{}) }
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/compute/dedicatedHost.go
sdk/go/azure/compute/dedicatedHost.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 compute import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manage a Dedicated Host within a Dedicated Host Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "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 // } // exampleDedicatedHostGroup, err := compute.NewDedicatedHostGroup(ctx, "example", &compute.DedicatedHostGroupArgs{ // Name: pulumi.String("example-host-group"), // ResourceGroupName: example.Name, // Location: example.Location, // PlatformFaultDomainCount: pulumi.Int(2), // }) // if err != nil { // return err // } // _, err = compute.NewDedicatedHost(ctx, "example", &compute.DedicatedHostArgs{ // Name: pulumi.String("example-host"), // Location: example.Location, // DedicatedHostGroupId: exampleDedicatedHostGroup.ID(), // SkuName: pulumi.String("DSv3-Type3"), // PlatformFaultDomain: pulumi.Int(1), // }) // 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.Compute` - 2024-03-01 // // ## Import // // Dedicated Hosts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:compute/dedicatedHost:DedicatedHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/hostGroups/group1/hosts/host1 // ``` type DedicatedHost struct { pulumi.CustomResourceState // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. AutoReplaceOnFailure pulumi.BoolPtrOutput `pulumi:"autoReplaceOnFailure"` // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. DedicatedHostGroupId pulumi.StringOutput `pulumi:"dedicatedHostGroupId"` // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` // Specify 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 this Dedicated Host. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. PlatformFaultDomain pulumi.IntOutput `pulumi:"platformFaultDomain"` // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewDedicatedHost registers a new resource with the given unique name, arguments, and options. func NewDedicatedHost(ctx *pulumi.Context, name string, args *DedicatedHostArgs, opts ...pulumi.ResourceOption) (*DedicatedHost, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DedicatedHostGroupId == nil { return nil, errors.New("invalid value for required argument 'DedicatedHostGroupId'") } if args.PlatformFaultDomain == nil { return nil, errors.New("invalid value for required argument 'PlatformFaultDomain'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DedicatedHost err := ctx.RegisterResource("azure:compute/dedicatedHost:DedicatedHost", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDedicatedHost gets an existing DedicatedHost 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 GetDedicatedHost(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DedicatedHostState, opts ...pulumi.ResourceOption) (*DedicatedHost, error) { var resource DedicatedHost err := ctx.ReadResource("azure:compute/dedicatedHost:DedicatedHost", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DedicatedHost resources. type dedicatedHostState struct { // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. AutoReplaceOnFailure *bool `pulumi:"autoReplaceOnFailure"` // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. DedicatedHostGroupId *string `pulumi:"dedicatedHostGroupId"` // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. LicenseType *string `pulumi:"licenseType"` // Specify 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 this Dedicated Host. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. PlatformFaultDomain *int `pulumi:"platformFaultDomain"` // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type DedicatedHostState struct { // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. AutoReplaceOnFailure pulumi.BoolPtrInput // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. DedicatedHostGroupId pulumi.StringPtrInput // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. LicenseType pulumi.StringPtrInput // Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Dedicated Host. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. PlatformFaultDomain pulumi.IntPtrInput // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. SkuName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (DedicatedHostState) ElementType() reflect.Type { return reflect.TypeOf((*dedicatedHostState)(nil)).Elem() } type dedicatedHostArgs struct { // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. AutoReplaceOnFailure *bool `pulumi:"autoReplaceOnFailure"` // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. DedicatedHostGroupId string `pulumi:"dedicatedHostGroupId"` // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. LicenseType *string `pulumi:"licenseType"` // Specify 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 this Dedicated Host. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. PlatformFaultDomain int `pulumi:"platformFaultDomain"` // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. SkuName string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a DedicatedHost resource. type DedicatedHostArgs struct { // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. AutoReplaceOnFailure pulumi.BoolPtrInput // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. DedicatedHostGroupId pulumi.StringInput // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. LicenseType pulumi.StringPtrInput // Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Dedicated Host. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. PlatformFaultDomain pulumi.IntInput // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. SkuName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (DedicatedHostArgs) ElementType() reflect.Type { return reflect.TypeOf((*dedicatedHostArgs)(nil)).Elem() } type DedicatedHostInput interface { pulumi.Input ToDedicatedHostOutput() DedicatedHostOutput ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput } func (*DedicatedHost) ElementType() reflect.Type { return reflect.TypeOf((**DedicatedHost)(nil)).Elem() } func (i *DedicatedHost) ToDedicatedHostOutput() DedicatedHostOutput { return i.ToDedicatedHostOutputWithContext(context.Background()) } func (i *DedicatedHost) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput { return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostOutput) } // DedicatedHostArrayInput is an input type that accepts DedicatedHostArray and DedicatedHostArrayOutput values. // You can construct a concrete instance of `DedicatedHostArrayInput` via: // // DedicatedHostArray{ DedicatedHostArgs{...} } type DedicatedHostArrayInput interface { pulumi.Input ToDedicatedHostArrayOutput() DedicatedHostArrayOutput ToDedicatedHostArrayOutputWithContext(context.Context) DedicatedHostArrayOutput } type DedicatedHostArray []DedicatedHostInput func (DedicatedHostArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DedicatedHost)(nil)).Elem() } func (i DedicatedHostArray) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput { return i.ToDedicatedHostArrayOutputWithContext(context.Background()) } func (i DedicatedHostArray) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostArrayOutput) } // DedicatedHostMapInput is an input type that accepts DedicatedHostMap and DedicatedHostMapOutput values. // You can construct a concrete instance of `DedicatedHostMapInput` via: // // DedicatedHostMap{ "key": DedicatedHostArgs{...} } type DedicatedHostMapInput interface { pulumi.Input ToDedicatedHostMapOutput() DedicatedHostMapOutput ToDedicatedHostMapOutputWithContext(context.Context) DedicatedHostMapOutput } type DedicatedHostMap map[string]DedicatedHostInput func (DedicatedHostMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DedicatedHost)(nil)).Elem() } func (i DedicatedHostMap) ToDedicatedHostMapOutput() DedicatedHostMapOutput { return i.ToDedicatedHostMapOutputWithContext(context.Background()) } func (i DedicatedHostMap) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DedicatedHostMapOutput) } type DedicatedHostOutput struct{ *pulumi.OutputState } func (DedicatedHostOutput) ElementType() reflect.Type { return reflect.TypeOf((**DedicatedHost)(nil)).Elem() } func (o DedicatedHostOutput) ToDedicatedHostOutput() DedicatedHostOutput { return o } func (o DedicatedHostOutput) ToDedicatedHostOutputWithContext(ctx context.Context) DedicatedHostOutput { return o } // Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults to `true`. func (o DedicatedHostOutput) AutoReplaceOnFailure() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.BoolPtrOutput { return v.AutoReplaceOnFailure }).(pulumi.BoolPtrOutput) } // Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. func (o DedicatedHostOutput) DedicatedHostGroupId() pulumi.StringOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringOutput { return v.DedicatedHostGroupId }).(pulumi.StringOutput) } // Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values are `None`, `Windows_Server_Hybrid` and `Windows_Server_Perpetual`. Defaults to `None`. func (o DedicatedHostOutput) LicenseType() pulumi.StringPtrOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringPtrOutput { return v.LicenseType }).(pulumi.StringPtrOutput) } // Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o DedicatedHostOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Dedicated Host. Changing this forces a new resource to be created. func (o DedicatedHostOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created. func (o DedicatedHostOutput) PlatformFaultDomain() pulumi.IntOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.IntOutput { return v.PlatformFaultDomain }).(pulumi.IntOutput) } // Specify the SKU name of the Dedicated Host. Possible values are `DADSv5-Type1`, `DASv4-Type1`, `DASv4-Type2`, `DASv5-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DDSv4-Type2`, `DDSv5-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv3-Type4`, `DSv4-Type1`, `DSv4-Type2`, `DSv5-Type1`, `EADSv5-Type1`, `EASv4-Type1`, `EASv4-Type2`, `EASv5-Type1`, `EDSv4-Type1`, `EDSv4-Type2`, `EDSv5-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv3-Type4`, `ESv4-Type1`, `ESv4-Type2`, `ESv5-Type1`, `FSv2-Type2`, `FSv2-Type3`, `FSv2-Type4`, `FXmds-Type1`, `LSv2-Type1`, `LSv3-Type1`, `MDMSv2MedMem-Type1`, `MDSv2MedMem-Type1`, `MMSv2MedMem-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `MSv2MedMem-Type1`, `NVASv4-Type1` and `NVSv3-Type1`. Changing this forces a new resource to be created. func (o DedicatedHostOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o DedicatedHostOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *DedicatedHost) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type DedicatedHostArrayOutput struct{ *pulumi.OutputState } func (DedicatedHostArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DedicatedHost)(nil)).Elem() } func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutput() DedicatedHostArrayOutput { return o } func (o DedicatedHostArrayOutput) ToDedicatedHostArrayOutputWithContext(ctx context.Context) DedicatedHostArrayOutput { return o } func (o DedicatedHostArrayOutput) Index(i pulumi.IntInput) DedicatedHostOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DedicatedHost { return vs[0].([]*DedicatedHost)[vs[1].(int)] }).(DedicatedHostOutput) } type DedicatedHostMapOutput struct{ *pulumi.OutputState } func (DedicatedHostMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DedicatedHost)(nil)).Elem() } func (o DedicatedHostMapOutput) ToDedicatedHostMapOutput() DedicatedHostMapOutput { return o } func (o DedicatedHostMapOutput) ToDedicatedHostMapOutputWithContext(ctx context.Context) DedicatedHostMapOutput { return o } func (o DedicatedHostMapOutput) MapIndex(k pulumi.StringInput) DedicatedHostOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DedicatedHost { return vs[0].(map[string]*DedicatedHost)[vs[1].(string)] }).(DedicatedHostOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DedicatedHostInput)(nil)).Elem(), &DedicatedHost{}) pulumi.RegisterInputType(reflect.TypeOf((*DedicatedHostArrayInput)(nil)).Elem(), DedicatedHostArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DedicatedHostMapInput)(nil)).Elem(), DedicatedHostMap{}) pulumi.RegisterOutputType(DedicatedHostOutput{}) pulumi.RegisterOutputType(DedicatedHostArrayOutput{}) pulumi.RegisterOutputType(DedicatedHostMapOutput{}) }
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/compute/getImages.go
sdk/go/azure/compute/getImages.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 compute 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 existing Images within a Resource Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := compute.GetImages(ctx, &compute.GetImagesArgs{ // ResourceGroupName: "example-resources", // }, 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.Compute` - 2022-03-01 func GetImages(ctx *pulumi.Context, args *GetImagesArgs, opts ...pulumi.InvokeOption) (*GetImagesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetImagesResult err := ctx.Invoke("azure:compute/getImages:getImages", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getImages. type GetImagesArgs struct { // The name of the Resource Group in which the Image exists. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to filter the list of images against. TagsFilter map[string]string `pulumi:"tagsFilter"` } // A collection of values returned by getImages. type GetImagesResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or more `images` blocks as defined below: Images []GetImagesImage `pulumi:"images"` ResourceGroupName string `pulumi:"resourceGroupName"` TagsFilter map[string]string `pulumi:"tagsFilter"` } func GetImagesOutput(ctx *pulumi.Context, args GetImagesOutputArgs, opts ...pulumi.InvokeOption) GetImagesResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetImagesResultOutput, error) { args := v.(GetImagesArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:compute/getImages:getImages", args, GetImagesResultOutput{}, options).(GetImagesResultOutput), nil }).(GetImagesResultOutput) } // A collection of arguments for invoking getImages. type GetImagesOutputArgs struct { // The name of the Resource Group in which the Image exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // A mapping of tags to filter the list of images against. TagsFilter pulumi.StringMapInput `pulumi:"tagsFilter"` } func (GetImagesOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetImagesArgs)(nil)).Elem() } // A collection of values returned by getImages. type GetImagesResultOutput struct{ *pulumi.OutputState } func (GetImagesResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetImagesResult)(nil)).Elem() } func (o GetImagesResultOutput) ToGetImagesResultOutput() GetImagesResultOutput { return o } func (o GetImagesResultOutput) ToGetImagesResultOutputWithContext(ctx context.Context) GetImagesResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetImagesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetImagesResult) string { return v.Id }).(pulumi.StringOutput) } // One or more `images` blocks as defined below: func (o GetImagesResultOutput) Images() GetImagesImageArrayOutput { return o.ApplyT(func(v GetImagesResult) []GetImagesImage { return v.Images }).(GetImagesImageArrayOutput) } func (o GetImagesResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetImagesResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o GetImagesResultOutput) TagsFilter() pulumi.StringMapOutput { return o.ApplyT(func(v GetImagesResult) map[string]string { return v.TagsFilter }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetImagesResultOutput{}) }
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/redis/init.go
sdk/go/azure/redis/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 redis 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:redis/cache:Cache": r = &Cache{} case "azure:redis/cacheAccessPolicy:CacheAccessPolicy": r = &CacheAccessPolicy{} case "azure:redis/cacheAccessPolicyAssignment:CacheAccessPolicyAssignment": r = &CacheAccessPolicyAssignment{} case "azure:redis/enterpriseCluster:EnterpriseCluster": r = &EnterpriseCluster{} case "azure:redis/enterpriseDatabase:EnterpriseDatabase": r = &EnterpriseDatabase{} case "azure:redis/firewallRule:FirewallRule": r = &FirewallRule{} case "azure:redis/linkedServer:LinkedServer": r = &LinkedServer{} 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", "redis/cache", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/cacheAccessPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/cacheAccessPolicyAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/enterpriseCluster", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/enterpriseDatabase", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/firewallRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "redis/linkedServer", &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/redis/pulumiTypes.go
sdk/go/azure/redis/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 redis 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 CacheIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. // // > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds []string `pulumi:"identityIds"` PrincipalId *string `pulumi:"principalId"` TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type string `pulumi:"type"` } // CacheIdentityInput is an input type that accepts CacheIdentityArgs and CacheIdentityOutput values. // You can construct a concrete instance of `CacheIdentityInput` via: // // CacheIdentityArgs{...} type CacheIdentityInput interface { pulumi.Input ToCacheIdentityOutput() CacheIdentityOutput ToCacheIdentityOutputWithContext(context.Context) CacheIdentityOutput } type CacheIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. // // > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type pulumi.StringInput `pulumi:"type"` } func (CacheIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*CacheIdentity)(nil)).Elem() } func (i CacheIdentityArgs) ToCacheIdentityOutput() CacheIdentityOutput { return i.ToCacheIdentityOutputWithContext(context.Background()) } func (i CacheIdentityArgs) ToCacheIdentityOutputWithContext(ctx context.Context) CacheIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheIdentityOutput) } func (i CacheIdentityArgs) ToCacheIdentityPtrOutput() CacheIdentityPtrOutput { return i.ToCacheIdentityPtrOutputWithContext(context.Background()) } func (i CacheIdentityArgs) ToCacheIdentityPtrOutputWithContext(ctx context.Context) CacheIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheIdentityOutput).ToCacheIdentityPtrOutputWithContext(ctx) } // CacheIdentityPtrInput is an input type that accepts CacheIdentityArgs, CacheIdentityPtr and CacheIdentityPtrOutput values. // You can construct a concrete instance of `CacheIdentityPtrInput` via: // // CacheIdentityArgs{...} // // or: // // nil type CacheIdentityPtrInput interface { pulumi.Input ToCacheIdentityPtrOutput() CacheIdentityPtrOutput ToCacheIdentityPtrOutputWithContext(context.Context) CacheIdentityPtrOutput } type cacheIdentityPtrType CacheIdentityArgs func CacheIdentityPtr(v *CacheIdentityArgs) CacheIdentityPtrInput { return (*cacheIdentityPtrType)(v) } func (*cacheIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**CacheIdentity)(nil)).Elem() } func (i *cacheIdentityPtrType) ToCacheIdentityPtrOutput() CacheIdentityPtrOutput { return i.ToCacheIdentityPtrOutputWithContext(context.Background()) } func (i *cacheIdentityPtrType) ToCacheIdentityPtrOutputWithContext(ctx context.Context) CacheIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheIdentityPtrOutput) } type CacheIdentityOutput struct{ *pulumi.OutputState } func (CacheIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*CacheIdentity)(nil)).Elem() } func (o CacheIdentityOutput) ToCacheIdentityOutput() CacheIdentityOutput { return o } func (o CacheIdentityOutput) ToCacheIdentityOutputWithContext(ctx context.Context) CacheIdentityOutput { return o } func (o CacheIdentityOutput) ToCacheIdentityPtrOutput() CacheIdentityPtrOutput { return o.ToCacheIdentityPtrOutputWithContext(context.Background()) } func (o CacheIdentityOutput) ToCacheIdentityPtrOutputWithContext(ctx context.Context) CacheIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheIdentity) *CacheIdentity { return &v }).(CacheIdentityPtrOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. // // > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o CacheIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v CacheIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } func (o CacheIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } func (o CacheIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o CacheIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v CacheIdentity) string { return v.Type }).(pulumi.StringOutput) } type CacheIdentityPtrOutput struct{ *pulumi.OutputState } func (CacheIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**CacheIdentity)(nil)).Elem() } func (o CacheIdentityPtrOutput) ToCacheIdentityPtrOutput() CacheIdentityPtrOutput { return o } func (o CacheIdentityPtrOutput) ToCacheIdentityPtrOutputWithContext(ctx context.Context) CacheIdentityPtrOutput { return o } func (o CacheIdentityPtrOutput) Elem() CacheIdentityOutput { return o.ApplyT(func(v *CacheIdentity) CacheIdentity { if v != nil { return *v } var ret CacheIdentity return ret }).(CacheIdentityOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. // // > **NOTE:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o CacheIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *CacheIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } func (o CacheIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *CacheIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } func (o CacheIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *CacheIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o CacheIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *CacheIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type CachePatchSchedule struct { // the Weekday name - possible values include `Monday`, `Tuesday`, `Wednesday` etc. DayOfWeek string `pulumi:"dayOfWeek"` // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to `PT5H`. MaintenanceWindow *string `pulumi:"maintenanceWindow"` // the Start Hour for maintenance in UTC - possible values range from `0 - 23`. // // > **Note:** The Patch Window lasts for `5` hours from the `startHourUtc`. StartHourUtc *int `pulumi:"startHourUtc"` } // CachePatchScheduleInput is an input type that accepts CachePatchScheduleArgs and CachePatchScheduleOutput values. // You can construct a concrete instance of `CachePatchScheduleInput` via: // // CachePatchScheduleArgs{...} type CachePatchScheduleInput interface { pulumi.Input ToCachePatchScheduleOutput() CachePatchScheduleOutput ToCachePatchScheduleOutputWithContext(context.Context) CachePatchScheduleOutput } type CachePatchScheduleArgs struct { // the Weekday name - possible values include `Monday`, `Tuesday`, `Wednesday` etc. DayOfWeek pulumi.StringInput `pulumi:"dayOfWeek"` // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to `PT5H`. MaintenanceWindow pulumi.StringPtrInput `pulumi:"maintenanceWindow"` // the Start Hour for maintenance in UTC - possible values range from `0 - 23`. // // > **Note:** The Patch Window lasts for `5` hours from the `startHourUtc`. StartHourUtc pulumi.IntPtrInput `pulumi:"startHourUtc"` } func (CachePatchScheduleArgs) ElementType() reflect.Type { return reflect.TypeOf((*CachePatchSchedule)(nil)).Elem() } func (i CachePatchScheduleArgs) ToCachePatchScheduleOutput() CachePatchScheduleOutput { return i.ToCachePatchScheduleOutputWithContext(context.Background()) } func (i CachePatchScheduleArgs) ToCachePatchScheduleOutputWithContext(ctx context.Context) CachePatchScheduleOutput { return pulumi.ToOutputWithContext(ctx, i).(CachePatchScheduleOutput) } // CachePatchScheduleArrayInput is an input type that accepts CachePatchScheduleArray and CachePatchScheduleArrayOutput values. // You can construct a concrete instance of `CachePatchScheduleArrayInput` via: // // CachePatchScheduleArray{ CachePatchScheduleArgs{...} } type CachePatchScheduleArrayInput interface { pulumi.Input ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput ToCachePatchScheduleArrayOutputWithContext(context.Context) CachePatchScheduleArrayOutput } type CachePatchScheduleArray []CachePatchScheduleInput func (CachePatchScheduleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CachePatchSchedule)(nil)).Elem() } func (i CachePatchScheduleArray) ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput { return i.ToCachePatchScheduleArrayOutputWithContext(context.Background()) } func (i CachePatchScheduleArray) ToCachePatchScheduleArrayOutputWithContext(ctx context.Context) CachePatchScheduleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CachePatchScheduleArrayOutput) } type CachePatchScheduleOutput struct{ *pulumi.OutputState } func (CachePatchScheduleOutput) ElementType() reflect.Type { return reflect.TypeOf((*CachePatchSchedule)(nil)).Elem() } func (o CachePatchScheduleOutput) ToCachePatchScheduleOutput() CachePatchScheduleOutput { return o } func (o CachePatchScheduleOutput) ToCachePatchScheduleOutputWithContext(ctx context.Context) CachePatchScheduleOutput { return o } // the Weekday name - possible values include `Monday`, `Tuesday`, `Wednesday` etc. func (o CachePatchScheduleOutput) DayOfWeek() pulumi.StringOutput { return o.ApplyT(func(v CachePatchSchedule) string { return v.DayOfWeek }).(pulumi.StringOutput) } // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to `PT5H`. func (o CachePatchScheduleOutput) MaintenanceWindow() pulumi.StringPtrOutput { return o.ApplyT(func(v CachePatchSchedule) *string { return v.MaintenanceWindow }).(pulumi.StringPtrOutput) } // the Start Hour for maintenance in UTC - possible values range from `0 - 23`. // // > **Note:** The Patch Window lasts for `5` hours from the `startHourUtc`. func (o CachePatchScheduleOutput) StartHourUtc() pulumi.IntPtrOutput { return o.ApplyT(func(v CachePatchSchedule) *int { return v.StartHourUtc }).(pulumi.IntPtrOutput) } type CachePatchScheduleArrayOutput struct{ *pulumi.OutputState } func (CachePatchScheduleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CachePatchSchedule)(nil)).Elem() } func (o CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput { return o } func (o CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutputWithContext(ctx context.Context) CachePatchScheduleArrayOutput { return o } func (o CachePatchScheduleArrayOutput) Index(i pulumi.IntInput) CachePatchScheduleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CachePatchSchedule { return vs[0].([]CachePatchSchedule)[vs[1].(int)] }).(CachePatchScheduleOutput) } type CacheRedisConfiguration struct { // Enable Microsoft Entra (AAD) authentication. Defaults to `false`. ActiveDirectoryAuthenticationEnabled *bool `pulumi:"activeDirectoryAuthenticationEnabled"` // Enable or disable AOF persistence for this Redis Cache. Defaults to `false`. // // > **NOTE:** `aofBackupEnabled` can only be set when SKU is `Premium`. AofBackupEnabled *bool `pulumi:"aofBackupEnabled"` // First Storage Account connection string for AOF persistence. AofStorageConnectionString0 *string `pulumi:"aofStorageConnectionString0"` // Second Storage Account connection string for AOF persistence. // // Example usage: AofStorageConnectionString1 *string `pulumi:"aofStorageConnectionString1"` // If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. // // > **NOTE:** `authenticationEnabled` can only be set to `false` if a `subnetId` is specified; and only works if there aren't existing instances within the subnet with `authenticationEnabled` set to `true`. AuthenticationEnabled *bool `pulumi:"authenticationEnabled"` // Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. DataPersistenceAuthenticationMethod *string `pulumi:"dataPersistenceAuthenticationMethod"` // Returns the max number of connected clients at the same time. Maxclients *int `pulumi:"maxclients"` // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. MaxfragmentationmemoryReserved *int `pulumi:"maxfragmentationmemoryReserved"` // The max-memory delta for this Redis instance. Defaults are shown below. MaxmemoryDelta *int `pulumi:"maxmemoryDelta"` // How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`. MaxmemoryPolicy *string `pulumi:"maxmemoryPolicy"` // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. MaxmemoryReserved *int `pulumi:"maxmemoryReserved"` // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration) NotifyKeyspaceEvents *string `pulumi:"notifyKeyspaceEvents"` // Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`. // // > **NOTE:** If `rdbBackupEnabled` set to `true`, `rdbStorageConnectionString` must also be set. RdbBackupEnabled *bool `pulumi:"rdbBackupEnabled"` // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`. RdbBackupFrequency *int `pulumi:"rdbBackupFrequency"` // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. RdbBackupMaxSnapshotCount *int `pulumi:"rdbBackupMaxSnapshotCount"` // The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`. // // > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.: RdbStorageConnectionString *string `pulumi:"rdbStorageConnectionString"` // The ID of the Subscription containing the Storage Account. StorageAccountSubscriptionId *string `pulumi:"storageAccountSubscriptionId"` } // CacheRedisConfigurationInput is an input type that accepts CacheRedisConfigurationArgs and CacheRedisConfigurationOutput values. // You can construct a concrete instance of `CacheRedisConfigurationInput` via: // // CacheRedisConfigurationArgs{...} type CacheRedisConfigurationInput interface { pulumi.Input ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput ToCacheRedisConfigurationOutputWithContext(context.Context) CacheRedisConfigurationOutput } type CacheRedisConfigurationArgs struct { // Enable Microsoft Entra (AAD) authentication. Defaults to `false`. ActiveDirectoryAuthenticationEnabled pulumi.BoolPtrInput `pulumi:"activeDirectoryAuthenticationEnabled"` // Enable or disable AOF persistence for this Redis Cache. Defaults to `false`. // // > **NOTE:** `aofBackupEnabled` can only be set when SKU is `Premium`. AofBackupEnabled pulumi.BoolPtrInput `pulumi:"aofBackupEnabled"` // First Storage Account connection string for AOF persistence. AofStorageConnectionString0 pulumi.StringPtrInput `pulumi:"aofStorageConnectionString0"` // Second Storage Account connection string for AOF persistence. // // Example usage: AofStorageConnectionString1 pulumi.StringPtrInput `pulumi:"aofStorageConnectionString1"` // If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. // // > **NOTE:** `authenticationEnabled` can only be set to `false` if a `subnetId` is specified; and only works if there aren't existing instances within the subnet with `authenticationEnabled` set to `true`. AuthenticationEnabled pulumi.BoolPtrInput `pulumi:"authenticationEnabled"` // Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. DataPersistenceAuthenticationMethod pulumi.StringPtrInput `pulumi:"dataPersistenceAuthenticationMethod"` // Returns the max number of connected clients at the same time. Maxclients pulumi.IntPtrInput `pulumi:"maxclients"` // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. MaxfragmentationmemoryReserved pulumi.IntPtrInput `pulumi:"maxfragmentationmemoryReserved"` // The max-memory delta for this Redis instance. Defaults are shown below. MaxmemoryDelta pulumi.IntPtrInput `pulumi:"maxmemoryDelta"` // How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`. MaxmemoryPolicy pulumi.StringPtrInput `pulumi:"maxmemoryPolicy"` // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. MaxmemoryReserved pulumi.IntPtrInput `pulumi:"maxmemoryReserved"` // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration) NotifyKeyspaceEvents pulumi.StringPtrInput `pulumi:"notifyKeyspaceEvents"` // Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`. // // > **NOTE:** If `rdbBackupEnabled` set to `true`, `rdbStorageConnectionString` must also be set. RdbBackupEnabled pulumi.BoolPtrInput `pulumi:"rdbBackupEnabled"` // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`. RdbBackupFrequency pulumi.IntPtrInput `pulumi:"rdbBackupFrequency"` // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. RdbBackupMaxSnapshotCount pulumi.IntPtrInput `pulumi:"rdbBackupMaxSnapshotCount"` // The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`. // // > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.: RdbStorageConnectionString pulumi.StringPtrInput `pulumi:"rdbStorageConnectionString"` // The ID of the Subscription containing the Storage Account. StorageAccountSubscriptionId pulumi.StringPtrInput `pulumi:"storageAccountSubscriptionId"` } func (CacheRedisConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*CacheRedisConfiguration)(nil)).Elem() } func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput { return i.ToCacheRedisConfigurationOutputWithContext(context.Background()) } func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutputWithContext(ctx context.Context) CacheRedisConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheRedisConfigurationOutput) } func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput { return i.ToCacheRedisConfigurationPtrOutputWithContext(context.Background()) } func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheRedisConfigurationOutput).ToCacheRedisConfigurationPtrOutputWithContext(ctx) } // CacheRedisConfigurationPtrInput is an input type that accepts CacheRedisConfigurationArgs, CacheRedisConfigurationPtr and CacheRedisConfigurationPtrOutput values. // You can construct a concrete instance of `CacheRedisConfigurationPtrInput` via: // // CacheRedisConfigurationArgs{...} // // or: // // nil type CacheRedisConfigurationPtrInput interface { pulumi.Input ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput ToCacheRedisConfigurationPtrOutputWithContext(context.Context) CacheRedisConfigurationPtrOutput } type cacheRedisConfigurationPtrType CacheRedisConfigurationArgs func CacheRedisConfigurationPtr(v *CacheRedisConfigurationArgs) CacheRedisConfigurationPtrInput { return (*cacheRedisConfigurationPtrType)(v) } func (*cacheRedisConfigurationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**CacheRedisConfiguration)(nil)).Elem() } func (i *cacheRedisConfigurationPtrType) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput { return i.ToCacheRedisConfigurationPtrOutputWithContext(context.Background()) } func (i *cacheRedisConfigurationPtrType) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheRedisConfigurationPtrOutput) } type CacheRedisConfigurationOutput struct{ *pulumi.OutputState } func (CacheRedisConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*CacheRedisConfiguration)(nil)).Elem() } func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput { return o } func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutputWithContext(ctx context.Context) CacheRedisConfigurationOutput { return o } func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput { return o.ToCacheRedisConfigurationPtrOutputWithContext(context.Background()) } func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheRedisConfiguration) *CacheRedisConfiguration { return &v }).(CacheRedisConfigurationPtrOutput) } // Enable Microsoft Entra (AAD) authentication. Defaults to `false`. func (o CacheRedisConfigurationOutput) ActiveDirectoryAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *bool { return v.ActiveDirectoryAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // Enable or disable AOF persistence for this Redis Cache. Defaults to `false`. // // > **NOTE:** `aofBackupEnabled` can only be set when SKU is `Premium`. func (o CacheRedisConfigurationOutput) AofBackupEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *bool { return v.AofBackupEnabled }).(pulumi.BoolPtrOutput) } // First Storage Account connection string for AOF persistence. func (o CacheRedisConfigurationOutput) AofStorageConnectionString0() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.AofStorageConnectionString0 }).(pulumi.StringPtrOutput) } // Second Storage Account connection string for AOF persistence. // // Example usage: func (o CacheRedisConfigurationOutput) AofStorageConnectionString1() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.AofStorageConnectionString1 }).(pulumi.StringPtrOutput) } // If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. // // > **NOTE:** `authenticationEnabled` can only be set to `false` if a `subnetId` is specified; and only works if there aren't existing instances within the subnet with `authenticationEnabled` set to `true`. func (o CacheRedisConfigurationOutput) AuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *bool { return v.AuthenticationEnabled }).(pulumi.BoolPtrOutput) } // Preferred auth method to communicate to storage account used for data persistence. Possible values are `SAS` and `ManagedIdentity`. func (o CacheRedisConfigurationOutput) DataPersistenceAuthenticationMethod() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.DataPersistenceAuthenticationMethod }).(pulumi.StringPtrOutput) } // Returns the max number of connected clients at the same time. func (o CacheRedisConfigurationOutput) Maxclients() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.Maxclients }).(pulumi.IntPtrOutput) } // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. func (o CacheRedisConfigurationOutput) MaxfragmentationmemoryReserved() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.MaxfragmentationmemoryReserved }).(pulumi.IntPtrOutput) } // The max-memory delta for this Redis instance. Defaults are shown below. func (o CacheRedisConfigurationOutput) MaxmemoryDelta() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.MaxmemoryDelta }).(pulumi.IntPtrOutput) } // How Redis will select what to remove when `maxmemory` is reached. Defaults to `volatile-lru`. func (o CacheRedisConfigurationOutput) MaxmemoryPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.MaxmemoryPolicy }).(pulumi.StringPtrOutput) } // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. func (o CacheRedisConfigurationOutput) MaxmemoryReserved() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.MaxmemoryReserved }).(pulumi.IntPtrOutput) } // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration) func (o CacheRedisConfigurationOutput) NotifyKeyspaceEvents() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.NotifyKeyspaceEvents }).(pulumi.StringPtrOutput) } // Is Backup Enabled? Only supported on Premium SKUs. Defaults to `false`. // // > **NOTE:** If `rdbBackupEnabled` set to `true`, `rdbStorageConnectionString` must also be set. func (o CacheRedisConfigurationOutput) RdbBackupEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *bool { return v.RdbBackupEnabled }).(pulumi.BoolPtrOutput) } // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`. func (o CacheRedisConfigurationOutput) RdbBackupFrequency() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.RdbBackupFrequency }).(pulumi.IntPtrOutput) } // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. func (o CacheRedisConfigurationOutput) RdbBackupMaxSnapshotCount() pulumi.IntPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *int { return v.RdbBackupMaxSnapshotCount }).(pulumi.IntPtrOutput) } // The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`. // // > **NOTE:** There's a bug in the Redis API where the original storage connection string isn't being returned, which [is being tracked in this issue](https://github.com/Azure/azure-rest-api-specs/issues/3037). In the interim you can use [the `ignoreChanges` attribute to ignore changes to this field](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) e.g.: func (o CacheRedisConfigurationOutput) RdbStorageConnectionString() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.RdbStorageConnectionString }).(pulumi.StringPtrOutput) } // The ID of the Subscription containing the Storage Account. func (o CacheRedisConfigurationOutput) StorageAccountSubscriptionId() pulumi.StringPtrOutput { return o.ApplyT(func(v CacheRedisConfiguration) *string { return v.StorageAccountSubscriptionId }).(pulumi.StringPtrOutput) } type CacheRedisConfigurationPtrOutput struct{ *pulumi.OutputState } func (CacheRedisConfigurationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**CacheRedisConfiguration)(nil)).Elem() } func (o CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput { return o } func (o CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput { return o } func (o CacheRedisConfigurationPtrOutput) Elem() CacheRedisConfigurationOutput { return o.ApplyT(func(v *CacheRedisConfiguration) CacheRedisConfiguration { if v != nil { return *v } var ret CacheRedisConfiguration return ret }).(CacheRedisConfigurationOutput) } // Enable Microsoft Entra (AAD) authentication. Defaults to `false`. func (o CacheRedisConfigurationPtrOutput) ActiveDirectoryAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CacheRedisConfiguration) *bool { if v == nil { return nil } return v.ActiveDirectoryAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // Enable or disable AOF persistence for this Redis Cache. Defaults to `false`. // // > **NOTE:** `aofBackupEnabled` can only be set when SKU is `Premium`. func (o CacheRedisConfigurationPtrOutput) AofBackupEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *CacheRedisConfiguration) *bool { if v == nil { return nil } return v.AofBackupEnabled }).(pulumi.BoolPtrOutput) } // First Storage Account connection string for AOF persistence. func (o CacheRedisConfigurationPtrOutput) AofStorageConnectionString0() pulumi.StringPtrOutput { return o.ApplyT(func(v *CacheRedisConfiguration) *string { if v == nil { return nil } return v.AofStorageConnectionString0 }).(pulumi.StringPtrOutput) } // Second Storage Account connection string for AOF persistence. // // Example usage: func (o CacheRedisConfigurationPtrOutput) AofStorageConnectionString1() pulumi.StringPtrOutput { return o.ApplyT(func(v *CacheRedisConfiguration) *string { if v == nil { return nil } return v.AofStorageConnectionString1 }).(pulumi.StringPtrOutput) } // If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`. // // > **NOTE:** `authenticationEnabled` can only be set to `false` if a `subnetId` is specified; and only works if there aren't existing instances within the subnet with `authenticationEnabled` set to `true`.
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/redis/cache.go
sdk/go/azure/redis/cache.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Cache. // // > **Note:** Redis version 4 is being retired and no longer supports creating new instances. Version 4 will be removed in a future release. [Redis Version 4 Retirement](https://learn.microsoft.com/azure/azure-cache-for-redis/cache-retired-features#important-upgrade-timelines) // // ## Example Usage // // This example provisions a Standard Redis Cache. // // ```go // package main // // import ( // // "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 // } // // NOTE: the Name used for Redis needs to be globally unique // _, err = redis.NewCache(ctx, "example", &redis.CacheArgs{ // Name: pulumi.String("example-cache"), // Location: example.Location, // ResourceGroupName: example.Name, // Capacity: pulumi.Int(2), // Family: pulumi.String("C"), // SkuName: pulumi.String("Standard"), // NonSslPortEnabled: pulumi.Bool(false), // MinimumTlsVersion: pulumi.String("1.2"), // RedisConfiguration: &redis.CacheRedisConfigurationArgs{}, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Relevant Links // // * [Azure Cache for Redis planning](https://docs.microsoft.com/azure/azure-cache-for-redis/cache-planning-faq) // * [Redis: Available Configuration Settings](https://redis.io/topics/config) // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Cache` - 2024-11-01 // // ## Import // // Redis Cache's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/cache:Cache cache1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1 // ``` type Cache struct { pulumi.CustomResourceState // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. AccessKeysAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"accessKeysAuthenticationEnabled"` // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. Capacity pulumi.IntOutput `pulumi:"capacity"` // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family pulumi.StringOutput `pulumi:"family"` // The Hostname of the Redis Instance Hostname pulumi.StringOutput `pulumi:"hostname"` // An `identity` block as defined below. Identity CacheIdentityPtrOutput `pulumi:"identity"` // The location of the resource group. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. // // > **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"` // The name of the Redis instance. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Enable the non-SSL port (6379) - disabled by default. NonSslPortEnabled pulumi.BoolPtrOutput `pulumi:"nonSslPortEnabled"` // A list of `patchSchedule` blocks as defined below. PatchSchedules CachePatchScheduleArrayOutput `pulumi:"patchSchedules"` // The non-SSL Port of the Redis Instance Port pulumi.IntOutput `pulumi:"port"` // The Primary Access Key for the Redis Instance PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The primary connection string of the Redis Instance. PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"` // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnetId`. Changing this forces a new resource to be created. PrivateStaticIpAddress pulumi.StringOutput `pulumi:"privateStaticIpAddress"` // Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // A `redisConfiguration` block as defined below - with some limitations by SKU - defaults/details are shown below. RedisConfiguration CacheRedisConfigurationOutput `pulumi:"redisConfiguration"` // Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. RedisVersion pulumi.StringPtrOutput `pulumi:"redisVersion"` // Amount of replicas to create per master for this Redis Cache. // // > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards. ReplicasPerMaster pulumi.IntOutput `pulumi:"replicasPerMaster"` // Amount of replicas to create per primary for this Redis Cache. If both `replicasPerPrimary` and `replicasPerMaster` are set, they need to be equal. ReplicasPerPrimary pulumi.IntOutput `pulumi:"replicasPerPrimary"` // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Secondary Access Key for the Redis Instance SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` // The secondary connection string of the Redis Instance. SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"` // *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster. ShardCount pulumi.IntPtrOutput `pulumi:"shardCount"` // The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`. // // > **Note** Downgrading the SKU will force a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // The SSL Port of the Redis Instance SslPort pulumi.IntOutput `pulumi:"sslPort"` // *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A mapping of tenant settings to assign to the resource. TenantSettings pulumi.StringMapOutput `pulumi:"tenantSettings"` // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. // // > **Please Note:** Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewCache registers a new resource with the given unique name, arguments, and options. func NewCache(ctx *pulumi.Context, name string, args *CacheArgs, opts ...pulumi.ResourceOption) (*Cache, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Capacity == nil { return nil, errors.New("invalid value for required argument 'Capacity'") } if args.Family == nil { return nil, errors.New("invalid value for required argument 'Family'") } 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", "primaryConnectionString", "secondaryAccessKey", "secondaryConnectionString", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Cache err := ctx.RegisterResource("azure:redis/cache:Cache", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCache gets an existing Cache 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 GetCache(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CacheState, opts ...pulumi.ResourceOption) (*Cache, error) { var resource Cache err := ctx.ReadResource("azure:redis/cache:Cache", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Cache resources. type cacheState struct { // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. AccessKeysAuthenticationEnabled *bool `pulumi:"accessKeysAuthenticationEnabled"` // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. Capacity *int `pulumi:"capacity"` // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family *string `pulumi:"family"` // The Hostname of the Redis Instance Hostname *string `pulumi:"hostname"` // An `identity` block as defined below. Identity *CacheIdentity `pulumi:"identity"` // The location of the resource group. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. // // > **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion *string `pulumi:"minimumTlsVersion"` // The name of the Redis instance. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Enable the non-SSL port (6379) - disabled by default. NonSslPortEnabled *bool `pulumi:"nonSslPortEnabled"` // A list of `patchSchedule` blocks as defined below. PatchSchedules []CachePatchSchedule `pulumi:"patchSchedules"` // The non-SSL Port of the Redis Instance Port *int `pulumi:"port"` // The Primary Access Key for the Redis Instance PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The primary connection string of the Redis Instance. PrimaryConnectionString *string `pulumi:"primaryConnectionString"` // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnetId`. Changing this forces a new resource to be created. PrivateStaticIpAddress *string `pulumi:"privateStaticIpAddress"` // Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // A `redisConfiguration` block as defined below - with some limitations by SKU - defaults/details are shown below. RedisConfiguration *CacheRedisConfiguration `pulumi:"redisConfiguration"` // Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. RedisVersion *string `pulumi:"redisVersion"` // Amount of replicas to create per master for this Redis Cache. // // > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards. ReplicasPerMaster *int `pulumi:"replicasPerMaster"` // Amount of replicas to create per primary for this Redis Cache. If both `replicasPerPrimary` and `replicasPerMaster` are set, they need to be equal. ReplicasPerPrimary *int `pulumi:"replicasPerPrimary"` // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Secondary Access Key for the Redis Instance SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` // The secondary connection string of the Redis Instance. SecondaryConnectionString *string `pulumi:"secondaryConnectionString"` // *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster. ShardCount *int `pulumi:"shardCount"` // The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`. // // > **Note** Downgrading the SKU will force a new resource to be created. SkuName *string `pulumi:"skuName"` // The SSL Port of the Redis Instance SslPort *int `pulumi:"sslPort"` // *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A mapping of tenant settings to assign to the resource. TenantSettings map[string]string `pulumi:"tenantSettings"` // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. // // > **Please Note:** Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). Zones []string `pulumi:"zones"` } type CacheState struct { // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. AccessKeysAuthenticationEnabled pulumi.BoolPtrInput // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. Capacity pulumi.IntPtrInput // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family pulumi.StringPtrInput // The Hostname of the Redis Instance Hostname pulumi.StringPtrInput // An `identity` block as defined below. Identity CacheIdentityPtrInput // The location of the resource group. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. // // > **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrInput // The name of the Redis instance. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Enable the non-SSL port (6379) - disabled by default. NonSslPortEnabled pulumi.BoolPtrInput // A list of `patchSchedule` blocks as defined below. PatchSchedules CachePatchScheduleArrayInput // The non-SSL Port of the Redis Instance Port pulumi.IntPtrInput // The Primary Access Key for the Redis Instance PrimaryAccessKey pulumi.StringPtrInput // The primary connection string of the Redis Instance. PrimaryConnectionString pulumi.StringPtrInput // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnetId`. Changing this forces a new resource to be created. PrivateStaticIpAddress pulumi.StringPtrInput // Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // A `redisConfiguration` block as defined below - with some limitations by SKU - defaults/details are shown below. RedisConfiguration CacheRedisConfigurationPtrInput // Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. RedisVersion pulumi.StringPtrInput // Amount of replicas to create per master for this Redis Cache. // // > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards. ReplicasPerMaster pulumi.IntPtrInput // Amount of replicas to create per primary for this Redis Cache. If both `replicasPerPrimary` and `replicasPerMaster` are set, they need to be equal. ReplicasPerPrimary pulumi.IntPtrInput // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The Secondary Access Key for the Redis Instance SecondaryAccessKey pulumi.StringPtrInput // The secondary connection string of the Redis Instance. SecondaryConnectionString pulumi.StringPtrInput // *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster. ShardCount pulumi.IntPtrInput // The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`. // // > **Note** Downgrading the SKU will force a new resource to be created. SkuName pulumi.StringPtrInput // The SSL Port of the Redis Instance SslPort pulumi.IntPtrInput // *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A mapping of tenant settings to assign to the resource. TenantSettings pulumi.StringMapInput // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. // // > **Please Note:** Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). Zones pulumi.StringArrayInput } func (CacheState) ElementType() reflect.Type { return reflect.TypeOf((*cacheState)(nil)).Elem() } type cacheArgs struct { // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. AccessKeysAuthenticationEnabled *bool `pulumi:"accessKeysAuthenticationEnabled"` // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. Capacity int `pulumi:"capacity"` // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family string `pulumi:"family"` // An `identity` block as defined below. Identity *CacheIdentity `pulumi:"identity"` // The location of the resource group. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. // // > **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion *string `pulumi:"minimumTlsVersion"` // The name of the Redis instance. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Enable the non-SSL port (6379) - disabled by default. NonSslPortEnabled *bool `pulumi:"nonSslPortEnabled"` // A list of `patchSchedule` blocks as defined below. PatchSchedules []CachePatchSchedule `pulumi:"patchSchedules"` // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnetId`. Changing this forces a new resource to be created. PrivateStaticIpAddress *string `pulumi:"privateStaticIpAddress"` // Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // A `redisConfiguration` block as defined below - with some limitations by SKU - defaults/details are shown below. RedisConfiguration *CacheRedisConfiguration `pulumi:"redisConfiguration"` // Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. RedisVersion *string `pulumi:"redisVersion"` // Amount of replicas to create per master for this Redis Cache. // // > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards. ReplicasPerMaster *int `pulumi:"replicasPerMaster"` // Amount of replicas to create per primary for this Redis Cache. If both `replicasPerPrimary` and `replicasPerMaster` are set, they need to be equal. ReplicasPerPrimary *int `pulumi:"replicasPerPrimary"` // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster. ShardCount *int `pulumi:"shardCount"` // The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`. // // > **Note** Downgrading the SKU will force a new resource to be created. SkuName string `pulumi:"skuName"` // *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A mapping of tenant settings to assign to the resource. TenantSettings map[string]string `pulumi:"tenantSettings"` // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. // // > **Please Note:** Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). Zones []string `pulumi:"zones"` } // The set of arguments for constructing a Cache resource. type CacheArgs struct { // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. AccessKeysAuthenticationEnabled pulumi.BoolPtrInput // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. Capacity pulumi.IntInput // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family pulumi.StringInput // An `identity` block as defined below. Identity CacheIdentityPtrInput // The location of the resource group. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. // // > **NOTE:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrInput // The name of the Redis instance. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Enable the non-SSL port (6379) - disabled by default. NonSslPortEnabled pulumi.BoolPtrInput // A list of `patchSchedule` blocks as defined below. PatchSchedules CachePatchScheduleArrayInput // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnetId`. Changing this forces a new resource to be created. PrivateStaticIpAddress pulumi.StringPtrInput // Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // A `redisConfiguration` block as defined below - with some limitations by SKU - defaults/details are shown below. RedisConfiguration CacheRedisConfigurationPtrInput // Redis version. Only major version needed. Possible values are `4` and `6`. Defaults to `6`. RedisVersion pulumi.StringPtrInput // Amount of replicas to create per master for this Redis Cache. // // > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards. ReplicasPerMaster pulumi.IntPtrInput // Amount of replicas to create per primary for this Redis Cache. If both `replicasPerPrimary` and `replicasPerMaster` are set, they need to be equal. ReplicasPerPrimary pulumi.IntPtrInput // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster. ShardCount pulumi.IntPtrInput // The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`. // // > **Note** Downgrading the SKU will force a new resource to be created. SkuName pulumi.StringInput // *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A mapping of tenant settings to assign to the resource. TenantSettings pulumi.StringMapInput // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. // // > **Please Note:** Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll). Zones pulumi.StringArrayInput } func (CacheArgs) ElementType() reflect.Type { return reflect.TypeOf((*cacheArgs)(nil)).Elem() } type CacheInput interface { pulumi.Input ToCacheOutput() CacheOutput ToCacheOutputWithContext(ctx context.Context) CacheOutput } func (*Cache) ElementType() reflect.Type { return reflect.TypeOf((**Cache)(nil)).Elem() } func (i *Cache) ToCacheOutput() CacheOutput { return i.ToCacheOutputWithContext(context.Background()) } func (i *Cache) ToCacheOutputWithContext(ctx context.Context) CacheOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheOutput) } // CacheArrayInput is an input type that accepts CacheArray and CacheArrayOutput values. // You can construct a concrete instance of `CacheArrayInput` via: // // CacheArray{ CacheArgs{...} } type CacheArrayInput interface { pulumi.Input ToCacheArrayOutput() CacheArrayOutput ToCacheArrayOutputWithContext(context.Context) CacheArrayOutput } type CacheArray []CacheInput func (CacheArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Cache)(nil)).Elem() } func (i CacheArray) ToCacheArrayOutput() CacheArrayOutput { return i.ToCacheArrayOutputWithContext(context.Background()) } func (i CacheArray) ToCacheArrayOutputWithContext(ctx context.Context) CacheArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheArrayOutput) } // CacheMapInput is an input type that accepts CacheMap and CacheMapOutput values. // You can construct a concrete instance of `CacheMapInput` via: // // CacheMap{ "key": CacheArgs{...} } type CacheMapInput interface { pulumi.Input ToCacheMapOutput() CacheMapOutput ToCacheMapOutputWithContext(context.Context) CacheMapOutput } type CacheMap map[string]CacheInput func (CacheMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Cache)(nil)).Elem() } func (i CacheMap) ToCacheMapOutput() CacheMapOutput { return i.ToCacheMapOutputWithContext(context.Background()) } func (i CacheMap) ToCacheMapOutputWithContext(ctx context.Context) CacheMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheMapOutput) } type CacheOutput struct{ *pulumi.OutputState } func (CacheOutput) ElementType() reflect.Type { return reflect.TypeOf((**Cache)(nil)).Elem() } func (o CacheOutput) ToCacheOutput() CacheOutput { return o } func (o CacheOutput) ToCacheOutputWithContext(ctx context.Context) CacheOutput { return o } // Whether access key authentication is enabled? Defaults to `true`. `activeDirectoryAuthenticationEnabled` must be set to `true` to disable access key authentication. func (o CacheOutput) AccessKeysAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cache) pulumi.BoolPtrOutput { return v.AccessKeysAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`. func (o CacheOutput) Capacity() pulumi.IntOutput { return o.ApplyT(func(v *Cache) pulumi.IntOutput { return v.Capacity }).(pulumi.IntOutput) } // The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) func (o CacheOutput) Family() pulumi.StringOutput { return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.Family }).(pulumi.StringOutput) } // The Hostname of the Redis Instance func (o CacheOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o CacheOutput) Identity() CacheIdentityPtrOutput { return o.ApplyT(func(v *Cache) CacheIdentityPtrOutput { return v.Identity }).(CacheIdentityPtrOutput) } // The location of the resource group. Changing this forces a new resource to be created. func (o CacheOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Cache) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`. //
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/redis/getCache.go
sdk/go/azure/redis/getCache.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 redis 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 Redis Cache // // ## Example Usage // // ```go // package main // // import ( // // "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 := redis.LookupCache(ctx, &redis.LookupCacheArgs{ // Name: "myrediscache", // ResourceGroupName: "redis-cache", // }, nil) // if err != nil { // return err // } // ctx.Export("primaryAccessKey", example.PrimaryAccessKey) // ctx.Export("hostname", example.Hostname) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Cache` - 2024-11-01 func LookupCache(ctx *pulumi.Context, args *LookupCacheArgs, opts ...pulumi.InvokeOption) (*LookupCacheResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupCacheResult err := ctx.Invoke("azure:redis/getCache:getCache", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCache. type LookupCacheArgs struct { // The name of the Redis cache Name string `pulumi:"name"` // The name of the resource group the Redis cache instance is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getCache. type LookupCacheResult struct { // Specifies if access key authentication is enabled. AccessKeysAuthenticationEnabled bool `pulumi:"accessKeysAuthenticationEnabled"` // The size of the Redis Cache deployed. Capacity int `pulumi:"capacity"` // The SKU family/pricing group used. Possible values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) Family string `pulumi:"family"` // The Hostname of the Redis Instance Hostname string `pulumi:"hostname"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The location of the Redis Cache. Location string `pulumi:"location"` // The minimum TLS version. MinimumTlsVersion string `pulumi:"minimumTlsVersion"` Name string `pulumi:"name"` NonSslPortEnabled bool `pulumi:"nonSslPortEnabled"` // A list of `patchSchedule` blocks as defined below. PatchSchedules []GetCachePatchSchedule `pulumi:"patchSchedules"` // The non-SSL Port of the Redis Instance Port int `pulumi:"port"` // The Primary Access Key for the Redis Instance PrimaryAccessKey string `pulumi:"primaryAccessKey"` // The primary connection string of the Redis Instance. PrimaryConnectionString string `pulumi:"primaryConnectionString"` // The Static IP Address assigned to the Redis Cache when hosted inside the Virtual Network. PrivateStaticIpAddress string `pulumi:"privateStaticIpAddress"` // A `redisConfiguration` block as defined below. RedisConfigurations []GetCacheRedisConfiguration `pulumi:"redisConfigurations"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Secondary Access Key for the Redis Instance SecondaryAccessKey string `pulumi:"secondaryAccessKey"` // The secondary connection string of the Redis Instance. SecondaryConnectionString string `pulumi:"secondaryConnectionString"` ShardCount int `pulumi:"shardCount"` // The SKU of Redis used. Possible values are `Basic`, `Standard` and `Premium`. SkuName string `pulumi:"skuName"` // The SSL Port of the Redis Instance SslPort int `pulumi:"sslPort"` SubnetId string `pulumi:"subnetId"` Tags map[string]string `pulumi:"tags"` // A list of Availability Zones in which this Redis Cache is located. Zones []string `pulumi:"zones"` } func LookupCacheOutput(ctx *pulumi.Context, args LookupCacheOutputArgs, opts ...pulumi.InvokeOption) LookupCacheResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupCacheResultOutput, error) { args := v.(LookupCacheArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:redis/getCache:getCache", args, LookupCacheResultOutput{}, options).(LookupCacheResultOutput), nil }).(LookupCacheResultOutput) } // A collection of arguments for invoking getCache. type LookupCacheOutputArgs struct { // The name of the Redis cache Name pulumi.StringInput `pulumi:"name"` // The name of the resource group the Redis cache instance is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupCacheOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupCacheArgs)(nil)).Elem() } // A collection of values returned by getCache. type LookupCacheResultOutput struct{ *pulumi.OutputState } func (LookupCacheResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupCacheResult)(nil)).Elem() } func (o LookupCacheResultOutput) ToLookupCacheResultOutput() LookupCacheResultOutput { return o } func (o LookupCacheResultOutput) ToLookupCacheResultOutputWithContext(ctx context.Context) LookupCacheResultOutput { return o } // Specifies if access key authentication is enabled. func (o LookupCacheResultOutput) AccessKeysAuthenticationEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupCacheResult) bool { return v.AccessKeysAuthenticationEnabled }).(pulumi.BoolOutput) } // The size of the Redis Cache deployed. func (o LookupCacheResultOutput) Capacity() pulumi.IntOutput { return o.ApplyT(func(v LookupCacheResult) int { return v.Capacity }).(pulumi.IntOutput) } // The SKU family/pricing group used. Possible values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`) func (o LookupCacheResultOutput) Family() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.Family }).(pulumi.StringOutput) } // The Hostname of the Redis Instance func (o LookupCacheResultOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.Hostname }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupCacheResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.Id }).(pulumi.StringOutput) } // The location of the Redis Cache. func (o LookupCacheResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.Location }).(pulumi.StringOutput) } // The minimum TLS version. func (o LookupCacheResultOutput) MinimumTlsVersion() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.MinimumTlsVersion }).(pulumi.StringOutput) } func (o LookupCacheResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupCacheResultOutput) NonSslPortEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupCacheResult) bool { return v.NonSslPortEnabled }).(pulumi.BoolOutput) } // A list of `patchSchedule` blocks as defined below. func (o LookupCacheResultOutput) PatchSchedules() GetCachePatchScheduleArrayOutput { return o.ApplyT(func(v LookupCacheResult) []GetCachePatchSchedule { return v.PatchSchedules }).(GetCachePatchScheduleArrayOutput) } // The non-SSL Port of the Redis Instance func (o LookupCacheResultOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v LookupCacheResult) int { return v.Port }).(pulumi.IntOutput) } // The Primary Access Key for the Redis Instance func (o LookupCacheResultOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The primary connection string of the Redis Instance. func (o LookupCacheResultOutput) PrimaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput) } // The Static IP Address assigned to the Redis Cache when hosted inside the Virtual Network. func (o LookupCacheResultOutput) PrivateStaticIpAddress() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.PrivateStaticIpAddress }).(pulumi.StringOutput) } // A `redisConfiguration` block as defined below. func (o LookupCacheResultOutput) RedisConfigurations() GetCacheRedisConfigurationArrayOutput { return o.ApplyT(func(v LookupCacheResult) []GetCacheRedisConfiguration { return v.RedisConfigurations }).(GetCacheRedisConfigurationArrayOutput) } func (o LookupCacheResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Secondary Access Key for the Redis Instance func (o LookupCacheResultOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The secondary connection string of the Redis Instance. func (o LookupCacheResultOutput) SecondaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput) } func (o LookupCacheResultOutput) ShardCount() pulumi.IntOutput { return o.ApplyT(func(v LookupCacheResult) int { return v.ShardCount }).(pulumi.IntOutput) } // The SKU of Redis used. Possible values are `Basic`, `Standard` and `Premium`. func (o LookupCacheResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.SkuName }).(pulumi.StringOutput) } // The SSL Port of the Redis Instance func (o LookupCacheResultOutput) SslPort() pulumi.IntOutput { return o.ApplyT(func(v LookupCacheResult) int { return v.SslPort }).(pulumi.IntOutput) } func (o LookupCacheResultOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v LookupCacheResult) string { return v.SubnetId }).(pulumi.StringOutput) } func (o LookupCacheResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupCacheResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones in which this Redis Cache is located. func (o LookupCacheResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupCacheResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupCacheResultOutput{}) }
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/redis/cacheAccessPolicyAssignment.go
sdk/go/azure/redis/cacheAccessPolicyAssignment.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Cache Access Policy Assignment // // ## 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/redis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // test, 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("East US"), // }) // if err != nil { // return err // } // exampleCache, err := redis.NewCache(ctx, "example", &redis.CacheArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // Capacity: pulumi.Int(1), // Family: pulumi.String("P"), // SkuName: pulumi.String("Premium"), // EnableNonSslPort: false, // RedisConfiguration: &redis.CacheRedisConfigurationArgs{ // MaxmemoryReserved: pulumi.Int(2), // MaxmemoryDelta: pulumi.Int(2), // MaxmemoryPolicy: pulumi.String("allkeys-lru"), // }, // }) // if err != nil { // return err // } // _, err = redis.NewCacheAccessPolicyAssignment(ctx, "example", &redis.CacheAccessPolicyAssignmentArgs{ // Name: pulumi.String("example"), // RedisCacheId: exampleCache.ID(), // AccessPolicyName: pulumi.String("Data Contributor"), // ObjectId: pulumi.String(test.ObjectId), // ObjectIdAlias: pulumi.String("ServicePrincipal"), // }) // 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.Cache` - 2024-11-01 // // ## Import // // Redis Cache Policy Assignment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/cacheAccessPolicyAssignment:CacheAccessPolicyAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/accessPolicyAssignments/assignment1 // ``` type CacheAccessPolicyAssignment struct { pulumi.CustomResourceState // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. AccessPolicyName pulumi.StringOutput `pulumi:"accessPolicyName"` // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. Name pulumi.StringOutput `pulumi:"name"` // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectIdAlias pulumi.StringOutput `pulumi:"objectIdAlias"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. RedisCacheId pulumi.StringOutput `pulumi:"redisCacheId"` } // NewCacheAccessPolicyAssignment registers a new resource with the given unique name, arguments, and options. func NewCacheAccessPolicyAssignment(ctx *pulumi.Context, name string, args *CacheAccessPolicyAssignmentArgs, opts ...pulumi.ResourceOption) (*CacheAccessPolicyAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AccessPolicyName == nil { return nil, errors.New("invalid value for required argument 'AccessPolicyName'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.ObjectIdAlias == nil { return nil, errors.New("invalid value for required argument 'ObjectIdAlias'") } if args.RedisCacheId == nil { return nil, errors.New("invalid value for required argument 'RedisCacheId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CacheAccessPolicyAssignment err := ctx.RegisterResource("azure:redis/cacheAccessPolicyAssignment:CacheAccessPolicyAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCacheAccessPolicyAssignment gets an existing CacheAccessPolicyAssignment 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 GetCacheAccessPolicyAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CacheAccessPolicyAssignmentState, opts ...pulumi.ResourceOption) (*CacheAccessPolicyAssignment, error) { var resource CacheAccessPolicyAssignment err := ctx.ReadResource("azure:redis/cacheAccessPolicyAssignment:CacheAccessPolicyAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CacheAccessPolicyAssignment resources. type cacheAccessPolicyAssignmentState struct { // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. AccessPolicyName *string `pulumi:"accessPolicyName"` // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. Name *string `pulumi:"name"` // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectId *string `pulumi:"objectId"` // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectIdAlias *string `pulumi:"objectIdAlias"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. RedisCacheId *string `pulumi:"redisCacheId"` } type CacheAccessPolicyAssignmentState struct { // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. AccessPolicyName pulumi.StringPtrInput // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. Name pulumi.StringPtrInput // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectId pulumi.StringPtrInput // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectIdAlias pulumi.StringPtrInput // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. RedisCacheId pulumi.StringPtrInput } func (CacheAccessPolicyAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*cacheAccessPolicyAssignmentState)(nil)).Elem() } type cacheAccessPolicyAssignmentArgs struct { // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. AccessPolicyName string `pulumi:"accessPolicyName"` // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. Name *string `pulumi:"name"` // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectId string `pulumi:"objectId"` // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectIdAlias string `pulumi:"objectIdAlias"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. RedisCacheId string `pulumi:"redisCacheId"` } // The set of arguments for constructing a CacheAccessPolicyAssignment resource. type CacheAccessPolicyAssignmentArgs struct { // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. AccessPolicyName pulumi.StringInput // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. Name pulumi.StringPtrInput // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectId pulumi.StringInput // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. ObjectIdAlias pulumi.StringInput // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. RedisCacheId pulumi.StringInput } func (CacheAccessPolicyAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*cacheAccessPolicyAssignmentArgs)(nil)).Elem() } type CacheAccessPolicyAssignmentInput interface { pulumi.Input ToCacheAccessPolicyAssignmentOutput() CacheAccessPolicyAssignmentOutput ToCacheAccessPolicyAssignmentOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentOutput } func (*CacheAccessPolicyAssignment) ElementType() reflect.Type { return reflect.TypeOf((**CacheAccessPolicyAssignment)(nil)).Elem() } func (i *CacheAccessPolicyAssignment) ToCacheAccessPolicyAssignmentOutput() CacheAccessPolicyAssignmentOutput { return i.ToCacheAccessPolicyAssignmentOutputWithContext(context.Background()) } func (i *CacheAccessPolicyAssignment) ToCacheAccessPolicyAssignmentOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyAssignmentOutput) } // CacheAccessPolicyAssignmentArrayInput is an input type that accepts CacheAccessPolicyAssignmentArray and CacheAccessPolicyAssignmentArrayOutput values. // You can construct a concrete instance of `CacheAccessPolicyAssignmentArrayInput` via: // // CacheAccessPolicyAssignmentArray{ CacheAccessPolicyAssignmentArgs{...} } type CacheAccessPolicyAssignmentArrayInput interface { pulumi.Input ToCacheAccessPolicyAssignmentArrayOutput() CacheAccessPolicyAssignmentArrayOutput ToCacheAccessPolicyAssignmentArrayOutputWithContext(context.Context) CacheAccessPolicyAssignmentArrayOutput } type CacheAccessPolicyAssignmentArray []CacheAccessPolicyAssignmentInput func (CacheAccessPolicyAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CacheAccessPolicyAssignment)(nil)).Elem() } func (i CacheAccessPolicyAssignmentArray) ToCacheAccessPolicyAssignmentArrayOutput() CacheAccessPolicyAssignmentArrayOutput { return i.ToCacheAccessPolicyAssignmentArrayOutputWithContext(context.Background()) } func (i CacheAccessPolicyAssignmentArray) ToCacheAccessPolicyAssignmentArrayOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyAssignmentArrayOutput) } // CacheAccessPolicyAssignmentMapInput is an input type that accepts CacheAccessPolicyAssignmentMap and CacheAccessPolicyAssignmentMapOutput values. // You can construct a concrete instance of `CacheAccessPolicyAssignmentMapInput` via: // // CacheAccessPolicyAssignmentMap{ "key": CacheAccessPolicyAssignmentArgs{...} } type CacheAccessPolicyAssignmentMapInput interface { pulumi.Input ToCacheAccessPolicyAssignmentMapOutput() CacheAccessPolicyAssignmentMapOutput ToCacheAccessPolicyAssignmentMapOutputWithContext(context.Context) CacheAccessPolicyAssignmentMapOutput } type CacheAccessPolicyAssignmentMap map[string]CacheAccessPolicyAssignmentInput func (CacheAccessPolicyAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CacheAccessPolicyAssignment)(nil)).Elem() } func (i CacheAccessPolicyAssignmentMap) ToCacheAccessPolicyAssignmentMapOutput() CacheAccessPolicyAssignmentMapOutput { return i.ToCacheAccessPolicyAssignmentMapOutputWithContext(context.Background()) } func (i CacheAccessPolicyAssignmentMap) ToCacheAccessPolicyAssignmentMapOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyAssignmentMapOutput) } type CacheAccessPolicyAssignmentOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**CacheAccessPolicyAssignment)(nil)).Elem() } func (o CacheAccessPolicyAssignmentOutput) ToCacheAccessPolicyAssignmentOutput() CacheAccessPolicyAssignmentOutput { return o } func (o CacheAccessPolicyAssignmentOutput) ToCacheAccessPolicyAssignmentOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentOutput { return o } // The name of the Access Policy to be assigned. Changing this forces a new Redis Cache Access Policy Assignment to be created. func (o CacheAccessPolicyAssignmentOutput) AccessPolicyName() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicyAssignment) pulumi.StringOutput { return v.AccessPolicyName }).(pulumi.StringOutput) } // The name of the Redis Cache Access Policy Assignment. Changing this forces a new Redis Cache Access Policy Assignment to be created. func (o CacheAccessPolicyAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicyAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The principal ID to be assigned the Access Policy. Changing this forces a new Redis Cache Access Policy Assignment to be created. func (o CacheAccessPolicyAssignmentOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicyAssignment) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The alias of the principal ID. User-friendly name for object ID. Also represents username for token based authentication. Changing this forces a new Redis Cache Access Policy Assignment to be created. func (o CacheAccessPolicyAssignmentOutput) ObjectIdAlias() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicyAssignment) pulumi.StringOutput { return v.ObjectIdAlias }).(pulumi.StringOutput) } // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy Assignment to be created. func (o CacheAccessPolicyAssignmentOutput) RedisCacheId() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicyAssignment) pulumi.StringOutput { return v.RedisCacheId }).(pulumi.StringOutput) } type CacheAccessPolicyAssignmentArrayOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CacheAccessPolicyAssignment)(nil)).Elem() } func (o CacheAccessPolicyAssignmentArrayOutput) ToCacheAccessPolicyAssignmentArrayOutput() CacheAccessPolicyAssignmentArrayOutput { return o } func (o CacheAccessPolicyAssignmentArrayOutput) ToCacheAccessPolicyAssignmentArrayOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentArrayOutput { return o } func (o CacheAccessPolicyAssignmentArrayOutput) Index(i pulumi.IntInput) CacheAccessPolicyAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheAccessPolicyAssignment { return vs[0].([]*CacheAccessPolicyAssignment)[vs[1].(int)] }).(CacheAccessPolicyAssignmentOutput) } type CacheAccessPolicyAssignmentMapOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CacheAccessPolicyAssignment)(nil)).Elem() } func (o CacheAccessPolicyAssignmentMapOutput) ToCacheAccessPolicyAssignmentMapOutput() CacheAccessPolicyAssignmentMapOutput { return o } func (o CacheAccessPolicyAssignmentMapOutput) ToCacheAccessPolicyAssignmentMapOutputWithContext(ctx context.Context) CacheAccessPolicyAssignmentMapOutput { return o } func (o CacheAccessPolicyAssignmentMapOutput) MapIndex(k pulumi.StringInput) CacheAccessPolicyAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheAccessPolicyAssignment { return vs[0].(map[string]*CacheAccessPolicyAssignment)[vs[1].(string)] }).(CacheAccessPolicyAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyAssignmentInput)(nil)).Elem(), &CacheAccessPolicyAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyAssignmentArrayInput)(nil)).Elem(), CacheAccessPolicyAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyAssignmentMapInput)(nil)).Elem(), CacheAccessPolicyAssignmentMap{}) pulumi.RegisterOutputType(CacheAccessPolicyAssignmentOutput{}) pulumi.RegisterOutputType(CacheAccessPolicyAssignmentArrayOutput{}) pulumi.RegisterOutputType(CacheAccessPolicyAssignmentMapOutput{}) }
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/redis/getEnterpriseDatabase.go
sdk/go/azure/redis/getEnterpriseDatabase.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 redis 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 Redis Enterprise Database // // > **Note:** This data source has been deprecated in favor of azurerm_managed_redis. // // ## Example Usage // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Cache` - 2024-10-01 func LookupEnterpriseDatabase(ctx *pulumi.Context, args *LookupEnterpriseDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupEnterpriseDatabaseResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupEnterpriseDatabaseResult err := ctx.Invoke("azure:redis/getEnterpriseDatabase:getEnterpriseDatabase", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getEnterpriseDatabase. type LookupEnterpriseDatabaseArgs struct { // The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance. ClusterId string `pulumi:"clusterId"` // The name of the Redis Enterprise Database. Name string `pulumi:"name"` } // A collection of values returned by getEnterpriseDatabase. type LookupEnterpriseDatabaseResult struct { // The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database. ClusterId string `pulumi:"clusterId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Linked Database Group Nickname for the Redis Enterprise Database instance. LinkedDatabaseGroupNickname string `pulumi:"linkedDatabaseGroupNickname"` // The Linked Database list for the Redis Enterprise Database instance. LinkedDatabaseIds []string `pulumi:"linkedDatabaseIds"` // The Redis Enterprise Database name. Name string `pulumi:"name"` // The Primary Access Key for the Redis Enterprise Database instance. PrimaryAccessKey string `pulumi:"primaryAccessKey"` // The Secondary Access Key for the Redis Enterprise Database instance. SecondaryAccessKey string `pulumi:"secondaryAccessKey"` } func LookupEnterpriseDatabaseOutput(ctx *pulumi.Context, args LookupEnterpriseDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupEnterpriseDatabaseResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupEnterpriseDatabaseResultOutput, error) { args := v.(LookupEnterpriseDatabaseArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:redis/getEnterpriseDatabase:getEnterpriseDatabase", args, LookupEnterpriseDatabaseResultOutput{}, options).(LookupEnterpriseDatabaseResultOutput), nil }).(LookupEnterpriseDatabaseResultOutput) } // A collection of arguments for invoking getEnterpriseDatabase. type LookupEnterpriseDatabaseOutputArgs struct { // The resource ID of Redis Enterprise Cluster which hosts the Redis Enterprise Database instance. ClusterId pulumi.StringInput `pulumi:"clusterId"` // The name of the Redis Enterprise Database. Name pulumi.StringInput `pulumi:"name"` } func (LookupEnterpriseDatabaseOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupEnterpriseDatabaseArgs)(nil)).Elem() } // A collection of values returned by getEnterpriseDatabase. type LookupEnterpriseDatabaseResultOutput struct{ *pulumi.OutputState } func (LookupEnterpriseDatabaseResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupEnterpriseDatabaseResult)(nil)).Elem() } func (o LookupEnterpriseDatabaseResultOutput) ToLookupEnterpriseDatabaseResultOutput() LookupEnterpriseDatabaseResultOutput { return o } func (o LookupEnterpriseDatabaseResultOutput) ToLookupEnterpriseDatabaseResultOutputWithContext(ctx context.Context) LookupEnterpriseDatabaseResultOutput { return o } // The Redis Enterprise Cluster ID that is hosting the Redis Enterprise Database. func (o LookupEnterpriseDatabaseResultOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.ClusterId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupEnterpriseDatabaseResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.Id }).(pulumi.StringOutput) } // The Linked Database Group Nickname for the Redis Enterprise Database instance. func (o LookupEnterpriseDatabaseResultOutput) LinkedDatabaseGroupNickname() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.LinkedDatabaseGroupNickname }).(pulumi.StringOutput) } // The Linked Database list for the Redis Enterprise Database instance. func (o LookupEnterpriseDatabaseResultOutput) LinkedDatabaseIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) []string { return v.LinkedDatabaseIds }).(pulumi.StringArrayOutput) } // The Redis Enterprise Database name. func (o LookupEnterpriseDatabaseResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.Name }).(pulumi.StringOutput) } // The Primary Access Key for the Redis Enterprise Database instance. func (o LookupEnterpriseDatabaseResultOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The Secondary Access Key for the Redis Enterprise Database instance. func (o LookupEnterpriseDatabaseResultOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupEnterpriseDatabaseResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupEnterpriseDatabaseResultOutput{}) }
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/redis/cacheAccessPolicy.go
sdk/go/azure/redis/cacheAccessPolicy.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Cache Access Policy // // ## 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/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("East US"), // }) // if err != nil { // return err // } // exampleCache, err := redis.NewCache(ctx, "example", &redis.CacheArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // Capacity: pulumi.Int(1), // Family: pulumi.String("P"), // SkuName: pulumi.String("Premium"), // EnableNonSslPort: false, // RedisConfiguration: &redis.CacheRedisConfigurationArgs{ // MaxmemoryReserved: pulumi.Int(2), // MaxmemoryDelta: pulumi.Int(2), // MaxmemoryPolicy: pulumi.String("allkeys-lru"), // }, // }) // if err != nil { // return err // } // _, err = redis.NewCacheAccessPolicy(ctx, "example", &redis.CacheAccessPolicyArgs{ // Name: pulumi.String("example"), // RedisCacheId: exampleCache.ID(), // Permissions: pulumi.String("+@read +@connection +cluster|info"), // }) // 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.Cache` - 2024-11-01 // // ## Import // // Redis Cache Access Policy can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/cacheAccessPolicy:CacheAccessPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/accessPolicies/policy1 // ``` type CacheAccessPolicy struct { pulumi.CustomResourceState // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. Name pulumi.StringOutput `pulumi:"name"` // Permissions that are going to be assigned to this Redis Cache Access Policy. Permissions pulumi.StringOutput `pulumi:"permissions"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. RedisCacheId pulumi.StringOutput `pulumi:"redisCacheId"` } // NewCacheAccessPolicy registers a new resource with the given unique name, arguments, and options. func NewCacheAccessPolicy(ctx *pulumi.Context, name string, args *CacheAccessPolicyArgs, opts ...pulumi.ResourceOption) (*CacheAccessPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Permissions == nil { return nil, errors.New("invalid value for required argument 'Permissions'") } if args.RedisCacheId == nil { return nil, errors.New("invalid value for required argument 'RedisCacheId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CacheAccessPolicy err := ctx.RegisterResource("azure:redis/cacheAccessPolicy:CacheAccessPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCacheAccessPolicy gets an existing CacheAccessPolicy 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 GetCacheAccessPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CacheAccessPolicyState, opts ...pulumi.ResourceOption) (*CacheAccessPolicy, error) { var resource CacheAccessPolicy err := ctx.ReadResource("azure:redis/cacheAccessPolicy:CacheAccessPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CacheAccessPolicy resources. type cacheAccessPolicyState struct { // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. Name *string `pulumi:"name"` // Permissions that are going to be assigned to this Redis Cache Access Policy. Permissions *string `pulumi:"permissions"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. RedisCacheId *string `pulumi:"redisCacheId"` } type CacheAccessPolicyState struct { // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. Name pulumi.StringPtrInput // Permissions that are going to be assigned to this Redis Cache Access Policy. Permissions pulumi.StringPtrInput // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. RedisCacheId pulumi.StringPtrInput } func (CacheAccessPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*cacheAccessPolicyState)(nil)).Elem() } type cacheAccessPolicyArgs struct { // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. Name *string `pulumi:"name"` // Permissions that are going to be assigned to this Redis Cache Access Policy. Permissions string `pulumi:"permissions"` // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. RedisCacheId string `pulumi:"redisCacheId"` } // The set of arguments for constructing a CacheAccessPolicy resource. type CacheAccessPolicyArgs struct { // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. Name pulumi.StringPtrInput // Permissions that are going to be assigned to this Redis Cache Access Policy. Permissions pulumi.StringInput // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. RedisCacheId pulumi.StringInput } func (CacheAccessPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*cacheAccessPolicyArgs)(nil)).Elem() } type CacheAccessPolicyInput interface { pulumi.Input ToCacheAccessPolicyOutput() CacheAccessPolicyOutput ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput } func (*CacheAccessPolicy) ElementType() reflect.Type { return reflect.TypeOf((**CacheAccessPolicy)(nil)).Elem() } func (i *CacheAccessPolicy) ToCacheAccessPolicyOutput() CacheAccessPolicyOutput { return i.ToCacheAccessPolicyOutputWithContext(context.Background()) } func (i *CacheAccessPolicy) ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyOutput) } // CacheAccessPolicyArrayInput is an input type that accepts CacheAccessPolicyArray and CacheAccessPolicyArrayOutput values. // You can construct a concrete instance of `CacheAccessPolicyArrayInput` via: // // CacheAccessPolicyArray{ CacheAccessPolicyArgs{...} } type CacheAccessPolicyArrayInput interface { pulumi.Input ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput ToCacheAccessPolicyArrayOutputWithContext(context.Context) CacheAccessPolicyArrayOutput } type CacheAccessPolicyArray []CacheAccessPolicyInput func (CacheAccessPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CacheAccessPolicy)(nil)).Elem() } func (i CacheAccessPolicyArray) ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput { return i.ToCacheAccessPolicyArrayOutputWithContext(context.Background()) } func (i CacheAccessPolicyArray) ToCacheAccessPolicyArrayOutputWithContext(ctx context.Context) CacheAccessPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyArrayOutput) } // CacheAccessPolicyMapInput is an input type that accepts CacheAccessPolicyMap and CacheAccessPolicyMapOutput values. // You can construct a concrete instance of `CacheAccessPolicyMapInput` via: // // CacheAccessPolicyMap{ "key": CacheAccessPolicyArgs{...} } type CacheAccessPolicyMapInput interface { pulumi.Input ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput ToCacheAccessPolicyMapOutputWithContext(context.Context) CacheAccessPolicyMapOutput } type CacheAccessPolicyMap map[string]CacheAccessPolicyInput func (CacheAccessPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CacheAccessPolicy)(nil)).Elem() } func (i CacheAccessPolicyMap) ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput { return i.ToCacheAccessPolicyMapOutputWithContext(context.Background()) } func (i CacheAccessPolicyMap) ToCacheAccessPolicyMapOutputWithContext(ctx context.Context) CacheAccessPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CacheAccessPolicyMapOutput) } type CacheAccessPolicyOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**CacheAccessPolicy)(nil)).Elem() } func (o CacheAccessPolicyOutput) ToCacheAccessPolicyOutput() CacheAccessPolicyOutput { return o } func (o CacheAccessPolicyOutput) ToCacheAccessPolicyOutputWithContext(ctx context.Context) CacheAccessPolicyOutput { return o } // The name of the Redis Cache Access Policy. Changing this forces a new Redis Cache Access Policy to be created. func (o CacheAccessPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Permissions that are going to be assigned to this Redis Cache Access Policy. func (o CacheAccessPolicyOutput) Permissions() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicy) pulumi.StringOutput { return v.Permissions }).(pulumi.StringOutput) } // The ID of the Redis Cache. Changing this forces a new Redis Cache Access Policy to be created. func (o CacheAccessPolicyOutput) RedisCacheId() pulumi.StringOutput { return o.ApplyT(func(v *CacheAccessPolicy) pulumi.StringOutput { return v.RedisCacheId }).(pulumi.StringOutput) } type CacheAccessPolicyArrayOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CacheAccessPolicy)(nil)).Elem() } func (o CacheAccessPolicyArrayOutput) ToCacheAccessPolicyArrayOutput() CacheAccessPolicyArrayOutput { return o } func (o CacheAccessPolicyArrayOutput) ToCacheAccessPolicyArrayOutputWithContext(ctx context.Context) CacheAccessPolicyArrayOutput { return o } func (o CacheAccessPolicyArrayOutput) Index(i pulumi.IntInput) CacheAccessPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CacheAccessPolicy { return vs[0].([]*CacheAccessPolicy)[vs[1].(int)] }).(CacheAccessPolicyOutput) } type CacheAccessPolicyMapOutput struct{ *pulumi.OutputState } func (CacheAccessPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CacheAccessPolicy)(nil)).Elem() } func (o CacheAccessPolicyMapOutput) ToCacheAccessPolicyMapOutput() CacheAccessPolicyMapOutput { return o } func (o CacheAccessPolicyMapOutput) ToCacheAccessPolicyMapOutputWithContext(ctx context.Context) CacheAccessPolicyMapOutput { return o } func (o CacheAccessPolicyMapOutput) MapIndex(k pulumi.StringInput) CacheAccessPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CacheAccessPolicy { return vs[0].(map[string]*CacheAccessPolicy)[vs[1].(string)] }).(CacheAccessPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyInput)(nil)).Elem(), &CacheAccessPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyArrayInput)(nil)).Elem(), CacheAccessPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CacheAccessPolicyMapInput)(nil)).Elem(), CacheAccessPolicyMap{}) pulumi.RegisterOutputType(CacheAccessPolicyOutput{}) pulumi.RegisterOutputType(CacheAccessPolicyArrayOutput{}) pulumi.RegisterOutputType(CacheAccessPolicyMapOutput{}) }
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/redis/enterpriseCluster.go
sdk/go/azure/redis/enterpriseCluster.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Enterprise Cluster. // // > **Note:** This resource has been deprecated in favor of azurerm_managed_redis. // // ## 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/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-redisenterprise"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = redis.NewEnterpriseCluster(ctx, "example", &redis.EnterpriseClusterArgs{ // Name: pulumi.String("example-redisenterprise"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("EnterpriseFlash_F300-3"), // }) // 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.Cache` - 2024-10-01 // // ## Import // // Redis Enterprise Clusters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/enterpriseCluster:EnterpriseCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1 // ``` type EnterpriseCluster struct { pulumi.CustomResourceState // DNS name of the cluster endpoint. Hostname pulumi.StringOutput `pulumi:"hostname"` // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. Location pulumi.StringOutput `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"` // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the Redis Enterprise Cluster. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewEnterpriseCluster registers a new resource with the given unique name, arguments, and options. func NewEnterpriseCluster(ctx *pulumi.Context, name string, args *EnterpriseClusterArgs, opts ...pulumi.ResourceOption) (*EnterpriseCluster, 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 EnterpriseCluster err := ctx.RegisterResource("azure:redis/enterpriseCluster:EnterpriseCluster", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEnterpriseCluster gets an existing EnterpriseCluster 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 GetEnterpriseCluster(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EnterpriseClusterState, opts ...pulumi.ResourceOption) (*EnterpriseCluster, error) { var resource EnterpriseCluster err := ctx.ReadResource("azure:redis/enterpriseCluster:EnterpriseCluster", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EnterpriseCluster resources. type enterpriseClusterState struct { // DNS name of the cluster endpoint. Hostname *string `pulumi:"hostname"` // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. Location *string `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion *string `pulumi:"minimumTlsVersion"` // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Redis Enterprise Cluster. Tags map[string]string `pulumi:"tags"` // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. Zones []string `pulumi:"zones"` } type EnterpriseClusterState struct { // DNS name of the cluster endpoint. Hostname pulumi.StringPtrInput // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. Location pulumi.StringPtrInput // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrInput // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. ResourceGroupName pulumi.StringPtrInput // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Redis Enterprise Cluster. Tags pulumi.StringMapInput // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. Zones pulumi.StringArrayInput } func (EnterpriseClusterState) ElementType() reflect.Type { return reflect.TypeOf((*enterpriseClusterState)(nil)).Elem() } type enterpriseClusterArgs struct { // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. Location *string `pulumi:"location"` // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion *string `pulumi:"minimumTlsVersion"` // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Redis Enterprise Cluster. Tags map[string]string `pulumi:"tags"` // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a EnterpriseCluster resource. type EnterpriseClusterArgs struct { // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. Location pulumi.StringPtrInput // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. MinimumTlsVersion pulumi.StringPtrInput // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. ResourceGroupName pulumi.StringInput // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. SkuName pulumi.StringInput // A mapping of tags which should be assigned to the Redis Enterprise Cluster. Tags pulumi.StringMapInput // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. Zones pulumi.StringArrayInput } func (EnterpriseClusterArgs) ElementType() reflect.Type { return reflect.TypeOf((*enterpriseClusterArgs)(nil)).Elem() } type EnterpriseClusterInput interface { pulumi.Input ToEnterpriseClusterOutput() EnterpriseClusterOutput ToEnterpriseClusterOutputWithContext(ctx context.Context) EnterpriseClusterOutput } func (*EnterpriseCluster) ElementType() reflect.Type { return reflect.TypeOf((**EnterpriseCluster)(nil)).Elem() } func (i *EnterpriseCluster) ToEnterpriseClusterOutput() EnterpriseClusterOutput { return i.ToEnterpriseClusterOutputWithContext(context.Background()) } func (i *EnterpriseCluster) ToEnterpriseClusterOutputWithContext(ctx context.Context) EnterpriseClusterOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseClusterOutput) } // EnterpriseClusterArrayInput is an input type that accepts EnterpriseClusterArray and EnterpriseClusterArrayOutput values. // You can construct a concrete instance of `EnterpriseClusterArrayInput` via: // // EnterpriseClusterArray{ EnterpriseClusterArgs{...} } type EnterpriseClusterArrayInput interface { pulumi.Input ToEnterpriseClusterArrayOutput() EnterpriseClusterArrayOutput ToEnterpriseClusterArrayOutputWithContext(context.Context) EnterpriseClusterArrayOutput } type EnterpriseClusterArray []EnterpriseClusterInput func (EnterpriseClusterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EnterpriseCluster)(nil)).Elem() } func (i EnterpriseClusterArray) ToEnterpriseClusterArrayOutput() EnterpriseClusterArrayOutput { return i.ToEnterpriseClusterArrayOutputWithContext(context.Background()) } func (i EnterpriseClusterArray) ToEnterpriseClusterArrayOutputWithContext(ctx context.Context) EnterpriseClusterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseClusterArrayOutput) } // EnterpriseClusterMapInput is an input type that accepts EnterpriseClusterMap and EnterpriseClusterMapOutput values. // You can construct a concrete instance of `EnterpriseClusterMapInput` via: // // EnterpriseClusterMap{ "key": EnterpriseClusterArgs{...} } type EnterpriseClusterMapInput interface { pulumi.Input ToEnterpriseClusterMapOutput() EnterpriseClusterMapOutput ToEnterpriseClusterMapOutputWithContext(context.Context) EnterpriseClusterMapOutput } type EnterpriseClusterMap map[string]EnterpriseClusterInput func (EnterpriseClusterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EnterpriseCluster)(nil)).Elem() } func (i EnterpriseClusterMap) ToEnterpriseClusterMapOutput() EnterpriseClusterMapOutput { return i.ToEnterpriseClusterMapOutputWithContext(context.Background()) } func (i EnterpriseClusterMap) ToEnterpriseClusterMapOutputWithContext(ctx context.Context) EnterpriseClusterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseClusterMapOutput) } type EnterpriseClusterOutput struct{ *pulumi.OutputState } func (EnterpriseClusterOutput) ElementType() reflect.Type { return reflect.TypeOf((**EnterpriseCluster)(nil)).Elem() } func (o EnterpriseClusterOutput) ToEnterpriseClusterOutput() EnterpriseClusterOutput { return o } func (o EnterpriseClusterOutput) ToEnterpriseClusterOutputWithContext(ctx context.Context) EnterpriseClusterOutput { return o } // DNS name of the cluster endpoint. func (o EnterpriseClusterOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. func (o EnterpriseClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.2`. Changing this forces a new Redis Enterprise Cluster to be created. // // > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more. func (o EnterpriseClusterOutput) MinimumTlsVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringPtrOutput { return v.MinimumTlsVersion }).(pulumi.StringPtrOutput) } // The name which should be used for this Redis Enterprise Cluster. Changing this forces a new Redis Enterprise Cluster to be created. func (o EnterpriseClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. func (o EnterpriseClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The `skuName` is comprised of two segments separated by a hyphen (e.g. `Enterprise_E10-2`). The first segment of the `skuName` defines the `name` of the SKU, possible values are `Enterprise_E5`, `Enterprise_E10`, `Enterprise_E20`, `Enterprise_E50`, `Enterprise_E100`, `Enterprise_E200`, `Enterprise_E400`, `EnterpriseFlash_F300`, `EnterpriseFlash_F700` or `EnterpriseFlash_F1500`. The second segment defines the `capacity` of the `skuName`, possible values for `Enteprise` SKUs are (`2`, `4`, `6`, ...). Possible values for `EnterpriseFlash` SKUs are (`3`, `9`, `15`, ...). Changing this forces a new Redis Enterprise Cluster to be created. func (o EnterpriseClusterOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Redis Enterprise Cluster. func (o EnterpriseClusterOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. func (o EnterpriseClusterOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *EnterpriseCluster) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type EnterpriseClusterArrayOutput struct{ *pulumi.OutputState } func (EnterpriseClusterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EnterpriseCluster)(nil)).Elem() } func (o EnterpriseClusterArrayOutput) ToEnterpriseClusterArrayOutput() EnterpriseClusterArrayOutput { return o } func (o EnterpriseClusterArrayOutput) ToEnterpriseClusterArrayOutputWithContext(ctx context.Context) EnterpriseClusterArrayOutput { return o } func (o EnterpriseClusterArrayOutput) Index(i pulumi.IntInput) EnterpriseClusterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EnterpriseCluster { return vs[0].([]*EnterpriseCluster)[vs[1].(int)] }).(EnterpriseClusterOutput) } type EnterpriseClusterMapOutput struct{ *pulumi.OutputState } func (EnterpriseClusterMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EnterpriseCluster)(nil)).Elem() } func (o EnterpriseClusterMapOutput) ToEnterpriseClusterMapOutput() EnterpriseClusterMapOutput { return o } func (o EnterpriseClusterMapOutput) ToEnterpriseClusterMapOutputWithContext(ctx context.Context) EnterpriseClusterMapOutput { return o } func (o EnterpriseClusterMapOutput) MapIndex(k pulumi.StringInput) EnterpriseClusterOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EnterpriseCluster { return vs[0].(map[string]*EnterpriseCluster)[vs[1].(string)] }).(EnterpriseClusterOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseClusterInput)(nil)).Elem(), &EnterpriseCluster{}) pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseClusterArrayInput)(nil)).Elem(), EnterpriseClusterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseClusterMapInput)(nil)).Elem(), EnterpriseClusterMap{}) pulumi.RegisterOutputType(EnterpriseClusterOutput{}) pulumi.RegisterOutputType(EnterpriseClusterArrayOutput{}) pulumi.RegisterOutputType(EnterpriseClusterMapOutput{}) }
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/redis/linkedServer.go
sdk/go/azure/redis/linkedServer.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Linked Server (ie Geo Location) // // ## 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/redis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example_primary, err := core.NewResourceGroup(ctx, "example-primary", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources-primary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // example_primaryCache, err := redis.NewCache(ctx, "example-primary", &redis.CacheArgs{ // Name: pulumi.String("example-cache1"), // Location: example_primary.Location, // ResourceGroupName: example_primary.Name, // Capacity: pulumi.Int(1), // Family: pulumi.String("P"), // SkuName: pulumi.String("Premium"), // EnableNonSslPort: false, // RedisConfiguration: &redis.CacheRedisConfigurationArgs{ // MaxmemoryReserved: pulumi.Int(2), // MaxmemoryDelta: pulumi.Int(2), // MaxmemoryPolicy: pulumi.String("allkeys-lru"), // }, // }) // if err != nil { // return err // } // example_secondary, err := core.NewResourceGroup(ctx, "example-secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources-secondary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // example_secondaryCache, err := redis.NewCache(ctx, "example-secondary", &redis.CacheArgs{ // Name: pulumi.String("example-cache2"), // Location: example_secondary.Location, // ResourceGroupName: example_secondary.Name, // Capacity: pulumi.Int(1), // Family: pulumi.String("P"), // SkuName: pulumi.String("Premium"), // EnableNonSslPort: false, // RedisConfiguration: &redis.CacheRedisConfigurationArgs{ // MaxmemoryReserved: pulumi.Int(2), // MaxmemoryDelta: pulumi.Int(2), // MaxmemoryPolicy: pulumi.String("allkeys-lru"), // }, // }) // if err != nil { // return err // } // _, err = redis.NewLinkedServer(ctx, "example-link", &redis.LinkedServerArgs{ // TargetRedisCacheName: example_primaryCache.Name, // ResourceGroupName: example_primaryCache.ResourceGroupName, // LinkedRedisCacheId: example_secondaryCache.ID(), // LinkedRedisCacheLocation: example_secondaryCache.Location, // ServerRole: pulumi.String("Secondary"), // }) // 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.Cache` - 2024-11-01 // // ## Import // // Redis can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/linkedServer:LinkedServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/linkedServers/cache2 // ``` type LinkedServer struct { pulumi.CustomResourceState // The geo-replicated primary hostname for this linked server. GeoReplicatedPrimaryHostName pulumi.StringOutput `pulumi:"geoReplicatedPrimaryHostName"` // The ID of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheId pulumi.StringOutput `pulumi:"linkedRedisCacheId"` // The location of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheLocation pulumi.StringOutput `pulumi:"linkedRedisCacheLocation"` // The name of the linked server. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. ServerRole pulumi.StringOutput `pulumi:"serverRole"` // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) TargetRedisCacheName pulumi.StringOutput `pulumi:"targetRedisCacheName"` } // NewLinkedServer registers a new resource with the given unique name, arguments, and options. func NewLinkedServer(ctx *pulumi.Context, name string, args *LinkedServerArgs, opts ...pulumi.ResourceOption) (*LinkedServer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LinkedRedisCacheId == nil { return nil, errors.New("invalid value for required argument 'LinkedRedisCacheId'") } if args.LinkedRedisCacheLocation == nil { return nil, errors.New("invalid value for required argument 'LinkedRedisCacheLocation'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerRole == nil { return nil, errors.New("invalid value for required argument 'ServerRole'") } if args.TargetRedisCacheName == nil { return nil, errors.New("invalid value for required argument 'TargetRedisCacheName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LinkedServer err := ctx.RegisterResource("azure:redis/linkedServer:LinkedServer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLinkedServer gets an existing LinkedServer 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 GetLinkedServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LinkedServerState, opts ...pulumi.ResourceOption) (*LinkedServer, error) { var resource LinkedServer err := ctx.ReadResource("azure:redis/linkedServer:LinkedServer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LinkedServer resources. type linkedServerState struct { // The geo-replicated primary hostname for this linked server. GeoReplicatedPrimaryHostName *string `pulumi:"geoReplicatedPrimaryHostName"` // The ID of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheId *string `pulumi:"linkedRedisCacheId"` // The location of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheLocation *string `pulumi:"linkedRedisCacheLocation"` // The name of the linked server. Name *string `pulumi:"name"` // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. ServerRole *string `pulumi:"serverRole"` // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) TargetRedisCacheName *string `pulumi:"targetRedisCacheName"` } type LinkedServerState struct { // The geo-replicated primary hostname for this linked server. GeoReplicatedPrimaryHostName pulumi.StringPtrInput // The ID of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheId pulumi.StringPtrInput // The location of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheLocation pulumi.StringPtrInput // The name of the linked server. Name pulumi.StringPtrInput // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. ResourceGroupName pulumi.StringPtrInput // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. ServerRole pulumi.StringPtrInput // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) TargetRedisCacheName pulumi.StringPtrInput } func (LinkedServerState) ElementType() reflect.Type { return reflect.TypeOf((*linkedServerState)(nil)).Elem() } type linkedServerArgs struct { // The ID of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheId string `pulumi:"linkedRedisCacheId"` // The location of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheLocation string `pulumi:"linkedRedisCacheLocation"` // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. ServerRole string `pulumi:"serverRole"` // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) TargetRedisCacheName string `pulumi:"targetRedisCacheName"` } // The set of arguments for constructing a LinkedServer resource. type LinkedServerArgs struct { // The ID of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheId pulumi.StringInput // The location of the linked Redis cache. Changing this forces a new Redis to be created. LinkedRedisCacheLocation pulumi.StringInput // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. ResourceGroupName pulumi.StringInput // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. ServerRole pulumi.StringInput // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) TargetRedisCacheName pulumi.StringInput } func (LinkedServerArgs) ElementType() reflect.Type { return reflect.TypeOf((*linkedServerArgs)(nil)).Elem() } type LinkedServerInput interface { pulumi.Input ToLinkedServerOutput() LinkedServerOutput ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput } func (*LinkedServer) ElementType() reflect.Type { return reflect.TypeOf((**LinkedServer)(nil)).Elem() } func (i *LinkedServer) ToLinkedServerOutput() LinkedServerOutput { return i.ToLinkedServerOutputWithContext(context.Background()) } func (i *LinkedServer) ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServerOutput) } // LinkedServerArrayInput is an input type that accepts LinkedServerArray and LinkedServerArrayOutput values. // You can construct a concrete instance of `LinkedServerArrayInput` via: // // LinkedServerArray{ LinkedServerArgs{...} } type LinkedServerArrayInput interface { pulumi.Input ToLinkedServerArrayOutput() LinkedServerArrayOutput ToLinkedServerArrayOutputWithContext(context.Context) LinkedServerArrayOutput } type LinkedServerArray []LinkedServerInput func (LinkedServerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LinkedServer)(nil)).Elem() } func (i LinkedServerArray) ToLinkedServerArrayOutput() LinkedServerArrayOutput { return i.ToLinkedServerArrayOutputWithContext(context.Background()) } func (i LinkedServerArray) ToLinkedServerArrayOutputWithContext(ctx context.Context) LinkedServerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServerArrayOutput) } // LinkedServerMapInput is an input type that accepts LinkedServerMap and LinkedServerMapOutput values. // You can construct a concrete instance of `LinkedServerMapInput` via: // // LinkedServerMap{ "key": LinkedServerArgs{...} } type LinkedServerMapInput interface { pulumi.Input ToLinkedServerMapOutput() LinkedServerMapOutput ToLinkedServerMapOutputWithContext(context.Context) LinkedServerMapOutput } type LinkedServerMap map[string]LinkedServerInput func (LinkedServerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LinkedServer)(nil)).Elem() } func (i LinkedServerMap) ToLinkedServerMapOutput() LinkedServerMapOutput { return i.ToLinkedServerMapOutputWithContext(context.Background()) } func (i LinkedServerMap) ToLinkedServerMapOutputWithContext(ctx context.Context) LinkedServerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LinkedServerMapOutput) } type LinkedServerOutput struct{ *pulumi.OutputState } func (LinkedServerOutput) ElementType() reflect.Type { return reflect.TypeOf((**LinkedServer)(nil)).Elem() } func (o LinkedServerOutput) ToLinkedServerOutput() LinkedServerOutput { return o } func (o LinkedServerOutput) ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput { return o } // The geo-replicated primary hostname for this linked server. func (o LinkedServerOutput) GeoReplicatedPrimaryHostName() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.GeoReplicatedPrimaryHostName }).(pulumi.StringOutput) } // The ID of the linked Redis cache. Changing this forces a new Redis to be created. func (o LinkedServerOutput) LinkedRedisCacheId() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.LinkedRedisCacheId }).(pulumi.StringOutput) } // The location of the linked Redis cache. Changing this forces a new Redis to be created. func (o LinkedServerOutput) LinkedRedisCacheLocation() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.LinkedRedisCacheLocation }).(pulumi.StringOutput) } // The name of the linked server. func (o LinkedServerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. func (o LinkedServerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are `Primary` and `Secondary`. func (o LinkedServerOutput) ServerRole() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.ServerRole }).(pulumi.StringOutput) } // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) func (o LinkedServerOutput) TargetRedisCacheName() pulumi.StringOutput { return o.ApplyT(func(v *LinkedServer) pulumi.StringOutput { return v.TargetRedisCacheName }).(pulumi.StringOutput) } type LinkedServerArrayOutput struct{ *pulumi.OutputState } func (LinkedServerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LinkedServer)(nil)).Elem() } func (o LinkedServerArrayOutput) ToLinkedServerArrayOutput() LinkedServerArrayOutput { return o } func (o LinkedServerArrayOutput) ToLinkedServerArrayOutputWithContext(ctx context.Context) LinkedServerArrayOutput { return o } func (o LinkedServerArrayOutput) Index(i pulumi.IntInput) LinkedServerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LinkedServer { return vs[0].([]*LinkedServer)[vs[1].(int)] }).(LinkedServerOutput) } type LinkedServerMapOutput struct{ *pulumi.OutputState } func (LinkedServerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LinkedServer)(nil)).Elem() } func (o LinkedServerMapOutput) ToLinkedServerMapOutput() LinkedServerMapOutput { return o } func (o LinkedServerMapOutput) ToLinkedServerMapOutputWithContext(ctx context.Context) LinkedServerMapOutput { return o } func (o LinkedServerMapOutput) MapIndex(k pulumi.StringInput) LinkedServerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LinkedServer { return vs[0].(map[string]*LinkedServer)[vs[1].(string)] }).(LinkedServerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LinkedServerInput)(nil)).Elem(), &LinkedServer{}) pulumi.RegisterInputType(reflect.TypeOf((*LinkedServerArrayInput)(nil)).Elem(), LinkedServerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LinkedServerMapInput)(nil)).Elem(), LinkedServerMap{}) pulumi.RegisterOutputType(LinkedServerOutput{}) pulumi.RegisterOutputType(LinkedServerArrayOutput{}) pulumi.RegisterOutputType(LinkedServerMapOutput{}) }
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/redis/enterpriseDatabase.go
sdk/go/azure/redis/enterpriseDatabase.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Redis Enterprise Database. // // > **Note:** This resource has been deprecated in favor of azurerm_managed_redis. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "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-redisenterprise"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleEnterpriseCluster, err := redis.NewEnterpriseCluster(ctx, "example", &redis.EnterpriseClusterArgs{ // Name: pulumi.String("example-redisenterprise"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("Enterprise_E20-4"), // }) // if err != nil { // return err // } // example1, err := redis.NewEnterpriseCluster(ctx, "example1", &redis.EnterpriseClusterArgs{ // Name: pulumi.String("example-redisenterprise1"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("Enterprise_E20-4"), // }) // if err != nil { // return err // } // _, err = redis.NewEnterpriseDatabase(ctx, "example", &redis.EnterpriseDatabaseArgs{ // Name: pulumi.String("default"), // ClusterId: exampleEnterpriseCluster.ID(), // ClientProtocol: pulumi.String("Encrypted"), // ClusteringPolicy: pulumi.String("EnterpriseCluster"), // EvictionPolicy: pulumi.String("NoEviction"), // Port: pulumi.Int(10000), // LinkedDatabaseIds: pulumi.StringArray{ // exampleEnterpriseCluster.ID().ApplyT(func(id string) (string, error) { // return fmt.Sprintf("%v/databases/default", id), nil // }).(pulumi.StringOutput), // example1.ID().ApplyT(func(id string) (string, error) { // return fmt.Sprintf("%v/databases/default", id), nil // }).(pulumi.StringOutput), // }, // LinkedDatabaseGroupNickname: pulumi.String("tftestGeoGroup"), // }) // 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.Cache` - 2024-10-01 // // ## Import // // Redis Enterprise Databases can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/enterpriseDatabase:EnterpriseDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1/databases/database1 // ``` type EnterpriseDatabase struct { pulumi.CustomResourceState // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. ClientProtocol pulumi.StringPtrOutput `pulumi:"clientProtocol"` // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. ClusterId pulumi.StringOutput `pulumi:"clusterId"` // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. ClusteringPolicy pulumi.StringPtrOutput `pulumi:"clusteringPolicy"` // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. EvictionPolicy pulumi.StringPtrOutput `pulumi:"evictionPolicy"` // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. LinkedDatabaseGroupNickname pulumi.StringPtrOutput `pulumi:"linkedDatabaseGroupNickname"` // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. LinkedDatabaseIds pulumi.StringArrayOutput `pulumi:"linkedDatabaseIds"` // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication Modules EnterpriseDatabaseModuleArrayOutput `pulumi:"modules"` // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. Name pulumi.StringOutput `pulumi:"name"` // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. Port pulumi.IntPtrOutput `pulumi:"port"` // The Primary Access Key for the Redis Enterprise Database Instance. PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The Secondary Access Key for the Redis Enterprise Database Instance. SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` } // NewEnterpriseDatabase registers a new resource with the given unique name, arguments, and options. func NewEnterpriseDatabase(ctx *pulumi.Context, name string, args *EnterpriseDatabaseArgs, opts ...pulumi.ResourceOption) (*EnterpriseDatabase, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterId == nil { return nil, errors.New("invalid value for required argument 'ClusterId'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryAccessKey", "secondaryAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource EnterpriseDatabase err := ctx.RegisterResource("azure:redis/enterpriseDatabase:EnterpriseDatabase", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEnterpriseDatabase gets an existing EnterpriseDatabase 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 GetEnterpriseDatabase(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EnterpriseDatabaseState, opts ...pulumi.ResourceOption) (*EnterpriseDatabase, error) { var resource EnterpriseDatabase err := ctx.ReadResource("azure:redis/enterpriseDatabase:EnterpriseDatabase", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EnterpriseDatabase resources. type enterpriseDatabaseState struct { // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. ClientProtocol *string `pulumi:"clientProtocol"` // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. ClusterId *string `pulumi:"clusterId"` // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. ClusteringPolicy *string `pulumi:"clusteringPolicy"` // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. LinkedDatabaseGroupNickname *string `pulumi:"linkedDatabaseGroupNickname"` // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. LinkedDatabaseIds []string `pulumi:"linkedDatabaseIds"` // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication Modules []EnterpriseDatabaseModule `pulumi:"modules"` // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. Name *string `pulumi:"name"` // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. Port *int `pulumi:"port"` // The Primary Access Key for the Redis Enterprise Database Instance. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The Secondary Access Key for the Redis Enterprise Database Instance. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` } type EnterpriseDatabaseState struct { // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. ClientProtocol pulumi.StringPtrInput // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. ClusterId pulumi.StringPtrInput // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. ClusteringPolicy pulumi.StringPtrInput // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. EvictionPolicy pulumi.StringPtrInput // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. LinkedDatabaseGroupNickname pulumi.StringPtrInput // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. LinkedDatabaseIds pulumi.StringArrayInput // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication Modules EnterpriseDatabaseModuleArrayInput // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. Name pulumi.StringPtrInput // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. Port pulumi.IntPtrInput // The Primary Access Key for the Redis Enterprise Database Instance. PrimaryAccessKey pulumi.StringPtrInput // The Secondary Access Key for the Redis Enterprise Database Instance. SecondaryAccessKey pulumi.StringPtrInput } func (EnterpriseDatabaseState) ElementType() reflect.Type { return reflect.TypeOf((*enterpriseDatabaseState)(nil)).Elem() } type enterpriseDatabaseArgs struct { // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. ClientProtocol *string `pulumi:"clientProtocol"` // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. ClusterId string `pulumi:"clusterId"` // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. ClusteringPolicy *string `pulumi:"clusteringPolicy"` // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. EvictionPolicy *string `pulumi:"evictionPolicy"` // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. LinkedDatabaseGroupNickname *string `pulumi:"linkedDatabaseGroupNickname"` // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. LinkedDatabaseIds []string `pulumi:"linkedDatabaseIds"` // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication Modules []EnterpriseDatabaseModule `pulumi:"modules"` // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. Name *string `pulumi:"name"` // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. Port *int `pulumi:"port"` } // The set of arguments for constructing a EnterpriseDatabase resource. type EnterpriseDatabaseArgs struct { // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. ClientProtocol pulumi.StringPtrInput // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. ClusterId pulumi.StringInput // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. ClusteringPolicy pulumi.StringPtrInput // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. EvictionPolicy pulumi.StringPtrInput // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. LinkedDatabaseGroupNickname pulumi.StringPtrInput // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. LinkedDatabaseIds pulumi.StringArrayInput // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication Modules EnterpriseDatabaseModuleArrayInput // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. Name pulumi.StringPtrInput // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. Port pulumi.IntPtrInput } func (EnterpriseDatabaseArgs) ElementType() reflect.Type { return reflect.TypeOf((*enterpriseDatabaseArgs)(nil)).Elem() } type EnterpriseDatabaseInput interface { pulumi.Input ToEnterpriseDatabaseOutput() EnterpriseDatabaseOutput ToEnterpriseDatabaseOutputWithContext(ctx context.Context) EnterpriseDatabaseOutput } func (*EnterpriseDatabase) ElementType() reflect.Type { return reflect.TypeOf((**EnterpriseDatabase)(nil)).Elem() } func (i *EnterpriseDatabase) ToEnterpriseDatabaseOutput() EnterpriseDatabaseOutput { return i.ToEnterpriseDatabaseOutputWithContext(context.Background()) } func (i *EnterpriseDatabase) ToEnterpriseDatabaseOutputWithContext(ctx context.Context) EnterpriseDatabaseOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseDatabaseOutput) } // EnterpriseDatabaseArrayInput is an input type that accepts EnterpriseDatabaseArray and EnterpriseDatabaseArrayOutput values. // You can construct a concrete instance of `EnterpriseDatabaseArrayInput` via: // // EnterpriseDatabaseArray{ EnterpriseDatabaseArgs{...} } type EnterpriseDatabaseArrayInput interface { pulumi.Input ToEnterpriseDatabaseArrayOutput() EnterpriseDatabaseArrayOutput ToEnterpriseDatabaseArrayOutputWithContext(context.Context) EnterpriseDatabaseArrayOutput } type EnterpriseDatabaseArray []EnterpriseDatabaseInput func (EnterpriseDatabaseArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EnterpriseDatabase)(nil)).Elem() } func (i EnterpriseDatabaseArray) ToEnterpriseDatabaseArrayOutput() EnterpriseDatabaseArrayOutput { return i.ToEnterpriseDatabaseArrayOutputWithContext(context.Background()) } func (i EnterpriseDatabaseArray) ToEnterpriseDatabaseArrayOutputWithContext(ctx context.Context) EnterpriseDatabaseArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseDatabaseArrayOutput) } // EnterpriseDatabaseMapInput is an input type that accepts EnterpriseDatabaseMap and EnterpriseDatabaseMapOutput values. // You can construct a concrete instance of `EnterpriseDatabaseMapInput` via: // // EnterpriseDatabaseMap{ "key": EnterpriseDatabaseArgs{...} } type EnterpriseDatabaseMapInput interface { pulumi.Input ToEnterpriseDatabaseMapOutput() EnterpriseDatabaseMapOutput ToEnterpriseDatabaseMapOutputWithContext(context.Context) EnterpriseDatabaseMapOutput } type EnterpriseDatabaseMap map[string]EnterpriseDatabaseInput func (EnterpriseDatabaseMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EnterpriseDatabase)(nil)).Elem() } func (i EnterpriseDatabaseMap) ToEnterpriseDatabaseMapOutput() EnterpriseDatabaseMapOutput { return i.ToEnterpriseDatabaseMapOutputWithContext(context.Background()) } func (i EnterpriseDatabaseMap) ToEnterpriseDatabaseMapOutputWithContext(ctx context.Context) EnterpriseDatabaseMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EnterpriseDatabaseMapOutput) } type EnterpriseDatabaseOutput struct{ *pulumi.OutputState } func (EnterpriseDatabaseOutput) ElementType() reflect.Type { return reflect.TypeOf((**EnterpriseDatabase)(nil)).Elem() } func (o EnterpriseDatabaseOutput) ToEnterpriseDatabaseOutput() EnterpriseDatabaseOutput { return o } func (o EnterpriseDatabaseOutput) ToEnterpriseDatabaseOutputWithContext(ctx context.Context) EnterpriseDatabaseOutput { return o } // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. Changing this forces a new Redis Enterprise Database to be created. func (o EnterpriseDatabaseOutput) ClientProtocol() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringPtrOutput { return v.ClientProtocol }).(pulumi.StringPtrOutput) } // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. func (o EnterpriseDatabaseOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) } // Clustering policy Specified at create time. Possible values are `EnterpriseCluster` and `OSSCluster`. Defaults to `OSSCluster`. Changing this forces a new Redis Enterprise Database to be created. func (o EnterpriseDatabaseOutput) ClusteringPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringPtrOutput { return v.ClusteringPolicy }).(pulumi.StringPtrOutput) } // Redis eviction policy possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Changing this forces a new Redis Enterprise Database to be created. Defaults to `VolatileLRU`. func (o EnterpriseDatabaseOutput) EvictionPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringPtrOutput { return v.EvictionPolicy }).(pulumi.StringPtrOutput) } // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. func (o EnterpriseDatabaseOutput) LinkedDatabaseGroupNickname() pulumi.StringPtrOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringPtrOutput { return v.LinkedDatabaseGroupNickname }).(pulumi.StringPtrOutput) } // A list of database resources to link with this database with a maximum of 5. // // > **Note:** Only the newly created databases can be added to an existing geo-replication group. Existing regular databases or recreated databases cannot be added to the existing geo-replication group. Any linked database removed from the list will be forcefully unlinked. The only recommended operation is to delete after force-unlink and the recommended scenario of force-unlink is region outage. The database cannot be linked again after force-unlink. func (o EnterpriseDatabaseOutput) LinkedDatabaseIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringArrayOutput { return v.LinkedDatabaseIds }).(pulumi.StringArrayOutput) } // A `module` block as defined below. Changing this forces a new resource to be created. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication func (o EnterpriseDatabaseOutput) Modules() EnterpriseDatabaseModuleArrayOutput { return o.ApplyT(func(v *EnterpriseDatabase) EnterpriseDatabaseModuleArrayOutput { return v.Modules }).(EnterpriseDatabaseModuleArrayOutput) } // The name which should be used for this Redis Enterprise Database. Currently the acceptable value for this argument is `default`. Defaults to `default`. Changing this forces a new Redis Enterprise Database to be created. func (o EnterpriseDatabaseOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to `10000`. func (o EnterpriseDatabaseOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) } // The Primary Access Key for the Redis Enterprise Database Instance. func (o EnterpriseDatabaseOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The Secondary Access Key for the Redis Enterprise Database Instance. func (o EnterpriseDatabaseOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *EnterpriseDatabase) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput) } type EnterpriseDatabaseArrayOutput struct{ *pulumi.OutputState } func (EnterpriseDatabaseArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EnterpriseDatabase)(nil)).Elem() } func (o EnterpriseDatabaseArrayOutput) ToEnterpriseDatabaseArrayOutput() EnterpriseDatabaseArrayOutput { return o } func (o EnterpriseDatabaseArrayOutput) ToEnterpriseDatabaseArrayOutputWithContext(ctx context.Context) EnterpriseDatabaseArrayOutput { return o } func (o EnterpriseDatabaseArrayOutput) Index(i pulumi.IntInput) EnterpriseDatabaseOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EnterpriseDatabase { return vs[0].([]*EnterpriseDatabase)[vs[1].(int)] }).(EnterpriseDatabaseOutput) } type EnterpriseDatabaseMapOutput struct{ *pulumi.OutputState } func (EnterpriseDatabaseMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EnterpriseDatabase)(nil)).Elem() } func (o EnterpriseDatabaseMapOutput) ToEnterpriseDatabaseMapOutput() EnterpriseDatabaseMapOutput { return o } func (o EnterpriseDatabaseMapOutput) ToEnterpriseDatabaseMapOutputWithContext(ctx context.Context) EnterpriseDatabaseMapOutput { return o } func (o EnterpriseDatabaseMapOutput) MapIndex(k pulumi.StringInput) EnterpriseDatabaseOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EnterpriseDatabase { return vs[0].(map[string]*EnterpriseDatabase)[vs[1].(string)] }).(EnterpriseDatabaseOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseDatabaseInput)(nil)).Elem(), &EnterpriseDatabase{}) pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseDatabaseArrayInput)(nil)).Elem(), EnterpriseDatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EnterpriseDatabaseMapInput)(nil)).Elem(), EnterpriseDatabaseMap{}) pulumi.RegisterOutputType(EnterpriseDatabaseOutput{}) pulumi.RegisterOutputType(EnterpriseDatabaseArrayOutput{}) pulumi.RegisterOutputType(EnterpriseDatabaseMapOutput{}) }
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/redis/firewallRule.go
sdk/go/azure/redis/firewallRule.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 redis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Firewall Rule associated with a Redis Cache. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/redis" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // server, err := random.NewId(ctx, "server", &random.IdArgs{ // Keepers: map[string]interface{}{ // "aziId": 1, // }, // ByteLength: 8, // }) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("redis-resourcegroup"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleCache, err := redis.NewCache(ctx, "example", &redis.CacheArgs{ // Name: pulumi.Sprintf("redis%v", server.Hex), // Location: example.Location, // ResourceGroupName: example.Name, // Capacity: pulumi.Int(1), // Family: pulumi.String("P"), // SkuName: pulumi.String("Premium"), // EnableNonSslPort: false, // RedisConfiguration: &redis.CacheRedisConfigurationArgs{ // MaxmemoryReserved: pulumi.Int(2), // MaxmemoryDelta: pulumi.Int(2), // MaxmemoryPolicy: pulumi.String("allkeys-lru"), // }, // }) // if err != nil { // return err // } // _, err = redis.NewFirewallRule(ctx, "example", &redis.FirewallRuleArgs{ // Name: pulumi.String("someIPrange"), // RedisCacheName: exampleCache.Name, // ResourceGroupName: example.Name, // StartIp: pulumi.String("1.2.3.4"), // EndIp: pulumi.String("2.3.4.5"), // }) // 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.Cache` - 2024-11-01 // // ## Import // // Redis Firewall Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:redis/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/firewallRules/rule1 // ``` type FirewallRule struct { pulumi.CustomResourceState // The highest IP address included in the range. EndIp pulumi.StringOutput `pulumi:"endIp"` // The name of the Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Redis Cache. Changing this forces a new resource to be created. RedisCacheName pulumi.StringOutput `pulumi:"redisCacheName"` // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The lowest IP address included in the range StartIp pulumi.StringOutput `pulumi:"startIp"` } // NewFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFirewallRule(ctx *pulumi.Context, name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIp == nil { return nil, errors.New("invalid value for required argument 'EndIp'") } if args.RedisCacheName == nil { return nil, errors.New("invalid value for required argument 'RedisCacheName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.StartIp == nil { return nil, errors.New("invalid value for required argument 'StartIp'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallRule err := ctx.RegisterResource("azure:redis/firewallRule:FirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallRule gets an existing FirewallRule 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 GetFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error) { var resource FirewallRule err := ctx.ReadResource("azure:redis/firewallRule:FirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallRule resources. type firewallRuleState struct { // The highest IP address included in the range. EndIp *string `pulumi:"endIp"` // The name of the Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Redis Cache. Changing this forces a new resource to be created. RedisCacheName *string `pulumi:"redisCacheName"` // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The lowest IP address included in the range StartIp *string `pulumi:"startIp"` } type FirewallRuleState struct { // The highest IP address included in the range. EndIp pulumi.StringPtrInput // The name of the Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Redis Cache. Changing this forces a new resource to be created. RedisCacheName pulumi.StringPtrInput // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The lowest IP address included in the range StartIp pulumi.StringPtrInput } func (FirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleState)(nil)).Elem() } type firewallRuleArgs struct { // The highest IP address included in the range. EndIp string `pulumi:"endIp"` // The name of the Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Redis Cache. Changing this forces a new resource to be created. RedisCacheName string `pulumi:"redisCacheName"` // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The lowest IP address included in the range StartIp string `pulumi:"startIp"` } // The set of arguments for constructing a FirewallRule resource. type FirewallRuleArgs struct { // The highest IP address included in the range. EndIp pulumi.StringInput // The name of the Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Redis Cache. Changing this forces a new resource to be created. RedisCacheName pulumi.StringInput // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The lowest IP address included in the range StartIp pulumi.StringInput } func (FirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleArgs)(nil)).Elem() } type FirewallRuleInput interface { pulumi.Input ToFirewallRuleOutput() FirewallRuleOutput ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput } func (*FirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (i *FirewallRule) ToFirewallRuleOutput() FirewallRuleOutput { return i.ToFirewallRuleOutputWithContext(context.Background()) } func (i *FirewallRule) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleOutput) } // FirewallRuleArrayInput is an input type that accepts FirewallRuleArray and FirewallRuleArrayOutput values. // You can construct a concrete instance of `FirewallRuleArrayInput` via: // // FirewallRuleArray{ FirewallRuleArgs{...} } type FirewallRuleArrayInput interface { pulumi.Input ToFirewallRuleArrayOutput() FirewallRuleArrayOutput ToFirewallRuleArrayOutputWithContext(context.Context) FirewallRuleArrayOutput } type FirewallRuleArray []FirewallRuleInput func (FirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (i FirewallRuleArray) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return i.ToFirewallRuleArrayOutputWithContext(context.Background()) } func (i FirewallRuleArray) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleArrayOutput) } // FirewallRuleMapInput is an input type that accepts FirewallRuleMap and FirewallRuleMapOutput values. // You can construct a concrete instance of `FirewallRuleMapInput` via: // // FirewallRuleMap{ "key": FirewallRuleArgs{...} } type FirewallRuleMapInput interface { pulumi.Input ToFirewallRuleMapOutput() FirewallRuleMapOutput ToFirewallRuleMapOutputWithContext(context.Context) FirewallRuleMapOutput } type FirewallRuleMap map[string]FirewallRuleInput func (FirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (i FirewallRuleMap) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return i.ToFirewallRuleMapOutputWithContext(context.Background()) } func (i FirewallRuleMap) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleMapOutput) } type FirewallRuleOutput struct{ *pulumi.OutputState } func (FirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (o FirewallRuleOutput) ToFirewallRuleOutput() FirewallRuleOutput { return o } func (o FirewallRuleOutput) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return o } // The highest IP address included in the range. func (o FirewallRuleOutput) EndIp() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.EndIp }).(pulumi.StringOutput) } // The name of the Firewall Rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Redis Cache. Changing this forces a new resource to be created. func (o FirewallRuleOutput) RedisCacheName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.RedisCacheName }).(pulumi.StringOutput) } // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. func (o FirewallRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The lowest IP address included in the range func (o FirewallRuleOutput) StartIp() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.StartIp }).(pulumi.StringOutput) } type FirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) Index(i pulumi.IntInput) FirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].([]*FirewallRule)[vs[1].(int)] }).(FirewallRuleOutput) } type FirewallRuleMapOutput struct{ *pulumi.OutputState } func (FirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].(map[string]*FirewallRule)[vs[1].(string)] }).(FirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleInput)(nil)).Elem(), &FirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleArrayInput)(nil)).Elem(), FirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleMapInput)(nil)).Elem(), FirewallRuleMap{}) pulumi.RegisterOutputType(FirewallRuleOutput{}) pulumi.RegisterOutputType(FirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FirewallRuleMapOutput{}) }
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/siterecovery/hypervNetworkMapping.go
sdk/go/azure/siterecovery/hypervNetworkMapping.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a HyperV site recovery network mapping on Azure. A HyperV network mapping decides how to translate connected networks when a VM is migrated from HyperV VMM Center to Azure. // // ## 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/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // target, err := core.NewResourceGroup(ctx, "target", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: target.Location, // ResourceGroupName: target.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // targetVirtualNetwork, err := network.NewVirtualNetwork(ctx, "target", &network.VirtualNetworkArgs{ // Name: pulumi.String("network"), // ResourceGroupName: target.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // Location: target.Location, // }) // if err != nil { // return err // } // _, err = siterecovery.NewHypervNetworkMapping(ctx, "recovery-mapping", &siterecovery.HypervNetworkMappingArgs{ // Name: pulumi.String("recovery-network-mapping"), // RecoveryVaultId: vault.ID(), // SourceSystemCenterVirtualMachineManagerName: pulumi.String("my-vmm-server"), // SourceNetworkName: pulumi.String("my-vmm-network"), // TargetNetworkId: targetVirtualNetwork.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Network Mapping can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping azurerm_site_recovery_hyperv_network_mapping.mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/primary-fabric-name/replicationNetworks/azureNetwork/replicationNetworkMappings/mapping-name // ``` type HypervNetworkMapping struct { pulumi.CustomResourceState // The name of the HyperV network mapping. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` // The Name of the primary network. Changing this forces a new resource to be created. SourceNetworkName pulumi.StringOutput `pulumi:"sourceNetworkName"` // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. SourceSystemCenterVirtualMachineManagerName pulumi.StringOutput `pulumi:"sourceSystemCenterVirtualMachineManagerName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringOutput `pulumi:"targetNetworkId"` } // NewHypervNetworkMapping registers a new resource with the given unique name, arguments, and options. func NewHypervNetworkMapping(ctx *pulumi.Context, name string, args *HypervNetworkMappingArgs, opts ...pulumi.ResourceOption) (*HypervNetworkMapping, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } if args.SourceNetworkName == nil { return nil, errors.New("invalid value for required argument 'SourceNetworkName'") } if args.SourceSystemCenterVirtualMachineManagerName == nil { return nil, errors.New("invalid value for required argument 'SourceSystemCenterVirtualMachineManagerName'") } if args.TargetNetworkId == nil { return nil, errors.New("invalid value for required argument 'TargetNetworkId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource HypervNetworkMapping err := ctx.RegisterResource("azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHypervNetworkMapping gets an existing HypervNetworkMapping 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 GetHypervNetworkMapping(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HypervNetworkMappingState, opts ...pulumi.ResourceOption) (*HypervNetworkMapping, error) { var resource HypervNetworkMapping err := ctx.ReadResource("azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering HypervNetworkMapping resources. type hypervNetworkMappingState struct { // The name of the HyperV network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` // The Name of the primary network. Changing this forces a new resource to be created. SourceNetworkName *string `pulumi:"sourceNetworkName"` // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. SourceSystemCenterVirtualMachineManagerName *string `pulumi:"sourceSystemCenterVirtualMachineManagerName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId *string `pulumi:"targetNetworkId"` } type HypervNetworkMappingState struct { // The name of the HyperV network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringPtrInput // The Name of the primary network. Changing this forces a new resource to be created. SourceNetworkName pulumi.StringPtrInput // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. SourceSystemCenterVirtualMachineManagerName pulumi.StringPtrInput // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringPtrInput } func (HypervNetworkMappingState) ElementType() reflect.Type { return reflect.TypeOf((*hypervNetworkMappingState)(nil)).Elem() } type hypervNetworkMappingArgs struct { // The name of the HyperV network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` // The Name of the primary network. Changing this forces a new resource to be created. SourceNetworkName string `pulumi:"sourceNetworkName"` // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. SourceSystemCenterVirtualMachineManagerName string `pulumi:"sourceSystemCenterVirtualMachineManagerName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId string `pulumi:"targetNetworkId"` } // The set of arguments for constructing a HypervNetworkMapping resource. type HypervNetworkMappingArgs struct { // The name of the HyperV network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringInput // The Name of the primary network. Changing this forces a new resource to be created. SourceNetworkName pulumi.StringInput // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. SourceSystemCenterVirtualMachineManagerName pulumi.StringInput // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringInput } func (HypervNetworkMappingArgs) ElementType() reflect.Type { return reflect.TypeOf((*hypervNetworkMappingArgs)(nil)).Elem() } type HypervNetworkMappingInput interface { pulumi.Input ToHypervNetworkMappingOutput() HypervNetworkMappingOutput ToHypervNetworkMappingOutputWithContext(ctx context.Context) HypervNetworkMappingOutput } func (*HypervNetworkMapping) ElementType() reflect.Type { return reflect.TypeOf((**HypervNetworkMapping)(nil)).Elem() } func (i *HypervNetworkMapping) ToHypervNetworkMappingOutput() HypervNetworkMappingOutput { return i.ToHypervNetworkMappingOutputWithContext(context.Background()) } func (i *HypervNetworkMapping) ToHypervNetworkMappingOutputWithContext(ctx context.Context) HypervNetworkMappingOutput { return pulumi.ToOutputWithContext(ctx, i).(HypervNetworkMappingOutput) } // HypervNetworkMappingArrayInput is an input type that accepts HypervNetworkMappingArray and HypervNetworkMappingArrayOutput values. // You can construct a concrete instance of `HypervNetworkMappingArrayInput` via: // // HypervNetworkMappingArray{ HypervNetworkMappingArgs{...} } type HypervNetworkMappingArrayInput interface { pulumi.Input ToHypervNetworkMappingArrayOutput() HypervNetworkMappingArrayOutput ToHypervNetworkMappingArrayOutputWithContext(context.Context) HypervNetworkMappingArrayOutput } type HypervNetworkMappingArray []HypervNetworkMappingInput func (HypervNetworkMappingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*HypervNetworkMapping)(nil)).Elem() } func (i HypervNetworkMappingArray) ToHypervNetworkMappingArrayOutput() HypervNetworkMappingArrayOutput { return i.ToHypervNetworkMappingArrayOutputWithContext(context.Background()) } func (i HypervNetworkMappingArray) ToHypervNetworkMappingArrayOutputWithContext(ctx context.Context) HypervNetworkMappingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HypervNetworkMappingArrayOutput) } // HypervNetworkMappingMapInput is an input type that accepts HypervNetworkMappingMap and HypervNetworkMappingMapOutput values. // You can construct a concrete instance of `HypervNetworkMappingMapInput` via: // // HypervNetworkMappingMap{ "key": HypervNetworkMappingArgs{...} } type HypervNetworkMappingMapInput interface { pulumi.Input ToHypervNetworkMappingMapOutput() HypervNetworkMappingMapOutput ToHypervNetworkMappingMapOutputWithContext(context.Context) HypervNetworkMappingMapOutput } type HypervNetworkMappingMap map[string]HypervNetworkMappingInput func (HypervNetworkMappingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HypervNetworkMapping)(nil)).Elem() } func (i HypervNetworkMappingMap) ToHypervNetworkMappingMapOutput() HypervNetworkMappingMapOutput { return i.ToHypervNetworkMappingMapOutputWithContext(context.Background()) } func (i HypervNetworkMappingMap) ToHypervNetworkMappingMapOutputWithContext(ctx context.Context) HypervNetworkMappingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HypervNetworkMappingMapOutput) } type HypervNetworkMappingOutput struct{ *pulumi.OutputState } func (HypervNetworkMappingOutput) ElementType() reflect.Type { return reflect.TypeOf((**HypervNetworkMapping)(nil)).Elem() } func (o HypervNetworkMappingOutput) ToHypervNetworkMappingOutput() HypervNetworkMappingOutput { return o } func (o HypervNetworkMappingOutput) ToHypervNetworkMappingOutputWithContext(ctx context.Context) HypervNetworkMappingOutput { return o } // The name of the HyperV network mapping. Changing this forces a new resource to be created. func (o HypervNetworkMappingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *HypervNetworkMapping) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created. func (o HypervNetworkMappingOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *HypervNetworkMapping) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } // The Name of the primary network. Changing this forces a new resource to be created. func (o HypervNetworkMappingOutput) SourceNetworkName() pulumi.StringOutput { return o.ApplyT(func(v *HypervNetworkMapping) pulumi.StringOutput { return v.SourceNetworkName }).(pulumi.StringOutput) } // Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created. func (o HypervNetworkMappingOutput) SourceSystemCenterVirtualMachineManagerName() pulumi.StringOutput { return o.ApplyT(func(v *HypervNetworkMapping) pulumi.StringOutput { return v.SourceSystemCenterVirtualMachineManagerName }).(pulumi.StringOutput) } // The id of the recovery network. Changing this forces a new resource to be created. func (o HypervNetworkMappingOutput) TargetNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *HypervNetworkMapping) pulumi.StringOutput { return v.TargetNetworkId }).(pulumi.StringOutput) } type HypervNetworkMappingArrayOutput struct{ *pulumi.OutputState } func (HypervNetworkMappingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*HypervNetworkMapping)(nil)).Elem() } func (o HypervNetworkMappingArrayOutput) ToHypervNetworkMappingArrayOutput() HypervNetworkMappingArrayOutput { return o } func (o HypervNetworkMappingArrayOutput) ToHypervNetworkMappingArrayOutputWithContext(ctx context.Context) HypervNetworkMappingArrayOutput { return o } func (o HypervNetworkMappingArrayOutput) Index(i pulumi.IntInput) HypervNetworkMappingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HypervNetworkMapping { return vs[0].([]*HypervNetworkMapping)[vs[1].(int)] }).(HypervNetworkMappingOutput) } type HypervNetworkMappingMapOutput struct{ *pulumi.OutputState } func (HypervNetworkMappingMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HypervNetworkMapping)(nil)).Elem() } func (o HypervNetworkMappingMapOutput) ToHypervNetworkMappingMapOutput() HypervNetworkMappingMapOutput { return o } func (o HypervNetworkMappingMapOutput) ToHypervNetworkMappingMapOutputWithContext(ctx context.Context) HypervNetworkMappingMapOutput { return o } func (o HypervNetworkMappingMapOutput) MapIndex(k pulumi.StringInput) HypervNetworkMappingOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HypervNetworkMapping { return vs[0].(map[string]*HypervNetworkMapping)[vs[1].(string)] }).(HypervNetworkMappingOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HypervNetworkMappingInput)(nil)).Elem(), &HypervNetworkMapping{}) pulumi.RegisterInputType(reflect.TypeOf((*HypervNetworkMappingArrayInput)(nil)).Elem(), HypervNetworkMappingArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HypervNetworkMappingMapInput)(nil)).Elem(), HypervNetworkMappingMap{}) pulumi.RegisterOutputType(HypervNetworkMappingOutput{}) pulumi.RegisterOutputType(HypervNetworkMappingArrayOutput{}) pulumi.RegisterOutputType(HypervNetworkMappingMapOutput{}) }
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/siterecovery/init.go
sdk/go/azure/siterecovery/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 siterecovery 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:siterecovery/fabric:Fabric": r = &Fabric{} case "azure:siterecovery/hyperVReplicationPolicy:HyperVReplicationPolicy": r = &HyperVReplicationPolicy{} case "azure:siterecovery/hyperVReplicationPolicyAssociation:HyperVReplicationPolicyAssociation": r = &HyperVReplicationPolicyAssociation{} case "azure:siterecovery/hyperVSite:HyperVSite": r = &HyperVSite{} case "azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping": r = &HypervNetworkMapping{} case "azure:siterecovery/networkMapping:NetworkMapping": r = &NetworkMapping{} case "azure:siterecovery/protectionContainer:ProtectionContainer": r = &ProtectionContainer{} case "azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping": r = &ProtectionContainerMapping{} case "azure:siterecovery/replicatedVM:ReplicatedVM": r = &ReplicatedVM{} case "azure:siterecovery/replicationPolicy:ReplicationPolicy": r = &ReplicationPolicy{} case "azure:siterecovery/replicationRecoveryPlan:ReplicationRecoveryPlan": r = &ReplicationRecoveryPlan{} case "azure:siterecovery/vMWareReplicationPolicy:VMWareReplicationPolicy": r = &VMWareReplicationPolicy{} case "azure:siterecovery/vmwareReplicatedVm:VmwareReplicatedVm": r = &VmwareReplicatedVm{} case "azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation": r = &VmwareReplicationPolicyAssociation{} 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", "siterecovery/fabric", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/hyperVReplicationPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/hyperVReplicationPolicyAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/hyperVSite", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/hypervNetworkMapping", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/networkMapping", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/protectionContainer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/protectionContainerMapping", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/replicatedVM", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/replicationPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/replicationRecoveryPlan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/vMWareReplicationPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/vmwareReplicatedVm", &module{version}, ) pulumi.RegisterResourceModule( "azure", "siterecovery/vmwareReplicationPolicyAssociation", &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/siterecovery/pulumiTypes.go
sdk/go/azure/siterecovery/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 siterecovery 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 ProtectionContainerMappingAutomaticUpdate struct { // The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. Defaults to `SystemAssignedIdentity`. // // > **Note:** `RunAsAccount` of `authenticationType` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts). AuthenticationType *string `pulumi:"authenticationType"` // The automation account ID which holds the automatic update runbook and authenticates to Azure resources. // // > **Note:** `automationAccountId` is required when `enabled` is specified. AutomationAccountId *string `pulumi:"automationAccountId"` // Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`. // // > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) Enabled *bool `pulumi:"enabled"` } // ProtectionContainerMappingAutomaticUpdateInput is an input type that accepts ProtectionContainerMappingAutomaticUpdateArgs and ProtectionContainerMappingAutomaticUpdateOutput values. // You can construct a concrete instance of `ProtectionContainerMappingAutomaticUpdateInput` via: // // ProtectionContainerMappingAutomaticUpdateArgs{...} type ProtectionContainerMappingAutomaticUpdateInput interface { pulumi.Input ToProtectionContainerMappingAutomaticUpdateOutput() ProtectionContainerMappingAutomaticUpdateOutput ToProtectionContainerMappingAutomaticUpdateOutputWithContext(context.Context) ProtectionContainerMappingAutomaticUpdateOutput } type ProtectionContainerMappingAutomaticUpdateArgs struct { // The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. Defaults to `SystemAssignedIdentity`. // // > **Note:** `RunAsAccount` of `authenticationType` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts). AuthenticationType pulumi.StringPtrInput `pulumi:"authenticationType"` // The automation account ID which holds the automatic update runbook and authenticates to Azure resources. // // > **Note:** `automationAccountId` is required when `enabled` is specified. AutomationAccountId pulumi.StringPtrInput `pulumi:"automationAccountId"` // Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`. // // > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) Enabled pulumi.BoolPtrInput `pulumi:"enabled"` } func (ProtectionContainerMappingAutomaticUpdateArgs) ElementType() reflect.Type { return reflect.TypeOf((*ProtectionContainerMappingAutomaticUpdate)(nil)).Elem() } func (i ProtectionContainerMappingAutomaticUpdateArgs) ToProtectionContainerMappingAutomaticUpdateOutput() ProtectionContainerMappingAutomaticUpdateOutput { return i.ToProtectionContainerMappingAutomaticUpdateOutputWithContext(context.Background()) } func (i ProtectionContainerMappingAutomaticUpdateArgs) ToProtectionContainerMappingAutomaticUpdateOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdateOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingAutomaticUpdateOutput) } func (i ProtectionContainerMappingAutomaticUpdateArgs) ToProtectionContainerMappingAutomaticUpdatePtrOutput() ProtectionContainerMappingAutomaticUpdatePtrOutput { return i.ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(context.Background()) } func (i ProtectionContainerMappingAutomaticUpdateArgs) ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingAutomaticUpdateOutput).ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(ctx) } // ProtectionContainerMappingAutomaticUpdatePtrInput is an input type that accepts ProtectionContainerMappingAutomaticUpdateArgs, ProtectionContainerMappingAutomaticUpdatePtr and ProtectionContainerMappingAutomaticUpdatePtrOutput values. // You can construct a concrete instance of `ProtectionContainerMappingAutomaticUpdatePtrInput` via: // // ProtectionContainerMappingAutomaticUpdateArgs{...} // // or: // // nil type ProtectionContainerMappingAutomaticUpdatePtrInput interface { pulumi.Input ToProtectionContainerMappingAutomaticUpdatePtrOutput() ProtectionContainerMappingAutomaticUpdatePtrOutput ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(context.Context) ProtectionContainerMappingAutomaticUpdatePtrOutput } type protectionContainerMappingAutomaticUpdatePtrType ProtectionContainerMappingAutomaticUpdateArgs func ProtectionContainerMappingAutomaticUpdatePtr(v *ProtectionContainerMappingAutomaticUpdateArgs) ProtectionContainerMappingAutomaticUpdatePtrInput { return (*protectionContainerMappingAutomaticUpdatePtrType)(v) } func (*protectionContainerMappingAutomaticUpdatePtrType) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainerMappingAutomaticUpdate)(nil)).Elem() } func (i *protectionContainerMappingAutomaticUpdatePtrType) ToProtectionContainerMappingAutomaticUpdatePtrOutput() ProtectionContainerMappingAutomaticUpdatePtrOutput { return i.ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(context.Background()) } func (i *protectionContainerMappingAutomaticUpdatePtrType) ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingAutomaticUpdatePtrOutput) } type ProtectionContainerMappingAutomaticUpdateOutput struct{ *pulumi.OutputState } func (ProtectionContainerMappingAutomaticUpdateOutput) ElementType() reflect.Type { return reflect.TypeOf((*ProtectionContainerMappingAutomaticUpdate)(nil)).Elem() } func (o ProtectionContainerMappingAutomaticUpdateOutput) ToProtectionContainerMappingAutomaticUpdateOutput() ProtectionContainerMappingAutomaticUpdateOutput { return o } func (o ProtectionContainerMappingAutomaticUpdateOutput) ToProtectionContainerMappingAutomaticUpdateOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdateOutput { return o } func (o ProtectionContainerMappingAutomaticUpdateOutput) ToProtectionContainerMappingAutomaticUpdatePtrOutput() ProtectionContainerMappingAutomaticUpdatePtrOutput { return o.ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(context.Background()) } func (o ProtectionContainerMappingAutomaticUpdateOutput) ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdatePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ProtectionContainerMappingAutomaticUpdate) *ProtectionContainerMappingAutomaticUpdate { return &v }).(ProtectionContainerMappingAutomaticUpdatePtrOutput) } // The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. Defaults to `SystemAssignedIdentity`. // // > **Note:** `RunAsAccount` of `authenticationType` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts). func (o ProtectionContainerMappingAutomaticUpdateOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v ProtectionContainerMappingAutomaticUpdate) *string { return v.AuthenticationType }).(pulumi.StringPtrOutput) } // The automation account ID which holds the automatic update runbook and authenticates to Azure resources. // // > **Note:** `automationAccountId` is required when `enabled` is specified. func (o ProtectionContainerMappingAutomaticUpdateOutput) AutomationAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v ProtectionContainerMappingAutomaticUpdate) *string { return v.AutomationAccountId }).(pulumi.StringPtrOutput) } // Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`. // // > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) func (o ProtectionContainerMappingAutomaticUpdateOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v ProtectionContainerMappingAutomaticUpdate) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } type ProtectionContainerMappingAutomaticUpdatePtrOutput struct{ *pulumi.OutputState } func (ProtectionContainerMappingAutomaticUpdatePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainerMappingAutomaticUpdate)(nil)).Elem() } func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) ToProtectionContainerMappingAutomaticUpdatePtrOutput() ProtectionContainerMappingAutomaticUpdatePtrOutput { return o } func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) ToProtectionContainerMappingAutomaticUpdatePtrOutputWithContext(ctx context.Context) ProtectionContainerMappingAutomaticUpdatePtrOutput { return o } func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) Elem() ProtectionContainerMappingAutomaticUpdateOutput { return o.ApplyT(func(v *ProtectionContainerMappingAutomaticUpdate) ProtectionContainerMappingAutomaticUpdate { if v != nil { return *v } var ret ProtectionContainerMappingAutomaticUpdate return ret }).(ProtectionContainerMappingAutomaticUpdateOutput) } // The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`. Defaults to `SystemAssignedIdentity`. // // > **Note:** `RunAsAccount` of `authenticationType` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts). func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProtectionContainerMappingAutomaticUpdate) *string { if v == nil { return nil } return v.AuthenticationType }).(pulumi.StringPtrOutput) } // The automation account ID which holds the automatic update runbook and authenticates to Azure resources. // // > **Note:** `automationAccountId` is required when `enabled` is specified. func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) AutomationAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProtectionContainerMappingAutomaticUpdate) *string { if v == nil { return nil } return v.AutomationAccountId }).(pulumi.StringPtrOutput) } // Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`. // // > **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates) func (o ProtectionContainerMappingAutomaticUpdatePtrOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ProtectionContainerMappingAutomaticUpdate) *bool { if v == nil { return nil } return v.Enabled }).(pulumi.BoolPtrOutput) } type ReplicatedVMManagedDisk struct { // Id of disk that should be replicated. Changing this forces a new resource to be created. DiskId string `pulumi:"diskId"` // Storage account that should be used for caching. Changing this forces a new resource to be created. StagingStorageAccountId string `pulumi:"stagingStorageAccountId"` // A `targetDiskEncryption` block as defined below. TargetDiskEncryption *ReplicatedVMManagedDiskTargetDiskEncryption `pulumi:"targetDiskEncryption"` // The Disk Encryption Set that the Managed Disk will be associated with. Changing this forces a new resource to be created. // // > **Note:** Creating replicated vm with `targetDiskEncryptionSetId` wil take more time (up to 5 hours), please extend the `timeout` for `create`. TargetDiskEncryptionSetId *string `pulumi:"targetDiskEncryptionSetId"` // What type should the disk be when a failover is done. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. TargetDiskType string `pulumi:"targetDiskType"` // What type should the disk be that holds the replication data. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. TargetReplicaDiskType string `pulumi:"targetReplicaDiskType"` // Resource group disk should belong to when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId string `pulumi:"targetResourceGroupId"` } // ReplicatedVMManagedDiskInput is an input type that accepts ReplicatedVMManagedDiskArgs and ReplicatedVMManagedDiskOutput values. // You can construct a concrete instance of `ReplicatedVMManagedDiskInput` via: // // ReplicatedVMManagedDiskArgs{...} type ReplicatedVMManagedDiskInput interface { pulumi.Input ToReplicatedVMManagedDiskOutput() ReplicatedVMManagedDiskOutput ToReplicatedVMManagedDiskOutputWithContext(context.Context) ReplicatedVMManagedDiskOutput } type ReplicatedVMManagedDiskArgs struct { // Id of disk that should be replicated. Changing this forces a new resource to be created. DiskId pulumi.StringInput `pulumi:"diskId"` // Storage account that should be used for caching. Changing this forces a new resource to be created. StagingStorageAccountId pulumi.StringInput `pulumi:"stagingStorageAccountId"` // A `targetDiskEncryption` block as defined below. TargetDiskEncryption ReplicatedVMManagedDiskTargetDiskEncryptionPtrInput `pulumi:"targetDiskEncryption"` // The Disk Encryption Set that the Managed Disk will be associated with. Changing this forces a new resource to be created. // // > **Note:** Creating replicated vm with `targetDiskEncryptionSetId` wil take more time (up to 5 hours), please extend the `timeout` for `create`. TargetDiskEncryptionSetId pulumi.StringPtrInput `pulumi:"targetDiskEncryptionSetId"` // What type should the disk be when a failover is done. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. TargetDiskType pulumi.StringInput `pulumi:"targetDiskType"` // What type should the disk be that holds the replication data. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. TargetReplicaDiskType pulumi.StringInput `pulumi:"targetReplicaDiskType"` // Resource group disk should belong to when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId pulumi.StringInput `pulumi:"targetResourceGroupId"` } func (ReplicatedVMManagedDiskArgs) ElementType() reflect.Type { return reflect.TypeOf((*ReplicatedVMManagedDisk)(nil)).Elem() } func (i ReplicatedVMManagedDiskArgs) ToReplicatedVMManagedDiskOutput() ReplicatedVMManagedDiskOutput { return i.ToReplicatedVMManagedDiskOutputWithContext(context.Background()) } func (i ReplicatedVMManagedDiskArgs) ToReplicatedVMManagedDiskOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicatedVMManagedDiskOutput) } // ReplicatedVMManagedDiskArrayInput is an input type that accepts ReplicatedVMManagedDiskArray and ReplicatedVMManagedDiskArrayOutput values. // You can construct a concrete instance of `ReplicatedVMManagedDiskArrayInput` via: // // ReplicatedVMManagedDiskArray{ ReplicatedVMManagedDiskArgs{...} } type ReplicatedVMManagedDiskArrayInput interface { pulumi.Input ToReplicatedVMManagedDiskArrayOutput() ReplicatedVMManagedDiskArrayOutput ToReplicatedVMManagedDiskArrayOutputWithContext(context.Context) ReplicatedVMManagedDiskArrayOutput } type ReplicatedVMManagedDiskArray []ReplicatedVMManagedDiskInput func (ReplicatedVMManagedDiskArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ReplicatedVMManagedDisk)(nil)).Elem() } func (i ReplicatedVMManagedDiskArray) ToReplicatedVMManagedDiskArrayOutput() ReplicatedVMManagedDiskArrayOutput { return i.ToReplicatedVMManagedDiskArrayOutputWithContext(context.Background()) } func (i ReplicatedVMManagedDiskArray) ToReplicatedVMManagedDiskArrayOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicatedVMManagedDiskArrayOutput) } type ReplicatedVMManagedDiskOutput struct{ *pulumi.OutputState } func (ReplicatedVMManagedDiskOutput) ElementType() reflect.Type { return reflect.TypeOf((*ReplicatedVMManagedDisk)(nil)).Elem() } func (o ReplicatedVMManagedDiskOutput) ToReplicatedVMManagedDiskOutput() ReplicatedVMManagedDiskOutput { return o } func (o ReplicatedVMManagedDiskOutput) ToReplicatedVMManagedDiskOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskOutput { return o } // Id of disk that should be replicated. Changing this forces a new resource to be created. func (o ReplicatedVMManagedDiskOutput) DiskId() pulumi.StringOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) string { return v.DiskId }).(pulumi.StringOutput) } // Storage account that should be used for caching. Changing this forces a new resource to be created. func (o ReplicatedVMManagedDiskOutput) StagingStorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) string { return v.StagingStorageAccountId }).(pulumi.StringOutput) } // A `targetDiskEncryption` block as defined below. func (o ReplicatedVMManagedDiskOutput) TargetDiskEncryption() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) *ReplicatedVMManagedDiskTargetDiskEncryption { return v.TargetDiskEncryption }).(ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) } // The Disk Encryption Set that the Managed Disk will be associated with. Changing this forces a new resource to be created. // // > **Note:** Creating replicated vm with `targetDiskEncryptionSetId` wil take more time (up to 5 hours), please extend the `timeout` for `create`. func (o ReplicatedVMManagedDiskOutput) TargetDiskEncryptionSetId() pulumi.StringPtrOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) *string { return v.TargetDiskEncryptionSetId }).(pulumi.StringPtrOutput) } // What type should the disk be when a failover is done. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. func (o ReplicatedVMManagedDiskOutput) TargetDiskType() pulumi.StringOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) string { return v.TargetDiskType }).(pulumi.StringOutput) } // What type should the disk be that holds the replication data. Possible values are `Standard_LRS`, `Premium_LRS`, `PremiumV2_LRS`, `StandardSSD_LRS`, `UltraSSD_LRS`, `StandardSSD_ZRS` and `Premium_ZRS`. Changing this forces a new resource to be created. func (o ReplicatedVMManagedDiskOutput) TargetReplicaDiskType() pulumi.StringOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) string { return v.TargetReplicaDiskType }).(pulumi.StringOutput) } // Resource group disk should belong to when a failover is done. Changing this forces a new resource to be created. func (o ReplicatedVMManagedDiskOutput) TargetResourceGroupId() pulumi.StringOutput { return o.ApplyT(func(v ReplicatedVMManagedDisk) string { return v.TargetResourceGroupId }).(pulumi.StringOutput) } type ReplicatedVMManagedDiskArrayOutput struct{ *pulumi.OutputState } func (ReplicatedVMManagedDiskArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ReplicatedVMManagedDisk)(nil)).Elem() } func (o ReplicatedVMManagedDiskArrayOutput) ToReplicatedVMManagedDiskArrayOutput() ReplicatedVMManagedDiskArrayOutput { return o } func (o ReplicatedVMManagedDiskArrayOutput) ToReplicatedVMManagedDiskArrayOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskArrayOutput { return o } func (o ReplicatedVMManagedDiskArrayOutput) Index(i pulumi.IntInput) ReplicatedVMManagedDiskOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ReplicatedVMManagedDisk { return vs[0].([]ReplicatedVMManagedDisk)[vs[1].(int)] }).(ReplicatedVMManagedDiskOutput) } type ReplicatedVMManagedDiskTargetDiskEncryption struct { // A `diskEncryptionKey` block as defined below. DiskEncryptionKey ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey `pulumi:"diskEncryptionKey"` // A `keyEncryptionKey` block as defined below. KeyEncryptionKey *ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKey `pulumi:"keyEncryptionKey"` } // ReplicatedVMManagedDiskTargetDiskEncryptionInput is an input type that accepts ReplicatedVMManagedDiskTargetDiskEncryptionArgs and ReplicatedVMManagedDiskTargetDiskEncryptionOutput values. // You can construct a concrete instance of `ReplicatedVMManagedDiskTargetDiskEncryptionInput` via: // // ReplicatedVMManagedDiskTargetDiskEncryptionArgs{...} type ReplicatedVMManagedDiskTargetDiskEncryptionInput interface { pulumi.Input ToReplicatedVMManagedDiskTargetDiskEncryptionOutput() ReplicatedVMManagedDiskTargetDiskEncryptionOutput ToReplicatedVMManagedDiskTargetDiskEncryptionOutputWithContext(context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionOutput } type ReplicatedVMManagedDiskTargetDiskEncryptionArgs struct { // A `diskEncryptionKey` block as defined below. DiskEncryptionKey ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyInput `pulumi:"diskEncryptionKey"` // A `keyEncryptionKey` block as defined below. KeyEncryptionKey ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyPtrInput `pulumi:"keyEncryptionKey"` } func (ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*ReplicatedVMManagedDiskTargetDiskEncryption)(nil)).Elem() } func (i ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ToReplicatedVMManagedDiskTargetDiskEncryptionOutput() ReplicatedVMManagedDiskTargetDiskEncryptionOutput { return i.ToReplicatedVMManagedDiskTargetDiskEncryptionOutputWithContext(context.Background()) } func (i ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ToReplicatedVMManagedDiskTargetDiskEncryptionOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicatedVMManagedDiskTargetDiskEncryptionOutput) } func (i ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return i.ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(context.Background()) } func (i ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicatedVMManagedDiskTargetDiskEncryptionOutput).ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(ctx) } // ReplicatedVMManagedDiskTargetDiskEncryptionPtrInput is an input type that accepts ReplicatedVMManagedDiskTargetDiskEncryptionArgs, ReplicatedVMManagedDiskTargetDiskEncryptionPtr and ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput values. // You can construct a concrete instance of `ReplicatedVMManagedDiskTargetDiskEncryptionPtrInput` via: // // ReplicatedVMManagedDiskTargetDiskEncryptionArgs{...} // // or: // // nil type ReplicatedVMManagedDiskTargetDiskEncryptionPtrInput interface { pulumi.Input ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput } type replicatedVMManagedDiskTargetDiskEncryptionPtrType ReplicatedVMManagedDiskTargetDiskEncryptionArgs func ReplicatedVMManagedDiskTargetDiskEncryptionPtr(v *ReplicatedVMManagedDiskTargetDiskEncryptionArgs) ReplicatedVMManagedDiskTargetDiskEncryptionPtrInput { return (*replicatedVMManagedDiskTargetDiskEncryptionPtrType)(v) } func (*replicatedVMManagedDiskTargetDiskEncryptionPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ReplicatedVMManagedDiskTargetDiskEncryption)(nil)).Elem() } func (i *replicatedVMManagedDiskTargetDiskEncryptionPtrType) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return i.ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(context.Background()) } func (i *replicatedVMManagedDiskTargetDiskEncryptionPtrType) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) } type ReplicatedVMManagedDiskTargetDiskEncryptionOutput struct{ *pulumi.OutputState } func (ReplicatedVMManagedDiskTargetDiskEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*ReplicatedVMManagedDiskTargetDiskEncryption)(nil)).Elem() } func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionOutput() ReplicatedVMManagedDiskTargetDiskEncryptionOutput { return o } func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionOutput { return o } func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return o.ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(context.Background()) } func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ReplicatedVMManagedDiskTargetDiskEncryption) *ReplicatedVMManagedDiskTargetDiskEncryption { return &v }).(ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) } // A `diskEncryptionKey` block as defined below. func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) DiskEncryptionKey() ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput { return o.ApplyT(func(v ReplicatedVMManagedDiskTargetDiskEncryption) ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey { return v.DiskEncryptionKey }).(ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput) } // A `keyEncryptionKey` block as defined below. func (o ReplicatedVMManagedDiskTargetDiskEncryptionOutput) KeyEncryptionKey() ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyPtrOutput { return o.ApplyT(func(v ReplicatedVMManagedDiskTargetDiskEncryption) *ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKey { return v.KeyEncryptionKey }).(ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyPtrOutput) } type ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput struct{ *pulumi.OutputState } func (ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ReplicatedVMManagedDiskTargetDiskEncryption)(nil)).Elem() } func (o ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput() ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return o } func (o ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) ToReplicatedVMManagedDiskTargetDiskEncryptionPtrOutputWithContext(ctx context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput { return o } func (o ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) Elem() ReplicatedVMManagedDiskTargetDiskEncryptionOutput { return o.ApplyT(func(v *ReplicatedVMManagedDiskTargetDiskEncryption) ReplicatedVMManagedDiskTargetDiskEncryption { if v != nil { return *v } var ret ReplicatedVMManagedDiskTargetDiskEncryption return ret }).(ReplicatedVMManagedDiskTargetDiskEncryptionOutput) } // A `diskEncryptionKey` block as defined below. func (o ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) DiskEncryptionKey() ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyPtrOutput { return o.ApplyT(func(v *ReplicatedVMManagedDiskTargetDiskEncryption) *ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey { if v == nil { return nil } return &v.DiskEncryptionKey }).(ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyPtrOutput) } // A `keyEncryptionKey` block as defined below. func (o ReplicatedVMManagedDiskTargetDiskEncryptionPtrOutput) KeyEncryptionKey() ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyPtrOutput { return o.ApplyT(func(v *ReplicatedVMManagedDiskTargetDiskEncryption) *ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKey { if v == nil { return nil } return v.KeyEncryptionKey }).(ReplicatedVMManagedDiskTargetDiskEncryptionKeyEncryptionKeyPtrOutput) } type ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey struct { // The URL to the Key Vault Secret used as the Disk Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Secret` resource. Changing this forces a new resource to be created. SecretUrl string `pulumi:"secretUrl"` // The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. VaultId string `pulumi:"vaultId"` } // ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyInput is an input type that accepts ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs and ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput values. // You can construct a concrete instance of `ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyInput` via: // // ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs{...} type ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyInput interface { pulumi.Input ToReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput() ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput ToReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutputWithContext(context.Context) ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyOutput } type ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs struct { // The URL to the Key Vault Secret used as the Disk Encryption Key that the Managed Disk will be associated with. This can be found as `id` on the `keyvault.Secret` resource. Changing this forces a new resource to be created. SecretUrl pulumi.StringInput `pulumi:"secretUrl"` // The ID of the Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. Changing this forces a new resource to be created. VaultId pulumi.StringInput `pulumi:"vaultId"` } func (ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*ReplicatedVMManagedDiskTargetDiskEncryptionDiskEncryptionKey)(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/siterecovery/vmwareReplicationPolicyAssociation.go
sdk/go/azure/siterecovery/vmwareReplicationPolicyAssociation.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 siterecovery 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 Site Recovery replication policy for VMWare within a Recovery Vault. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleVMWareReplicationPolicy, err := siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{ // Name: pulumi.String("example-policy"), // RecoveryVaultId: exampleVault.ID(), // RecoveryPointRetentionInMinutes: pulumi.Int(1440), // ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240), // }) // if err != nil { // return err // } // _, err = siterecovery.NewVmwareReplicationPolicyAssociation(ctx, "example", &siterecovery.VmwareReplicationPolicyAssociationArgs{ // Name: pulumi.String("example-association"), // RecoveryVaultId: exampleVault.ID(), // PolicyId: exampleVMWareReplicationPolicy.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Replication Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/site-name/replicationProtectionContainers/container-name/replicationProtectionContainerMappings/mapping-name // ``` type VmwareReplicationPolicyAssociation struct { pulumi.CustomResourceState // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringOutput `pulumi:"policyId"` // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` } // NewVmwareReplicationPolicyAssociation registers a new resource with the given unique name, arguments, and options. func NewVmwareReplicationPolicyAssociation(ctx *pulumi.Context, name string, args *VmwareReplicationPolicyAssociationArgs, opts ...pulumi.ResourceOption) (*VmwareReplicationPolicyAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PolicyId == nil { return nil, errors.New("invalid value for required argument 'PolicyId'") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VmwareReplicationPolicyAssociation err := ctx.RegisterResource("azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVmwareReplicationPolicyAssociation gets an existing VmwareReplicationPolicyAssociation 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 GetVmwareReplicationPolicyAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VmwareReplicationPolicyAssociationState, opts ...pulumi.ResourceOption) (*VmwareReplicationPolicyAssociation, error) { var resource VmwareReplicationPolicyAssociation err := ctx.ReadResource("azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VmwareReplicationPolicyAssociation resources. type vmwareReplicationPolicyAssociationState struct { // The name of the replication policy association. Changing this forces a new association to be created. Name *string `pulumi:"name"` // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. PolicyId *string `pulumi:"policyId"` // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` } type VmwareReplicationPolicyAssociationState struct { // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringPtrInput // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringPtrInput // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. RecoveryVaultId pulumi.StringPtrInput } func (VmwareReplicationPolicyAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*vmwareReplicationPolicyAssociationState)(nil)).Elem() } type vmwareReplicationPolicyAssociationArgs struct { // The name of the replication policy association. Changing this forces a new association to be created. Name *string `pulumi:"name"` // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. PolicyId string `pulumi:"policyId"` // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` } // The set of arguments for constructing a VmwareReplicationPolicyAssociation resource. type VmwareReplicationPolicyAssociationArgs struct { // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringPtrInput // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringInput // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. RecoveryVaultId pulumi.StringInput } func (VmwareReplicationPolicyAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*vmwareReplicationPolicyAssociationArgs)(nil)).Elem() } type VmwareReplicationPolicyAssociationInput interface { pulumi.Input ToVmwareReplicationPolicyAssociationOutput() VmwareReplicationPolicyAssociationOutput ToVmwareReplicationPolicyAssociationOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationOutput } func (*VmwareReplicationPolicyAssociation) ElementType() reflect.Type { return reflect.TypeOf((**VmwareReplicationPolicyAssociation)(nil)).Elem() } func (i *VmwareReplicationPolicyAssociation) ToVmwareReplicationPolicyAssociationOutput() VmwareReplicationPolicyAssociationOutput { return i.ToVmwareReplicationPolicyAssociationOutputWithContext(context.Background()) } func (i *VmwareReplicationPolicyAssociation) ToVmwareReplicationPolicyAssociationOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(VmwareReplicationPolicyAssociationOutput) } // VmwareReplicationPolicyAssociationArrayInput is an input type that accepts VmwareReplicationPolicyAssociationArray and VmwareReplicationPolicyAssociationArrayOutput values. // You can construct a concrete instance of `VmwareReplicationPolicyAssociationArrayInput` via: // // VmwareReplicationPolicyAssociationArray{ VmwareReplicationPolicyAssociationArgs{...} } type VmwareReplicationPolicyAssociationArrayInput interface { pulumi.Input ToVmwareReplicationPolicyAssociationArrayOutput() VmwareReplicationPolicyAssociationArrayOutput ToVmwareReplicationPolicyAssociationArrayOutputWithContext(context.Context) VmwareReplicationPolicyAssociationArrayOutput } type VmwareReplicationPolicyAssociationArray []VmwareReplicationPolicyAssociationInput func (VmwareReplicationPolicyAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VmwareReplicationPolicyAssociation)(nil)).Elem() } func (i VmwareReplicationPolicyAssociationArray) ToVmwareReplicationPolicyAssociationArrayOutput() VmwareReplicationPolicyAssociationArrayOutput { return i.ToVmwareReplicationPolicyAssociationArrayOutputWithContext(context.Background()) } func (i VmwareReplicationPolicyAssociationArray) ToVmwareReplicationPolicyAssociationArrayOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VmwareReplicationPolicyAssociationArrayOutput) } // VmwareReplicationPolicyAssociationMapInput is an input type that accepts VmwareReplicationPolicyAssociationMap and VmwareReplicationPolicyAssociationMapOutput values. // You can construct a concrete instance of `VmwareReplicationPolicyAssociationMapInput` via: // // VmwareReplicationPolicyAssociationMap{ "key": VmwareReplicationPolicyAssociationArgs{...} } type VmwareReplicationPolicyAssociationMapInput interface { pulumi.Input ToVmwareReplicationPolicyAssociationMapOutput() VmwareReplicationPolicyAssociationMapOutput ToVmwareReplicationPolicyAssociationMapOutputWithContext(context.Context) VmwareReplicationPolicyAssociationMapOutput } type VmwareReplicationPolicyAssociationMap map[string]VmwareReplicationPolicyAssociationInput func (VmwareReplicationPolicyAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VmwareReplicationPolicyAssociation)(nil)).Elem() } func (i VmwareReplicationPolicyAssociationMap) ToVmwareReplicationPolicyAssociationMapOutput() VmwareReplicationPolicyAssociationMapOutput { return i.ToVmwareReplicationPolicyAssociationMapOutputWithContext(context.Background()) } func (i VmwareReplicationPolicyAssociationMap) ToVmwareReplicationPolicyAssociationMapOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VmwareReplicationPolicyAssociationMapOutput) } type VmwareReplicationPolicyAssociationOutput struct{ *pulumi.OutputState } func (VmwareReplicationPolicyAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**VmwareReplicationPolicyAssociation)(nil)).Elem() } func (o VmwareReplicationPolicyAssociationOutput) ToVmwareReplicationPolicyAssociationOutput() VmwareReplicationPolicyAssociationOutput { return o } func (o VmwareReplicationPolicyAssociationOutput) ToVmwareReplicationPolicyAssociationOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationOutput { return o } // The name of the replication policy association. Changing this forces a new association to be created. func (o VmwareReplicationPolicyAssociationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VmwareReplicationPolicyAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created. func (o VmwareReplicationPolicyAssociationOutput) PolicyId() pulumi.StringOutput { return o.ApplyT(func(v *VmwareReplicationPolicyAssociation) pulumi.StringOutput { return v.PolicyId }).(pulumi.StringOutput) } // The ID of the Recovery Service Vault to which the policy should be associated. // Changing this forces a new association to be created. func (o VmwareReplicationPolicyAssociationOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *VmwareReplicationPolicyAssociation) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } type VmwareReplicationPolicyAssociationArrayOutput struct{ *pulumi.OutputState } func (VmwareReplicationPolicyAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VmwareReplicationPolicyAssociation)(nil)).Elem() } func (o VmwareReplicationPolicyAssociationArrayOutput) ToVmwareReplicationPolicyAssociationArrayOutput() VmwareReplicationPolicyAssociationArrayOutput { return o } func (o VmwareReplicationPolicyAssociationArrayOutput) ToVmwareReplicationPolicyAssociationArrayOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationArrayOutput { return o } func (o VmwareReplicationPolicyAssociationArrayOutput) Index(i pulumi.IntInput) VmwareReplicationPolicyAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VmwareReplicationPolicyAssociation { return vs[0].([]*VmwareReplicationPolicyAssociation)[vs[1].(int)] }).(VmwareReplicationPolicyAssociationOutput) } type VmwareReplicationPolicyAssociationMapOutput struct{ *pulumi.OutputState } func (VmwareReplicationPolicyAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VmwareReplicationPolicyAssociation)(nil)).Elem() } func (o VmwareReplicationPolicyAssociationMapOutput) ToVmwareReplicationPolicyAssociationMapOutput() VmwareReplicationPolicyAssociationMapOutput { return o } func (o VmwareReplicationPolicyAssociationMapOutput) ToVmwareReplicationPolicyAssociationMapOutputWithContext(ctx context.Context) VmwareReplicationPolicyAssociationMapOutput { return o } func (o VmwareReplicationPolicyAssociationMapOutput) MapIndex(k pulumi.StringInput) VmwareReplicationPolicyAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VmwareReplicationPolicyAssociation { return vs[0].(map[string]*VmwareReplicationPolicyAssociation)[vs[1].(string)] }).(VmwareReplicationPolicyAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VmwareReplicationPolicyAssociationInput)(nil)).Elem(), &VmwareReplicationPolicyAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*VmwareReplicationPolicyAssociationArrayInput)(nil)).Elem(), VmwareReplicationPolicyAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VmwareReplicationPolicyAssociationMapInput)(nil)).Elem(), VmwareReplicationPolicyAssociationMap{}) pulumi.RegisterOutputType(VmwareReplicationPolicyAssociationOutput{}) pulumi.RegisterOutputType(VmwareReplicationPolicyAssociationArrayOutput{}) pulumi.RegisterOutputType(VmwareReplicationPolicyAssociationMapOutput{}) }
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/siterecovery/getReplicationRecoveryPlan.go
sdk/go/azure/siterecovery/getReplicationRecoveryPlan.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 siterecovery import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Get information about an Azure Site Recovery Plan within a Recovery Services vault. A recovery plan gathers machines into recovery groups for the purpose of failover. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // vault, err := recoveryservices.LookupVault(ctx, &recoveryservices.LookupVaultArgs{ // Name: "tfex-recovery_vault", // ResourceGroupName: "tfex-resource_group", // }, nil) // if err != nil { // return err // } // _, err = siterecovery.LookupReplicationRecoveryPlan(ctx, &siterecovery.LookupReplicationRecoveryPlanArgs{ // Name: "example-recovery-plan", // RecoveryVaultId: vault.Id, // }, 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.RecoveryServices` - 2024-04-01 func LookupReplicationRecoveryPlan(ctx *pulumi.Context, args *LookupReplicationRecoveryPlanArgs, opts ...pulumi.InvokeOption) (*LookupReplicationRecoveryPlanResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupReplicationRecoveryPlanResult err := ctx.Invoke("azure:siterecovery/getReplicationRecoveryPlan:getReplicationRecoveryPlan", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getReplicationRecoveryPlan. type LookupReplicationRecoveryPlanArgs struct { // The name of the Replication Plan. Name string `pulumi:"name"` // The ID of the vault that should be updated. RecoveryVaultId string `pulumi:"recoveryVaultId"` } // A collection of values returned by getReplicationRecoveryPlan. type LookupReplicationRecoveryPlanResult struct { AzureToAzureSettings []GetReplicationRecoveryPlanAzureToAzureSetting `pulumi:"azureToAzureSettings"` FailoverDeploymentModel string `pulumi:"failoverDeploymentModel"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Name of the Action. Name string `pulumi:"name"` // `recoveryGroup` block defined as below. RecoveryGroups []GetReplicationRecoveryPlanRecoveryGroup `pulumi:"recoveryGroups"` RecoveryVaultId string `pulumi:"recoveryVaultId"` // The ID of source fabric to be recovered from. SourceRecoveryFabricId string `pulumi:"sourceRecoveryFabricId"` // The ID of target fabric to recover. TargetRecoveryFabricId string `pulumi:"targetRecoveryFabricId"` } func LookupReplicationRecoveryPlanOutput(ctx *pulumi.Context, args LookupReplicationRecoveryPlanOutputArgs, opts ...pulumi.InvokeOption) LookupReplicationRecoveryPlanResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupReplicationRecoveryPlanResultOutput, error) { args := v.(LookupReplicationRecoveryPlanArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:siterecovery/getReplicationRecoveryPlan:getReplicationRecoveryPlan", args, LookupReplicationRecoveryPlanResultOutput{}, options).(LookupReplicationRecoveryPlanResultOutput), nil }).(LookupReplicationRecoveryPlanResultOutput) } // A collection of arguments for invoking getReplicationRecoveryPlan. type LookupReplicationRecoveryPlanOutputArgs struct { // The name of the Replication Plan. Name pulumi.StringInput `pulumi:"name"` // The ID of the vault that should be updated. RecoveryVaultId pulumi.StringInput `pulumi:"recoveryVaultId"` } func (LookupReplicationRecoveryPlanOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupReplicationRecoveryPlanArgs)(nil)).Elem() } // A collection of values returned by getReplicationRecoveryPlan. type LookupReplicationRecoveryPlanResultOutput struct{ *pulumi.OutputState } func (LookupReplicationRecoveryPlanResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupReplicationRecoveryPlanResult)(nil)).Elem() } func (o LookupReplicationRecoveryPlanResultOutput) ToLookupReplicationRecoveryPlanResultOutput() LookupReplicationRecoveryPlanResultOutput { return o } func (o LookupReplicationRecoveryPlanResultOutput) ToLookupReplicationRecoveryPlanResultOutputWithContext(ctx context.Context) LookupReplicationRecoveryPlanResultOutput { return o } func (o LookupReplicationRecoveryPlanResultOutput) AzureToAzureSettings() GetReplicationRecoveryPlanAzureToAzureSettingArrayOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) []GetReplicationRecoveryPlanAzureToAzureSetting { return v.AzureToAzureSettings }).(GetReplicationRecoveryPlanAzureToAzureSettingArrayOutput) } func (o LookupReplicationRecoveryPlanResultOutput) FailoverDeploymentModel() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.FailoverDeploymentModel }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupReplicationRecoveryPlanResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.Id }).(pulumi.StringOutput) } // Name of the Action. func (o LookupReplicationRecoveryPlanResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.Name }).(pulumi.StringOutput) } // `recoveryGroup` block defined as below. func (o LookupReplicationRecoveryPlanResultOutput) RecoveryGroups() GetReplicationRecoveryPlanRecoveryGroupArrayOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) []GetReplicationRecoveryPlanRecoveryGroup { return v.RecoveryGroups }).(GetReplicationRecoveryPlanRecoveryGroupArrayOutput) } func (o LookupReplicationRecoveryPlanResultOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.RecoveryVaultId }).(pulumi.StringOutput) } // The ID of source fabric to be recovered from. func (o LookupReplicationRecoveryPlanResultOutput) SourceRecoveryFabricId() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.SourceRecoveryFabricId }).(pulumi.StringOutput) } // The ID of target fabric to recover. func (o LookupReplicationRecoveryPlanResultOutput) TargetRecoveryFabricId() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationRecoveryPlanResult) string { return v.TargetRecoveryFabricId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupReplicationRecoveryPlanResultOutput{}) }
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/siterecovery/networkMapping.go
sdk/go/azure/siterecovery/networkMapping.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a site recovery network mapping on Azure. A network mapping decides how to translate connected networks when a VM is migrated from one region to another. // // ## 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/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // primaryFabric, err := siterecovery.NewFabric(ctx, "primary", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.Location, // }) // if err != nil { // return err // } // _, err = siterecovery.NewFabric(ctx, "secondary", &siterecovery.FabricArgs{ // Name: pulumi.String("secondary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: secondary.Location, // }, pulumi.DependsOn([]pulumi.Resource{ // primaryFabric, // })) // if err != nil { // return err // } // primaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "primary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network1"), // ResourceGroupName: primary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // Location: primary.Location, // }) // if err != nil { // return err // } // secondaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "secondary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network2"), // ResourceGroupName: secondary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // Location: secondary.Location, // }) // if err != nil { // return err // } // _, err = siterecovery.NewNetworkMapping(ctx, "recovery-mapping", &siterecovery.NetworkMappingArgs{ // Name: pulumi.String("recovery-network-mapping-1"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // SourceRecoveryFabricName: pulumi.String("primary-fabric"), // TargetRecoveryFabricName: pulumi.String("secondary-fabric"), // SourceNetworkId: primaryVirtualNetwork.ID(), // TargetNetworkId: secondaryVirtualNetwork.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Network Mapping can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/networkMapping:NetworkMapping mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/primary-fabric-name/replicationNetworks/azureNetwork/replicationNetworkMappings/mapping-name // ``` type NetworkMapping struct { pulumi.CustomResourceState // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The id of the primary network. Changing this forces a new resource to be created. SourceNetworkId pulumi.StringOutput `pulumi:"sourceNetworkId"` // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringOutput `pulumi:"sourceRecoveryFabricName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringOutput `pulumi:"targetNetworkId"` // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. TargetRecoveryFabricName pulumi.StringOutput `pulumi:"targetRecoveryFabricName"` } // NewNetworkMapping registers a new resource with the given unique name, arguments, and options. func NewNetworkMapping(ctx *pulumi.Context, name string, args *NetworkMappingArgs, opts ...pulumi.ResourceOption) (*NetworkMapping, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SourceNetworkId == nil { return nil, errors.New("invalid value for required argument 'SourceNetworkId'") } if args.SourceRecoveryFabricName == nil { return nil, errors.New("invalid value for required argument 'SourceRecoveryFabricName'") } if args.TargetNetworkId == nil { return nil, errors.New("invalid value for required argument 'TargetNetworkId'") } if args.TargetRecoveryFabricName == nil { return nil, errors.New("invalid value for required argument 'TargetRecoveryFabricName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkMapping err := ctx.RegisterResource("azure:siterecovery/networkMapping:NetworkMapping", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkMapping gets an existing NetworkMapping 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 GetNetworkMapping(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkMappingState, opts ...pulumi.ResourceOption) (*NetworkMapping, error) { var resource NetworkMapping err := ctx.ReadResource("azure:siterecovery/networkMapping:NetworkMapping", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkMapping resources. type networkMappingState struct { // The name of the network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The id of the primary network. Changing this forces a new resource to be created. SourceNetworkId *string `pulumi:"sourceNetworkId"` // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. SourceRecoveryFabricName *string `pulumi:"sourceRecoveryFabricName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId *string `pulumi:"targetNetworkId"` // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. TargetRecoveryFabricName *string `pulumi:"targetRecoveryFabricName"` } type NetworkMappingState struct { // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The id of the primary network. Changing this forces a new resource to be created. SourceNetworkId pulumi.StringPtrInput // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringPtrInput // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringPtrInput // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. TargetRecoveryFabricName pulumi.StringPtrInput } func (NetworkMappingState) ElementType() reflect.Type { return reflect.TypeOf((*networkMappingState)(nil)).Elem() } type networkMappingArgs struct { // The name of the network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The id of the primary network. Changing this forces a new resource to be created. SourceNetworkId string `pulumi:"sourceNetworkId"` // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. SourceRecoveryFabricName string `pulumi:"sourceRecoveryFabricName"` // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId string `pulumi:"targetNetworkId"` // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. TargetRecoveryFabricName string `pulumi:"targetRecoveryFabricName"` } // The set of arguments for constructing a NetworkMapping resource. type NetworkMappingArgs struct { // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The id of the primary network. Changing this forces a new resource to be created. SourceNetworkId pulumi.StringInput // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringInput // The id of the recovery network. Changing this forces a new resource to be created. TargetNetworkId pulumi.StringInput // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. TargetRecoveryFabricName pulumi.StringInput } func (NetworkMappingArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkMappingArgs)(nil)).Elem() } type NetworkMappingInput interface { pulumi.Input ToNetworkMappingOutput() NetworkMappingOutput ToNetworkMappingOutputWithContext(ctx context.Context) NetworkMappingOutput } func (*NetworkMapping) ElementType() reflect.Type { return reflect.TypeOf((**NetworkMapping)(nil)).Elem() } func (i *NetworkMapping) ToNetworkMappingOutput() NetworkMappingOutput { return i.ToNetworkMappingOutputWithContext(context.Background()) } func (i *NetworkMapping) ToNetworkMappingOutputWithContext(ctx context.Context) NetworkMappingOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkMappingOutput) } // NetworkMappingArrayInput is an input type that accepts NetworkMappingArray and NetworkMappingArrayOutput values. // You can construct a concrete instance of `NetworkMappingArrayInput` via: // // NetworkMappingArray{ NetworkMappingArgs{...} } type NetworkMappingArrayInput interface { pulumi.Input ToNetworkMappingArrayOutput() NetworkMappingArrayOutput ToNetworkMappingArrayOutputWithContext(context.Context) NetworkMappingArrayOutput } type NetworkMappingArray []NetworkMappingInput func (NetworkMappingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkMapping)(nil)).Elem() } func (i NetworkMappingArray) ToNetworkMappingArrayOutput() NetworkMappingArrayOutput { return i.ToNetworkMappingArrayOutputWithContext(context.Background()) } func (i NetworkMappingArray) ToNetworkMappingArrayOutputWithContext(ctx context.Context) NetworkMappingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkMappingArrayOutput) } // NetworkMappingMapInput is an input type that accepts NetworkMappingMap and NetworkMappingMapOutput values. // You can construct a concrete instance of `NetworkMappingMapInput` via: // // NetworkMappingMap{ "key": NetworkMappingArgs{...} } type NetworkMappingMapInput interface { pulumi.Input ToNetworkMappingMapOutput() NetworkMappingMapOutput ToNetworkMappingMapOutputWithContext(context.Context) NetworkMappingMapOutput } type NetworkMappingMap map[string]NetworkMappingInput func (NetworkMappingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkMapping)(nil)).Elem() } func (i NetworkMappingMap) ToNetworkMappingMapOutput() NetworkMappingMapOutput { return i.ToNetworkMappingMapOutputWithContext(context.Background()) } func (i NetworkMappingMap) ToNetworkMappingMapOutputWithContext(ctx context.Context) NetworkMappingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkMappingMapOutput) } type NetworkMappingOutput struct{ *pulumi.OutputState } func (NetworkMappingOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkMapping)(nil)).Elem() } func (o NetworkMappingOutput) ToNetworkMappingOutput() NetworkMappingOutput { return o } func (o NetworkMappingOutput) ToNetworkMappingOutputWithContext(ctx context.Context) NetworkMappingOutput { return o } // The name of the network mapping. Changing this forces a new resource to be created. func (o NetworkMappingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the vault that should be updated. Changing this forces a new resource to be created. func (o NetworkMappingOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. func (o NetworkMappingOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The id of the primary network. Changing this forces a new resource to be created. func (o NetworkMappingOutput) SourceNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.SourceNetworkId }).(pulumi.StringOutput) } // Specifies the ASR fabric where mapping should be created. Changing this forces a new resource to be created. func (o NetworkMappingOutput) SourceRecoveryFabricName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.SourceRecoveryFabricName }).(pulumi.StringOutput) } // The id of the recovery network. Changing this forces a new resource to be created. func (o NetworkMappingOutput) TargetNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.TargetNetworkId }).(pulumi.StringOutput) } // The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created. func (o NetworkMappingOutput) TargetRecoveryFabricName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkMapping) pulumi.StringOutput { return v.TargetRecoveryFabricName }).(pulumi.StringOutput) } type NetworkMappingArrayOutput struct{ *pulumi.OutputState } func (NetworkMappingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkMapping)(nil)).Elem() } func (o NetworkMappingArrayOutput) ToNetworkMappingArrayOutput() NetworkMappingArrayOutput { return o } func (o NetworkMappingArrayOutput) ToNetworkMappingArrayOutputWithContext(ctx context.Context) NetworkMappingArrayOutput { return o } func (o NetworkMappingArrayOutput) Index(i pulumi.IntInput) NetworkMappingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkMapping { return vs[0].([]*NetworkMapping)[vs[1].(int)] }).(NetworkMappingOutput) } type NetworkMappingMapOutput struct{ *pulumi.OutputState } func (NetworkMappingMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkMapping)(nil)).Elem() } func (o NetworkMappingMapOutput) ToNetworkMappingMapOutput() NetworkMappingMapOutput { return o } func (o NetworkMappingMapOutput) ToNetworkMappingMapOutputWithContext(ctx context.Context) NetworkMappingMapOutput { return o } func (o NetworkMappingMapOutput) MapIndex(k pulumi.StringInput) NetworkMappingOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkMapping { return vs[0].(map[string]*NetworkMapping)[vs[1].(string)] }).(NetworkMappingOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkMappingInput)(nil)).Elem(), &NetworkMapping{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkMappingArrayInput)(nil)).Elem(), NetworkMappingArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkMappingMapInput)(nil)).Elem(), NetworkMappingMap{}) pulumi.RegisterOutputType(NetworkMappingOutput{}) pulumi.RegisterOutputType(NetworkMappingArrayOutput{}) pulumi.RegisterOutputType(NetworkMappingMapOutput{}) }
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/siterecovery/hyperVReplicationPolicyAssociation.go
sdk/go/azure/siterecovery/hyperVReplicationPolicyAssociation.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 siterecovery 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 Site Recovery replication policy for HyperV within a Recovery Vault. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleHyperVSite, err := siterecovery.NewHyperVSite(ctx, "example", &siterecovery.HyperVSiteArgs{ // RecoveryVaultId: exampleVault.ID(), // Name: pulumi.String("example-site"), // }) // if err != nil { // return err // } // exampleHyperVReplicationPolicy, err := siterecovery.NewHyperVReplicationPolicy(ctx, "example", &siterecovery.HyperVReplicationPolicyArgs{ // Name: pulumi.String("policy"), // RecoveryVaultId: exampleVault.ID(), // RecoveryPointRetentionInHours: pulumi.Int(2), // ApplicationConsistentSnapshotFrequencyInHours: pulumi.Int(1), // ReplicationIntervalInSeconds: pulumi.Int(300), // }) // if err != nil { // return err // } // _, err = siterecovery.NewHyperVReplicationPolicyAssociation(ctx, "example", &siterecovery.HyperVReplicationPolicyAssociationArgs{ // Name: pulumi.String("example-association"), // HypervSiteId: exampleHyperVSite.ID(), // PolicyId: exampleHyperVReplicationPolicy.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Replication Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/hyperVReplicationPolicyAssociation:HyperVReplicationPolicyAssociation azurerm_site_recovery_hyperv_replication_policy_association.mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/site-name/replicationProtectionContainers/container-name/replicationProtectionContainerMappings/mapping-name // ``` type HyperVReplicationPolicyAssociation struct { pulumi.CustomResourceState // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. HypervSiteId pulumi.StringOutput `pulumi:"hypervSiteId"` // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringOutput `pulumi:"policyId"` } // NewHyperVReplicationPolicyAssociation registers a new resource with the given unique name, arguments, and options. func NewHyperVReplicationPolicyAssociation(ctx *pulumi.Context, name string, args *HyperVReplicationPolicyAssociationArgs, opts ...pulumi.ResourceOption) (*HyperVReplicationPolicyAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.HypervSiteId == nil { return nil, errors.New("invalid value for required argument 'HypervSiteId'") } if args.PolicyId == nil { return nil, errors.New("invalid value for required argument 'PolicyId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource HyperVReplicationPolicyAssociation err := ctx.RegisterResource("azure:siterecovery/hyperVReplicationPolicyAssociation:HyperVReplicationPolicyAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHyperVReplicationPolicyAssociation gets an existing HyperVReplicationPolicyAssociation 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 GetHyperVReplicationPolicyAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HyperVReplicationPolicyAssociationState, opts ...pulumi.ResourceOption) (*HyperVReplicationPolicyAssociation, error) { var resource HyperVReplicationPolicyAssociation err := ctx.ReadResource("azure:siterecovery/hyperVReplicationPolicyAssociation:HyperVReplicationPolicyAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering HyperVReplicationPolicyAssociation resources. type hyperVReplicationPolicyAssociationState struct { // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. HypervSiteId *string `pulumi:"hypervSiteId"` // The name of the replication policy association. Changing this forces a new association to be created. Name *string `pulumi:"name"` // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. PolicyId *string `pulumi:"policyId"` } type HyperVReplicationPolicyAssociationState struct { // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. HypervSiteId pulumi.StringPtrInput // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringPtrInput // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringPtrInput } func (HyperVReplicationPolicyAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*hyperVReplicationPolicyAssociationState)(nil)).Elem() } type hyperVReplicationPolicyAssociationArgs struct { // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. HypervSiteId string `pulumi:"hypervSiteId"` // The name of the replication policy association. Changing this forces a new association to be created. Name *string `pulumi:"name"` // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. PolicyId string `pulumi:"policyId"` } // The set of arguments for constructing a HyperVReplicationPolicyAssociation resource. type HyperVReplicationPolicyAssociationArgs struct { // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. HypervSiteId pulumi.StringInput // The name of the replication policy association. Changing this forces a new association to be created. Name pulumi.StringPtrInput // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. PolicyId pulumi.StringInput } func (HyperVReplicationPolicyAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*hyperVReplicationPolicyAssociationArgs)(nil)).Elem() } type HyperVReplicationPolicyAssociationInput interface { pulumi.Input ToHyperVReplicationPolicyAssociationOutput() HyperVReplicationPolicyAssociationOutput ToHyperVReplicationPolicyAssociationOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationOutput } func (*HyperVReplicationPolicyAssociation) ElementType() reflect.Type { return reflect.TypeOf((**HyperVReplicationPolicyAssociation)(nil)).Elem() } func (i *HyperVReplicationPolicyAssociation) ToHyperVReplicationPolicyAssociationOutput() HyperVReplicationPolicyAssociationOutput { return i.ToHyperVReplicationPolicyAssociationOutputWithContext(context.Background()) } func (i *HyperVReplicationPolicyAssociation) ToHyperVReplicationPolicyAssociationOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyAssociationOutput) } // HyperVReplicationPolicyAssociationArrayInput is an input type that accepts HyperVReplicationPolicyAssociationArray and HyperVReplicationPolicyAssociationArrayOutput values. // You can construct a concrete instance of `HyperVReplicationPolicyAssociationArrayInput` via: // // HyperVReplicationPolicyAssociationArray{ HyperVReplicationPolicyAssociationArgs{...} } type HyperVReplicationPolicyAssociationArrayInput interface { pulumi.Input ToHyperVReplicationPolicyAssociationArrayOutput() HyperVReplicationPolicyAssociationArrayOutput ToHyperVReplicationPolicyAssociationArrayOutputWithContext(context.Context) HyperVReplicationPolicyAssociationArrayOutput } type HyperVReplicationPolicyAssociationArray []HyperVReplicationPolicyAssociationInput func (HyperVReplicationPolicyAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVReplicationPolicyAssociation)(nil)).Elem() } func (i HyperVReplicationPolicyAssociationArray) ToHyperVReplicationPolicyAssociationArrayOutput() HyperVReplicationPolicyAssociationArrayOutput { return i.ToHyperVReplicationPolicyAssociationArrayOutputWithContext(context.Background()) } func (i HyperVReplicationPolicyAssociationArray) ToHyperVReplicationPolicyAssociationArrayOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyAssociationArrayOutput) } // HyperVReplicationPolicyAssociationMapInput is an input type that accepts HyperVReplicationPolicyAssociationMap and HyperVReplicationPolicyAssociationMapOutput values. // You can construct a concrete instance of `HyperVReplicationPolicyAssociationMapInput` via: // // HyperVReplicationPolicyAssociationMap{ "key": HyperVReplicationPolicyAssociationArgs{...} } type HyperVReplicationPolicyAssociationMapInput interface { pulumi.Input ToHyperVReplicationPolicyAssociationMapOutput() HyperVReplicationPolicyAssociationMapOutput ToHyperVReplicationPolicyAssociationMapOutputWithContext(context.Context) HyperVReplicationPolicyAssociationMapOutput } type HyperVReplicationPolicyAssociationMap map[string]HyperVReplicationPolicyAssociationInput func (HyperVReplicationPolicyAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVReplicationPolicyAssociation)(nil)).Elem() } func (i HyperVReplicationPolicyAssociationMap) ToHyperVReplicationPolicyAssociationMapOutput() HyperVReplicationPolicyAssociationMapOutput { return i.ToHyperVReplicationPolicyAssociationMapOutputWithContext(context.Background()) } func (i HyperVReplicationPolicyAssociationMap) ToHyperVReplicationPolicyAssociationMapOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyAssociationMapOutput) } type HyperVReplicationPolicyAssociationOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**HyperVReplicationPolicyAssociation)(nil)).Elem() } func (o HyperVReplicationPolicyAssociationOutput) ToHyperVReplicationPolicyAssociationOutput() HyperVReplicationPolicyAssociationOutput { return o } func (o HyperVReplicationPolicyAssociationOutput) ToHyperVReplicationPolicyAssociationOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationOutput { return o } // The ID of the HyperV site to which the policy should be associated. Changing this forces a new association to be created. func (o HyperVReplicationPolicyAssociationOutput) HypervSiteId() pulumi.StringOutput { return o.ApplyT(func(v *HyperVReplicationPolicyAssociation) pulumi.StringOutput { return v.HypervSiteId }).(pulumi.StringOutput) } // The name of the replication policy association. Changing this forces a new association to be created. func (o HyperVReplicationPolicyAssociationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *HyperVReplicationPolicyAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the HyperV replication policy which to be associated. Changing this forces a new association to be created. func (o HyperVReplicationPolicyAssociationOutput) PolicyId() pulumi.StringOutput { return o.ApplyT(func(v *HyperVReplicationPolicyAssociation) pulumi.StringOutput { return v.PolicyId }).(pulumi.StringOutput) } type HyperVReplicationPolicyAssociationArrayOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVReplicationPolicyAssociation)(nil)).Elem() } func (o HyperVReplicationPolicyAssociationArrayOutput) ToHyperVReplicationPolicyAssociationArrayOutput() HyperVReplicationPolicyAssociationArrayOutput { return o } func (o HyperVReplicationPolicyAssociationArrayOutput) ToHyperVReplicationPolicyAssociationArrayOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationArrayOutput { return o } func (o HyperVReplicationPolicyAssociationArrayOutput) Index(i pulumi.IntInput) HyperVReplicationPolicyAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HyperVReplicationPolicyAssociation { return vs[0].([]*HyperVReplicationPolicyAssociation)[vs[1].(int)] }).(HyperVReplicationPolicyAssociationOutput) } type HyperVReplicationPolicyAssociationMapOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVReplicationPolicyAssociation)(nil)).Elem() } func (o HyperVReplicationPolicyAssociationMapOutput) ToHyperVReplicationPolicyAssociationMapOutput() HyperVReplicationPolicyAssociationMapOutput { return o } func (o HyperVReplicationPolicyAssociationMapOutput) ToHyperVReplicationPolicyAssociationMapOutputWithContext(ctx context.Context) HyperVReplicationPolicyAssociationMapOutput { return o } func (o HyperVReplicationPolicyAssociationMapOutput) MapIndex(k pulumi.StringInput) HyperVReplicationPolicyAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HyperVReplicationPolicyAssociation { return vs[0].(map[string]*HyperVReplicationPolicyAssociation)[vs[1].(string)] }).(HyperVReplicationPolicyAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyAssociationInput)(nil)).Elem(), &HyperVReplicationPolicyAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyAssociationArrayInput)(nil)).Elem(), HyperVReplicationPolicyAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyAssociationMapInput)(nil)).Elem(), HyperVReplicationPolicyAssociationMap{}) pulumi.RegisterOutputType(HyperVReplicationPolicyAssociationOutput{}) pulumi.RegisterOutputType(HyperVReplicationPolicyAssociationArrayOutput{}) pulumi.RegisterOutputType(HyperVReplicationPolicyAssociationMapOutput{}) }
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/siterecovery/hyperVSite.go
sdk/go/azure/siterecovery/hyperVSite.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a HyperV Site in Recovery Service Vault. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("eastus"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // SoftDeleteEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // _, err = siterecovery.NewHyperVSite(ctx, "example", &siterecovery.HyperVSiteArgs{ // Name: pulumi.String("example-site"), // RecoveryVaultId: exampleVault.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.RecoveryServices` - 2024-04-01 // // ## Import // // Recovery Services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/hyperVSite:HyperVSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/fabric1 // ``` type HyperVSite struct { pulumi.CustomResourceState // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` } // NewHyperVSite registers a new resource with the given unique name, arguments, and options. func NewHyperVSite(ctx *pulumi.Context, name string, args *HyperVSiteArgs, opts ...pulumi.ResourceOption) (*HyperVSite, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource HyperVSite err := ctx.RegisterResource("azure:siterecovery/hyperVSite:HyperVSite", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHyperVSite gets an existing HyperVSite 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 GetHyperVSite(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HyperVSiteState, opts ...pulumi.ResourceOption) (*HyperVSite, error) { var resource HyperVSite err := ctx.ReadResource("azure:siterecovery/hyperVSite:HyperVSite", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering HyperVSite resources. type hyperVSiteState struct { // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. Name *string `pulumi:"name"` // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` } type HyperVSiteState struct { // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. Name pulumi.StringPtrInput // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. RecoveryVaultId pulumi.StringPtrInput } func (HyperVSiteState) ElementType() reflect.Type { return reflect.TypeOf((*hyperVSiteState)(nil)).Elem() } type hyperVSiteArgs struct { // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. Name *string `pulumi:"name"` // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` } // The set of arguments for constructing a HyperVSite resource. type HyperVSiteArgs struct { // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. Name pulumi.StringPtrInput // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. RecoveryVaultId pulumi.StringInput } func (HyperVSiteArgs) ElementType() reflect.Type { return reflect.TypeOf((*hyperVSiteArgs)(nil)).Elem() } type HyperVSiteInput interface { pulumi.Input ToHyperVSiteOutput() HyperVSiteOutput ToHyperVSiteOutputWithContext(ctx context.Context) HyperVSiteOutput } func (*HyperVSite) ElementType() reflect.Type { return reflect.TypeOf((**HyperVSite)(nil)).Elem() } func (i *HyperVSite) ToHyperVSiteOutput() HyperVSiteOutput { return i.ToHyperVSiteOutputWithContext(context.Background()) } func (i *HyperVSite) ToHyperVSiteOutputWithContext(ctx context.Context) HyperVSiteOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVSiteOutput) } // HyperVSiteArrayInput is an input type that accepts HyperVSiteArray and HyperVSiteArrayOutput values. // You can construct a concrete instance of `HyperVSiteArrayInput` via: // // HyperVSiteArray{ HyperVSiteArgs{...} } type HyperVSiteArrayInput interface { pulumi.Input ToHyperVSiteArrayOutput() HyperVSiteArrayOutput ToHyperVSiteArrayOutputWithContext(context.Context) HyperVSiteArrayOutput } type HyperVSiteArray []HyperVSiteInput func (HyperVSiteArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVSite)(nil)).Elem() } func (i HyperVSiteArray) ToHyperVSiteArrayOutput() HyperVSiteArrayOutput { return i.ToHyperVSiteArrayOutputWithContext(context.Background()) } func (i HyperVSiteArray) ToHyperVSiteArrayOutputWithContext(ctx context.Context) HyperVSiteArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVSiteArrayOutput) } // HyperVSiteMapInput is an input type that accepts HyperVSiteMap and HyperVSiteMapOutput values. // You can construct a concrete instance of `HyperVSiteMapInput` via: // // HyperVSiteMap{ "key": HyperVSiteArgs{...} } type HyperVSiteMapInput interface { pulumi.Input ToHyperVSiteMapOutput() HyperVSiteMapOutput ToHyperVSiteMapOutputWithContext(context.Context) HyperVSiteMapOutput } type HyperVSiteMap map[string]HyperVSiteInput func (HyperVSiteMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVSite)(nil)).Elem() } func (i HyperVSiteMap) ToHyperVSiteMapOutput() HyperVSiteMapOutput { return i.ToHyperVSiteMapOutputWithContext(context.Background()) } func (i HyperVSiteMap) ToHyperVSiteMapOutputWithContext(ctx context.Context) HyperVSiteMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVSiteMapOutput) } type HyperVSiteOutput struct{ *pulumi.OutputState } func (HyperVSiteOutput) ElementType() reflect.Type { return reflect.TypeOf((**HyperVSite)(nil)).Elem() } func (o HyperVSiteOutput) ToHyperVSiteOutput() HyperVSiteOutput { return o } func (o HyperVSiteOutput) ToHyperVSiteOutputWithContext(ctx context.Context) HyperVSiteOutput { return o } // The name which should be used for this Recovery Service. Changing this forces a new Site to be created. func (o HyperVSiteOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *HyperVSite) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Recovery Services Vault where the Site created. Changing this forces a new Site to be created. func (o HyperVSiteOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *HyperVSite) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } type HyperVSiteArrayOutput struct{ *pulumi.OutputState } func (HyperVSiteArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVSite)(nil)).Elem() } func (o HyperVSiteArrayOutput) ToHyperVSiteArrayOutput() HyperVSiteArrayOutput { return o } func (o HyperVSiteArrayOutput) ToHyperVSiteArrayOutputWithContext(ctx context.Context) HyperVSiteArrayOutput { return o } func (o HyperVSiteArrayOutput) Index(i pulumi.IntInput) HyperVSiteOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HyperVSite { return vs[0].([]*HyperVSite)[vs[1].(int)] }).(HyperVSiteOutput) } type HyperVSiteMapOutput struct{ *pulumi.OutputState } func (HyperVSiteMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVSite)(nil)).Elem() } func (o HyperVSiteMapOutput) ToHyperVSiteMapOutput() HyperVSiteMapOutput { return o } func (o HyperVSiteMapOutput) ToHyperVSiteMapOutputWithContext(ctx context.Context) HyperVSiteMapOutput { return o } func (o HyperVSiteMapOutput) MapIndex(k pulumi.StringInput) HyperVSiteOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HyperVSite { return vs[0].(map[string]*HyperVSite)[vs[1].(string)] }).(HyperVSiteOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HyperVSiteInput)(nil)).Elem(), &HyperVSite{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVSiteArrayInput)(nil)).Elem(), HyperVSiteArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVSiteMapInput)(nil)).Elem(), HyperVSiteMap{}) pulumi.RegisterOutputType(HyperVSiteOutput{}) pulumi.RegisterOutputType(HyperVSiteArrayOutput{}) pulumi.RegisterOutputType(HyperVSiteMapOutput{}) }
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/siterecovery/replicationPolicy.go
sdk/go/azure/siterecovery/replicationPolicy.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Site Recovery replication policy within a recovery vault. Replication policies define the frequency at which recovery points are created and how long they are stored. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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("tfex-network-mapping-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = siterecovery.NewReplicationPolicy(ctx, "policy", &siterecovery.ReplicationPolicyArgs{ // Name: pulumi.String("policy"), // ResourceGroupName: example.Name, // RecoveryVaultName: vault.Name, // RecoveryPointRetentionInMinutes: int(24 * 60), // ApplicationConsistentSnapshotFrequencyInMinutes: int(4 * 60), // }) // 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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Replication Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/replicationPolicy:ReplicationPolicy mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationPolicies/policy-name // ``` type ReplicationPolicy struct { pulumi.CustomResourceState // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntOutput `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes pulumi.IntOutput `pulumi:"recoveryPointRetentionInMinutes"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewReplicationPolicy registers a new resource with the given unique name, arguments, and options. func NewReplicationPolicy(ctx *pulumi.Context, name string, args *ReplicationPolicyArgs, opts ...pulumi.ResourceOption) (*ReplicationPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationConsistentSnapshotFrequencyInMinutes == nil { return nil, errors.New("invalid value for required argument 'ApplicationConsistentSnapshotFrequencyInMinutes'") } if args.RecoveryPointRetentionInMinutes == nil { return nil, errors.New("invalid value for required argument 'RecoveryPointRetentionInMinutes'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ReplicationPolicy err := ctx.RegisterResource("azure:siterecovery/replicationPolicy:ReplicationPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetReplicationPolicy gets an existing ReplicationPolicy 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 GetReplicationPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ReplicationPolicyState, opts ...pulumi.ResourceOption) (*ReplicationPolicy, error) { var resource ReplicationPolicy err := ctx.ReadResource("azure:siterecovery/replicationPolicy:ReplicationPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ReplicationPolicy resources. type replicationPolicyState struct { // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. ApplicationConsistentSnapshotFrequencyInMinutes *int `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name of the replication policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes *int `pulumi:"recoveryPointRetentionInMinutes"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ReplicationPolicyState struct { // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntPtrInput // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes pulumi.IntPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ReplicationPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*replicationPolicyState)(nil)).Elem() } type replicationPolicyArgs struct { // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. ApplicationConsistentSnapshotFrequencyInMinutes int `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name of the replication policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes int `pulumi:"recoveryPointRetentionInMinutes"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ReplicationPolicy resource. type ReplicationPolicyArgs struct { // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntInput // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes pulumi.IntInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ReplicationPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*replicationPolicyArgs)(nil)).Elem() } type ReplicationPolicyInput interface { pulumi.Input ToReplicationPolicyOutput() ReplicationPolicyOutput ToReplicationPolicyOutputWithContext(ctx context.Context) ReplicationPolicyOutput } func (*ReplicationPolicy) ElementType() reflect.Type { return reflect.TypeOf((**ReplicationPolicy)(nil)).Elem() } func (i *ReplicationPolicy) ToReplicationPolicyOutput() ReplicationPolicyOutput { return i.ToReplicationPolicyOutputWithContext(context.Background()) } func (i *ReplicationPolicy) ToReplicationPolicyOutputWithContext(ctx context.Context) ReplicationPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationPolicyOutput) } // ReplicationPolicyArrayInput is an input type that accepts ReplicationPolicyArray and ReplicationPolicyArrayOutput values. // You can construct a concrete instance of `ReplicationPolicyArrayInput` via: // // ReplicationPolicyArray{ ReplicationPolicyArgs{...} } type ReplicationPolicyArrayInput interface { pulumi.Input ToReplicationPolicyArrayOutput() ReplicationPolicyArrayOutput ToReplicationPolicyArrayOutputWithContext(context.Context) ReplicationPolicyArrayOutput } type ReplicationPolicyArray []ReplicationPolicyInput func (ReplicationPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReplicationPolicy)(nil)).Elem() } func (i ReplicationPolicyArray) ToReplicationPolicyArrayOutput() ReplicationPolicyArrayOutput { return i.ToReplicationPolicyArrayOutputWithContext(context.Background()) } func (i ReplicationPolicyArray) ToReplicationPolicyArrayOutputWithContext(ctx context.Context) ReplicationPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationPolicyArrayOutput) } // ReplicationPolicyMapInput is an input type that accepts ReplicationPolicyMap and ReplicationPolicyMapOutput values. // You can construct a concrete instance of `ReplicationPolicyMapInput` via: // // ReplicationPolicyMap{ "key": ReplicationPolicyArgs{...} } type ReplicationPolicyMapInput interface { pulumi.Input ToReplicationPolicyMapOutput() ReplicationPolicyMapOutput ToReplicationPolicyMapOutputWithContext(context.Context) ReplicationPolicyMapOutput } type ReplicationPolicyMap map[string]ReplicationPolicyInput func (ReplicationPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReplicationPolicy)(nil)).Elem() } func (i ReplicationPolicyMap) ToReplicationPolicyMapOutput() ReplicationPolicyMapOutput { return i.ToReplicationPolicyMapOutputWithContext(context.Background()) } func (i ReplicationPolicyMap) ToReplicationPolicyMapOutputWithContext(ctx context.Context) ReplicationPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationPolicyMapOutput) } type ReplicationPolicyOutput struct{ *pulumi.OutputState } func (ReplicationPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ReplicationPolicy)(nil)).Elem() } func (o ReplicationPolicyOutput) ToReplicationPolicyOutput() ReplicationPolicyOutput { return o } func (o ReplicationPolicyOutput) ToReplicationPolicyOutputWithContext(ctx context.Context) ReplicationPolicyOutput { return o } // Specifies the frequency(in minutes) at which to create application consistent recovery points. // // > **Note:** The value of `applicationConsistentSnapshotFrequencyInMinutes` must be less than or equal to the value of `recoveryPointRetentionInMinutes`. func (o ReplicationPolicyOutput) ApplicationConsistentSnapshotFrequencyInMinutes() pulumi.IntOutput { return o.ApplyT(func(v *ReplicationPolicy) pulumi.IntOutput { return v.ApplicationConsistentSnapshotFrequencyInMinutes }).(pulumi.IntOutput) } // The name of the replication policy. Changing this forces a new resource to be created. func (o ReplicationPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The duration in minutes for which the recovery points need to be stored. func (o ReplicationPolicyOutput) RecoveryPointRetentionInMinutes() pulumi.IntOutput { return o.ApplyT(func(v *ReplicationPolicy) pulumi.IntOutput { return v.RecoveryPointRetentionInMinutes }).(pulumi.IntOutput) } // The name of the vault that should be updated. Changing this forces a new resource to be created. func (o ReplicationPolicyOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationPolicy) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. func (o ReplicationPolicyOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ReplicationPolicyArrayOutput struct{ *pulumi.OutputState } func (ReplicationPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReplicationPolicy)(nil)).Elem() } func (o ReplicationPolicyArrayOutput) ToReplicationPolicyArrayOutput() ReplicationPolicyArrayOutput { return o } func (o ReplicationPolicyArrayOutput) ToReplicationPolicyArrayOutputWithContext(ctx context.Context) ReplicationPolicyArrayOutput { return o } func (o ReplicationPolicyArrayOutput) Index(i pulumi.IntInput) ReplicationPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationPolicy { return vs[0].([]*ReplicationPolicy)[vs[1].(int)] }).(ReplicationPolicyOutput) } type ReplicationPolicyMapOutput struct{ *pulumi.OutputState } func (ReplicationPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReplicationPolicy)(nil)).Elem() } func (o ReplicationPolicyMapOutput) ToReplicationPolicyMapOutput() ReplicationPolicyMapOutput { return o } func (o ReplicationPolicyMapOutput) ToReplicationPolicyMapOutputWithContext(ctx context.Context) ReplicationPolicyMapOutput { return o } func (o ReplicationPolicyMapOutput) MapIndex(k pulumi.StringInput) ReplicationPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationPolicy { return vs[0].(map[string]*ReplicationPolicy)[vs[1].(string)] }).(ReplicationPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ReplicationPolicyInput)(nil)).Elem(), &ReplicationPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*ReplicationPolicyArrayInput)(nil)).Elem(), ReplicationPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ReplicationPolicyMapInput)(nil)).Elem(), ReplicationPolicyMap{}) pulumi.RegisterOutputType(ReplicationPolicyOutput{}) pulumi.RegisterOutputType(ReplicationPolicyArrayOutput{}) pulumi.RegisterOutputType(ReplicationPolicyMapOutput{}) }
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/siterecovery/vmwareReplicatedVm.go
sdk/go/azure/siterecovery/vmwareReplicatedVm.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VMWare replicated VM using Azure Site Recovery (VMWare to Azure only). A replicated VM keeps a copiously updated image of the VM in Azure in order to be able to start the VM in Azure in case of a disaster. // // ## 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/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleVMWareReplicationPolicy, err := siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{ // RecoveryVaultId: exampleVault.ID(), // Name: pulumi.String("example-policy"), // RecoveryPointRetentionInMinutes: pulumi.Int(1440), // ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240), // }) // if err != nil { // return err // } // _, err = siterecovery.NewVmwareReplicationPolicyAssociation(ctx, "test", &siterecovery.VmwareReplicationPolicyAssociationArgs{ // Name: pulumi.String("example-association"), // RecoveryVaultId: exampleVault.ID(), // PolicyId: exampleVMWareReplicationPolicy.ID(), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacc"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountKind: pulumi.String("StorageV2"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-net"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // Location: example.Location, // }) // 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("192.168.2.0/24"), // }, // }) // if err != nil { // return err // } // _, err = siterecovery.NewVmwareReplicatedVm(ctx, "example", &siterecovery.VmwareReplicatedVmArgs{ // Name: pulumi.String("example-vmware-vm"), // RecoveryVaultId: exampleVault.ID(), // SourceVmName: pulumi.String("example-vm"), // ApplianceName: pulumi.String("example-appliance"), // RecoveryReplicationPolicyId: pulumi.Any(exampleAzurermSiteRecoveryVmwareReplicationPolicyAssociation.PolicyId), // PhysicalServerCredentialName: pulumi.String("example-creds"), // LicenseType: pulumi.String("NotSpecified"), // TargetBootDiagnosticsStorageAccountId: exampleAccount.ID(), // TargetVmName: pulumi.String("example_replicated_vm"), // TargetResourceGroupId: example.ID(), // DefaultLogStorageAccountId: exampleAccount.ID(), // DefaultRecoveryDiskType: pulumi.String("Standard_LRS"), // TargetNetworkId: exampleVirtualNetwork.ID(), // NetworkInterfaces: siterecovery.VmwareReplicatedVmNetworkInterfaceArray{ // &siterecovery.VmwareReplicatedVmNetworkInterfaceArgs{ // SourceMacAddress: pulumi.String("00:00:00:00:00:00"), // TargetSubnetName: exampleSubnet.Name, // IsPrimary: 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.OffAzure` - 2020-01-01 // // * `Microsoft.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery VMWare Replicated VM's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/vmwareReplicatedVm:VmwareReplicatedVm vmreplication /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name/replicationProtectionContainers/protection-container-name/replicationProtectedItems/vm-replication-name // ``` type VmwareReplicatedVm struct { pulumi.CustomResourceState // The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. ApplianceName pulumi.StringOutput `pulumi:"applianceName"` // The ID of the stroage account that should be used for logging during replication. // // > **Note:** Only standard types of storage accounts are allowed. // // > **Note:** Only one of `defaultLogStorageAccountId` or `managedDisk` must be specified. // // > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. DefaultLogStorageAccountId pulumi.StringPtrOutput `pulumi:"defaultLogStorageAccountId"` // The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. // // > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. // // > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. DefaultRecoveryDiskType pulumi.StringPtrOutput `pulumi:"defaultRecoveryDiskType"` // The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. // // > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. DefaultTargetDiskEncryptionSetId pulumi.StringPtrOutput `pulumi:"defaultTargetDiskEncryptionSetId"` // The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` // One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. // // > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. ManagedDisks VmwareReplicatedVmManagedDiskArrayOutput `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName pulumi.StringPtrOutput `pulumi:"multiVmGroupName"` // The name of the replicated VM. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces VmwareReplicatedVmNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"` // The name of the credential to access the source VM. Changing this forces a new resource to be created. More information about the credentials could be found [here](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). PhysicalServerCredentialName pulumi.StringOutput `pulumi:"physicalServerCredentialName"` // The ID of the policy to use for this replicated VM. RecoveryReplicationPolicyId pulumi.StringOutput `pulumi:"recoveryReplicationPolicyId"` // The ID of the Recovery Services Vault where the replicated VM is created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` // The name of the source VM in VMWare. Changing this forces a new resource to be created. SourceVmName pulumi.StringOutput `pulumi:"sourceVmName"` // The ID of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId pulumi.StringPtrOutput `pulumi:"targetAvailabilitySetId"` // The ID of the storage account that should be used for boot diagnostics when a failover is done. TargetBootDiagnosticsStorageAccountId pulumi.StringPtrOutput `pulumi:"targetBootDiagnosticsStorageAccountId"` // The ID of network to use when a failover is done. // // > **Note:** `targetNetworkId` is required when `networkInterface` is specified. TargetNetworkId pulumi.StringPtrOutput `pulumi:"targetNetworkId"` // The ID of Proximity Placement Group the new VM should belong to when a failover is done. // // > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. TargetProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"targetProximityPlacementGroupId"` // The ID of resource group where the VM should be created when a failover is done. TargetResourceGroupId pulumi.StringOutput `pulumi:"targetResourceGroupId"` // Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. TargetVmName pulumi.StringOutput `pulumi:"targetVmName"` // Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. TargetVmSize pulumi.StringPtrOutput `pulumi:"targetVmSize"` // Specifies the Availability Zone where the Failover VM should exist. TargetZone pulumi.StringPtrOutput `pulumi:"targetZone"` // The ID of network to use when a test failover is done. TestNetworkId pulumi.StringPtrOutput `pulumi:"testNetworkId"` } // NewVmwareReplicatedVm registers a new resource with the given unique name, arguments, and options. func NewVmwareReplicatedVm(ctx *pulumi.Context, name string, args *VmwareReplicatedVmArgs, opts ...pulumi.ResourceOption) (*VmwareReplicatedVm, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplianceName == nil { return nil, errors.New("invalid value for required argument 'ApplianceName'") } if args.PhysicalServerCredentialName == nil { return nil, errors.New("invalid value for required argument 'PhysicalServerCredentialName'") } if args.RecoveryReplicationPolicyId == nil { return nil, errors.New("invalid value for required argument 'RecoveryReplicationPolicyId'") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } if args.SourceVmName == nil { return nil, errors.New("invalid value for required argument 'SourceVmName'") } if args.TargetResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceGroupId'") } if args.TargetVmName == nil { return nil, errors.New("invalid value for required argument 'TargetVmName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VmwareReplicatedVm err := ctx.RegisterResource("azure:siterecovery/vmwareReplicatedVm:VmwareReplicatedVm", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVmwareReplicatedVm gets an existing VmwareReplicatedVm 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 GetVmwareReplicatedVm(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VmwareReplicatedVmState, opts ...pulumi.ResourceOption) (*VmwareReplicatedVm, error) { var resource VmwareReplicatedVm err := ctx.ReadResource("azure:siterecovery/vmwareReplicatedVm:VmwareReplicatedVm", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VmwareReplicatedVm resources. type vmwareReplicatedVmState struct { // The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. ApplianceName *string `pulumi:"applianceName"` // The ID of the stroage account that should be used for logging during replication. // // > **Note:** Only standard types of storage accounts are allowed. // // > **Note:** Only one of `defaultLogStorageAccountId` or `managedDisk` must be specified. // // > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. DefaultLogStorageAccountId *string `pulumi:"defaultLogStorageAccountId"` // The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. // // > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. // // > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. DefaultRecoveryDiskType *string `pulumi:"defaultRecoveryDiskType"` // The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. // // > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. DefaultTargetDiskEncryptionSetId *string `pulumi:"defaultTargetDiskEncryptionSetId"` // The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. LicenseType *string `pulumi:"licenseType"` // One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. // // > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. ManagedDisks []VmwareReplicatedVmManagedDisk `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName *string `pulumi:"multiVmGroupName"` // The name of the replicated VM. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces []VmwareReplicatedVmNetworkInterface `pulumi:"networkInterfaces"` // The name of the credential to access the source VM. Changing this forces a new resource to be created. More information about the credentials could be found [here](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). PhysicalServerCredentialName *string `pulumi:"physicalServerCredentialName"` // The ID of the policy to use for this replicated VM. RecoveryReplicationPolicyId *string `pulumi:"recoveryReplicationPolicyId"` // The ID of the Recovery Services Vault where the replicated VM is created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` // The name of the source VM in VMWare. Changing this forces a new resource to be created. SourceVmName *string `pulumi:"sourceVmName"` // The ID of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId *string `pulumi:"targetAvailabilitySetId"` // The ID of the storage account that should be used for boot diagnostics when a failover is done. TargetBootDiagnosticsStorageAccountId *string `pulumi:"targetBootDiagnosticsStorageAccountId"` // The ID of network to use when a failover is done. // // > **Note:** `targetNetworkId` is required when `networkInterface` is specified. TargetNetworkId *string `pulumi:"targetNetworkId"` // The ID of Proximity Placement Group the new VM should belong to when a failover is done. // // > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. TargetProximityPlacementGroupId *string `pulumi:"targetProximityPlacementGroupId"` // The ID of resource group where the VM should be created when a failover is done. TargetResourceGroupId *string `pulumi:"targetResourceGroupId"` // Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. TargetVmName *string `pulumi:"targetVmName"` // Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. TargetVmSize *string `pulumi:"targetVmSize"` // Specifies the Availability Zone where the Failover VM should exist. TargetZone *string `pulumi:"targetZone"` // The ID of network to use when a test failover is done. TestNetworkId *string `pulumi:"testNetworkId"` } type VmwareReplicatedVmState struct { // The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. ApplianceName pulumi.StringPtrInput // The ID of the stroage account that should be used for logging during replication. // // > **Note:** Only standard types of storage accounts are allowed. // // > **Note:** Only one of `defaultLogStorageAccountId` or `managedDisk` must be specified. // // > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. DefaultLogStorageAccountId pulumi.StringPtrInput // The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. // // > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. // // > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. DefaultRecoveryDiskType pulumi.StringPtrInput // The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. // // > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. DefaultTargetDiskEncryptionSetId pulumi.StringPtrInput // The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. LicenseType pulumi.StringPtrInput // One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. // // > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. ManagedDisks VmwareReplicatedVmManagedDiskArrayInput // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName pulumi.StringPtrInput // The name of the replicated VM. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `networkInterface` block as defined below. NetworkInterfaces VmwareReplicatedVmNetworkInterfaceArrayInput // The name of the credential to access the source VM. Changing this forces a new resource to be created. More information about the credentials could be found [here](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). PhysicalServerCredentialName pulumi.StringPtrInput // The ID of the policy to use for this replicated VM. RecoveryReplicationPolicyId pulumi.StringPtrInput // The ID of the Recovery Services Vault where the replicated VM is created. RecoveryVaultId pulumi.StringPtrInput // The name of the source VM in VMWare. Changing this forces a new resource to be created. SourceVmName pulumi.StringPtrInput // The ID of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId pulumi.StringPtrInput // The ID of the storage account that should be used for boot diagnostics when a failover is done. TargetBootDiagnosticsStorageAccountId pulumi.StringPtrInput // The ID of network to use when a failover is done. // // > **Note:** `targetNetworkId` is required when `networkInterface` is specified. TargetNetworkId pulumi.StringPtrInput // The ID of Proximity Placement Group the new VM should belong to when a failover is done. // // > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. TargetProximityPlacementGroupId pulumi.StringPtrInput // The ID of resource group where the VM should be created when a failover is done. TargetResourceGroupId pulumi.StringPtrInput // Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. TargetVmName pulumi.StringPtrInput // Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. TargetVmSize pulumi.StringPtrInput // Specifies the Availability Zone where the Failover VM should exist. TargetZone pulumi.StringPtrInput // The ID of network to use when a test failover is done. TestNetworkId pulumi.StringPtrInput } func (VmwareReplicatedVmState) ElementType() reflect.Type { return reflect.TypeOf((*vmwareReplicatedVmState)(nil)).Elem() } type vmwareReplicatedVmArgs struct { // The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. ApplianceName string `pulumi:"applianceName"` // The ID of the stroage account that should be used for logging during replication. // // > **Note:** Only standard types of storage accounts are allowed. // // > **Note:** Only one of `defaultLogStorageAccountId` or `managedDisk` must be specified. // // > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. DefaultLogStorageAccountId *string `pulumi:"defaultLogStorageAccountId"` // The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. // // > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. // // > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. DefaultRecoveryDiskType *string `pulumi:"defaultRecoveryDiskType"` // The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. // // > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. DefaultTargetDiskEncryptionSetId *string `pulumi:"defaultTargetDiskEncryptionSetId"` // The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. LicenseType *string `pulumi:"licenseType"` // One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. // // > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. ManagedDisks []VmwareReplicatedVmManagedDisk `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName *string `pulumi:"multiVmGroupName"` // The name of the replicated VM. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces []VmwareReplicatedVmNetworkInterface `pulumi:"networkInterfaces"` // The name of the credential to access the source VM. Changing this forces a new resource to be created. More information about the credentials could be found [here](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). PhysicalServerCredentialName string `pulumi:"physicalServerCredentialName"` // The ID of the policy to use for this replicated VM. RecoveryReplicationPolicyId string `pulumi:"recoveryReplicationPolicyId"` // The ID of the Recovery Services Vault where the replicated VM is created. RecoveryVaultId string `pulumi:"recoveryVaultId"` // The name of the source VM in VMWare. Changing this forces a new resource to be created. SourceVmName string `pulumi:"sourceVmName"` // The ID of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId *string `pulumi:"targetAvailabilitySetId"` // The ID of the storage account that should be used for boot diagnostics when a failover is done. TargetBootDiagnosticsStorageAccountId *string `pulumi:"targetBootDiagnosticsStorageAccountId"` // The ID of network to use when a failover is done. // // > **Note:** `targetNetworkId` is required when `networkInterface` is specified. TargetNetworkId *string `pulumi:"targetNetworkId"` // The ID of Proximity Placement Group the new VM should belong to when a failover is done. // // > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. TargetProximityPlacementGroupId *string `pulumi:"targetProximityPlacementGroupId"` // The ID of resource group where the VM should be created when a failover is done. TargetResourceGroupId string `pulumi:"targetResourceGroupId"` // Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. TargetVmName string `pulumi:"targetVmName"` // Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. TargetVmSize *string `pulumi:"targetVmSize"` // Specifies the Availability Zone where the Failover VM should exist. TargetZone *string `pulumi:"targetZone"` // The ID of network to use when a test failover is done. TestNetworkId *string `pulumi:"testNetworkId"` } // The set of arguments for constructing a VmwareReplicatedVm resource. type VmwareReplicatedVmArgs struct { // The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. ApplianceName pulumi.StringInput // The ID of the stroage account that should be used for logging during replication. // // > **Note:** Only standard types of storage accounts are allowed. // // > **Note:** Only one of `defaultLogStorageAccountId` or `managedDisk` must be specified. // // > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. DefaultLogStorageAccountId pulumi.StringPtrInput // The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. // // > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. // // > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. DefaultRecoveryDiskType pulumi.StringPtrInput // The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. // // > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. // // > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. DefaultTargetDiskEncryptionSetId pulumi.StringPtrInput // The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. LicenseType pulumi.StringPtrInput
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/siterecovery/protectionContainer.go
sdk/go/azure/siterecovery/protectionContainer.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Site Recovery protection container. Protection containers serve as containers for replicated VMs and belong to a single region / recovery fabric. Protection containers can contain more than one replicated VM. To replicate a VM, a container must exist in both the source and target Azure regions. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // fabric, err := siterecovery.NewFabric(ctx, "fabric", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.Location, // }) // if err != nil { // return err // } // _, err = siterecovery.NewProtectionContainer(ctx, "protection-container", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: fabric.Name, // }) // 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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Protection Containers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/protectionContainer:ProtectionContainer mycontainer /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name/replicationProtectionContainers/protection-container-name // ``` type ProtectionContainer struct { pulumi.CustomResourceState // The name of the protection container. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringOutput `pulumi:"recoveryFabricName"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewProtectionContainer registers a new resource with the given unique name, arguments, and options. func NewProtectionContainer(ctx *pulumi.Context, name string, args *ProtectionContainerArgs, opts ...pulumi.ResourceOption) (*ProtectionContainer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryFabricName == nil { return nil, errors.New("invalid value for required argument 'RecoveryFabricName'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ProtectionContainer err := ctx.RegisterResource("azure:siterecovery/protectionContainer:ProtectionContainer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProtectionContainer gets an existing ProtectionContainer 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 GetProtectionContainer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectionContainerState, opts ...pulumi.ResourceOption) (*ProtectionContainer, error) { var resource ProtectionContainer err := ctx.ReadResource("azure:siterecovery/protectionContainer:ProtectionContainer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ProtectionContainer resources. type protectionContainerState struct { // The name of the protection container. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. RecoveryFabricName *string `pulumi:"recoveryFabricName"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ProtectionContainerState struct { // The name of the protection container. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ProtectionContainerState) ElementType() reflect.Type { return reflect.TypeOf((*protectionContainerState)(nil)).Elem() } type protectionContainerArgs struct { // The name of the protection container. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. RecoveryFabricName string `pulumi:"recoveryFabricName"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ProtectionContainer resource. type ProtectionContainerArgs struct { // The name of the protection container. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ProtectionContainerArgs) ElementType() reflect.Type { return reflect.TypeOf((*protectionContainerArgs)(nil)).Elem() } type ProtectionContainerInput interface { pulumi.Input ToProtectionContainerOutput() ProtectionContainerOutput ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput } func (*ProtectionContainer) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainer)(nil)).Elem() } func (i *ProtectionContainer) ToProtectionContainerOutput() ProtectionContainerOutput { return i.ToProtectionContainerOutputWithContext(context.Background()) } func (i *ProtectionContainer) ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerOutput) } // ProtectionContainerArrayInput is an input type that accepts ProtectionContainerArray and ProtectionContainerArrayOutput values. // You can construct a concrete instance of `ProtectionContainerArrayInput` via: // // ProtectionContainerArray{ ProtectionContainerArgs{...} } type ProtectionContainerArrayInput interface { pulumi.Input ToProtectionContainerArrayOutput() ProtectionContainerArrayOutput ToProtectionContainerArrayOutputWithContext(context.Context) ProtectionContainerArrayOutput } type ProtectionContainerArray []ProtectionContainerInput func (ProtectionContainerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectionContainer)(nil)).Elem() } func (i ProtectionContainerArray) ToProtectionContainerArrayOutput() ProtectionContainerArrayOutput { return i.ToProtectionContainerArrayOutputWithContext(context.Background()) } func (i ProtectionContainerArray) ToProtectionContainerArrayOutputWithContext(ctx context.Context) ProtectionContainerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerArrayOutput) } // ProtectionContainerMapInput is an input type that accepts ProtectionContainerMap and ProtectionContainerMapOutput values. // You can construct a concrete instance of `ProtectionContainerMapInput` via: // // ProtectionContainerMap{ "key": ProtectionContainerArgs{...} } type ProtectionContainerMapInput interface { pulumi.Input ToProtectionContainerMapOutput() ProtectionContainerMapOutput ToProtectionContainerMapOutputWithContext(context.Context) ProtectionContainerMapOutput } type ProtectionContainerMap map[string]ProtectionContainerInput func (ProtectionContainerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectionContainer)(nil)).Elem() } func (i ProtectionContainerMap) ToProtectionContainerMapOutput() ProtectionContainerMapOutput { return i.ToProtectionContainerMapOutputWithContext(context.Background()) } func (i ProtectionContainerMap) ToProtectionContainerMapOutputWithContext(ctx context.Context) ProtectionContainerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMapOutput) } type ProtectionContainerOutput struct{ *pulumi.OutputState } func (ProtectionContainerOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainer)(nil)).Elem() } func (o ProtectionContainerOutput) ToProtectionContainerOutput() ProtectionContainerOutput { return o } func (o ProtectionContainerOutput) ToProtectionContainerOutputWithContext(ctx context.Context) ProtectionContainerOutput { return o } // The name of the protection container. Changing this forces a new resource to be created. func (o ProtectionContainerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Name of fabric that should contain this protection container. Changing this forces a new resource to be created. func (o ProtectionContainerOutput) RecoveryFabricName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainer) pulumi.StringOutput { return v.RecoveryFabricName }).(pulumi.StringOutput) } // The name of the vault that should be updated. Changing this forces a new resource to be created. func (o ProtectionContainerOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainer) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. func (o ProtectionContainerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ProtectionContainerArrayOutput struct{ *pulumi.OutputState } func (ProtectionContainerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectionContainer)(nil)).Elem() } func (o ProtectionContainerArrayOutput) ToProtectionContainerArrayOutput() ProtectionContainerArrayOutput { return o } func (o ProtectionContainerArrayOutput) ToProtectionContainerArrayOutputWithContext(ctx context.Context) ProtectionContainerArrayOutput { return o } func (o ProtectionContainerArrayOutput) Index(i pulumi.IntInput) ProtectionContainerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProtectionContainer { return vs[0].([]*ProtectionContainer)[vs[1].(int)] }).(ProtectionContainerOutput) } type ProtectionContainerMapOutput struct{ *pulumi.OutputState } func (ProtectionContainerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectionContainer)(nil)).Elem() } func (o ProtectionContainerMapOutput) ToProtectionContainerMapOutput() ProtectionContainerMapOutput { return o } func (o ProtectionContainerMapOutput) ToProtectionContainerMapOutputWithContext(ctx context.Context) ProtectionContainerMapOutput { return o } func (o ProtectionContainerMapOutput) MapIndex(k pulumi.StringInput) ProtectionContainerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProtectionContainer { return vs[0].(map[string]*ProtectionContainer)[vs[1].(string)] }).(ProtectionContainerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerInput)(nil)).Elem(), &ProtectionContainer{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerArrayInput)(nil)).Elem(), ProtectionContainerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerMapInput)(nil)).Elem(), ProtectionContainerMap{}) pulumi.RegisterOutputType(ProtectionContainerOutput{}) pulumi.RegisterOutputType(ProtectionContainerArrayOutput{}) pulumi.RegisterOutputType(ProtectionContainerMapOutput{}) }
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/siterecovery/hyperVReplicationPolicy.go
sdk/go/azure/siterecovery/hyperVReplicationPolicy.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Site Recovery replication policy for HyperV within a Recovery Vault. Replication policies define the frequency at which recovery points are created and how long they are stored. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = siterecovery.NewHyperVReplicationPolicy(ctx, "policy", &siterecovery.HyperVReplicationPolicyArgs{ // Name: pulumi.String("policy"), // RecoveryVaultId: vault.ID(), // RecoveryPointRetentionInHours: pulumi.Int(2), // ApplicationConsistentSnapshotFrequencyInHours: pulumi.Int(1), // ReplicationIntervalInSeconds: pulumi.Int(300), // }) // 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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Replication Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/hyperVReplicationPolicy:HyperVReplicationPolicy mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationPolicies/policy-name // ``` type HyperVReplicationPolicy struct { pulumi.CustomResourceState // Specifies the frequency at which to create application consistent recovery points. ApplicationConsistentSnapshotFrequencyInHours pulumi.IntOutput `pulumi:"applicationConsistentSnapshotFrequencyInHours"` // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The duration in hours for which the recovery points need to be stored. RecoveryPointRetentionInHours pulumi.IntOutput `pulumi:"recoveryPointRetentionInHours"` // The id of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. ReplicationIntervalInSeconds pulumi.IntOutput `pulumi:"replicationIntervalInSeconds"` } // NewHyperVReplicationPolicy registers a new resource with the given unique name, arguments, and options. func NewHyperVReplicationPolicy(ctx *pulumi.Context, name string, args *HyperVReplicationPolicyArgs, opts ...pulumi.ResourceOption) (*HyperVReplicationPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationConsistentSnapshotFrequencyInHours == nil { return nil, errors.New("invalid value for required argument 'ApplicationConsistentSnapshotFrequencyInHours'") } if args.RecoveryPointRetentionInHours == nil { return nil, errors.New("invalid value for required argument 'RecoveryPointRetentionInHours'") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } if args.ReplicationIntervalInSeconds == nil { return nil, errors.New("invalid value for required argument 'ReplicationIntervalInSeconds'") } opts = internal.PkgResourceDefaultOpts(opts) var resource HyperVReplicationPolicy err := ctx.RegisterResource("azure:siterecovery/hyperVReplicationPolicy:HyperVReplicationPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHyperVReplicationPolicy gets an existing HyperVReplicationPolicy 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 GetHyperVReplicationPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HyperVReplicationPolicyState, opts ...pulumi.ResourceOption) (*HyperVReplicationPolicy, error) { var resource HyperVReplicationPolicy err := ctx.ReadResource("azure:siterecovery/hyperVReplicationPolicy:HyperVReplicationPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering HyperVReplicationPolicy resources. type hyperVReplicationPolicyState struct { // Specifies the frequency at which to create application consistent recovery points. ApplicationConsistentSnapshotFrequencyInHours *int `pulumi:"applicationConsistentSnapshotFrequencyInHours"` // The name of the replication policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The duration in hours for which the recovery points need to be stored. RecoveryPointRetentionInHours *int `pulumi:"recoveryPointRetentionInHours"` // The id of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. ReplicationIntervalInSeconds *int `pulumi:"replicationIntervalInSeconds"` } type HyperVReplicationPolicyState struct { // Specifies the frequency at which to create application consistent recovery points. ApplicationConsistentSnapshotFrequencyInHours pulumi.IntPtrInput // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The duration in hours for which the recovery points need to be stored. RecoveryPointRetentionInHours pulumi.IntPtrInput // The id of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringPtrInput // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. ReplicationIntervalInSeconds pulumi.IntPtrInput } func (HyperVReplicationPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*hyperVReplicationPolicyState)(nil)).Elem() } type hyperVReplicationPolicyArgs struct { // Specifies the frequency at which to create application consistent recovery points. ApplicationConsistentSnapshotFrequencyInHours int `pulumi:"applicationConsistentSnapshotFrequencyInHours"` // The name of the replication policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The duration in hours for which the recovery points need to be stored. RecoveryPointRetentionInHours int `pulumi:"recoveryPointRetentionInHours"` // The id of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. ReplicationIntervalInSeconds int `pulumi:"replicationIntervalInSeconds"` } // The set of arguments for constructing a HyperVReplicationPolicy resource. type HyperVReplicationPolicyArgs struct { // Specifies the frequency at which to create application consistent recovery points. ApplicationConsistentSnapshotFrequencyInHours pulumi.IntInput // The name of the replication policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The duration in hours for which the recovery points need to be stored. RecoveryPointRetentionInHours pulumi.IntInput // The id of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringInput // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. ReplicationIntervalInSeconds pulumi.IntInput } func (HyperVReplicationPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*hyperVReplicationPolicyArgs)(nil)).Elem() } type HyperVReplicationPolicyInput interface { pulumi.Input ToHyperVReplicationPolicyOutput() HyperVReplicationPolicyOutput ToHyperVReplicationPolicyOutputWithContext(ctx context.Context) HyperVReplicationPolicyOutput } func (*HyperVReplicationPolicy) ElementType() reflect.Type { return reflect.TypeOf((**HyperVReplicationPolicy)(nil)).Elem() } func (i *HyperVReplicationPolicy) ToHyperVReplicationPolicyOutput() HyperVReplicationPolicyOutput { return i.ToHyperVReplicationPolicyOutputWithContext(context.Background()) } func (i *HyperVReplicationPolicy) ToHyperVReplicationPolicyOutputWithContext(ctx context.Context) HyperVReplicationPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyOutput) } // HyperVReplicationPolicyArrayInput is an input type that accepts HyperVReplicationPolicyArray and HyperVReplicationPolicyArrayOutput values. // You can construct a concrete instance of `HyperVReplicationPolicyArrayInput` via: // // HyperVReplicationPolicyArray{ HyperVReplicationPolicyArgs{...} } type HyperVReplicationPolicyArrayInput interface { pulumi.Input ToHyperVReplicationPolicyArrayOutput() HyperVReplicationPolicyArrayOutput ToHyperVReplicationPolicyArrayOutputWithContext(context.Context) HyperVReplicationPolicyArrayOutput } type HyperVReplicationPolicyArray []HyperVReplicationPolicyInput func (HyperVReplicationPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVReplicationPolicy)(nil)).Elem() } func (i HyperVReplicationPolicyArray) ToHyperVReplicationPolicyArrayOutput() HyperVReplicationPolicyArrayOutput { return i.ToHyperVReplicationPolicyArrayOutputWithContext(context.Background()) } func (i HyperVReplicationPolicyArray) ToHyperVReplicationPolicyArrayOutputWithContext(ctx context.Context) HyperVReplicationPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyArrayOutput) } // HyperVReplicationPolicyMapInput is an input type that accepts HyperVReplicationPolicyMap and HyperVReplicationPolicyMapOutput values. // You can construct a concrete instance of `HyperVReplicationPolicyMapInput` via: // // HyperVReplicationPolicyMap{ "key": HyperVReplicationPolicyArgs{...} } type HyperVReplicationPolicyMapInput interface { pulumi.Input ToHyperVReplicationPolicyMapOutput() HyperVReplicationPolicyMapOutput ToHyperVReplicationPolicyMapOutputWithContext(context.Context) HyperVReplicationPolicyMapOutput } type HyperVReplicationPolicyMap map[string]HyperVReplicationPolicyInput func (HyperVReplicationPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVReplicationPolicy)(nil)).Elem() } func (i HyperVReplicationPolicyMap) ToHyperVReplicationPolicyMapOutput() HyperVReplicationPolicyMapOutput { return i.ToHyperVReplicationPolicyMapOutputWithContext(context.Background()) } func (i HyperVReplicationPolicyMap) ToHyperVReplicationPolicyMapOutputWithContext(ctx context.Context) HyperVReplicationPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HyperVReplicationPolicyMapOutput) } type HyperVReplicationPolicyOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**HyperVReplicationPolicy)(nil)).Elem() } func (o HyperVReplicationPolicyOutput) ToHyperVReplicationPolicyOutput() HyperVReplicationPolicyOutput { return o } func (o HyperVReplicationPolicyOutput) ToHyperVReplicationPolicyOutputWithContext(ctx context.Context) HyperVReplicationPolicyOutput { return o } // Specifies the frequency at which to create application consistent recovery points. func (o HyperVReplicationPolicyOutput) ApplicationConsistentSnapshotFrequencyInHours() pulumi.IntOutput { return o.ApplyT(func(v *HyperVReplicationPolicy) pulumi.IntOutput { return v.ApplicationConsistentSnapshotFrequencyInHours }).(pulumi.IntOutput) } // The name of the replication policy. Changing this forces a new resource to be created. func (o HyperVReplicationPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *HyperVReplicationPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The duration in hours for which the recovery points need to be stored. func (o HyperVReplicationPolicyOutput) RecoveryPointRetentionInHours() pulumi.IntOutput { return o.ApplyT(func(v *HyperVReplicationPolicy) pulumi.IntOutput { return v.RecoveryPointRetentionInHours }).(pulumi.IntOutput) } // The id of the vault that should be updated. Changing this forces a new resource to be created. func (o HyperVReplicationPolicyOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *HyperVReplicationPolicy) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } // Specifies how frequently data should be synchronized between source and target locations. Possible values are `30` and `300`. func (o HyperVReplicationPolicyOutput) ReplicationIntervalInSeconds() pulumi.IntOutput { return o.ApplyT(func(v *HyperVReplicationPolicy) pulumi.IntOutput { return v.ReplicationIntervalInSeconds }).(pulumi.IntOutput) } type HyperVReplicationPolicyArrayOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*HyperVReplicationPolicy)(nil)).Elem() } func (o HyperVReplicationPolicyArrayOutput) ToHyperVReplicationPolicyArrayOutput() HyperVReplicationPolicyArrayOutput { return o } func (o HyperVReplicationPolicyArrayOutput) ToHyperVReplicationPolicyArrayOutputWithContext(ctx context.Context) HyperVReplicationPolicyArrayOutput { return o } func (o HyperVReplicationPolicyArrayOutput) Index(i pulumi.IntInput) HyperVReplicationPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HyperVReplicationPolicy { return vs[0].([]*HyperVReplicationPolicy)[vs[1].(int)] }).(HyperVReplicationPolicyOutput) } type HyperVReplicationPolicyMapOutput struct{ *pulumi.OutputState } func (HyperVReplicationPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*HyperVReplicationPolicy)(nil)).Elem() } func (o HyperVReplicationPolicyMapOutput) ToHyperVReplicationPolicyMapOutput() HyperVReplicationPolicyMapOutput { return o } func (o HyperVReplicationPolicyMapOutput) ToHyperVReplicationPolicyMapOutputWithContext(ctx context.Context) HyperVReplicationPolicyMapOutput { return o } func (o HyperVReplicationPolicyMapOutput) MapIndex(k pulumi.StringInput) HyperVReplicationPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HyperVReplicationPolicy { return vs[0].(map[string]*HyperVReplicationPolicy)[vs[1].(string)] }).(HyperVReplicationPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyInput)(nil)).Elem(), &HyperVReplicationPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyArrayInput)(nil)).Elem(), HyperVReplicationPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HyperVReplicationPolicyMapInput)(nil)).Elem(), HyperVReplicationPolicyMap{}) pulumi.RegisterOutputType(HyperVReplicationPolicyOutput{}) pulumi.RegisterOutputType(HyperVReplicationPolicyArrayOutput{}) pulumi.RegisterOutputType(HyperVReplicationPolicyMapOutput{}) }
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/siterecovery/vmwareReplicationPolicy.go
sdk/go/azure/siterecovery/vmwareReplicationPolicy.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VMWare Replication Policy. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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-rg"), // Location: pulumi.String("eastus"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // ClassicVmwareReplicationEnabled: pulumi.Bool(true), // SoftDeleteEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // _, err = siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{ // Name: pulumi.String("example-policy"), // RecoveryVaultId: exampleVault.ID(), // RecoveryPointRetentionInMinutes: pulumi.Int(1440), // ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240), // }) // 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.RecoveryServices` - 2024-04-01 // // ## Import // // VMWare Replication Policy can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/vMWareReplicationPolicy:VMWareReplicationPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vault1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationPolicies/policy1 // ``` type VMWareReplicationPolicy struct { pulumi.CustomResourceState // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntOutput `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. RecoveryPointRetentionInMinutes pulumi.IntOutput `pulumi:"recoveryPointRetentionInMinutes"` // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` } // NewVMWareReplicationPolicy registers a new resource with the given unique name, arguments, and options. func NewVMWareReplicationPolicy(ctx *pulumi.Context, name string, args *VMWareReplicationPolicyArgs, opts ...pulumi.ResourceOption) (*VMWareReplicationPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationConsistentSnapshotFrequencyInMinutes == nil { return nil, errors.New("invalid value for required argument 'ApplicationConsistentSnapshotFrequencyInMinutes'") } if args.RecoveryPointRetentionInMinutes == nil { return nil, errors.New("invalid value for required argument 'RecoveryPointRetentionInMinutes'") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VMWareReplicationPolicy err := ctx.RegisterResource("azure:siterecovery/vMWareReplicationPolicy:VMWareReplicationPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVMWareReplicationPolicy gets an existing VMWareReplicationPolicy 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 GetVMWareReplicationPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VMWareReplicationPolicyState, opts ...pulumi.ResourceOption) (*VMWareReplicationPolicy, error) { var resource VMWareReplicationPolicy err := ctx.ReadResource("azure:siterecovery/vMWareReplicationPolicy:VMWareReplicationPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VMWareReplicationPolicy resources. type vmwareReplicationPolicyState struct { // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. ApplicationConsistentSnapshotFrequencyInMinutes *int `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. Name *string `pulumi:"name"` // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. RecoveryPointRetentionInMinutes *int `pulumi:"recoveryPointRetentionInMinutes"` // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` } type VMWareReplicationPolicyState struct { // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntPtrInput // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. Name pulumi.StringPtrInput // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. RecoveryPointRetentionInMinutes pulumi.IntPtrInput // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. RecoveryVaultId pulumi.StringPtrInput } func (VMWareReplicationPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*vmwareReplicationPolicyState)(nil)).Elem() } type vmwareReplicationPolicyArgs struct { // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. ApplicationConsistentSnapshotFrequencyInMinutes int `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. Name *string `pulumi:"name"` // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. RecoveryPointRetentionInMinutes int `pulumi:"recoveryPointRetentionInMinutes"` // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` } // The set of arguments for constructing a VMWareReplicationPolicy resource. type VMWareReplicationPolicyArgs struct { // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. ApplicationConsistentSnapshotFrequencyInMinutes pulumi.IntInput // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. Name pulumi.StringPtrInput // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. RecoveryPointRetentionInMinutes pulumi.IntInput // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. RecoveryVaultId pulumi.StringInput } func (VMWareReplicationPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*vmwareReplicationPolicyArgs)(nil)).Elem() } type VMWareReplicationPolicyInput interface { pulumi.Input ToVMWareReplicationPolicyOutput() VMWareReplicationPolicyOutput ToVMWareReplicationPolicyOutputWithContext(ctx context.Context) VMWareReplicationPolicyOutput } func (*VMWareReplicationPolicy) ElementType() reflect.Type { return reflect.TypeOf((**VMWareReplicationPolicy)(nil)).Elem() } func (i *VMWareReplicationPolicy) ToVMWareReplicationPolicyOutput() VMWareReplicationPolicyOutput { return i.ToVMWareReplicationPolicyOutputWithContext(context.Background()) } func (i *VMWareReplicationPolicy) ToVMWareReplicationPolicyOutputWithContext(ctx context.Context) VMWareReplicationPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(VMWareReplicationPolicyOutput) } // VMWareReplicationPolicyArrayInput is an input type that accepts VMWareReplicationPolicyArray and VMWareReplicationPolicyArrayOutput values. // You can construct a concrete instance of `VMWareReplicationPolicyArrayInput` via: // // VMWareReplicationPolicyArray{ VMWareReplicationPolicyArgs{...} } type VMWareReplicationPolicyArrayInput interface { pulumi.Input ToVMWareReplicationPolicyArrayOutput() VMWareReplicationPolicyArrayOutput ToVMWareReplicationPolicyArrayOutputWithContext(context.Context) VMWareReplicationPolicyArrayOutput } type VMWareReplicationPolicyArray []VMWareReplicationPolicyInput func (VMWareReplicationPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VMWareReplicationPolicy)(nil)).Elem() } func (i VMWareReplicationPolicyArray) ToVMWareReplicationPolicyArrayOutput() VMWareReplicationPolicyArrayOutput { return i.ToVMWareReplicationPolicyArrayOutputWithContext(context.Background()) } func (i VMWareReplicationPolicyArray) ToVMWareReplicationPolicyArrayOutputWithContext(ctx context.Context) VMWareReplicationPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VMWareReplicationPolicyArrayOutput) } // VMWareReplicationPolicyMapInput is an input type that accepts VMWareReplicationPolicyMap and VMWareReplicationPolicyMapOutput values. // You can construct a concrete instance of `VMWareReplicationPolicyMapInput` via: // // VMWareReplicationPolicyMap{ "key": VMWareReplicationPolicyArgs{...} } type VMWareReplicationPolicyMapInput interface { pulumi.Input ToVMWareReplicationPolicyMapOutput() VMWareReplicationPolicyMapOutput ToVMWareReplicationPolicyMapOutputWithContext(context.Context) VMWareReplicationPolicyMapOutput } type VMWareReplicationPolicyMap map[string]VMWareReplicationPolicyInput func (VMWareReplicationPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VMWareReplicationPolicy)(nil)).Elem() } func (i VMWareReplicationPolicyMap) ToVMWareReplicationPolicyMapOutput() VMWareReplicationPolicyMapOutput { return i.ToVMWareReplicationPolicyMapOutputWithContext(context.Background()) } func (i VMWareReplicationPolicyMap) ToVMWareReplicationPolicyMapOutputWithContext(ctx context.Context) VMWareReplicationPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VMWareReplicationPolicyMapOutput) } type VMWareReplicationPolicyOutput struct{ *pulumi.OutputState } func (VMWareReplicationPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**VMWareReplicationPolicy)(nil)).Elem() } func (o VMWareReplicationPolicyOutput) ToVMWareReplicationPolicyOutput() VMWareReplicationPolicyOutput { return o } func (o VMWareReplicationPolicyOutput) ToVMWareReplicationPolicyOutputWithContext(ctx context.Context) VMWareReplicationPolicyOutput { return o } // Specifies the frequency at which to create application consistent recovery points. Must between `0` to `720`. func (o VMWareReplicationPolicyOutput) ApplicationConsistentSnapshotFrequencyInMinutes() pulumi.IntOutput { return o.ApplyT(func(v *VMWareReplicationPolicy) pulumi.IntOutput { return v.ApplicationConsistentSnapshotFrequencyInMinutes }).(pulumi.IntOutput) } // The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created. func (o VMWareReplicationPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VMWareReplicationPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the period up to which the recovery points will be retained. Must between `0` to `21600`. func (o VMWareReplicationPolicyOutput) RecoveryPointRetentionInMinutes() pulumi.IntOutput { return o.ApplyT(func(v *VMWareReplicationPolicy) pulumi.IntOutput { return v.RecoveryPointRetentionInMinutes }).(pulumi.IntOutput) } // ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created. func (o VMWareReplicationPolicyOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *VMWareReplicationPolicy) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } type VMWareReplicationPolicyArrayOutput struct{ *pulumi.OutputState } func (VMWareReplicationPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VMWareReplicationPolicy)(nil)).Elem() } func (o VMWareReplicationPolicyArrayOutput) ToVMWareReplicationPolicyArrayOutput() VMWareReplicationPolicyArrayOutput { return o } func (o VMWareReplicationPolicyArrayOutput) ToVMWareReplicationPolicyArrayOutputWithContext(ctx context.Context) VMWareReplicationPolicyArrayOutput { return o } func (o VMWareReplicationPolicyArrayOutput) Index(i pulumi.IntInput) VMWareReplicationPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VMWareReplicationPolicy { return vs[0].([]*VMWareReplicationPolicy)[vs[1].(int)] }).(VMWareReplicationPolicyOutput) } type VMWareReplicationPolicyMapOutput struct{ *pulumi.OutputState } func (VMWareReplicationPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VMWareReplicationPolicy)(nil)).Elem() } func (o VMWareReplicationPolicyMapOutput) ToVMWareReplicationPolicyMapOutput() VMWareReplicationPolicyMapOutput { return o } func (o VMWareReplicationPolicyMapOutput) ToVMWareReplicationPolicyMapOutputWithContext(ctx context.Context) VMWareReplicationPolicyMapOutput { return o } func (o VMWareReplicationPolicyMapOutput) MapIndex(k pulumi.StringInput) VMWareReplicationPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VMWareReplicationPolicy { return vs[0].(map[string]*VMWareReplicationPolicy)[vs[1].(string)] }).(VMWareReplicationPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VMWareReplicationPolicyInput)(nil)).Elem(), &VMWareReplicationPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*VMWareReplicationPolicyArrayInput)(nil)).Elem(), VMWareReplicationPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VMWareReplicationPolicyMapInput)(nil)).Elem(), VMWareReplicationPolicyMap{}) pulumi.RegisterOutputType(VMWareReplicationPolicyOutput{}) pulumi.RegisterOutputType(VMWareReplicationPolicyArrayOutput{}) pulumi.RegisterOutputType(VMWareReplicationPolicyMapOutput{}) }
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/siterecovery/protectionContainerMapping.go
sdk/go/azure/siterecovery/protectionContainerMapping.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure recovery vault protection container mapping. A protection container mapping decides how to translate the protection container when a VM is migrated from one region to another. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // primaryFabric, err := siterecovery.NewFabric(ctx, "primary", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.Location, // }) // if err != nil { // return err // } // secondaryFabric, err := siterecovery.NewFabric(ctx, "secondary", &siterecovery.FabricArgs{ // Name: pulumi.String("secondary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: secondary.Location, // }) // if err != nil { // return err // } // primaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "primary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("primary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // }) // if err != nil { // return err // } // secondaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "secondary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("secondary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: secondaryFabric.Name, // }) // if err != nil { // return err // } // policy, err := siterecovery.NewReplicationPolicy(ctx, "policy", &siterecovery.ReplicationPolicyArgs{ // Name: pulumi.String("policy"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryPointRetentionInMinutes: int(24 * 60), // ApplicationConsistentSnapshotFrequencyInMinutes: int(4 * 60), // }) // if err != nil { // return err // } // _, err = siterecovery.NewProtectionContainerMapping(ctx, "container-mapping", &siterecovery.ProtectionContainerMappingArgs{ // Name: pulumi.String("container-mapping"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // RecoverySourceProtectionContainerName: primaryProtectionContainer.Name, // RecoveryTargetProtectionContainerId: secondaryProtectionContainer.ID(), // RecoveryReplicationPolicyId: policy.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Protection Container Mappings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric1/replicationProtectionContainers/container1/replicationProtectionContainerMappings/mapping1 // ``` type ProtectionContainerMapping struct { pulumi.CustomResourceState // a `automaticUpdate` block defined as below. AutomaticUpdate ProtectionContainerMappingAutomaticUpdateOutput `pulumi:"automaticUpdate"` // The name of the protection container mapping. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringOutput `pulumi:"recoveryFabricName"` // Id of the policy to use for this mapping. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringOutput `pulumi:"recoveryReplicationPolicyId"` // Name of the source protection container to map. Changing this forces a new resource to be created. RecoverySourceProtectionContainerName pulumi.StringOutput `pulumi:"recoverySourceProtectionContainerName"` // Id of target protection container to map to. Changing this forces a new resource to be created. RecoveryTargetProtectionContainerId pulumi.StringOutput `pulumi:"recoveryTargetProtectionContainerId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewProtectionContainerMapping registers a new resource with the given unique name, arguments, and options. func NewProtectionContainerMapping(ctx *pulumi.Context, name string, args *ProtectionContainerMappingArgs, opts ...pulumi.ResourceOption) (*ProtectionContainerMapping, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryFabricName == nil { return nil, errors.New("invalid value for required argument 'RecoveryFabricName'") } if args.RecoveryReplicationPolicyId == nil { return nil, errors.New("invalid value for required argument 'RecoveryReplicationPolicyId'") } if args.RecoverySourceProtectionContainerName == nil { return nil, errors.New("invalid value for required argument 'RecoverySourceProtectionContainerName'") } if args.RecoveryTargetProtectionContainerId == nil { return nil, errors.New("invalid value for required argument 'RecoveryTargetProtectionContainerId'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ProtectionContainerMapping err := ctx.RegisterResource("azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProtectionContainerMapping gets an existing ProtectionContainerMapping 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 GetProtectionContainerMapping(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectionContainerMappingState, opts ...pulumi.ResourceOption) (*ProtectionContainerMapping, error) { var resource ProtectionContainerMapping err := ctx.ReadResource("azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ProtectionContainerMapping resources. type protectionContainerMappingState struct { // a `automaticUpdate` block defined as below. AutomaticUpdate *ProtectionContainerMappingAutomaticUpdate `pulumi:"automaticUpdate"` // The name of the protection container mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. RecoveryFabricName *string `pulumi:"recoveryFabricName"` // Id of the policy to use for this mapping. Changing this forces a new resource to be created. RecoveryReplicationPolicyId *string `pulumi:"recoveryReplicationPolicyId"` // Name of the source protection container to map. Changing this forces a new resource to be created. RecoverySourceProtectionContainerName *string `pulumi:"recoverySourceProtectionContainerName"` // Id of target protection container to map to. Changing this forces a new resource to be created. RecoveryTargetProtectionContainerId *string `pulumi:"recoveryTargetProtectionContainerId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ProtectionContainerMappingState struct { // a `automaticUpdate` block defined as below. AutomaticUpdate ProtectionContainerMappingAutomaticUpdatePtrInput // The name of the protection container mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringPtrInput // Id of the policy to use for this mapping. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringPtrInput // Name of the source protection container to map. Changing this forces a new resource to be created. RecoverySourceProtectionContainerName pulumi.StringPtrInput // Id of target protection container to map to. Changing this forces a new resource to be created. RecoveryTargetProtectionContainerId pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ProtectionContainerMappingState) ElementType() reflect.Type { return reflect.TypeOf((*protectionContainerMappingState)(nil)).Elem() } type protectionContainerMappingArgs struct { // a `automaticUpdate` block defined as below. AutomaticUpdate *ProtectionContainerMappingAutomaticUpdate `pulumi:"automaticUpdate"` // The name of the protection container mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. RecoveryFabricName string `pulumi:"recoveryFabricName"` // Id of the policy to use for this mapping. Changing this forces a new resource to be created. RecoveryReplicationPolicyId string `pulumi:"recoveryReplicationPolicyId"` // Name of the source protection container to map. Changing this forces a new resource to be created. RecoverySourceProtectionContainerName string `pulumi:"recoverySourceProtectionContainerName"` // Id of target protection container to map to. Changing this forces a new resource to be created. RecoveryTargetProtectionContainerId string `pulumi:"recoveryTargetProtectionContainerId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ProtectionContainerMapping resource. type ProtectionContainerMappingArgs struct { // a `automaticUpdate` block defined as below. AutomaticUpdate ProtectionContainerMappingAutomaticUpdatePtrInput // The name of the protection container mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. RecoveryFabricName pulumi.StringInput // Id of the policy to use for this mapping. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringInput // Name of the source protection container to map. Changing this forces a new resource to be created. RecoverySourceProtectionContainerName pulumi.StringInput // Id of target protection container to map to. Changing this forces a new resource to be created. RecoveryTargetProtectionContainerId pulumi.StringInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ProtectionContainerMappingArgs) ElementType() reflect.Type { return reflect.TypeOf((*protectionContainerMappingArgs)(nil)).Elem() } type ProtectionContainerMappingInput interface { pulumi.Input ToProtectionContainerMappingOutput() ProtectionContainerMappingOutput ToProtectionContainerMappingOutputWithContext(ctx context.Context) ProtectionContainerMappingOutput } func (*ProtectionContainerMapping) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainerMapping)(nil)).Elem() } func (i *ProtectionContainerMapping) ToProtectionContainerMappingOutput() ProtectionContainerMappingOutput { return i.ToProtectionContainerMappingOutputWithContext(context.Background()) } func (i *ProtectionContainerMapping) ToProtectionContainerMappingOutputWithContext(ctx context.Context) ProtectionContainerMappingOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingOutput) } // ProtectionContainerMappingArrayInput is an input type that accepts ProtectionContainerMappingArray and ProtectionContainerMappingArrayOutput values. // You can construct a concrete instance of `ProtectionContainerMappingArrayInput` via: // // ProtectionContainerMappingArray{ ProtectionContainerMappingArgs{...} } type ProtectionContainerMappingArrayInput interface { pulumi.Input ToProtectionContainerMappingArrayOutput() ProtectionContainerMappingArrayOutput ToProtectionContainerMappingArrayOutputWithContext(context.Context) ProtectionContainerMappingArrayOutput } type ProtectionContainerMappingArray []ProtectionContainerMappingInput func (ProtectionContainerMappingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectionContainerMapping)(nil)).Elem() } func (i ProtectionContainerMappingArray) ToProtectionContainerMappingArrayOutput() ProtectionContainerMappingArrayOutput { return i.ToProtectionContainerMappingArrayOutputWithContext(context.Background()) } func (i ProtectionContainerMappingArray) ToProtectionContainerMappingArrayOutputWithContext(ctx context.Context) ProtectionContainerMappingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingArrayOutput) } // ProtectionContainerMappingMapInput is an input type that accepts ProtectionContainerMappingMap and ProtectionContainerMappingMapOutput values. // You can construct a concrete instance of `ProtectionContainerMappingMapInput` via: // // ProtectionContainerMappingMap{ "key": ProtectionContainerMappingArgs{...} } type ProtectionContainerMappingMapInput interface { pulumi.Input ToProtectionContainerMappingMapOutput() ProtectionContainerMappingMapOutput ToProtectionContainerMappingMapOutputWithContext(context.Context) ProtectionContainerMappingMapOutput } type ProtectionContainerMappingMap map[string]ProtectionContainerMappingInput func (ProtectionContainerMappingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectionContainerMapping)(nil)).Elem() } func (i ProtectionContainerMappingMap) ToProtectionContainerMappingMapOutput() ProtectionContainerMappingMapOutput { return i.ToProtectionContainerMappingMapOutputWithContext(context.Background()) } func (i ProtectionContainerMappingMap) ToProtectionContainerMappingMapOutputWithContext(ctx context.Context) ProtectionContainerMappingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectionContainerMappingMapOutput) } type ProtectionContainerMappingOutput struct{ *pulumi.OutputState } func (ProtectionContainerMappingOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProtectionContainerMapping)(nil)).Elem() } func (o ProtectionContainerMappingOutput) ToProtectionContainerMappingOutput() ProtectionContainerMappingOutput { return o } func (o ProtectionContainerMappingOutput) ToProtectionContainerMappingOutputWithContext(ctx context.Context) ProtectionContainerMappingOutput { return o } // a `automaticUpdate` block defined as below. func (o ProtectionContainerMappingOutput) AutomaticUpdate() ProtectionContainerMappingAutomaticUpdateOutput { return o.ApplyT(func(v *ProtectionContainerMapping) ProtectionContainerMappingAutomaticUpdateOutput { return v.AutomaticUpdate }).(ProtectionContainerMappingAutomaticUpdateOutput) } // The name of the protection container mapping. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) RecoveryFabricName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.RecoveryFabricName }).(pulumi.StringOutput) } // Id of the policy to use for this mapping. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) RecoveryReplicationPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.RecoveryReplicationPolicyId }).(pulumi.StringOutput) } // Name of the source protection container to map. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) RecoverySourceProtectionContainerName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.RecoverySourceProtectionContainerName }).(pulumi.StringOutput) } // Id of target protection container to map to. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) RecoveryTargetProtectionContainerId() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.RecoveryTargetProtectionContainerId }).(pulumi.StringOutput) } // The name of the vault that should be updated. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. func (o ProtectionContainerMappingOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectionContainerMapping) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ProtectionContainerMappingArrayOutput struct{ *pulumi.OutputState } func (ProtectionContainerMappingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectionContainerMapping)(nil)).Elem() } func (o ProtectionContainerMappingArrayOutput) ToProtectionContainerMappingArrayOutput() ProtectionContainerMappingArrayOutput { return o } func (o ProtectionContainerMappingArrayOutput) ToProtectionContainerMappingArrayOutputWithContext(ctx context.Context) ProtectionContainerMappingArrayOutput { return o } func (o ProtectionContainerMappingArrayOutput) Index(i pulumi.IntInput) ProtectionContainerMappingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProtectionContainerMapping { return vs[0].([]*ProtectionContainerMapping)[vs[1].(int)] }).(ProtectionContainerMappingOutput) } type ProtectionContainerMappingMapOutput struct{ *pulumi.OutputState } func (ProtectionContainerMappingMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectionContainerMapping)(nil)).Elem() } func (o ProtectionContainerMappingMapOutput) ToProtectionContainerMappingMapOutput() ProtectionContainerMappingMapOutput { return o } func (o ProtectionContainerMappingMapOutput) ToProtectionContainerMappingMapOutputWithContext(ctx context.Context) ProtectionContainerMappingMapOutput { return o } func (o ProtectionContainerMappingMapOutput) MapIndex(k pulumi.StringInput) ProtectionContainerMappingOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProtectionContainerMapping { return vs[0].(map[string]*ProtectionContainerMapping)[vs[1].(string)] }).(ProtectionContainerMappingOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerMappingInput)(nil)).Elem(), &ProtectionContainerMapping{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerMappingArrayInput)(nil)).Elem(), ProtectionContainerMappingArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectionContainerMappingMapInput)(nil)).Elem(), ProtectionContainerMappingMap{}) pulumi.RegisterOutputType(ProtectionContainerMappingOutput{}) pulumi.RegisterOutputType(ProtectionContainerMappingArrayOutput{}) pulumi.RegisterOutputType(ProtectionContainerMappingMapOutput{}) }
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/siterecovery/replicationRecoveryPlan.go
sdk/go/azure/siterecovery/replicationRecoveryPlan.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Site Recovery Replication Recovery Plan within a Recovery Services vault. A recovery plan gathers machines into recovery groups for the purpose of failover. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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 { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-replicated-vm-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-replicated-vm-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // primaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "primary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network1"), // ResourceGroupName: primary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // Location: primary.Location, // }) // if err != nil { // return err // } // primarySubnet, err := network.NewSubnet(ctx, "primary", &network.SubnetArgs{ // Name: pulumi.String("network1-subnet"), // ResourceGroupName: primary.Name, // VirtualNetworkName: primaryVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // }) // if err != nil { // return err // } // primaryPublicIp, err := network.NewPublicIp(ctx, "primary", &network.PublicIpArgs{ // Name: pulumi.String("vm-public-ip-primary"), // AllocationMethod: pulumi.String("Static"), // Location: primary.Location, // ResourceGroupName: primary.Name, // Sku: pulumi.String("Basic"), // }) // if err != nil { // return err // } // vmNetworkInterface, err := network.NewNetworkInterface(ctx, "vm", &network.NetworkInterfaceArgs{ // Name: pulumi.String("vm-nic"), // Location: primary.Location, // ResourceGroupName: primary.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("vm"), // SubnetId: primarySubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // PublicIpAddressId: primaryPublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // vm, err := compute.NewVirtualMachine(ctx, "vm", &compute.VirtualMachineArgs{ // Name: pulumi.String("vm"), // Location: primary.Location, // ResourceGroupName: primary.Name, // VmSize: pulumi.String("Standard_B1s"), // NetworkInterfaceIds: pulumi.StringArray{ // vmNetworkInterface.ID(), // }, // StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{ // Name: pulumi.String("vm-os-disk"), // OsType: pulumi.String("Linux"), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // ManagedDiskType: pulumi.String("Premium_LRS"), // }, // OsProfile: &compute.VirtualMachineOsProfileArgs{ // AdminUsername: pulumi.String("test-admin-123"), // AdminPassword: pulumi.String("test-pwd-123"), // ComputerName: pulumi.String("vm"), // }, // OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(false), // }, // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // primaryFabric, err := siterecovery.NewFabric(ctx, "primary", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.Location, // }) // if err != nil { // return err // } // secondaryFabric, err := siterecovery.NewFabric(ctx, "secondary", &siterecovery.FabricArgs{ // Name: pulumi.String("secondary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: secondary.Location, // }) // if err != nil { // return err // } // primaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "primary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("primary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // }) // if err != nil { // return err // } // secondaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "secondary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("secondary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: secondaryFabric.Name, // }) // if err != nil { // return err // } // policy, err := siterecovery.NewReplicationPolicy(ctx, "policy", &siterecovery.ReplicationPolicyArgs{ // Name: pulumi.String("policy"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryPointRetentionInMinutes: int(24 * 60), // ApplicationConsistentSnapshotFrequencyInMinutes: int(4 * 60), // }) // if err != nil { // return err // } // container_mapping, err := siterecovery.NewProtectionContainerMapping(ctx, "container-mapping", &siterecovery.ProtectionContainerMappingArgs{ // Name: pulumi.String("container-mapping"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // RecoverySourceProtectionContainerName: primaryProtectionContainer.Name, // RecoveryTargetProtectionContainerId: secondaryProtectionContainer.ID(), // RecoveryReplicationPolicyId: policy.ID(), // }) // if err != nil { // return err // } // secondaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "secondary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network2"), // ResourceGroupName: secondary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // Location: secondary.Location, // }) // if err != nil { // return err // } // network_mapping, err := siterecovery.NewNetworkMapping(ctx, "network-mapping", &siterecovery.NetworkMappingArgs{ // Name: pulumi.String("network-mapping"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // SourceRecoveryFabricName: primaryFabric.Name, // TargetRecoveryFabricName: secondaryFabric.Name, // SourceNetworkId: primaryVirtualNetwork.ID(), // TargetNetworkId: secondaryVirtualNetwork.ID(), // }) // if err != nil { // return err // } // primaryAccount, err := storage.NewAccount(ctx, "primary", &storage.AccountArgs{ // Name: pulumi.String("primaryrecoverycache"), // Location: primary.Location, // ResourceGroupName: primary.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // secondarySubnet, err := network.NewSubnet(ctx, "secondary", &network.SubnetArgs{ // Name: pulumi.String("network2-subnet"), // ResourceGroupName: secondary.Name, // VirtualNetworkName: secondaryVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // }) // if err != nil { // return err // } // secondaryPublicIp, err := network.NewPublicIp(ctx, "secondary", &network.PublicIpArgs{ // Name: pulumi.String("vm-public-ip-secondary"), // AllocationMethod: pulumi.String("Static"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Basic"), // }) // if err != nil { // return err // } // vm_replication, err := siterecovery.NewReplicatedVM(ctx, "vm-replication", &siterecovery.ReplicatedVMArgs{ // Name: pulumi.String("vm-replication"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // SourceRecoveryFabricName: primaryFabric.Name, // SourceVmId: vm.ID(), // RecoveryReplicationPolicyId: policy.ID(), // SourceRecoveryProtectionContainerName: primaryProtectionContainer.Name, // TargetResourceGroupId: secondary.ID(), // TargetRecoveryFabricId: secondaryFabric.ID(), // TargetRecoveryProtectionContainerId: secondaryProtectionContainer.ID(), // ManagedDisks: siterecovery.ReplicatedVMManagedDiskArray{ // &siterecovery.ReplicatedVMManagedDiskArgs{ // DiskId: vm.StorageOsDisk.ApplyT(func(storageOsDisk compute.VirtualMachineStorageOsDisk) (*string, error) { // return &storageOsDisk.ManagedDiskId, nil // }).(pulumi.StringPtrOutput), // StagingStorageAccountId: primaryAccount.ID(), // TargetResourceGroupId: secondary.ID(), // TargetDiskType: pulumi.String("Premium_LRS"), // TargetReplicaDiskType: pulumi.String("Premium_LRS"), // }, // }, // NetworkInterfaces: siterecovery.ReplicatedVMNetworkInterfaceArray{ // &siterecovery.ReplicatedVMNetworkInterfaceArgs{ // SourceNetworkInterfaceId: vmNetworkInterface.ID(), // TargetSubnetName: secondarySubnet.Name, // RecoveryPublicIpAddressId: secondaryPublicIp.ID(), // }, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // container_mapping, // network_mapping, // })) // if err != nil { // return err // } // _, err = siterecovery.NewReplicationRecoveryPlan(ctx, "example", &siterecovery.ReplicationRecoveryPlanArgs{ // Name: pulumi.String("example-recover-plan"), // RecoveryVaultId: vault.ID(), // SourceRecoveryFabricId: primaryFabric.ID(), // TargetRecoveryFabricId: secondaryFabric.ID(), // ShutdownRecoveryGroup: &siterecovery.ReplicationRecoveryPlanShutdownRecoveryGroupArgs{}, // FailoverRecoveryGroup: &siterecovery.ReplicationRecoveryPlanFailoverRecoveryGroupArgs{}, // BootRecoveryGroups: siterecovery.ReplicationRecoveryPlanBootRecoveryGroupArray{ // &siterecovery.ReplicationRecoveryPlanBootRecoveryGroupArgs{ // ReplicatedProtectedItems: pulumi.StringArray{ // vm_replication.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Fabric can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/replicationRecoveryPlan:ReplicationRecoveryPlan azurerm_site_recovery_replication_recovery_plan.example /subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/groupName/providers/Microsoft.RecoveryServices/vaults/vaultName/replicationRecoveryPlans/planName // ``` type ReplicationRecoveryPlan struct { pulumi.CustomResourceState // An `azureToAzureSettings` block as defined below. AzureToAzureSettings ReplicationRecoveryPlanAzureToAzureSettingsPtrOutput `pulumi:"azureToAzureSettings"` // One or more `bootRecoveryGroup` blocks as defined below. BootRecoveryGroups ReplicationRecoveryPlanBootRecoveryGroupArrayOutput `pulumi:"bootRecoveryGroups"` // One `failoverRecoveryGroup` block as defined below. FailoverRecoveryGroup ReplicationRecoveryPlanFailoverRecoveryGroupOutput `pulumi:"failoverRecoveryGroup"` // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringOutput `pulumi:"recoveryVaultId"` // One `shutdownRecoveryGroup` block as defined below. ShutdownRecoveryGroup ReplicationRecoveryPlanShutdownRecoveryGroupOutput `pulumi:"shutdownRecoveryGroup"` // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. SourceRecoveryFabricId pulumi.StringOutput `pulumi:"sourceRecoveryFabricId"` // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. TargetRecoveryFabricId pulumi.StringOutput `pulumi:"targetRecoveryFabricId"` } // NewReplicationRecoveryPlan registers a new resource with the given unique name, arguments, and options. func NewReplicationRecoveryPlan(ctx *pulumi.Context, name string, args *ReplicationRecoveryPlanArgs, opts ...pulumi.ResourceOption) (*ReplicationRecoveryPlan, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BootRecoveryGroups == nil { return nil, errors.New("invalid value for required argument 'BootRecoveryGroups'") } if args.FailoverRecoveryGroup == nil { return nil, errors.New("invalid value for required argument 'FailoverRecoveryGroup'") } if args.RecoveryVaultId == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultId'") } if args.ShutdownRecoveryGroup == nil { return nil, errors.New("invalid value for required argument 'ShutdownRecoveryGroup'") } if args.SourceRecoveryFabricId == nil { return nil, errors.New("invalid value for required argument 'SourceRecoveryFabricId'") } if args.TargetRecoveryFabricId == nil { return nil, errors.New("invalid value for required argument 'TargetRecoveryFabricId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ReplicationRecoveryPlan err := ctx.RegisterResource("azure:siterecovery/replicationRecoveryPlan:ReplicationRecoveryPlan", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetReplicationRecoveryPlan gets an existing ReplicationRecoveryPlan 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 GetReplicationRecoveryPlan(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ReplicationRecoveryPlanState, opts ...pulumi.ResourceOption) (*ReplicationRecoveryPlan, error) { var resource ReplicationRecoveryPlan err := ctx.ReadResource("azure:siterecovery/replicationRecoveryPlan:ReplicationRecoveryPlan", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ReplicationRecoveryPlan resources. type replicationRecoveryPlanState struct { // An `azureToAzureSettings` block as defined below. AzureToAzureSettings *ReplicationRecoveryPlanAzureToAzureSettings `pulumi:"azureToAzureSettings"` // One or more `bootRecoveryGroup` blocks as defined below. BootRecoveryGroups []ReplicationRecoveryPlanBootRecoveryGroup `pulumi:"bootRecoveryGroups"` // One `failoverRecoveryGroup` block as defined below. FailoverRecoveryGroup *ReplicationRecoveryPlanFailoverRecoveryGroup `pulumi:"failoverRecoveryGroup"` // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId *string `pulumi:"recoveryVaultId"` // One `shutdownRecoveryGroup` block as defined below. ShutdownRecoveryGroup *ReplicationRecoveryPlanShutdownRecoveryGroup `pulumi:"shutdownRecoveryGroup"` // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. SourceRecoveryFabricId *string `pulumi:"sourceRecoveryFabricId"` // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. TargetRecoveryFabricId *string `pulumi:"targetRecoveryFabricId"` } type ReplicationRecoveryPlanState struct { // An `azureToAzureSettings` block as defined below. AzureToAzureSettings ReplicationRecoveryPlanAzureToAzureSettingsPtrInput // One or more `bootRecoveryGroup` blocks as defined below. BootRecoveryGroups ReplicationRecoveryPlanBootRecoveryGroupArrayInput // One `failoverRecoveryGroup` block as defined below. FailoverRecoveryGroup ReplicationRecoveryPlanFailoverRecoveryGroupPtrInput // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringPtrInput // One `shutdownRecoveryGroup` block as defined below. ShutdownRecoveryGroup ReplicationRecoveryPlanShutdownRecoveryGroupPtrInput // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. SourceRecoveryFabricId pulumi.StringPtrInput // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. TargetRecoveryFabricId pulumi.StringPtrInput } func (ReplicationRecoveryPlanState) ElementType() reflect.Type { return reflect.TypeOf((*replicationRecoveryPlanState)(nil)).Elem() } type replicationRecoveryPlanArgs struct { // An `azureToAzureSettings` block as defined below. AzureToAzureSettings *ReplicationRecoveryPlanAzureToAzureSettings `pulumi:"azureToAzureSettings"` // One or more `bootRecoveryGroup` blocks as defined below. BootRecoveryGroups []ReplicationRecoveryPlanBootRecoveryGroup `pulumi:"bootRecoveryGroups"` // One `failoverRecoveryGroup` block as defined below. FailoverRecoveryGroup ReplicationRecoveryPlanFailoverRecoveryGroup `pulumi:"failoverRecoveryGroup"` // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId string `pulumi:"recoveryVaultId"` // One `shutdownRecoveryGroup` block as defined below. ShutdownRecoveryGroup ReplicationRecoveryPlanShutdownRecoveryGroup `pulumi:"shutdownRecoveryGroup"` // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. SourceRecoveryFabricId string `pulumi:"sourceRecoveryFabricId"` // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. TargetRecoveryFabricId string `pulumi:"targetRecoveryFabricId"` } // The set of arguments for constructing a ReplicationRecoveryPlan resource. type ReplicationRecoveryPlanArgs struct { // An `azureToAzureSettings` block as defined below. AzureToAzureSettings ReplicationRecoveryPlanAzureToAzureSettingsPtrInput // One or more `bootRecoveryGroup` blocks as defined below. BootRecoveryGroups ReplicationRecoveryPlanBootRecoveryGroupArrayInput // One `failoverRecoveryGroup` block as defined below. FailoverRecoveryGroup ReplicationRecoveryPlanFailoverRecoveryGroupInput // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultId pulumi.StringInput // One `shutdownRecoveryGroup` block as defined below. ShutdownRecoveryGroup ReplicationRecoveryPlanShutdownRecoveryGroupInput // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. SourceRecoveryFabricId pulumi.StringInput // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. TargetRecoveryFabricId pulumi.StringInput } func (ReplicationRecoveryPlanArgs) ElementType() reflect.Type { return reflect.TypeOf((*replicationRecoveryPlanArgs)(nil)).Elem() } type ReplicationRecoveryPlanInput interface { pulumi.Input ToReplicationRecoveryPlanOutput() ReplicationRecoveryPlanOutput ToReplicationRecoveryPlanOutputWithContext(ctx context.Context) ReplicationRecoveryPlanOutput } func (*ReplicationRecoveryPlan) ElementType() reflect.Type { return reflect.TypeOf((**ReplicationRecoveryPlan)(nil)).Elem() } func (i *ReplicationRecoveryPlan) ToReplicationRecoveryPlanOutput() ReplicationRecoveryPlanOutput { return i.ToReplicationRecoveryPlanOutputWithContext(context.Background()) } func (i *ReplicationRecoveryPlan) ToReplicationRecoveryPlanOutputWithContext(ctx context.Context) ReplicationRecoveryPlanOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationRecoveryPlanOutput) } // ReplicationRecoveryPlanArrayInput is an input type that accepts ReplicationRecoveryPlanArray and ReplicationRecoveryPlanArrayOutput values. // You can construct a concrete instance of `ReplicationRecoveryPlanArrayInput` via: // // ReplicationRecoveryPlanArray{ ReplicationRecoveryPlanArgs{...} } type ReplicationRecoveryPlanArrayInput interface { pulumi.Input ToReplicationRecoveryPlanArrayOutput() ReplicationRecoveryPlanArrayOutput ToReplicationRecoveryPlanArrayOutputWithContext(context.Context) ReplicationRecoveryPlanArrayOutput } type ReplicationRecoveryPlanArray []ReplicationRecoveryPlanInput func (ReplicationRecoveryPlanArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReplicationRecoveryPlan)(nil)).Elem() } func (i ReplicationRecoveryPlanArray) ToReplicationRecoveryPlanArrayOutput() ReplicationRecoveryPlanArrayOutput { return i.ToReplicationRecoveryPlanArrayOutputWithContext(context.Background()) } func (i ReplicationRecoveryPlanArray) ToReplicationRecoveryPlanArrayOutputWithContext(ctx context.Context) ReplicationRecoveryPlanArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationRecoveryPlanArrayOutput) } // ReplicationRecoveryPlanMapInput is an input type that accepts ReplicationRecoveryPlanMap and ReplicationRecoveryPlanMapOutput values. // You can construct a concrete instance of `ReplicationRecoveryPlanMapInput` via: // // ReplicationRecoveryPlanMap{ "key": ReplicationRecoveryPlanArgs{...} } type ReplicationRecoveryPlanMapInput interface { pulumi.Input ToReplicationRecoveryPlanMapOutput() ReplicationRecoveryPlanMapOutput ToReplicationRecoveryPlanMapOutputWithContext(context.Context) ReplicationRecoveryPlanMapOutput } type ReplicationRecoveryPlanMap map[string]ReplicationRecoveryPlanInput func (ReplicationRecoveryPlanMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReplicationRecoveryPlan)(nil)).Elem() } func (i ReplicationRecoveryPlanMap) ToReplicationRecoveryPlanMapOutput() ReplicationRecoveryPlanMapOutput { return i.ToReplicationRecoveryPlanMapOutputWithContext(context.Background()) } func (i ReplicationRecoveryPlanMap) ToReplicationRecoveryPlanMapOutputWithContext(ctx context.Context) ReplicationRecoveryPlanMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ReplicationRecoveryPlanMapOutput) } type ReplicationRecoveryPlanOutput struct{ *pulumi.OutputState } func (ReplicationRecoveryPlanOutput) ElementType() reflect.Type { return reflect.TypeOf((**ReplicationRecoveryPlan)(nil)).Elem() } func (o ReplicationRecoveryPlanOutput) ToReplicationRecoveryPlanOutput() ReplicationRecoveryPlanOutput { return o } func (o ReplicationRecoveryPlanOutput) ToReplicationRecoveryPlanOutputWithContext(ctx context.Context) ReplicationRecoveryPlanOutput { return o } // An `azureToAzureSettings` block as defined below. func (o ReplicationRecoveryPlanOutput) AzureToAzureSettings() ReplicationRecoveryPlanAzureToAzureSettingsPtrOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) ReplicationRecoveryPlanAzureToAzureSettingsPtrOutput { return v.AzureToAzureSettings }).(ReplicationRecoveryPlanAzureToAzureSettingsPtrOutput) } // One or more `bootRecoveryGroup` blocks as defined below. func (o ReplicationRecoveryPlanOutput) BootRecoveryGroups() ReplicationRecoveryPlanBootRecoveryGroupArrayOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) ReplicationRecoveryPlanBootRecoveryGroupArrayOutput { return v.BootRecoveryGroups }).(ReplicationRecoveryPlanBootRecoveryGroupArrayOutput) } // One `failoverRecoveryGroup` block as defined below. func (o ReplicationRecoveryPlanOutput) FailoverRecoveryGroup() ReplicationRecoveryPlanFailoverRecoveryGroupOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) ReplicationRecoveryPlanFailoverRecoveryGroupOutput { return v.FailoverRecoveryGroup }).(ReplicationRecoveryPlanFailoverRecoveryGroupOutput) } // The name of the Replication Plan. The name can contain only letters, numbers, and hyphens. It should start with a letter and end with a letter or a number. Can be a maximum of 63 characters. Changing this forces a new resource to be created. func (o ReplicationRecoveryPlanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the vault that should be updated. Changing this forces a new resource to be created. func (o ReplicationRecoveryPlanOutput) RecoveryVaultId() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) pulumi.StringOutput { return v.RecoveryVaultId }).(pulumi.StringOutput) } // One `shutdownRecoveryGroup` block as defined below. func (o ReplicationRecoveryPlanOutput) ShutdownRecoveryGroup() ReplicationRecoveryPlanShutdownRecoveryGroupOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) ReplicationRecoveryPlanShutdownRecoveryGroupOutput { return v.ShutdownRecoveryGroup }).(ReplicationRecoveryPlanShutdownRecoveryGroupOutput) } // ID of source fabric to be recovered from. Changing this forces a new Replication Plan to be created. func (o ReplicationRecoveryPlanOutput) SourceRecoveryFabricId() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) pulumi.StringOutput { return v.SourceRecoveryFabricId }).(pulumi.StringOutput) } // ID of target fabric to recover. Changing this forces a new Replication Plan to be created. func (o ReplicationRecoveryPlanOutput) TargetRecoveryFabricId() pulumi.StringOutput { return o.ApplyT(func(v *ReplicationRecoveryPlan) pulumi.StringOutput { return v.TargetRecoveryFabricId }).(pulumi.StringOutput) } type ReplicationRecoveryPlanArrayOutput struct{ *pulumi.OutputState } func (ReplicationRecoveryPlanArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ReplicationRecoveryPlan)(nil)).Elem() } func (o ReplicationRecoveryPlanArrayOutput) ToReplicationRecoveryPlanArrayOutput() ReplicationRecoveryPlanArrayOutput { return o } func (o ReplicationRecoveryPlanArrayOutput) ToReplicationRecoveryPlanArrayOutputWithContext(ctx context.Context) ReplicationRecoveryPlanArrayOutput { return o } func (o ReplicationRecoveryPlanArrayOutput) Index(i pulumi.IntInput) ReplicationRecoveryPlanOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationRecoveryPlan { return vs[0].([]*ReplicationRecoveryPlan)[vs[1].(int)] }).(ReplicationRecoveryPlanOutput) } type ReplicationRecoveryPlanMapOutput struct{ *pulumi.OutputState } func (ReplicationRecoveryPlanMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ReplicationRecoveryPlan)(nil)).Elem() } func (o ReplicationRecoveryPlanMapOutput) ToReplicationRecoveryPlanMapOutput() ReplicationRecoveryPlanMapOutput { return o } func (o ReplicationRecoveryPlanMapOutput) ToReplicationRecoveryPlanMapOutputWithContext(ctx context.Context) ReplicationRecoveryPlanMapOutput { return o } func (o ReplicationRecoveryPlanMapOutput) MapIndex(k pulumi.StringInput) ReplicationRecoveryPlanOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationRecoveryPlan { return vs[0].(map[string]*ReplicationRecoveryPlan)[vs[1].(string)] }).(ReplicationRecoveryPlanOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ReplicationRecoveryPlanInput)(nil)).Elem(), &ReplicationRecoveryPlan{}) pulumi.RegisterInputType(reflect.TypeOf((*ReplicationRecoveryPlanArrayInput)(nil)).Elem(), ReplicationRecoveryPlanArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ReplicationRecoveryPlanMapInput)(nil)).Elem(), ReplicationRecoveryPlanMap{}) pulumi.RegisterOutputType(ReplicationRecoveryPlanOutput{}) pulumi.RegisterOutputType(ReplicationRecoveryPlanArrayOutput{}) pulumi.RegisterOutputType(ReplicationRecoveryPlanMapOutput{}) }
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/siterecovery/getReplicationPolicy.go
sdk/go/azure/siterecovery/getReplicationPolicy.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 siterecovery 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 Azure Site Recovery replication policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := siterecovery.LookupReplicationPolicy(ctx, &siterecovery.LookupReplicationPolicyArgs{ // Name: "replication-policy", // RecoveryVaultName: "tfex-recovery_vault", // ResourceGroupName: "tfex-resource_group", // }, 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.RecoveryServices` - 2024-04-01 func LookupReplicationPolicy(ctx *pulumi.Context, args *LookupReplicationPolicyArgs, opts ...pulumi.InvokeOption) (*LookupReplicationPolicyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupReplicationPolicyResult err := ctx.Invoke("azure:siterecovery/getReplicationPolicy:getReplicationPolicy", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getReplicationPolicy. type LookupReplicationPolicyArgs struct { // Specifies the name of the Azure Site Recovery replication policy. Name string `pulumi:"name"` // The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated Azure Site Recovery replication policy resides. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getReplicationPolicy. type LookupReplicationPolicyResult struct { // Specifies the frequency (in minutes) at which to create application consistent recovery. ApplicationConsistentSnapshotFrequencyInMinutes int `pulumi:"applicationConsistentSnapshotFrequencyInMinutes"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The duration in minutes for which the recovery points need to be stored. RecoveryPointRetentionInMinutes int `pulumi:"recoveryPointRetentionInMinutes"` RecoveryVaultName string `pulumi:"recoveryVaultName"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupReplicationPolicyOutput(ctx *pulumi.Context, args LookupReplicationPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupReplicationPolicyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupReplicationPolicyResultOutput, error) { args := v.(LookupReplicationPolicyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:siterecovery/getReplicationPolicy:getReplicationPolicy", args, LookupReplicationPolicyResultOutput{}, options).(LookupReplicationPolicyResultOutput), nil }).(LookupReplicationPolicyResultOutput) } // A collection of arguments for invoking getReplicationPolicy. type LookupReplicationPolicyOutputArgs struct { // Specifies the name of the Azure Site Recovery replication policy. Name pulumi.StringInput `pulumi:"name"` // The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth. RecoveryVaultName pulumi.StringInput `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated Azure Site Recovery replication policy resides. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupReplicationPolicyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupReplicationPolicyArgs)(nil)).Elem() } // A collection of values returned by getReplicationPolicy. type LookupReplicationPolicyResultOutput struct{ *pulumi.OutputState } func (LookupReplicationPolicyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupReplicationPolicyResult)(nil)).Elem() } func (o LookupReplicationPolicyResultOutput) ToLookupReplicationPolicyResultOutput() LookupReplicationPolicyResultOutput { return o } func (o LookupReplicationPolicyResultOutput) ToLookupReplicationPolicyResultOutputWithContext(ctx context.Context) LookupReplicationPolicyResultOutput { return o } // Specifies the frequency (in minutes) at which to create application consistent recovery. func (o LookupReplicationPolicyResultOutput) ApplicationConsistentSnapshotFrequencyInMinutes() pulumi.IntOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) int { return v.ApplicationConsistentSnapshotFrequencyInMinutes }).(pulumi.IntOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupReplicationPolicyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupReplicationPolicyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) string { return v.Name }).(pulumi.StringOutput) } // The duration in minutes for which the recovery points need to be stored. func (o LookupReplicationPolicyResultOutput) RecoveryPointRetentionInMinutes() pulumi.IntOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) int { return v.RecoveryPointRetentionInMinutes }).(pulumi.IntOutput) } func (o LookupReplicationPolicyResultOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) string { return v.RecoveryVaultName }).(pulumi.StringOutput) } func (o LookupReplicationPolicyResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupReplicationPolicyResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupReplicationPolicyResultOutput{}) }
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/siterecovery/getProtectionContainer.go
sdk/go/azure/siterecovery/getProtectionContainer.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 siterecovery 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 site recovery services protection container. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := siterecovery.LookupProtectionContainer(ctx, &siterecovery.LookupProtectionContainerArgs{ // Name: "primary-container", // RecoveryVaultName: "tfex-recovery_vault", // ResourceGroupName: "tfex-resource_group", // RecoveryFabricName: "primary-fabric", // }, 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.RecoveryServices` - 2024-04-01 func LookupProtectionContainer(ctx *pulumi.Context, args *LookupProtectionContainerArgs, opts ...pulumi.InvokeOption) (*LookupProtectionContainerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProtectionContainerResult err := ctx.Invoke("azure:siterecovery/getProtectionContainer:getProtectionContainer", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getProtectionContainer. type LookupProtectionContainerArgs struct { // Specifies the name of the protection container. Name string `pulumi:"name"` // The name of the fabric that contains the protection container. RecoveryFabricName string `pulumi:"recoveryFabricName"` // The name of the Recovery Services Vault that the protection container is associated witth. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated protection container resides. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getProtectionContainer. type LookupProtectionContainerResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` RecoveryFabricName string `pulumi:"recoveryFabricName"` RecoveryVaultName string `pulumi:"recoveryVaultName"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupProtectionContainerOutput(ctx *pulumi.Context, args LookupProtectionContainerOutputArgs, opts ...pulumi.InvokeOption) LookupProtectionContainerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupProtectionContainerResultOutput, error) { args := v.(LookupProtectionContainerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:siterecovery/getProtectionContainer:getProtectionContainer", args, LookupProtectionContainerResultOutput{}, options).(LookupProtectionContainerResultOutput), nil }).(LookupProtectionContainerResultOutput) } // A collection of arguments for invoking getProtectionContainer. type LookupProtectionContainerOutputArgs struct { // Specifies the name of the protection container. Name pulumi.StringInput `pulumi:"name"` // The name of the fabric that contains the protection container. RecoveryFabricName pulumi.StringInput `pulumi:"recoveryFabricName"` // The name of the Recovery Services Vault that the protection container is associated witth. RecoveryVaultName pulumi.StringInput `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated protection container resides. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupProtectionContainerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupProtectionContainerArgs)(nil)).Elem() } // A collection of values returned by getProtectionContainer. type LookupProtectionContainerResultOutput struct{ *pulumi.OutputState } func (LookupProtectionContainerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupProtectionContainerResult)(nil)).Elem() } func (o LookupProtectionContainerResultOutput) ToLookupProtectionContainerResultOutput() LookupProtectionContainerResultOutput { return o } func (o LookupProtectionContainerResultOutput) ToLookupProtectionContainerResultOutputWithContext(ctx context.Context) LookupProtectionContainerResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupProtectionContainerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupProtectionContainerResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupProtectionContainerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupProtectionContainerResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupProtectionContainerResultOutput) RecoveryFabricName() pulumi.StringOutput { return o.ApplyT(func(v LookupProtectionContainerResult) string { return v.RecoveryFabricName }).(pulumi.StringOutput) } func (o LookupProtectionContainerResultOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v LookupProtectionContainerResult) string { return v.RecoveryVaultName }).(pulumi.StringOutput) } func (o LookupProtectionContainerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupProtectionContainerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupProtectionContainerResultOutput{}) }
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/siterecovery/fabric.go
sdk/go/azure/siterecovery/fabric.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Site Recovery Replication Fabric within a Recovery Services vault. Only Azure fabrics are supported at this time. Replication Fabrics serve as a container within an Azure region for other Site Recovery resources such as protection containers, protected items, network mappings. // // ## 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/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-network-mapping-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = siterecovery.NewFabric(ctx, "fabric", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Fabric can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/fabric:Fabric myfabric /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name // ``` type Fabric struct { pulumi.CustomResourceState // In what region should the fabric be located. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewFabric registers a new resource with the given unique name, arguments, and options. func NewFabric(ctx *pulumi.Context, name string, args *FabricArgs, opts ...pulumi.ResourceOption) (*Fabric, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Fabric err := ctx.RegisterResource("azure:siterecovery/fabric:Fabric", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFabric gets an existing Fabric 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 GetFabric(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FabricState, opts ...pulumi.ResourceOption) (*Fabric, error) { var resource Fabric err := ctx.ReadResource("azure:siterecovery/fabric:Fabric", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Fabric resources. type fabricState struct { // In what region should the fabric be located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type FabricState struct { // In what region should the fabric be located. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (FabricState) ElementType() reflect.Type { return reflect.TypeOf((*fabricState)(nil)).Elem() } type fabricArgs struct { // In what region should the fabric be located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the network mapping. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a Fabric resource. type FabricArgs struct { // In what region should the fabric be located. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the network mapping. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (FabricArgs) ElementType() reflect.Type { return reflect.TypeOf((*fabricArgs)(nil)).Elem() } type FabricInput interface { pulumi.Input ToFabricOutput() FabricOutput ToFabricOutputWithContext(ctx context.Context) FabricOutput } func (*Fabric) ElementType() reflect.Type { return reflect.TypeOf((**Fabric)(nil)).Elem() } func (i *Fabric) ToFabricOutput() FabricOutput { return i.ToFabricOutputWithContext(context.Background()) } func (i *Fabric) ToFabricOutputWithContext(ctx context.Context) FabricOutput { return pulumi.ToOutputWithContext(ctx, i).(FabricOutput) } // FabricArrayInput is an input type that accepts FabricArray and FabricArrayOutput values. // You can construct a concrete instance of `FabricArrayInput` via: // // FabricArray{ FabricArgs{...} } type FabricArrayInput interface { pulumi.Input ToFabricArrayOutput() FabricArrayOutput ToFabricArrayOutputWithContext(context.Context) FabricArrayOutput } type FabricArray []FabricInput func (FabricArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Fabric)(nil)).Elem() } func (i FabricArray) ToFabricArrayOutput() FabricArrayOutput { return i.ToFabricArrayOutputWithContext(context.Background()) } func (i FabricArray) ToFabricArrayOutputWithContext(ctx context.Context) FabricArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FabricArrayOutput) } // FabricMapInput is an input type that accepts FabricMap and FabricMapOutput values. // You can construct a concrete instance of `FabricMapInput` via: // // FabricMap{ "key": FabricArgs{...} } type FabricMapInput interface { pulumi.Input ToFabricMapOutput() FabricMapOutput ToFabricMapOutputWithContext(context.Context) FabricMapOutput } type FabricMap map[string]FabricInput func (FabricMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Fabric)(nil)).Elem() } func (i FabricMap) ToFabricMapOutput() FabricMapOutput { return i.ToFabricMapOutputWithContext(context.Background()) } func (i FabricMap) ToFabricMapOutputWithContext(ctx context.Context) FabricMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FabricMapOutput) } type FabricOutput struct{ *pulumi.OutputState } func (FabricOutput) ElementType() reflect.Type { return reflect.TypeOf((**Fabric)(nil)).Elem() } func (o FabricOutput) ToFabricOutput() FabricOutput { return o } func (o FabricOutput) ToFabricOutputWithContext(ctx context.Context) FabricOutput { return o } // In what region should the fabric be located. Changing this forces a new resource to be created. func (o FabricOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Fabric) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the network mapping. Changing this forces a new resource to be created. func (o FabricOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Fabric) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the vault that should be updated. Changing this forces a new resource to be created. func (o FabricOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *Fabric) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. func (o FabricOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Fabric) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type FabricArrayOutput struct{ *pulumi.OutputState } func (FabricArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Fabric)(nil)).Elem() } func (o FabricArrayOutput) ToFabricArrayOutput() FabricArrayOutput { return o } func (o FabricArrayOutput) ToFabricArrayOutputWithContext(ctx context.Context) FabricArrayOutput { return o } func (o FabricArrayOutput) Index(i pulumi.IntInput) FabricOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Fabric { return vs[0].([]*Fabric)[vs[1].(int)] }).(FabricOutput) } type FabricMapOutput struct{ *pulumi.OutputState } func (FabricMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Fabric)(nil)).Elem() } func (o FabricMapOutput) ToFabricMapOutput() FabricMapOutput { return o } func (o FabricMapOutput) ToFabricMapOutputWithContext(ctx context.Context) FabricMapOutput { return o } func (o FabricMapOutput) MapIndex(k pulumi.StringInput) FabricOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Fabric { return vs[0].(map[string]*Fabric)[vs[1].(string)] }).(FabricOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FabricInput)(nil)).Elem(), &Fabric{}) pulumi.RegisterInputType(reflect.TypeOf((*FabricArrayInput)(nil)).Elem(), FabricArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FabricMapInput)(nil)).Elem(), FabricMap{}) pulumi.RegisterOutputType(FabricOutput{}) pulumi.RegisterOutputType(FabricArrayOutput{}) pulumi.RegisterOutputType(FabricMapOutput{}) }
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/siterecovery/replicatedVM.go
sdk/go/azure/siterecovery/replicatedVM.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 siterecovery import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VM replicated using Azure Site Recovery (Azure to Azure only). A replicated VM keeps a copiously updated image of the VM in another region in order to be able to start the VM in that region in case of a disaster. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "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 { // primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-replicated-vm-primary"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{ // Name: pulumi.String("tfex-replicated-vm-secondary"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // primaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "primary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network1"), // ResourceGroupName: primary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // Location: primary.Location, // }) // if err != nil { // return err // } // primarySubnet, err := network.NewSubnet(ctx, "primary", &network.SubnetArgs{ // Name: pulumi.String("network1-subnet"), // ResourceGroupName: primary.Name, // VirtualNetworkName: primaryVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("192.168.1.0/24"), // }, // }) // if err != nil { // return err // } // primaryPublicIp, err := network.NewPublicIp(ctx, "primary", &network.PublicIpArgs{ // Name: pulumi.String("vm-public-ip-primary"), // AllocationMethod: pulumi.String("Static"), // Location: primary.Location, // ResourceGroupName: primary.Name, // Sku: pulumi.String("Basic"), // }) // if err != nil { // return err // } // vmNetworkInterface, err := network.NewNetworkInterface(ctx, "vm", &network.NetworkInterfaceArgs{ // Name: pulumi.String("vm-nic"), // Location: primary.Location, // ResourceGroupName: primary.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("vm"), // SubnetId: primarySubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // PublicIpAddressId: primaryPublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // vm, err := compute.NewVirtualMachine(ctx, "vm", &compute.VirtualMachineArgs{ // Name: pulumi.String("vm"), // Location: primary.Location, // ResourceGroupName: primary.Name, // VmSize: pulumi.String("Standard_B1s"), // NetworkInterfaceIds: pulumi.StringArray{ // vmNetworkInterface.ID(), // }, // StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{ // Name: pulumi.String("vm-os-disk"), // OsType: pulumi.String("Linux"), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // ManagedDiskType: pulumi.String("Premium_LRS"), // }, // OsProfile: &compute.VirtualMachineOsProfileArgs{ // AdminUsername: pulumi.String("test-admin-123"), // AdminPassword: pulumi.String("test-pwd-123"), // ComputerName: pulumi.String("vm"), // }, // OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(false), // }, // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // primaryFabric, err := siterecovery.NewFabric(ctx, "primary", &siterecovery.FabricArgs{ // Name: pulumi.String("primary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: primary.Location, // }) // if err != nil { // return err // } // secondaryFabric, err := siterecovery.NewFabric(ctx, "secondary", &siterecovery.FabricArgs{ // Name: pulumi.String("secondary-fabric"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // Location: secondary.Location, // }) // if err != nil { // return err // } // primaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "primary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("primary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // }) // if err != nil { // return err // } // secondaryProtectionContainer, err := siterecovery.NewProtectionContainer(ctx, "secondary", &siterecovery.ProtectionContainerArgs{ // Name: pulumi.String("secondary-protection-container"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: secondaryFabric.Name, // }) // if err != nil { // return err // } // policy, err := siterecovery.NewReplicationPolicy(ctx, "policy", &siterecovery.ReplicationPolicyArgs{ // Name: pulumi.String("policy"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryPointRetentionInMinutes: int(24 * 60), // ApplicationConsistentSnapshotFrequencyInMinutes: int(4 * 60), // }) // if err != nil { // return err // } // container_mapping, err := siterecovery.NewProtectionContainerMapping(ctx, "container-mapping", &siterecovery.ProtectionContainerMappingArgs{ // Name: pulumi.String("container-mapping"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // RecoveryFabricName: primaryFabric.Name, // RecoverySourceProtectionContainerName: primaryProtectionContainer.Name, // RecoveryTargetProtectionContainerId: secondaryProtectionContainer.ID(), // RecoveryReplicationPolicyId: policy.ID(), // }) // if err != nil { // return err // } // secondaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "secondary", &network.VirtualNetworkArgs{ // Name: pulumi.String("network2"), // ResourceGroupName: secondary.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // Location: secondary.Location, // }) // if err != nil { // return err // } // network_mapping, err := siterecovery.NewNetworkMapping(ctx, "network-mapping", &siterecovery.NetworkMappingArgs{ // Name: pulumi.String("network-mapping"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // SourceRecoveryFabricName: primaryFabric.Name, // TargetRecoveryFabricName: secondaryFabric.Name, // SourceNetworkId: primaryVirtualNetwork.ID(), // TargetNetworkId: secondaryVirtualNetwork.ID(), // }) // if err != nil { // return err // } // primaryAccount, err := storage.NewAccount(ctx, "primary", &storage.AccountArgs{ // Name: pulumi.String("primaryrecoverycache"), // Location: primary.Location, // ResourceGroupName: primary.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // secondarySubnet, err := network.NewSubnet(ctx, "secondary", &network.SubnetArgs{ // Name: pulumi.String("network2-subnet"), // ResourceGroupName: secondary.Name, // VirtualNetworkName: secondaryVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("192.168.2.0/24"), // }, // }) // if err != nil { // return err // } // secondaryPublicIp, err := network.NewPublicIp(ctx, "secondary", &network.PublicIpArgs{ // Name: pulumi.String("vm-public-ip-secondary"), // AllocationMethod: pulumi.String("Static"), // Location: secondary.Location, // ResourceGroupName: secondary.Name, // Sku: pulumi.String("Basic"), // }) // if err != nil { // return err // } // _, err = siterecovery.NewReplicatedVM(ctx, "vm-replication", &siterecovery.ReplicatedVMArgs{ // Name: pulumi.String("vm-replication"), // ResourceGroupName: secondary.Name, // RecoveryVaultName: vault.Name, // SourceRecoveryFabricName: primaryFabric.Name, // SourceVmId: vm.ID(), // RecoveryReplicationPolicyId: policy.ID(), // SourceRecoveryProtectionContainerName: primaryProtectionContainer.Name, // TargetResourceGroupId: secondary.ID(), // TargetRecoveryFabricId: secondaryFabric.ID(), // TargetRecoveryProtectionContainerId: secondaryProtectionContainer.ID(), // ManagedDisks: siterecovery.ReplicatedVMManagedDiskArray{ // &siterecovery.ReplicatedVMManagedDiskArgs{ // DiskId: vm.StorageOsDisk.ApplyT(func(storageOsDisk compute.VirtualMachineStorageOsDisk) (*string, error) { // return &storageOsDisk.ManagedDiskId, nil // }).(pulumi.StringPtrOutput), // StagingStorageAccountId: primaryAccount.ID(), // TargetResourceGroupId: secondary.ID(), // TargetDiskType: pulumi.String("Premium_LRS"), // TargetReplicaDiskType: pulumi.String("Premium_LRS"), // }, // }, // NetworkInterfaces: siterecovery.ReplicatedVMNetworkInterfaceArray{ // &siterecovery.ReplicatedVMNetworkInterfaceArgs{ // SourceNetworkInterfaceId: vmNetworkInterface.ID(), // TargetSubnetName: secondarySubnet.Name, // RecoveryPublicIpAddressId: secondaryPublicIp.ID(), // }, // }, // }, pulumi.DependsOn([]pulumi.Resource{ // container_mapping, // network_mapping, // })) // 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.RecoveryServices` - 2024-04-01 // // ## Import // // Site Recovery Replicated VM's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:siterecovery/replicatedVM:ReplicatedVM vmreplication /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name/replicationProtectionContainers/protection-container-name/replicationProtectedItems/vm-replication-name // ``` type ReplicatedVM struct { pulumi.CustomResourceState // One or more `managedDisk` block as defined below. Changing this forces a new resource to be created. ManagedDisks ReplicatedVMManagedDiskArrayOutput `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName pulumi.StringPtrOutput `pulumi:"multiVmGroupName"` // The name of the replication for the replicated VM. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces ReplicatedVMNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"` // Id of the policy to use for this replicated vm. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringOutput `pulumi:"recoveryReplicationPolicyId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Name of fabric that should contain this replication. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringOutput `pulumi:"sourceRecoveryFabricName"` // Name of the protection container to use. Changing this forces a new resource to be created. SourceRecoveryProtectionContainerName pulumi.StringOutput `pulumi:"sourceRecoveryProtectionContainerName"` // Id of the VM to replicate Changing this forces a new resource to be created. SourceVmId pulumi.StringOutput `pulumi:"sourceVmId"` // Id of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId pulumi.StringPtrOutput `pulumi:"targetAvailabilitySetId"` // Id of the storage account which the new VM should used for boot diagnostic when a failover is done. TargetBootDiagnosticStorageAccountId pulumi.StringPtrOutput `pulumi:"targetBootDiagnosticStorageAccountId"` // Id of the Capacity reservation group where the new VM should belong to when a failover is done. TargetCapacityReservationGroupId pulumi.StringPtrOutput `pulumi:"targetCapacityReservationGroupId"` // Specifies the Edge Zone within the Azure Region where this Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created. TargetEdgeZone pulumi.StringPtrOutput `pulumi:"targetEdgeZone"` // Network to use when a failover is done (recommended to set if any networkInterface is configured for failover). TargetNetworkId pulumi.StringOutput `pulumi:"targetNetworkId"` // Id of Proximity Placement Group the new VM should belong to when a failover is done. TargetProximityPlacementGroupId pulumi.StringPtrOutput `pulumi:"targetProximityPlacementGroupId"` // Id of fabric where the VM replication should be handled when a failover is done. Changing this forces a new resource to be created. TargetRecoveryFabricId pulumi.StringOutput `pulumi:"targetRecoveryFabricId"` // Id of protection container where the VM replication should be created when a failover is done. Changing this forces a new resource to be created. TargetRecoveryProtectionContainerId pulumi.StringOutput `pulumi:"targetRecoveryProtectionContainerId"` // Id of resource group where the VM should be created when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId pulumi.StringOutput `pulumi:"targetResourceGroupId"` // Id of the Virtual Machine Scale Set which the new Vm should belong to when a failover is done. TargetVirtualMachineScaleSetId pulumi.StringPtrOutput `pulumi:"targetVirtualMachineScaleSetId"` // Specifies the size the Virtual Machine should have. TargetVirtualMachineSize pulumi.StringOutput `pulumi:"targetVirtualMachineSize"` // Specifies the Availability Zone where the Failover VM should exist. Changing this forces a new resource to be created. TargetZone pulumi.StringPtrOutput `pulumi:"targetZone"` // Network to use when a test failover is done. TestNetworkId pulumi.StringOutput `pulumi:"testNetworkId"` // One or more `unmanagedDisk` block as defined below. Changing this forces a new resource to be created. UnmanagedDisks ReplicatedVMUnmanagedDiskArrayOutput `pulumi:"unmanagedDisks"` } // NewReplicatedVM registers a new resource with the given unique name, arguments, and options. func NewReplicatedVM(ctx *pulumi.Context, name string, args *ReplicatedVMArgs, opts ...pulumi.ResourceOption) (*ReplicatedVM, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryReplicationPolicyId == nil { return nil, errors.New("invalid value for required argument 'RecoveryReplicationPolicyId'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SourceRecoveryFabricName == nil { return nil, errors.New("invalid value for required argument 'SourceRecoveryFabricName'") } if args.SourceRecoveryProtectionContainerName == nil { return nil, errors.New("invalid value for required argument 'SourceRecoveryProtectionContainerName'") } if args.SourceVmId == nil { return nil, errors.New("invalid value for required argument 'SourceVmId'") } if args.TargetRecoveryFabricId == nil { return nil, errors.New("invalid value for required argument 'TargetRecoveryFabricId'") } if args.TargetRecoveryProtectionContainerId == nil { return nil, errors.New("invalid value for required argument 'TargetRecoveryProtectionContainerId'") } if args.TargetResourceGroupId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ReplicatedVM err := ctx.RegisterResource("azure:siterecovery/replicatedVM:ReplicatedVM", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetReplicatedVM gets an existing ReplicatedVM 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 GetReplicatedVM(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ReplicatedVMState, opts ...pulumi.ResourceOption) (*ReplicatedVM, error) { var resource ReplicatedVM err := ctx.ReadResource("azure:siterecovery/replicatedVM:ReplicatedVM", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ReplicatedVM resources. type replicatedVMState struct { // One or more `managedDisk` block as defined below. Changing this forces a new resource to be created. ManagedDisks []ReplicatedVMManagedDisk `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName *string `pulumi:"multiVmGroupName"` // The name of the replication for the replicated VM. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces []ReplicatedVMNetworkInterface `pulumi:"networkInterfaces"` // Id of the policy to use for this replicated vm. Changing this forces a new resource to be created. RecoveryReplicationPolicyId *string `pulumi:"recoveryReplicationPolicyId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Name of fabric that should contain this replication. Changing this forces a new resource to be created. SourceRecoveryFabricName *string `pulumi:"sourceRecoveryFabricName"` // Name of the protection container to use. Changing this forces a new resource to be created. SourceRecoveryProtectionContainerName *string `pulumi:"sourceRecoveryProtectionContainerName"` // Id of the VM to replicate Changing this forces a new resource to be created. SourceVmId *string `pulumi:"sourceVmId"` // Id of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId *string `pulumi:"targetAvailabilitySetId"` // Id of the storage account which the new VM should used for boot diagnostic when a failover is done. TargetBootDiagnosticStorageAccountId *string `pulumi:"targetBootDiagnosticStorageAccountId"` // Id of the Capacity reservation group where the new VM should belong to when a failover is done. TargetCapacityReservationGroupId *string `pulumi:"targetCapacityReservationGroupId"` // Specifies the Edge Zone within the Azure Region where this Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created. TargetEdgeZone *string `pulumi:"targetEdgeZone"` // Network to use when a failover is done (recommended to set if any networkInterface is configured for failover). TargetNetworkId *string `pulumi:"targetNetworkId"` // Id of Proximity Placement Group the new VM should belong to when a failover is done. TargetProximityPlacementGroupId *string `pulumi:"targetProximityPlacementGroupId"` // Id of fabric where the VM replication should be handled when a failover is done. Changing this forces a new resource to be created. TargetRecoveryFabricId *string `pulumi:"targetRecoveryFabricId"` // Id of protection container where the VM replication should be created when a failover is done. Changing this forces a new resource to be created. TargetRecoveryProtectionContainerId *string `pulumi:"targetRecoveryProtectionContainerId"` // Id of resource group where the VM should be created when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId *string `pulumi:"targetResourceGroupId"` // Id of the Virtual Machine Scale Set which the new Vm should belong to when a failover is done. TargetVirtualMachineScaleSetId *string `pulumi:"targetVirtualMachineScaleSetId"` // Specifies the size the Virtual Machine should have. TargetVirtualMachineSize *string `pulumi:"targetVirtualMachineSize"` // Specifies the Availability Zone where the Failover VM should exist. Changing this forces a new resource to be created. TargetZone *string `pulumi:"targetZone"` // Network to use when a test failover is done. TestNetworkId *string `pulumi:"testNetworkId"` // One or more `unmanagedDisk` block as defined below. Changing this forces a new resource to be created. UnmanagedDisks []ReplicatedVMUnmanagedDisk `pulumi:"unmanagedDisks"` } type ReplicatedVMState struct { // One or more `managedDisk` block as defined below. Changing this forces a new resource to be created. ManagedDisks ReplicatedVMManagedDiskArrayInput // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName pulumi.StringPtrInput // The name of the replication for the replicated VM. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `networkInterface` block as defined below. NetworkInterfaces ReplicatedVMNetworkInterfaceArrayInput // Id of the policy to use for this replicated vm. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringPtrInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Name of fabric that should contain this replication. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringPtrInput // Name of the protection container to use. Changing this forces a new resource to be created. SourceRecoveryProtectionContainerName pulumi.StringPtrInput // Id of the VM to replicate Changing this forces a new resource to be created. SourceVmId pulumi.StringPtrInput // Id of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId pulumi.StringPtrInput // Id of the storage account which the new VM should used for boot diagnostic when a failover is done. TargetBootDiagnosticStorageAccountId pulumi.StringPtrInput // Id of the Capacity reservation group where the new VM should belong to when a failover is done. TargetCapacityReservationGroupId pulumi.StringPtrInput // Specifies the Edge Zone within the Azure Region where this Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created. TargetEdgeZone pulumi.StringPtrInput // Network to use when a failover is done (recommended to set if any networkInterface is configured for failover). TargetNetworkId pulumi.StringPtrInput // Id of Proximity Placement Group the new VM should belong to when a failover is done. TargetProximityPlacementGroupId pulumi.StringPtrInput // Id of fabric where the VM replication should be handled when a failover is done. Changing this forces a new resource to be created. TargetRecoveryFabricId pulumi.StringPtrInput // Id of protection container where the VM replication should be created when a failover is done. Changing this forces a new resource to be created. TargetRecoveryProtectionContainerId pulumi.StringPtrInput // Id of resource group where the VM should be created when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId pulumi.StringPtrInput // Id of the Virtual Machine Scale Set which the new Vm should belong to when a failover is done. TargetVirtualMachineScaleSetId pulumi.StringPtrInput // Specifies the size the Virtual Machine should have. TargetVirtualMachineSize pulumi.StringPtrInput // Specifies the Availability Zone where the Failover VM should exist. Changing this forces a new resource to be created. TargetZone pulumi.StringPtrInput // Network to use when a test failover is done. TestNetworkId pulumi.StringPtrInput // One or more `unmanagedDisk` block as defined below. Changing this forces a new resource to be created. UnmanagedDisks ReplicatedVMUnmanagedDiskArrayInput } func (ReplicatedVMState) ElementType() reflect.Type { return reflect.TypeOf((*replicatedVMState)(nil)).Elem() } type replicatedVMArgs struct { // One or more `managedDisk` block as defined below. Changing this forces a new resource to be created. ManagedDisks []ReplicatedVMManagedDisk `pulumi:"managedDisks"` // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName *string `pulumi:"multiVmGroupName"` // The name of the replication for the replicated VM. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkInterface` block as defined below. NetworkInterfaces []ReplicatedVMNetworkInterface `pulumi:"networkInterfaces"` // Id of the policy to use for this replicated vm. Changing this forces a new resource to be created. RecoveryReplicationPolicyId string `pulumi:"recoveryReplicationPolicyId"` // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Name of fabric that should contain this replication. Changing this forces a new resource to be created. SourceRecoveryFabricName string `pulumi:"sourceRecoveryFabricName"` // Name of the protection container to use. Changing this forces a new resource to be created. SourceRecoveryProtectionContainerName string `pulumi:"sourceRecoveryProtectionContainerName"` // Id of the VM to replicate Changing this forces a new resource to be created. SourceVmId string `pulumi:"sourceVmId"` // Id of availability set that the new VM should belong to when a failover is done. TargetAvailabilitySetId *string `pulumi:"targetAvailabilitySetId"` // Id of the storage account which the new VM should used for boot diagnostic when a failover is done. TargetBootDiagnosticStorageAccountId *string `pulumi:"targetBootDiagnosticStorageAccountId"` // Id of the Capacity reservation group where the new VM should belong to when a failover is done. TargetCapacityReservationGroupId *string `pulumi:"targetCapacityReservationGroupId"` // Specifies the Edge Zone within the Azure Region where this Managed Kubernetes Cluster should exist. Changing this forces a new resource to be created. TargetEdgeZone *string `pulumi:"targetEdgeZone"` // Network to use when a failover is done (recommended to set if any networkInterface is configured for failover). TargetNetworkId *string `pulumi:"targetNetworkId"` // Id of Proximity Placement Group the new VM should belong to when a failover is done. TargetProximityPlacementGroupId *string `pulumi:"targetProximityPlacementGroupId"` // Id of fabric where the VM replication should be handled when a failover is done. Changing this forces a new resource to be created. TargetRecoveryFabricId string `pulumi:"targetRecoveryFabricId"` // Id of protection container where the VM replication should be created when a failover is done. Changing this forces a new resource to be created. TargetRecoveryProtectionContainerId string `pulumi:"targetRecoveryProtectionContainerId"` // Id of resource group where the VM should be created when a failover is done. Changing this forces a new resource to be created. TargetResourceGroupId string `pulumi:"targetResourceGroupId"` // Id of the Virtual Machine Scale Set which the new Vm should belong to when a failover is done. TargetVirtualMachineScaleSetId *string `pulumi:"targetVirtualMachineScaleSetId"` // Specifies the size the Virtual Machine should have. TargetVirtualMachineSize *string `pulumi:"targetVirtualMachineSize"` // Specifies the Availability Zone where the Failover VM should exist. Changing this forces a new resource to be created. TargetZone *string `pulumi:"targetZone"` // Network to use when a test failover is done. TestNetworkId *string `pulumi:"testNetworkId"` // One or more `unmanagedDisk` block as defined below. Changing this forces a new resource to be created. UnmanagedDisks []ReplicatedVMUnmanagedDisk `pulumi:"unmanagedDisks"` } // The set of arguments for constructing a ReplicatedVM resource. type ReplicatedVMArgs struct { // One or more `managedDisk` block as defined below. Changing this forces a new resource to be created. ManagedDisks ReplicatedVMManagedDiskArrayInput // Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. MultiVmGroupName pulumi.StringPtrInput // The name of the replication for the replicated VM. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `networkInterface` block as defined below. NetworkInterfaces ReplicatedVMNetworkInterfaceArrayInput // Id of the policy to use for this replicated vm. Changing this forces a new resource to be created. RecoveryReplicationPolicyId pulumi.StringInput // The name of the vault that should be updated. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Name of fabric that should contain this replication. Changing this forces a new resource to be created. SourceRecoveryFabricName pulumi.StringInput
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/siterecovery/getFabric.go
sdk/go/azure/siterecovery/getFabric.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 siterecovery 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 Site Recovery Replication Fabric. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := siterecovery.LookupFabric(ctx, &siterecovery.LookupFabricArgs{ // Name: "primary-fabric", // RecoveryVaultName: "tfex-recovery_vault", // ResourceGroupName: "tfex-resource_group", // }, 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.RecoveryServices` - 2024-04-01 func LookupFabric(ctx *pulumi.Context, args *LookupFabricArgs, opts ...pulumi.InvokeOption) (*LookupFabricResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFabricResult err := ctx.Invoke("azure:siterecovery/getFabric:getFabric", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getFabric. type LookupFabricArgs struct { // Specifies the name of the Site Recovery Replication Fabric. Name string `pulumi:"name"` // The name of the Recovery Services Vault that the Site Recovery Replication Fabric is associated witth. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated Recovery Services Vault resides. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getFabric. type LookupFabricResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure location where the Site Recovery Replication Fabric resides. Location string `pulumi:"location"` Name string `pulumi:"name"` RecoveryVaultName string `pulumi:"recoveryVaultName"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupFabricOutput(ctx *pulumi.Context, args LookupFabricOutputArgs, opts ...pulumi.InvokeOption) LookupFabricResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFabricResultOutput, error) { args := v.(LookupFabricArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:siterecovery/getFabric:getFabric", args, LookupFabricResultOutput{}, options).(LookupFabricResultOutput), nil }).(LookupFabricResultOutput) } // A collection of arguments for invoking getFabric. type LookupFabricOutputArgs struct { // Specifies the name of the Site Recovery Replication Fabric. Name pulumi.StringInput `pulumi:"name"` // The name of the Recovery Services Vault that the Site Recovery Replication Fabric is associated witth. RecoveryVaultName pulumi.StringInput `pulumi:"recoveryVaultName"` // The name of the resource group in which the associated Recovery Services Vault resides. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupFabricOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupFabricArgs)(nil)).Elem() } // A collection of values returned by getFabric. type LookupFabricResultOutput struct{ *pulumi.OutputState } func (LookupFabricResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupFabricResult)(nil)).Elem() } func (o LookupFabricResultOutput) ToLookupFabricResultOutput() LookupFabricResultOutput { return o } func (o LookupFabricResultOutput) ToLookupFabricResultOutputWithContext(ctx context.Context) LookupFabricResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupFabricResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupFabricResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure location where the Site Recovery Replication Fabric resides. func (o LookupFabricResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupFabricResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupFabricResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupFabricResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupFabricResultOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v LookupFabricResult) string { return v.RecoveryVaultName }).(pulumi.StringOutput) } func (o LookupFabricResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupFabricResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupFabricResultOutput{}) }
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/trafficmanager/init.go
sdk/go/azure/trafficmanager/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 trafficmanager 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:trafficmanager/profile:Profile": r = &Profile{} 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", "trafficmanager/profile", &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/trafficmanager/pulumiTypes.go
sdk/go/azure/trafficmanager/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 trafficmanager 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 ProfileDnsConfig struct { // The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. RelativeName string `pulumi:"relativeName"` // The TTL value of the Profile used by Local DNS resolvers and clients. Ttl int `pulumi:"ttl"` } // ProfileDnsConfigInput is an input type that accepts ProfileDnsConfigArgs and ProfileDnsConfigOutput values. // You can construct a concrete instance of `ProfileDnsConfigInput` via: // // ProfileDnsConfigArgs{...} type ProfileDnsConfigInput interface { pulumi.Input ToProfileDnsConfigOutput() ProfileDnsConfigOutput ToProfileDnsConfigOutputWithContext(context.Context) ProfileDnsConfigOutput } type ProfileDnsConfigArgs struct { // The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. RelativeName pulumi.StringInput `pulumi:"relativeName"` // The TTL value of the Profile used by Local DNS resolvers and clients. Ttl pulumi.IntInput `pulumi:"ttl"` } func (ProfileDnsConfigArgs) ElementType() reflect.Type { return reflect.TypeOf((*ProfileDnsConfig)(nil)).Elem() } func (i ProfileDnsConfigArgs) ToProfileDnsConfigOutput() ProfileDnsConfigOutput { return i.ToProfileDnsConfigOutputWithContext(context.Background()) } func (i ProfileDnsConfigArgs) ToProfileDnsConfigOutputWithContext(ctx context.Context) ProfileDnsConfigOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileDnsConfigOutput) } func (i ProfileDnsConfigArgs) ToProfileDnsConfigPtrOutput() ProfileDnsConfigPtrOutput { return i.ToProfileDnsConfigPtrOutputWithContext(context.Background()) } func (i ProfileDnsConfigArgs) ToProfileDnsConfigPtrOutputWithContext(ctx context.Context) ProfileDnsConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileDnsConfigOutput).ToProfileDnsConfigPtrOutputWithContext(ctx) } // ProfileDnsConfigPtrInput is an input type that accepts ProfileDnsConfigArgs, ProfileDnsConfigPtr and ProfileDnsConfigPtrOutput values. // You can construct a concrete instance of `ProfileDnsConfigPtrInput` via: // // ProfileDnsConfigArgs{...} // // or: // // nil type ProfileDnsConfigPtrInput interface { pulumi.Input ToProfileDnsConfigPtrOutput() ProfileDnsConfigPtrOutput ToProfileDnsConfigPtrOutputWithContext(context.Context) ProfileDnsConfigPtrOutput } type profileDnsConfigPtrType ProfileDnsConfigArgs func ProfileDnsConfigPtr(v *ProfileDnsConfigArgs) ProfileDnsConfigPtrInput { return (*profileDnsConfigPtrType)(v) } func (*profileDnsConfigPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ProfileDnsConfig)(nil)).Elem() } func (i *profileDnsConfigPtrType) ToProfileDnsConfigPtrOutput() ProfileDnsConfigPtrOutput { return i.ToProfileDnsConfigPtrOutputWithContext(context.Background()) } func (i *profileDnsConfigPtrType) ToProfileDnsConfigPtrOutputWithContext(ctx context.Context) ProfileDnsConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileDnsConfigPtrOutput) } type ProfileDnsConfigOutput struct{ *pulumi.OutputState } func (ProfileDnsConfigOutput) ElementType() reflect.Type { return reflect.TypeOf((*ProfileDnsConfig)(nil)).Elem() } func (o ProfileDnsConfigOutput) ToProfileDnsConfigOutput() ProfileDnsConfigOutput { return o } func (o ProfileDnsConfigOutput) ToProfileDnsConfigOutputWithContext(ctx context.Context) ProfileDnsConfigOutput { return o } func (o ProfileDnsConfigOutput) ToProfileDnsConfigPtrOutput() ProfileDnsConfigPtrOutput { return o.ToProfileDnsConfigPtrOutputWithContext(context.Background()) } func (o ProfileDnsConfigOutput) ToProfileDnsConfigPtrOutputWithContext(ctx context.Context) ProfileDnsConfigPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ProfileDnsConfig) *ProfileDnsConfig { return &v }).(ProfileDnsConfigPtrOutput) } // The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. func (o ProfileDnsConfigOutput) RelativeName() pulumi.StringOutput { return o.ApplyT(func(v ProfileDnsConfig) string { return v.RelativeName }).(pulumi.StringOutput) } // The TTL value of the Profile used by Local DNS resolvers and clients. func (o ProfileDnsConfigOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v ProfileDnsConfig) int { return v.Ttl }).(pulumi.IntOutput) } type ProfileDnsConfigPtrOutput struct{ *pulumi.OutputState } func (ProfileDnsConfigPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProfileDnsConfig)(nil)).Elem() } func (o ProfileDnsConfigPtrOutput) ToProfileDnsConfigPtrOutput() ProfileDnsConfigPtrOutput { return o } func (o ProfileDnsConfigPtrOutput) ToProfileDnsConfigPtrOutputWithContext(ctx context.Context) ProfileDnsConfigPtrOutput { return o } func (o ProfileDnsConfigPtrOutput) Elem() ProfileDnsConfigOutput { return o.ApplyT(func(v *ProfileDnsConfig) ProfileDnsConfig { if v != nil { return *v } var ret ProfileDnsConfig return ret }).(ProfileDnsConfigOutput) } // The relative domain name, this is combined with the domain name used by Traffic Manager to form the FQDN which is exported as documented below. Changing this forces a new resource to be created. func (o ProfileDnsConfigPtrOutput) RelativeName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProfileDnsConfig) *string { if v == nil { return nil } return &v.RelativeName }).(pulumi.StringPtrOutput) } // The TTL value of the Profile used by Local DNS resolvers and clients. func (o ProfileDnsConfigPtrOutput) Ttl() pulumi.IntPtrOutput { return o.ApplyT(func(v *ProfileDnsConfig) *int { if v == nil { return nil } return &v.Ttl }).(pulumi.IntPtrOutput) } type ProfileMonitorConfig struct { // One or more `customHeader` blocks as defined below. CustomHeaders []ProfileMonitorConfigCustomHeader `pulumi:"customHeaders"` // A list of status code ranges in the format of `100-101`. ExpectedStatusCodeRanges []string `pulumi:"expectedStatusCodeRanges"` // The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here: `30` (normal probing) and `10` (fast probing). The default value is `30`. IntervalInSeconds *int `pulumi:"intervalInSeconds"` // The path used by the monitoring checks. Required when `protocol` is set to `HTTP` or `HTTPS` - cannot be set when `protocol` is set to `TCP`. Path *string `pulumi:"path"` // The port number used by the monitoring checks. Port int `pulumi:"port"` // The protocol used by the monitoring checks, supported values are `HTTP`, `HTTPS` and `TCP`. Protocol string `pulumi:"protocol"` // The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `intervalInSeconds` is set to `30`, then `timeoutInSeconds` can be between `5` and `10`. The default value is `10`. If `intervalInSeconds` is set to `10`, then valid values are between `5` and `9` and `timeoutInSeconds` is required. TimeoutInSeconds *int `pulumi:"timeoutInSeconds"` // The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` ToleratedNumberOfFailures *int `pulumi:"toleratedNumberOfFailures"` } // ProfileMonitorConfigInput is an input type that accepts ProfileMonitorConfigArgs and ProfileMonitorConfigOutput values. // You can construct a concrete instance of `ProfileMonitorConfigInput` via: // // ProfileMonitorConfigArgs{...} type ProfileMonitorConfigInput interface { pulumi.Input ToProfileMonitorConfigOutput() ProfileMonitorConfigOutput ToProfileMonitorConfigOutputWithContext(context.Context) ProfileMonitorConfigOutput } type ProfileMonitorConfigArgs struct { // One or more `customHeader` blocks as defined below. CustomHeaders ProfileMonitorConfigCustomHeaderArrayInput `pulumi:"customHeaders"` // A list of status code ranges in the format of `100-101`. ExpectedStatusCodeRanges pulumi.StringArrayInput `pulumi:"expectedStatusCodeRanges"` // The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here: `30` (normal probing) and `10` (fast probing). The default value is `30`. IntervalInSeconds pulumi.IntPtrInput `pulumi:"intervalInSeconds"` // The path used by the monitoring checks. Required when `protocol` is set to `HTTP` or `HTTPS` - cannot be set when `protocol` is set to `TCP`. Path pulumi.StringPtrInput `pulumi:"path"` // The port number used by the monitoring checks. Port pulumi.IntInput `pulumi:"port"` // The protocol used by the monitoring checks, supported values are `HTTP`, `HTTPS` and `TCP`. Protocol pulumi.StringInput `pulumi:"protocol"` // The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `intervalInSeconds` is set to `30`, then `timeoutInSeconds` can be between `5` and `10`. The default value is `10`. If `intervalInSeconds` is set to `10`, then valid values are between `5` and `9` and `timeoutInSeconds` is required. TimeoutInSeconds pulumi.IntPtrInput `pulumi:"timeoutInSeconds"` // The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` ToleratedNumberOfFailures pulumi.IntPtrInput `pulumi:"toleratedNumberOfFailures"` } func (ProfileMonitorConfigArgs) ElementType() reflect.Type { return reflect.TypeOf((*ProfileMonitorConfig)(nil)).Elem() } func (i ProfileMonitorConfigArgs) ToProfileMonitorConfigOutput() ProfileMonitorConfigOutput { return i.ToProfileMonitorConfigOutputWithContext(context.Background()) } func (i ProfileMonitorConfigArgs) ToProfileMonitorConfigOutputWithContext(ctx context.Context) ProfileMonitorConfigOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMonitorConfigOutput) } func (i ProfileMonitorConfigArgs) ToProfileMonitorConfigPtrOutput() ProfileMonitorConfigPtrOutput { return i.ToProfileMonitorConfigPtrOutputWithContext(context.Background()) } func (i ProfileMonitorConfigArgs) ToProfileMonitorConfigPtrOutputWithContext(ctx context.Context) ProfileMonitorConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMonitorConfigOutput).ToProfileMonitorConfigPtrOutputWithContext(ctx) } // ProfileMonitorConfigPtrInput is an input type that accepts ProfileMonitorConfigArgs, ProfileMonitorConfigPtr and ProfileMonitorConfigPtrOutput values. // You can construct a concrete instance of `ProfileMonitorConfigPtrInput` via: // // ProfileMonitorConfigArgs{...} // // or: // // nil type ProfileMonitorConfigPtrInput interface { pulumi.Input ToProfileMonitorConfigPtrOutput() ProfileMonitorConfigPtrOutput ToProfileMonitorConfigPtrOutputWithContext(context.Context) ProfileMonitorConfigPtrOutput } type profileMonitorConfigPtrType ProfileMonitorConfigArgs func ProfileMonitorConfigPtr(v *ProfileMonitorConfigArgs) ProfileMonitorConfigPtrInput { return (*profileMonitorConfigPtrType)(v) } func (*profileMonitorConfigPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ProfileMonitorConfig)(nil)).Elem() } func (i *profileMonitorConfigPtrType) ToProfileMonitorConfigPtrOutput() ProfileMonitorConfigPtrOutput { return i.ToProfileMonitorConfigPtrOutputWithContext(context.Background()) } func (i *profileMonitorConfigPtrType) ToProfileMonitorConfigPtrOutputWithContext(ctx context.Context) ProfileMonitorConfigPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMonitorConfigPtrOutput) } type ProfileMonitorConfigOutput struct{ *pulumi.OutputState } func (ProfileMonitorConfigOutput) ElementType() reflect.Type { return reflect.TypeOf((*ProfileMonitorConfig)(nil)).Elem() } func (o ProfileMonitorConfigOutput) ToProfileMonitorConfigOutput() ProfileMonitorConfigOutput { return o } func (o ProfileMonitorConfigOutput) ToProfileMonitorConfigOutputWithContext(ctx context.Context) ProfileMonitorConfigOutput { return o } func (o ProfileMonitorConfigOutput) ToProfileMonitorConfigPtrOutput() ProfileMonitorConfigPtrOutput { return o.ToProfileMonitorConfigPtrOutputWithContext(context.Background()) } func (o ProfileMonitorConfigOutput) ToProfileMonitorConfigPtrOutputWithContext(ctx context.Context) ProfileMonitorConfigPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ProfileMonitorConfig) *ProfileMonitorConfig { return &v }).(ProfileMonitorConfigPtrOutput) } // One or more `customHeader` blocks as defined below. func (o ProfileMonitorConfigOutput) CustomHeaders() ProfileMonitorConfigCustomHeaderArrayOutput { return o.ApplyT(func(v ProfileMonitorConfig) []ProfileMonitorConfigCustomHeader { return v.CustomHeaders }).(ProfileMonitorConfigCustomHeaderArrayOutput) } // A list of status code ranges in the format of `100-101`. func (o ProfileMonitorConfigOutput) ExpectedStatusCodeRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v ProfileMonitorConfig) []string { return v.ExpectedStatusCodeRanges }).(pulumi.StringArrayOutput) } // The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here: `30` (normal probing) and `10` (fast probing). The default value is `30`. func (o ProfileMonitorConfigOutput) IntervalInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v ProfileMonitorConfig) *int { return v.IntervalInSeconds }).(pulumi.IntPtrOutput) } // The path used by the monitoring checks. Required when `protocol` is set to `HTTP` or `HTTPS` - cannot be set when `protocol` is set to `TCP`. func (o ProfileMonitorConfigOutput) Path() pulumi.StringPtrOutput { return o.ApplyT(func(v ProfileMonitorConfig) *string { return v.Path }).(pulumi.StringPtrOutput) } // The port number used by the monitoring checks. func (o ProfileMonitorConfigOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v ProfileMonitorConfig) int { return v.Port }).(pulumi.IntOutput) } // The protocol used by the monitoring checks, supported values are `HTTP`, `HTTPS` and `TCP`. func (o ProfileMonitorConfigOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v ProfileMonitorConfig) string { return v.Protocol }).(pulumi.StringOutput) } // The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `intervalInSeconds` is set to `30`, then `timeoutInSeconds` can be between `5` and `10`. The default value is `10`. If `intervalInSeconds` is set to `10`, then valid values are between `5` and `9` and `timeoutInSeconds` is required. func (o ProfileMonitorConfigOutput) TimeoutInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v ProfileMonitorConfig) *int { return v.TimeoutInSeconds }).(pulumi.IntPtrOutput) } // The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` func (o ProfileMonitorConfigOutput) ToleratedNumberOfFailures() pulumi.IntPtrOutput { return o.ApplyT(func(v ProfileMonitorConfig) *int { return v.ToleratedNumberOfFailures }).(pulumi.IntPtrOutput) } type ProfileMonitorConfigPtrOutput struct{ *pulumi.OutputState } func (ProfileMonitorConfigPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProfileMonitorConfig)(nil)).Elem() } func (o ProfileMonitorConfigPtrOutput) ToProfileMonitorConfigPtrOutput() ProfileMonitorConfigPtrOutput { return o } func (o ProfileMonitorConfigPtrOutput) ToProfileMonitorConfigPtrOutputWithContext(ctx context.Context) ProfileMonitorConfigPtrOutput { return o } func (o ProfileMonitorConfigPtrOutput) Elem() ProfileMonitorConfigOutput { return o.ApplyT(func(v *ProfileMonitorConfig) ProfileMonitorConfig { if v != nil { return *v } var ret ProfileMonitorConfig return ret }).(ProfileMonitorConfigOutput) } // One or more `customHeader` blocks as defined below. func (o ProfileMonitorConfigPtrOutput) CustomHeaders() ProfileMonitorConfigCustomHeaderArrayOutput { return o.ApplyT(func(v *ProfileMonitorConfig) []ProfileMonitorConfigCustomHeader { if v == nil { return nil } return v.CustomHeaders }).(ProfileMonitorConfigCustomHeaderArrayOutput) } // A list of status code ranges in the format of `100-101`. func (o ProfileMonitorConfigPtrOutput) ExpectedStatusCodeRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *ProfileMonitorConfig) []string { if v == nil { return nil } return v.ExpectedStatusCodeRanges }).(pulumi.StringArrayOutput) } // The interval used to check the endpoint health from a Traffic Manager probing agent. You can specify two values here: `30` (normal probing) and `10` (fast probing). The default value is `30`. func (o ProfileMonitorConfigPtrOutput) IntervalInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *int { if v == nil { return nil } return v.IntervalInSeconds }).(pulumi.IntPtrOutput) } // The path used by the monitoring checks. Required when `protocol` is set to `HTTP` or `HTTPS` - cannot be set when `protocol` is set to `TCP`. func (o ProfileMonitorConfigPtrOutput) Path() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *string { if v == nil { return nil } return v.Path }).(pulumi.StringPtrOutput) } // The port number used by the monitoring checks. func (o ProfileMonitorConfigPtrOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *int { if v == nil { return nil } return &v.Port }).(pulumi.IntPtrOutput) } // The protocol used by the monitoring checks, supported values are `HTTP`, `HTTPS` and `TCP`. func (o ProfileMonitorConfigPtrOutput) Protocol() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *string { if v == nil { return nil } return &v.Protocol }).(pulumi.StringPtrOutput) } // The amount of time the Traffic Manager probing agent should wait before considering that check a failure when a health check probe is sent to the endpoint. If `intervalInSeconds` is set to `30`, then `timeoutInSeconds` can be between `5` and `10`. The default value is `10`. If `intervalInSeconds` is set to `10`, then valid values are between `5` and `9` and `timeoutInSeconds` is required. func (o ProfileMonitorConfigPtrOutput) TimeoutInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *int { if v == nil { return nil } return v.TimeoutInSeconds }).(pulumi.IntPtrOutput) } // The number of failures a Traffic Manager probing agent tolerates before marking that endpoint as unhealthy. Valid values are between `0` and `9`. The default value is `3` func (o ProfileMonitorConfigPtrOutput) ToleratedNumberOfFailures() pulumi.IntPtrOutput { return o.ApplyT(func(v *ProfileMonitorConfig) *int { if v == nil { return nil } return v.ToleratedNumberOfFailures }).(pulumi.IntPtrOutput) } type ProfileMonitorConfigCustomHeader struct { // The name of the custom header. Name string `pulumi:"name"` // The value of custom header. Applicable for HTTP and HTTPS protocol. Value string `pulumi:"value"` } // ProfileMonitorConfigCustomHeaderInput is an input type that accepts ProfileMonitorConfigCustomHeaderArgs and ProfileMonitorConfigCustomHeaderOutput values. // You can construct a concrete instance of `ProfileMonitorConfigCustomHeaderInput` via: // // ProfileMonitorConfigCustomHeaderArgs{...} type ProfileMonitorConfigCustomHeaderInput interface { pulumi.Input ToProfileMonitorConfigCustomHeaderOutput() ProfileMonitorConfigCustomHeaderOutput ToProfileMonitorConfigCustomHeaderOutputWithContext(context.Context) ProfileMonitorConfigCustomHeaderOutput } type ProfileMonitorConfigCustomHeaderArgs struct { // The name of the custom header. Name pulumi.StringInput `pulumi:"name"` // The value of custom header. Applicable for HTTP and HTTPS protocol. Value pulumi.StringInput `pulumi:"value"` } func (ProfileMonitorConfigCustomHeaderArgs) ElementType() reflect.Type { return reflect.TypeOf((*ProfileMonitorConfigCustomHeader)(nil)).Elem() } func (i ProfileMonitorConfigCustomHeaderArgs) ToProfileMonitorConfigCustomHeaderOutput() ProfileMonitorConfigCustomHeaderOutput { return i.ToProfileMonitorConfigCustomHeaderOutputWithContext(context.Background()) } func (i ProfileMonitorConfigCustomHeaderArgs) ToProfileMonitorConfigCustomHeaderOutputWithContext(ctx context.Context) ProfileMonitorConfigCustomHeaderOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMonitorConfigCustomHeaderOutput) } // ProfileMonitorConfigCustomHeaderArrayInput is an input type that accepts ProfileMonitorConfigCustomHeaderArray and ProfileMonitorConfigCustomHeaderArrayOutput values. // You can construct a concrete instance of `ProfileMonitorConfigCustomHeaderArrayInput` via: // // ProfileMonitorConfigCustomHeaderArray{ ProfileMonitorConfigCustomHeaderArgs{...} } type ProfileMonitorConfigCustomHeaderArrayInput interface { pulumi.Input ToProfileMonitorConfigCustomHeaderArrayOutput() ProfileMonitorConfigCustomHeaderArrayOutput ToProfileMonitorConfigCustomHeaderArrayOutputWithContext(context.Context) ProfileMonitorConfigCustomHeaderArrayOutput } type ProfileMonitorConfigCustomHeaderArray []ProfileMonitorConfigCustomHeaderInput func (ProfileMonitorConfigCustomHeaderArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ProfileMonitorConfigCustomHeader)(nil)).Elem() } func (i ProfileMonitorConfigCustomHeaderArray) ToProfileMonitorConfigCustomHeaderArrayOutput() ProfileMonitorConfigCustomHeaderArrayOutput { return i.ToProfileMonitorConfigCustomHeaderArrayOutputWithContext(context.Background()) } func (i ProfileMonitorConfigCustomHeaderArray) ToProfileMonitorConfigCustomHeaderArrayOutputWithContext(ctx context.Context) ProfileMonitorConfigCustomHeaderArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMonitorConfigCustomHeaderArrayOutput) } type ProfileMonitorConfigCustomHeaderOutput struct{ *pulumi.OutputState } func (ProfileMonitorConfigCustomHeaderOutput) ElementType() reflect.Type { return reflect.TypeOf((*ProfileMonitorConfigCustomHeader)(nil)).Elem() } func (o ProfileMonitorConfigCustomHeaderOutput) ToProfileMonitorConfigCustomHeaderOutput() ProfileMonitorConfigCustomHeaderOutput { return o } func (o ProfileMonitorConfigCustomHeaderOutput) ToProfileMonitorConfigCustomHeaderOutputWithContext(ctx context.Context) ProfileMonitorConfigCustomHeaderOutput { return o } // The name of the custom header. func (o ProfileMonitorConfigCustomHeaderOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ProfileMonitorConfigCustomHeader) string { return v.Name }).(pulumi.StringOutput) } // The value of custom header. Applicable for HTTP and HTTPS protocol. func (o ProfileMonitorConfigCustomHeaderOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v ProfileMonitorConfigCustomHeader) string { return v.Value }).(pulumi.StringOutput) } type ProfileMonitorConfigCustomHeaderArrayOutput struct{ *pulumi.OutputState } func (ProfileMonitorConfigCustomHeaderArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ProfileMonitorConfigCustomHeader)(nil)).Elem() } func (o ProfileMonitorConfigCustomHeaderArrayOutput) ToProfileMonitorConfigCustomHeaderArrayOutput() ProfileMonitorConfigCustomHeaderArrayOutput { return o } func (o ProfileMonitorConfigCustomHeaderArrayOutput) ToProfileMonitorConfigCustomHeaderArrayOutputWithContext(ctx context.Context) ProfileMonitorConfigCustomHeaderArrayOutput { return o } func (o ProfileMonitorConfigCustomHeaderArrayOutput) Index(i pulumi.IntInput) ProfileMonitorConfigCustomHeaderOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ProfileMonitorConfigCustomHeader { return vs[0].([]ProfileMonitorConfigCustomHeader)[vs[1].(int)] }).(ProfileMonitorConfigCustomHeaderOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProfileDnsConfigInput)(nil)).Elem(), ProfileDnsConfigArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileDnsConfigPtrInput)(nil)).Elem(), ProfileDnsConfigArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMonitorConfigInput)(nil)).Elem(), ProfileMonitorConfigArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMonitorConfigPtrInput)(nil)).Elem(), ProfileMonitorConfigArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMonitorConfigCustomHeaderInput)(nil)).Elem(), ProfileMonitorConfigCustomHeaderArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMonitorConfigCustomHeaderArrayInput)(nil)).Elem(), ProfileMonitorConfigCustomHeaderArray{}) pulumi.RegisterOutputType(ProfileDnsConfigOutput{}) pulumi.RegisterOutputType(ProfileDnsConfigPtrOutput{}) pulumi.RegisterOutputType(ProfileMonitorConfigOutput{}) pulumi.RegisterOutputType(ProfileMonitorConfigPtrOutput{}) pulumi.RegisterOutputType(ProfileMonitorConfigCustomHeaderOutput{}) pulumi.RegisterOutputType(ProfileMonitorConfigCustomHeaderArrayOutput{}) }
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/trafficmanager/profile.go
sdk/go/azure/trafficmanager/profile.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 trafficmanager import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Traffic Manager Profile to which multiple endpoints can be attached. // // ## 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/network" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // server, err := random.NewId(ctx, "server", &random.IdArgs{ // Keepers: map[string]interface{}{ // "aziId": 1, // }, // ByteLength: 8, // }) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("trafficmanagerProfile"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{ // Name: server.Hex, // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Weighted"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: server.Hex, // Ttl: pulumi.Int(100), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(80), // Path: pulumi.String("/"), // IntervalInSeconds: pulumi.Int(30), // TimeoutInSeconds: pulumi.Int(9), // ToleratedNumberOfFailures: pulumi.Int(3), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2022-04-01 // // ## Import // // Traffic Manager Profiles can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:trafficmanager/profile:Profile exampleProfile /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1 // ``` // // Deprecated: azure.trafficmanager.Profile has been deprecated in favor of azure.network.TrafficManagerProfile type Profile struct { pulumi.CustomResourceState // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig ProfileDnsConfigOutput `pulumi:"dnsConfig"` // The FQDN of the created Profile. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrOutput `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig ProfileMonitorConfigOutput `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrOutput `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. 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"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringOutput `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrOutput `pulumi:"trafficViewEnabled"` } // NewProfile registers a new resource with the given unique name, arguments, and options. func NewProfile(ctx *pulumi.Context, name string, args *ProfileArgs, opts ...pulumi.ResourceOption) (*Profile, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DnsConfig == nil { return nil, errors.New("invalid value for required argument 'DnsConfig'") } if args.MonitorConfig == nil { return nil, errors.New("invalid value for required argument 'MonitorConfig'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TrafficRoutingMethod == nil { return nil, errors.New("invalid value for required argument 'TrafficRoutingMethod'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Profile err := ctx.RegisterResource("azure:trafficmanager/profile:Profile", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProfile gets an existing Profile 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 GetProfile(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProfileState, opts ...pulumi.ResourceOption) (*Profile, error) { var resource Profile err := ctx.ReadResource("azure:trafficmanager/profile:Profile", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Profile resources. type profileState struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig *ProfileDnsConfig `pulumi:"dnsConfig"` // The FQDN of the created Profile. Fqdn *string `pulumi:"fqdn"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn *int `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig *ProfileMonitorConfig `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus *string `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. 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"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod *string `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } type ProfileState struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig ProfileDnsConfigPtrInput // The FQDN of the created Profile. Fqdn pulumi.StringPtrInput // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrInput // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig ProfileMonitorConfigPtrInput // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrInput // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringPtrInput // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrInput } func (ProfileState) ElementType() reflect.Type { return reflect.TypeOf((*profileState)(nil)).Elem() } type profileArgs struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig ProfileDnsConfig `pulumi:"dnsConfig"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn *int `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig ProfileMonitorConfig `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus *string `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. 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"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod string `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } // The set of arguments for constructing a Profile resource. type ProfileArgs struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig ProfileDnsConfigInput // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrInput // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig ProfileMonitorConfigInput // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrInput // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringInput // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrInput } func (ProfileArgs) ElementType() reflect.Type { return reflect.TypeOf((*profileArgs)(nil)).Elem() } type ProfileInput interface { pulumi.Input ToProfileOutput() ProfileOutput ToProfileOutputWithContext(ctx context.Context) ProfileOutput } func (*Profile) ElementType() reflect.Type { return reflect.TypeOf((**Profile)(nil)).Elem() } func (i *Profile) ToProfileOutput() ProfileOutput { return i.ToProfileOutputWithContext(context.Background()) } func (i *Profile) ToProfileOutputWithContext(ctx context.Context) ProfileOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileOutput) } // ProfileArrayInput is an input type that accepts ProfileArray and ProfileArrayOutput values. // You can construct a concrete instance of `ProfileArrayInput` via: // // ProfileArray{ ProfileArgs{...} } type ProfileArrayInput interface { pulumi.Input ToProfileArrayOutput() ProfileArrayOutput ToProfileArrayOutputWithContext(context.Context) ProfileArrayOutput } type ProfileArray []ProfileInput func (ProfileArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Profile)(nil)).Elem() } func (i ProfileArray) ToProfileArrayOutput() ProfileArrayOutput { return i.ToProfileArrayOutputWithContext(context.Background()) } func (i ProfileArray) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileArrayOutput) } // ProfileMapInput is an input type that accepts ProfileMap and ProfileMapOutput values. // You can construct a concrete instance of `ProfileMapInput` via: // // ProfileMap{ "key": ProfileArgs{...} } type ProfileMapInput interface { pulumi.Input ToProfileMapOutput() ProfileMapOutput ToProfileMapOutputWithContext(context.Context) ProfileMapOutput } type ProfileMap map[string]ProfileInput func (ProfileMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Profile)(nil)).Elem() } func (i ProfileMap) ToProfileMapOutput() ProfileMapOutput { return i.ToProfileMapOutputWithContext(context.Background()) } func (i ProfileMap) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMapOutput) } type ProfileOutput struct{ *pulumi.OutputState } func (ProfileOutput) ElementType() reflect.Type { return reflect.TypeOf((**Profile)(nil)).Elem() } func (o ProfileOutput) ToProfileOutput() ProfileOutput { return o } func (o ProfileOutput) ToProfileOutputWithContext(ctx context.Context) ProfileOutput { return o } // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. func (o ProfileOutput) DnsConfig() ProfileDnsConfigOutput { return o.ApplyT(func(v *Profile) ProfileDnsConfigOutput { return v.DnsConfig }).(ProfileDnsConfigOutput) } // The FQDN of the created Profile. func (o ProfileOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. func (o ProfileOutput) MaxReturn() pulumi.IntPtrOutput { return o.ApplyT(func(v *Profile) pulumi.IntPtrOutput { return v.MaxReturn }).(pulumi.IntPtrOutput) } // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. func (o ProfileOutput) MonitorConfig() ProfileMonitorConfigOutput { return o.ApplyT(func(v *Profile) ProfileMonitorConfigOutput { return v.MonitorConfig }).(ProfileMonitorConfigOutput) } // The name of the Traffic Manager profile. Changing this forces a new resource to be created. func (o ProfileOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. func (o ProfileOutput) ProfileStatus() pulumi.StringPtrOutput { return o.ApplyT(func(v *Profile) pulumi.StringPtrOutput { return v.ProfileStatus }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. func (o ProfileOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o ProfileOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Profile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. func (o ProfileOutput) TrafficRoutingMethod() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.TrafficRoutingMethod }).(pulumi.StringOutput) } // Indicates whether Traffic View is enabled for the Traffic Manager profile. func (o ProfileOutput) TrafficViewEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Profile) pulumi.BoolPtrOutput { return v.TrafficViewEnabled }).(pulumi.BoolPtrOutput) } type ProfileArrayOutput struct{ *pulumi.OutputState } func (ProfileArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Profile)(nil)).Elem() } func (o ProfileArrayOutput) ToProfileArrayOutput() ProfileArrayOutput { return o } func (o ProfileArrayOutput) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput { return o } func (o ProfileArrayOutput) Index(i pulumi.IntInput) ProfileOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Profile { return vs[0].([]*Profile)[vs[1].(int)] }).(ProfileOutput) } type ProfileMapOutput struct{ *pulumi.OutputState } func (ProfileMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Profile)(nil)).Elem() } func (o ProfileMapOutput) ToProfileMapOutput() ProfileMapOutput { return o } func (o ProfileMapOutput) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput { return o } func (o ProfileMapOutput) MapIndex(k pulumi.StringInput) ProfileOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Profile { return vs[0].(map[string]*Profile)[vs[1].(string)] }).(ProfileOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProfileInput)(nil)).Elem(), &Profile{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileArrayInput)(nil)).Elem(), ProfileArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMapInput)(nil)).Elem(), ProfileMap{}) pulumi.RegisterOutputType(ProfileOutput{}) pulumi.RegisterOutputType(ProfileArrayOutput{}) pulumi.RegisterOutputType(ProfileMapOutput{}) }
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/trafficmanager/getGeographicalLocation.go
sdk/go/azure/trafficmanager/getGeographicalLocation.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 trafficmanager 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 the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy. // // ## Example Usage // // ### World) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetTrafficManager(ctx, &network.GetTrafficManagerArgs{ // Name: "World", // }, nil) // if err != nil { // return err // } // ctx.Export("locationCode", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 // // Deprecated: azure.trafficmanager.getGeographicalLocation has been deprecated in favor of azure.network.getTrafficManager func GetGeographicalLocation(ctx *pulumi.Context, args *GetGeographicalLocationArgs, opts ...pulumi.InvokeOption) (*GetGeographicalLocationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGeographicalLocationResult err := ctx.Invoke("azure:trafficmanager/getGeographicalLocation:getGeographicalLocation", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getGeographicalLocation. type GetGeographicalLocationArgs struct { // Specifies the name of the Location, for example `World`, `Europe` or `Germany`. Name string `pulumi:"name"` } // A collection of values returned by getGeographicalLocation. type GetGeographicalLocationResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` } func GetGeographicalLocationOutput(ctx *pulumi.Context, args GetGeographicalLocationOutputArgs, opts ...pulumi.InvokeOption) GetGeographicalLocationResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetGeographicalLocationResultOutput, error) { args := v.(GetGeographicalLocationArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:trafficmanager/getGeographicalLocation:getGeographicalLocation", args, GetGeographicalLocationResultOutput{}, options).(GetGeographicalLocationResultOutput), nil }).(GetGeographicalLocationResultOutput) } // A collection of arguments for invoking getGeographicalLocation. type GetGeographicalLocationOutputArgs struct { // Specifies the name of the Location, for example `World`, `Europe` or `Germany`. Name pulumi.StringInput `pulumi:"name"` } func (GetGeographicalLocationOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetGeographicalLocationArgs)(nil)).Elem() } // A collection of values returned by getGeographicalLocation. type GetGeographicalLocationResultOutput struct{ *pulumi.OutputState } func (GetGeographicalLocationResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetGeographicalLocationResult)(nil)).Elem() } func (o GetGeographicalLocationResultOutput) ToGetGeographicalLocationResultOutput() GetGeographicalLocationResultOutput { return o } func (o GetGeographicalLocationResultOutput) ToGetGeographicalLocationResultOutputWithContext(ctx context.Context) GetGeographicalLocationResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetGeographicalLocationResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetGeographicalLocationResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetGeographicalLocationResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetGeographicalLocationResult) string { return v.Name }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetGeographicalLocationResultOutput{}) }
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/datadog/init.go
sdk/go/azure/datadog/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 datadog 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:datadog/monitor:Monitor": r = &Monitor{} case "azure:datadog/monitorSsoConfiguration:MonitorSsoConfiguration": r = &MonitorSsoConfiguration{} case "azure:datadog/monitorTagRule:MonitorTagRule": r = &MonitorTagRule{} 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", "datadog/monitor", &module{version}, ) pulumi.RegisterResourceModule( "azure", "datadog/monitorSsoConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "datadog/monitorTagRule", &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/datadog/pulumiTypes.go
sdk/go/azure/datadog/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 datadog 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 MonitorDatadogOrganization struct { // Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. ApiKey string `pulumi:"apiKey"` // Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. ApplicationKey string `pulumi:"applicationKey"` // The ID of the enterprise_app. Changing this forces a new resource to be created. EnterpriseAppId *string `pulumi:"enterpriseAppId"` // The ID of the Datadog Monitor. Id *string `pulumi:"id"` // The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created. LinkingAuthCode *string `pulumi:"linkingAuthCode"` // The ID of the linking_client. Changing this forces a new Datadog Monitor to be created. LinkingClientId *string `pulumi:"linkingClientId"` // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name *string `pulumi:"name"` // The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. RedirectUri *string `pulumi:"redirectUri"` } // MonitorDatadogOrganizationInput is an input type that accepts MonitorDatadogOrganizationArgs and MonitorDatadogOrganizationOutput values. // You can construct a concrete instance of `MonitorDatadogOrganizationInput` via: // // MonitorDatadogOrganizationArgs{...} type MonitorDatadogOrganizationInput interface { pulumi.Input ToMonitorDatadogOrganizationOutput() MonitorDatadogOrganizationOutput ToMonitorDatadogOrganizationOutputWithContext(context.Context) MonitorDatadogOrganizationOutput } type MonitorDatadogOrganizationArgs struct { // Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. ApiKey pulumi.StringInput `pulumi:"apiKey"` // Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. ApplicationKey pulumi.StringInput `pulumi:"applicationKey"` // The ID of the enterprise_app. Changing this forces a new resource to be created. EnterpriseAppId pulumi.StringPtrInput `pulumi:"enterpriseAppId"` // The ID of the Datadog Monitor. Id pulumi.StringPtrInput `pulumi:"id"` // The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created. LinkingAuthCode pulumi.StringPtrInput `pulumi:"linkingAuthCode"` // The ID of the linking_client. Changing this forces a new Datadog Monitor to be created. LinkingClientId pulumi.StringPtrInput `pulumi:"linkingClientId"` // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name pulumi.StringPtrInput `pulumi:"name"` // The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. RedirectUri pulumi.StringPtrInput `pulumi:"redirectUri"` } func (MonitorDatadogOrganizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorDatadogOrganization)(nil)).Elem() } func (i MonitorDatadogOrganizationArgs) ToMonitorDatadogOrganizationOutput() MonitorDatadogOrganizationOutput { return i.ToMonitorDatadogOrganizationOutputWithContext(context.Background()) } func (i MonitorDatadogOrganizationArgs) ToMonitorDatadogOrganizationOutputWithContext(ctx context.Context) MonitorDatadogOrganizationOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorDatadogOrganizationOutput) } func (i MonitorDatadogOrganizationArgs) ToMonitorDatadogOrganizationPtrOutput() MonitorDatadogOrganizationPtrOutput { return i.ToMonitorDatadogOrganizationPtrOutputWithContext(context.Background()) } func (i MonitorDatadogOrganizationArgs) ToMonitorDatadogOrganizationPtrOutputWithContext(ctx context.Context) MonitorDatadogOrganizationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorDatadogOrganizationOutput).ToMonitorDatadogOrganizationPtrOutputWithContext(ctx) } // MonitorDatadogOrganizationPtrInput is an input type that accepts MonitorDatadogOrganizationArgs, MonitorDatadogOrganizationPtr and MonitorDatadogOrganizationPtrOutput values. // You can construct a concrete instance of `MonitorDatadogOrganizationPtrInput` via: // // MonitorDatadogOrganizationArgs{...} // // or: // // nil type MonitorDatadogOrganizationPtrInput interface { pulumi.Input ToMonitorDatadogOrganizationPtrOutput() MonitorDatadogOrganizationPtrOutput ToMonitorDatadogOrganizationPtrOutputWithContext(context.Context) MonitorDatadogOrganizationPtrOutput } type monitorDatadogOrganizationPtrType MonitorDatadogOrganizationArgs func MonitorDatadogOrganizationPtr(v *MonitorDatadogOrganizationArgs) MonitorDatadogOrganizationPtrInput { return (*monitorDatadogOrganizationPtrType)(v) } func (*monitorDatadogOrganizationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MonitorDatadogOrganization)(nil)).Elem() } func (i *monitorDatadogOrganizationPtrType) ToMonitorDatadogOrganizationPtrOutput() MonitorDatadogOrganizationPtrOutput { return i.ToMonitorDatadogOrganizationPtrOutputWithContext(context.Background()) } func (i *monitorDatadogOrganizationPtrType) ToMonitorDatadogOrganizationPtrOutputWithContext(ctx context.Context) MonitorDatadogOrganizationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorDatadogOrganizationPtrOutput) } type MonitorDatadogOrganizationOutput struct{ *pulumi.OutputState } func (MonitorDatadogOrganizationOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorDatadogOrganization)(nil)).Elem() } func (o MonitorDatadogOrganizationOutput) ToMonitorDatadogOrganizationOutput() MonitorDatadogOrganizationOutput { return o } func (o MonitorDatadogOrganizationOutput) ToMonitorDatadogOrganizationOutputWithContext(ctx context.Context) MonitorDatadogOrganizationOutput { return o } func (o MonitorDatadogOrganizationOutput) ToMonitorDatadogOrganizationPtrOutput() MonitorDatadogOrganizationPtrOutput { return o.ToMonitorDatadogOrganizationPtrOutputWithContext(context.Background()) } func (o MonitorDatadogOrganizationOutput) ToMonitorDatadogOrganizationPtrOutputWithContext(ctx context.Context) MonitorDatadogOrganizationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorDatadogOrganization) *MonitorDatadogOrganization { return &v }).(MonitorDatadogOrganizationPtrOutput) } // Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v MonitorDatadogOrganization) string { return v.ApiKey }).(pulumi.StringOutput) } // Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) ApplicationKey() pulumi.StringOutput { return o.ApplyT(func(v MonitorDatadogOrganization) string { return v.ApplicationKey }).(pulumi.StringOutput) } // The ID of the enterprise_app. Changing this forces a new resource to be created. func (o MonitorDatadogOrganizationOutput) EnterpriseAppId() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.EnterpriseAppId }).(pulumi.StringPtrOutput) } // The ID of the Datadog Monitor. func (o MonitorDatadogOrganizationOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.Id }).(pulumi.StringPtrOutput) } // The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) LinkingAuthCode() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.LinkingAuthCode }).(pulumi.StringPtrOutput) } // The ID of the linking_client. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) LinkingClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.LinkingClientId }).(pulumi.StringPtrOutput) } // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.Name }).(pulumi.StringPtrOutput) } // The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationOutput) RedirectUri() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorDatadogOrganization) *string { return v.RedirectUri }).(pulumi.StringPtrOutput) } type MonitorDatadogOrganizationPtrOutput struct{ *pulumi.OutputState } func (MonitorDatadogOrganizationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorDatadogOrganization)(nil)).Elem() } func (o MonitorDatadogOrganizationPtrOutput) ToMonitorDatadogOrganizationPtrOutput() MonitorDatadogOrganizationPtrOutput { return o } func (o MonitorDatadogOrganizationPtrOutput) ToMonitorDatadogOrganizationPtrOutputWithContext(ctx context.Context) MonitorDatadogOrganizationPtrOutput { return o } func (o MonitorDatadogOrganizationPtrOutput) Elem() MonitorDatadogOrganizationOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) MonitorDatadogOrganization { if v != nil { return *v } var ret MonitorDatadogOrganization return ret }).(MonitorDatadogOrganizationOutput) } // Api key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) ApiKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return &v.ApiKey }).(pulumi.StringPtrOutput) } // Application key associated to the Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) ApplicationKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return &v.ApplicationKey }).(pulumi.StringPtrOutput) } // The ID of the enterprise_app. Changing this forces a new resource to be created. func (o MonitorDatadogOrganizationPtrOutput) EnterpriseAppId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.EnterpriseAppId }).(pulumi.StringPtrOutput) } // The ID of the Datadog Monitor. func (o MonitorDatadogOrganizationPtrOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.Id }).(pulumi.StringPtrOutput) } // The auth code used to linking to an existing Datadog organization. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) LinkingAuthCode() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.LinkingAuthCode }).(pulumi.StringPtrOutput) } // The ID of the linking_client. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) LinkingClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.LinkingClientId }).(pulumi.StringPtrOutput) } // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.Name }).(pulumi.StringPtrOutput) } // The redirect uri for linking. Changing this forces a new Datadog Monitor to be created. func (o MonitorDatadogOrganizationPtrOutput) RedirectUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorDatadogOrganization) *string { if v == nil { return nil } return v.RedirectUri }).(pulumi.StringPtrOutput) } type MonitorIdentity struct { // The Principal ID for the Service Principal associated with the Identity of this Datadog Monitor. PrincipalId *string `pulumi:"principalId"` // The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor. TenantId *string `pulumi:"tenantId"` // Specifies the identity type of the Datadog Monitor. At this time the only allowed value is `SystemAssigned`. // // > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Datadog Monitor has been created. More details are available below. 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 Datadog Monitor. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID for the Service Principal associated with the Identity of this Datadog Monitor. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the identity type of the Datadog Monitor. At this time the only allowed value is `SystemAssigned`. // // > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Datadog Monitor has been created. More details are available below. 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 Datadog 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 Datadog 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 Datadog Monitor. At this time the only allowed value is `SystemAssigned`. // // > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Datadog Monitor has been created. More details are available below. 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 Datadog 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 Datadog 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 Datadog Monitor. At this time the only allowed value is `SystemAssigned`. // // > **Note:** The assigned `principalId` and `tenantId` can be retrieved after the identity `type` has been set to `SystemAssigned` and the Datadog Monitor has been created. More details are available below. func (o MonitorIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type MonitorTagRuleLog struct { // Whether AAD logs should be sent for the Monitor resource? AadLogEnabled *bool `pulumi:"aadLogEnabled"` // A `filter` block as defined below. // // > **Note:** List of filtering tags to be used for capturing logs. This only takes effect if `resourceLogEnabled` flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. Filters []MonitorTagRuleLogFilter `pulumi:"filters"` // Whether Azure resource logs should be sent for the Monitor resource? ResourceLogEnabled *bool `pulumi:"resourceLogEnabled"` // Whether Azure subscription logs should be sent for the Monitor resource? SubscriptionLogEnabled *bool `pulumi:"subscriptionLogEnabled"` } // MonitorTagRuleLogInput is an input type that accepts MonitorTagRuleLogArgs and MonitorTagRuleLogOutput values. // You can construct a concrete instance of `MonitorTagRuleLogInput` via: // // MonitorTagRuleLogArgs{...} type MonitorTagRuleLogInput interface { pulumi.Input ToMonitorTagRuleLogOutput() MonitorTagRuleLogOutput ToMonitorTagRuleLogOutputWithContext(context.Context) MonitorTagRuleLogOutput } type MonitorTagRuleLogArgs struct { // Whether AAD logs should be sent for the Monitor resource? AadLogEnabled pulumi.BoolPtrInput `pulumi:"aadLogEnabled"` // A `filter` block as defined below. // // > **Note:** List of filtering tags to be used for capturing logs. This only takes effect if `resourceLogEnabled` flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. Filters MonitorTagRuleLogFilterArrayInput `pulumi:"filters"` // Whether Azure resource logs should be sent for the Monitor resource? ResourceLogEnabled pulumi.BoolPtrInput `pulumi:"resourceLogEnabled"` // Whether Azure subscription logs should be sent for the Monitor resource? SubscriptionLogEnabled pulumi.BoolPtrInput `pulumi:"subscriptionLogEnabled"` } func (MonitorTagRuleLogArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorTagRuleLog)(nil)).Elem() } func (i MonitorTagRuleLogArgs) ToMonitorTagRuleLogOutput() MonitorTagRuleLogOutput { return i.ToMonitorTagRuleLogOutputWithContext(context.Background()) } func (i MonitorTagRuleLogArgs) ToMonitorTagRuleLogOutputWithContext(ctx context.Context) MonitorTagRuleLogOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleLogOutput) } // MonitorTagRuleLogArrayInput is an input type that accepts MonitorTagRuleLogArray and MonitorTagRuleLogArrayOutput values. // You can construct a concrete instance of `MonitorTagRuleLogArrayInput` via: // // MonitorTagRuleLogArray{ MonitorTagRuleLogArgs{...} } type MonitorTagRuleLogArrayInput interface { pulumi.Input ToMonitorTagRuleLogArrayOutput() MonitorTagRuleLogArrayOutput ToMonitorTagRuleLogArrayOutputWithContext(context.Context) MonitorTagRuleLogArrayOutput } type MonitorTagRuleLogArray []MonitorTagRuleLogInput func (MonitorTagRuleLogArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorTagRuleLog)(nil)).Elem() } func (i MonitorTagRuleLogArray) ToMonitorTagRuleLogArrayOutput() MonitorTagRuleLogArrayOutput { return i.ToMonitorTagRuleLogArrayOutputWithContext(context.Background()) } func (i MonitorTagRuleLogArray) ToMonitorTagRuleLogArrayOutputWithContext(ctx context.Context) MonitorTagRuleLogArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleLogArrayOutput) } type MonitorTagRuleLogOutput struct{ *pulumi.OutputState } func (MonitorTagRuleLogOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorTagRuleLog)(nil)).Elem() } func (o MonitorTagRuleLogOutput) ToMonitorTagRuleLogOutput() MonitorTagRuleLogOutput { return o } func (o MonitorTagRuleLogOutput) ToMonitorTagRuleLogOutputWithContext(ctx context.Context) MonitorTagRuleLogOutput { return o } // Whether AAD logs should be sent for the Monitor resource? func (o MonitorTagRuleLogOutput) AadLogEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v MonitorTagRuleLog) *bool { return v.AadLogEnabled }).(pulumi.BoolPtrOutput) } // A `filter` block as defined below. // // > **Note:** List of filtering tags to be used for capturing logs. This only takes effect if `resourceLogEnabled` flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. func (o MonitorTagRuleLogOutput) Filters() MonitorTagRuleLogFilterArrayOutput { return o.ApplyT(func(v MonitorTagRuleLog) []MonitorTagRuleLogFilter { return v.Filters }).(MonitorTagRuleLogFilterArrayOutput) } // Whether Azure resource logs should be sent for the Monitor resource? func (o MonitorTagRuleLogOutput) ResourceLogEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v MonitorTagRuleLog) *bool { return v.ResourceLogEnabled }).(pulumi.BoolPtrOutput) } // Whether Azure subscription logs should be sent for the Monitor resource? func (o MonitorTagRuleLogOutput) SubscriptionLogEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v MonitorTagRuleLog) *bool { return v.SubscriptionLogEnabled }).(pulumi.BoolPtrOutput) } type MonitorTagRuleLogArrayOutput struct{ *pulumi.OutputState } func (MonitorTagRuleLogArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorTagRuleLog)(nil)).Elem() } func (o MonitorTagRuleLogArrayOutput) ToMonitorTagRuleLogArrayOutput() MonitorTagRuleLogArrayOutput { return o } func (o MonitorTagRuleLogArrayOutput) ToMonitorTagRuleLogArrayOutputWithContext(ctx context.Context) MonitorTagRuleLogArrayOutput { return o } func (o MonitorTagRuleLogArrayOutput) Index(i pulumi.IntInput) MonitorTagRuleLogOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MonitorTagRuleLog { return vs[0].([]MonitorTagRuleLog)[vs[1].(int)] }).(MonitorTagRuleLogOutput) } type MonitorTagRuleLogFilter struct { // Allowed values Include or Exclude. Action string `pulumi:"action"` // Name of the Tag. Name string `pulumi:"name"` // Value of the Tag. Value string `pulumi:"value"` } // MonitorTagRuleLogFilterInput is an input type that accepts MonitorTagRuleLogFilterArgs and MonitorTagRuleLogFilterOutput values. // You can construct a concrete instance of `MonitorTagRuleLogFilterInput` via: // // MonitorTagRuleLogFilterArgs{...} type MonitorTagRuleLogFilterInput interface { pulumi.Input ToMonitorTagRuleLogFilterOutput() MonitorTagRuleLogFilterOutput ToMonitorTagRuleLogFilterOutputWithContext(context.Context) MonitorTagRuleLogFilterOutput } type MonitorTagRuleLogFilterArgs struct { // Allowed values Include or Exclude. Action pulumi.StringInput `pulumi:"action"` // Name of the Tag. Name pulumi.StringInput `pulumi:"name"` // Value of the Tag. Value pulumi.StringInput `pulumi:"value"` } func (MonitorTagRuleLogFilterArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorTagRuleLogFilter)(nil)).Elem() } func (i MonitorTagRuleLogFilterArgs) ToMonitorTagRuleLogFilterOutput() MonitorTagRuleLogFilterOutput { return i.ToMonitorTagRuleLogFilterOutputWithContext(context.Background()) } func (i MonitorTagRuleLogFilterArgs) ToMonitorTagRuleLogFilterOutputWithContext(ctx context.Context) MonitorTagRuleLogFilterOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleLogFilterOutput) } // MonitorTagRuleLogFilterArrayInput is an input type that accepts MonitorTagRuleLogFilterArray and MonitorTagRuleLogFilterArrayOutput values. // You can construct a concrete instance of `MonitorTagRuleLogFilterArrayInput` via: // // MonitorTagRuleLogFilterArray{ MonitorTagRuleLogFilterArgs{...} } type MonitorTagRuleLogFilterArrayInput interface { pulumi.Input ToMonitorTagRuleLogFilterArrayOutput() MonitorTagRuleLogFilterArrayOutput ToMonitorTagRuleLogFilterArrayOutputWithContext(context.Context) MonitorTagRuleLogFilterArrayOutput } type MonitorTagRuleLogFilterArray []MonitorTagRuleLogFilterInput func (MonitorTagRuleLogFilterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorTagRuleLogFilter)(nil)).Elem() } func (i MonitorTagRuleLogFilterArray) ToMonitorTagRuleLogFilterArrayOutput() MonitorTagRuleLogFilterArrayOutput { return i.ToMonitorTagRuleLogFilterArrayOutputWithContext(context.Background()) } func (i MonitorTagRuleLogFilterArray) ToMonitorTagRuleLogFilterArrayOutputWithContext(ctx context.Context) MonitorTagRuleLogFilterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleLogFilterArrayOutput) } type MonitorTagRuleLogFilterOutput struct{ *pulumi.OutputState } func (MonitorTagRuleLogFilterOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorTagRuleLogFilter)(nil)).Elem() } func (o MonitorTagRuleLogFilterOutput) ToMonitorTagRuleLogFilterOutput() MonitorTagRuleLogFilterOutput { return o } func (o MonitorTagRuleLogFilterOutput) ToMonitorTagRuleLogFilterOutputWithContext(ctx context.Context) MonitorTagRuleLogFilterOutput { return o } // Allowed values Include or Exclude. func (o MonitorTagRuleLogFilterOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v MonitorTagRuleLogFilter) string { return v.Action }).(pulumi.StringOutput) } // Name of the Tag. func (o MonitorTagRuleLogFilterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v MonitorTagRuleLogFilter) string { return v.Name }).(pulumi.StringOutput) } // Value of the Tag. func (o MonitorTagRuleLogFilterOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v MonitorTagRuleLogFilter) string { return v.Value }).(pulumi.StringOutput) } type MonitorTagRuleLogFilterArrayOutput struct{ *pulumi.OutputState } func (MonitorTagRuleLogFilterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorTagRuleLogFilter)(nil)).Elem() } func (o MonitorTagRuleLogFilterArrayOutput) ToMonitorTagRuleLogFilterArrayOutput() MonitorTagRuleLogFilterArrayOutput { return o } func (o MonitorTagRuleLogFilterArrayOutput) ToMonitorTagRuleLogFilterArrayOutputWithContext(ctx context.Context) MonitorTagRuleLogFilterArrayOutput { return o } func (o MonitorTagRuleLogFilterArrayOutput) Index(i pulumi.IntInput) MonitorTagRuleLogFilterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MonitorTagRuleLogFilter { return vs[0].([]MonitorTagRuleLogFilter)[vs[1].(int)] }).(MonitorTagRuleLogFilterOutput) } type MonitorTagRuleMetric struct { // A `filter` block as defined below. // // > **Note:** List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. Filters []MonitorTagRuleMetricFilter `pulumi:"filters"` } // MonitorTagRuleMetricInput is an input type that accepts MonitorTagRuleMetricArgs and MonitorTagRuleMetricOutput values. // You can construct a concrete instance of `MonitorTagRuleMetricInput` via: // // MonitorTagRuleMetricArgs{...} type MonitorTagRuleMetricInput interface { pulumi.Input ToMonitorTagRuleMetricOutput() MonitorTagRuleMetricOutput ToMonitorTagRuleMetricOutputWithContext(context.Context) MonitorTagRuleMetricOutput } type MonitorTagRuleMetricArgs struct { // A `filter` block as defined below. // // > **Note:** List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. Filters MonitorTagRuleMetricFilterArrayInput `pulumi:"filters"` } func (MonitorTagRuleMetricArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorTagRuleMetric)(nil)).Elem() } func (i MonitorTagRuleMetricArgs) ToMonitorTagRuleMetricOutput() MonitorTagRuleMetricOutput { return i.ToMonitorTagRuleMetricOutputWithContext(context.Background()) } func (i MonitorTagRuleMetricArgs) ToMonitorTagRuleMetricOutputWithContext(ctx context.Context) MonitorTagRuleMetricOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleMetricOutput) } // MonitorTagRuleMetricArrayInput is an input type that accepts MonitorTagRuleMetricArray and MonitorTagRuleMetricArrayOutput values. // You can construct a concrete instance of `MonitorTagRuleMetricArrayInput` via: // // MonitorTagRuleMetricArray{ MonitorTagRuleMetricArgs{...} } type MonitorTagRuleMetricArrayInput interface { pulumi.Input
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/datadog/monitorSsoConfiguration.go
sdk/go/azure/datadog/monitorSsoConfiguration.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 datadog import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages SingleSignOn on the datadog Monitor. // // ## Example Usage // // ### Enabling SSO on monitor // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datadog" // "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-datadog"), // Location: pulumi.String("West US 2"), // }) // if err != nil { // return err // } // exampleMonitor, err := datadog.NewMonitor(ctx, "example", &datadog.MonitorArgs{ // Name: pulumi.String("example-monitor"), // ResourceGroupName: example.Name, // Location: example.Location, // DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{ // ApiKey: pulumi.String("XXXX"), // ApplicationKey: pulumi.String("XXXX"), // }, // User: &datadog.MonitorUserArgs{ // Name: pulumi.String("Example"), // Email: pulumi.String("abc@xyz.com"), // }, // SkuName: pulumi.String("Linked"), // Identity: &datadog.MonitorIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = datadog.NewMonitorSsoConfiguration(ctx, "example", &datadog.MonitorSsoConfigurationArgs{ // DatadogMonitorId: exampleMonitor.ID(), // SingleSignOn: pulumi.String("Enable"), // EnterpriseApplicationId: pulumi.String("00000000-0000-0000-0000-000000000000"), // }) // 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.Datadog` - 2021-03-01 // // ## Import // // SingleSignOn on the Datadog Monitor can be imported using the `signle sign on resource id`, e.g. // // ```sh // $ pulumi import azure:datadog/monitorSsoConfiguration:MonitorSsoConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1/singleSignOnConfigurations/default // ``` type MonitorSsoConfiguration struct { pulumi.CustomResourceState // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. DatadogMonitorId pulumi.StringOutput `pulumi:"datadogMonitorId"` // The application Id to perform SSO operation. EnterpriseApplicationId pulumi.StringOutput `pulumi:"enterpriseApplicationId"` // The SingleSignOn URL to login to Datadog org. LoginUrl pulumi.StringOutput `pulumi:"loginUrl"` // The name of the SingleSignOn configuration. Defaults to `default`. Name pulumi.StringOutput `pulumi:"name"` // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. SingleSignOn pulumi.StringOutput `pulumi:"singleSignOn"` // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. SingleSignOnEnabled pulumi.StringOutput `pulumi:"singleSignOnEnabled"` } // NewMonitorSsoConfiguration registers a new resource with the given unique name, arguments, and options. func NewMonitorSsoConfiguration(ctx *pulumi.Context, name string, args *MonitorSsoConfigurationArgs, opts ...pulumi.ResourceOption) (*MonitorSsoConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DatadogMonitorId == nil { return nil, errors.New("invalid value for required argument 'DatadogMonitorId'") } if args.EnterpriseApplicationId == nil { return nil, errors.New("invalid value for required argument 'EnterpriseApplicationId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource MonitorSsoConfiguration err := ctx.RegisterResource("azure:datadog/monitorSsoConfiguration:MonitorSsoConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMonitorSsoConfiguration gets an existing MonitorSsoConfiguration 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 GetMonitorSsoConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MonitorSsoConfigurationState, opts ...pulumi.ResourceOption) (*MonitorSsoConfiguration, error) { var resource MonitorSsoConfiguration err := ctx.ReadResource("azure:datadog/monitorSsoConfiguration:MonitorSsoConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MonitorSsoConfiguration resources. type monitorSsoConfigurationState struct { // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. DatadogMonitorId *string `pulumi:"datadogMonitorId"` // The application Id to perform SSO operation. EnterpriseApplicationId *string `pulumi:"enterpriseApplicationId"` // The SingleSignOn URL to login to Datadog org. LoginUrl *string `pulumi:"loginUrl"` // The name of the SingleSignOn configuration. Defaults to `default`. Name *string `pulumi:"name"` // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. SingleSignOn *string `pulumi:"singleSignOn"` // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. SingleSignOnEnabled *string `pulumi:"singleSignOnEnabled"` } type MonitorSsoConfigurationState struct { // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. DatadogMonitorId pulumi.StringPtrInput // The application Id to perform SSO operation. EnterpriseApplicationId pulumi.StringPtrInput // The SingleSignOn URL to login to Datadog org. LoginUrl pulumi.StringPtrInput // The name of the SingleSignOn configuration. Defaults to `default`. Name pulumi.StringPtrInput // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. SingleSignOn pulumi.StringPtrInput // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. SingleSignOnEnabled pulumi.StringPtrInput } func (MonitorSsoConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*monitorSsoConfigurationState)(nil)).Elem() } type monitorSsoConfigurationArgs struct { // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. DatadogMonitorId string `pulumi:"datadogMonitorId"` // The application Id to perform SSO operation. EnterpriseApplicationId string `pulumi:"enterpriseApplicationId"` // The name of the SingleSignOn configuration. Defaults to `default`. Name *string `pulumi:"name"` // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. SingleSignOn *string `pulumi:"singleSignOn"` // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. SingleSignOnEnabled *string `pulumi:"singleSignOnEnabled"` } // The set of arguments for constructing a MonitorSsoConfiguration resource. type MonitorSsoConfigurationArgs struct { // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. DatadogMonitorId pulumi.StringInput // The application Id to perform SSO operation. EnterpriseApplicationId pulumi.StringInput // The name of the SingleSignOn configuration. Defaults to `default`. Name pulumi.StringPtrInput // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. SingleSignOn pulumi.StringPtrInput // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. SingleSignOnEnabled pulumi.StringPtrInput } func (MonitorSsoConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*monitorSsoConfigurationArgs)(nil)).Elem() } type MonitorSsoConfigurationInput interface { pulumi.Input ToMonitorSsoConfigurationOutput() MonitorSsoConfigurationOutput ToMonitorSsoConfigurationOutputWithContext(ctx context.Context) MonitorSsoConfigurationOutput } func (*MonitorSsoConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**MonitorSsoConfiguration)(nil)).Elem() } func (i *MonitorSsoConfiguration) ToMonitorSsoConfigurationOutput() MonitorSsoConfigurationOutput { return i.ToMonitorSsoConfigurationOutputWithContext(context.Background()) } func (i *MonitorSsoConfiguration) ToMonitorSsoConfigurationOutputWithContext(ctx context.Context) MonitorSsoConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorSsoConfigurationOutput) } // MonitorSsoConfigurationArrayInput is an input type that accepts MonitorSsoConfigurationArray and MonitorSsoConfigurationArrayOutput values. // You can construct a concrete instance of `MonitorSsoConfigurationArrayInput` via: // // MonitorSsoConfigurationArray{ MonitorSsoConfigurationArgs{...} } type MonitorSsoConfigurationArrayInput interface { pulumi.Input ToMonitorSsoConfigurationArrayOutput() MonitorSsoConfigurationArrayOutput ToMonitorSsoConfigurationArrayOutputWithContext(context.Context) MonitorSsoConfigurationArrayOutput } type MonitorSsoConfigurationArray []MonitorSsoConfigurationInput func (MonitorSsoConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*MonitorSsoConfiguration)(nil)).Elem() } func (i MonitorSsoConfigurationArray) ToMonitorSsoConfigurationArrayOutput() MonitorSsoConfigurationArrayOutput { return i.ToMonitorSsoConfigurationArrayOutputWithContext(context.Background()) } func (i MonitorSsoConfigurationArray) ToMonitorSsoConfigurationArrayOutputWithContext(ctx context.Context) MonitorSsoConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorSsoConfigurationArrayOutput) } // MonitorSsoConfigurationMapInput is an input type that accepts MonitorSsoConfigurationMap and MonitorSsoConfigurationMapOutput values. // You can construct a concrete instance of `MonitorSsoConfigurationMapInput` via: // // MonitorSsoConfigurationMap{ "key": MonitorSsoConfigurationArgs{...} } type MonitorSsoConfigurationMapInput interface { pulumi.Input ToMonitorSsoConfigurationMapOutput() MonitorSsoConfigurationMapOutput ToMonitorSsoConfigurationMapOutputWithContext(context.Context) MonitorSsoConfigurationMapOutput } type MonitorSsoConfigurationMap map[string]MonitorSsoConfigurationInput func (MonitorSsoConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MonitorSsoConfiguration)(nil)).Elem() } func (i MonitorSsoConfigurationMap) ToMonitorSsoConfigurationMapOutput() MonitorSsoConfigurationMapOutput { return i.ToMonitorSsoConfigurationMapOutputWithContext(context.Background()) } func (i MonitorSsoConfigurationMap) ToMonitorSsoConfigurationMapOutputWithContext(ctx context.Context) MonitorSsoConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorSsoConfigurationMapOutput) } type MonitorSsoConfigurationOutput struct{ *pulumi.OutputState } func (MonitorSsoConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorSsoConfiguration)(nil)).Elem() } func (o MonitorSsoConfigurationOutput) ToMonitorSsoConfigurationOutput() MonitorSsoConfigurationOutput { return o } func (o MonitorSsoConfigurationOutput) ToMonitorSsoConfigurationOutputWithContext(ctx context.Context) MonitorSsoConfigurationOutput { return o } // The Datadog Monitor Id which should be used for this Datadog Monitor SSO Configuration. Changing this forces a new Datadog Monitor SSO Configuration to be created. func (o MonitorSsoConfigurationOutput) DatadogMonitorId() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.DatadogMonitorId }).(pulumi.StringOutput) } // The application Id to perform SSO operation. func (o MonitorSsoConfigurationOutput) EnterpriseApplicationId() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.EnterpriseApplicationId }).(pulumi.StringOutput) } // The SingleSignOn URL to login to Datadog org. func (o MonitorSsoConfigurationOutput) LoginUrl() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.LoginUrl }).(pulumi.StringOutput) } // The name of the SingleSignOn configuration. Defaults to `default`. func (o MonitorSsoConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The state of SingleSignOn configuration. Possible values are `Enable`, `Disable`, `Initial` and `Existing`. func (o MonitorSsoConfigurationOutput) SingleSignOn() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.SingleSignOn }).(pulumi.StringOutput) } // Deprecated: `singleSignOnEnabled` has been deprecated in favour of the `singleSignOn` property and will be removed in v5.0 of the AzureRM Provider. func (o MonitorSsoConfigurationOutput) SingleSignOnEnabled() pulumi.StringOutput { return o.ApplyT(func(v *MonitorSsoConfiguration) pulumi.StringOutput { return v.SingleSignOnEnabled }).(pulumi.StringOutput) } type MonitorSsoConfigurationArrayOutput struct{ *pulumi.OutputState } func (MonitorSsoConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*MonitorSsoConfiguration)(nil)).Elem() } func (o MonitorSsoConfigurationArrayOutput) ToMonitorSsoConfigurationArrayOutput() MonitorSsoConfigurationArrayOutput { return o } func (o MonitorSsoConfigurationArrayOutput) ToMonitorSsoConfigurationArrayOutputWithContext(ctx context.Context) MonitorSsoConfigurationArrayOutput { return o } func (o MonitorSsoConfigurationArrayOutput) Index(i pulumi.IntInput) MonitorSsoConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MonitorSsoConfiguration { return vs[0].([]*MonitorSsoConfiguration)[vs[1].(int)] }).(MonitorSsoConfigurationOutput) } type MonitorSsoConfigurationMapOutput struct{ *pulumi.OutputState } func (MonitorSsoConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MonitorSsoConfiguration)(nil)).Elem() } func (o MonitorSsoConfigurationMapOutput) ToMonitorSsoConfigurationMapOutput() MonitorSsoConfigurationMapOutput { return o } func (o MonitorSsoConfigurationMapOutput) ToMonitorSsoConfigurationMapOutputWithContext(ctx context.Context) MonitorSsoConfigurationMapOutput { return o } func (o MonitorSsoConfigurationMapOutput) MapIndex(k pulumi.StringInput) MonitorSsoConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MonitorSsoConfiguration { return vs[0].(map[string]*MonitorSsoConfiguration)[vs[1].(string)] }).(MonitorSsoConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MonitorSsoConfigurationInput)(nil)).Elem(), &MonitorSsoConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorSsoConfigurationArrayInput)(nil)).Elem(), MonitorSsoConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorSsoConfigurationMapInput)(nil)).Elem(), MonitorSsoConfigurationMap{}) pulumi.RegisterOutputType(MonitorSsoConfigurationOutput{}) pulumi.RegisterOutputType(MonitorSsoConfigurationArrayOutput{}) pulumi.RegisterOutputType(MonitorSsoConfigurationMapOutput{}) }
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/datadog/monitorTagRule.go
sdk/go/azure/datadog/monitorTagRule.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 datadog import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages TagRules on the datadog Monitor. // // ## Example Usage // // ### Adding TagRules on monitor // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datadog" // "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-datadog"), // Location: pulumi.String("West US 2"), // }) // if err != nil { // return err // } // exampleMonitor, err := datadog.NewMonitor(ctx, "example", &datadog.MonitorArgs{ // Name: pulumi.String("example-monitor"), // ResourceGroupName: example.Name, // Location: example.Location, // DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{ // ApiKey: pulumi.String("XXXX"), // ApplicationKey: pulumi.String("XXXX"), // }, // User: &datadog.MonitorUserArgs{ // Name: pulumi.String("Example"), // Email: pulumi.String("abc@xyz.com"), // }, // SkuName: pulumi.String("Linked"), // Identity: &datadog.MonitorIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = datadog.NewMonitorTagRule(ctx, "example", &datadog.MonitorTagRuleArgs{ // DatadogMonitorId: exampleMonitor.ID(), // Logs: datadog.MonitorTagRuleLogArray{ // &datadog.MonitorTagRuleLogArgs{ // SubscriptionLogEnabled: pulumi.Bool(true), // }, // }, // Metrics: datadog.MonitorTagRuleMetricArray{ // &datadog.MonitorTagRuleMetricArgs{ // Filters: datadog.MonitorTagRuleMetricFilterArray{ // &datadog.MonitorTagRuleMetricFilterArgs{ // Name: pulumi.String("Test"), // Value: pulumi.String("Logs"), // Action: pulumi.String("Include"), // }, // }, // }, // }, // }) // 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.Datadog` - 2021-03-01 // // ## Import // // Tag Rules on the Datadog Monitor can be imported using the `tag rule resource id`, e.g. // // ```sh // $ pulumi import azure:datadog/monitorTagRule:MonitorTagRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1/tagRules/default // ``` type MonitorTagRule struct { pulumi.CustomResourceState // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. DatadogMonitorId pulumi.StringOutput `pulumi:"datadogMonitorId"` // A `log` block as defined below. Logs MonitorTagRuleLogArrayOutput `pulumi:"logs"` // A `metric` block as defined below. Metrics MonitorTagRuleMetricArrayOutput `pulumi:"metrics"` // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. Name pulumi.StringOutput `pulumi:"name"` } // NewMonitorTagRule registers a new resource with the given unique name, arguments, and options. func NewMonitorTagRule(ctx *pulumi.Context, name string, args *MonitorTagRuleArgs, opts ...pulumi.ResourceOption) (*MonitorTagRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DatadogMonitorId == nil { return nil, errors.New("invalid value for required argument 'DatadogMonitorId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource MonitorTagRule err := ctx.RegisterResource("azure:datadog/monitorTagRule:MonitorTagRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMonitorTagRule gets an existing MonitorTagRule 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 GetMonitorTagRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MonitorTagRuleState, opts ...pulumi.ResourceOption) (*MonitorTagRule, error) { var resource MonitorTagRule err := ctx.ReadResource("azure:datadog/monitorTagRule:MonitorTagRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MonitorTagRule resources. type monitorTagRuleState struct { // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. DatadogMonitorId *string `pulumi:"datadogMonitorId"` // A `log` block as defined below. Logs []MonitorTagRuleLog `pulumi:"logs"` // A `metric` block as defined below. Metrics []MonitorTagRuleMetric `pulumi:"metrics"` // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. Name *string `pulumi:"name"` } type MonitorTagRuleState struct { // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. DatadogMonitorId pulumi.StringPtrInput // A `log` block as defined below. Logs MonitorTagRuleLogArrayInput // A `metric` block as defined below. Metrics MonitorTagRuleMetricArrayInput // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. Name pulumi.StringPtrInput } func (MonitorTagRuleState) ElementType() reflect.Type { return reflect.TypeOf((*monitorTagRuleState)(nil)).Elem() } type monitorTagRuleArgs struct { // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. DatadogMonitorId string `pulumi:"datadogMonitorId"` // A `log` block as defined below. Logs []MonitorTagRuleLog `pulumi:"logs"` // A `metric` block as defined below. Metrics []MonitorTagRuleMetric `pulumi:"metrics"` // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. Name *string `pulumi:"name"` } // The set of arguments for constructing a MonitorTagRule resource. type MonitorTagRuleArgs struct { // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. DatadogMonitorId pulumi.StringInput // A `log` block as defined below. Logs MonitorTagRuleLogArrayInput // A `metric` block as defined below. Metrics MonitorTagRuleMetricArrayInput // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. Name pulumi.StringPtrInput } func (MonitorTagRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*monitorTagRuleArgs)(nil)).Elem() } type MonitorTagRuleInput interface { pulumi.Input ToMonitorTagRuleOutput() MonitorTagRuleOutput ToMonitorTagRuleOutputWithContext(ctx context.Context) MonitorTagRuleOutput } func (*MonitorTagRule) ElementType() reflect.Type { return reflect.TypeOf((**MonitorTagRule)(nil)).Elem() } func (i *MonitorTagRule) ToMonitorTagRuleOutput() MonitorTagRuleOutput { return i.ToMonitorTagRuleOutputWithContext(context.Background()) } func (i *MonitorTagRule) ToMonitorTagRuleOutputWithContext(ctx context.Context) MonitorTagRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleOutput) } // MonitorTagRuleArrayInput is an input type that accepts MonitorTagRuleArray and MonitorTagRuleArrayOutput values. // You can construct a concrete instance of `MonitorTagRuleArrayInput` via: // // MonitorTagRuleArray{ MonitorTagRuleArgs{...} } type MonitorTagRuleArrayInput interface { pulumi.Input ToMonitorTagRuleArrayOutput() MonitorTagRuleArrayOutput ToMonitorTagRuleArrayOutputWithContext(context.Context) MonitorTagRuleArrayOutput } type MonitorTagRuleArray []MonitorTagRuleInput func (MonitorTagRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*MonitorTagRule)(nil)).Elem() } func (i MonitorTagRuleArray) ToMonitorTagRuleArrayOutput() MonitorTagRuleArrayOutput { return i.ToMonitorTagRuleArrayOutputWithContext(context.Background()) } func (i MonitorTagRuleArray) ToMonitorTagRuleArrayOutputWithContext(ctx context.Context) MonitorTagRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleArrayOutput) } // MonitorTagRuleMapInput is an input type that accepts MonitorTagRuleMap and MonitorTagRuleMapOutput values. // You can construct a concrete instance of `MonitorTagRuleMapInput` via: // // MonitorTagRuleMap{ "key": MonitorTagRuleArgs{...} } type MonitorTagRuleMapInput interface { pulumi.Input ToMonitorTagRuleMapOutput() MonitorTagRuleMapOutput ToMonitorTagRuleMapOutputWithContext(context.Context) MonitorTagRuleMapOutput } type MonitorTagRuleMap map[string]MonitorTagRuleInput func (MonitorTagRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MonitorTagRule)(nil)).Elem() } func (i MonitorTagRuleMap) ToMonitorTagRuleMapOutput() MonitorTagRuleMapOutput { return i.ToMonitorTagRuleMapOutputWithContext(context.Background()) } func (i MonitorTagRuleMap) ToMonitorTagRuleMapOutputWithContext(ctx context.Context) MonitorTagRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorTagRuleMapOutput) } type MonitorTagRuleOutput struct{ *pulumi.OutputState } func (MonitorTagRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorTagRule)(nil)).Elem() } func (o MonitorTagRuleOutput) ToMonitorTagRuleOutput() MonitorTagRuleOutput { return o } func (o MonitorTagRuleOutput) ToMonitorTagRuleOutputWithContext(ctx context.Context) MonitorTagRuleOutput { return o } // The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created. func (o MonitorTagRuleOutput) DatadogMonitorId() pulumi.StringOutput { return o.ApplyT(func(v *MonitorTagRule) pulumi.StringOutput { return v.DatadogMonitorId }).(pulumi.StringOutput) } // A `log` block as defined below. func (o MonitorTagRuleOutput) Logs() MonitorTagRuleLogArrayOutput { return o.ApplyT(func(v *MonitorTagRule) MonitorTagRuleLogArrayOutput { return v.Logs }).(MonitorTagRuleLogArrayOutput) } // A `metric` block as defined below. func (o MonitorTagRuleOutput) Metrics() MonitorTagRuleMetricArrayOutput { return o.ApplyT(func(v *MonitorTagRule) MonitorTagRuleMetricArrayOutput { return v.Metrics }).(MonitorTagRuleMetricArrayOutput) } // The name of the Tag Rules configuration. The allowed value is `default`. Defaults to `default`. func (o MonitorTagRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *MonitorTagRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type MonitorTagRuleArrayOutput struct{ *pulumi.OutputState } func (MonitorTagRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*MonitorTagRule)(nil)).Elem() } func (o MonitorTagRuleArrayOutput) ToMonitorTagRuleArrayOutput() MonitorTagRuleArrayOutput { return o } func (o MonitorTagRuleArrayOutput) ToMonitorTagRuleArrayOutputWithContext(ctx context.Context) MonitorTagRuleArrayOutput { return o } func (o MonitorTagRuleArrayOutput) Index(i pulumi.IntInput) MonitorTagRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MonitorTagRule { return vs[0].([]*MonitorTagRule)[vs[1].(int)] }).(MonitorTagRuleOutput) } type MonitorTagRuleMapOutput struct{ *pulumi.OutputState } func (MonitorTagRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MonitorTagRule)(nil)).Elem() } func (o MonitorTagRuleMapOutput) ToMonitorTagRuleMapOutput() MonitorTagRuleMapOutput { return o } func (o MonitorTagRuleMapOutput) ToMonitorTagRuleMapOutputWithContext(ctx context.Context) MonitorTagRuleMapOutput { return o } func (o MonitorTagRuleMapOutput) MapIndex(k pulumi.StringInput) MonitorTagRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MonitorTagRule { return vs[0].(map[string]*MonitorTagRule)[vs[1].(string)] }).(MonitorTagRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MonitorTagRuleInput)(nil)).Elem(), &MonitorTagRule{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorTagRuleArrayInput)(nil)).Elem(), MonitorTagRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorTagRuleMapInput)(nil)).Elem(), MonitorTagRuleMap{}) pulumi.RegisterOutputType(MonitorTagRuleOutput{}) pulumi.RegisterOutputType(MonitorTagRuleArrayOutput{}) pulumi.RegisterOutputType(MonitorTagRuleMapOutput{}) }
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/datadog/monitor.go
sdk/go/azure/datadog/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 datadog import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a datadog Monitor. // // ## Example Usage // // ### Monitor creation with linking to Datadog organization // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datadog" // "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-datadog"), // Location: pulumi.String("West US 2"), // }) // if err != nil { // return err // } // _, err = datadog.NewMonitor(ctx, "example", &datadog.MonitorArgs{ // Name: pulumi.String("example-monitor"), // ResourceGroupName: example.Name, // Location: example.Location, // DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{ // ApiKey: pulumi.String("XXXX"), // ApplicationKey: pulumi.String("XXXX"), // }, // User: &datadog.MonitorUserArgs{ // Name: pulumi.String("Example"), // Email: pulumi.String("abc@xyz.com"), // }, // SkuName: pulumi.String("Linked"), // Identity: &datadog.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 ( // // "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.String(monitoringReader.RoleDefinitionId), // PrincipalId: pulumi.Any(exampleAzurermDatadogMonitor.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: // // * `Microsoft.Datadog` - 2021-03-01 // // ## Import // // Datadog Monitors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:datadog/monitor:Monitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1 // ``` type Monitor struct { pulumi.CustomResourceState // A `datadogOrganization` block as defined below. DatadogOrganization MonitorDatadogOrganizationOutput `pulumi:"datadogOrganization"` // A `identity` block as defined below. Identity MonitorIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. Location pulumi.StringOutput `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. MarketplaceSubscriptionStatus pulumi.StringOutput `pulumi:"marketplaceSubscriptionStatus"` // Is monitoring enabled? Defaults to `true`. MonitoringEnabled pulumi.BoolPtrOutput `pulumi:"monitoringEnabled"` // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name which should be used for this sku. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the Datadog Monitor. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `user` block as defined below. User MonitorUserOutput `pulumi:"user"` } // 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.DatadogOrganization == nil { return nil, errors.New("invalid value for required argument 'DatadogOrganization'") } 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.User == nil { return nil, errors.New("invalid value for required argument 'User'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Monitor err := ctx.RegisterResource("azure:datadog/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:datadog/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 { // A `datadogOrganization` block as defined below. DatadogOrganization *MonitorDatadogOrganization `pulumi:"datadogOrganization"` // A `identity` block as defined below. Identity *MonitorIdentity `pulumi:"identity"` // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. Location *string `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. MarketplaceSubscriptionStatus *string `pulumi:"marketplaceSubscriptionStatus"` // Is monitoring enabled? Defaults to `true`. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name which should be used for this sku. SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Datadog Monitor. Tags map[string]string `pulumi:"tags"` // A `user` block as defined below. User *MonitorUser `pulumi:"user"` } type MonitorState struct { // A `datadogOrganization` block as defined below. DatadogOrganization MonitorDatadogOrganizationPtrInput // A `identity` block as defined below. Identity MonitorIdentityPtrInput // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. Location pulumi.StringPtrInput // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. MarketplaceSubscriptionStatus pulumi.StringPtrInput // Is monitoring enabled? Defaults to `true`. MonitoringEnabled pulumi.BoolPtrInput // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. ResourceGroupName pulumi.StringPtrInput // The name which should be used for this sku. SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Datadog Monitor. Tags pulumi.StringMapInput // A `user` block as defined below. User MonitorUserPtrInput } func (MonitorState) ElementType() reflect.Type { return reflect.TypeOf((*monitorState)(nil)).Elem() } type monitorArgs struct { // A `datadogOrganization` block as defined below. DatadogOrganization MonitorDatadogOrganization `pulumi:"datadogOrganization"` // A `identity` block as defined below. Identity *MonitorIdentity `pulumi:"identity"` // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. Location *string `pulumi:"location"` // Is monitoring enabled? Defaults to `true`. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name which should be used for this sku. SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Datadog Monitor. Tags map[string]string `pulumi:"tags"` // A `user` block as defined below. User MonitorUser `pulumi:"user"` } // The set of arguments for constructing a Monitor resource. type MonitorArgs struct { // A `datadogOrganization` block as defined below. DatadogOrganization MonitorDatadogOrganizationInput // A `identity` block as defined below. Identity MonitorIdentityPtrInput // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. Location pulumi.StringPtrInput // Is monitoring enabled? Defaults to `true`. MonitoringEnabled pulumi.BoolPtrInput // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. ResourceGroupName pulumi.StringInput // The name which should be used for this sku. SkuName pulumi.StringInput // A mapping of tags which should be assigned to the Datadog Monitor. Tags pulumi.StringMapInput // A `user` block as defined below. User MonitorUserInput } 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 } // A `datadogOrganization` block as defined below. func (o MonitorOutput) DatadogOrganization() MonitorDatadogOrganizationOutput { return o.ApplyT(func(v *Monitor) MonitorDatadogOrganizationOutput { return v.DatadogOrganization }).(MonitorDatadogOrganizationOutput) } // A `identity` block as defined below. func (o MonitorOutput) Identity() MonitorIdentityPtrOutput { return o.ApplyT(func(v *Monitor) MonitorIdentityPtrOutput { return v.Identity }).(MonitorIdentityPtrOutput) } // The Azure Region where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. func (o MonitorOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. func (o MonitorOutput) MarketplaceSubscriptionStatus() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.MarketplaceSubscriptionStatus }).(pulumi.StringOutput) } // Is monitoring enabled? Defaults to `true`. func (o MonitorOutput) MonitoringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Monitor) pulumi.BoolPtrOutput { return v.MonitoringEnabled }).(pulumi.BoolPtrOutput) } // The name of the user that will be associated with the Datadog Monitor. Changing this forces a new Datadog Monitor to be created. func (o MonitorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Datadog Monitor should exist. Changing this forces a new Datadog Monitor to be created. func (o MonitorOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name which should be used for this sku. func (o MonitorOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Datadog Monitor. func (o MonitorOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Monitor) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A `user` block as defined below. func (o MonitorOutput) User() MonitorUserOutput { return o.ApplyT(func(v *Monitor) MonitorUserOutput { return v.User }).(MonitorUserOutput) } 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/customip/init.go
sdk/go/azure/customip/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 customip 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:customip/prefix:Prefix": r = &Prefix{} 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", "customip/prefix", &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/customip/prefix.go
sdk/go/azure/customip/prefix.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 customip 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 IPv4 prefix or custom IPv6 prefix. // // ## Example Usage // // *IPv4 custom prefix* // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/customip" // "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 = customip.NewPrefix(ctx, "example", &customip.PrefixArgs{ // Name: pulumi.String("example-CustomIPPrefix"), // Location: example.Location, // ResourceGroupName: example.Name, // Cidr: pulumi.String("1.2.3.4/22"), // Zones: pulumi.StringArray{ // pulumi.String("1"), // pulumi.String("2"), // pulumi.String("3"), // }, // CommissioningEnabled: pulumi.Bool(true), // RoaValidityEndDate: pulumi.String("2099-12-12"), // WanValidationSignedMessage: pulumi.String("signed message for WAN validation"), // Tags: pulumi.StringMap{ // "env": pulumi.String("test"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // *IPv6 custom prefix* // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/customip" // "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 { // _, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // global, err := customip.NewPrefix(ctx, "global", &customip.PrefixArgs{ // Name: pulumi.String("example-Global-CustomIPPrefix"), // Location: pulumi.Any(test.Location), // ResourceGroupName: pulumi.Any(test.Name), // Cidr: pulumi.String("2001:db8:1::/48"), // RoaValidityEndDate: pulumi.String("2199-12-12"), // WanValidationSignedMessage: pulumi.String("signed message for WAN validation"), // }) // if err != nil { // return err // } // invokeCidrsubnet, err := std.Cidrsubnet(ctx, &std.CidrsubnetArgs{ // Input: cidr, // Newbits: 16, // Netnum: 1, // }, nil) // if err != nil { // return err // } // _, err = customip.NewPrefix(ctx, "regional", &customip.PrefixArgs{ // Name: pulumi.String("example-Regional-CustomIPPrefix"), // Location: pulumi.Any(test.Location), // ResourceGroupName: pulumi.Any(test.Name), // ParentCustomIpPrefixId: global.ID(), // Cidr: pulumi.String(global.Cidr.ApplyT(func(cidr string) (std.CidrsubnetResult, error) { // %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) { // return invoke.Result, nil // }).(pulumi.StringPtrOutput)), // Zones: pulumi.StringArray{ // pulumi.String("1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // ``` // // ## Import // // A Custom IP Prefix can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:customip/prefix:Prefix example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/customIPPrefixes/customIPPrefix1 // ``` type Prefix struct { pulumi.CustomResourceState // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. Cidr pulumi.StringOutput `pulumi:"cidr"` // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. CommissioningEnabled pulumi.BoolPtrOutput `pulumi:"commissioningEnabled"` // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. InternetAdvertisingDisabled pulumi.BoolPtrOutput `pulumi:"internetAdvertisingDisabled"` // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Custom IP Prefix. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. ParentCustomIpPrefixId pulumi.StringPtrOutput `pulumi:"parentCustomIpPrefixId"` // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. RoaValidityEndDate pulumi.StringPtrOutput `pulumi:"roaValidityEndDate"` // A mapping of tags to assign to the Custom IP Prefix. Tags pulumi.StringMapOutput `pulumi:"tags"` // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. WanValidationSignedMessage pulumi.StringPtrOutput `pulumi:"wanValidationSignedMessage"` // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewPrefix registers a new resource with the given unique name, arguments, and options. func NewPrefix(ctx *pulumi.Context, name string, args *PrefixArgs, opts ...pulumi.ResourceOption) (*Prefix, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Cidr == nil { return nil, errors.New("invalid value for required argument 'Cidr'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Prefix err := ctx.RegisterResource("azure:customip/prefix:Prefix", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrefix gets an existing Prefix 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 GetPrefix(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrefixState, opts ...pulumi.ResourceOption) (*Prefix, error) { var resource Prefix err := ctx.ReadResource("azure:customip/prefix:Prefix", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Prefix resources. type prefixState struct { // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. Cidr *string `pulumi:"cidr"` // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. CommissioningEnabled *bool `pulumi:"commissioningEnabled"` // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. InternetAdvertisingDisabled *bool `pulumi:"internetAdvertisingDisabled"` // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Custom IP Prefix. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. ParentCustomIpPrefixId *string `pulumi:"parentCustomIpPrefixId"` // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. RoaValidityEndDate *string `pulumi:"roaValidityEndDate"` // A mapping of tags to assign to the Custom IP Prefix. Tags map[string]string `pulumi:"tags"` // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. WanValidationSignedMessage *string `pulumi:"wanValidationSignedMessage"` // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. Zones []string `pulumi:"zones"` } type PrefixState struct { // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. Cidr pulumi.StringPtrInput // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. CommissioningEnabled pulumi.BoolPtrInput // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. InternetAdvertisingDisabled pulumi.BoolPtrInput // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Custom IP Prefix. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. ParentCustomIpPrefixId pulumi.StringPtrInput // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. RoaValidityEndDate pulumi.StringPtrInput // A mapping of tags to assign to the Custom IP Prefix. Tags pulumi.StringMapInput // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. WanValidationSignedMessage pulumi.StringPtrInput // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. Zones pulumi.StringArrayInput } func (PrefixState) ElementType() reflect.Type { return reflect.TypeOf((*prefixState)(nil)).Elem() } type prefixArgs struct { // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. Cidr string `pulumi:"cidr"` // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. CommissioningEnabled *bool `pulumi:"commissioningEnabled"` // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. InternetAdvertisingDisabled *bool `pulumi:"internetAdvertisingDisabled"` // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Custom IP Prefix. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. ParentCustomIpPrefixId *string `pulumi:"parentCustomIpPrefixId"` // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. RoaValidityEndDate *string `pulumi:"roaValidityEndDate"` // A mapping of tags to assign to the Custom IP Prefix. Tags map[string]string `pulumi:"tags"` // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. WanValidationSignedMessage *string `pulumi:"wanValidationSignedMessage"` // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a Prefix resource. type PrefixArgs struct { // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. Cidr pulumi.StringInput // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. CommissioningEnabled pulumi.BoolPtrInput // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. InternetAdvertisingDisabled pulumi.BoolPtrInput // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Custom IP Prefix. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. ParentCustomIpPrefixId pulumi.StringPtrInput // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. RoaValidityEndDate pulumi.StringPtrInput // A mapping of tags to assign to the Custom IP Prefix. Tags pulumi.StringMapInput // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. WanValidationSignedMessage pulumi.StringPtrInput // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. Zones pulumi.StringArrayInput } func (PrefixArgs) ElementType() reflect.Type { return reflect.TypeOf((*prefixArgs)(nil)).Elem() } type PrefixInput interface { pulumi.Input ToPrefixOutput() PrefixOutput ToPrefixOutputWithContext(ctx context.Context) PrefixOutput } func (*Prefix) ElementType() reflect.Type { return reflect.TypeOf((**Prefix)(nil)).Elem() } func (i *Prefix) ToPrefixOutput() PrefixOutput { return i.ToPrefixOutputWithContext(context.Background()) } func (i *Prefix) ToPrefixOutputWithContext(ctx context.Context) PrefixOutput { return pulumi.ToOutputWithContext(ctx, i).(PrefixOutput) } // PrefixArrayInput is an input type that accepts PrefixArray and PrefixArrayOutput values. // You can construct a concrete instance of `PrefixArrayInput` via: // // PrefixArray{ PrefixArgs{...} } type PrefixArrayInput interface { pulumi.Input ToPrefixArrayOutput() PrefixArrayOutput ToPrefixArrayOutputWithContext(context.Context) PrefixArrayOutput } type PrefixArray []PrefixInput func (PrefixArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Prefix)(nil)).Elem() } func (i PrefixArray) ToPrefixArrayOutput() PrefixArrayOutput { return i.ToPrefixArrayOutputWithContext(context.Background()) } func (i PrefixArray) ToPrefixArrayOutputWithContext(ctx context.Context) PrefixArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrefixArrayOutput) } // PrefixMapInput is an input type that accepts PrefixMap and PrefixMapOutput values. // You can construct a concrete instance of `PrefixMapInput` via: // // PrefixMap{ "key": PrefixArgs{...} } type PrefixMapInput interface { pulumi.Input ToPrefixMapOutput() PrefixMapOutput ToPrefixMapOutputWithContext(context.Context) PrefixMapOutput } type PrefixMap map[string]PrefixInput func (PrefixMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Prefix)(nil)).Elem() } func (i PrefixMap) ToPrefixMapOutput() PrefixMapOutput { return i.ToPrefixMapOutputWithContext(context.Background()) } func (i PrefixMap) ToPrefixMapOutputWithContext(ctx context.Context) PrefixMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrefixMapOutput) } type PrefixOutput struct{ *pulumi.OutputState } func (PrefixOutput) ElementType() reflect.Type { return reflect.TypeOf((**Prefix)(nil)).Elem() } func (o PrefixOutput) ToPrefixOutput() PrefixOutput { return o } func (o PrefixOutput) ToPrefixOutputWithContext(ctx context.Context) PrefixOutput { return o } // The `cidr` of the Custom IP Prefix, either IPv4 or IPv6. Changing this forces a new resource to be created. func (o PrefixOutput) Cidr() pulumi.StringOutput { return o.ApplyT(func(v *Prefix) pulumi.StringOutput { return v.Cidr }).(pulumi.StringOutput) } // Specifies that the custom IP prefix should be commissioned after provisioning in Azure. Defaults to `false`. // // !> **Note:** Changing the value of `commissioningEnabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. func (o PrefixOutput) CommissioningEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Prefix) pulumi.BoolPtrOutput { return v.CommissioningEnabled }).(pulumi.BoolPtrOutput) } // Specifies that the custom IP prefix should not be publicly advertised on the Internet when commissioned (regional commissioning feature). Defaults to `false`. // // !> **Note:** Changing the value of `internetAdvertisingDisabled` from `true` to `false` causes the IP prefix to stop being advertised by Azure and is functionally equivalent to deleting it when used in a production setting. func (o PrefixOutput) InternetAdvertisingDisabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Prefix) pulumi.BoolPtrOutput { return v.InternetAdvertisingDisabled }).(pulumi.BoolPtrOutput) } // The location where the Custom IP Prefix should exist. Changing this forces a new resource to be created. func (o PrefixOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Prefix) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Custom IP Prefix. Changing this forces a new resource to be created. func (o PrefixOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Prefix) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the parent prefix. Only needed when creating a regional/child IPv6 prefix. Changing this forces a new resource to be created. func (o PrefixOutput) ParentCustomIpPrefixId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Prefix) pulumi.StringPtrOutput { return v.ParentCustomIpPrefixId }).(pulumi.StringPtrOutput) } // The name of the Resource Group in which to create the Custom IP Prefix. Changing this forces a new resource to be created. func (o PrefixOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Prefix) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The expiration date of the Route Origin Authorization (ROA) document which has been filed with the Routing Internet Registry (RIR) for this prefix. The expected format is `YYYY-MM-DD`. Required when provisioning an IPv4 prefix or IPv6 global prefix. Changing this forces a new resource to be created. func (o PrefixOutput) RoaValidityEndDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Prefix) pulumi.StringPtrOutput { return v.RoaValidityEndDate }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the Custom IP Prefix. func (o PrefixOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Prefix) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The signed base64-encoded authorization message, which will be sent to Microsoft for WAN verification. Required when provisioning an IPv4 prefix or IPv6 global prefix. Refer to [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/create-custom-ip-address-prefix-cli#certificate-readiness) for more details about the process for your RIR. Changing this forces a new resource to be created. func (o PrefixOutput) WanValidationSignedMessage() pulumi.StringPtrOutput { return o.ApplyT(func(v *Prefix) pulumi.StringPtrOutput { return v.WanValidationSignedMessage }).(pulumi.StringPtrOutput) } // Specifies a list of Availability Zones in which this Custom IP Prefix should be located. Should not be specified when creating an IPv6 global prefix. Changing this forces a new resource to be created. // // > **Note:** In regions with [availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview), the Custom IP Prefix must be specified as either `Zone-redundant` or assigned to a specific zone. It can't be created with no zone specified in these regions. All IPs from the prefix must have the same zonal properties. func (o PrefixOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *Prefix) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type PrefixArrayOutput struct{ *pulumi.OutputState } func (PrefixArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Prefix)(nil)).Elem() } func (o PrefixArrayOutput) ToPrefixArrayOutput() PrefixArrayOutput { return o } func (o PrefixArrayOutput) ToPrefixArrayOutputWithContext(ctx context.Context) PrefixArrayOutput { return o } func (o PrefixArrayOutput) Index(i pulumi.IntInput) PrefixOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Prefix { return vs[0].([]*Prefix)[vs[1].(int)] }).(PrefixOutput) } type PrefixMapOutput struct{ *pulumi.OutputState } func (PrefixMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Prefix)(nil)).Elem() } func (o PrefixMapOutput) ToPrefixMapOutput() PrefixMapOutput { return o } func (o PrefixMapOutput) ToPrefixMapOutputWithContext(ctx context.Context) PrefixMapOutput { return o } func (o PrefixMapOutput) MapIndex(k pulumi.StringInput) PrefixOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Prefix { return vs[0].(map[string]*Prefix)[vs[1].(string)] }).(PrefixOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrefixInput)(nil)).Elem(), &Prefix{}) pulumi.RegisterInputType(reflect.TypeOf((*PrefixArrayInput)(nil)).Elem(), PrefixArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrefixMapInput)(nil)).Elem(), PrefixMap{}) pulumi.RegisterOutputType(PrefixOutput{}) pulumi.RegisterOutputType(PrefixArrayOutput{}) pulumi.RegisterOutputType(PrefixMapOutput{}) }
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/armmsi/init.go
sdk/go/azure/armmsi/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 armmsi 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:armmsi/federatedIdentityCredential:FederatedIdentityCredential": r = &FederatedIdentityCredential{} 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", "armmsi/federatedIdentityCredential", &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/armmsi/federatedIdentityCredential.go
sdk/go/azure/armmsi/federatedIdentityCredential.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 armmsi import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Federated Identity Credential. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/armmsi" // "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 { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Location: example.Location, // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = armmsi.NewFederatedIdentityCredential(ctx, "example", &armmsi.FederatedIdentityCredentialArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Audience: pulumi.String("foo"), // Issuer: pulumi.String("https://foo"), // ParentId: exampleUserAssignedIdentity.ID(), // Subject: pulumi.String("foo"), // }) // 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.ManagedIdentity` - 2024-11-30 // // ## Import // // An existing Federated Identity Credential can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:armmsi/federatedIdentityCredential:FederatedIdentityCredential example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{parentIdentityName}/federatedIdentityCredentials/{resourceName} // ``` type FederatedIdentityCredential struct { pulumi.CustomResourceState // Specifies the audience for this Federated Identity Credential. Audience pulumi.StringOutput `pulumi:"audience"` // Specifies the issuer of this Federated Identity Credential. Issuer pulumi.StringOutput `pulumi:"issuer"` // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. ParentId pulumi.StringOutput `pulumi:"parentId"` // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the subject for this Federated Identity Credential. Subject pulumi.StringOutput `pulumi:"subject"` } // NewFederatedIdentityCredential registers a new resource with the given unique name, arguments, and options. func NewFederatedIdentityCredential(ctx *pulumi.Context, name string, args *FederatedIdentityCredentialArgs, opts ...pulumi.ResourceOption) (*FederatedIdentityCredential, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Audience == nil { return nil, errors.New("invalid value for required argument 'Audience'") } if args.Issuer == nil { return nil, errors.New("invalid value for required argument 'Issuer'") } if args.ParentId == nil { return nil, errors.New("invalid value for required argument 'ParentId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Subject == nil { return nil, errors.New("invalid value for required argument 'Subject'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FederatedIdentityCredential err := ctx.RegisterResource("azure:armmsi/federatedIdentityCredential:FederatedIdentityCredential", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFederatedIdentityCredential gets an existing FederatedIdentityCredential 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 GetFederatedIdentityCredential(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FederatedIdentityCredentialState, opts ...pulumi.ResourceOption) (*FederatedIdentityCredential, error) { var resource FederatedIdentityCredential err := ctx.ReadResource("azure:armmsi/federatedIdentityCredential:FederatedIdentityCredential", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FederatedIdentityCredential resources. type federatedIdentityCredentialState struct { // Specifies the audience for this Federated Identity Credential. Audience *string `pulumi:"audience"` // Specifies the issuer of this Federated Identity Credential. Issuer *string `pulumi:"issuer"` // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. ParentId *string `pulumi:"parentId"` // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the subject for this Federated Identity Credential. Subject *string `pulumi:"subject"` } type FederatedIdentityCredentialState struct { // Specifies the audience for this Federated Identity Credential. Audience pulumi.StringPtrInput // Specifies the issuer of this Federated Identity Credential. Issuer pulumi.StringPtrInput // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. ParentId pulumi.StringPtrInput // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the subject for this Federated Identity Credential. Subject pulumi.StringPtrInput } func (FederatedIdentityCredentialState) ElementType() reflect.Type { return reflect.TypeOf((*federatedIdentityCredentialState)(nil)).Elem() } type federatedIdentityCredentialArgs struct { // Specifies the audience for this Federated Identity Credential. Audience string `pulumi:"audience"` // Specifies the issuer of this Federated Identity Credential. Issuer string `pulumi:"issuer"` // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. ParentId string `pulumi:"parentId"` // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the subject for this Federated Identity Credential. Subject string `pulumi:"subject"` } // The set of arguments for constructing a FederatedIdentityCredential resource. type FederatedIdentityCredentialArgs struct { // Specifies the audience for this Federated Identity Credential. Audience pulumi.StringInput // Specifies the issuer of this Federated Identity Credential. Issuer pulumi.StringInput // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. ParentId pulumi.StringInput // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. ResourceGroupName pulumi.StringInput // Specifies the subject for this Federated Identity Credential. Subject pulumi.StringInput } func (FederatedIdentityCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*federatedIdentityCredentialArgs)(nil)).Elem() } type FederatedIdentityCredentialInput interface { pulumi.Input ToFederatedIdentityCredentialOutput() FederatedIdentityCredentialOutput ToFederatedIdentityCredentialOutputWithContext(ctx context.Context) FederatedIdentityCredentialOutput } func (*FederatedIdentityCredential) ElementType() reflect.Type { return reflect.TypeOf((**FederatedIdentityCredential)(nil)).Elem() } func (i *FederatedIdentityCredential) ToFederatedIdentityCredentialOutput() FederatedIdentityCredentialOutput { return i.ToFederatedIdentityCredentialOutputWithContext(context.Background()) } func (i *FederatedIdentityCredential) ToFederatedIdentityCredentialOutputWithContext(ctx context.Context) FederatedIdentityCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(FederatedIdentityCredentialOutput) } // FederatedIdentityCredentialArrayInput is an input type that accepts FederatedIdentityCredentialArray and FederatedIdentityCredentialArrayOutput values. // You can construct a concrete instance of `FederatedIdentityCredentialArrayInput` via: // // FederatedIdentityCredentialArray{ FederatedIdentityCredentialArgs{...} } type FederatedIdentityCredentialArrayInput interface { pulumi.Input ToFederatedIdentityCredentialArrayOutput() FederatedIdentityCredentialArrayOutput ToFederatedIdentityCredentialArrayOutputWithContext(context.Context) FederatedIdentityCredentialArrayOutput } type FederatedIdentityCredentialArray []FederatedIdentityCredentialInput func (FederatedIdentityCredentialArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FederatedIdentityCredential)(nil)).Elem() } func (i FederatedIdentityCredentialArray) ToFederatedIdentityCredentialArrayOutput() FederatedIdentityCredentialArrayOutput { return i.ToFederatedIdentityCredentialArrayOutputWithContext(context.Background()) } func (i FederatedIdentityCredentialArray) ToFederatedIdentityCredentialArrayOutputWithContext(ctx context.Context) FederatedIdentityCredentialArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FederatedIdentityCredentialArrayOutput) } // FederatedIdentityCredentialMapInput is an input type that accepts FederatedIdentityCredentialMap and FederatedIdentityCredentialMapOutput values. // You can construct a concrete instance of `FederatedIdentityCredentialMapInput` via: // // FederatedIdentityCredentialMap{ "key": FederatedIdentityCredentialArgs{...} } type FederatedIdentityCredentialMapInput interface { pulumi.Input ToFederatedIdentityCredentialMapOutput() FederatedIdentityCredentialMapOutput ToFederatedIdentityCredentialMapOutputWithContext(context.Context) FederatedIdentityCredentialMapOutput } type FederatedIdentityCredentialMap map[string]FederatedIdentityCredentialInput func (FederatedIdentityCredentialMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FederatedIdentityCredential)(nil)).Elem() } func (i FederatedIdentityCredentialMap) ToFederatedIdentityCredentialMapOutput() FederatedIdentityCredentialMapOutput { return i.ToFederatedIdentityCredentialMapOutputWithContext(context.Background()) } func (i FederatedIdentityCredentialMap) ToFederatedIdentityCredentialMapOutputWithContext(ctx context.Context) FederatedIdentityCredentialMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FederatedIdentityCredentialMapOutput) } type FederatedIdentityCredentialOutput struct{ *pulumi.OutputState } func (FederatedIdentityCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((**FederatedIdentityCredential)(nil)).Elem() } func (o FederatedIdentityCredentialOutput) ToFederatedIdentityCredentialOutput() FederatedIdentityCredentialOutput { return o } func (o FederatedIdentityCredentialOutput) ToFederatedIdentityCredentialOutputWithContext(ctx context.Context) FederatedIdentityCredentialOutput { return o } // Specifies the audience for this Federated Identity Credential. func (o FederatedIdentityCredentialOutput) Audience() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.Audience }).(pulumi.StringOutput) } // Specifies the issuer of this Federated Identity Credential. func (o FederatedIdentityCredentialOutput) Issuer() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.Issuer }).(pulumi.StringOutput) } // Specifies the name of this Federated Identity Credential. Changing this forces a new resource to be created. func (o FederatedIdentityCredentialOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies parent ID of User Assigned Identity for this Federated Identity Credential. Changing this forces a new Federated Identity Credential to be created. func (o FederatedIdentityCredentialOutput) ParentId() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.ParentId }).(pulumi.StringOutput) } // Specifies the name of the Resource Group within which this Federated Identity Credential should exist. Changing this forces a new Federated Identity Credential to be created. func (o FederatedIdentityCredentialOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the subject for this Federated Identity Credential. func (o FederatedIdentityCredentialOutput) Subject() pulumi.StringOutput { return o.ApplyT(func(v *FederatedIdentityCredential) pulumi.StringOutput { return v.Subject }).(pulumi.StringOutput) } type FederatedIdentityCredentialArrayOutput struct{ *pulumi.OutputState } func (FederatedIdentityCredentialArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FederatedIdentityCredential)(nil)).Elem() } func (o FederatedIdentityCredentialArrayOutput) ToFederatedIdentityCredentialArrayOutput() FederatedIdentityCredentialArrayOutput { return o } func (o FederatedIdentityCredentialArrayOutput) ToFederatedIdentityCredentialArrayOutputWithContext(ctx context.Context) FederatedIdentityCredentialArrayOutput { return o } func (o FederatedIdentityCredentialArrayOutput) Index(i pulumi.IntInput) FederatedIdentityCredentialOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FederatedIdentityCredential { return vs[0].([]*FederatedIdentityCredential)[vs[1].(int)] }).(FederatedIdentityCredentialOutput) } type FederatedIdentityCredentialMapOutput struct{ *pulumi.OutputState } func (FederatedIdentityCredentialMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FederatedIdentityCredential)(nil)).Elem() } func (o FederatedIdentityCredentialMapOutput) ToFederatedIdentityCredentialMapOutput() FederatedIdentityCredentialMapOutput { return o } func (o FederatedIdentityCredentialMapOutput) ToFederatedIdentityCredentialMapOutputWithContext(ctx context.Context) FederatedIdentityCredentialMapOutput { return o } func (o FederatedIdentityCredentialMapOutput) MapIndex(k pulumi.StringInput) FederatedIdentityCredentialOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FederatedIdentityCredential { return vs[0].(map[string]*FederatedIdentityCredential)[vs[1].(string)] }).(FederatedIdentityCredentialOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FederatedIdentityCredentialInput)(nil)).Elem(), &FederatedIdentityCredential{}) pulumi.RegisterInputType(reflect.TypeOf((*FederatedIdentityCredentialArrayInput)(nil)).Elem(), FederatedIdentityCredentialArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FederatedIdentityCredentialMapInput)(nil)).Elem(), FederatedIdentityCredentialMap{}) pulumi.RegisterOutputType(FederatedIdentityCredentialOutput{}) pulumi.RegisterOutputType(FederatedIdentityCredentialArrayOutput{}) pulumi.RegisterOutputType(FederatedIdentityCredentialMapOutput{}) }
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/mysql/init.go
sdk/go/azure/mysql/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 mysql 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:mysql/flexibleDatabase:FlexibleDatabase": r = &FlexibleDatabase{} case "azure:mysql/flexibleServer:FlexibleServer": r = &FlexibleServer{} case "azure:mysql/flexibleServerActiveDirectoryAdministratory:FlexibleServerActiveDirectoryAdministratory": r = &FlexibleServerActiveDirectoryAdministratory{} case "azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration": r = &FlexibleServerConfiguration{} case "azure:mysql/flexibleServerFirewallRule:FlexibleServerFirewallRule": r = &FlexibleServerFirewallRule{} 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", "mysql/flexibleDatabase", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mysql/flexibleServer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mysql/flexibleServerActiveDirectoryAdministratory", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mysql/flexibleServerConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "mysql/flexibleServerFirewallRule", &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/mysql/flexibleServerConfiguration.go
sdk/go/azure/mysql/flexibleServerConfiguration.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 mysql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Sets a MySQL Flexible Server Configuration value on a MySQL Flexible Server. // // ## Disclaimers // // > **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it. // // ## 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/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 // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example-fs"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorLogin: pulumi.String("adminTerraform"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // SkuName: pulumi.String("GP_Standard_D2ds_v4"), // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServerConfiguration(ctx, "example", &mysql.FlexibleServerConfigurationArgs{ // Name: pulumi.String("interactive_timeout"), // ResourceGroupName: example.Name, // ServerName: exampleFlexibleServer.Name, // Value: pulumi.String("600"), // }) // 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.DBforMySQL` - 2023-12-30 // // ## Import // // MySQL Flexible Server Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1/configurations/interactive_timeout // ``` type FlexibleServerConfiguration struct { pulumi.CustomResourceState // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Value pulumi.StringOutput `pulumi:"value"` } // NewFlexibleServerConfiguration registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerConfiguration(ctx *pulumi.Context, name string, args *FlexibleServerConfigurationArgs, opts ...pulumi.ResourceOption) (*FlexibleServerConfiguration, 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.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.Value == nil { return nil, errors.New("invalid value for required argument 'Value'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerConfiguration err := ctx.RegisterResource("azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerConfiguration gets an existing FlexibleServerConfiguration 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 GetFlexibleServerConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerConfigurationState, opts ...pulumi.ResourceOption) (*FlexibleServerConfiguration, error) { var resource FlexibleServerConfiguration err := ctx.ReadResource("azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerConfiguration resources. type flexibleServerConfigurationState struct { // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Value *string `pulumi:"value"` } type FlexibleServerConfigurationState struct { // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Value pulumi.StringPtrInput } func (FlexibleServerConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerConfigurationState)(nil)).Elem() } type flexibleServerConfigurationArgs struct { // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Value string `pulumi:"value"` } // The set of arguments for constructing a FlexibleServerConfiguration resource. type FlexibleServerConfigurationArgs struct { // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Value pulumi.StringInput } func (FlexibleServerConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerConfigurationArgs)(nil)).Elem() } type FlexibleServerConfigurationInput interface { pulumi.Input ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput } func (*FlexibleServerConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerConfiguration)(nil)).Elem() } func (i *FlexibleServerConfiguration) ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput { return i.ToFlexibleServerConfigurationOutputWithContext(context.Background()) } func (i *FlexibleServerConfiguration) ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationOutput) } // FlexibleServerConfigurationArrayInput is an input type that accepts FlexibleServerConfigurationArray and FlexibleServerConfigurationArrayOutput values. // You can construct a concrete instance of `FlexibleServerConfigurationArrayInput` via: // // FlexibleServerConfigurationArray{ FlexibleServerConfigurationArgs{...} } type FlexibleServerConfigurationArrayInput interface { pulumi.Input ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput ToFlexibleServerConfigurationArrayOutputWithContext(context.Context) FlexibleServerConfigurationArrayOutput } type FlexibleServerConfigurationArray []FlexibleServerConfigurationInput func (FlexibleServerConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerConfiguration)(nil)).Elem() } func (i FlexibleServerConfigurationArray) ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput { return i.ToFlexibleServerConfigurationArrayOutputWithContext(context.Background()) } func (i FlexibleServerConfigurationArray) ToFlexibleServerConfigurationArrayOutputWithContext(ctx context.Context) FlexibleServerConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationArrayOutput) } // FlexibleServerConfigurationMapInput is an input type that accepts FlexibleServerConfigurationMap and FlexibleServerConfigurationMapOutput values. // You can construct a concrete instance of `FlexibleServerConfigurationMapInput` via: // // FlexibleServerConfigurationMap{ "key": FlexibleServerConfigurationArgs{...} } type FlexibleServerConfigurationMapInput interface { pulumi.Input ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput ToFlexibleServerConfigurationMapOutputWithContext(context.Context) FlexibleServerConfigurationMapOutput } type FlexibleServerConfigurationMap map[string]FlexibleServerConfigurationInput func (FlexibleServerConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerConfiguration)(nil)).Elem() } func (i FlexibleServerConfigurationMap) ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput { return i.ToFlexibleServerConfigurationMapOutputWithContext(context.Background()) } func (i FlexibleServerConfigurationMap) ToFlexibleServerConfigurationMapOutputWithContext(ctx context.Context) FlexibleServerConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationMapOutput) } type FlexibleServerConfigurationOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationOutput) ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput { return o } func (o FlexibleServerConfigurationOutput) ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput { return o } // Specifies the name of the MySQL Flexible Server Configuration, which needs [to be a valid MySQL configuration name](https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html). Changing this forces a new resource to be created. func (o FlexibleServerConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. func (o FlexibleServerConfigurationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. func (o FlexibleServerConfigurationOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. func (o FlexibleServerConfigurationOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput) } type FlexibleServerConfigurationArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationArrayOutput) ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput { return o } func (o FlexibleServerConfigurationArrayOutput) ToFlexibleServerConfigurationArrayOutputWithContext(ctx context.Context) FlexibleServerConfigurationArrayOutput { return o } func (o FlexibleServerConfigurationArrayOutput) Index(i pulumi.IntInput) FlexibleServerConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerConfiguration { return vs[0].([]*FlexibleServerConfiguration)[vs[1].(int)] }).(FlexibleServerConfigurationOutput) } type FlexibleServerConfigurationMapOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationMapOutput) ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput { return o } func (o FlexibleServerConfigurationMapOutput) ToFlexibleServerConfigurationMapOutputWithContext(ctx context.Context) FlexibleServerConfigurationMapOutput { return o } func (o FlexibleServerConfigurationMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerConfiguration { return vs[0].(map[string]*FlexibleServerConfiguration)[vs[1].(string)] }).(FlexibleServerConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationInput)(nil)).Elem(), &FlexibleServerConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationArrayInput)(nil)).Elem(), FlexibleServerConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationMapInput)(nil)).Elem(), FlexibleServerConfigurationMap{}) pulumi.RegisterOutputType(FlexibleServerConfigurationOutput{}) pulumi.RegisterOutputType(FlexibleServerConfigurationArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerConfigurationMapOutput{}) }
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/mysql/pulumiTypes.go
sdk/go/azure/mysql/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 mysql 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 FlexibleServerCustomerManagedKey struct { // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. GeoBackupKeyVaultKeyId *string `pulumi:"geoBackupKeyVaultKeyId"` // The geo backup user managed identity id for a Customer Managed Key. Should be added with `identityIds`. It can't cross region and need identity in same region as geo backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. GeoBackupUserAssignedIdentityId *string `pulumi:"geoBackupUserAssignedIdentityId"` // The ID of the Key Vault Key. KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // The ID of the Managed HSM Key. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identityIds`. PrimaryUserAssignedIdentityId *string `pulumi:"primaryUserAssignedIdentityId"` } // FlexibleServerCustomerManagedKeyInput is an input type that accepts FlexibleServerCustomerManagedKeyArgs and FlexibleServerCustomerManagedKeyOutput values. // You can construct a concrete instance of `FlexibleServerCustomerManagedKeyInput` via: // // FlexibleServerCustomerManagedKeyArgs{...} type FlexibleServerCustomerManagedKeyInput interface { pulumi.Input ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput ToFlexibleServerCustomerManagedKeyOutputWithContext(context.Context) FlexibleServerCustomerManagedKeyOutput } type FlexibleServerCustomerManagedKeyArgs struct { // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. GeoBackupKeyVaultKeyId pulumi.StringPtrInput `pulumi:"geoBackupKeyVaultKeyId"` // The geo backup user managed identity id for a Customer Managed Key. Should be added with `identityIds`. It can't cross region and need identity in same region as geo backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. GeoBackupUserAssignedIdentityId pulumi.StringPtrInput `pulumi:"geoBackupUserAssignedIdentityId"` // The ID of the Key Vault Key. KeyVaultKeyId pulumi.StringPtrInput `pulumi:"keyVaultKeyId"` // The ID of the Managed HSM Key. ManagedHsmKeyId pulumi.StringPtrInput `pulumi:"managedHsmKeyId"` // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identityIds`. PrimaryUserAssignedIdentityId pulumi.StringPtrInput `pulumi:"primaryUserAssignedIdentityId"` } func (FlexibleServerCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerCustomerManagedKey)(nil)).Elem() } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput { return i.ToFlexibleServerCustomerManagedKeyOutputWithContext(context.Background()) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyOutput) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return i.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyOutput).ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx) } // FlexibleServerCustomerManagedKeyPtrInput is an input type that accepts FlexibleServerCustomerManagedKeyArgs, FlexibleServerCustomerManagedKeyPtr and FlexibleServerCustomerManagedKeyPtrOutput values. // You can construct a concrete instance of `FlexibleServerCustomerManagedKeyPtrInput` via: // // FlexibleServerCustomerManagedKeyArgs{...} // // or: // // nil type FlexibleServerCustomerManagedKeyPtrInput interface { pulumi.Input ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Context) FlexibleServerCustomerManagedKeyPtrOutput } type flexibleServerCustomerManagedKeyPtrType FlexibleServerCustomerManagedKeyArgs func FlexibleServerCustomerManagedKeyPtr(v *FlexibleServerCustomerManagedKeyArgs) FlexibleServerCustomerManagedKeyPtrInput { return (*flexibleServerCustomerManagedKeyPtrType)(v) } func (*flexibleServerCustomerManagedKeyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerCustomerManagedKey)(nil)).Elem() } func (i *flexibleServerCustomerManagedKeyPtrType) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return i.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i *flexibleServerCustomerManagedKeyPtrType) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyPtrOutput) } type FlexibleServerCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (FlexibleServerCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerCustomerManagedKey)(nil)).Elem() } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput { return o } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyOutput { return o } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return o.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerCustomerManagedKey) *FlexibleServerCustomerManagedKey { return &v }).(FlexibleServerCustomerManagedKeyPtrOutput) } // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. func (o FlexibleServerCustomerManagedKeyOutput) GeoBackupKeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.GeoBackupKeyVaultKeyId }).(pulumi.StringPtrOutput) } // The geo backup user managed identity id for a Customer Managed Key. Should be added with `identityIds`. It can't cross region and need identity in same region as geo backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o FlexibleServerCustomerManagedKeyOutput) GeoBackupUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.GeoBackupUserAssignedIdentityId }).(pulumi.StringPtrOutput) } // The ID of the Key Vault Key. func (o FlexibleServerCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The ID of the Managed HSM Key. func (o FlexibleServerCustomerManagedKeyOutput) ManagedHsmKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput) } // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identityIds`. func (o FlexibleServerCustomerManagedKeyOutput) PrimaryUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.PrimaryUserAssignedIdentityId }).(pulumi.StringPtrOutput) } type FlexibleServerCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerCustomerManagedKeyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerCustomerManagedKey)(nil)).Elem() } func (o FlexibleServerCustomerManagedKeyPtrOutput) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return o } func (o FlexibleServerCustomerManagedKeyPtrOutput) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return o } func (o FlexibleServerCustomerManagedKeyPtrOutput) Elem() FlexibleServerCustomerManagedKeyOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) FlexibleServerCustomerManagedKey { if v != nil { return *v } var ret FlexibleServerCustomerManagedKey return ret }).(FlexibleServerCustomerManagedKeyOutput) } // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. func (o FlexibleServerCustomerManagedKeyPtrOutput) GeoBackupKeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.GeoBackupKeyVaultKeyId }).(pulumi.StringPtrOutput) } // The geo backup user managed identity id for a Customer Managed Key. Should be added with `identityIds`. It can't cross region and need identity in same region as geo backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o FlexibleServerCustomerManagedKeyPtrOutput) GeoBackupUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.GeoBackupUserAssignedIdentityId }).(pulumi.StringPtrOutput) } // The ID of the Key Vault Key. func (o FlexibleServerCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The ID of the Managed HSM Key. func (o FlexibleServerCustomerManagedKeyPtrOutput) ManagedHsmKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput) } // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with `identityIds`. func (o FlexibleServerCustomerManagedKeyPtrOutput) PrimaryUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.PrimaryUserAssignedIdentityId }).(pulumi.StringPtrOutput) } type FlexibleServerHighAvailability struct { // The high availability mode for the MySQL Flexible Server. Possibles values are `SameZone` and `ZoneRedundant`. // // > **Note:** `storage[0].auto_grow_enabled` must be enabled when `highAvailability` is enabled. To change the `highAvailability` for a MySQL Flexible Server created with `highAvailability` disabled during creation, the resource has to be recreated. Mode string `pulumi:"mode"` StandbyAvailabilityZone *string `pulumi:"standbyAvailabilityZone"` } // FlexibleServerHighAvailabilityInput is an input type that accepts FlexibleServerHighAvailabilityArgs and FlexibleServerHighAvailabilityOutput values. // You can construct a concrete instance of `FlexibleServerHighAvailabilityInput` via: // // FlexibleServerHighAvailabilityArgs{...} type FlexibleServerHighAvailabilityInput interface { pulumi.Input ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput ToFlexibleServerHighAvailabilityOutputWithContext(context.Context) FlexibleServerHighAvailabilityOutput } type FlexibleServerHighAvailabilityArgs struct { // The high availability mode for the MySQL Flexible Server. Possibles values are `SameZone` and `ZoneRedundant`. // // > **Note:** `storage[0].auto_grow_enabled` must be enabled when `highAvailability` is enabled. To change the `highAvailability` for a MySQL Flexible Server created with `highAvailability` disabled during creation, the resource has to be recreated. Mode pulumi.StringInput `pulumi:"mode"` StandbyAvailabilityZone pulumi.StringPtrInput `pulumi:"standbyAvailabilityZone"` } func (FlexibleServerHighAvailabilityArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerHighAvailability)(nil)).Elem() } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput { return i.ToFlexibleServerHighAvailabilityOutputWithContext(context.Background()) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityOutput) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return i.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityOutput).ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx) } // FlexibleServerHighAvailabilityPtrInput is an input type that accepts FlexibleServerHighAvailabilityArgs, FlexibleServerHighAvailabilityPtr and FlexibleServerHighAvailabilityPtrOutput values. // You can construct a concrete instance of `FlexibleServerHighAvailabilityPtrInput` via: // // FlexibleServerHighAvailabilityArgs{...} // // or: // // nil type FlexibleServerHighAvailabilityPtrInput interface { pulumi.Input ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Context) FlexibleServerHighAvailabilityPtrOutput } type flexibleServerHighAvailabilityPtrType FlexibleServerHighAvailabilityArgs func FlexibleServerHighAvailabilityPtr(v *FlexibleServerHighAvailabilityArgs) FlexibleServerHighAvailabilityPtrInput { return (*flexibleServerHighAvailabilityPtrType)(v) } func (*flexibleServerHighAvailabilityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerHighAvailability)(nil)).Elem() } func (i *flexibleServerHighAvailabilityPtrType) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return i.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (i *flexibleServerHighAvailabilityPtrType) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityPtrOutput) } type FlexibleServerHighAvailabilityOutput struct{ *pulumi.OutputState } func (FlexibleServerHighAvailabilityOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerHighAvailability)(nil)).Elem() } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput { return o } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityOutput { return o } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return o.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerHighAvailability) *FlexibleServerHighAvailability { return &v }).(FlexibleServerHighAvailabilityPtrOutput) } // The high availability mode for the MySQL Flexible Server. Possibles values are `SameZone` and `ZoneRedundant`. // // > **Note:** `storage[0].auto_grow_enabled` must be enabled when `highAvailability` is enabled. To change the `highAvailability` for a MySQL Flexible Server created with `highAvailability` disabled during creation, the resource has to be recreated. func (o FlexibleServerHighAvailabilityOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v FlexibleServerHighAvailability) string { return v.Mode }).(pulumi.StringOutput) } func (o FlexibleServerHighAvailabilityOutput) StandbyAvailabilityZone() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerHighAvailability) *string { return v.StandbyAvailabilityZone }).(pulumi.StringPtrOutput) } type FlexibleServerHighAvailabilityPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerHighAvailabilityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerHighAvailability)(nil)).Elem() } func (o FlexibleServerHighAvailabilityPtrOutput) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return o } func (o FlexibleServerHighAvailabilityPtrOutput) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return o } func (o FlexibleServerHighAvailabilityPtrOutput) Elem() FlexibleServerHighAvailabilityOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) FlexibleServerHighAvailability { if v != nil { return *v } var ret FlexibleServerHighAvailability return ret }).(FlexibleServerHighAvailabilityOutput) } // The high availability mode for the MySQL Flexible Server. Possibles values are `SameZone` and `ZoneRedundant`. // // > **Note:** `storage[0].auto_grow_enabled` must be enabled when `highAvailability` is enabled. To change the `highAvailability` for a MySQL Flexible Server created with `highAvailability` disabled during creation, the resource has to be recreated. func (o FlexibleServerHighAvailabilityPtrOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) *string { if v == nil { return nil } return &v.Mode }).(pulumi.StringPtrOutput) } func (o FlexibleServerHighAvailabilityPtrOutput) StandbyAvailabilityZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) *string { if v == nil { return nil } return v.StandbyAvailabilityZone }).(pulumi.StringPtrOutput) } type FlexibleServerIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. IdentityIds []string `pulumi:"identityIds"` // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. Type string `pulumi:"type"` } // FlexibleServerIdentityInput is an input type that accepts FlexibleServerIdentityArgs and FlexibleServerIdentityOutput values. // You can construct a concrete instance of `FlexibleServerIdentityInput` via: // // FlexibleServerIdentityArgs{...} type FlexibleServerIdentityInput interface { pulumi.Input ToFlexibleServerIdentityOutput() FlexibleServerIdentityOutput ToFlexibleServerIdentityOutputWithContext(context.Context) FlexibleServerIdentityOutput } type FlexibleServerIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (FlexibleServerIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerIdentity)(nil)).Elem() } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityOutput() FlexibleServerIdentityOutput { return i.ToFlexibleServerIdentityOutputWithContext(context.Background()) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityOutputWithContext(ctx context.Context) FlexibleServerIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerIdentityOutput) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput { return i.ToFlexibleServerIdentityPtrOutputWithContext(context.Background()) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityPtrOutputWithContext(ctx context.Context) FlexibleServerIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerIdentityOutput).ToFlexibleServerIdentityPtrOutputWithContext(ctx) } // FlexibleServerIdentityPtrInput is an input type that accepts FlexibleServerIdentityArgs, FlexibleServerIdentityPtr and FlexibleServerIdentityPtrOutput values. // You can construct a concrete instance of `FlexibleServerIdentityPtrInput` via: // // FlexibleServerIdentityArgs{...} // // or: // // nil type FlexibleServerIdentityPtrInput interface { pulumi.Input ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput ToFlexibleServerIdentityPtrOutputWithContext(context.Context) FlexibleServerIdentityPtrOutput } type flexibleServerIdentityPtrType FlexibleServerIdentityArgs func FlexibleServerIdentityPtr(v *FlexibleServerIdentityArgs) FlexibleServerIdentityPtrInput { return (*flexibleServerIdentityPtrType)(v) } func (*flexibleServerIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerIdentity)(nil)).Elem() } func (i *flexibleServerIdentityPtrType) ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput { return i.ToFlexibleServerIdentityPtrOutputWithContext(context.Background()) } func (i *flexibleServerIdentityPtrType) ToFlexibleServerIdentityPtrOutputWithContext(ctx context.Context) FlexibleServerIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerIdentityPtrOutput) } type FlexibleServerIdentityOutput struct{ *pulumi.OutputState } func (FlexibleServerIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerIdentity)(nil)).Elem() } func (o FlexibleServerIdentityOutput) ToFlexibleServerIdentityOutput() FlexibleServerIdentityOutput { return o } func (o FlexibleServerIdentityOutput) ToFlexibleServerIdentityOutputWithContext(ctx context.Context) FlexibleServerIdentityOutput { return o } func (o FlexibleServerIdentityOutput) ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput { return o.ToFlexibleServerIdentityPtrOutputWithContext(context.Background()) } func (o FlexibleServerIdentityOutput) ToFlexibleServerIdentityPtrOutputWithContext(ctx context.Context) FlexibleServerIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerIdentity) *FlexibleServerIdentity { return &v }).(FlexibleServerIdentityPtrOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. func (o FlexibleServerIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v FlexibleServerIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. func (o FlexibleServerIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FlexibleServerIdentity) string { return v.Type }).(pulumi.StringOutput) } type FlexibleServerIdentityPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerIdentity)(nil)).Elem() } func (o FlexibleServerIdentityPtrOutput) ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput { return o } func (o FlexibleServerIdentityPtrOutput) ToFlexibleServerIdentityPtrOutputWithContext(ctx context.Context) FlexibleServerIdentityPtrOutput { return o } func (o FlexibleServerIdentityPtrOutput) Elem() FlexibleServerIdentityOutput { return o.ApplyT(func(v *FlexibleServerIdentity) FlexibleServerIdentity { if v != nil { return *v } var ret FlexibleServerIdentity return ret }).(FlexibleServerIdentityOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. func (o FlexibleServerIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *FlexibleServerIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is `UserAssigned`. func (o FlexibleServerIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type FlexibleServerMaintenanceWindow struct { // The day of week for maintenance window. Defaults to `0`. DayOfWeek *int `pulumi:"dayOfWeek"` // The start hour for maintenance window. Defaults to `0`. StartHour *int `pulumi:"startHour"` // The start minute for maintenance window. Defaults to `0`. StartMinute *int `pulumi:"startMinute"` } // FlexibleServerMaintenanceWindowInput is an input type that accepts FlexibleServerMaintenanceWindowArgs and FlexibleServerMaintenanceWindowOutput values. // You can construct a concrete instance of `FlexibleServerMaintenanceWindowInput` via: // // FlexibleServerMaintenanceWindowArgs{...} type FlexibleServerMaintenanceWindowInput interface { pulumi.Input ToFlexibleServerMaintenanceWindowOutput() FlexibleServerMaintenanceWindowOutput ToFlexibleServerMaintenanceWindowOutputWithContext(context.Context) FlexibleServerMaintenanceWindowOutput } type FlexibleServerMaintenanceWindowArgs struct { // The day of week for maintenance window. Defaults to `0`. DayOfWeek pulumi.IntPtrInput `pulumi:"dayOfWeek"` // The start hour for maintenance window. Defaults to `0`. StartHour pulumi.IntPtrInput `pulumi:"startHour"` // The start minute for maintenance window. Defaults to `0`. StartMinute pulumi.IntPtrInput `pulumi:"startMinute"` } func (FlexibleServerMaintenanceWindowArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerMaintenanceWindow)(nil)).Elem() } func (i FlexibleServerMaintenanceWindowArgs) ToFlexibleServerMaintenanceWindowOutput() FlexibleServerMaintenanceWindowOutput { return i.ToFlexibleServerMaintenanceWindowOutputWithContext(context.Background()) } func (i FlexibleServerMaintenanceWindowArgs) ToFlexibleServerMaintenanceWindowOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerMaintenanceWindowOutput) } func (i FlexibleServerMaintenanceWindowArgs) ToFlexibleServerMaintenanceWindowPtrOutput() FlexibleServerMaintenanceWindowPtrOutput { return i.ToFlexibleServerMaintenanceWindowPtrOutputWithContext(context.Background()) } func (i FlexibleServerMaintenanceWindowArgs) ToFlexibleServerMaintenanceWindowPtrOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerMaintenanceWindowOutput).ToFlexibleServerMaintenanceWindowPtrOutputWithContext(ctx) } // FlexibleServerMaintenanceWindowPtrInput is an input type that accepts FlexibleServerMaintenanceWindowArgs, FlexibleServerMaintenanceWindowPtr and FlexibleServerMaintenanceWindowPtrOutput values. // You can construct a concrete instance of `FlexibleServerMaintenanceWindowPtrInput` via: // // FlexibleServerMaintenanceWindowArgs{...} // // or: // // nil type FlexibleServerMaintenanceWindowPtrInput interface { pulumi.Input ToFlexibleServerMaintenanceWindowPtrOutput() FlexibleServerMaintenanceWindowPtrOutput ToFlexibleServerMaintenanceWindowPtrOutputWithContext(context.Context) FlexibleServerMaintenanceWindowPtrOutput } type flexibleServerMaintenanceWindowPtrType FlexibleServerMaintenanceWindowArgs func FlexibleServerMaintenanceWindowPtr(v *FlexibleServerMaintenanceWindowArgs) FlexibleServerMaintenanceWindowPtrInput { return (*flexibleServerMaintenanceWindowPtrType)(v) } func (*flexibleServerMaintenanceWindowPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerMaintenanceWindow)(nil)).Elem() } func (i *flexibleServerMaintenanceWindowPtrType) ToFlexibleServerMaintenanceWindowPtrOutput() FlexibleServerMaintenanceWindowPtrOutput { return i.ToFlexibleServerMaintenanceWindowPtrOutputWithContext(context.Background()) } func (i *flexibleServerMaintenanceWindowPtrType) ToFlexibleServerMaintenanceWindowPtrOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerMaintenanceWindowPtrOutput) } type FlexibleServerMaintenanceWindowOutput struct{ *pulumi.OutputState } func (FlexibleServerMaintenanceWindowOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerMaintenanceWindow)(nil)).Elem() } func (o FlexibleServerMaintenanceWindowOutput) ToFlexibleServerMaintenanceWindowOutput() FlexibleServerMaintenanceWindowOutput { return o } func (o FlexibleServerMaintenanceWindowOutput) ToFlexibleServerMaintenanceWindowOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowOutput { return o } func (o FlexibleServerMaintenanceWindowOutput) ToFlexibleServerMaintenanceWindowPtrOutput() FlexibleServerMaintenanceWindowPtrOutput { return o.ToFlexibleServerMaintenanceWindowPtrOutputWithContext(context.Background()) } func (o FlexibleServerMaintenanceWindowOutput) ToFlexibleServerMaintenanceWindowPtrOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerMaintenanceWindow) *FlexibleServerMaintenanceWindow { return &v }).(FlexibleServerMaintenanceWindowPtrOutput) } // The day of week for maintenance window. Defaults to `0`. func (o FlexibleServerMaintenanceWindowOutput) DayOfWeek() pulumi.IntPtrOutput { return o.ApplyT(func(v FlexibleServerMaintenanceWindow) *int { return v.DayOfWeek }).(pulumi.IntPtrOutput) } // The start hour for maintenance window. Defaults to `0`. func (o FlexibleServerMaintenanceWindowOutput) StartHour() pulumi.IntPtrOutput { return o.ApplyT(func(v FlexibleServerMaintenanceWindow) *int { return v.StartHour }).(pulumi.IntPtrOutput) } // The start minute for maintenance window. Defaults to `0`. func (o FlexibleServerMaintenanceWindowOutput) StartMinute() pulumi.IntPtrOutput { return o.ApplyT(func(v FlexibleServerMaintenanceWindow) *int { return v.StartMinute }).(pulumi.IntPtrOutput) } type FlexibleServerMaintenanceWindowPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerMaintenanceWindowPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerMaintenanceWindow)(nil)).Elem() } func (o FlexibleServerMaintenanceWindowPtrOutput) ToFlexibleServerMaintenanceWindowPtrOutput() FlexibleServerMaintenanceWindowPtrOutput { return o } func (o FlexibleServerMaintenanceWindowPtrOutput) ToFlexibleServerMaintenanceWindowPtrOutputWithContext(ctx context.Context) FlexibleServerMaintenanceWindowPtrOutput { return o } func (o FlexibleServerMaintenanceWindowPtrOutput) Elem() FlexibleServerMaintenanceWindowOutput { return o.ApplyT(func(v *FlexibleServerMaintenanceWindow) FlexibleServerMaintenanceWindow { if v != nil { return *v } var ret FlexibleServerMaintenanceWindow return ret }).(FlexibleServerMaintenanceWindowOutput) } // The day of week for maintenance window. Defaults to `0`.
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/mysql/flexibleDatabase.go
sdk/go/azure/mysql/flexibleDatabase.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 mysql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a MySQL Database within a MySQL Flexible Server // // ## 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/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 // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example-mysql-flexible-server"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorLogin: pulumi.String("mysqladminun"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // SkuName: pulumi.String("B_Standard_B1ms"), // }) // if err != nil { // return err // } // _, 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 // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforMySQL` - 2023-12-30 // // ## Import // // MySQL Database's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mysql/flexibleDatabase:FlexibleDatabase database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleserver1/databases/database1 // ``` type FlexibleDatabase struct { pulumi.CustomResourceState // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. Charset pulumi.StringOutput `pulumi:"charset"` // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. Collation pulumi.StringOutput `pulumi:"collation"` // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` } // NewFlexibleDatabase registers a new resource with the given unique name, arguments, and options. func NewFlexibleDatabase(ctx *pulumi.Context, name string, args *FlexibleDatabaseArgs, opts ...pulumi.ResourceOption) (*FlexibleDatabase, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Charset == nil { return nil, errors.New("invalid value for required argument 'Charset'") } if args.Collation == nil { return nil, errors.New("invalid value for required argument 'Collation'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleDatabase err := ctx.RegisterResource("azure:mysql/flexibleDatabase:FlexibleDatabase", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleDatabase gets an existing FlexibleDatabase 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 GetFlexibleDatabase(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleDatabaseState, opts ...pulumi.ResourceOption) (*FlexibleDatabase, error) { var resource FlexibleDatabase err := ctx.ReadResource("azure:mysql/flexibleDatabase:FlexibleDatabase", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleDatabase resources. type flexibleDatabaseState struct { // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. Charset *string `pulumi:"charset"` // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. Collation *string `pulumi:"collation"` // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` } type FlexibleDatabaseState struct { // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. Charset pulumi.StringPtrInput // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. Collation pulumi.StringPtrInput // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput } func (FlexibleDatabaseState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleDatabaseState)(nil)).Elem() } type flexibleDatabaseArgs struct { // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. Charset string `pulumi:"charset"` // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. Collation string `pulumi:"collation"` // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` } // The set of arguments for constructing a FlexibleDatabase resource. type FlexibleDatabaseArgs struct { // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. Charset pulumi.StringInput // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. Collation pulumi.StringInput // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput } func (FlexibleDatabaseArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleDatabaseArgs)(nil)).Elem() } type FlexibleDatabaseInput interface { pulumi.Input ToFlexibleDatabaseOutput() FlexibleDatabaseOutput ToFlexibleDatabaseOutputWithContext(ctx context.Context) FlexibleDatabaseOutput } func (*FlexibleDatabase) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleDatabase)(nil)).Elem() } func (i *FlexibleDatabase) ToFlexibleDatabaseOutput() FlexibleDatabaseOutput { return i.ToFlexibleDatabaseOutputWithContext(context.Background()) } func (i *FlexibleDatabase) ToFlexibleDatabaseOutputWithContext(ctx context.Context) FlexibleDatabaseOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleDatabaseOutput) } // FlexibleDatabaseArrayInput is an input type that accepts FlexibleDatabaseArray and FlexibleDatabaseArrayOutput values. // You can construct a concrete instance of `FlexibleDatabaseArrayInput` via: // // FlexibleDatabaseArray{ FlexibleDatabaseArgs{...} } type FlexibleDatabaseArrayInput interface { pulumi.Input ToFlexibleDatabaseArrayOutput() FlexibleDatabaseArrayOutput ToFlexibleDatabaseArrayOutputWithContext(context.Context) FlexibleDatabaseArrayOutput } type FlexibleDatabaseArray []FlexibleDatabaseInput func (FlexibleDatabaseArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleDatabase)(nil)).Elem() } func (i FlexibleDatabaseArray) ToFlexibleDatabaseArrayOutput() FlexibleDatabaseArrayOutput { return i.ToFlexibleDatabaseArrayOutputWithContext(context.Background()) } func (i FlexibleDatabaseArray) ToFlexibleDatabaseArrayOutputWithContext(ctx context.Context) FlexibleDatabaseArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleDatabaseArrayOutput) } // FlexibleDatabaseMapInput is an input type that accepts FlexibleDatabaseMap and FlexibleDatabaseMapOutput values. // You can construct a concrete instance of `FlexibleDatabaseMapInput` via: // // FlexibleDatabaseMap{ "key": FlexibleDatabaseArgs{...} } type FlexibleDatabaseMapInput interface { pulumi.Input ToFlexibleDatabaseMapOutput() FlexibleDatabaseMapOutput ToFlexibleDatabaseMapOutputWithContext(context.Context) FlexibleDatabaseMapOutput } type FlexibleDatabaseMap map[string]FlexibleDatabaseInput func (FlexibleDatabaseMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleDatabase)(nil)).Elem() } func (i FlexibleDatabaseMap) ToFlexibleDatabaseMapOutput() FlexibleDatabaseMapOutput { return i.ToFlexibleDatabaseMapOutputWithContext(context.Background()) } func (i FlexibleDatabaseMap) ToFlexibleDatabaseMapOutputWithContext(ctx context.Context) FlexibleDatabaseMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleDatabaseMapOutput) } type FlexibleDatabaseOutput struct{ *pulumi.OutputState } func (FlexibleDatabaseOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleDatabase)(nil)).Elem() } func (o FlexibleDatabaseOutput) ToFlexibleDatabaseOutput() FlexibleDatabaseOutput { return o } func (o FlexibleDatabaseOutput) ToFlexibleDatabaseOutputWithContext(ctx context.Context) FlexibleDatabaseOutput { return o } // Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html). Changing this forces a new resource to be created. func (o FlexibleDatabaseOutput) Charset() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleDatabase) pulumi.StringOutput { return v.Charset }).(pulumi.StringOutput) } // Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). Changing this forces a new resource to be created. func (o FlexibleDatabaseOutput) Collation() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleDatabase) pulumi.StringOutput { return v.Collation }).(pulumi.StringOutput) } // Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html). Changing this forces a new resource to be created. func (o FlexibleDatabaseOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleDatabase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. func (o FlexibleDatabaseOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleDatabase) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. func (o FlexibleDatabaseOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleDatabase) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } type FlexibleDatabaseArrayOutput struct{ *pulumi.OutputState } func (FlexibleDatabaseArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleDatabase)(nil)).Elem() } func (o FlexibleDatabaseArrayOutput) ToFlexibleDatabaseArrayOutput() FlexibleDatabaseArrayOutput { return o } func (o FlexibleDatabaseArrayOutput) ToFlexibleDatabaseArrayOutputWithContext(ctx context.Context) FlexibleDatabaseArrayOutput { return o } func (o FlexibleDatabaseArrayOutput) Index(i pulumi.IntInput) FlexibleDatabaseOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleDatabase { return vs[0].([]*FlexibleDatabase)[vs[1].(int)] }).(FlexibleDatabaseOutput) } type FlexibleDatabaseMapOutput struct{ *pulumi.OutputState } func (FlexibleDatabaseMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleDatabase)(nil)).Elem() } func (o FlexibleDatabaseMapOutput) ToFlexibleDatabaseMapOutput() FlexibleDatabaseMapOutput { return o } func (o FlexibleDatabaseMapOutput) ToFlexibleDatabaseMapOutputWithContext(ctx context.Context) FlexibleDatabaseMapOutput { return o } func (o FlexibleDatabaseMapOutput) MapIndex(k pulumi.StringInput) FlexibleDatabaseOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleDatabase { return vs[0].(map[string]*FlexibleDatabase)[vs[1].(string)] }).(FlexibleDatabaseOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleDatabaseInput)(nil)).Elem(), &FlexibleDatabase{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleDatabaseArrayInput)(nil)).Elem(), FlexibleDatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleDatabaseMapInput)(nil)).Elem(), FlexibleDatabaseMap{}) pulumi.RegisterOutputType(FlexibleDatabaseOutput{}) pulumi.RegisterOutputType(FlexibleDatabaseArrayOutput{}) pulumi.RegisterOutputType(FlexibleDatabaseMapOutput{}) }
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/mysql/flexibleServer.go
sdk/go/azure/mysql/flexibleServer.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 mysql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a MySQL Flexible Server. // // ## 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/mysql" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns" // "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 // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vn"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-sn"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // ServiceEndpoints: pulumi.StringArray{ // pulumi.String("Microsoft.Storage"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("fs"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.DBforMySQL/flexibleServers"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{ // Name: pulumi.String("example.mysql.database.azure.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleZoneVirtualNetworkLink, err := privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{ // Name: pulumi.String("exampleVnetZone.com"), // PrivateDnsZoneName: exampleZone.Name, // VirtualNetworkId: exampleVirtualNetwork.ID(), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example-fs"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // BackupRetentionDays: pulumi.Int(7), // DelegatedSubnetId: exampleSubnet.ID(), // PrivateDnsZoneId: exampleZone.ID(), // SkuName: pulumi.String("GP_Standard_D2ds_v4"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleZoneVirtualNetworkLink, // })) // 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.DBforMySQL` - 2023-12-30 // // ## Import // // MySQL Flexible Servers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mysql/flexibleServer:FlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1 // ``` type FlexibleServer struct { pulumi.CustomResourceState // The Administrator login for the MySQL Flexible Server. Required when `createMode` is `Default`. Changing this forces a new MySQL Flexible Server to be created. AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the MySQL Flexible Server. AdministratorPassword pulumi.StringPtrOutput `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. // // > **Note:** Either `administratorPassword` or `administratorPasswordWo` is required when `createMode` is `Default`. AdministratorPasswordWoVersion pulumi.IntPtrOutput `pulumi:"administratorPasswordWoVersion"` // The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`. BackupRetentionDays pulumi.IntPtrOutput `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** Creating a `GeoRestore` server requires the source server with `geoRedundantBackupEnabled` enabled. // // > **Note:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information. // // > **Note:** When importing a MySQL Flexible Server, `createMode` is not returned by the api so you will see a diff if `createMode` is specified in your config. To prevent recreation, use the `ignoreChanges` lifecycle meta-argument. CreateMode pulumi.StringPtrOutput `pulumi:"createMode"` // A `customerManagedKey` block as defined below. // // > **Note:** `identity` is required when `customerManagedKey` is specified. CustomerManagedKey FlexibleServerCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. DelegatedSubnetId pulumi.StringPtrOutput `pulumi:"delegatedSubnetId"` // The fully qualified domain name of the MySQL Flexible Server. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created. GeoRedundantBackupEnabled pulumi.BoolPtrOutput `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below. HighAvailability FlexibleServerHighAvailabilityPtrOutput `pulumi:"highAvailability"` // An `identity` block as defined below. Identity FlexibleServerIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. Location pulumi.StringOutput `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow FlexibleServerMaintenanceWindowPtrOutput `pulumi:"maintenanceWindow"` // The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. Name pulumi.StringOutput `pulumi:"name"` // The point in time to restore from `creationSourceServerId` when `createMode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created. PointInTimeRestoreTimeInUtc pulumi.StringPtrOutput `pulumi:"pointInTimeRestoreTimeInUtc"` // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The `privateDnsZoneId` is required when setting a `delegatedSubnetId`. The `privatedns.Zone` should end with suffix `.mysql.database.azure.com`. PrivateDnsZoneId pulumi.StringPtrOutput `pulumi:"privateDnsZoneId"` // Whether approved public traffic is allowed through the firewall to this server. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` is automatically set to `Disabled` if the server is created with VNet Integration (i.e. values are provided for `delegatedSubnetId` and `privateDnsZoneId`"). PublicNetworkAccess pulumi.StringOutput `pulumi:"publicNetworkAccess"` PublicNetworkAccessEnabled pulumi.BoolOutput `pulumi:"publicNetworkAccessEnabled"` // The maximum number of replicas that a primary MySQL Flexible Server can have. ReplicaCapacity pulumi.IntOutput `pulumi:"replicaCapacity"` // The replication role. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated from `Replica` to `None`. ReplicationRole pulumi.StringOutput `pulumi:"replicationRole"` // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU Name for the MySQL Flexible Server. // // > **Note:** `skuName` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1ms`. SkuName pulumi.StringOutput `pulumi:"skuName"` // The resource ID of the source MySQL Flexible Server to be restored. Required when `createMode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The replica server is always created in the same resource group and subscription as the source server. SourceServerId pulumi.StringPtrOutput `pulumi:"sourceServerId"` // A `storage` block as defined below. Storage FlexibleServerStorageOutput `pulumi:"storage"` // A mapping of tags which should be assigned to the MySQL Flexible Server. Tags pulumi.StringMapOutput `pulumi:"tags"` // The version of the MySQL Flexible Server to use. Possible values are `5.7`, `8.0.21` and `8.4`. Version pulumi.StringOutput `pulumi:"version"` Zone pulumi.StringOutput `pulumi:"zone"` } // NewFlexibleServer registers a new resource with the given unique name, arguments, and options. func NewFlexibleServer(ctx *pulumi.Context, name string, args *FlexibleServerArgs, opts ...pulumi.ResourceOption) (*FlexibleServer, 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.AdministratorPassword != nil { args.AdministratorPassword = pulumi.ToSecret(args.AdministratorPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "administratorPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServer err := ctx.RegisterResource("azure:mysql/flexibleServer:FlexibleServer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServer gets an existing FlexibleServer 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 GetFlexibleServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerState, opts ...pulumi.ResourceOption) (*FlexibleServer, error) { var resource FlexibleServer err := ctx.ReadResource("azure:mysql/flexibleServer:FlexibleServer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServer resources. type flexibleServerState struct { // The Administrator login for the MySQL Flexible Server. Required when `createMode` is `Default`. Changing this forces a new MySQL Flexible Server to be created. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the MySQL Flexible Server. AdministratorPassword *string `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. // // > **Note:** Either `administratorPassword` or `administratorPasswordWo` is required when `createMode` is `Default`. AdministratorPasswordWoVersion *int `pulumi:"administratorPasswordWoVersion"` // The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** Creating a `GeoRestore` server requires the source server with `geoRedundantBackupEnabled` enabled. // // > **Note:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information. // // > **Note:** When importing a MySQL Flexible Server, `createMode` is not returned by the api so you will see a diff if `createMode` is specified in your config. To prevent recreation, use the `ignoreChanges` lifecycle meta-argument. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. // // > **Note:** `identity` is required when `customerManagedKey` is specified. CustomerManagedKey *FlexibleServerCustomerManagedKey `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. DelegatedSubnetId *string `pulumi:"delegatedSubnetId"` // The fully qualified domain name of the MySQL Flexible Server. Fqdn *string `pulumi:"fqdn"` // Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below. HighAvailability *FlexibleServerHighAvailability `pulumi:"highAvailability"` // An `identity` block as defined below. Identity *FlexibleServerIdentity `pulumi:"identity"` // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. Location *string `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow *FlexibleServerMaintenanceWindow `pulumi:"maintenanceWindow"` // The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. Name *string `pulumi:"name"` // The point in time to restore from `creationSourceServerId` when `createMode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created. PointInTimeRestoreTimeInUtc *string `pulumi:"pointInTimeRestoreTimeInUtc"` // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The `privateDnsZoneId` is required when setting a `delegatedSubnetId`. The `privatedns.Zone` should end with suffix `.mysql.database.azure.com`. PrivateDnsZoneId *string `pulumi:"privateDnsZoneId"` // Whether approved public traffic is allowed through the firewall to this server. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` is automatically set to `Disabled` if the server is created with VNet Integration (i.e. values are provided for `delegatedSubnetId` and `privateDnsZoneId`"). PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The maximum number of replicas that a primary MySQL Flexible Server can have. ReplicaCapacity *int `pulumi:"replicaCapacity"` // The replication role. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated from `Replica` to `None`. ReplicationRole *string `pulumi:"replicationRole"` // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU Name for the MySQL Flexible Server. // // > **Note:** `skuName` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1ms`. SkuName *string `pulumi:"skuName"` // The resource ID of the source MySQL Flexible Server to be restored. Required when `createMode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The replica server is always created in the same resource group and subscription as the source server. SourceServerId *string `pulumi:"sourceServerId"` // A `storage` block as defined below. Storage *FlexibleServerStorage `pulumi:"storage"` // A mapping of tags which should be assigned to the MySQL Flexible Server. Tags map[string]string `pulumi:"tags"` // The version of the MySQL Flexible Server to use. Possible values are `5.7`, `8.0.21` and `8.4`. Version *string `pulumi:"version"` Zone *string `pulumi:"zone"` } type FlexibleServerState struct { // The Administrator login for the MySQL Flexible Server. Required when `createMode` is `Default`. Changing this forces a new MySQL Flexible Server to be created. AdministratorLogin pulumi.StringPtrInput // The Password associated with the `administratorLogin` for the MySQL Flexible Server. AdministratorPassword pulumi.StringPtrInput // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. // // > **Note:** Either `administratorPassword` or `administratorPasswordWo` is required when `createMode` is `Default`. AdministratorPasswordWoVersion pulumi.IntPtrInput // The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`. BackupRetentionDays pulumi.IntPtrInput // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** Creating a `GeoRestore` server requires the source server with `geoRedundantBackupEnabled` enabled. // // > **Note:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information. // // > **Note:** When importing a MySQL Flexible Server, `createMode` is not returned by the api so you will see a diff if `createMode` is specified in your config. To prevent recreation, use the `ignoreChanges` lifecycle meta-argument. CreateMode pulumi.StringPtrInput // A `customerManagedKey` block as defined below. // // > **Note:** `identity` is required when `customerManagedKey` is specified. CustomerManagedKey FlexibleServerCustomerManagedKeyPtrInput // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. DelegatedSubnetId pulumi.StringPtrInput // The fully qualified domain name of the MySQL Flexible Server. Fqdn pulumi.StringPtrInput // Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created. GeoRedundantBackupEnabled pulumi.BoolPtrInput // A `highAvailability` block as defined below. HighAvailability FlexibleServerHighAvailabilityPtrInput // An `identity` block as defined below. Identity FlexibleServerIdentityPtrInput // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. Location pulumi.StringPtrInput // A `maintenanceWindow` block as defined below. MaintenanceWindow FlexibleServerMaintenanceWindowPtrInput // The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. Name pulumi.StringPtrInput // The point in time to restore from `creationSourceServerId` when `createMode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created. PointInTimeRestoreTimeInUtc pulumi.StringPtrInput // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The `privateDnsZoneId` is required when setting a `delegatedSubnetId`. The `privatedns.Zone` should end with suffix `.mysql.database.azure.com`. PrivateDnsZoneId pulumi.StringPtrInput // Whether approved public traffic is allowed through the firewall to this server. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` is automatically set to `Disabled` if the server is created with VNet Integration (i.e. values are provided for `delegatedSubnetId` and `privateDnsZoneId`"). PublicNetworkAccess pulumi.StringPtrInput PublicNetworkAccessEnabled pulumi.BoolPtrInput // The maximum number of replicas that a primary MySQL Flexible Server can have. ReplicaCapacity pulumi.IntPtrInput // The replication role. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated from `Replica` to `None`. ReplicationRole pulumi.StringPtrInput // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. ResourceGroupName pulumi.StringPtrInput // The SKU Name for the MySQL Flexible Server. // // > **Note:** `skuName` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1ms`. SkuName pulumi.StringPtrInput // The resource ID of the source MySQL Flexible Server to be restored. Required when `createMode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The replica server is always created in the same resource group and subscription as the source server. SourceServerId pulumi.StringPtrInput // A `storage` block as defined below. Storage FlexibleServerStoragePtrInput // A mapping of tags which should be assigned to the MySQL Flexible Server. Tags pulumi.StringMapInput // The version of the MySQL Flexible Server to use. Possible values are `5.7`, `8.0.21` and `8.4`. Version pulumi.StringPtrInput Zone pulumi.StringPtrInput } func (FlexibleServerState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerState)(nil)).Elem() } type flexibleServerArgs struct { // The Administrator login for the MySQL Flexible Server. Required when `createMode` is `Default`. Changing this forces a new MySQL Flexible Server to be created. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the MySQL Flexible Server. AdministratorPassword *string `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. // // > **Note:** Either `administratorPassword` or `administratorPasswordWo` is required when `createMode` is `Default`. AdministratorPasswordWoVersion *int `pulumi:"administratorPasswordWoVersion"` // The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** Creating a `GeoRestore` server requires the source server with `geoRedundantBackupEnabled` enabled. // // > **Note:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information. // // > **Note:** When importing a MySQL Flexible Server, `createMode` is not returned by the api so you will see a diff if `createMode` is specified in your config. To prevent recreation, use the `ignoreChanges` lifecycle meta-argument. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. // // > **Note:** `identity` is required when `customerManagedKey` is specified. CustomerManagedKey *FlexibleServerCustomerManagedKey `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. DelegatedSubnetId *string `pulumi:"delegatedSubnetId"` // Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below. HighAvailability *FlexibleServerHighAvailability `pulumi:"highAvailability"` // An `identity` block as defined below. Identity *FlexibleServerIdentity `pulumi:"identity"` // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. Location *string `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow *FlexibleServerMaintenanceWindow `pulumi:"maintenanceWindow"` // The name which should be used for this MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. Name *string `pulumi:"name"` // The point in time to restore from `creationSourceServerId` when `createMode` is `PointInTimeRestore`. Changing this forces a new MySQL Flexible Server to be created. PointInTimeRestoreTimeInUtc *string `pulumi:"pointInTimeRestoreTimeInUtc"` // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The `privateDnsZoneId` is required when setting a `delegatedSubnetId`. The `privatedns.Zone` should end with suffix `.mysql.database.azure.com`. PrivateDnsZoneId *string `pulumi:"privateDnsZoneId"` // Whether approved public traffic is allowed through the firewall to this server. Possible values are `Enabled` and `Disabled`. // // > **Note:** `publicNetworkAccess` is automatically set to `Disabled` if the server is created with VNet Integration (i.e. values are provided for `delegatedSubnetId` and `privateDnsZoneId`"). PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The replication role. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated from `Replica` to `None`. ReplicationRole *string `pulumi:"replicationRole"` // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU Name for the MySQL Flexible Server. // // > **Note:** `skuName` should start with SKU tier `B (Burstable)`, `GP (General Purpose)`, `MO (Memory Optimized)` like `B_Standard_B1ms`. SkuName *string `pulumi:"skuName"` // The resource ID of the source MySQL Flexible Server to be restored. Required when `createMode` is `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** The replica server is always created in the same resource group and subscription as the source server. SourceServerId *string `pulumi:"sourceServerId"` // A `storage` block as defined below. Storage *FlexibleServerStorage `pulumi:"storage"` // A mapping of tags which should be assigned to the MySQL Flexible Server. Tags map[string]string `pulumi:"tags"` // The version of the MySQL Flexible Server to use. Possible values are `5.7`, `8.0.21` and `8.4`. Version *string `pulumi:"version"` Zone *string `pulumi:"zone"` } // The set of arguments for constructing a FlexibleServer resource. type FlexibleServerArgs struct { // The Administrator login for the MySQL Flexible Server. Required when `createMode` is `Default`. Changing this forces a new MySQL Flexible Server to be created. AdministratorLogin pulumi.StringPtrInput // The Password associated with the `administratorLogin` for the MySQL Flexible Server. AdministratorPassword pulumi.StringPtrInput // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. // // > **Note:** Either `administratorPassword` or `administratorPasswordWo` is required when `createMode` is `Default`. AdministratorPasswordWoVersion pulumi.IntPtrInput // The backup retention days for the MySQL Flexible Server. Possible values are between `1` and `35` days. Defaults to `7`. BackupRetentionDays pulumi.IntPtrInput // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `PointInTimeRestore`, `GeoRestore`, and `Replica`. Changing this forces a new MySQL Flexible Server to be created. // // > **Note:** Creating a `GeoRestore` server requires the source server with `geoRedundantBackupEnabled` enabled. // // > **Note:** When a server is first created it may not be immediately available for `geo restore` or `replica`. It may take a few minutes to several hours for the necessary metadata to be populated. Please see the [Geo Restore](https://learn.microsoft.com/azure/mysql/single-server/how-to-restore-server-portal#geo-restore) and the [Replica](https://learn.microsoft.com/azure/mysql/flexible-server/concepts-read-replicas#create-a-replica) for more information. // // > **Note:** When importing a MySQL Flexible Server, `createMode` is not returned by the api so you will see a diff if `createMode` is specified in your config. To prevent recreation, use the `ignoreChanges` lifecycle meta-argument. CreateMode pulumi.StringPtrInput // A `customerManagedKey` block as defined below. // // > **Note:** `identity` is required when `customerManagedKey` is specified. CustomerManagedKey FlexibleServerCustomerManagedKeyPtrInput // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. DelegatedSubnetId pulumi.StringPtrInput // Should geo redundant backup enabled? Defaults to `false`. Changing this forces a new MySQL Flexible Server to be created. GeoRedundantBackupEnabled pulumi.BoolPtrInput // A `highAvailability` block as defined below. HighAvailability FlexibleServerHighAvailabilityPtrInput // An `identity` block as defined below. Identity FlexibleServerIdentityPtrInput // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. Location pulumi.StringPtrInput
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/mysql/getFlexibleServer.go
sdk/go/azure/mysql/getFlexibleServer.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 mysql 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 MySQL Flexible Server. // // ## Example Usage // // ```go // package main // // import ( // // "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 := mysql.LookupFlexibleServer(ctx, &mysql.LookupFlexibleServerArgs{ // Name: "existingMySqlFlexibleServer", // ResourceGroupName: "existingResGroup", // }, 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.DBforMySQL` - 2023-12-30 func LookupFlexibleServer(ctx *pulumi.Context, args *LookupFlexibleServerArgs, opts ...pulumi.InvokeOption) (*LookupFlexibleServerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFlexibleServerResult err := ctx.Invoke("azure:mysql/getFlexibleServer:getFlexibleServer", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getFlexibleServer. type LookupFlexibleServerArgs struct { // Specifies the name of the MySQL Flexible Server. Name string `pulumi:"name"` // The name of the resource group for the MySQL Flexible Server. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getFlexibleServer. type LookupFlexibleServerResult struct { // The Administrator login of the MySQL Flexible Server. AdministratorLogin string `pulumi:"administratorLogin"` // The backup retention days of the MySQL Flexible Server. BackupRetentionDays int `pulumi:"backupRetentionDays"` // The ID of the virtual network subnet the MySQL Flexible Server is created in. DelegatedSubnetId string `pulumi:"delegatedSubnetId"` // The fully qualified domain name of the MySQL Flexible Server. Fqdn string `pulumi:"fqdn"` // Is geo redundant backup enabled? GeoRedundantBackupEnabled bool `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block for this MySQL Flexible Server as defined below. HighAvailabilities []GetFlexibleServerHighAvailability `pulumi:"highAvailabilities"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region of the MySQL Flexible Server. Location string `pulumi:"location"` // A `maintenanceWindow` block for this MySQL Flexible Server as defined below. MaintenanceWindows []GetFlexibleServerMaintenanceWindow `pulumi:"maintenanceWindows"` Name string `pulumi:"name"` // The ID of the Private DNS zone of the MySQL Flexible Server. PrivateDnsZoneId string `pulumi:"privateDnsZoneId"` // Is the public network access enabled? PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // The maximum number of replicas that a primary MySQL Flexible Server can have. ReplicaCapacity int `pulumi:"replicaCapacity"` // The replication role of the MySQL Flexible Server. ReplicationRole string `pulumi:"replicationRole"` ResourceGroupName string `pulumi:"resourceGroupName"` RestorePointInTime string `pulumi:"restorePointInTime"` // The SKU Name of the MySQL Flexible Server. SkuName string `pulumi:"skuName"` // A `storage` block for this MySQL Flexible Server as defined below. Storages []GetFlexibleServerStorage `pulumi:"storages"` // A mapping of tags which are assigned to the MySQL Flexible Server. Tags map[string]string `pulumi:"tags"` // The version of the MySQL Flexible Server. Version string `pulumi:"version"` // The Availability Zones where this MySQL Flexible Server is located. Zone string `pulumi:"zone"` } func LookupFlexibleServerOutput(ctx *pulumi.Context, args LookupFlexibleServerOutputArgs, opts ...pulumi.InvokeOption) LookupFlexibleServerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFlexibleServerResultOutput, error) { args := v.(LookupFlexibleServerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:mysql/getFlexibleServer:getFlexibleServer", args, LookupFlexibleServerResultOutput{}, options).(LookupFlexibleServerResultOutput), nil }).(LookupFlexibleServerResultOutput) } // A collection of arguments for invoking getFlexibleServer. type LookupFlexibleServerOutputArgs struct { // Specifies the name of the MySQL Flexible Server. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group for the MySQL Flexible Server. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupFlexibleServerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupFlexibleServerArgs)(nil)).Elem() } // A collection of values returned by getFlexibleServer. type LookupFlexibleServerResultOutput struct{ *pulumi.OutputState } func (LookupFlexibleServerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupFlexibleServerResult)(nil)).Elem() } func (o LookupFlexibleServerResultOutput) ToLookupFlexibleServerResultOutput() LookupFlexibleServerResultOutput { return o } func (o LookupFlexibleServerResultOutput) ToLookupFlexibleServerResultOutputWithContext(ctx context.Context) LookupFlexibleServerResultOutput { return o } // The Administrator login of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) AdministratorLogin() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.AdministratorLogin }).(pulumi.StringOutput) } // The backup retention days of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) BackupRetentionDays() pulumi.IntOutput { return o.ApplyT(func(v LookupFlexibleServerResult) int { return v.BackupRetentionDays }).(pulumi.IntOutput) } // The ID of the virtual network subnet the MySQL Flexible Server is created in. func (o LookupFlexibleServerResultOutput) DelegatedSubnetId() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.DelegatedSubnetId }).(pulumi.StringOutput) } // The fully qualified domain name of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Fqdn }).(pulumi.StringOutput) } // Is geo redundant backup enabled? func (o LookupFlexibleServerResultOutput) GeoRedundantBackupEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupFlexibleServerResult) bool { return v.GeoRedundantBackupEnabled }).(pulumi.BoolOutput) } // A `highAvailability` block for this MySQL Flexible Server as defined below. func (o LookupFlexibleServerResultOutput) HighAvailabilities() GetFlexibleServerHighAvailabilityArrayOutput { return o.ApplyT(func(v LookupFlexibleServerResult) []GetFlexibleServerHighAvailability { return v.HighAvailabilities }).(GetFlexibleServerHighAvailabilityArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupFlexibleServerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Location }).(pulumi.StringOutput) } // A `maintenanceWindow` block for this MySQL Flexible Server as defined below. func (o LookupFlexibleServerResultOutput) MaintenanceWindows() GetFlexibleServerMaintenanceWindowArrayOutput { return o.ApplyT(func(v LookupFlexibleServerResult) []GetFlexibleServerMaintenanceWindow { return v.MaintenanceWindows }).(GetFlexibleServerMaintenanceWindowArrayOutput) } func (o LookupFlexibleServerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of the Private DNS zone of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) PrivateDnsZoneId() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.PrivateDnsZoneId }).(pulumi.StringOutput) } // Is the public network access enabled? func (o LookupFlexibleServerResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupFlexibleServerResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // The maximum number of replicas that a primary MySQL Flexible Server can have. func (o LookupFlexibleServerResultOutput) ReplicaCapacity() pulumi.IntOutput { return o.ApplyT(func(v LookupFlexibleServerResult) int { return v.ReplicaCapacity }).(pulumi.IntOutput) } // The replication role of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) ReplicationRole() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.ReplicationRole }).(pulumi.StringOutput) } func (o LookupFlexibleServerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupFlexibleServerResultOutput) RestorePointInTime() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.RestorePointInTime }).(pulumi.StringOutput) } // The SKU Name of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.SkuName }).(pulumi.StringOutput) } // A `storage` block for this MySQL Flexible Server as defined below. func (o LookupFlexibleServerResultOutput) Storages() GetFlexibleServerStorageArrayOutput { return o.ApplyT(func(v LookupFlexibleServerResult) []GetFlexibleServerStorage { return v.Storages }).(GetFlexibleServerStorageArrayOutput) } // A mapping of tags which are assigned to the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupFlexibleServerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The version of the MySQL Flexible Server. func (o LookupFlexibleServerResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Version }).(pulumi.StringOutput) } // The Availability Zones where this MySQL Flexible Server is located. func (o LookupFlexibleServerResultOutput) Zone() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Zone }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupFlexibleServerResultOutput{}) }
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/mysql/flexibleServerFirewallRule.go
sdk/go/azure/mysql/flexibleServerFirewallRule.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 mysql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Firewall Rule for a MySQL Flexible Server. // // ## Example Usage // // ### Single IP Address) // // ```go // package main // // import ( // // "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("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServerFirewallRule(ctx, "example", &mysql.FlexibleServerFirewallRuleArgs{ // Name: pulumi.String("office"), // ResourceGroupName: example.Name, // ServerName: exampleFlexibleServer.Name, // StartIpAddress: pulumi.String("40.112.8.12"), // EndIpAddress: pulumi.String("40.112.8.12"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### IP Range) // // ```go // package main // // import ( // // "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("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServerFirewallRule(ctx, "example", &mysql.FlexibleServerFirewallRuleArgs{ // Name: pulumi.String("office"), // ResourceGroupName: example.Name, // ServerName: exampleFlexibleServer.Name, // StartIpAddress: pulumi.String("40.112.0.0"), // EndIpAddress: pulumi.String("40.112.255.255"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Allow Access To Azure Services) // // ```go // package main // // import ( // // "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("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServerFirewallRule(ctx, "example", &mysql.FlexibleServerFirewallRuleArgs{ // Name: pulumi.String("office"), // ResourceGroupName: example.Name, // ServerName: exampleFlexibleServer.Name, // StartIpAddress: pulumi.String("0.0.0.0"), // EndIpAddress: pulumi.String("0.0.0.0"), // }) // 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.DBforMySQL` - 2023-12-30 // // ## Import // // MySQL Firewall Rule's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mysql/flexibleServerFirewallRule:FlexibleServerFirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1/firewallRules/firewallRule1 // ``` type FlexibleServerFirewallRule struct { pulumi.CustomResourceState // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"` // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"` } // NewFlexibleServerFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerFirewallRule(ctx *pulumi.Context, name string, args *FlexibleServerFirewallRuleArgs, opts ...pulumi.ResourceOption) (*FlexibleServerFirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIpAddress == nil { return nil, errors.New("invalid value for required argument 'EndIpAddress'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.StartIpAddress == nil { return nil, errors.New("invalid value for required argument 'StartIpAddress'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerFirewallRule err := ctx.RegisterResource("azure:mysql/flexibleServerFirewallRule:FlexibleServerFirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerFirewallRule gets an existing FlexibleServerFirewallRule 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 GetFlexibleServerFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerFirewallRuleState, opts ...pulumi.ResourceOption) (*FlexibleServerFirewallRule, error) { var resource FlexibleServerFirewallRule err := ctx.ReadResource("azure:mysql/flexibleServerFirewallRule:FlexibleServerFirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerFirewallRule resources. type flexibleServerFirewallRuleState struct { // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress *string `pulumi:"endIpAddress"` // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. StartIpAddress *string `pulumi:"startIpAddress"` } type FlexibleServerFirewallRuleState struct { // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringPtrInput // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // Specifies the Start IP Address associated with this Firewall Rule. StartIpAddress pulumi.StringPtrInput } func (FlexibleServerFirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerFirewallRuleState)(nil)).Elem() } type flexibleServerFirewallRuleArgs struct { // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress string `pulumi:"endIpAddress"` // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. StartIpAddress string `pulumi:"startIpAddress"` } // The set of arguments for constructing a FlexibleServerFirewallRule resource. type FlexibleServerFirewallRuleArgs struct { // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringInput // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput // Specifies the Start IP Address associated with this Firewall Rule. StartIpAddress pulumi.StringInput } func (FlexibleServerFirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerFirewallRuleArgs)(nil)).Elem() } type FlexibleServerFirewallRuleInput interface { pulumi.Input ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput } func (*FlexibleServerFirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerFirewallRule)(nil)).Elem() } func (i *FlexibleServerFirewallRule) ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput { return i.ToFlexibleServerFirewallRuleOutputWithContext(context.Background()) } func (i *FlexibleServerFirewallRule) ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleOutput) } // FlexibleServerFirewallRuleArrayInput is an input type that accepts FlexibleServerFirewallRuleArray and FlexibleServerFirewallRuleArrayOutput values. // You can construct a concrete instance of `FlexibleServerFirewallRuleArrayInput` via: // // FlexibleServerFirewallRuleArray{ FlexibleServerFirewallRuleArgs{...} } type FlexibleServerFirewallRuleArrayInput interface { pulumi.Input ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput ToFlexibleServerFirewallRuleArrayOutputWithContext(context.Context) FlexibleServerFirewallRuleArrayOutput } type FlexibleServerFirewallRuleArray []FlexibleServerFirewallRuleInput func (FlexibleServerFirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerFirewallRule)(nil)).Elem() } func (i FlexibleServerFirewallRuleArray) ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput { return i.ToFlexibleServerFirewallRuleArrayOutputWithContext(context.Background()) } func (i FlexibleServerFirewallRuleArray) ToFlexibleServerFirewallRuleArrayOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleArrayOutput) } // FlexibleServerFirewallRuleMapInput is an input type that accepts FlexibleServerFirewallRuleMap and FlexibleServerFirewallRuleMapOutput values. // You can construct a concrete instance of `FlexibleServerFirewallRuleMapInput` via: // // FlexibleServerFirewallRuleMap{ "key": FlexibleServerFirewallRuleArgs{...} } type FlexibleServerFirewallRuleMapInput interface { pulumi.Input ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput ToFlexibleServerFirewallRuleMapOutputWithContext(context.Context) FlexibleServerFirewallRuleMapOutput } type FlexibleServerFirewallRuleMap map[string]FlexibleServerFirewallRuleInput func (FlexibleServerFirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerFirewallRule)(nil)).Elem() } func (i FlexibleServerFirewallRuleMap) ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput { return i.ToFlexibleServerFirewallRuleMapOutputWithContext(context.Background()) } func (i FlexibleServerFirewallRuleMap) ToFlexibleServerFirewallRuleMapOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleMapOutput) } type FlexibleServerFirewallRuleOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleOutput) ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput { return o } func (o FlexibleServerFirewallRuleOutput) ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput { return o } // Specifies the End IP Address associated with this Firewall Rule. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). func (o FlexibleServerFirewallRuleOutput) EndIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(pulumi.StringOutput) } // Specifies the name of the MySQL Firewall Rule. Changing this forces a new resource to be created. func (o FlexibleServerFirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. func (o FlexibleServerFirewallRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. func (o FlexibleServerFirewallRuleOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // Specifies the Start IP Address associated with this Firewall Rule. func (o FlexibleServerFirewallRuleOutput) StartIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(pulumi.StringOutput) } type FlexibleServerFirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleArrayOutput) ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput { return o } func (o FlexibleServerFirewallRuleArrayOutput) ToFlexibleServerFirewallRuleArrayOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleArrayOutput { return o } func (o FlexibleServerFirewallRuleArrayOutput) Index(i pulumi.IntInput) FlexibleServerFirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerFirewallRule { return vs[0].([]*FlexibleServerFirewallRule)[vs[1].(int)] }).(FlexibleServerFirewallRuleOutput) } type FlexibleServerFirewallRuleMapOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleMapOutput) ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput { return o } func (o FlexibleServerFirewallRuleMapOutput) ToFlexibleServerFirewallRuleMapOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleMapOutput { return o } func (o FlexibleServerFirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerFirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerFirewallRule { return vs[0].(map[string]*FlexibleServerFirewallRule)[vs[1].(string)] }).(FlexibleServerFirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleInput)(nil)).Elem(), &FlexibleServerFirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleArrayInput)(nil)).Elem(), FlexibleServerFirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleMapInput)(nil)).Elem(), FlexibleServerFirewallRuleMap{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleOutput{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleMapOutput{}) }
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/mysql/flexibleServerActiveDirectoryAdministratory.go
sdk/go/azure/mysql/flexibleServerActiveDirectoryAdministratory.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 mysql 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 Directory administrator on a MySQL Flexible Server // // ## 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/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 { // 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 // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("exampleUAI"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{ // Name: pulumi.String("example-mysqlfs"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorLogin: pulumi.String("_admin_Terraform_892123456789312"), // AdministratorPassword: pulumi.String("QAZwsx123"), // SkuName: pulumi.String("B_Standard_B1ms"), // Zone: pulumi.String("2"), // Identity: &mysql.FlexibleServerIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = mysql.NewFlexibleServerActiveDirectoryAdministratory(ctx, "example", &mysql.FlexibleServerActiveDirectoryAdministratoryArgs{ // ServerId: exampleFlexibleServer.ID(), // IdentityId: exampleUserAssignedIdentity.ID(), // Login: pulumi.String("sqladmin"), // ObjectId: pulumi.String(current.ClientId), // TenantId: pulumi.String(current.TenantId), // }) // 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.DBforMySQL` - 2023-12-30 // // ## Import // // A MySQL Flexible Server Active Directory Administrator can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:mysql/flexibleServerActiveDirectoryAdministratory:FlexibleServerActiveDirectoryAdministratory example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.DBforMySQL/flexibleServers/server1/administrators/ActiveDirectory // ``` type FlexibleServerActiveDirectoryAdministratory struct { pulumi.CustomResourceState // The resource ID of the identity used for AAD Authentication. IdentityId pulumi.StringOutput `pulumi:"identityId"` // The login name of the principal to set as the server administrator Login pulumi.StringOutput `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerId pulumi.StringOutput `pulumi:"serverId"` // The Azure Tenant ID. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewFlexibleServerActiveDirectoryAdministratory registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerActiveDirectoryAdministratory(ctx *pulumi.Context, name string, args *FlexibleServerActiveDirectoryAdministratoryArgs, opts ...pulumi.ResourceOption) (*FlexibleServerActiveDirectoryAdministratory, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IdentityId == nil { return nil, errors.New("invalid value for required argument 'IdentityId'") } if args.Login == nil { return nil, errors.New("invalid value for required argument 'Login'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:mysql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerActiveDirectoryAdministratory err := ctx.RegisterResource("azure:mysql/flexibleServerActiveDirectoryAdministratory:FlexibleServerActiveDirectoryAdministratory", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerActiveDirectoryAdministratory gets an existing FlexibleServerActiveDirectoryAdministratory 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 GetFlexibleServerActiveDirectoryAdministratory(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerActiveDirectoryAdministratoryState, opts ...pulumi.ResourceOption) (*FlexibleServerActiveDirectoryAdministratory, error) { var resource FlexibleServerActiveDirectoryAdministratory err := ctx.ReadResource("azure:mysql/flexibleServerActiveDirectoryAdministratory:FlexibleServerActiveDirectoryAdministratory", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerActiveDirectoryAdministratory resources. type flexibleServerActiveDirectoryAdministratoryState struct { // The resource ID of the identity used for AAD Authentication. IdentityId *string `pulumi:"identityId"` // The login name of the principal to set as the server administrator Login *string `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId *string `pulumi:"objectId"` // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerId *string `pulumi:"serverId"` // The Azure Tenant ID. TenantId *string `pulumi:"tenantId"` } type FlexibleServerActiveDirectoryAdministratoryState struct { // The resource ID of the identity used for AAD Authentication. IdentityId pulumi.StringPtrInput // The login name of the principal to set as the server administrator Login pulumi.StringPtrInput // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringPtrInput // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerId pulumi.StringPtrInput // The Azure Tenant ID. TenantId pulumi.StringPtrInput } func (FlexibleServerActiveDirectoryAdministratoryState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerActiveDirectoryAdministratoryState)(nil)).Elem() } type flexibleServerActiveDirectoryAdministratoryArgs struct { // The resource ID of the identity used for AAD Authentication. IdentityId string `pulumi:"identityId"` // The login name of the principal to set as the server administrator Login string `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId string `pulumi:"objectId"` // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerId string `pulumi:"serverId"` // The Azure Tenant ID. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a FlexibleServerActiveDirectoryAdministratory resource. type FlexibleServerActiveDirectoryAdministratoryArgs struct { // The resource ID of the identity used for AAD Authentication. IdentityId pulumi.StringInput // The login name of the principal to set as the server administrator Login pulumi.StringInput // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringInput // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. ServerId pulumi.StringInput // The Azure Tenant ID. TenantId pulumi.StringInput } func (FlexibleServerActiveDirectoryAdministratoryArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerActiveDirectoryAdministratoryArgs)(nil)).Elem() } type FlexibleServerActiveDirectoryAdministratoryInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratoryOutput() FlexibleServerActiveDirectoryAdministratoryOutput ToFlexibleServerActiveDirectoryAdministratoryOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryOutput } func (*FlexibleServerActiveDirectoryAdministratory) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (i *FlexibleServerActiveDirectoryAdministratory) ToFlexibleServerActiveDirectoryAdministratoryOutput() FlexibleServerActiveDirectoryAdministratoryOutput { return i.ToFlexibleServerActiveDirectoryAdministratoryOutputWithContext(context.Background()) } func (i *FlexibleServerActiveDirectoryAdministratory) ToFlexibleServerActiveDirectoryAdministratoryOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratoryOutput) } // FlexibleServerActiveDirectoryAdministratoryArrayInput is an input type that accepts FlexibleServerActiveDirectoryAdministratoryArray and FlexibleServerActiveDirectoryAdministratoryArrayOutput values. // You can construct a concrete instance of `FlexibleServerActiveDirectoryAdministratoryArrayInput` via: // // FlexibleServerActiveDirectoryAdministratoryArray{ FlexibleServerActiveDirectoryAdministratoryArgs{...} } type FlexibleServerActiveDirectoryAdministratoryArrayInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratoryArrayOutput() FlexibleServerActiveDirectoryAdministratoryArrayOutput ToFlexibleServerActiveDirectoryAdministratoryArrayOutputWithContext(context.Context) FlexibleServerActiveDirectoryAdministratoryArrayOutput } type FlexibleServerActiveDirectoryAdministratoryArray []FlexibleServerActiveDirectoryAdministratoryInput func (FlexibleServerActiveDirectoryAdministratoryArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (i FlexibleServerActiveDirectoryAdministratoryArray) ToFlexibleServerActiveDirectoryAdministratoryArrayOutput() FlexibleServerActiveDirectoryAdministratoryArrayOutput { return i.ToFlexibleServerActiveDirectoryAdministratoryArrayOutputWithContext(context.Background()) } func (i FlexibleServerActiveDirectoryAdministratoryArray) ToFlexibleServerActiveDirectoryAdministratoryArrayOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratoryArrayOutput) } // FlexibleServerActiveDirectoryAdministratoryMapInput is an input type that accepts FlexibleServerActiveDirectoryAdministratoryMap and FlexibleServerActiveDirectoryAdministratoryMapOutput values. // You can construct a concrete instance of `FlexibleServerActiveDirectoryAdministratoryMapInput` via: // // FlexibleServerActiveDirectoryAdministratoryMap{ "key": FlexibleServerActiveDirectoryAdministratoryArgs{...} } type FlexibleServerActiveDirectoryAdministratoryMapInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratoryMapOutput() FlexibleServerActiveDirectoryAdministratoryMapOutput ToFlexibleServerActiveDirectoryAdministratoryMapOutputWithContext(context.Context) FlexibleServerActiveDirectoryAdministratoryMapOutput } type FlexibleServerActiveDirectoryAdministratoryMap map[string]FlexibleServerActiveDirectoryAdministratoryInput func (FlexibleServerActiveDirectoryAdministratoryMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (i FlexibleServerActiveDirectoryAdministratoryMap) ToFlexibleServerActiveDirectoryAdministratoryMapOutput() FlexibleServerActiveDirectoryAdministratoryMapOutput { return i.ToFlexibleServerActiveDirectoryAdministratoryMapOutputWithContext(context.Background()) } func (i FlexibleServerActiveDirectoryAdministratoryMap) ToFlexibleServerActiveDirectoryAdministratoryMapOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratoryMapOutput) } type FlexibleServerActiveDirectoryAdministratoryOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratoryOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratoryOutput) ToFlexibleServerActiveDirectoryAdministratoryOutput() FlexibleServerActiveDirectoryAdministratoryOutput { return o } func (o FlexibleServerActiveDirectoryAdministratoryOutput) ToFlexibleServerActiveDirectoryAdministratoryOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryOutput { return o } // The resource ID of the identity used for AAD Authentication. func (o FlexibleServerActiveDirectoryAdministratoryOutput) IdentityId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministratory) pulumi.StringOutput { return v.IdentityId }).(pulumi.StringOutput) } // The login name of the principal to set as the server administrator func (o FlexibleServerActiveDirectoryAdministratoryOutput) Login() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministratory) pulumi.StringOutput { return v.Login }).(pulumi.StringOutput) } // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. func (o FlexibleServerActiveDirectoryAdministratoryOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministratory) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The resource ID of the MySQL Flexible Server. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratoryOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministratory) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } // The Azure Tenant ID. func (o FlexibleServerActiveDirectoryAdministratoryOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministratory) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type FlexibleServerActiveDirectoryAdministratoryArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratoryArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratoryArrayOutput) ToFlexibleServerActiveDirectoryAdministratoryArrayOutput() FlexibleServerActiveDirectoryAdministratoryArrayOutput { return o } func (o FlexibleServerActiveDirectoryAdministratoryArrayOutput) ToFlexibleServerActiveDirectoryAdministratoryArrayOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryArrayOutput { return o } func (o FlexibleServerActiveDirectoryAdministratoryArrayOutput) Index(i pulumi.IntInput) FlexibleServerActiveDirectoryAdministratoryOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerActiveDirectoryAdministratory { return vs[0].([]*FlexibleServerActiveDirectoryAdministratory)[vs[1].(int)] }).(FlexibleServerActiveDirectoryAdministratoryOutput) } type FlexibleServerActiveDirectoryAdministratoryMapOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratoryMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerActiveDirectoryAdministratory)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratoryMapOutput) ToFlexibleServerActiveDirectoryAdministratoryMapOutput() FlexibleServerActiveDirectoryAdministratoryMapOutput { return o } func (o FlexibleServerActiveDirectoryAdministratoryMapOutput) ToFlexibleServerActiveDirectoryAdministratoryMapOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratoryMapOutput { return o } func (o FlexibleServerActiveDirectoryAdministratoryMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerActiveDirectoryAdministratoryOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerActiveDirectoryAdministratory { return vs[0].(map[string]*FlexibleServerActiveDirectoryAdministratory)[vs[1].(string)] }).(FlexibleServerActiveDirectoryAdministratoryOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratoryInput)(nil)).Elem(), &FlexibleServerActiveDirectoryAdministratory{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratoryArrayInput)(nil)).Elem(), FlexibleServerActiveDirectoryAdministratoryArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratoryMapInput)(nil)).Elem(), FlexibleServerActiveDirectoryAdministratoryMap{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratoryOutput{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratoryArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratoryMapOutput{}) }
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/servicefabric/init.go
sdk/go/azure/servicefabric/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 servicefabric 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:servicefabric/cluster:Cluster": r = &Cluster{} case "azure:servicefabric/managedCluster:ManagedCluster": r = &ManagedCluster{} 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", "servicefabric/cluster", &module{version}, ) pulumi.RegisterResourceModule( "azure", "servicefabric/managedCluster", &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/servicefabric/pulumiTypes.go
sdk/go/azure/servicefabric/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 servicefabric 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 ClusterAzureActiveDirectory struct { // The Azure Active Directory Client ID which should be used for the Client Application. ClientApplicationId string `pulumi:"clientApplicationId"` // The Azure Active Directory Cluster Application ID. ClusterApplicationId string `pulumi:"clusterApplicationId"` // The Azure Active Directory Tenant ID. TenantId string `pulumi:"tenantId"` } // ClusterAzureActiveDirectoryInput is an input type that accepts ClusterAzureActiveDirectoryArgs and ClusterAzureActiveDirectoryOutput values. // You can construct a concrete instance of `ClusterAzureActiveDirectoryInput` via: // // ClusterAzureActiveDirectoryArgs{...} type ClusterAzureActiveDirectoryInput interface { pulumi.Input ToClusterAzureActiveDirectoryOutput() ClusterAzureActiveDirectoryOutput ToClusterAzureActiveDirectoryOutputWithContext(context.Context) ClusterAzureActiveDirectoryOutput } type ClusterAzureActiveDirectoryArgs struct { // The Azure Active Directory Client ID which should be used for the Client Application. ClientApplicationId pulumi.StringInput `pulumi:"clientApplicationId"` // The Azure Active Directory Cluster Application ID. ClusterApplicationId pulumi.StringInput `pulumi:"clusterApplicationId"` // The Azure Active Directory Tenant ID. TenantId pulumi.StringInput `pulumi:"tenantId"` } func (ClusterAzureActiveDirectoryArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterAzureActiveDirectory)(nil)).Elem() } func (i ClusterAzureActiveDirectoryArgs) ToClusterAzureActiveDirectoryOutput() ClusterAzureActiveDirectoryOutput { return i.ToClusterAzureActiveDirectoryOutputWithContext(context.Background()) } func (i ClusterAzureActiveDirectoryArgs) ToClusterAzureActiveDirectoryOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterAzureActiveDirectoryOutput) } func (i ClusterAzureActiveDirectoryArgs) ToClusterAzureActiveDirectoryPtrOutput() ClusterAzureActiveDirectoryPtrOutput { return i.ToClusterAzureActiveDirectoryPtrOutputWithContext(context.Background()) } func (i ClusterAzureActiveDirectoryArgs) ToClusterAzureActiveDirectoryPtrOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterAzureActiveDirectoryOutput).ToClusterAzureActiveDirectoryPtrOutputWithContext(ctx) } // ClusterAzureActiveDirectoryPtrInput is an input type that accepts ClusterAzureActiveDirectoryArgs, ClusterAzureActiveDirectoryPtr and ClusterAzureActiveDirectoryPtrOutput values. // You can construct a concrete instance of `ClusterAzureActiveDirectoryPtrInput` via: // // ClusterAzureActiveDirectoryArgs{...} // // or: // // nil type ClusterAzureActiveDirectoryPtrInput interface { pulumi.Input ToClusterAzureActiveDirectoryPtrOutput() ClusterAzureActiveDirectoryPtrOutput ToClusterAzureActiveDirectoryPtrOutputWithContext(context.Context) ClusterAzureActiveDirectoryPtrOutput } type clusterAzureActiveDirectoryPtrType ClusterAzureActiveDirectoryArgs func ClusterAzureActiveDirectoryPtr(v *ClusterAzureActiveDirectoryArgs) ClusterAzureActiveDirectoryPtrInput { return (*clusterAzureActiveDirectoryPtrType)(v) } func (*clusterAzureActiveDirectoryPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ClusterAzureActiveDirectory)(nil)).Elem() } func (i *clusterAzureActiveDirectoryPtrType) ToClusterAzureActiveDirectoryPtrOutput() ClusterAzureActiveDirectoryPtrOutput { return i.ToClusterAzureActiveDirectoryPtrOutputWithContext(context.Background()) } func (i *clusterAzureActiveDirectoryPtrType) ToClusterAzureActiveDirectoryPtrOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterAzureActiveDirectoryPtrOutput) } type ClusterAzureActiveDirectoryOutput struct{ *pulumi.OutputState } func (ClusterAzureActiveDirectoryOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterAzureActiveDirectory)(nil)).Elem() } func (o ClusterAzureActiveDirectoryOutput) ToClusterAzureActiveDirectoryOutput() ClusterAzureActiveDirectoryOutput { return o } func (o ClusterAzureActiveDirectoryOutput) ToClusterAzureActiveDirectoryOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryOutput { return o } func (o ClusterAzureActiveDirectoryOutput) ToClusterAzureActiveDirectoryPtrOutput() ClusterAzureActiveDirectoryPtrOutput { return o.ToClusterAzureActiveDirectoryPtrOutputWithContext(context.Background()) } func (o ClusterAzureActiveDirectoryOutput) ToClusterAzureActiveDirectoryPtrOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterAzureActiveDirectory) *ClusterAzureActiveDirectory { return &v }).(ClusterAzureActiveDirectoryPtrOutput) } // The Azure Active Directory Client ID which should be used for the Client Application. func (o ClusterAzureActiveDirectoryOutput) ClientApplicationId() pulumi.StringOutput { return o.ApplyT(func(v ClusterAzureActiveDirectory) string { return v.ClientApplicationId }).(pulumi.StringOutput) } // The Azure Active Directory Cluster Application ID. func (o ClusterAzureActiveDirectoryOutput) ClusterApplicationId() pulumi.StringOutput { return o.ApplyT(func(v ClusterAzureActiveDirectory) string { return v.ClusterApplicationId }).(pulumi.StringOutput) } // The Azure Active Directory Tenant ID. func (o ClusterAzureActiveDirectoryOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v ClusterAzureActiveDirectory) string { return v.TenantId }).(pulumi.StringOutput) } type ClusterAzureActiveDirectoryPtrOutput struct{ *pulumi.OutputState } func (ClusterAzureActiveDirectoryPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ClusterAzureActiveDirectory)(nil)).Elem() } func (o ClusterAzureActiveDirectoryPtrOutput) ToClusterAzureActiveDirectoryPtrOutput() ClusterAzureActiveDirectoryPtrOutput { return o } func (o ClusterAzureActiveDirectoryPtrOutput) ToClusterAzureActiveDirectoryPtrOutputWithContext(ctx context.Context) ClusterAzureActiveDirectoryPtrOutput { return o } func (o ClusterAzureActiveDirectoryPtrOutput) Elem() ClusterAzureActiveDirectoryOutput { return o.ApplyT(func(v *ClusterAzureActiveDirectory) ClusterAzureActiveDirectory { if v != nil { return *v } var ret ClusterAzureActiveDirectory return ret }).(ClusterAzureActiveDirectoryOutput) } // The Azure Active Directory Client ID which should be used for the Client Application. func (o ClusterAzureActiveDirectoryPtrOutput) ClientApplicationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterAzureActiveDirectory) *string { if v == nil { return nil } return &v.ClientApplicationId }).(pulumi.StringPtrOutput) } // The Azure Active Directory Cluster Application ID. func (o ClusterAzureActiveDirectoryPtrOutput) ClusterApplicationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterAzureActiveDirectory) *string { if v == nil { return nil } return &v.ClusterApplicationId }).(pulumi.StringPtrOutput) } // The Azure Active Directory Tenant ID. func (o ClusterAzureActiveDirectoryPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterAzureActiveDirectory) *string { if v == nil { return nil } return &v.TenantId }).(pulumi.StringPtrOutput) } type ClusterCertificate struct { // The Thumbprint of the Certificate. Thumbprint string `pulumi:"thumbprint"` // The Secondary Thumbprint of the Certificate. ThumbprintSecondary *string `pulumi:"thumbprintSecondary"` // The X509 Store where the Certificate Exists, such as `My`. X509StoreName string `pulumi:"x509StoreName"` } // ClusterCertificateInput is an input type that accepts ClusterCertificateArgs and ClusterCertificateOutput values. // You can construct a concrete instance of `ClusterCertificateInput` via: // // ClusterCertificateArgs{...} type ClusterCertificateInput interface { pulumi.Input ToClusterCertificateOutput() ClusterCertificateOutput ToClusterCertificateOutputWithContext(context.Context) ClusterCertificateOutput } type ClusterCertificateArgs struct { // The Thumbprint of the Certificate. Thumbprint pulumi.StringInput `pulumi:"thumbprint"` // The Secondary Thumbprint of the Certificate. ThumbprintSecondary pulumi.StringPtrInput `pulumi:"thumbprintSecondary"` // The X509 Store where the Certificate Exists, such as `My`. X509StoreName pulumi.StringInput `pulumi:"x509StoreName"` } func (ClusterCertificateArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificate)(nil)).Elem() } func (i ClusterCertificateArgs) ToClusterCertificateOutput() ClusterCertificateOutput { return i.ToClusterCertificateOutputWithContext(context.Background()) } func (i ClusterCertificateArgs) ToClusterCertificateOutputWithContext(ctx context.Context) ClusterCertificateOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateOutput) } func (i ClusterCertificateArgs) ToClusterCertificatePtrOutput() ClusterCertificatePtrOutput { return i.ToClusterCertificatePtrOutputWithContext(context.Background()) } func (i ClusterCertificateArgs) ToClusterCertificatePtrOutputWithContext(ctx context.Context) ClusterCertificatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateOutput).ToClusterCertificatePtrOutputWithContext(ctx) } // ClusterCertificatePtrInput is an input type that accepts ClusterCertificateArgs, ClusterCertificatePtr and ClusterCertificatePtrOutput values. // You can construct a concrete instance of `ClusterCertificatePtrInput` via: // // ClusterCertificateArgs{...} // // or: // // nil type ClusterCertificatePtrInput interface { pulumi.Input ToClusterCertificatePtrOutput() ClusterCertificatePtrOutput ToClusterCertificatePtrOutputWithContext(context.Context) ClusterCertificatePtrOutput } type clusterCertificatePtrType ClusterCertificateArgs func ClusterCertificatePtr(v *ClusterCertificateArgs) ClusterCertificatePtrInput { return (*clusterCertificatePtrType)(v) } func (*clusterCertificatePtrType) ElementType() reflect.Type { return reflect.TypeOf((**ClusterCertificate)(nil)).Elem() } func (i *clusterCertificatePtrType) ToClusterCertificatePtrOutput() ClusterCertificatePtrOutput { return i.ToClusterCertificatePtrOutputWithContext(context.Background()) } func (i *clusterCertificatePtrType) ToClusterCertificatePtrOutputWithContext(ctx context.Context) ClusterCertificatePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificatePtrOutput) } type ClusterCertificateOutput struct{ *pulumi.OutputState } func (ClusterCertificateOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificate)(nil)).Elem() } func (o ClusterCertificateOutput) ToClusterCertificateOutput() ClusterCertificateOutput { return o } func (o ClusterCertificateOutput) ToClusterCertificateOutputWithContext(ctx context.Context) ClusterCertificateOutput { return o } func (o ClusterCertificateOutput) ToClusterCertificatePtrOutput() ClusterCertificatePtrOutput { return o.ToClusterCertificatePtrOutputWithContext(context.Background()) } func (o ClusterCertificateOutput) ToClusterCertificatePtrOutputWithContext(ctx context.Context) ClusterCertificatePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterCertificate) *ClusterCertificate { return &v }).(ClusterCertificatePtrOutput) } // The Thumbprint of the Certificate. func (o ClusterCertificateOutput) Thumbprint() pulumi.StringOutput { return o.ApplyT(func(v ClusterCertificate) string { return v.Thumbprint }).(pulumi.StringOutput) } // The Secondary Thumbprint of the Certificate. func (o ClusterCertificateOutput) ThumbprintSecondary() pulumi.StringPtrOutput { return o.ApplyT(func(v ClusterCertificate) *string { return v.ThumbprintSecondary }).(pulumi.StringPtrOutput) } // The X509 Store where the Certificate Exists, such as `My`. func (o ClusterCertificateOutput) X509StoreName() pulumi.StringOutput { return o.ApplyT(func(v ClusterCertificate) string { return v.X509StoreName }).(pulumi.StringOutput) } type ClusterCertificatePtrOutput struct{ *pulumi.OutputState } func (ClusterCertificatePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ClusterCertificate)(nil)).Elem() } func (o ClusterCertificatePtrOutput) ToClusterCertificatePtrOutput() ClusterCertificatePtrOutput { return o } func (o ClusterCertificatePtrOutput) ToClusterCertificatePtrOutputWithContext(ctx context.Context) ClusterCertificatePtrOutput { return o } func (o ClusterCertificatePtrOutput) Elem() ClusterCertificateOutput { return o.ApplyT(func(v *ClusterCertificate) ClusterCertificate { if v != nil { return *v } var ret ClusterCertificate return ret }).(ClusterCertificateOutput) } // The Thumbprint of the Certificate. func (o ClusterCertificatePtrOutput) Thumbprint() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCertificate) *string { if v == nil { return nil } return &v.Thumbprint }).(pulumi.StringPtrOutput) } // The Secondary Thumbprint of the Certificate. func (o ClusterCertificatePtrOutput) ThumbprintSecondary() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCertificate) *string { if v == nil { return nil } return v.ThumbprintSecondary }).(pulumi.StringPtrOutput) } // The X509 Store where the Certificate Exists, such as `My`. func (o ClusterCertificatePtrOutput) X509StoreName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCertificate) *string { if v == nil { return nil } return &v.X509StoreName }).(pulumi.StringPtrOutput) } type ClusterCertificateCommonNames struct { // A `commonNames` block as defined below. CommonNames []ClusterCertificateCommonNamesCommonName `pulumi:"commonNames"` // The X509 Store where the Certificate Exists, such as `My`. X509StoreName string `pulumi:"x509StoreName"` } // ClusterCertificateCommonNamesInput is an input type that accepts ClusterCertificateCommonNamesArgs and ClusterCertificateCommonNamesOutput values. // You can construct a concrete instance of `ClusterCertificateCommonNamesInput` via: // // ClusterCertificateCommonNamesArgs{...} type ClusterCertificateCommonNamesInput interface { pulumi.Input ToClusterCertificateCommonNamesOutput() ClusterCertificateCommonNamesOutput ToClusterCertificateCommonNamesOutputWithContext(context.Context) ClusterCertificateCommonNamesOutput } type ClusterCertificateCommonNamesArgs struct { // A `commonNames` block as defined below. CommonNames ClusterCertificateCommonNamesCommonNameArrayInput `pulumi:"commonNames"` // The X509 Store where the Certificate Exists, such as `My`. X509StoreName pulumi.StringInput `pulumi:"x509StoreName"` } func (ClusterCertificateCommonNamesArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificateCommonNames)(nil)).Elem() } func (i ClusterCertificateCommonNamesArgs) ToClusterCertificateCommonNamesOutput() ClusterCertificateCommonNamesOutput { return i.ToClusterCertificateCommonNamesOutputWithContext(context.Background()) } func (i ClusterCertificateCommonNamesArgs) ToClusterCertificateCommonNamesOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateCommonNamesOutput) } func (i ClusterCertificateCommonNamesArgs) ToClusterCertificateCommonNamesPtrOutput() ClusterCertificateCommonNamesPtrOutput { return i.ToClusterCertificateCommonNamesPtrOutputWithContext(context.Background()) } func (i ClusterCertificateCommonNamesArgs) ToClusterCertificateCommonNamesPtrOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateCommonNamesOutput).ToClusterCertificateCommonNamesPtrOutputWithContext(ctx) } // ClusterCertificateCommonNamesPtrInput is an input type that accepts ClusterCertificateCommonNamesArgs, ClusterCertificateCommonNamesPtr and ClusterCertificateCommonNamesPtrOutput values. // You can construct a concrete instance of `ClusterCertificateCommonNamesPtrInput` via: // // ClusterCertificateCommonNamesArgs{...} // // or: // // nil type ClusterCertificateCommonNamesPtrInput interface { pulumi.Input ToClusterCertificateCommonNamesPtrOutput() ClusterCertificateCommonNamesPtrOutput ToClusterCertificateCommonNamesPtrOutputWithContext(context.Context) ClusterCertificateCommonNamesPtrOutput } type clusterCertificateCommonNamesPtrType ClusterCertificateCommonNamesArgs func ClusterCertificateCommonNamesPtr(v *ClusterCertificateCommonNamesArgs) ClusterCertificateCommonNamesPtrInput { return (*clusterCertificateCommonNamesPtrType)(v) } func (*clusterCertificateCommonNamesPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ClusterCertificateCommonNames)(nil)).Elem() } func (i *clusterCertificateCommonNamesPtrType) ToClusterCertificateCommonNamesPtrOutput() ClusterCertificateCommonNamesPtrOutput { return i.ToClusterCertificateCommonNamesPtrOutputWithContext(context.Background()) } func (i *clusterCertificateCommonNamesPtrType) ToClusterCertificateCommonNamesPtrOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateCommonNamesPtrOutput) } type ClusterCertificateCommonNamesOutput struct{ *pulumi.OutputState } func (ClusterCertificateCommonNamesOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificateCommonNames)(nil)).Elem() } func (o ClusterCertificateCommonNamesOutput) ToClusterCertificateCommonNamesOutput() ClusterCertificateCommonNamesOutput { return o } func (o ClusterCertificateCommonNamesOutput) ToClusterCertificateCommonNamesOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesOutput { return o } func (o ClusterCertificateCommonNamesOutput) ToClusterCertificateCommonNamesPtrOutput() ClusterCertificateCommonNamesPtrOutput { return o.ToClusterCertificateCommonNamesPtrOutputWithContext(context.Background()) } func (o ClusterCertificateCommonNamesOutput) ToClusterCertificateCommonNamesPtrOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterCertificateCommonNames) *ClusterCertificateCommonNames { return &v }).(ClusterCertificateCommonNamesPtrOutput) } // A `commonNames` block as defined below. func (o ClusterCertificateCommonNamesOutput) CommonNames() ClusterCertificateCommonNamesCommonNameArrayOutput { return o.ApplyT(func(v ClusterCertificateCommonNames) []ClusterCertificateCommonNamesCommonName { return v.CommonNames }).(ClusterCertificateCommonNamesCommonNameArrayOutput) } // The X509 Store where the Certificate Exists, such as `My`. func (o ClusterCertificateCommonNamesOutput) X509StoreName() pulumi.StringOutput { return o.ApplyT(func(v ClusterCertificateCommonNames) string { return v.X509StoreName }).(pulumi.StringOutput) } type ClusterCertificateCommonNamesPtrOutput struct{ *pulumi.OutputState } func (ClusterCertificateCommonNamesPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ClusterCertificateCommonNames)(nil)).Elem() } func (o ClusterCertificateCommonNamesPtrOutput) ToClusterCertificateCommonNamesPtrOutput() ClusterCertificateCommonNamesPtrOutput { return o } func (o ClusterCertificateCommonNamesPtrOutput) ToClusterCertificateCommonNamesPtrOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesPtrOutput { return o } func (o ClusterCertificateCommonNamesPtrOutput) Elem() ClusterCertificateCommonNamesOutput { return o.ApplyT(func(v *ClusterCertificateCommonNames) ClusterCertificateCommonNames { if v != nil { return *v } var ret ClusterCertificateCommonNames return ret }).(ClusterCertificateCommonNamesOutput) } // A `commonNames` block as defined below. func (o ClusterCertificateCommonNamesPtrOutput) CommonNames() ClusterCertificateCommonNamesCommonNameArrayOutput { return o.ApplyT(func(v *ClusterCertificateCommonNames) []ClusterCertificateCommonNamesCommonName { if v == nil { return nil } return v.CommonNames }).(ClusterCertificateCommonNamesCommonNameArrayOutput) } // The X509 Store where the Certificate Exists, such as `My`. func (o ClusterCertificateCommonNamesPtrOutput) X509StoreName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCertificateCommonNames) *string { if v == nil { return nil } return &v.X509StoreName }).(pulumi.StringPtrOutput) } type ClusterCertificateCommonNamesCommonName struct { // The common or subject name of the certificate. CertificateCommonName string `pulumi:"certificateCommonName"` // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. CertificateIssuerThumbprint *string `pulumi:"certificateIssuerThumbprint"` } // ClusterCertificateCommonNamesCommonNameInput is an input type that accepts ClusterCertificateCommonNamesCommonNameArgs and ClusterCertificateCommonNamesCommonNameOutput values. // You can construct a concrete instance of `ClusterCertificateCommonNamesCommonNameInput` via: // // ClusterCertificateCommonNamesCommonNameArgs{...} type ClusterCertificateCommonNamesCommonNameInput interface { pulumi.Input ToClusterCertificateCommonNamesCommonNameOutput() ClusterCertificateCommonNamesCommonNameOutput ToClusterCertificateCommonNamesCommonNameOutputWithContext(context.Context) ClusterCertificateCommonNamesCommonNameOutput } type ClusterCertificateCommonNamesCommonNameArgs struct { // The common or subject name of the certificate. CertificateCommonName pulumi.StringInput `pulumi:"certificateCommonName"` // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. CertificateIssuerThumbprint pulumi.StringPtrInput `pulumi:"certificateIssuerThumbprint"` } func (ClusterCertificateCommonNamesCommonNameArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificateCommonNamesCommonName)(nil)).Elem() } func (i ClusterCertificateCommonNamesCommonNameArgs) ToClusterCertificateCommonNamesCommonNameOutput() ClusterCertificateCommonNamesCommonNameOutput { return i.ToClusterCertificateCommonNamesCommonNameOutputWithContext(context.Background()) } func (i ClusterCertificateCommonNamesCommonNameArgs) ToClusterCertificateCommonNamesCommonNameOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesCommonNameOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateCommonNamesCommonNameOutput) } // ClusterCertificateCommonNamesCommonNameArrayInput is an input type that accepts ClusterCertificateCommonNamesCommonNameArray and ClusterCertificateCommonNamesCommonNameArrayOutput values. // You can construct a concrete instance of `ClusterCertificateCommonNamesCommonNameArrayInput` via: // // ClusterCertificateCommonNamesCommonNameArray{ ClusterCertificateCommonNamesCommonNameArgs{...} } type ClusterCertificateCommonNamesCommonNameArrayInput interface { pulumi.Input ToClusterCertificateCommonNamesCommonNameArrayOutput() ClusterCertificateCommonNamesCommonNameArrayOutput ToClusterCertificateCommonNamesCommonNameArrayOutputWithContext(context.Context) ClusterCertificateCommonNamesCommonNameArrayOutput } type ClusterCertificateCommonNamesCommonNameArray []ClusterCertificateCommonNamesCommonNameInput func (ClusterCertificateCommonNamesCommonNameArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ClusterCertificateCommonNamesCommonName)(nil)).Elem() } func (i ClusterCertificateCommonNamesCommonNameArray) ToClusterCertificateCommonNamesCommonNameArrayOutput() ClusterCertificateCommonNamesCommonNameArrayOutput { return i.ToClusterCertificateCommonNamesCommonNameArrayOutputWithContext(context.Background()) } func (i ClusterCertificateCommonNamesCommonNameArray) ToClusterCertificateCommonNamesCommonNameArrayOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesCommonNameArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterCertificateCommonNamesCommonNameArrayOutput) } type ClusterCertificateCommonNamesCommonNameOutput struct{ *pulumi.OutputState } func (ClusterCertificateCommonNamesCommonNameOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterCertificateCommonNamesCommonName)(nil)).Elem() } func (o ClusterCertificateCommonNamesCommonNameOutput) ToClusterCertificateCommonNamesCommonNameOutput() ClusterCertificateCommonNamesCommonNameOutput { return o } func (o ClusterCertificateCommonNamesCommonNameOutput) ToClusterCertificateCommonNamesCommonNameOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesCommonNameOutput { return o } // The common or subject name of the certificate. func (o ClusterCertificateCommonNamesCommonNameOutput) CertificateCommonName() pulumi.StringOutput { return o.ApplyT(func(v ClusterCertificateCommonNamesCommonName) string { return v.CertificateCommonName }).(pulumi.StringOutput) } // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. func (o ClusterCertificateCommonNamesCommonNameOutput) CertificateIssuerThumbprint() pulumi.StringPtrOutput { return o.ApplyT(func(v ClusterCertificateCommonNamesCommonName) *string { return v.CertificateIssuerThumbprint }).(pulumi.StringPtrOutput) } type ClusterCertificateCommonNamesCommonNameArrayOutput struct{ *pulumi.OutputState } func (ClusterCertificateCommonNamesCommonNameArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ClusterCertificateCommonNamesCommonName)(nil)).Elem() } func (o ClusterCertificateCommonNamesCommonNameArrayOutput) ToClusterCertificateCommonNamesCommonNameArrayOutput() ClusterCertificateCommonNamesCommonNameArrayOutput { return o } func (o ClusterCertificateCommonNamesCommonNameArrayOutput) ToClusterCertificateCommonNamesCommonNameArrayOutputWithContext(ctx context.Context) ClusterCertificateCommonNamesCommonNameArrayOutput { return o } func (o ClusterCertificateCommonNamesCommonNameArrayOutput) Index(i pulumi.IntInput) ClusterCertificateCommonNamesCommonNameOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ClusterCertificateCommonNamesCommonName { return vs[0].([]ClusterCertificateCommonNamesCommonName)[vs[1].(int)] }).(ClusterCertificateCommonNamesCommonNameOutput) } type ClusterClientCertificateCommonName struct { // The common or subject name of the certificate. CommonName string `pulumi:"commonName"` // Does the Client Certificate have Admin Access to the cluster? Non-admin clients can only perform read only operations on the cluster. IsAdmin bool `pulumi:"isAdmin"` // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. IssuerThumbprint *string `pulumi:"issuerThumbprint"` } // ClusterClientCertificateCommonNameInput is an input type that accepts ClusterClientCertificateCommonNameArgs and ClusterClientCertificateCommonNameOutput values. // You can construct a concrete instance of `ClusterClientCertificateCommonNameInput` via: // // ClusterClientCertificateCommonNameArgs{...} type ClusterClientCertificateCommonNameInput interface { pulumi.Input ToClusterClientCertificateCommonNameOutput() ClusterClientCertificateCommonNameOutput ToClusterClientCertificateCommonNameOutputWithContext(context.Context) ClusterClientCertificateCommonNameOutput } type ClusterClientCertificateCommonNameArgs struct { // The common or subject name of the certificate. CommonName pulumi.StringInput `pulumi:"commonName"` // Does the Client Certificate have Admin Access to the cluster? Non-admin clients can only perform read only operations on the cluster. IsAdmin pulumi.BoolInput `pulumi:"isAdmin"` // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. IssuerThumbprint pulumi.StringPtrInput `pulumi:"issuerThumbprint"` } func (ClusterClientCertificateCommonNameArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterClientCertificateCommonName)(nil)).Elem() } func (i ClusterClientCertificateCommonNameArgs) ToClusterClientCertificateCommonNameOutput() ClusterClientCertificateCommonNameOutput { return i.ToClusterClientCertificateCommonNameOutputWithContext(context.Background()) } func (i ClusterClientCertificateCommonNameArgs) ToClusterClientCertificateCommonNameOutputWithContext(ctx context.Context) ClusterClientCertificateCommonNameOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterClientCertificateCommonNameOutput) } // ClusterClientCertificateCommonNameArrayInput is an input type that accepts ClusterClientCertificateCommonNameArray and ClusterClientCertificateCommonNameArrayOutput values. // You can construct a concrete instance of `ClusterClientCertificateCommonNameArrayInput` via: // // ClusterClientCertificateCommonNameArray{ ClusterClientCertificateCommonNameArgs{...} } type ClusterClientCertificateCommonNameArrayInput interface { pulumi.Input ToClusterClientCertificateCommonNameArrayOutput() ClusterClientCertificateCommonNameArrayOutput ToClusterClientCertificateCommonNameArrayOutputWithContext(context.Context) ClusterClientCertificateCommonNameArrayOutput } type ClusterClientCertificateCommonNameArray []ClusterClientCertificateCommonNameInput func (ClusterClientCertificateCommonNameArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ClusterClientCertificateCommonName)(nil)).Elem() } func (i ClusterClientCertificateCommonNameArray) ToClusterClientCertificateCommonNameArrayOutput() ClusterClientCertificateCommonNameArrayOutput { return i.ToClusterClientCertificateCommonNameArrayOutputWithContext(context.Background()) } func (i ClusterClientCertificateCommonNameArray) ToClusterClientCertificateCommonNameArrayOutputWithContext(ctx context.Context) ClusterClientCertificateCommonNameArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterClientCertificateCommonNameArrayOutput) } type ClusterClientCertificateCommonNameOutput struct{ *pulumi.OutputState } func (ClusterClientCertificateCommonNameOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterClientCertificateCommonName)(nil)).Elem() } func (o ClusterClientCertificateCommonNameOutput) ToClusterClientCertificateCommonNameOutput() ClusterClientCertificateCommonNameOutput { return o } func (o ClusterClientCertificateCommonNameOutput) ToClusterClientCertificateCommonNameOutputWithContext(ctx context.Context) ClusterClientCertificateCommonNameOutput { return o } // The common or subject name of the certificate. func (o ClusterClientCertificateCommonNameOutput) CommonName() pulumi.StringOutput { return o.ApplyT(func(v ClusterClientCertificateCommonName) string { return v.CommonName }).(pulumi.StringOutput) } // Does the Client Certificate have Admin Access to the cluster? Non-admin clients can only perform read only operations on the cluster. func (o ClusterClientCertificateCommonNameOutput) IsAdmin() pulumi.BoolOutput { return o.ApplyT(func(v ClusterClientCertificateCommonName) bool { return v.IsAdmin }).(pulumi.BoolOutput) } // The Issuer Thumbprint of the Certificate. // // > **Note:** Certificate Issuer Thumbprint may become required in the future, `https://docs.microsoft.com/azure/service-fabric/service-fabric-create-cluster-using-cert-cn#download-and-update-a-sample-template`. func (o ClusterClientCertificateCommonNameOutput) IssuerThumbprint() pulumi.StringPtrOutput {
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/servicefabric/cluster.go
sdk/go/azure/servicefabric/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 servicefabric 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 Fabric 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/servicefabric" // "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 = servicefabric.NewCluster(ctx, "example", &servicefabric.ClusterArgs{ // Name: pulumi.String("example-servicefabric"), // ResourceGroupName: example.Name, // Location: example.Location, // ReliabilityLevel: pulumi.String("Bronze"), // UpgradeMode: pulumi.String("Manual"), // ClusterCodeVersion: pulumi.String("7.1.456.959"), // VmImage: pulumi.String("Windows"), // ManagementEndpoint: pulumi.String("https://example:80"), // NodeTypes: servicefabric.ClusterNodeTypeArray{ // &servicefabric.ClusterNodeTypeArgs{ // Name: pulumi.String("first"), // InstanceCount: pulumi.Int(3), // IsPrimary: pulumi.Bool(true), // ClientEndpointPort: pulumi.Int(2020), // HttpEndpointPort: pulumi.Int(80), // }, // }, // }) // 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.ServiceFabric` - 2021-06-01 // // ## Import // // Service Fabric Clusters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:servicefabric/cluster:Cluster cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceFabric/clusters/cluster1 // ``` type Cluster struct { pulumi.CustomResourceState // A List of one or more features which should be enabled, such as `DnsService`. AddOnFeatures pulumi.StringArrayOutput `pulumi:"addOnFeatures"` // An `azureActiveDirectory` block as defined below. AzureActiveDirectory ClusterAzureActiveDirectoryPtrOutput `pulumi:"azureActiveDirectory"` // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. Certificate ClusterCertificatePtrOutput `pulumi:"certificate"` // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. CertificateCommonNames ClusterCertificateCommonNamesPtrOutput `pulumi:"certificateCommonNames"` // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. ClientCertificateCommonNames ClusterClientCertificateCommonNameArrayOutput `pulumi:"clientCertificateCommonNames"` // One or more `clientCertificateThumbprint` blocks as defined below. ClientCertificateThumbprints ClusterClientCertificateThumbprintArrayOutput `pulumi:"clientCertificateThumbprints"` // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. ClusterCodeVersion pulumi.StringOutput `pulumi:"clusterCodeVersion"` // The Cluster Endpoint for this Service Fabric Cluster. ClusterEndpoint pulumi.StringOutput `pulumi:"clusterEndpoint"` // A `diagnosticsConfig` block as defined below. DiagnosticsConfig ClusterDiagnosticsConfigPtrOutput `pulumi:"diagnosticsConfig"` // One or more `fabricSettings` blocks as defined below. FabricSettings ClusterFabricSettingArrayOutput `pulumi:"fabricSettings"` // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. ManagementEndpoint pulumi.StringOutput `pulumi:"managementEndpoint"` // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes ClusterNodeTypeArrayOutput `pulumi:"nodeTypes"` // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. ReliabilityLevel pulumi.StringOutput `pulumi:"reliabilityLevel"` // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. ReverseProxyCertificate ClusterReverseProxyCertificatePtrOutput `pulumi:"reverseProxyCertificate"` // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. ReverseProxyCertificateCommonNames ClusterReverseProxyCertificateCommonNamesPtrOutput `pulumi:"reverseProxyCertificateCommonNames"` // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. ServiceFabricZonalUpgradeMode pulumi.StringPtrOutput `pulumi:"serviceFabricZonalUpgradeMode"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the Upgrade Mode of the cluster. Possible values are `Automatic` or `Manual`. UpgradeMode pulumi.StringOutput `pulumi:"upgradeMode"` // A `upgradePolicy` block as defined below. UpgradePolicy ClusterUpgradePolicyPtrOutput `pulumi:"upgradePolicy"` // Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. VmImage pulumi.StringOutput `pulumi:"vmImage"` // Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. VmssZonalUpgradeMode pulumi.StringPtrOutput `pulumi:"vmssZonalUpgradeMode"` } // 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.ManagementEndpoint == nil { return nil, errors.New("invalid value for required argument 'ManagementEndpoint'") } if args.NodeTypes == nil { return nil, errors.New("invalid value for required argument 'NodeTypes'") } if args.ReliabilityLevel == nil { return nil, errors.New("invalid value for required argument 'ReliabilityLevel'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.UpgradeMode == nil { return nil, errors.New("invalid value for required argument 'UpgradeMode'") } if args.VmImage == nil { return nil, errors.New("invalid value for required argument 'VmImage'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Cluster err := ctx.RegisterResource("azure:servicefabric/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:servicefabric/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 { // A List of one or more features which should be enabled, such as `DnsService`. AddOnFeatures []string `pulumi:"addOnFeatures"` // An `azureActiveDirectory` block as defined below. AzureActiveDirectory *ClusterAzureActiveDirectory `pulumi:"azureActiveDirectory"` // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. Certificate *ClusterCertificate `pulumi:"certificate"` // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. CertificateCommonNames *ClusterCertificateCommonNames `pulumi:"certificateCommonNames"` // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. ClientCertificateCommonNames []ClusterClientCertificateCommonName `pulumi:"clientCertificateCommonNames"` // One or more `clientCertificateThumbprint` blocks as defined below. ClientCertificateThumbprints []ClusterClientCertificateThumbprint `pulumi:"clientCertificateThumbprints"` // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. ClusterCodeVersion *string `pulumi:"clusterCodeVersion"` // The Cluster Endpoint for this Service Fabric Cluster. ClusterEndpoint *string `pulumi:"clusterEndpoint"` // A `diagnosticsConfig` block as defined below. DiagnosticsConfig *ClusterDiagnosticsConfig `pulumi:"diagnosticsConfig"` // One or more `fabricSettings` blocks as defined below. FabricSettings []ClusterFabricSetting `pulumi:"fabricSettings"` // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. ManagementEndpoint *string `pulumi:"managementEndpoint"` // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes []ClusterNodeType `pulumi:"nodeTypes"` // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. ReliabilityLevel *string `pulumi:"reliabilityLevel"` // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. ReverseProxyCertificate *ClusterReverseProxyCertificate `pulumi:"reverseProxyCertificate"` // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. ReverseProxyCertificateCommonNames *ClusterReverseProxyCertificateCommonNames `pulumi:"reverseProxyCertificateCommonNames"` // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. ServiceFabricZonalUpgradeMode *string `pulumi:"serviceFabricZonalUpgradeMode"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the Upgrade Mode of the cluster. Possible values are `Automatic` or `Manual`. UpgradeMode *string `pulumi:"upgradeMode"` // A `upgradePolicy` block as defined below. UpgradePolicy *ClusterUpgradePolicy `pulumi:"upgradePolicy"` // Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. VmImage *string `pulumi:"vmImage"` // Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. VmssZonalUpgradeMode *string `pulumi:"vmssZonalUpgradeMode"` } type ClusterState struct { // A List of one or more features which should be enabled, such as `DnsService`. AddOnFeatures pulumi.StringArrayInput // An `azureActiveDirectory` block as defined below. AzureActiveDirectory ClusterAzureActiveDirectoryPtrInput // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. Certificate ClusterCertificatePtrInput // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. CertificateCommonNames ClusterCertificateCommonNamesPtrInput // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. ClientCertificateCommonNames ClusterClientCertificateCommonNameArrayInput // One or more `clientCertificateThumbprint` blocks as defined below. ClientCertificateThumbprints ClusterClientCertificateThumbprintArrayInput // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. ClusterCodeVersion pulumi.StringPtrInput // The Cluster Endpoint for this Service Fabric Cluster. ClusterEndpoint pulumi.StringPtrInput // A `diagnosticsConfig` block as defined below. DiagnosticsConfig ClusterDiagnosticsConfigPtrInput // One or more `fabricSettings` blocks as defined below. FabricSettings ClusterFabricSettingArrayInput // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. ManagementEndpoint pulumi.StringPtrInput // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `nodeType` blocks as defined below. NodeTypes ClusterNodeTypeArrayInput // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. ReliabilityLevel pulumi.StringPtrInput // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. ReverseProxyCertificate ClusterReverseProxyCertificatePtrInput // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. ReverseProxyCertificateCommonNames ClusterReverseProxyCertificateCommonNamesPtrInput // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. ServiceFabricZonalUpgradeMode pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the Upgrade Mode of the cluster. Possible values are `Automatic` or `Manual`. UpgradeMode pulumi.StringPtrInput // A `upgradePolicy` block as defined below. UpgradePolicy ClusterUpgradePolicyPtrInput // Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. VmImage pulumi.StringPtrInput // Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. VmssZonalUpgradeMode pulumi.StringPtrInput } func (ClusterState) ElementType() reflect.Type { return reflect.TypeOf((*clusterState)(nil)).Elem() } type clusterArgs struct { // A List of one or more features which should be enabled, such as `DnsService`. AddOnFeatures []string `pulumi:"addOnFeatures"` // An `azureActiveDirectory` block as defined below. AzureActiveDirectory *ClusterAzureActiveDirectory `pulumi:"azureActiveDirectory"` // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. Certificate *ClusterCertificate `pulumi:"certificate"` // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. CertificateCommonNames *ClusterCertificateCommonNames `pulumi:"certificateCommonNames"` // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. ClientCertificateCommonNames []ClusterClientCertificateCommonName `pulumi:"clientCertificateCommonNames"` // One or more `clientCertificateThumbprint` blocks as defined below. ClientCertificateThumbprints []ClusterClientCertificateThumbprint `pulumi:"clientCertificateThumbprints"` // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. ClusterCodeVersion *string `pulumi:"clusterCodeVersion"` // A `diagnosticsConfig` block as defined below. DiagnosticsConfig *ClusterDiagnosticsConfig `pulumi:"diagnosticsConfig"` // One or more `fabricSettings` blocks as defined below. FabricSettings []ClusterFabricSetting `pulumi:"fabricSettings"` // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. ManagementEndpoint string `pulumi:"managementEndpoint"` // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes []ClusterNodeType `pulumi:"nodeTypes"` // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. ReliabilityLevel string `pulumi:"reliabilityLevel"` // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. ReverseProxyCertificate *ClusterReverseProxyCertificate `pulumi:"reverseProxyCertificate"` // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. ReverseProxyCertificateCommonNames *ClusterReverseProxyCertificateCommonNames `pulumi:"reverseProxyCertificateCommonNames"` // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. ServiceFabricZonalUpgradeMode *string `pulumi:"serviceFabricZonalUpgradeMode"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the Upgrade Mode of the cluster. Possible values are `Automatic` or `Manual`. UpgradeMode string `pulumi:"upgradeMode"` // A `upgradePolicy` block as defined below. UpgradePolicy *ClusterUpgradePolicy `pulumi:"upgradePolicy"` // Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. VmImage string `pulumi:"vmImage"` // Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. VmssZonalUpgradeMode *string `pulumi:"vmssZonalUpgradeMode"` } // The set of arguments for constructing a Cluster resource. type ClusterArgs struct { // A List of one or more features which should be enabled, such as `DnsService`. AddOnFeatures pulumi.StringArrayInput // An `azureActiveDirectory` block as defined below. AzureActiveDirectory ClusterAzureActiveDirectoryPtrInput // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. Certificate ClusterCertificatePtrInput // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. CertificateCommonNames ClusterCertificateCommonNamesPtrInput // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. ClientCertificateCommonNames ClusterClientCertificateCommonNameArrayInput // One or more `clientCertificateThumbprint` blocks as defined below. ClientCertificateThumbprints ClusterClientCertificateThumbprintArrayInput // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. ClusterCodeVersion pulumi.StringPtrInput // A `diagnosticsConfig` block as defined below. DiagnosticsConfig ClusterDiagnosticsConfigPtrInput // One or more `fabricSettings` blocks as defined below. FabricSettings ClusterFabricSettingArrayInput // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. ManagementEndpoint pulumi.StringInput // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `nodeType` blocks as defined below. NodeTypes ClusterNodeTypeArrayInput // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. ReliabilityLevel pulumi.StringInput // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. ReverseProxyCertificate ClusterReverseProxyCertificatePtrInput // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. ReverseProxyCertificateCommonNames ClusterReverseProxyCertificateCommonNamesPtrInput // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. ServiceFabricZonalUpgradeMode pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the Upgrade Mode of the cluster. Possible values are `Automatic` or `Manual`. UpgradeMode pulumi.StringInput // A `upgradePolicy` block as defined below. UpgradePolicy ClusterUpgradePolicyPtrInput // Specifies the Image expected for the Service Fabric Cluster, such as `Windows`. Changing this forces a new resource to be created. VmImage pulumi.StringInput // Specifies the upgrade mode for the virtual machine scale set updates that happen in all availability zones at once. Possible values are `Hierarchical` or `Parallel`. VmssZonalUpgradeMode pulumi.StringPtrInput } 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 } // A List of one or more features which should be enabled, such as `DnsService`. func (o ClusterOutput) AddOnFeatures() pulumi.StringArrayOutput { return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.AddOnFeatures }).(pulumi.StringArrayOutput) } // An `azureActiveDirectory` block as defined below. func (o ClusterOutput) AzureActiveDirectory() ClusterAzureActiveDirectoryPtrOutput { return o.ApplyT(func(v *Cluster) ClusterAzureActiveDirectoryPtrOutput { return v.AzureActiveDirectory }).(ClusterAzureActiveDirectoryPtrOutput) } // A `certificate` block as defined below. Conflicts with `certificateCommonNames`. func (o ClusterOutput) Certificate() ClusterCertificatePtrOutput { return o.ApplyT(func(v *Cluster) ClusterCertificatePtrOutput { return v.Certificate }).(ClusterCertificatePtrOutput) } // A `certificateCommonNames` block as defined below. Conflicts with `certificate`. func (o ClusterOutput) CertificateCommonNames() ClusterCertificateCommonNamesPtrOutput { return o.ApplyT(func(v *Cluster) ClusterCertificateCommonNamesPtrOutput { return v.CertificateCommonNames }).(ClusterCertificateCommonNamesPtrOutput) } // A `clientCertificateCommonName` block as defined below. // // > **Note:** If Client Certificates are enabled then at a Certificate must be configured on the cluster. func (o ClusterOutput) ClientCertificateCommonNames() ClusterClientCertificateCommonNameArrayOutput { return o.ApplyT(func(v *Cluster) ClusterClientCertificateCommonNameArrayOutput { return v.ClientCertificateCommonNames }).(ClusterClientCertificateCommonNameArrayOutput) } // One or more `clientCertificateThumbprint` blocks as defined below. func (o ClusterOutput) ClientCertificateThumbprints() ClusterClientCertificateThumbprintArrayOutput { return o.ApplyT(func(v *Cluster) ClusterClientCertificateThumbprintArrayOutput { return v.ClientCertificateThumbprints }).(ClusterClientCertificateThumbprintArrayOutput) } // Required if Upgrade Mode set to `Manual`, Specifies the Version of the Cluster Code of the cluster. func (o ClusterOutput) ClusterCodeVersion() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterCodeVersion }).(pulumi.StringOutput) } // The Cluster Endpoint for this Service Fabric Cluster. func (o ClusterOutput) ClusterEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterEndpoint }).(pulumi.StringOutput) } // A `diagnosticsConfig` block as defined below. func (o ClusterOutput) DiagnosticsConfig() ClusterDiagnosticsConfigPtrOutput { return o.ApplyT(func(v *Cluster) ClusterDiagnosticsConfigPtrOutput { return v.DiagnosticsConfig }).(ClusterDiagnosticsConfigPtrOutput) } // One or more `fabricSettings` blocks as defined below. func (o ClusterOutput) FabricSettings() ClusterFabricSettingArrayOutput { return o.ApplyT(func(v *Cluster) ClusterFabricSettingArrayOutput { return v.FabricSettings }).(ClusterFabricSettingArrayOutput) } // Specifies the Azure Region where the Service Fabric Cluster should exist. Changing this forces a new resource to be created. func (o ClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the Management Endpoint of the cluster such as `http://example.com`. Changing this forces a new resource to be created. func (o ClusterOutput) ManagementEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ManagementEndpoint }).(pulumi.StringOutput) } // The name of the Service Fabric Cluster. Changing this forces a new resource to be created. func (o ClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `nodeType` blocks as defined below. func (o ClusterOutput) NodeTypes() ClusterNodeTypeArrayOutput { return o.ApplyT(func(v *Cluster) ClusterNodeTypeArrayOutput { return v.NodeTypes }).(ClusterNodeTypeArrayOutput) } // Specifies the Reliability Level of the Cluster. Possible values include `None`, `Bronze`, `Silver`, `Gold` and `Platinum`. // // > **Note:** The Reliability Level of the Cluster depends on the number of nodes in the Cluster: `Platinum` requires at least 9 VM's, `Gold` requires at least 7 VM's, `Silver` requires at least 5 VM's, `Bronze` requires at least 3 VM's. func (o ClusterOutput) ReliabilityLevel() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ReliabilityLevel }).(pulumi.StringOutput) } // The name of the Resource Group in which the Service Fabric Cluster exists. Changing this forces a new resource to be created. func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `reverseProxyCertificate` block as defined below. Conflicts with `reverseProxyCertificateCommonNames`. func (o ClusterOutput) ReverseProxyCertificate() ClusterReverseProxyCertificatePtrOutput { return o.ApplyT(func(v *Cluster) ClusterReverseProxyCertificatePtrOutput { return v.ReverseProxyCertificate }).(ClusterReverseProxyCertificatePtrOutput) } // A `reverseProxyCertificateCommonNames` block as defined below. Conflicts with `reverseProxyCertificate`. func (o ClusterOutput) ReverseProxyCertificateCommonNames() ClusterReverseProxyCertificateCommonNamesPtrOutput { return o.ApplyT(func(v *Cluster) ClusterReverseProxyCertificateCommonNamesPtrOutput { return v.ReverseProxyCertificateCommonNames }).(ClusterReverseProxyCertificateCommonNamesPtrOutput) } // Specifies the logical grouping of VMs in upgrade domains. Possible values are `Hierarchical` or `Parallel`. func (o ClusterOutput) ServiceFabricZonalUpgradeMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.ServiceFabricZonalUpgradeMode }).(pulumi.StringPtrOutput) }
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/servicefabric/managedCluster.go
sdk/go/azure/servicefabric/managedCluster.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 servicefabric import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Resource Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicefabric" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := servicefabric.NewManagedCluster(ctx, "example", &servicefabric.ManagedClusterArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example"), // Location: pulumi.String("West Europe"), // HttpGatewayPort: pulumi.Int(4567), // LbRules: servicefabric.ManagedClusterLbRuleArray{ // &servicefabric.ManagedClusterLbRuleArgs{ // BackendPort: pulumi.Int(38080), // FrontendPort: pulumi.Int(80), // ProbeProtocol: pulumi.String("http"), // ProbeRequestPath: pulumi.String("/test"), // Protocol: pulumi.String("tcp"), // }, // }, // ClientConnectionPort: pulumi.Int(12345), // NodeTypes: servicefabric.ManagedClusterNodeTypeArray{ // &servicefabric.ManagedClusterNodeTypeArgs{ // DataDiskSizeGb: pulumi.Int(130), // Name: pulumi.String("test1"), // Primary: pulumi.Bool(true), // ApplicationPortRange: pulumi.String("30000-49000"), // EphemeralPortRange: pulumi.String("10000-20000"), // VmSize: pulumi.String("Standard_DS1_v2"), // VmImagePublisher: pulumi.String("MicrosoftWindowsServer"), // VmImageSku: pulumi.String("2019-Datacenter-with-Containers"), // VmImageOffer: pulumi.String("WindowsServer"), // VmImageVersion: pulumi.String("latest"), // VmInstanceCount: pulumi.Int(5), // }, // }, // }) // 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.ServiceFabric` - 2024-04-01 // // ## Import // // Resource Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:servicefabric/managedCluster:ManagedCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ServiceFabric/managedClusters/clusterName1 // ``` type ManagedCluster struct { pulumi.CustomResourceState // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. Authentication ManagedClusterAuthenticationPtrOutput `pulumi:"authentication"` // If true, backup service is enabled. BackupServiceEnabled pulumi.BoolPtrOutput `pulumi:"backupServiceEnabled"` // Port to use when connecting to the cluster. ClientConnectionPort pulumi.IntOutput `pulumi:"clientConnectionPort"` // One or more `customFabricSetting` blocks as defined below. CustomFabricSettings ManagedClusterCustomFabricSettingArrayOutput `pulumi:"customFabricSettings"` // Hostname for the cluster. If unset the cluster's name will be used.. DnsName pulumi.StringOutput `pulumi:"dnsName"` // If true, DNS service is enabled. DnsServiceEnabled pulumi.BoolPtrOutput `pulumi:"dnsServiceEnabled"` // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. HttpGatewayPort pulumi.IntOutput `pulumi:"httpGatewayPort"` // One or more `lbRule` blocks as defined below. LbRules ManagedClusterLbRuleArrayOutput `pulumi:"lbRules"` // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes ManagedClusterNodeTypeArrayOutput `pulumi:"nodeTypes"` // Administrator password for the VMs that will be created as part of this cluster. Password pulumi.StringPtrOutput `pulumi:"password"` // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. Sku pulumi.StringPtrOutput `pulumi:"sku"` // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapOutput `pulumi:"tags"` // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. UpgradeWave pulumi.StringPtrOutput `pulumi:"upgradeWave"` // Administrator password for the VMs that will be created as part of this cluster. Username pulumi.StringPtrOutput `pulumi:"username"` } // NewManagedCluster registers a new resource with the given unique name, arguments, and options. func NewManagedCluster(ctx *pulumi.Context, name string, args *ManagedClusterArgs, opts ...pulumi.ResourceOption) (*ManagedCluster, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClientConnectionPort == nil { return nil, errors.New("invalid value for required argument 'ClientConnectionPort'") } if args.HttpGatewayPort == nil { return nil, errors.New("invalid value for required argument 'HttpGatewayPort'") } if args.LbRules == nil { return nil, errors.New("invalid value for required argument 'LbRules'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Password != nil { args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "password", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedCluster err := ctx.RegisterResource("azure:servicefabric/managedCluster:ManagedCluster", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedCluster gets an existing ManagedCluster 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 GetManagedCluster(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedClusterState, opts ...pulumi.ResourceOption) (*ManagedCluster, error) { var resource ManagedCluster err := ctx.ReadResource("azure:servicefabric/managedCluster:ManagedCluster", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedCluster resources. type managedClusterState struct { // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. Authentication *ManagedClusterAuthentication `pulumi:"authentication"` // If true, backup service is enabled. BackupServiceEnabled *bool `pulumi:"backupServiceEnabled"` // Port to use when connecting to the cluster. ClientConnectionPort *int `pulumi:"clientConnectionPort"` // One or more `customFabricSetting` blocks as defined below. CustomFabricSettings []ManagedClusterCustomFabricSetting `pulumi:"customFabricSettings"` // Hostname for the cluster. If unset the cluster's name will be used.. DnsName *string `pulumi:"dnsName"` // If true, DNS service is enabled. DnsServiceEnabled *bool `pulumi:"dnsServiceEnabled"` // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. HttpGatewayPort *int `pulumi:"httpGatewayPort"` // One or more `lbRule` blocks as defined below. LbRules []ManagedClusterLbRule `pulumi:"lbRules"` // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location *string `pulumi:"location"` // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name *string `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes []ManagedClusterNodeType `pulumi:"nodeTypes"` // Administrator password for the VMs that will be created as part of this cluster. Password *string `pulumi:"password"` // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. Sku *string `pulumi:"sku"` // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Resource Group. Tags map[string]string `pulumi:"tags"` // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. UpgradeWave *string `pulumi:"upgradeWave"` // Administrator password for the VMs that will be created as part of this cluster. Username *string `pulumi:"username"` } type ManagedClusterState struct { // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. Authentication ManagedClusterAuthenticationPtrInput // If true, backup service is enabled. BackupServiceEnabled pulumi.BoolPtrInput // Port to use when connecting to the cluster. ClientConnectionPort pulumi.IntPtrInput // One or more `customFabricSetting` blocks as defined below. CustomFabricSettings ManagedClusterCustomFabricSettingArrayInput // Hostname for the cluster. If unset the cluster's name will be used.. DnsName pulumi.StringPtrInput // If true, DNS service is enabled. DnsServiceEnabled pulumi.BoolPtrInput // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. HttpGatewayPort pulumi.IntPtrInput // One or more `lbRule` blocks as defined below. LbRules ManagedClusterLbRuleArrayInput // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringPtrInput // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringPtrInput // One or more `nodeType` blocks as defined below. NodeTypes ManagedClusterNodeTypeArrayInput // Administrator password for the VMs that will be created as part of this cluster. Password pulumi.StringPtrInput // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. ResourceGroupName pulumi.StringPtrInput // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. Sku pulumi.StringPtrInput // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. SubnetId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapInput // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. UpgradeWave pulumi.StringPtrInput // Administrator password for the VMs that will be created as part of this cluster. Username pulumi.StringPtrInput } func (ManagedClusterState) ElementType() reflect.Type { return reflect.TypeOf((*managedClusterState)(nil)).Elem() } type managedClusterArgs struct { // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. Authentication *ManagedClusterAuthentication `pulumi:"authentication"` // If true, backup service is enabled. BackupServiceEnabled *bool `pulumi:"backupServiceEnabled"` // Port to use when connecting to the cluster. ClientConnectionPort int `pulumi:"clientConnectionPort"` // One or more `customFabricSetting` blocks as defined below. CustomFabricSettings []ManagedClusterCustomFabricSetting `pulumi:"customFabricSettings"` // Hostname for the cluster. If unset the cluster's name will be used.. DnsName *string `pulumi:"dnsName"` // If true, DNS service is enabled. DnsServiceEnabled *bool `pulumi:"dnsServiceEnabled"` // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. HttpGatewayPort int `pulumi:"httpGatewayPort"` // One or more `lbRule` blocks as defined below. LbRules []ManagedClusterLbRule `pulumi:"lbRules"` // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location *string `pulumi:"location"` // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name *string `pulumi:"name"` // One or more `nodeType` blocks as defined below. NodeTypes []ManagedClusterNodeType `pulumi:"nodeTypes"` // Administrator password for the VMs that will be created as part of this cluster. Password *string `pulumi:"password"` // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. Sku *string `pulumi:"sku"` // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Resource Group. Tags map[string]string `pulumi:"tags"` // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. UpgradeWave *string `pulumi:"upgradeWave"` // Administrator password for the VMs that will be created as part of this cluster. Username *string `pulumi:"username"` } // The set of arguments for constructing a ManagedCluster resource. type ManagedClusterArgs struct { // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. Authentication ManagedClusterAuthenticationPtrInput // If true, backup service is enabled. BackupServiceEnabled pulumi.BoolPtrInput // Port to use when connecting to the cluster. ClientConnectionPort pulumi.IntInput // One or more `customFabricSetting` blocks as defined below. CustomFabricSettings ManagedClusterCustomFabricSettingArrayInput // Hostname for the cluster. If unset the cluster's name will be used.. DnsName pulumi.StringPtrInput // If true, DNS service is enabled. DnsServiceEnabled pulumi.BoolPtrInput // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. HttpGatewayPort pulumi.IntInput // One or more `lbRule` blocks as defined below. LbRules ManagedClusterLbRuleArrayInput // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. Location pulumi.StringPtrInput // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. Name pulumi.StringPtrInput // One or more `nodeType` blocks as defined below. NodeTypes ManagedClusterNodeTypeArrayInput // Administrator password for the VMs that will be created as part of this cluster. Password pulumi.StringPtrInput // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. ResourceGroupName pulumi.StringInput // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. Sku pulumi.StringPtrInput // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. SubnetId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Resource Group. Tags pulumi.StringMapInput // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. UpgradeWave pulumi.StringPtrInput // Administrator password for the VMs that will be created as part of this cluster. Username pulumi.StringPtrInput } func (ManagedClusterArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedClusterArgs)(nil)).Elem() } type ManagedClusterInput interface { pulumi.Input ToManagedClusterOutput() ManagedClusterOutput ToManagedClusterOutputWithContext(ctx context.Context) ManagedClusterOutput } func (*ManagedCluster) ElementType() reflect.Type { return reflect.TypeOf((**ManagedCluster)(nil)).Elem() } func (i *ManagedCluster) ToManagedClusterOutput() ManagedClusterOutput { return i.ToManagedClusterOutputWithContext(context.Background()) } func (i *ManagedCluster) ToManagedClusterOutputWithContext(ctx context.Context) ManagedClusterOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedClusterOutput) } // ManagedClusterArrayInput is an input type that accepts ManagedClusterArray and ManagedClusterArrayOutput values. // You can construct a concrete instance of `ManagedClusterArrayInput` via: // // ManagedClusterArray{ ManagedClusterArgs{...} } type ManagedClusterArrayInput interface { pulumi.Input ToManagedClusterArrayOutput() ManagedClusterArrayOutput ToManagedClusterArrayOutputWithContext(context.Context) ManagedClusterArrayOutput } type ManagedClusterArray []ManagedClusterInput func (ManagedClusterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedCluster)(nil)).Elem() } func (i ManagedClusterArray) ToManagedClusterArrayOutput() ManagedClusterArrayOutput { return i.ToManagedClusterArrayOutputWithContext(context.Background()) } func (i ManagedClusterArray) ToManagedClusterArrayOutputWithContext(ctx context.Context) ManagedClusterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedClusterArrayOutput) } // ManagedClusterMapInput is an input type that accepts ManagedClusterMap and ManagedClusterMapOutput values. // You can construct a concrete instance of `ManagedClusterMapInput` via: // // ManagedClusterMap{ "key": ManagedClusterArgs{...} } type ManagedClusterMapInput interface { pulumi.Input ToManagedClusterMapOutput() ManagedClusterMapOutput ToManagedClusterMapOutputWithContext(context.Context) ManagedClusterMapOutput } type ManagedClusterMap map[string]ManagedClusterInput func (ManagedClusterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedCluster)(nil)).Elem() } func (i ManagedClusterMap) ToManagedClusterMapOutput() ManagedClusterMapOutput { return i.ToManagedClusterMapOutputWithContext(context.Background()) } func (i ManagedClusterMap) ToManagedClusterMapOutputWithContext(ctx context.Context) ManagedClusterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedClusterMapOutput) } type ManagedClusterOutput struct{ *pulumi.OutputState } func (ManagedClusterOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedCluster)(nil)).Elem() } func (o ManagedClusterOutput) ToManagedClusterOutput() ManagedClusterOutput { return o } func (o ManagedClusterOutput) ToManagedClusterOutputWithContext(ctx context.Context) ManagedClusterOutput { return o } // Controls how connections to the cluster are authenticated. A `authentication` block as defined below. func (o ManagedClusterOutput) Authentication() ManagedClusterAuthenticationPtrOutput { return o.ApplyT(func(v *ManagedCluster) ManagedClusterAuthenticationPtrOutput { return v.Authentication }).(ManagedClusterAuthenticationPtrOutput) } // If true, backup service is enabled. func (o ManagedClusterOutput) BackupServiceEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.BoolPtrOutput { return v.BackupServiceEnabled }).(pulumi.BoolPtrOutput) } // Port to use when connecting to the cluster. func (o ManagedClusterOutput) ClientConnectionPort() pulumi.IntOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.IntOutput { return v.ClientConnectionPort }).(pulumi.IntOutput) } // One or more `customFabricSetting` blocks as defined below. func (o ManagedClusterOutput) CustomFabricSettings() ManagedClusterCustomFabricSettingArrayOutput { return o.ApplyT(func(v *ManagedCluster) ManagedClusterCustomFabricSettingArrayOutput { return v.CustomFabricSettings }).(ManagedClusterCustomFabricSettingArrayOutput) } // Hostname for the cluster. If unset the cluster's name will be used.. func (o ManagedClusterOutput) DnsName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput) } // If true, DNS service is enabled. func (o ManagedClusterOutput) DnsServiceEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.BoolPtrOutput { return v.DnsServiceEnabled }).(pulumi.BoolPtrOutput) } // Port that should be used by the Service Fabric Explorer to visualize applications and cluster status. func (o ManagedClusterOutput) HttpGatewayPort() pulumi.IntOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.IntOutput { return v.HttpGatewayPort }).(pulumi.IntOutput) } // One or more `lbRule` blocks as defined below. func (o ManagedClusterOutput) LbRules() ManagedClusterLbRuleArrayOutput { return o.ApplyT(func(v *ManagedCluster) ManagedClusterLbRuleArrayOutput { return v.LbRules }).(ManagedClusterLbRuleArrayOutput) } // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. func (o ManagedClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created. func (o ManagedClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `nodeType` blocks as defined below. func (o ManagedClusterOutput) NodeTypes() ManagedClusterNodeTypeArrayOutput { return o.ApplyT(func(v *ManagedCluster) ManagedClusterNodeTypeArrayOutput { return v.NodeTypes }).(ManagedClusterNodeTypeArrayOutput) } // Administrator password for the VMs that will be created as part of this cluster. func (o ManagedClusterOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Resource Group should exist. Changing this forces a new Resource Group to be created. func (o ManagedClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // SKU for this cluster. Changing this forces a new resource to be created. Default is `Basic`, allowed values are either `Basic` or `Standard`. func (o ManagedClusterOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // The resource ID of the Subnet. Changing this forces a new Resource Group to be created. func (o ManagedClusterOutput) SubnetId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringPtrOutput { return v.SubnetId }).(pulumi.StringPtrOutput) } // A mapping of tags which should be assigned to the Resource Group. func (o ManagedClusterOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Upgrade wave for the fabric runtime. Default is `Wave0`, allowed value must be one of `Wave0`, `Wave1`, or `Wave2`. func (o ManagedClusterOutput) UpgradeWave() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringPtrOutput { return v.UpgradeWave }).(pulumi.StringPtrOutput) } // Administrator password for the VMs that will be created as part of this cluster. func (o ManagedClusterOutput) Username() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedCluster) pulumi.StringPtrOutput { return v.Username }).(pulumi.StringPtrOutput) } type ManagedClusterArrayOutput struct{ *pulumi.OutputState } func (ManagedClusterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedCluster)(nil)).Elem() } func (o ManagedClusterArrayOutput) ToManagedClusterArrayOutput() ManagedClusterArrayOutput { return o } func (o ManagedClusterArrayOutput) ToManagedClusterArrayOutputWithContext(ctx context.Context) ManagedClusterArrayOutput { return o } func (o ManagedClusterArrayOutput) Index(i pulumi.IntInput) ManagedClusterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedCluster { return vs[0].([]*ManagedCluster)[vs[1].(int)] }).(ManagedClusterOutput) } type ManagedClusterMapOutput struct{ *pulumi.OutputState } func (ManagedClusterMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedCluster)(nil)).Elem() } func (o ManagedClusterMapOutput) ToManagedClusterMapOutput() ManagedClusterMapOutput { return o } func (o ManagedClusterMapOutput) ToManagedClusterMapOutputWithContext(ctx context.Context) ManagedClusterMapOutput { return o } func (o ManagedClusterMapOutput) MapIndex(k pulumi.StringInput) ManagedClusterOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedCluster { return vs[0].(map[string]*ManagedCluster)[vs[1].(string)] }).(ManagedClusterOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManagedClusterInput)(nil)).Elem(), &ManagedCluster{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedClusterArrayInput)(nil)).Elem(), ManagedClusterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManagedClusterMapInput)(nil)).Elem(), ManagedClusterMap{}) pulumi.RegisterOutputType(ManagedClusterOutput{}) pulumi.RegisterOutputType(ManagedClusterArrayOutput{}) pulumi.RegisterOutputType(ManagedClusterMapOutput{}) }
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/kusto/init.go
sdk/go/azure/kusto/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 kusto 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:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration": r = &AttachedDatabaseConfiguration{} case "azure:kusto/cluster:Cluster": r = &Cluster{} case "azure:kusto/clusterCustomerManagedKey:ClusterCustomerManagedKey": r = &ClusterCustomerManagedKey{} case "azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint": r = &ClusterManagedPrivateEndpoint{} case "azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment": r = &ClusterPrincipalAssignment{} case "azure:kusto/cosmosdbDataConnection:CosmosdbDataConnection": r = &CosmosdbDataConnection{} case "azure:kusto/database:Database": r = &Database{} case "azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment": r = &DatabasePrincipalAssignment{} case "azure:kusto/eventGridDataConnection:EventGridDataConnection": r = &EventGridDataConnection{} case "azure:kusto/eventhubDataConnection:EventhubDataConnection": r = &EventhubDataConnection{} case "azure:kusto/iotHubDataConnection:IotHubDataConnection": r = &IotHubDataConnection{} case "azure:kusto/script:Script": r = &Script{} 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", "kusto/attachedDatabaseConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/cluster", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/clusterCustomerManagedKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/clusterManagedPrivateEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/clusterPrincipalAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/cosmosdbDataConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/database", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/databasePrincipalAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/eventGridDataConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/eventhubDataConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/iotHubDataConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "kusto/script", &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/kusto/pulumiTypes.go
sdk/go/azure/kusto/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 kusto 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 AttachedDatabaseConfigurationSharing struct { // List of external tables exclude from the follower database. ExternalTablesToExcludes []string `pulumi:"externalTablesToExcludes"` // List of external tables to include in the follower database. ExternalTablesToIncludes []string `pulumi:"externalTablesToIncludes"` // List of materialized views exclude from the follower database. MaterializedViewsToExcludes []string `pulumi:"materializedViewsToExcludes"` // List of materialized views to include in the follower database. MaterializedViewsToIncludes []string `pulumi:"materializedViewsToIncludes"` // List of tables to exclude from the follower database. TablesToExcludes []string `pulumi:"tablesToExcludes"` // List of tables to include in the follower database. TablesToIncludes []string `pulumi:"tablesToIncludes"` } // AttachedDatabaseConfigurationSharingInput is an input type that accepts AttachedDatabaseConfigurationSharingArgs and AttachedDatabaseConfigurationSharingOutput values. // You can construct a concrete instance of `AttachedDatabaseConfigurationSharingInput` via: // // AttachedDatabaseConfigurationSharingArgs{...} type AttachedDatabaseConfigurationSharingInput interface { pulumi.Input ToAttachedDatabaseConfigurationSharingOutput() AttachedDatabaseConfigurationSharingOutput ToAttachedDatabaseConfigurationSharingOutputWithContext(context.Context) AttachedDatabaseConfigurationSharingOutput } type AttachedDatabaseConfigurationSharingArgs struct { // List of external tables exclude from the follower database. ExternalTablesToExcludes pulumi.StringArrayInput `pulumi:"externalTablesToExcludes"` // List of external tables to include in the follower database. ExternalTablesToIncludes pulumi.StringArrayInput `pulumi:"externalTablesToIncludes"` // List of materialized views exclude from the follower database. MaterializedViewsToExcludes pulumi.StringArrayInput `pulumi:"materializedViewsToExcludes"` // List of materialized views to include in the follower database. MaterializedViewsToIncludes pulumi.StringArrayInput `pulumi:"materializedViewsToIncludes"` // List of tables to exclude from the follower database. TablesToExcludes pulumi.StringArrayInput `pulumi:"tablesToExcludes"` // List of tables to include in the follower database. TablesToIncludes pulumi.StringArrayInput `pulumi:"tablesToIncludes"` } func (AttachedDatabaseConfigurationSharingArgs) ElementType() reflect.Type { return reflect.TypeOf((*AttachedDatabaseConfigurationSharing)(nil)).Elem() } func (i AttachedDatabaseConfigurationSharingArgs) ToAttachedDatabaseConfigurationSharingOutput() AttachedDatabaseConfigurationSharingOutput { return i.ToAttachedDatabaseConfigurationSharingOutputWithContext(context.Background()) } func (i AttachedDatabaseConfigurationSharingArgs) ToAttachedDatabaseConfigurationSharingOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationSharingOutput) } func (i AttachedDatabaseConfigurationSharingArgs) ToAttachedDatabaseConfigurationSharingPtrOutput() AttachedDatabaseConfigurationSharingPtrOutput { return i.ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(context.Background()) } func (i AttachedDatabaseConfigurationSharingArgs) ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationSharingOutput).ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(ctx) } // AttachedDatabaseConfigurationSharingPtrInput is an input type that accepts AttachedDatabaseConfigurationSharingArgs, AttachedDatabaseConfigurationSharingPtr and AttachedDatabaseConfigurationSharingPtrOutput values. // You can construct a concrete instance of `AttachedDatabaseConfigurationSharingPtrInput` via: // // AttachedDatabaseConfigurationSharingArgs{...} // // or: // // nil type AttachedDatabaseConfigurationSharingPtrInput interface { pulumi.Input ToAttachedDatabaseConfigurationSharingPtrOutput() AttachedDatabaseConfigurationSharingPtrOutput ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(context.Context) AttachedDatabaseConfigurationSharingPtrOutput } type attachedDatabaseConfigurationSharingPtrType AttachedDatabaseConfigurationSharingArgs func AttachedDatabaseConfigurationSharingPtr(v *AttachedDatabaseConfigurationSharingArgs) AttachedDatabaseConfigurationSharingPtrInput { return (*attachedDatabaseConfigurationSharingPtrType)(v) } func (*attachedDatabaseConfigurationSharingPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AttachedDatabaseConfigurationSharing)(nil)).Elem() } func (i *attachedDatabaseConfigurationSharingPtrType) ToAttachedDatabaseConfigurationSharingPtrOutput() AttachedDatabaseConfigurationSharingPtrOutput { return i.ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(context.Background()) } func (i *attachedDatabaseConfigurationSharingPtrType) ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationSharingPtrOutput) } type AttachedDatabaseConfigurationSharingOutput struct{ *pulumi.OutputState } func (AttachedDatabaseConfigurationSharingOutput) ElementType() reflect.Type { return reflect.TypeOf((*AttachedDatabaseConfigurationSharing)(nil)).Elem() } func (o AttachedDatabaseConfigurationSharingOutput) ToAttachedDatabaseConfigurationSharingOutput() AttachedDatabaseConfigurationSharingOutput { return o } func (o AttachedDatabaseConfigurationSharingOutput) ToAttachedDatabaseConfigurationSharingOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingOutput { return o } func (o AttachedDatabaseConfigurationSharingOutput) ToAttachedDatabaseConfigurationSharingPtrOutput() AttachedDatabaseConfigurationSharingPtrOutput { return o.ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(context.Background()) } func (o AttachedDatabaseConfigurationSharingOutput) ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AttachedDatabaseConfigurationSharing) *AttachedDatabaseConfigurationSharing { return &v }).(AttachedDatabaseConfigurationSharingPtrOutput) } // List of external tables exclude from the follower database. func (o AttachedDatabaseConfigurationSharingOutput) ExternalTablesToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.ExternalTablesToExcludes }).(pulumi.StringArrayOutput) } // List of external tables to include in the follower database. func (o AttachedDatabaseConfigurationSharingOutput) ExternalTablesToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.ExternalTablesToIncludes }).(pulumi.StringArrayOutput) } // List of materialized views exclude from the follower database. func (o AttachedDatabaseConfigurationSharingOutput) MaterializedViewsToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.MaterializedViewsToExcludes }).(pulumi.StringArrayOutput) } // List of materialized views to include in the follower database. func (o AttachedDatabaseConfigurationSharingOutput) MaterializedViewsToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.MaterializedViewsToIncludes }).(pulumi.StringArrayOutput) } // List of tables to exclude from the follower database. func (o AttachedDatabaseConfigurationSharingOutput) TablesToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.TablesToExcludes }).(pulumi.StringArrayOutput) } // List of tables to include in the follower database. func (o AttachedDatabaseConfigurationSharingOutput) TablesToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v AttachedDatabaseConfigurationSharing) []string { return v.TablesToIncludes }).(pulumi.StringArrayOutput) } type AttachedDatabaseConfigurationSharingPtrOutput struct{ *pulumi.OutputState } func (AttachedDatabaseConfigurationSharingPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AttachedDatabaseConfigurationSharing)(nil)).Elem() } func (o AttachedDatabaseConfigurationSharingPtrOutput) ToAttachedDatabaseConfigurationSharingPtrOutput() AttachedDatabaseConfigurationSharingPtrOutput { return o } func (o AttachedDatabaseConfigurationSharingPtrOutput) ToAttachedDatabaseConfigurationSharingPtrOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationSharingPtrOutput { return o } func (o AttachedDatabaseConfigurationSharingPtrOutput) Elem() AttachedDatabaseConfigurationSharingOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) AttachedDatabaseConfigurationSharing { if v != nil { return *v } var ret AttachedDatabaseConfigurationSharing return ret }).(AttachedDatabaseConfigurationSharingOutput) } // List of external tables exclude from the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) ExternalTablesToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.ExternalTablesToExcludes }).(pulumi.StringArrayOutput) } // List of external tables to include in the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) ExternalTablesToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.ExternalTablesToIncludes }).(pulumi.StringArrayOutput) } // List of materialized views exclude from the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) MaterializedViewsToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.MaterializedViewsToExcludes }).(pulumi.StringArrayOutput) } // List of materialized views to include in the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) MaterializedViewsToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.MaterializedViewsToIncludes }).(pulumi.StringArrayOutput) } // List of tables to exclude from the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) TablesToExcludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.TablesToExcludes }).(pulumi.StringArrayOutput) } // List of tables to include in the follower database. func (o AttachedDatabaseConfigurationSharingPtrOutput) TablesToIncludes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfigurationSharing) []string { if v == nil { return nil } return v.TablesToIncludes }).(pulumi.StringArrayOutput) } type ClusterIdentity struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kusto Cluster. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with this System Assigned Managed Service Identity. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this System Assigned Managed Service Identity. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that is configured on this Kusto Cluster. Possible values are: `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. 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 { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kusto Cluster. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with this System Assigned Managed Service Identity. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this System Assigned Managed Service Identity. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that is configured on this Kusto Cluster. Possible values are: `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. 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) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kusto Cluster. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, 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 System Assigned 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 System Assigned 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 is configured on this Kusto Cluster. Possible values are: `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. 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) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kusto Cluster. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, 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 System Assigned 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 System Assigned 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 is configured on this Kusto Cluster. Possible values are: `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`. func (o ClusterIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type ClusterLanguageExtension struct { // The language extension image. Possible values are `Python3_11_7`, `Python3_11_7_DL`, `Python3_10_8`, `Python3_10_8_DL`, `Python3_6_5`, `PythonCustomImage`, and `R`. Image string `pulumi:"image"` // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name string `pulumi:"name"` } // ClusterLanguageExtensionInput is an input type that accepts ClusterLanguageExtensionArgs and ClusterLanguageExtensionOutput values. // You can construct a concrete instance of `ClusterLanguageExtensionInput` via: // // ClusterLanguageExtensionArgs{...} type ClusterLanguageExtensionInput interface { pulumi.Input ToClusterLanguageExtensionOutput() ClusterLanguageExtensionOutput ToClusterLanguageExtensionOutputWithContext(context.Context) ClusterLanguageExtensionOutput } type ClusterLanguageExtensionArgs struct { // The language extension image. Possible values are `Python3_11_7`, `Python3_11_7_DL`, `Python3_10_8`, `Python3_10_8_DL`, `Python3_6_5`, `PythonCustomImage`, and `R`. Image pulumi.StringInput `pulumi:"image"` // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name pulumi.StringInput `pulumi:"name"` } func (ClusterLanguageExtensionArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterLanguageExtension)(nil)).Elem() } func (i ClusterLanguageExtensionArgs) ToClusterLanguageExtensionOutput() ClusterLanguageExtensionOutput { return i.ToClusterLanguageExtensionOutputWithContext(context.Background()) } func (i ClusterLanguageExtensionArgs) ToClusterLanguageExtensionOutputWithContext(ctx context.Context) ClusterLanguageExtensionOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterLanguageExtensionOutput) } // ClusterLanguageExtensionArrayInput is an input type that accepts ClusterLanguageExtensionArray and ClusterLanguageExtensionArrayOutput values. // You can construct a concrete instance of `ClusterLanguageExtensionArrayInput` via: // // ClusterLanguageExtensionArray{ ClusterLanguageExtensionArgs{...} } type ClusterLanguageExtensionArrayInput interface { pulumi.Input ToClusterLanguageExtensionArrayOutput() ClusterLanguageExtensionArrayOutput ToClusterLanguageExtensionArrayOutputWithContext(context.Context) ClusterLanguageExtensionArrayOutput } type ClusterLanguageExtensionArray []ClusterLanguageExtensionInput func (ClusterLanguageExtensionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ClusterLanguageExtension)(nil)).Elem() } func (i ClusterLanguageExtensionArray) ToClusterLanguageExtensionArrayOutput() ClusterLanguageExtensionArrayOutput { return i.ToClusterLanguageExtensionArrayOutputWithContext(context.Background()) } func (i ClusterLanguageExtensionArray) ToClusterLanguageExtensionArrayOutputWithContext(ctx context.Context) ClusterLanguageExtensionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterLanguageExtensionArrayOutput) } type ClusterLanguageExtensionOutput struct{ *pulumi.OutputState } func (ClusterLanguageExtensionOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterLanguageExtension)(nil)).Elem() } func (o ClusterLanguageExtensionOutput) ToClusterLanguageExtensionOutput() ClusterLanguageExtensionOutput { return o } func (o ClusterLanguageExtensionOutput) ToClusterLanguageExtensionOutputWithContext(ctx context.Context) ClusterLanguageExtensionOutput { return o } // The language extension image. Possible values are `Python3_11_7`, `Python3_11_7_DL`, `Python3_10_8`, `Python3_10_8_DL`, `Python3_6_5`, `PythonCustomImage`, and `R`. func (o ClusterLanguageExtensionOutput) Image() pulumi.StringOutput { return o.ApplyT(func(v ClusterLanguageExtension) string { return v.Image }).(pulumi.StringOutput) } // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. func (o ClusterLanguageExtensionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ClusterLanguageExtension) string { return v.Name }).(pulumi.StringOutput) } type ClusterLanguageExtensionArrayOutput struct{ *pulumi.OutputState } func (ClusterLanguageExtensionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ClusterLanguageExtension)(nil)).Elem() } func (o ClusterLanguageExtensionArrayOutput) ToClusterLanguageExtensionArrayOutput() ClusterLanguageExtensionArrayOutput { return o } func (o ClusterLanguageExtensionArrayOutput) ToClusterLanguageExtensionArrayOutputWithContext(ctx context.Context) ClusterLanguageExtensionArrayOutput { return o } func (o ClusterLanguageExtensionArrayOutput) Index(i pulumi.IntInput) ClusterLanguageExtensionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ClusterLanguageExtension { return vs[0].([]ClusterLanguageExtension)[vs[1].(int)] }).(ClusterLanguageExtensionOutput) } type ClusterOptimizedAutoScale struct { // The maximum number of allowed instances. Possible values range between `0` and `1000`. MaximumInstances int `pulumi:"maximumInstances"` // The minimum number of allowed instances. Possible values range between `0` and `1000`. MinimumInstances int `pulumi:"minimumInstances"` } // ClusterOptimizedAutoScaleInput is an input type that accepts ClusterOptimizedAutoScaleArgs and ClusterOptimizedAutoScaleOutput values. // You can construct a concrete instance of `ClusterOptimizedAutoScaleInput` via: // // ClusterOptimizedAutoScaleArgs{...} type ClusterOptimizedAutoScaleInput interface { pulumi.Input ToClusterOptimizedAutoScaleOutput() ClusterOptimizedAutoScaleOutput ToClusterOptimizedAutoScaleOutputWithContext(context.Context) ClusterOptimizedAutoScaleOutput } type ClusterOptimizedAutoScaleArgs struct { // The maximum number of allowed instances. Possible values range between `0` and `1000`. MaximumInstances pulumi.IntInput `pulumi:"maximumInstances"` // The minimum number of allowed instances. Possible values range between `0` and `1000`. MinimumInstances pulumi.IntInput `pulumi:"minimumInstances"` } func (ClusterOptimizedAutoScaleArgs) ElementType() reflect.Type { return reflect.TypeOf((*ClusterOptimizedAutoScale)(nil)).Elem() } func (i ClusterOptimizedAutoScaleArgs) ToClusterOptimizedAutoScaleOutput() ClusterOptimizedAutoScaleOutput { return i.ToClusterOptimizedAutoScaleOutputWithContext(context.Background()) } func (i ClusterOptimizedAutoScaleArgs) ToClusterOptimizedAutoScaleOutputWithContext(ctx context.Context) ClusterOptimizedAutoScaleOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterOptimizedAutoScaleOutput) } func (i ClusterOptimizedAutoScaleArgs) ToClusterOptimizedAutoScalePtrOutput() ClusterOptimizedAutoScalePtrOutput { return i.ToClusterOptimizedAutoScalePtrOutputWithContext(context.Background()) } func (i ClusterOptimizedAutoScaleArgs) ToClusterOptimizedAutoScalePtrOutputWithContext(ctx context.Context) ClusterOptimizedAutoScalePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterOptimizedAutoScaleOutput).ToClusterOptimizedAutoScalePtrOutputWithContext(ctx) } // ClusterOptimizedAutoScalePtrInput is an input type that accepts ClusterOptimizedAutoScaleArgs, ClusterOptimizedAutoScalePtr and ClusterOptimizedAutoScalePtrOutput values. // You can construct a concrete instance of `ClusterOptimizedAutoScalePtrInput` via: // // ClusterOptimizedAutoScaleArgs{...} // // or: // // nil type ClusterOptimizedAutoScalePtrInput interface { pulumi.Input ToClusterOptimizedAutoScalePtrOutput() ClusterOptimizedAutoScalePtrOutput ToClusterOptimizedAutoScalePtrOutputWithContext(context.Context) ClusterOptimizedAutoScalePtrOutput } type clusterOptimizedAutoScalePtrType ClusterOptimizedAutoScaleArgs func ClusterOptimizedAutoScalePtr(v *ClusterOptimizedAutoScaleArgs) ClusterOptimizedAutoScalePtrInput { return (*clusterOptimizedAutoScalePtrType)(v) } func (*clusterOptimizedAutoScalePtrType) ElementType() reflect.Type { return reflect.TypeOf((**ClusterOptimizedAutoScale)(nil)).Elem() } func (i *clusterOptimizedAutoScalePtrType) ToClusterOptimizedAutoScalePtrOutput() ClusterOptimizedAutoScalePtrOutput { return i.ToClusterOptimizedAutoScalePtrOutputWithContext(context.Background()) } func (i *clusterOptimizedAutoScalePtrType) ToClusterOptimizedAutoScalePtrOutputWithContext(ctx context.Context) ClusterOptimizedAutoScalePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterOptimizedAutoScalePtrOutput) } type ClusterOptimizedAutoScaleOutput struct{ *pulumi.OutputState } func (ClusterOptimizedAutoScaleOutput) ElementType() reflect.Type { return reflect.TypeOf((*ClusterOptimizedAutoScale)(nil)).Elem() } func (o ClusterOptimizedAutoScaleOutput) ToClusterOptimizedAutoScaleOutput() ClusterOptimizedAutoScaleOutput { return o } func (o ClusterOptimizedAutoScaleOutput) ToClusterOptimizedAutoScaleOutputWithContext(ctx context.Context) ClusterOptimizedAutoScaleOutput { return o } func (o ClusterOptimizedAutoScaleOutput) ToClusterOptimizedAutoScalePtrOutput() ClusterOptimizedAutoScalePtrOutput { return o.ToClusterOptimizedAutoScalePtrOutputWithContext(context.Background()) } func (o ClusterOptimizedAutoScaleOutput) ToClusterOptimizedAutoScalePtrOutputWithContext(ctx context.Context) ClusterOptimizedAutoScalePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterOptimizedAutoScale) *ClusterOptimizedAutoScale { return &v }).(ClusterOptimizedAutoScalePtrOutput) } // The maximum number of allowed instances. Possible values range between `0` and `1000`. func (o ClusterOptimizedAutoScaleOutput) MaximumInstances() pulumi.IntOutput { return o.ApplyT(func(v ClusterOptimizedAutoScale) int { return v.MaximumInstances }).(pulumi.IntOutput) } // The minimum number of allowed instances. Possible values range between `0` and `1000`. func (o ClusterOptimizedAutoScaleOutput) MinimumInstances() pulumi.IntOutput { return o.ApplyT(func(v ClusterOptimizedAutoScale) int { return v.MinimumInstances }).(pulumi.IntOutput) } type ClusterOptimizedAutoScalePtrOutput struct{ *pulumi.OutputState } func (ClusterOptimizedAutoScalePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ClusterOptimizedAutoScale)(nil)).Elem() } func (o ClusterOptimizedAutoScalePtrOutput) ToClusterOptimizedAutoScalePtrOutput() ClusterOptimizedAutoScalePtrOutput { return o } func (o ClusterOptimizedAutoScalePtrOutput) ToClusterOptimizedAutoScalePtrOutputWithContext(ctx context.Context) ClusterOptimizedAutoScalePtrOutput { return o } func (o ClusterOptimizedAutoScalePtrOutput) Elem() ClusterOptimizedAutoScaleOutput { return o.ApplyT(func(v *ClusterOptimizedAutoScale) ClusterOptimizedAutoScale { if v != nil { return *v } var ret ClusterOptimizedAutoScale return ret }).(ClusterOptimizedAutoScaleOutput) } // The maximum number of allowed instances. Possible values range between `0` and `1000`. func (o ClusterOptimizedAutoScalePtrOutput) MaximumInstances() pulumi.IntPtrOutput { return o.ApplyT(func(v *ClusterOptimizedAutoScale) *int { if v == nil { return nil } return &v.MaximumInstances }).(pulumi.IntPtrOutput) } // The minimum number of allowed instances. Possible values range between `0` and `1000`. func (o ClusterOptimizedAutoScalePtrOutput) MinimumInstances() pulumi.IntPtrOutput { return o.ApplyT(func(v *ClusterOptimizedAutoScale) *int { if v == nil { return nil } return &v.MinimumInstances }).(pulumi.IntPtrOutput) } type ClusterSku struct { // Specifies the node count for the cluster. Boundaries depend on the SKU name. // // > **Note:** If no `optimizedAutoScale` block is defined, then the capacity is required. // // > **Note:** If an `optimizedAutoScale` block is defined and no capacity is set, then the capacity is initially set to the value of `minimumInstances`. Capacity *int `pulumi:"capacity"`
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/kusto/eventhubDataConnection.go
sdk/go/azure/kusto/eventhubDataConnection.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto (also known as Azure Data Explorer) EventHub Data Connection // // ## 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/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("my-kusto-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // cluster, err := kusto.NewCluster(ctx, "cluster", &kusto.ClusterArgs{ // Name: pulumi.String("kustocluster"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Standard_D13_v2"), // Capacity: pulumi.Int(2), // }, // }) // if err != nil { // return err // } // database, err := kusto.NewDatabase(ctx, "database", &kusto.DatabaseArgs{ // Name: pulumi.String("my-kusto-database"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: cluster.Name, // HotCachePeriod: pulumi.String("P7D"), // SoftDeletePeriod: pulumi.String("P31D"), // }) // if err != nil { // return err // } // eventhubNs, err := eventhub.NewEventHubNamespace(ctx, "eventhub_ns", &eventhub.EventHubNamespaceArgs{ // Name: pulumi.String("my-eventhub-ns"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // eventhub, err := eventhub.NewEventHub(ctx, "eventhub", &eventhub.EventHubArgs{ // Name: pulumi.String("my-eventhub"), // NamespaceName: eventhubNs.Name, // ResourceGroupName: example.Name, // PartitionCount: pulumi.Int(1), // MessageRetention: pulumi.Int(1), // }) // if err != nil { // return err // } // consumerGroup, err := eventhub.NewConsumerGroup(ctx, "consumer_group", &eventhub.ConsumerGroupArgs{ // Name: pulumi.String("my-eventhub-consumergroup"), // NamespaceName: eventhubNs.Name, // EventhubName: eventhub.Name, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = kusto.NewEventhubDataConnection(ctx, "eventhub_connection", &kusto.EventhubDataConnectionArgs{ // Name: pulumi.String("my-kusto-eventhub-data-connection"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: cluster.Name, // DatabaseName: database.Name, // EventhubId: eventhub.ID(), // ConsumerGroup: consumerGroup.Name, // TableName: pulumi.String("my-table"), // MappingRuleName: pulumi.String("my-table-mapping"), // DataFormat: pulumi.String("JSON"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto EventHub Data Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/eventhubDataConnection:EventhubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/eventHubConnection1 // ``` type EventhubDataConnection struct { pulumi.CustomResourceState // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringOutput `pulumi:"clusterName"` // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. Compression pulumi.StringPtrOutput `pulumi:"compression"` // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringOutput `pulumi:"consumerGroup"` // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. DataFormat pulumi.StringPtrOutput `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrOutput `pulumi:"databaseRoutingType"` // Specifies a list of system properties for the Event Hub. EventSystemProperties pulumi.StringArrayOutput `pulumi:"eventSystemProperties"` // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. EventhubId pulumi.StringOutput `pulumi:"eventhubId"` // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. IdentityId pulumi.StringPtrOutput `pulumi:"identityId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. MappingRuleName pulumi.StringPtrOutput `pulumi:"mappingRuleName"` // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. TableName pulumi.StringPtrOutput `pulumi:"tableName"` } // NewEventhubDataConnection registers a new resource with the given unique name, arguments, and options. func NewEventhubDataConnection(ctx *pulumi.Context, name string, args *EventhubDataConnectionArgs, opts ...pulumi.ResourceOption) (*EventhubDataConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterName == nil { return nil, errors.New("invalid value for required argument 'ClusterName'") } if args.ConsumerGroup == nil { return nil, errors.New("invalid value for required argument 'ConsumerGroup'") } if args.DatabaseName == nil { return nil, errors.New("invalid value for required argument 'DatabaseName'") } if args.EventhubId == nil { return nil, errors.New("invalid value for required argument 'EventhubId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource EventhubDataConnection err := ctx.RegisterResource("azure:kusto/eventhubDataConnection:EventhubDataConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEventhubDataConnection gets an existing EventhubDataConnection 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 GetEventhubDataConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EventhubDataConnectionState, opts ...pulumi.ResourceOption) (*EventhubDataConnection, error) { var resource EventhubDataConnection err := ctx.ReadResource("azure:kusto/eventhubDataConnection:EventhubDataConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EventhubDataConnection resources. type eventhubDataConnectionState struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName *string `pulumi:"clusterName"` // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. Compression *string `pulumi:"compression"` // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup *string `pulumi:"consumerGroup"` // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. DataFormat *string `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName *string `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType *string `pulumi:"databaseRoutingType"` // Specifies a list of system properties for the Event Hub. EventSystemProperties []string `pulumi:"eventSystemProperties"` // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. EventhubId *string `pulumi:"eventhubId"` // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. IdentityId *string `pulumi:"identityId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. TableName *string `pulumi:"tableName"` } type EventhubDataConnectionState struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringPtrInput // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. Compression pulumi.StringPtrInput // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringPtrInput // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. DataFormat pulumi.StringPtrInput // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringPtrInput // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrInput // Specifies a list of system properties for the Event Hub. EventSystemProperties pulumi.StringArrayInput // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. EventhubId pulumi.StringPtrInput // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. IdentityId pulumi.StringPtrInput // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. MappingRuleName pulumi.StringPtrInput // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the target table name used for the message ingestion. Table must exist before resource is created. TableName pulumi.StringPtrInput } func (EventhubDataConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*eventhubDataConnectionState)(nil)).Elem() } type eventhubDataConnectionArgs struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName string `pulumi:"clusterName"` // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. Compression *string `pulumi:"compression"` // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup string `pulumi:"consumerGroup"` // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. DataFormat *string `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName string `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType *string `pulumi:"databaseRoutingType"` // Specifies a list of system properties for the Event Hub. EventSystemProperties []string `pulumi:"eventSystemProperties"` // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. EventhubId string `pulumi:"eventhubId"` // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. IdentityId *string `pulumi:"identityId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. TableName *string `pulumi:"tableName"` } // The set of arguments for constructing a EventhubDataConnection resource. type EventhubDataConnectionArgs struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringInput // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. Compression pulumi.StringPtrInput // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringInput // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. DataFormat pulumi.StringPtrInput // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringInput // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrInput // Specifies a list of system properties for the Event Hub. EventSystemProperties pulumi.StringArrayInput // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. EventhubId pulumi.StringInput // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. IdentityId pulumi.StringPtrInput // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. MappingRuleName pulumi.StringPtrInput // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the target table name used for the message ingestion. Table must exist before resource is created. TableName pulumi.StringPtrInput } func (EventhubDataConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*eventhubDataConnectionArgs)(nil)).Elem() } type EventhubDataConnectionInput interface { pulumi.Input ToEventhubDataConnectionOutput() EventhubDataConnectionOutput ToEventhubDataConnectionOutputWithContext(ctx context.Context) EventhubDataConnectionOutput } func (*EventhubDataConnection) ElementType() reflect.Type { return reflect.TypeOf((**EventhubDataConnection)(nil)).Elem() } func (i *EventhubDataConnection) ToEventhubDataConnectionOutput() EventhubDataConnectionOutput { return i.ToEventhubDataConnectionOutputWithContext(context.Background()) } func (i *EventhubDataConnection) ToEventhubDataConnectionOutputWithContext(ctx context.Context) EventhubDataConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(EventhubDataConnectionOutput) } // EventhubDataConnectionArrayInput is an input type that accepts EventhubDataConnectionArray and EventhubDataConnectionArrayOutput values. // You can construct a concrete instance of `EventhubDataConnectionArrayInput` via: // // EventhubDataConnectionArray{ EventhubDataConnectionArgs{...} } type EventhubDataConnectionArrayInput interface { pulumi.Input ToEventhubDataConnectionArrayOutput() EventhubDataConnectionArrayOutput ToEventhubDataConnectionArrayOutputWithContext(context.Context) EventhubDataConnectionArrayOutput } type EventhubDataConnectionArray []EventhubDataConnectionInput func (EventhubDataConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EventhubDataConnection)(nil)).Elem() } func (i EventhubDataConnectionArray) ToEventhubDataConnectionArrayOutput() EventhubDataConnectionArrayOutput { return i.ToEventhubDataConnectionArrayOutputWithContext(context.Background()) } func (i EventhubDataConnectionArray) ToEventhubDataConnectionArrayOutputWithContext(ctx context.Context) EventhubDataConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EventhubDataConnectionArrayOutput) } // EventhubDataConnectionMapInput is an input type that accepts EventhubDataConnectionMap and EventhubDataConnectionMapOutput values. // You can construct a concrete instance of `EventhubDataConnectionMapInput` via: // // EventhubDataConnectionMap{ "key": EventhubDataConnectionArgs{...} } type EventhubDataConnectionMapInput interface { pulumi.Input ToEventhubDataConnectionMapOutput() EventhubDataConnectionMapOutput ToEventhubDataConnectionMapOutputWithContext(context.Context) EventhubDataConnectionMapOutput } type EventhubDataConnectionMap map[string]EventhubDataConnectionInput func (EventhubDataConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EventhubDataConnection)(nil)).Elem() } func (i EventhubDataConnectionMap) ToEventhubDataConnectionMapOutput() EventhubDataConnectionMapOutput { return i.ToEventhubDataConnectionMapOutputWithContext(context.Background()) } func (i EventhubDataConnectionMap) ToEventhubDataConnectionMapOutputWithContext(ctx context.Context) EventhubDataConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EventhubDataConnectionMapOutput) } type EventhubDataConnectionOutput struct{ *pulumi.OutputState } func (EventhubDataConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**EventhubDataConnection)(nil)).Elem() } func (o EventhubDataConnectionOutput) ToEventhubDataConnectionOutput() EventhubDataConnectionOutput { return o } func (o EventhubDataConnectionOutput) ToEventhubDataConnectionOutputWithContext(ctx context.Context) EventhubDataConnectionOutput { return o } // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) ClusterName() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) } // Specifies compression type for the connection. Allowed values: `GZip` and `None`. Defaults to `None`. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) Compression() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.Compression }).(pulumi.StringPtrOutput) } // Specifies the EventHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) ConsumerGroup() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.ConsumerGroup }).(pulumi.StringOutput) } // Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSVE`, `TSV`, `TXT`, and `W3CLOGFILE`. func (o EventhubDataConnectionOutput) DataFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.DataFormat }).(pulumi.StringPtrOutput) } // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) DatabaseName() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) } // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. func (o EventhubDataConnectionOutput) DatabaseRoutingType() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.DatabaseRoutingType }).(pulumi.StringPtrOutput) } // Specifies a list of system properties for the Event Hub. func (o EventhubDataConnectionOutput) EventSystemProperties() pulumi.StringArrayOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringArrayOutput { return v.EventSystemProperties }).(pulumi.StringArrayOutput) } // Specifies the resource id of the EventHub this data connection will use for ingestion. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) EventhubId() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.EventhubId }).(pulumi.StringOutput) } // The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. func (o EventhubDataConnectionOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput) } // The location where the Kusto Database should be created. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. func (o EventhubDataConnectionOutput) MappingRuleName() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.MappingRuleName }).(pulumi.StringPtrOutput) } // The name of the Kusto EventHub Data Connection to create. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. func (o EventhubDataConnectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the target table name used for the message ingestion. Table must exist before resource is created. func (o EventhubDataConnectionOutput) TableName() pulumi.StringPtrOutput { return o.ApplyT(func(v *EventhubDataConnection) pulumi.StringPtrOutput { return v.TableName }).(pulumi.StringPtrOutput) } type EventhubDataConnectionArrayOutput struct{ *pulumi.OutputState } func (EventhubDataConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EventhubDataConnection)(nil)).Elem() } func (o EventhubDataConnectionArrayOutput) ToEventhubDataConnectionArrayOutput() EventhubDataConnectionArrayOutput { return o } func (o EventhubDataConnectionArrayOutput) ToEventhubDataConnectionArrayOutputWithContext(ctx context.Context) EventhubDataConnectionArrayOutput { return o } func (o EventhubDataConnectionArrayOutput) Index(i pulumi.IntInput) EventhubDataConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventhubDataConnection { return vs[0].([]*EventhubDataConnection)[vs[1].(int)] }).(EventhubDataConnectionOutput) } type EventhubDataConnectionMapOutput struct{ *pulumi.OutputState } func (EventhubDataConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EventhubDataConnection)(nil)).Elem() } func (o EventhubDataConnectionMapOutput) ToEventhubDataConnectionMapOutput() EventhubDataConnectionMapOutput { return o } func (o EventhubDataConnectionMapOutput) ToEventhubDataConnectionMapOutputWithContext(ctx context.Context) EventhubDataConnectionMapOutput { return o } func (o EventhubDataConnectionMapOutput) MapIndex(k pulumi.StringInput) EventhubDataConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventhubDataConnection { return vs[0].(map[string]*EventhubDataConnection)[vs[1].(string)] }).(EventhubDataConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EventhubDataConnectionInput)(nil)).Elem(), &EventhubDataConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*EventhubDataConnectionArrayInput)(nil)).Elem(), EventhubDataConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EventhubDataConnectionMapInput)(nil)).Elem(), EventhubDataConnectionMap{}) pulumi.RegisterOutputType(EventhubDataConnectionOutput{}) pulumi.RegisterOutputType(EventhubDataConnectionArrayOutput{}) pulumi.RegisterOutputType(EventhubDataConnectionMapOutput{}) }
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/kusto/databasePrincipalAssignment.go
sdk/go/azure/kusto/databasePrincipalAssignment.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto (also known as Azure Data Explorer) Database Principal Assignment. // // ## 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/kusto" // "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("KustoRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("kustocluster"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Standard_D13_v2"), // Capacity: pulumi.Int(2), // }, // }) // if err != nil { // return err // } // exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{ // Name: pulumi.String("KustoDatabase"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: exampleCluster.Name, // HotCachePeriod: pulumi.String("P7D"), // SoftDeletePeriod: pulumi.String("P31D"), // }) // if err != nil { // return err // } // _, err = kusto.NewDatabasePrincipalAssignment(ctx, "example", &kusto.DatabasePrincipalAssignmentArgs{ // Name: pulumi.String("KustoPrincipalAssignment"), // ResourceGroupName: example.Name, // ClusterName: exampleCluster.Name, // DatabaseName: exampleDatabase.Name, // TenantId: pulumi.String(current.TenantId), // PrincipalId: pulumi.String(current.ClientId), // PrincipalType: pulumi.String("App"), // Role: pulumi.String("Viewer"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto Database Principal Assignment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/principalAssignments/assignment1 // ``` type DatabasePrincipalAssignment struct { pulumi.CustomResourceState // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. ClusterName pulumi.StringOutput `pulumi:"clusterName"` // The name of the database in which to create the resource. Changing this forces a new resource to be created. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` // The name of the kusto principal assignment. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The object id of the principal. Changing this forces a new resource to be created. PrincipalId pulumi.StringOutput `pulumi:"principalId"` // The name of the principal. PrincipalName pulumi.StringOutput `pulumi:"principalName"` // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. Role pulumi.StringOutput `pulumi:"role"` // The tenant id in which the principal resides. Changing this forces a new resource to be created. TenantId pulumi.StringOutput `pulumi:"tenantId"` // The name of the tenant. TenantName pulumi.StringOutput `pulumi:"tenantName"` } // NewDatabasePrincipalAssignment registers a new resource with the given unique name, arguments, and options. func NewDatabasePrincipalAssignment(ctx *pulumi.Context, name string, args *DatabasePrincipalAssignmentArgs, opts ...pulumi.ResourceOption) (*DatabasePrincipalAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterName == nil { return nil, errors.New("invalid value for required argument 'ClusterName'") } if args.DatabaseName == nil { return nil, errors.New("invalid value for required argument 'DatabaseName'") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.PrincipalType == nil { return nil, errors.New("invalid value for required argument 'PrincipalType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Role == nil { return nil, errors.New("invalid value for required argument 'Role'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DatabasePrincipalAssignment err := ctx.RegisterResource("azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDatabasePrincipalAssignment gets an existing DatabasePrincipalAssignment 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 GetDatabasePrincipalAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DatabasePrincipalAssignmentState, opts ...pulumi.ResourceOption) (*DatabasePrincipalAssignment, error) { var resource DatabasePrincipalAssignment err := ctx.ReadResource("azure:kusto/databasePrincipalAssignment:DatabasePrincipalAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DatabasePrincipalAssignment resources. type databasePrincipalAssignmentState struct { // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. ClusterName *string `pulumi:"clusterName"` // The name of the database in which to create the resource. Changing this forces a new resource to be created. DatabaseName *string `pulumi:"databaseName"` // The name of the kusto principal assignment. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The object id of the principal. Changing this forces a new resource to be created. PrincipalId *string `pulumi:"principalId"` // The name of the principal. PrincipalName *string `pulumi:"principalName"` // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. PrincipalType *string `pulumi:"principalType"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. Role *string `pulumi:"role"` // The tenant id in which the principal resides. Changing this forces a new resource to be created. TenantId *string `pulumi:"tenantId"` // The name of the tenant. TenantName *string `pulumi:"tenantName"` } type DatabasePrincipalAssignmentState struct { // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. ClusterName pulumi.StringPtrInput // The name of the database in which to create the resource. Changing this forces a new resource to be created. DatabaseName pulumi.StringPtrInput // The name of the kusto principal assignment. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The object id of the principal. Changing this forces a new resource to be created. PrincipalId pulumi.StringPtrInput // The name of the principal. PrincipalName pulumi.StringPtrInput // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. Role pulumi.StringPtrInput // The tenant id in which the principal resides. Changing this forces a new resource to be created. TenantId pulumi.StringPtrInput // The name of the tenant. TenantName pulumi.StringPtrInput } func (DatabasePrincipalAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*databasePrincipalAssignmentState)(nil)).Elem() } type databasePrincipalAssignmentArgs struct { // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. ClusterName string `pulumi:"clusterName"` // The name of the database in which to create the resource. Changing this forces a new resource to be created. DatabaseName string `pulumi:"databaseName"` // The name of the kusto principal assignment. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The object id of the principal. Changing this forces a new resource to be created. PrincipalId string `pulumi:"principalId"` // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. PrincipalType string `pulumi:"principalType"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. Role string `pulumi:"role"` // The tenant id in which the principal resides. Changing this forces a new resource to be created. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a DatabasePrincipalAssignment resource. type DatabasePrincipalAssignmentArgs struct { // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. ClusterName pulumi.StringInput // The name of the database in which to create the resource. Changing this forces a new resource to be created. DatabaseName pulumi.StringInput // The name of the kusto principal assignment. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The object id of the principal. Changing this forces a new resource to be created. PrincipalId pulumi.StringInput // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. Role pulumi.StringInput // The tenant id in which the principal resides. Changing this forces a new resource to be created. TenantId pulumi.StringInput } func (DatabasePrincipalAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*databasePrincipalAssignmentArgs)(nil)).Elem() } type DatabasePrincipalAssignmentInput interface { pulumi.Input ToDatabasePrincipalAssignmentOutput() DatabasePrincipalAssignmentOutput ToDatabasePrincipalAssignmentOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentOutput } func (*DatabasePrincipalAssignment) ElementType() reflect.Type { return reflect.TypeOf((**DatabasePrincipalAssignment)(nil)).Elem() } func (i *DatabasePrincipalAssignment) ToDatabasePrincipalAssignmentOutput() DatabasePrincipalAssignmentOutput { return i.ToDatabasePrincipalAssignmentOutputWithContext(context.Background()) } func (i *DatabasePrincipalAssignment) ToDatabasePrincipalAssignmentOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabasePrincipalAssignmentOutput) } // DatabasePrincipalAssignmentArrayInput is an input type that accepts DatabasePrincipalAssignmentArray and DatabasePrincipalAssignmentArrayOutput values. // You can construct a concrete instance of `DatabasePrincipalAssignmentArrayInput` via: // // DatabasePrincipalAssignmentArray{ DatabasePrincipalAssignmentArgs{...} } type DatabasePrincipalAssignmentArrayInput interface { pulumi.Input ToDatabasePrincipalAssignmentArrayOutput() DatabasePrincipalAssignmentArrayOutput ToDatabasePrincipalAssignmentArrayOutputWithContext(context.Context) DatabasePrincipalAssignmentArrayOutput } type DatabasePrincipalAssignmentArray []DatabasePrincipalAssignmentInput func (DatabasePrincipalAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DatabasePrincipalAssignment)(nil)).Elem() } func (i DatabasePrincipalAssignmentArray) ToDatabasePrincipalAssignmentArrayOutput() DatabasePrincipalAssignmentArrayOutput { return i.ToDatabasePrincipalAssignmentArrayOutputWithContext(context.Background()) } func (i DatabasePrincipalAssignmentArray) ToDatabasePrincipalAssignmentArrayOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabasePrincipalAssignmentArrayOutput) } // DatabasePrincipalAssignmentMapInput is an input type that accepts DatabasePrincipalAssignmentMap and DatabasePrincipalAssignmentMapOutput values. // You can construct a concrete instance of `DatabasePrincipalAssignmentMapInput` via: // // DatabasePrincipalAssignmentMap{ "key": DatabasePrincipalAssignmentArgs{...} } type DatabasePrincipalAssignmentMapInput interface { pulumi.Input ToDatabasePrincipalAssignmentMapOutput() DatabasePrincipalAssignmentMapOutput ToDatabasePrincipalAssignmentMapOutputWithContext(context.Context) DatabasePrincipalAssignmentMapOutput } type DatabasePrincipalAssignmentMap map[string]DatabasePrincipalAssignmentInput func (DatabasePrincipalAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DatabasePrincipalAssignment)(nil)).Elem() } func (i DatabasePrincipalAssignmentMap) ToDatabasePrincipalAssignmentMapOutput() DatabasePrincipalAssignmentMapOutput { return i.ToDatabasePrincipalAssignmentMapOutputWithContext(context.Background()) } func (i DatabasePrincipalAssignmentMap) ToDatabasePrincipalAssignmentMapOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabasePrincipalAssignmentMapOutput) } type DatabasePrincipalAssignmentOutput struct{ *pulumi.OutputState } func (DatabasePrincipalAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**DatabasePrincipalAssignment)(nil)).Elem() } func (o DatabasePrincipalAssignmentOutput) ToDatabasePrincipalAssignmentOutput() DatabasePrincipalAssignmentOutput { return o } func (o DatabasePrincipalAssignmentOutput) ToDatabasePrincipalAssignmentOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentOutput { return o } // The name of the cluster in which to create the resource. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) ClusterName() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) } // The name of the database in which to create the resource. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) DatabaseName() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) } // The name of the kusto principal assignment. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The object id of the principal. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) } // The name of the principal. func (o DatabasePrincipalAssignmentOutput) PrincipalName() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.PrincipalName }).(pulumi.StringOutput) } // The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) PrincipalType() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The database role assigned to the principal. Valid values include `Admin`, `Ingestor`, `Monitor`, `UnrestrictedViewer`, `User` and `Viewer`. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) Role() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput) } // The tenant id in which the principal resides. Changing this forces a new resource to be created. func (o DatabasePrincipalAssignmentOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } // The name of the tenant. func (o DatabasePrincipalAssignmentOutput) TenantName() pulumi.StringOutput { return o.ApplyT(func(v *DatabasePrincipalAssignment) pulumi.StringOutput { return v.TenantName }).(pulumi.StringOutput) } type DatabasePrincipalAssignmentArrayOutput struct{ *pulumi.OutputState } func (DatabasePrincipalAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DatabasePrincipalAssignment)(nil)).Elem() } func (o DatabasePrincipalAssignmentArrayOutput) ToDatabasePrincipalAssignmentArrayOutput() DatabasePrincipalAssignmentArrayOutput { return o } func (o DatabasePrincipalAssignmentArrayOutput) ToDatabasePrincipalAssignmentArrayOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentArrayOutput { return o } func (o DatabasePrincipalAssignmentArrayOutput) Index(i pulumi.IntInput) DatabasePrincipalAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatabasePrincipalAssignment { return vs[0].([]*DatabasePrincipalAssignment)[vs[1].(int)] }).(DatabasePrincipalAssignmentOutput) } type DatabasePrincipalAssignmentMapOutput struct{ *pulumi.OutputState } func (DatabasePrincipalAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DatabasePrincipalAssignment)(nil)).Elem() } func (o DatabasePrincipalAssignmentMapOutput) ToDatabasePrincipalAssignmentMapOutput() DatabasePrincipalAssignmentMapOutput { return o } func (o DatabasePrincipalAssignmentMapOutput) ToDatabasePrincipalAssignmentMapOutputWithContext(ctx context.Context) DatabasePrincipalAssignmentMapOutput { return o } func (o DatabasePrincipalAssignmentMapOutput) MapIndex(k pulumi.StringInput) DatabasePrincipalAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatabasePrincipalAssignment { return vs[0].(map[string]*DatabasePrincipalAssignment)[vs[1].(string)] }).(DatabasePrincipalAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DatabasePrincipalAssignmentInput)(nil)).Elem(), &DatabasePrincipalAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*DatabasePrincipalAssignmentArrayInput)(nil)).Elem(), DatabasePrincipalAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DatabasePrincipalAssignmentMapInput)(nil)).Elem(), DatabasePrincipalAssignmentMap{}) pulumi.RegisterOutputType(DatabasePrincipalAssignmentOutput{}) pulumi.RegisterOutputType(DatabasePrincipalAssignmentArrayOutput{}) pulumi.RegisterOutputType(DatabasePrincipalAssignmentMapOutput{}) }
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/kusto/cluster.go
sdk/go/azure/kusto/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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto (also known as Azure Data Explorer) 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/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"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Standard_D13_v2"), // Capacity: pulumi.Int(2), // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto Clusters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/cluster:Cluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1 // ``` type Cluster struct { pulumi.CustomResourceState // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. AllowedFqdns pulumi.StringArrayOutput `pulumi:"allowedFqdns"` // The list of ips in the format of CIDR allowed to connect to the cluster. AllowedIpRanges pulumi.StringArrayOutput `pulumi:"allowedIpRanges"` // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. AutoStopEnabled pulumi.BoolPtrOutput `pulumi:"autoStopEnabled"` // The Kusto Cluster URI to be used for data ingestion. DataIngestionUri pulumi.StringOutput `pulumi:"dataIngestionUri"` // Specifies if the cluster's disks are encrypted. Defaults to `false`. DiskEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"diskEncryptionEnabled"` // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. DoubleEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"doubleEncryptionEnabled"` // An `identity` block as defined below. Identity ClusterIdentityPtrOutput `pulumi:"identity"` // A `languageExtension` block as defined below. LanguageExtension ClusterLanguageExtensionArrayOutput `pulumi:"languageExtension"` // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider LanguageExtensions ClusterLanguageExtensionArrayOutput `pulumi:"languageExtensions"` // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // An `optimizedAutoScale` block as defined below. OptimizedAutoScale ClusterOptimizedAutoScalePtrOutput `pulumi:"optimizedAutoScale"` // Whether to restrict outbound network access. Defaults to `false`. OutboundNetworkAccessRestricted pulumi.BoolPtrOutput `pulumi:"outboundNetworkAccessRestricted"` // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. PublicIpType pulumi.StringPtrOutput `pulumi:"publicIpType"` // Is the public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // Specifies if the purge operations are enabled. Defaults to `false`. PurgeEnabled pulumi.BoolPtrOutput `pulumi:"purgeEnabled"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku ClusterSkuOutput `pulumi:"sku"` // Specifies if the streaming ingest is enabled. Defaults to `false`. StreamingIngestionEnabled pulumi.BoolPtrOutput `pulumi:"streamingIngestionEnabled"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. TrustedExternalTenants pulumi.StringArrayOutput `pulumi:"trustedExternalTenants"` // The FQDN of the Azure Kusto Cluster. Uri pulumi.StringOutput `pulumi:"uri"` // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 VirtualNetworkConfiguration ClusterVirtualNetworkConfigurationPtrOutput `pulumi:"virtualNetworkConfiguration"` // Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // 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.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 Cluster err := ctx.RegisterResource("azure:kusto/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:kusto/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 { // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. AllowedFqdns []string `pulumi:"allowedFqdns"` // The list of ips in the format of CIDR allowed to connect to the cluster. AllowedIpRanges []string `pulumi:"allowedIpRanges"` // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. AutoStopEnabled *bool `pulumi:"autoStopEnabled"` // The Kusto Cluster URI to be used for data ingestion. DataIngestionUri *string `pulumi:"dataIngestionUri"` // Specifies if the cluster's disks are encrypted. Defaults to `false`. DiskEncryptionEnabled *bool `pulumi:"diskEncryptionEnabled"` // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. DoubleEncryptionEnabled *bool `pulumi:"doubleEncryptionEnabled"` // An `identity` block as defined below. Identity *ClusterIdentity `pulumi:"identity"` // A `languageExtension` block as defined below. LanguageExtension []ClusterLanguageExtension `pulumi:"languageExtension"` // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider LanguageExtensions []ClusterLanguageExtension `pulumi:"languageExtensions"` // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `optimizedAutoScale` block as defined below. OptimizedAutoScale *ClusterOptimizedAutoScale `pulumi:"optimizedAutoScale"` // Whether to restrict outbound network access. Defaults to `false`. OutboundNetworkAccessRestricted *bool `pulumi:"outboundNetworkAccessRestricted"` // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. PublicIpType *string `pulumi:"publicIpType"` // Is the public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies if the purge operations are enabled. Defaults to `false`. PurgeEnabled *bool `pulumi:"purgeEnabled"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku *ClusterSku `pulumi:"sku"` // Specifies if the streaming ingest is enabled. Defaults to `false`. StreamingIngestionEnabled *bool `pulumi:"streamingIngestionEnabled"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. TrustedExternalTenants []string `pulumi:"trustedExternalTenants"` // The FQDN of the Azure Kusto Cluster. Uri *string `pulumi:"uri"` // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 VirtualNetworkConfiguration *ClusterVirtualNetworkConfiguration `pulumi:"virtualNetworkConfiguration"` // Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. Zones []string `pulumi:"zones"` } type ClusterState struct { // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. AllowedFqdns pulumi.StringArrayInput // The list of ips in the format of CIDR allowed to connect to the cluster. AllowedIpRanges pulumi.StringArrayInput // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. AutoStopEnabled pulumi.BoolPtrInput // The Kusto Cluster URI to be used for data ingestion. DataIngestionUri pulumi.StringPtrInput // Specifies if the cluster's disks are encrypted. Defaults to `false`. DiskEncryptionEnabled pulumi.BoolPtrInput // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. DoubleEncryptionEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity ClusterIdentityPtrInput // A `languageExtension` block as defined below. LanguageExtension ClusterLanguageExtensionArrayInput // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider LanguageExtensions ClusterLanguageExtensionArrayInput // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `optimizedAutoScale` block as defined below. OptimizedAutoScale ClusterOptimizedAutoScalePtrInput // Whether to restrict outbound network access. Defaults to `false`. OutboundNetworkAccessRestricted pulumi.BoolPtrInput // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. PublicIpType pulumi.StringPtrInput // Is the public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies if the purge operations are enabled. Defaults to `false`. PurgeEnabled pulumi.BoolPtrInput // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `sku` block as defined below. Sku ClusterSkuPtrInput // Specifies if the streaming ingest is enabled. Defaults to `false`. StreamingIngestionEnabled pulumi.BoolPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. TrustedExternalTenants pulumi.StringArrayInput // The FQDN of the Azure Kusto Cluster. Uri pulumi.StringPtrInput // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 VirtualNetworkConfiguration ClusterVirtualNetworkConfigurationPtrInput // Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. Zones pulumi.StringArrayInput } func (ClusterState) ElementType() reflect.Type { return reflect.TypeOf((*clusterState)(nil)).Elem() } type clusterArgs struct { // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. AllowedFqdns []string `pulumi:"allowedFqdns"` // The list of ips in the format of CIDR allowed to connect to the cluster. AllowedIpRanges []string `pulumi:"allowedIpRanges"` // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. AutoStopEnabled *bool `pulumi:"autoStopEnabled"` // Specifies if the cluster's disks are encrypted. Defaults to `false`. DiskEncryptionEnabled *bool `pulumi:"diskEncryptionEnabled"` // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. DoubleEncryptionEnabled *bool `pulumi:"doubleEncryptionEnabled"` // An `identity` block as defined below. Identity *ClusterIdentity `pulumi:"identity"` // A `languageExtension` block as defined below. LanguageExtension []ClusterLanguageExtension `pulumi:"languageExtension"` // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider LanguageExtensions []ClusterLanguageExtension `pulumi:"languageExtensions"` // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // An `optimizedAutoScale` block as defined below. OptimizedAutoScale *ClusterOptimizedAutoScale `pulumi:"optimizedAutoScale"` // Whether to restrict outbound network access. Defaults to `false`. OutboundNetworkAccessRestricted *bool `pulumi:"outboundNetworkAccessRestricted"` // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. PublicIpType *string `pulumi:"publicIpType"` // Is the public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies if the purge operations are enabled. Defaults to `false`. PurgeEnabled *bool `pulumi:"purgeEnabled"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku ClusterSku `pulumi:"sku"` // Specifies if the streaming ingest is enabled. Defaults to `false`. StreamingIngestionEnabled *bool `pulumi:"streamingIngestionEnabled"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. TrustedExternalTenants []string `pulumi:"trustedExternalTenants"` // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 VirtualNetworkConfiguration *ClusterVirtualNetworkConfiguration `pulumi:"virtualNetworkConfiguration"` // Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a Cluster resource. type ClusterArgs struct { // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. AllowedFqdns pulumi.StringArrayInput // The list of ips in the format of CIDR allowed to connect to the cluster. AllowedIpRanges pulumi.StringArrayInput // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. AutoStopEnabled pulumi.BoolPtrInput // Specifies if the cluster's disks are encrypted. Defaults to `false`. DiskEncryptionEnabled pulumi.BoolPtrInput // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. DoubleEncryptionEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity ClusterIdentityPtrInput // A `languageExtension` block as defined below. LanguageExtension ClusterLanguageExtensionArrayInput // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider LanguageExtensions ClusterLanguageExtensionArrayInput // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // An `optimizedAutoScale` block as defined below. OptimizedAutoScale ClusterOptimizedAutoScalePtrInput // Whether to restrict outbound network access. Defaults to `false`. OutboundNetworkAccessRestricted pulumi.BoolPtrInput // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. PublicIpType pulumi.StringPtrInput // Is the public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies if the purge operations are enabled. Defaults to `false`. PurgeEnabled pulumi.BoolPtrInput // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `sku` block as defined below. Sku ClusterSkuInput // Specifies if the streaming ingest is enabled. Defaults to `false`. StreamingIngestionEnabled pulumi.BoolPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. TrustedExternalTenants pulumi.StringArrayInput // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 VirtualNetworkConfiguration ClusterVirtualNetworkConfigurationPtrInput // Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created. Zones pulumi.StringArrayInput } 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 } // List of allowed FQDNs (Fully Qualified Domain Name) for egress from Cluster. func (o ClusterOutput) AllowedFqdns() pulumi.StringArrayOutput { return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.AllowedFqdns }).(pulumi.StringArrayOutput) } // The list of ips in the format of CIDR allowed to connect to the cluster. func (o ClusterOutput) AllowedIpRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.AllowedIpRanges }).(pulumi.StringArrayOutput) } // Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days). Defaults to `true`. func (o ClusterOutput) AutoStopEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.AutoStopEnabled }).(pulumi.BoolPtrOutput) } // The Kusto Cluster URI to be used for data ingestion. func (o ClusterOutput) DataIngestionUri() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.DataIngestionUri }).(pulumi.StringOutput) } // Specifies if the cluster's disks are encrypted. Defaults to `false`. func (o ClusterOutput) DiskEncryptionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.DiskEncryptionEnabled }).(pulumi.BoolPtrOutput) } // Is the cluster's double encryption enabled? Changing this forces a new resource to be created. func (o ClusterOutput) DoubleEncryptionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.DoubleEncryptionEnabled }).(pulumi.BoolPtrOutput) } // An `identity` block as defined below. func (o ClusterOutput) Identity() ClusterIdentityPtrOutput { return o.ApplyT(func(v *Cluster) ClusterIdentityPtrOutput { return v.Identity }).(ClusterIdentityPtrOutput) } // A `languageExtension` block as defined below. func (o ClusterOutput) LanguageExtension() ClusterLanguageExtensionArrayOutput { return o.ApplyT(func(v *Cluster) ClusterLanguageExtensionArrayOutput { return v.LanguageExtension }).(ClusterLanguageExtensionArrayOutput) } // Deprecated: `languageExtensions` has been deprecated in favour of `languageExtension` and will be removed in v5.0 of the AzureRM provider func (o ClusterOutput) LanguageExtensions() ClusterLanguageExtensionArrayOutput { return o.ApplyT(func(v *Cluster) ClusterLanguageExtensionArrayOutput { return v.LanguageExtensions }).(ClusterLanguageExtensionArrayOutput) } // The location where the Kusto Cluster should be created. Changing this forces a new resource to be created. func (o ClusterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Kusto Cluster to create. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created. func (o ClusterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An `optimizedAutoScale` block as defined below. func (o ClusterOutput) OptimizedAutoScale() ClusterOptimizedAutoScalePtrOutput { return o.ApplyT(func(v *Cluster) ClusterOptimizedAutoScalePtrOutput { return v.OptimizedAutoScale }).(ClusterOptimizedAutoScalePtrOutput) } // Whether to restrict outbound network access. Defaults to `false`. func (o ClusterOutput) OutboundNetworkAccessRestricted() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.OutboundNetworkAccessRestricted }).(pulumi.BoolPtrOutput) } // Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to `IPv4`. func (o ClusterOutput) PublicIpType() pulumi.StringPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.PublicIpType }).(pulumi.StringPtrOutput) } // Is the public network access enabled? Defaults to `true`. func (o ClusterOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // Specifies if the purge operations are enabled. Defaults to `false`. func (o ClusterOutput) PurgeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.PurgeEnabled }).(pulumi.BoolPtrOutput) } // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `sku` block as defined below. func (o ClusterOutput) Sku() ClusterSkuOutput { return o.ApplyT(func(v *Cluster) ClusterSkuOutput { return v.Sku }).(ClusterSkuOutput) } // Specifies if the streaming ingest is enabled. Defaults to `false`. func (o ClusterOutput) StreamingIngestionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.StreamingIngestionEnabled }).(pulumi.BoolPtrOutput) } // A mapping of tags to assign to the resource. func (o ClusterOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies a list of tenant IDs that are trusted by the cluster. Default setting trusts all other tenants. Use `trustedExternalTenants = ["*"]` to explicitly allow all other tenants, `trustedExternalTenants = ["MyTenantOnly"]` for only your tenant or `trustedExternalTenants = ["<tenantId1>", "<tenantIdx>"]` to allow specific other tenants. // // > **Note:** In v3.0 of `azurerm` a new or updated Kusto Cluster will only allow your own tenant by default. Explicit configuration of this setting will change from `trustedExternalTenants = ["MyTenantOnly"]` to `trustedExternalTenants = []`. func (o ClusterOutput) TrustedExternalTenants() pulumi.StringArrayOutput { return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.TrustedExternalTenants }).(pulumi.StringArrayOutput) } // The FQDN of the Azure Kusto Cluster. func (o ClusterOutput) Uri() pulumi.StringOutput { return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput) } // Deprecated: The `virtualNetworkConfiguration` block has been deprecated as it is no longer supported by Azure and will be removed in v5.0 of the AzureRM Provider - for more information see https://techcommunity.microsoft.com/blog/azuredataexplorer/deprecation-of-virtual-network-injection-for-azure-data-explorer/4198192 func (o ClusterOutput) VirtualNetworkConfiguration() ClusterVirtualNetworkConfigurationPtrOutput {
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/kusto/script.go
sdk/go/azure/kusto/script.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto Script. // // ## 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/kusto" // "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 { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("example"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.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"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // ClusterName: exampleCluster.Name, // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("setup-files"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // if err != nil { // return err // } // exampleBlob, err := storage.NewBlob(ctx, "example", &storage.BlobArgs{ // Name: pulumi.String("script.txt"), // StorageAccountName: exampleAccount.Name, // StorageContainerName: exampleContainer.Name, // Type: pulumi.String("Block"), // SourceContent: pulumi.String(".create table MyTable (Level:string, Timestamp:datetime, UserId:string, TraceId:string, Message:string, ProcessId:int32)"), // }) // if err != nil { // return err // } // example := storage.GetAccountBlobContainerSASOutput(ctx, storage.GetAccountBlobContainerSASOutputArgs{ // ConnectionString: exampleAccount.PrimaryConnectionString, // ContainerName: exampleContainer.Name, // HttpsOnly: pulumi.Bool(true), // Start: pulumi.String("2017-03-21"), // Expiry: pulumi.String("2022-03-21"), // Permissions: &storage.GetAccountBlobContainerSASPermissionsArgs{ // Read: pulumi.Bool(true), // Add: pulumi.Bool(false), // Create: pulumi.Bool(false), // Write: pulumi.Bool(true), // Delete: pulumi.Bool(false), // List: pulumi.Bool(true), // }, // }, nil) // _, err = kusto.NewScript(ctx, "example", &kusto.ScriptArgs{ // Name: pulumi.String("example"), // DatabaseId: exampleDatabase.ID(), // Url: exampleBlob.ID(), // SasToken: pulumi.String(example.ApplyT(func(example storage.GetAccountBlobContainerSASResult) (*string, error) { // return &example.Sas, nil // }).(pulumi.StringPtrOutput)), // ContinueOnErrorsEnabled: pulumi.Bool(true), // ForceAnUpdateWhenValueChanged: pulumi.String("first"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto Scripts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/script:Script example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/scripts/script1 // ``` type Script struct { pulumi.CustomResourceState // Flag that indicates whether to continue if one of the command fails. ContinueOnErrorsEnabled pulumi.BoolPtrOutput `pulumi:"continueOnErrorsEnabled"` // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. DatabaseId pulumi.StringOutput `pulumi:"databaseId"` // A unique string. If changed the script will be applied again. ForceAnUpdateWhenValueChanged pulumi.StringOutput `pulumi:"forceAnUpdateWhenValueChanged"` // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. Name pulumi.StringOutput `pulumi:"name"` // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. SasToken pulumi.StringPtrOutput `pulumi:"sasToken"` // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. ScriptContent pulumi.StringPtrOutput `pulumi:"scriptContent"` // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. Url pulumi.StringPtrOutput `pulumi:"url"` } // NewScript registers a new resource with the given unique name, arguments, and options. func NewScript(ctx *pulumi.Context, name string, args *ScriptArgs, opts ...pulumi.ResourceOption) (*Script, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DatabaseId == nil { return nil, errors.New("invalid value for required argument 'DatabaseId'") } if args.SasToken != nil { args.SasToken = pulumi.ToSecret(args.SasToken).(pulumi.StringPtrInput) } if args.ScriptContent != nil { args.ScriptContent = pulumi.ToSecret(args.ScriptContent).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sasToken", "scriptContent", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Script err := ctx.RegisterResource("azure:kusto/script:Script", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScript gets an existing Script 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 GetScript(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScriptState, opts ...pulumi.ResourceOption) (*Script, error) { var resource Script err := ctx.ReadResource("azure:kusto/script:Script", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Script resources. type scriptState struct { // Flag that indicates whether to continue if one of the command fails. ContinueOnErrorsEnabled *bool `pulumi:"continueOnErrorsEnabled"` // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. DatabaseId *string `pulumi:"databaseId"` // A unique string. If changed the script will be applied again. ForceAnUpdateWhenValueChanged *string `pulumi:"forceAnUpdateWhenValueChanged"` // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. Name *string `pulumi:"name"` // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. SasToken *string `pulumi:"sasToken"` // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. ScriptContent *string `pulumi:"scriptContent"` // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. Url *string `pulumi:"url"` } type ScriptState struct { // Flag that indicates whether to continue if one of the command fails. ContinueOnErrorsEnabled pulumi.BoolPtrInput // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. DatabaseId pulumi.StringPtrInput // A unique string. If changed the script will be applied again. ForceAnUpdateWhenValueChanged pulumi.StringPtrInput // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. Name pulumi.StringPtrInput // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. SasToken pulumi.StringPtrInput // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. ScriptContent pulumi.StringPtrInput // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. Url pulumi.StringPtrInput } func (ScriptState) ElementType() reflect.Type { return reflect.TypeOf((*scriptState)(nil)).Elem() } type scriptArgs struct { // Flag that indicates whether to continue if one of the command fails. ContinueOnErrorsEnabled *bool `pulumi:"continueOnErrorsEnabled"` // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. DatabaseId string `pulumi:"databaseId"` // A unique string. If changed the script will be applied again. ForceAnUpdateWhenValueChanged *string `pulumi:"forceAnUpdateWhenValueChanged"` // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. Name *string `pulumi:"name"` // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. SasToken *string `pulumi:"sasToken"` // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. ScriptContent *string `pulumi:"scriptContent"` // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. Url *string `pulumi:"url"` } // The set of arguments for constructing a Script resource. type ScriptArgs struct { // Flag that indicates whether to continue if one of the command fails. ContinueOnErrorsEnabled pulumi.BoolPtrInput // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. DatabaseId pulumi.StringInput // A unique string. If changed the script will be applied again. ForceAnUpdateWhenValueChanged pulumi.StringPtrInput // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. Name pulumi.StringPtrInput // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. SasToken pulumi.StringPtrInput // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. ScriptContent pulumi.StringPtrInput // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. Url pulumi.StringPtrInput } func (ScriptArgs) ElementType() reflect.Type { return reflect.TypeOf((*scriptArgs)(nil)).Elem() } type ScriptInput interface { pulumi.Input ToScriptOutput() ScriptOutput ToScriptOutputWithContext(ctx context.Context) ScriptOutput } func (*Script) ElementType() reflect.Type { return reflect.TypeOf((**Script)(nil)).Elem() } func (i *Script) ToScriptOutput() ScriptOutput { return i.ToScriptOutputWithContext(context.Background()) } func (i *Script) ToScriptOutputWithContext(ctx context.Context) ScriptOutput { return pulumi.ToOutputWithContext(ctx, i).(ScriptOutput) } // ScriptArrayInput is an input type that accepts ScriptArray and ScriptArrayOutput values. // You can construct a concrete instance of `ScriptArrayInput` via: // // ScriptArray{ ScriptArgs{...} } type ScriptArrayInput interface { pulumi.Input ToScriptArrayOutput() ScriptArrayOutput ToScriptArrayOutputWithContext(context.Context) ScriptArrayOutput } type ScriptArray []ScriptInput func (ScriptArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Script)(nil)).Elem() } func (i ScriptArray) ToScriptArrayOutput() ScriptArrayOutput { return i.ToScriptArrayOutputWithContext(context.Background()) } func (i ScriptArray) ToScriptArrayOutputWithContext(ctx context.Context) ScriptArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ScriptArrayOutput) } // ScriptMapInput is an input type that accepts ScriptMap and ScriptMapOutput values. // You can construct a concrete instance of `ScriptMapInput` via: // // ScriptMap{ "key": ScriptArgs{...} } type ScriptMapInput interface { pulumi.Input ToScriptMapOutput() ScriptMapOutput ToScriptMapOutputWithContext(context.Context) ScriptMapOutput } type ScriptMap map[string]ScriptInput func (ScriptMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Script)(nil)).Elem() } func (i ScriptMap) ToScriptMapOutput() ScriptMapOutput { return i.ToScriptMapOutputWithContext(context.Background()) } func (i ScriptMap) ToScriptMapOutputWithContext(ctx context.Context) ScriptMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ScriptMapOutput) } type ScriptOutput struct{ *pulumi.OutputState } func (ScriptOutput) ElementType() reflect.Type { return reflect.TypeOf((**Script)(nil)).Elem() } func (o ScriptOutput) ToScriptOutput() ScriptOutput { return o } func (o ScriptOutput) ToScriptOutputWithContext(ctx context.Context) ScriptOutput { return o } // Flag that indicates whether to continue if one of the command fails. func (o ScriptOutput) ContinueOnErrorsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Script) pulumi.BoolPtrOutput { return v.ContinueOnErrorsEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Kusto Database. Changing this forces a new Kusto Script to be created. func (o ScriptOutput) DatabaseId() pulumi.StringOutput { return o.ApplyT(func(v *Script) pulumi.StringOutput { return v.DatabaseId }).(pulumi.StringOutput) } // A unique string. If changed the script will be applied again. func (o ScriptOutput) ForceAnUpdateWhenValueChanged() pulumi.StringOutput { return o.ApplyT(func(v *Script) pulumi.StringOutput { return v.ForceAnUpdateWhenValueChanged }).(pulumi.StringOutput) } // The name which should be used for this Kusto Script. Changing this forces a new Kusto Script to be created. func (o ScriptOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Script) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The SAS token used to access the script. Must be provided when using scriptUrl property. Changing this forces a new resource to be created. func (o ScriptOutput) SasToken() pulumi.StringPtrOutput { return o.ApplyT(func(v *Script) pulumi.StringPtrOutput { return v.SasToken }).(pulumi.StringPtrOutput) } // The script content. This property should be used when the script is provide inline and not through file in a SA. Must not be used together with `url` and `sasToken` properties. Changing this forces a new resource to be created. func (o ScriptOutput) ScriptContent() pulumi.StringPtrOutput { return o.ApplyT(func(v *Script) pulumi.StringPtrOutput { return v.ScriptContent }).(pulumi.StringPtrOutput) } // The url to the KQL script blob file. Must not be used together with scriptContent property. Please reference [this documentation](https://docs.microsoft.com/azure/data-explorer/database-script) that describes the commands that are allowed in the script. func (o ScriptOutput) Url() pulumi.StringPtrOutput { return o.ApplyT(func(v *Script) pulumi.StringPtrOutput { return v.Url }).(pulumi.StringPtrOutput) } type ScriptArrayOutput struct{ *pulumi.OutputState } func (ScriptArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Script)(nil)).Elem() } func (o ScriptArrayOutput) ToScriptArrayOutput() ScriptArrayOutput { return o } func (o ScriptArrayOutput) ToScriptArrayOutputWithContext(ctx context.Context) ScriptArrayOutput { return o } func (o ScriptArrayOutput) Index(i pulumi.IntInput) ScriptOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Script { return vs[0].([]*Script)[vs[1].(int)] }).(ScriptOutput) } type ScriptMapOutput struct{ *pulumi.OutputState } func (ScriptMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Script)(nil)).Elem() } func (o ScriptMapOutput) ToScriptMapOutput() ScriptMapOutput { return o } func (o ScriptMapOutput) ToScriptMapOutputWithContext(ctx context.Context) ScriptMapOutput { return o } func (o ScriptMapOutput) MapIndex(k pulumi.StringInput) ScriptOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Script { return vs[0].(map[string]*Script)[vs[1].(string)] }).(ScriptOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ScriptInput)(nil)).Elem(), &Script{}) pulumi.RegisterInputType(reflect.TypeOf((*ScriptArrayInput)(nil)).Elem(), ScriptArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ScriptMapInput)(nil)).Elem(), ScriptMap{}) pulumi.RegisterOutputType(ScriptOutput{}) pulumi.RegisterOutputType(ScriptArrayOutput{}) pulumi.RegisterOutputType(ScriptMapOutput{}) }
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/kusto/clusterCustomerManagedKey.go
sdk/go/azure/kusto/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 kusto 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 Kusto 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/keyvault" // "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 { // 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 // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekv"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("kustocluster"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Standard_D13_v2"), // Capacity: pulumi.Int(2), // }, // Identity: &kusto.ClusterIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // cluster, err := keyvault.NewAccessPolicy(ctx, "cluster", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(exampleCluster.Identity.ApplyT(func(identity kusto.ClusterIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // }, // }) // if err != nil { // return err // } // client, err := keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Recover"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("tfex-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"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // client, // cluster, // })) // if err != nil { // return err // } // _, err = kusto.NewClusterCustomerManagedKey(ctx, "example", &kusto.ClusterCustomerManagedKeyArgs{ // ClusterId: exampleCluster.ID(), // KeyVaultId: exampleKeyVault.ID(), // KeyName: exampleKey.Name, // KeyVersion: exampleKey.Version, // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Customer Managed Keys for a Kusto Cluster can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/clusterCustomerManagedKey:ClusterCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1 // ``` type ClusterCustomerManagedKey struct { pulumi.CustomResourceState // The ID of the Kusto Cluster. Changing this forces a new resource to be created. ClusterId pulumi.StringOutput `pulumi:"clusterId"` // The name of Key Vault Key. KeyName pulumi.StringPtrOutput `pulumi:"keyName"` // The ID of the Key Vault for CMK encryption. KeyVaultId pulumi.StringPtrOutput `pulumi:"keyVaultId"` // The version of Key Vault Key. KeyVersion pulumi.StringPtrOutput `pulumi:"keyVersion"` // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. ManagedHsmKeyId pulumi.StringPtrOutput `pulumi:"managedHsmKeyId"` // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. UserIdentity pulumi.StringPtrOutput `pulumi:"userIdentity"` } // 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.ClusterId == nil { return nil, errors.New("invalid value for required argument 'ClusterId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ClusterCustomerManagedKey err := ctx.RegisterResource("azure:kusto/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:kusto/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 Kusto Cluster. Changing this forces a new resource to be created. ClusterId *string `pulumi:"clusterId"` // The name of Key Vault Key. KeyName *string `pulumi:"keyName"` // The ID of the Key Vault for CMK encryption. KeyVaultId *string `pulumi:"keyVaultId"` // The version of Key Vault Key. KeyVersion *string `pulumi:"keyVersion"` // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. UserIdentity *string `pulumi:"userIdentity"` } type ClusterCustomerManagedKeyState struct { // The ID of the Kusto Cluster. Changing this forces a new resource to be created. ClusterId pulumi.StringPtrInput // The name of Key Vault Key. KeyName pulumi.StringPtrInput // The ID of the Key Vault for CMK encryption. KeyVaultId pulumi.StringPtrInput // The version of Key Vault Key. KeyVersion pulumi.StringPtrInput // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. ManagedHsmKeyId pulumi.StringPtrInput // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. UserIdentity pulumi.StringPtrInput } func (ClusterCustomerManagedKeyState) ElementType() reflect.Type { return reflect.TypeOf((*clusterCustomerManagedKeyState)(nil)).Elem() } type clusterCustomerManagedKeyArgs struct { // The ID of the Kusto Cluster. Changing this forces a new resource to be created. ClusterId string `pulumi:"clusterId"` // The name of Key Vault Key. KeyName *string `pulumi:"keyName"` // The ID of the Key Vault for CMK encryption. KeyVaultId *string `pulumi:"keyVaultId"` // The version of Key Vault Key. KeyVersion *string `pulumi:"keyVersion"` // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"` // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. UserIdentity *string `pulumi:"userIdentity"` } // The set of arguments for constructing a ClusterCustomerManagedKey resource. type ClusterCustomerManagedKeyArgs struct { // The ID of the Kusto Cluster. Changing this forces a new resource to be created. ClusterId pulumi.StringInput // The name of Key Vault Key. KeyName pulumi.StringPtrInput // The ID of the Key Vault for CMK encryption. KeyVaultId pulumi.StringPtrInput // The version of Key Vault Key. KeyVersion pulumi.StringPtrInput // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. ManagedHsmKeyId pulumi.StringPtrInput // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. UserIdentity pulumi.StringPtrInput } 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 Kusto Cluster. Changing this forces a new resource to be created. func (o ClusterCustomerManagedKeyOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) } // The name of Key Vault Key. func (o ClusterCustomerManagedKeyOutput) KeyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringPtrOutput { return v.KeyName }).(pulumi.StringPtrOutput) } // The ID of the Key Vault for CMK encryption. func (o ClusterCustomerManagedKeyOutput) KeyVaultId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringPtrOutput { return v.KeyVaultId }).(pulumi.StringPtrOutput) } // The version of Key Vault Key. func (o ClusterCustomerManagedKeyOutput) KeyVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringPtrOutput { return v.KeyVersion }).(pulumi.StringPtrOutput) } // The Managed HSM Key ID for CMK encryption. // // > **Note:** Exactly one of `managedHsmKeyId` or `keyVaultId` must be specified. func (o ClusterCustomerManagedKeyOutput) ManagedHsmKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringPtrOutput { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput) } // The user assigned identity that has access to the Key Vault Key. If not specified, system assigned identity will be used. func (o ClusterCustomerManagedKeyOutput) UserIdentity() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterCustomerManagedKey) pulumi.StringPtrOutput { return v.UserIdentity }).(pulumi.StringPtrOutput) } 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/kusto/attachedDatabaseConfiguration.go
sdk/go/azure/kusto/attachedDatabaseConfiguration.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto (also known as Azure Data Explorer) Attached Database Configuration // // ## 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/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("my-kusto-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // followerCluster, err := kusto.NewCluster(ctx, "follower_cluster", &kusto.ClusterArgs{ // Name: pulumi.String("cluster1"), // 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 // } // followedCluster, err := kusto.NewCluster(ctx, "followed_cluster", &kusto.ClusterArgs{ // Name: pulumi.String("cluster2"), // 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 // } // _, err = kusto.NewDatabase(ctx, "followed_database", &kusto.DatabaseArgs{ // Name: pulumi.String("my-followed-database"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: followerCluster.Name, // }) // if err != nil { // return err // } // exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: followerCluster.Name, // }) // if err != nil { // return err // } // _, err = kusto.NewAttachedDatabaseConfiguration(ctx, "example", &kusto.AttachedDatabaseConfigurationArgs{ // Name: pulumi.String("configuration1"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: followerCluster.Name, // ClusterResourceId: followedCluster.ID(), // DatabaseName: exampleDatabase.Name, // Sharing: &kusto.AttachedDatabaseConfigurationSharingArgs{ // ExternalTablesToExcludes: pulumi.StringArray{ // pulumi.String("ExternalTable2"), // }, // ExternalTablesToIncludes: pulumi.StringArray{ // pulumi.String("ExternalTable1"), // }, // MaterializedViewsToExcludes: pulumi.StringArray{ // pulumi.String("MaterializedViewTable2"), // }, // MaterializedViewsToIncludes: pulumi.StringArray{ // pulumi.String("MaterializedViewTable1"), // }, // TablesToExcludes: pulumi.StringArray{ // pulumi.String("Table2"), // }, // TablesToIncludes: pulumi.StringArray{ // pulumi.String("Table1"), // }, // }, // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto Attached Database Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/attachedDatabaseConfigurations/configuration1 // ``` type AttachedDatabaseConfiguration struct { pulumi.CustomResourceState // The list of databases from the `clusterResourceId` which are currently attached to the cluster. AttachedDatabaseNames pulumi.StringArrayOutput `pulumi:"attachedDatabaseNames"` // The resource id of the cluster where the databases you would like to attach reside. ClusterId pulumi.StringOutput `pulumi:"clusterId"` // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ClusterName pulumi.StringOutput `pulumi:"clusterName"` // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. ClusterResourceId pulumi.StringOutput `pulumi:"clusterResourceId"` // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. DefaultPrincipalModificationKind pulumi.StringPtrOutput `pulumi:"defaultPrincipalModificationKind"` // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `sharing` block as defined below. Sharing AttachedDatabaseConfigurationSharingPtrOutput `pulumi:"sharing"` } // NewAttachedDatabaseConfiguration registers a new resource with the given unique name, arguments, and options. func NewAttachedDatabaseConfiguration(ctx *pulumi.Context, name string, args *AttachedDatabaseConfigurationArgs, opts ...pulumi.ResourceOption) (*AttachedDatabaseConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterName == nil { return nil, errors.New("invalid value for required argument 'ClusterName'") } if args.DatabaseName == nil { return nil, errors.New("invalid value for required argument 'DatabaseName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AttachedDatabaseConfiguration err := ctx.RegisterResource("azure:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAttachedDatabaseConfiguration gets an existing AttachedDatabaseConfiguration 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 GetAttachedDatabaseConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AttachedDatabaseConfigurationState, opts ...pulumi.ResourceOption) (*AttachedDatabaseConfiguration, error) { var resource AttachedDatabaseConfiguration err := ctx.ReadResource("azure:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AttachedDatabaseConfiguration resources. type attachedDatabaseConfigurationState struct { // The list of databases from the `clusterResourceId` which are currently attached to the cluster. AttachedDatabaseNames []string `pulumi:"attachedDatabaseNames"` // The resource id of the cluster where the databases you would like to attach reside. ClusterId *string `pulumi:"clusterId"` // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ClusterName *string `pulumi:"clusterName"` // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. ClusterResourceId *string `pulumi:"clusterResourceId"` // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. DatabaseName *string `pulumi:"databaseName"` // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. DefaultPrincipalModificationKind *string `pulumi:"defaultPrincipalModificationKind"` // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `sharing` block as defined below. Sharing *AttachedDatabaseConfigurationSharing `pulumi:"sharing"` } type AttachedDatabaseConfigurationState struct { // The list of databases from the `clusterResourceId` which are currently attached to the cluster. AttachedDatabaseNames pulumi.StringArrayInput // The resource id of the cluster where the databases you would like to attach reside. ClusterId pulumi.StringPtrInput // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ClusterName pulumi.StringPtrInput // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. ClusterResourceId pulumi.StringPtrInput // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. DatabaseName pulumi.StringPtrInput // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. DefaultPrincipalModificationKind pulumi.StringPtrInput // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `sharing` block as defined below. Sharing AttachedDatabaseConfigurationSharingPtrInput } func (AttachedDatabaseConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*attachedDatabaseConfigurationState)(nil)).Elem() } type attachedDatabaseConfigurationArgs struct { // The resource id of the cluster where the databases you would like to attach reside. ClusterId *string `pulumi:"clusterId"` // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ClusterName string `pulumi:"clusterName"` // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. ClusterResourceId *string `pulumi:"clusterResourceId"` // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. DatabaseName string `pulumi:"databaseName"` // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. DefaultPrincipalModificationKind *string `pulumi:"defaultPrincipalModificationKind"` // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `sharing` block as defined below. Sharing *AttachedDatabaseConfigurationSharing `pulumi:"sharing"` } // The set of arguments for constructing a AttachedDatabaseConfiguration resource. type AttachedDatabaseConfigurationArgs struct { // The resource id of the cluster where the databases you would like to attach reside. ClusterId pulumi.StringPtrInput // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ClusterName pulumi.StringInput // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. ClusterResourceId pulumi.StringPtrInput // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. DatabaseName pulumi.StringInput // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. DefaultPrincipalModificationKind pulumi.StringPtrInput // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `sharing` block as defined below. Sharing AttachedDatabaseConfigurationSharingPtrInput } func (AttachedDatabaseConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*attachedDatabaseConfigurationArgs)(nil)).Elem() } type AttachedDatabaseConfigurationInput interface { pulumi.Input ToAttachedDatabaseConfigurationOutput() AttachedDatabaseConfigurationOutput ToAttachedDatabaseConfigurationOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationOutput } func (*AttachedDatabaseConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**AttachedDatabaseConfiguration)(nil)).Elem() } func (i *AttachedDatabaseConfiguration) ToAttachedDatabaseConfigurationOutput() AttachedDatabaseConfigurationOutput { return i.ToAttachedDatabaseConfigurationOutputWithContext(context.Background()) } func (i *AttachedDatabaseConfiguration) ToAttachedDatabaseConfigurationOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationOutput) } // AttachedDatabaseConfigurationArrayInput is an input type that accepts AttachedDatabaseConfigurationArray and AttachedDatabaseConfigurationArrayOutput values. // You can construct a concrete instance of `AttachedDatabaseConfigurationArrayInput` via: // // AttachedDatabaseConfigurationArray{ AttachedDatabaseConfigurationArgs{...} } type AttachedDatabaseConfigurationArrayInput interface { pulumi.Input ToAttachedDatabaseConfigurationArrayOutput() AttachedDatabaseConfigurationArrayOutput ToAttachedDatabaseConfigurationArrayOutputWithContext(context.Context) AttachedDatabaseConfigurationArrayOutput } type AttachedDatabaseConfigurationArray []AttachedDatabaseConfigurationInput func (AttachedDatabaseConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AttachedDatabaseConfiguration)(nil)).Elem() } func (i AttachedDatabaseConfigurationArray) ToAttachedDatabaseConfigurationArrayOutput() AttachedDatabaseConfigurationArrayOutput { return i.ToAttachedDatabaseConfigurationArrayOutputWithContext(context.Background()) } func (i AttachedDatabaseConfigurationArray) ToAttachedDatabaseConfigurationArrayOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationArrayOutput) } // AttachedDatabaseConfigurationMapInput is an input type that accepts AttachedDatabaseConfigurationMap and AttachedDatabaseConfigurationMapOutput values. // You can construct a concrete instance of `AttachedDatabaseConfigurationMapInput` via: // // AttachedDatabaseConfigurationMap{ "key": AttachedDatabaseConfigurationArgs{...} } type AttachedDatabaseConfigurationMapInput interface { pulumi.Input ToAttachedDatabaseConfigurationMapOutput() AttachedDatabaseConfigurationMapOutput ToAttachedDatabaseConfigurationMapOutputWithContext(context.Context) AttachedDatabaseConfigurationMapOutput } type AttachedDatabaseConfigurationMap map[string]AttachedDatabaseConfigurationInput func (AttachedDatabaseConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AttachedDatabaseConfiguration)(nil)).Elem() } func (i AttachedDatabaseConfigurationMap) ToAttachedDatabaseConfigurationMapOutput() AttachedDatabaseConfigurationMapOutput { return i.ToAttachedDatabaseConfigurationMapOutputWithContext(context.Background()) } func (i AttachedDatabaseConfigurationMap) ToAttachedDatabaseConfigurationMapOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AttachedDatabaseConfigurationMapOutput) } type AttachedDatabaseConfigurationOutput struct{ *pulumi.OutputState } func (AttachedDatabaseConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**AttachedDatabaseConfiguration)(nil)).Elem() } func (o AttachedDatabaseConfigurationOutput) ToAttachedDatabaseConfigurationOutput() AttachedDatabaseConfigurationOutput { return o } func (o AttachedDatabaseConfigurationOutput) ToAttachedDatabaseConfigurationOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationOutput { return o } // The list of databases from the `clusterResourceId` which are currently attached to the cluster. func (o AttachedDatabaseConfigurationOutput) AttachedDatabaseNames() pulumi.StringArrayOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringArrayOutput { return v.AttachedDatabaseNames }).(pulumi.StringArrayOutput) } // The resource id of the cluster where the databases you would like to attach reside. func (o AttachedDatabaseConfigurationOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) } // Specifies the name of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. func (o AttachedDatabaseConfigurationOutput) ClusterName() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) } // Deprecated: `clusterResourceId` has been deprecated in favour of the `clusterId` property and will be removed in v5.0 of the AzureRM Provider. func (o AttachedDatabaseConfigurationOutput) ClusterResourceId() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.ClusterResourceId }).(pulumi.StringOutput) } // The name of the database which you would like to attach, use * if you want to follow all current and future databases. Changing this forces a new resource to be created. func (o AttachedDatabaseConfigurationOutput) DatabaseName() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) } // The default principals modification kind. Valid values are: `None` (default), `Replace` and `Union`. Defaults to `None`. func (o AttachedDatabaseConfigurationOutput) DefaultPrincipalModificationKind() pulumi.StringPtrOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringPtrOutput { return v.DefaultPrincipalModificationKind }).(pulumi.StringPtrOutput) } // Specifies the location of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. func (o AttachedDatabaseConfigurationOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Kusto Attached Database Configuration to create. Changing this forces a new resource to be created. func (o AttachedDatabaseConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the resource group of the Kusto Cluster for which the configuration will be created. Changing this forces a new resource to be created. func (o AttachedDatabaseConfigurationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `sharing` block as defined below. func (o AttachedDatabaseConfigurationOutput) Sharing() AttachedDatabaseConfigurationSharingPtrOutput { return o.ApplyT(func(v *AttachedDatabaseConfiguration) AttachedDatabaseConfigurationSharingPtrOutput { return v.Sharing }).(AttachedDatabaseConfigurationSharingPtrOutput) } type AttachedDatabaseConfigurationArrayOutput struct{ *pulumi.OutputState } func (AttachedDatabaseConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AttachedDatabaseConfiguration)(nil)).Elem() } func (o AttachedDatabaseConfigurationArrayOutput) ToAttachedDatabaseConfigurationArrayOutput() AttachedDatabaseConfigurationArrayOutput { return o } func (o AttachedDatabaseConfigurationArrayOutput) ToAttachedDatabaseConfigurationArrayOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationArrayOutput { return o } func (o AttachedDatabaseConfigurationArrayOutput) Index(i pulumi.IntInput) AttachedDatabaseConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AttachedDatabaseConfiguration { return vs[0].([]*AttachedDatabaseConfiguration)[vs[1].(int)] }).(AttachedDatabaseConfigurationOutput) } type AttachedDatabaseConfigurationMapOutput struct{ *pulumi.OutputState } func (AttachedDatabaseConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AttachedDatabaseConfiguration)(nil)).Elem() } func (o AttachedDatabaseConfigurationMapOutput) ToAttachedDatabaseConfigurationMapOutput() AttachedDatabaseConfigurationMapOutput { return o } func (o AttachedDatabaseConfigurationMapOutput) ToAttachedDatabaseConfigurationMapOutputWithContext(ctx context.Context) AttachedDatabaseConfigurationMapOutput { return o } func (o AttachedDatabaseConfigurationMapOutput) MapIndex(k pulumi.StringInput) AttachedDatabaseConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AttachedDatabaseConfiguration { return vs[0].(map[string]*AttachedDatabaseConfiguration)[vs[1].(string)] }).(AttachedDatabaseConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AttachedDatabaseConfigurationInput)(nil)).Elem(), &AttachedDatabaseConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*AttachedDatabaseConfigurationArrayInput)(nil)).Elem(), AttachedDatabaseConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AttachedDatabaseConfigurationMapInput)(nil)).Elem(), AttachedDatabaseConfigurationMap{}) pulumi.RegisterOutputType(AttachedDatabaseConfigurationOutput{}) pulumi.RegisterOutputType(AttachedDatabaseConfigurationArrayOutput{}) pulumi.RegisterOutputType(AttachedDatabaseConfigurationMapOutput{}) }
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/kusto/clusterManagedPrivateEndpoint.go
sdk/go/azure/kusto/clusterManagedPrivateEndpoint.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Managed Private Endpoint for a Kusto 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/kusto" // "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 { // _, 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 // } // 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 // } // 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("LRS"), // }) // if err != nil { // return err // } // _, err = kusto.NewClusterManagedPrivateEndpoint(ctx, "example", &kusto.ClusterManagedPrivateEndpointArgs{ // Name: pulumi.String("examplempe"), // ResourceGroupName: example.Name, // ClusterName: exampleCluster.Name, // PrivateLinkResourceId: exampleAccount.ID(), // PrivateLinkResourceRegion: exampleAccount.Location, // GroupId: pulumi.String("blob"), // RequestMessage: pulumi.String("Please Approve"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Managed Private Endpoint for a Kusto Cluster can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/managedPrivateEndpoints/managedPrivateEndpoint1 // ``` type ClusterManagedPrivateEndpoint struct { pulumi.CustomResourceState // The name of the Kusto Cluster. Changing this forces a new resource to be created. ClusterName pulumi.StringOutput `pulumi:"clusterName"` // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. GroupId pulumi.StringOutput `pulumi:"groupId"` // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceId pulumi.StringOutput `pulumi:"privateLinkResourceId"` // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceRegion pulumi.StringPtrOutput `pulumi:"privateLinkResourceRegion"` // The user request message. RequestMessage pulumi.StringPtrOutput `pulumi:"requestMessage"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewClusterManagedPrivateEndpoint registers a new resource with the given unique name, arguments, and options. func NewClusterManagedPrivateEndpoint(ctx *pulumi.Context, name string, args *ClusterManagedPrivateEndpointArgs, opts ...pulumi.ResourceOption) (*ClusterManagedPrivateEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterName == nil { return nil, errors.New("invalid value for required argument 'ClusterName'") } if args.GroupId == nil { return nil, errors.New("invalid value for required argument 'GroupId'") } if args.PrivateLinkResourceId == nil { return nil, errors.New("invalid value for required argument 'PrivateLinkResourceId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ClusterManagedPrivateEndpoint err := ctx.RegisterResource("azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetClusterManagedPrivateEndpoint gets an existing ClusterManagedPrivateEndpoint 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 GetClusterManagedPrivateEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ClusterManagedPrivateEndpointState, opts ...pulumi.ResourceOption) (*ClusterManagedPrivateEndpoint, error) { var resource ClusterManagedPrivateEndpoint err := ctx.ReadResource("azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ClusterManagedPrivateEndpoint resources. type clusterManagedPrivateEndpointState struct { // The name of the Kusto Cluster. Changing this forces a new resource to be created. ClusterName *string `pulumi:"clusterName"` // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. GroupId *string `pulumi:"groupId"` // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceId *string `pulumi:"privateLinkResourceId"` // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceRegion *string `pulumi:"privateLinkResourceRegion"` // The user request message. RequestMessage *string `pulumi:"requestMessage"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ClusterManagedPrivateEndpointState struct { // The name of the Kusto Cluster. Changing this forces a new resource to be created. ClusterName pulumi.StringPtrInput // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. GroupId pulumi.StringPtrInput // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceId pulumi.StringPtrInput // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceRegion pulumi.StringPtrInput // The user request message. RequestMessage pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ClusterManagedPrivateEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*clusterManagedPrivateEndpointState)(nil)).Elem() } type clusterManagedPrivateEndpointArgs struct { // The name of the Kusto Cluster. Changing this forces a new resource to be created. ClusterName string `pulumi:"clusterName"` // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. GroupId string `pulumi:"groupId"` // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceId string `pulumi:"privateLinkResourceId"` // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceRegion *string `pulumi:"privateLinkResourceRegion"` // The user request message. RequestMessage *string `pulumi:"requestMessage"` // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ClusterManagedPrivateEndpoint resource. type ClusterManagedPrivateEndpointArgs struct { // The name of the Kusto Cluster. Changing this forces a new resource to be created. ClusterName pulumi.StringInput // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. GroupId pulumi.StringInput // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceId pulumi.StringInput // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. PrivateLinkResourceRegion pulumi.StringPtrInput // The user request message. RequestMessage pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ClusterManagedPrivateEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*clusterManagedPrivateEndpointArgs)(nil)).Elem() } type ClusterManagedPrivateEndpointInput interface { pulumi.Input ToClusterManagedPrivateEndpointOutput() ClusterManagedPrivateEndpointOutput ToClusterManagedPrivateEndpointOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointOutput } func (*ClusterManagedPrivateEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**ClusterManagedPrivateEndpoint)(nil)).Elem() } func (i *ClusterManagedPrivateEndpoint) ToClusterManagedPrivateEndpointOutput() ClusterManagedPrivateEndpointOutput { return i.ToClusterManagedPrivateEndpointOutputWithContext(context.Background()) } func (i *ClusterManagedPrivateEndpoint) ToClusterManagedPrivateEndpointOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterManagedPrivateEndpointOutput) } // ClusterManagedPrivateEndpointArrayInput is an input type that accepts ClusterManagedPrivateEndpointArray and ClusterManagedPrivateEndpointArrayOutput values. // You can construct a concrete instance of `ClusterManagedPrivateEndpointArrayInput` via: // // ClusterManagedPrivateEndpointArray{ ClusterManagedPrivateEndpointArgs{...} } type ClusterManagedPrivateEndpointArrayInput interface { pulumi.Input ToClusterManagedPrivateEndpointArrayOutput() ClusterManagedPrivateEndpointArrayOutput ToClusterManagedPrivateEndpointArrayOutputWithContext(context.Context) ClusterManagedPrivateEndpointArrayOutput } type ClusterManagedPrivateEndpointArray []ClusterManagedPrivateEndpointInput func (ClusterManagedPrivateEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ClusterManagedPrivateEndpoint)(nil)).Elem() } func (i ClusterManagedPrivateEndpointArray) ToClusterManagedPrivateEndpointArrayOutput() ClusterManagedPrivateEndpointArrayOutput { return i.ToClusterManagedPrivateEndpointArrayOutputWithContext(context.Background()) } func (i ClusterManagedPrivateEndpointArray) ToClusterManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterManagedPrivateEndpointArrayOutput) } // ClusterManagedPrivateEndpointMapInput is an input type that accepts ClusterManagedPrivateEndpointMap and ClusterManagedPrivateEndpointMapOutput values. // You can construct a concrete instance of `ClusterManagedPrivateEndpointMapInput` via: // // ClusterManagedPrivateEndpointMap{ "key": ClusterManagedPrivateEndpointArgs{...} } type ClusterManagedPrivateEndpointMapInput interface { pulumi.Input ToClusterManagedPrivateEndpointMapOutput() ClusterManagedPrivateEndpointMapOutput ToClusterManagedPrivateEndpointMapOutputWithContext(context.Context) ClusterManagedPrivateEndpointMapOutput } type ClusterManagedPrivateEndpointMap map[string]ClusterManagedPrivateEndpointInput func (ClusterManagedPrivateEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ClusterManagedPrivateEndpoint)(nil)).Elem() } func (i ClusterManagedPrivateEndpointMap) ToClusterManagedPrivateEndpointMapOutput() ClusterManagedPrivateEndpointMapOutput { return i.ToClusterManagedPrivateEndpointMapOutputWithContext(context.Background()) } func (i ClusterManagedPrivateEndpointMap) ToClusterManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ClusterManagedPrivateEndpointMapOutput) } type ClusterManagedPrivateEndpointOutput struct{ *pulumi.OutputState } func (ClusterManagedPrivateEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**ClusterManagedPrivateEndpoint)(nil)).Elem() } func (o ClusterManagedPrivateEndpointOutput) ToClusterManagedPrivateEndpointOutput() ClusterManagedPrivateEndpointOutput { return o } func (o ClusterManagedPrivateEndpointOutput) ToClusterManagedPrivateEndpointOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointOutput { return o } // The name of the Kusto Cluster. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) ClusterName() pulumi.StringOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) } // The group id in which the managed private endpoint is created. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) GroupId() pulumi.StringOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput) } // The name of the Managed Private Endpoints to create. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ARM resource ID of the resource for which the managed private endpoint is created. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) PrivateLinkResourceId() pulumi.StringOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringOutput { return v.PrivateLinkResourceId }).(pulumi.StringOutput) } // The region of the resource to which the managed private endpoint is created. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) PrivateLinkResourceRegion() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringPtrOutput { return v.PrivateLinkResourceRegion }).(pulumi.StringPtrOutput) } // The user request message. func (o ClusterManagedPrivateEndpointOutput) RequestMessage() pulumi.StringPtrOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringPtrOutput { return v.RequestMessage }).(pulumi.StringPtrOutput) } // Specifies the Resource Group where the Kusto Cluster should exist. Changing this forces a new resource to be created. func (o ClusterManagedPrivateEndpointOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ClusterManagedPrivateEndpoint) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ClusterManagedPrivateEndpointArrayOutput struct{ *pulumi.OutputState } func (ClusterManagedPrivateEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ClusterManagedPrivateEndpoint)(nil)).Elem() } func (o ClusterManagedPrivateEndpointArrayOutput) ToClusterManagedPrivateEndpointArrayOutput() ClusterManagedPrivateEndpointArrayOutput { return o } func (o ClusterManagedPrivateEndpointArrayOutput) ToClusterManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointArrayOutput { return o } func (o ClusterManagedPrivateEndpointArrayOutput) Index(i pulumi.IntInput) ClusterManagedPrivateEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterManagedPrivateEndpoint { return vs[0].([]*ClusterManagedPrivateEndpoint)[vs[1].(int)] }).(ClusterManagedPrivateEndpointOutput) } type ClusterManagedPrivateEndpointMapOutput struct{ *pulumi.OutputState } func (ClusterManagedPrivateEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ClusterManagedPrivateEndpoint)(nil)).Elem() } func (o ClusterManagedPrivateEndpointMapOutput) ToClusterManagedPrivateEndpointMapOutput() ClusterManagedPrivateEndpointMapOutput { return o } func (o ClusterManagedPrivateEndpointMapOutput) ToClusterManagedPrivateEndpointMapOutputWithContext(ctx context.Context) ClusterManagedPrivateEndpointMapOutput { return o } func (o ClusterManagedPrivateEndpointMapOutput) MapIndex(k pulumi.StringInput) ClusterManagedPrivateEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterManagedPrivateEndpoint { return vs[0].(map[string]*ClusterManagedPrivateEndpoint)[vs[1].(string)] }).(ClusterManagedPrivateEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ClusterManagedPrivateEndpointInput)(nil)).Elem(), &ClusterManagedPrivateEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*ClusterManagedPrivateEndpointArrayInput)(nil)).Elem(), ClusterManagedPrivateEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ClusterManagedPrivateEndpointMapInput)(nil)).Elem(), ClusterManagedPrivateEndpointMap{}) pulumi.RegisterOutputType(ClusterManagedPrivateEndpointOutput{}) pulumi.RegisterOutputType(ClusterManagedPrivateEndpointArrayOutput{}) pulumi.RegisterOutputType(ClusterManagedPrivateEndpointMapOutput{}) }
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/kusto/cosmosdbDataConnection.go
sdk/go/azure/kusto/cosmosdbDataConnection.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto / Cosmos Database Data Connection. // // ## 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/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb" // "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 { // _, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exampleRG"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // builtin, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // RoleDefinitionId: pulumi.StringRef("fbdf93bf-df7d-467e-a4d2-9458aa1360c8"), // }, nil) // if err != nil { // return err // } // exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("examplekc"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Dev(No SLA)_Standard_D11_v2"), // Capacity: pulumi.Int(1), // }, // Identity: &kusto.ClusterIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Scope: exampleResourceGroup.ID(), // RoleDefinitionName: pulumi.String(builtin.Name), // PrincipalId: pulumi.String(exampleCluster.Identity.ApplyT(func(identity kusto.ClusterIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{ // Name: pulumi.String("example-ca"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // OfferType: pulumi.String("Standard"), // Kind: pulumi.String("GlobalDocumentDB"), // ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{ // ConsistencyLevel: pulumi.String("Session"), // MaxIntervalInSeconds: pulumi.Int(5), // MaxStalenessPrefix: pulumi.Int(100), // }, // GeoLocations: cosmosdb.AccountGeoLocationArray{ // &cosmosdb.AccountGeoLocationArgs{ // Location: exampleResourceGroup.Location, // FailoverPriority: pulumi.Int(0), // }, // }, // }) // if err != nil { // return err // } // exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{ // Name: pulumi.String("examplecosmosdbsqldb"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // exampleSqlContainer, err := cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{ // Name: pulumi.String("examplecosmosdbsqlcon"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // DatabaseName: exampleSqlDatabase.Name, // PartitionKeyPath: "/part", // Throughput: pulumi.Int(400), // }) // if err != nil { // return err // } // example := cosmosdb.LookupSqlRoleDefinitionOutput(ctx, cosmosdb.GetSqlRoleDefinitionOutputArgs{ // RoleDefinitionId: pulumi.String("00000000-0000-0000-0000-000000000001"), // ResourceGroupName: exampleResourceGroup.Name, // AccountName: exampleAccount.Name, // }, nil) // _, err = cosmosdb.NewSqlRoleAssignment(ctx, "example", &cosmosdb.SqlRoleAssignmentArgs{ // ResourceGroupName: exampleResourceGroup.Name, // AccountName: exampleAccount.Name, // RoleDefinitionId: pulumi.String(example.ApplyT(func(example cosmosdb.GetSqlRoleDefinitionResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // PrincipalId: pulumi.String(exampleCluster.Identity.ApplyT(func(identity kusto.ClusterIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // Scope: exampleAccount.ID(), // }) // if err != nil { // return err // } // exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{ // Name: pulumi.String("examplekd"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // ClusterName: exampleCluster.Name, // }) // if err != nil { // return err // } // _, err = kusto.NewScript(ctx, "example", &kusto.ScriptArgs{ // Name: pulumi.String("create-table-script"), // DatabaseId: exampleDatabase.ID(), // ScriptContent: pulumi.String(`.create table TestTable(Id:string, Name:string, _ts:long, _timestamp:datetime) // // .create table TestTable ingestion json mapping \"TestMapping\" // '[' // ' {\"column\":\"Id\",\"path\":\"$.id\"},' // ' {\"column\":\"Name\",\"path\":\"$.name\"},' // ' {\"column\":\"_ts\",\"path\":\"$._ts\"},' // ' {\"column\":\"_timestamp\",\"path\":\"$._ts\", \"transform\":\"DateTimeFromUnixSeconds\"}' // ']' // .alter table TestTable policy ingestionbatching \"{'MaximumBatchingTimeSpan': '0:0:10', 'MaximumNumberOfItems': 10000}\" // `), // // }) // if err != nil { // return err // } // _, err = kusto.NewCosmosdbDataConnection(ctx, "example", &kusto.CosmosdbDataConnectionArgs{ // Name: pulumi.String("examplekcdcd"), // Location: exampleResourceGroup.Location, // CosmosdbContainerId: exampleSqlContainer.ID(), // KustoDatabaseId: exampleDatabase.ID(), // ManagedIdentityId: exampleCluster.ID(), // TableName: pulumi.String("TestTable"), // MappingRuleName: pulumi.String("TestMapping"), // RetrievalStartDate: pulumi.String("2023-06-26T12:00:00.6554616Z"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto / Cosmos Database Data Connection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/cosmosdbDataConnection:CosmosdbDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1 // ``` type CosmosdbDataConnection struct { pulumi.CustomResourceState // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. CosmosdbContainerId pulumi.StringOutput `pulumi:"cosmosdbContainerId"` // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. KustoDatabaseId pulumi.StringOutput `pulumi:"kustoDatabaseId"` // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. Location pulumi.StringOutput `pulumi:"location"` // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. ManagedIdentityId pulumi.StringOutput `pulumi:"managedIdentityId"` // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. MappingRuleName pulumi.StringPtrOutput `pulumi:"mappingRuleName"` // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. RetrievalStartDate pulumi.StringPtrOutput `pulumi:"retrievalStartDate"` // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. TableName pulumi.StringOutput `pulumi:"tableName"` } // NewCosmosdbDataConnection registers a new resource with the given unique name, arguments, and options. func NewCosmosdbDataConnection(ctx *pulumi.Context, name string, args *CosmosdbDataConnectionArgs, opts ...pulumi.ResourceOption) (*CosmosdbDataConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CosmosdbContainerId == nil { return nil, errors.New("invalid value for required argument 'CosmosdbContainerId'") } if args.KustoDatabaseId == nil { return nil, errors.New("invalid value for required argument 'KustoDatabaseId'") } if args.ManagedIdentityId == nil { return nil, errors.New("invalid value for required argument 'ManagedIdentityId'") } if args.TableName == nil { return nil, errors.New("invalid value for required argument 'TableName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CosmosdbDataConnection err := ctx.RegisterResource("azure:kusto/cosmosdbDataConnection:CosmosdbDataConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCosmosdbDataConnection gets an existing CosmosdbDataConnection 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 GetCosmosdbDataConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CosmosdbDataConnectionState, opts ...pulumi.ResourceOption) (*CosmosdbDataConnection, error) { var resource CosmosdbDataConnection err := ctx.ReadResource("azure:kusto/cosmosdbDataConnection:CosmosdbDataConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CosmosdbDataConnection resources. type cosmosdbDataConnectionState struct { // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. CosmosdbContainerId *string `pulumi:"cosmosdbContainerId"` // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. KustoDatabaseId *string `pulumi:"kustoDatabaseId"` // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. Location *string `pulumi:"location"` // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. ManagedIdentityId *string `pulumi:"managedIdentityId"` // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. Name *string `pulumi:"name"` // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. RetrievalStartDate *string `pulumi:"retrievalStartDate"` // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. TableName *string `pulumi:"tableName"` } type CosmosdbDataConnectionState struct { // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. CosmosdbContainerId pulumi.StringPtrInput // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. KustoDatabaseId pulumi.StringPtrInput // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. Location pulumi.StringPtrInput // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. ManagedIdentityId pulumi.StringPtrInput // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. MappingRuleName pulumi.StringPtrInput // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. Name pulumi.StringPtrInput // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. RetrievalStartDate pulumi.StringPtrInput // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. TableName pulumi.StringPtrInput } func (CosmosdbDataConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*cosmosdbDataConnectionState)(nil)).Elem() } type cosmosdbDataConnectionArgs struct { // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. CosmosdbContainerId string `pulumi:"cosmosdbContainerId"` // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. KustoDatabaseId string `pulumi:"kustoDatabaseId"` // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. Location *string `pulumi:"location"` // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. ManagedIdentityId string `pulumi:"managedIdentityId"` // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. Name *string `pulumi:"name"` // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. RetrievalStartDate *string `pulumi:"retrievalStartDate"` // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. TableName string `pulumi:"tableName"` } // The set of arguments for constructing a CosmosdbDataConnection resource. type CosmosdbDataConnectionArgs struct { // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. CosmosdbContainerId pulumi.StringInput // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. KustoDatabaseId pulumi.StringInput // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. Location pulumi.StringPtrInput // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. ManagedIdentityId pulumi.StringInput // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. MappingRuleName pulumi.StringPtrInput // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. Name pulumi.StringPtrInput // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. RetrievalStartDate pulumi.StringPtrInput // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. TableName pulumi.StringInput } func (CosmosdbDataConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*cosmosdbDataConnectionArgs)(nil)).Elem() } type CosmosdbDataConnectionInput interface { pulumi.Input ToCosmosdbDataConnectionOutput() CosmosdbDataConnectionOutput ToCosmosdbDataConnectionOutputWithContext(ctx context.Context) CosmosdbDataConnectionOutput } func (*CosmosdbDataConnection) ElementType() reflect.Type { return reflect.TypeOf((**CosmosdbDataConnection)(nil)).Elem() } func (i *CosmosdbDataConnection) ToCosmosdbDataConnectionOutput() CosmosdbDataConnectionOutput { return i.ToCosmosdbDataConnectionOutputWithContext(context.Background()) } func (i *CosmosdbDataConnection) ToCosmosdbDataConnectionOutputWithContext(ctx context.Context) CosmosdbDataConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(CosmosdbDataConnectionOutput) } // CosmosdbDataConnectionArrayInput is an input type that accepts CosmosdbDataConnectionArray and CosmosdbDataConnectionArrayOutput values. // You can construct a concrete instance of `CosmosdbDataConnectionArrayInput` via: // // CosmosdbDataConnectionArray{ CosmosdbDataConnectionArgs{...} } type CosmosdbDataConnectionArrayInput interface { pulumi.Input ToCosmosdbDataConnectionArrayOutput() CosmosdbDataConnectionArrayOutput ToCosmosdbDataConnectionArrayOutputWithContext(context.Context) CosmosdbDataConnectionArrayOutput } type CosmosdbDataConnectionArray []CosmosdbDataConnectionInput func (CosmosdbDataConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CosmosdbDataConnection)(nil)).Elem() } func (i CosmosdbDataConnectionArray) ToCosmosdbDataConnectionArrayOutput() CosmosdbDataConnectionArrayOutput { return i.ToCosmosdbDataConnectionArrayOutputWithContext(context.Background()) } func (i CosmosdbDataConnectionArray) ToCosmosdbDataConnectionArrayOutputWithContext(ctx context.Context) CosmosdbDataConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CosmosdbDataConnectionArrayOutput) } // CosmosdbDataConnectionMapInput is an input type that accepts CosmosdbDataConnectionMap and CosmosdbDataConnectionMapOutput values. // You can construct a concrete instance of `CosmosdbDataConnectionMapInput` via: // // CosmosdbDataConnectionMap{ "key": CosmosdbDataConnectionArgs{...} } type CosmosdbDataConnectionMapInput interface { pulumi.Input ToCosmosdbDataConnectionMapOutput() CosmosdbDataConnectionMapOutput ToCosmosdbDataConnectionMapOutputWithContext(context.Context) CosmosdbDataConnectionMapOutput } type CosmosdbDataConnectionMap map[string]CosmosdbDataConnectionInput func (CosmosdbDataConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CosmosdbDataConnection)(nil)).Elem() } func (i CosmosdbDataConnectionMap) ToCosmosdbDataConnectionMapOutput() CosmosdbDataConnectionMapOutput { return i.ToCosmosdbDataConnectionMapOutputWithContext(context.Background()) } func (i CosmosdbDataConnectionMap) ToCosmosdbDataConnectionMapOutputWithContext(ctx context.Context) CosmosdbDataConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CosmosdbDataConnectionMapOutput) } type CosmosdbDataConnectionOutput struct{ *pulumi.OutputState } func (CosmosdbDataConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**CosmosdbDataConnection)(nil)).Elem() } func (o CosmosdbDataConnectionOutput) ToCosmosdbDataConnectionOutput() CosmosdbDataConnectionOutput { return o } func (o CosmosdbDataConnectionOutput) ToCosmosdbDataConnectionOutputWithContext(ctx context.Context) CosmosdbDataConnectionOutput { return o } // The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) CosmosdbContainerId() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.CosmosdbContainerId }).(pulumi.StringOutput) } // The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) KustoDatabaseId() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.KustoDatabaseId }).(pulumi.StringOutput) } // The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) ManagedIdentityId() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.ManagedIdentityId }).(pulumi.StringOutput) } // The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) MappingRuleName() pulumi.StringPtrOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringPtrOutput { return v.MappingRuleName }).(pulumi.StringPtrOutput) } // The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) RetrievalStartDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringPtrOutput { return v.RetrievalStartDate }).(pulumi.StringPtrOutput) } // The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created. func (o CosmosdbDataConnectionOutput) TableName() pulumi.StringOutput { return o.ApplyT(func(v *CosmosdbDataConnection) pulumi.StringOutput { return v.TableName }).(pulumi.StringOutput) } type CosmosdbDataConnectionArrayOutput struct{ *pulumi.OutputState } func (CosmosdbDataConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CosmosdbDataConnection)(nil)).Elem() } func (o CosmosdbDataConnectionArrayOutput) ToCosmosdbDataConnectionArrayOutput() CosmosdbDataConnectionArrayOutput { return o } func (o CosmosdbDataConnectionArrayOutput) ToCosmosdbDataConnectionArrayOutputWithContext(ctx context.Context) CosmosdbDataConnectionArrayOutput { return o } func (o CosmosdbDataConnectionArrayOutput) Index(i pulumi.IntInput) CosmosdbDataConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CosmosdbDataConnection { return vs[0].([]*CosmosdbDataConnection)[vs[1].(int)] }).(CosmosdbDataConnectionOutput) } type CosmosdbDataConnectionMapOutput struct{ *pulumi.OutputState } func (CosmosdbDataConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CosmosdbDataConnection)(nil)).Elem() } func (o CosmosdbDataConnectionMapOutput) ToCosmosdbDataConnectionMapOutput() CosmosdbDataConnectionMapOutput { return o } func (o CosmosdbDataConnectionMapOutput) ToCosmosdbDataConnectionMapOutputWithContext(ctx context.Context) CosmosdbDataConnectionMapOutput { return o } func (o CosmosdbDataConnectionMapOutput) MapIndex(k pulumi.StringInput) CosmosdbDataConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CosmosdbDataConnection { return vs[0].(map[string]*CosmosdbDataConnection)[vs[1].(string)] }).(CosmosdbDataConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CosmosdbDataConnectionInput)(nil)).Elem(), &CosmosdbDataConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*CosmosdbDataConnectionArrayInput)(nil)).Elem(), CosmosdbDataConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CosmosdbDataConnectionMapInput)(nil)).Elem(), CosmosdbDataConnectionMap{}) pulumi.RegisterOutputType(CosmosdbDataConnectionOutput{}) pulumi.RegisterOutputType(CosmosdbDataConnectionArrayOutput{}) pulumi.RegisterOutputType(CosmosdbDataConnectionMapOutput{}) }
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/kusto/iotHubDataConnection.go
sdk/go/azure/kusto/iotHubDataConnection.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 kusto import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Kusto (also known as Azure Data Explorer) IotHub Data Connection // // ## 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/iot" // "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 // } // exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{ // Name: pulumi.String("examplekustocluster"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &kusto.ClusterSkuArgs{ // Name: pulumi.String("Standard_D13_v2"), // Capacity: pulumi.Int(2), // }, // }) // 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, // HotCachePeriod: pulumi.String("P7D"), // SoftDeletePeriod: pulumi.String("P31D"), // }) // if err != nil { // return err // } // exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{ // Name: pulumi.String("exampleIoTHub"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: &iot.IoTHubSkuArgs{ // Name: pulumi.String("B1"), // Capacity: pulumi.Int(1), // }, // }) // if err != nil { // return err // } // exampleSharedAccessPolicy, err := iot.NewSharedAccessPolicy(ctx, "example", &iot.SharedAccessPolicyArgs{ // Name: pulumi.String("example-shared-access-policy"), // ResourceGroupName: example.Name, // IothubName: exampleIoTHub.Name, // RegistryRead: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleConsumerGroup, err := iot.NewConsumerGroup(ctx, "example", &iot.ConsumerGroupArgs{ // Name: pulumi.String("example-consumer-group"), // ResourceGroupName: example.Name, // IothubName: exampleIoTHub.Name, // EventhubEndpointName: pulumi.String("events"), // }) // if err != nil { // return err // } // _, err = kusto.NewIotHubDataConnection(ctx, "example", &kusto.IotHubDataConnectionArgs{ // Name: pulumi.String("my-kusto-iothub-data-connection"), // ResourceGroupName: example.Name, // Location: example.Location, // ClusterName: exampleCluster.Name, // DatabaseName: exampleDatabase.Name, // IothubId: exampleIoTHub.ID(), // ConsumerGroup: exampleConsumerGroup.Name, // SharedAccessPolicyName: exampleSharedAccessPolicy.Name, // EventSystemProperties: pulumi.StringArray{ // pulumi.String("message-id"), // pulumi.String("sequence-number"), // pulumi.String("to"), // }, // TableName: pulumi.String("my-table"), // MappingRuleName: pulumi.String("my-table-mapping"), // DataFormat: pulumi.String("JSON"), // }) // 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.Kusto` - 2024-04-13 // // ## Import // // Kusto IotHub Data Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:kusto/iotHubDataConnection:IotHubDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1 // ``` type IotHubDataConnection struct { pulumi.CustomResourceState // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringOutput `pulumi:"clusterName"` // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringOutput `pulumi:"consumerGroup"` // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. DataFormat pulumi.StringPtrOutput `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrOutput `pulumi:"databaseRoutingType"` // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. EventSystemProperties pulumi.StringArrayOutput `pulumi:"eventSystemProperties"` // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. IothubId pulumi.StringOutput `pulumi:"iothubId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. MappingRuleName pulumi.StringPtrOutput `pulumi:"mappingRuleName"` // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. SharedAccessPolicyName pulumi.StringOutput `pulumi:"sharedAccessPolicyName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. TableName pulumi.StringPtrOutput `pulumi:"tableName"` } // NewIotHubDataConnection registers a new resource with the given unique name, arguments, and options. func NewIotHubDataConnection(ctx *pulumi.Context, name string, args *IotHubDataConnectionArgs, opts ...pulumi.ResourceOption) (*IotHubDataConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ClusterName == nil { return nil, errors.New("invalid value for required argument 'ClusterName'") } if args.ConsumerGroup == nil { return nil, errors.New("invalid value for required argument 'ConsumerGroup'") } if args.DatabaseName == nil { return nil, errors.New("invalid value for required argument 'DatabaseName'") } if args.IothubId == nil { return nil, errors.New("invalid value for required argument 'IothubId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SharedAccessPolicyName == nil { return nil, errors.New("invalid value for required argument 'SharedAccessPolicyName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource IotHubDataConnection err := ctx.RegisterResource("azure:kusto/iotHubDataConnection:IotHubDataConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetIotHubDataConnection gets an existing IotHubDataConnection 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 GetIotHubDataConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IotHubDataConnectionState, opts ...pulumi.ResourceOption) (*IotHubDataConnection, error) { var resource IotHubDataConnection err := ctx.ReadResource("azure:kusto/iotHubDataConnection:IotHubDataConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering IotHubDataConnection resources. type iotHubDataConnectionState struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName *string `pulumi:"clusterName"` // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup *string `pulumi:"consumerGroup"` // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. DataFormat *string `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName *string `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType *string `pulumi:"databaseRoutingType"` // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. EventSystemProperties []string `pulumi:"eventSystemProperties"` // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. IothubId *string `pulumi:"iothubId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. SharedAccessPolicyName *string `pulumi:"sharedAccessPolicyName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. TableName *string `pulumi:"tableName"` } type IotHubDataConnectionState struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringPtrInput // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringPtrInput // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. DataFormat pulumi.StringPtrInput // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringPtrInput // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrInput // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. EventSystemProperties pulumi.StringArrayInput // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. IothubId pulumi.StringPtrInput // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. MappingRuleName pulumi.StringPtrInput // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. SharedAccessPolicyName pulumi.StringPtrInput // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. TableName pulumi.StringPtrInput } func (IotHubDataConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*iotHubDataConnectionState)(nil)).Elem() } type iotHubDataConnectionArgs struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName string `pulumi:"clusterName"` // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup string `pulumi:"consumerGroup"` // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. DataFormat *string `pulumi:"dataFormat"` // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName string `pulumi:"databaseName"` // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType *string `pulumi:"databaseRoutingType"` // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. EventSystemProperties []string `pulumi:"eventSystemProperties"` // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. IothubId string `pulumi:"iothubId"` // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. MappingRuleName *string `pulumi:"mappingRuleName"` // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. SharedAccessPolicyName string `pulumi:"sharedAccessPolicyName"` // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. TableName *string `pulumi:"tableName"` } // The set of arguments for constructing a IotHubDataConnection resource. type IotHubDataConnectionArgs struct { // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. ClusterName pulumi.StringInput // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. ConsumerGroup pulumi.StringInput // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. DataFormat pulumi.StringPtrInput // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. DatabaseName pulumi.StringInput // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. DatabaseRoutingType pulumi.StringPtrInput // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. EventSystemProperties pulumi.StringArrayInput // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. IothubId pulumi.StringInput // The location where the Kusto Database should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. MappingRuleName pulumi.StringPtrInput // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. SharedAccessPolicyName pulumi.StringInput // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. TableName pulumi.StringPtrInput } func (IotHubDataConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*iotHubDataConnectionArgs)(nil)).Elem() } type IotHubDataConnectionInput interface { pulumi.Input ToIotHubDataConnectionOutput() IotHubDataConnectionOutput ToIotHubDataConnectionOutputWithContext(ctx context.Context) IotHubDataConnectionOutput } func (*IotHubDataConnection) ElementType() reflect.Type { return reflect.TypeOf((**IotHubDataConnection)(nil)).Elem() } func (i *IotHubDataConnection) ToIotHubDataConnectionOutput() IotHubDataConnectionOutput { return i.ToIotHubDataConnectionOutputWithContext(context.Background()) } func (i *IotHubDataConnection) ToIotHubDataConnectionOutputWithContext(ctx context.Context) IotHubDataConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(IotHubDataConnectionOutput) } // IotHubDataConnectionArrayInput is an input type that accepts IotHubDataConnectionArray and IotHubDataConnectionArrayOutput values. // You can construct a concrete instance of `IotHubDataConnectionArrayInput` via: // // IotHubDataConnectionArray{ IotHubDataConnectionArgs{...} } type IotHubDataConnectionArrayInput interface { pulumi.Input ToIotHubDataConnectionArrayOutput() IotHubDataConnectionArrayOutput ToIotHubDataConnectionArrayOutputWithContext(context.Context) IotHubDataConnectionArrayOutput } type IotHubDataConnectionArray []IotHubDataConnectionInput func (IotHubDataConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*IotHubDataConnection)(nil)).Elem() } func (i IotHubDataConnectionArray) ToIotHubDataConnectionArrayOutput() IotHubDataConnectionArrayOutput { return i.ToIotHubDataConnectionArrayOutputWithContext(context.Background()) } func (i IotHubDataConnectionArray) ToIotHubDataConnectionArrayOutputWithContext(ctx context.Context) IotHubDataConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IotHubDataConnectionArrayOutput) } // IotHubDataConnectionMapInput is an input type that accepts IotHubDataConnectionMap and IotHubDataConnectionMapOutput values. // You can construct a concrete instance of `IotHubDataConnectionMapInput` via: // // IotHubDataConnectionMap{ "key": IotHubDataConnectionArgs{...} } type IotHubDataConnectionMapInput interface { pulumi.Input ToIotHubDataConnectionMapOutput() IotHubDataConnectionMapOutput ToIotHubDataConnectionMapOutputWithContext(context.Context) IotHubDataConnectionMapOutput } type IotHubDataConnectionMap map[string]IotHubDataConnectionInput func (IotHubDataConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IotHubDataConnection)(nil)).Elem() } func (i IotHubDataConnectionMap) ToIotHubDataConnectionMapOutput() IotHubDataConnectionMapOutput { return i.ToIotHubDataConnectionMapOutputWithContext(context.Background()) } func (i IotHubDataConnectionMap) ToIotHubDataConnectionMapOutputWithContext(ctx context.Context) IotHubDataConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(IotHubDataConnectionMapOutput) } type IotHubDataConnectionOutput struct{ *pulumi.OutputState } func (IotHubDataConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**IotHubDataConnection)(nil)).Elem() } func (o IotHubDataConnectionOutput) ToIotHubDataConnectionOutput() IotHubDataConnectionOutput { return o } func (o IotHubDataConnectionOutput) ToIotHubDataConnectionOutputWithContext(ctx context.Context) IotHubDataConnectionOutput { return o } // Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) ClusterName() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput) } // Specifies the IotHub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) ConsumerGroup() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.ConsumerGroup }).(pulumi.StringOutput) } // Specifies the data format of the IoTHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) DataFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringPtrOutput { return v.DataFormat }).(pulumi.StringPtrOutput) } // Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) DatabaseName() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) } // Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`. func (o IotHubDataConnectionOutput) DatabaseRoutingType() pulumi.StringPtrOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringPtrOutput { return v.DatabaseRoutingType }).(pulumi.StringPtrOutput) } // Specifies the System Properties that each IoT Hub message should contain. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) EventSystemProperties() pulumi.StringArrayOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringArrayOutput { return v.EventSystemProperties }).(pulumi.StringArrayOutput) } // Specifies the resource id of the IotHub this data connection will use for ingestion. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) IothubId() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput) } // The location where the Kusto Database should be created. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) MappingRuleName() pulumi.StringPtrOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringPtrOutput { return v.MappingRuleName }).(pulumi.StringPtrOutput) } // The name of the Kusto IotHub Data Connection to create. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the IotHub Shared Access Policy this data connection will use for ingestion, which must have read permission. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) SharedAccessPolicyName() pulumi.StringOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringOutput { return v.SharedAccessPolicyName }).(pulumi.StringOutput) } // Specifies the target table name used for the message ingestion. Table must exist before resource is created. Changing this forces a new resource to be created. func (o IotHubDataConnectionOutput) TableName() pulumi.StringPtrOutput { return o.ApplyT(func(v *IotHubDataConnection) pulumi.StringPtrOutput { return v.TableName }).(pulumi.StringPtrOutput) } type IotHubDataConnectionArrayOutput struct{ *pulumi.OutputState } func (IotHubDataConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*IotHubDataConnection)(nil)).Elem() } func (o IotHubDataConnectionArrayOutput) ToIotHubDataConnectionArrayOutput() IotHubDataConnectionArrayOutput { return o } func (o IotHubDataConnectionArrayOutput) ToIotHubDataConnectionArrayOutputWithContext(ctx context.Context) IotHubDataConnectionArrayOutput { return o } func (o IotHubDataConnectionArrayOutput) Index(i pulumi.IntInput) IotHubDataConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IotHubDataConnection { return vs[0].([]*IotHubDataConnection)[vs[1].(int)] }).(IotHubDataConnectionOutput) } type IotHubDataConnectionMapOutput struct{ *pulumi.OutputState } func (IotHubDataConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IotHubDataConnection)(nil)).Elem() } func (o IotHubDataConnectionMapOutput) ToIotHubDataConnectionMapOutput() IotHubDataConnectionMapOutput { return o } func (o IotHubDataConnectionMapOutput) ToIotHubDataConnectionMapOutputWithContext(ctx context.Context) IotHubDataConnectionMapOutput { return o } func (o IotHubDataConnectionMapOutput) MapIndex(k pulumi.StringInput) IotHubDataConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IotHubDataConnection { return vs[0].(map[string]*IotHubDataConnection)[vs[1].(string)] }).(IotHubDataConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*IotHubDataConnectionInput)(nil)).Elem(), &IotHubDataConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*IotHubDataConnectionArrayInput)(nil)).Elem(), IotHubDataConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IotHubDataConnectionMapInput)(nil)).Elem(), IotHubDataConnectionMap{}) pulumi.RegisterOutputType(IotHubDataConnectionOutput{}) pulumi.RegisterOutputType(IotHubDataConnectionArrayOutput{}) pulumi.RegisterOutputType(IotHubDataConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false