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/provider.go | sdk/go/azure/provider.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 azure
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The provider type for the azurerm package. By default, resources use package-wide configuration
// settings, however an explicit `Provider` instance may be created and passed during resource
// construction to achieve fine-grained programmatic control over provider settings. See the
// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
type Provider struct {
pulumi.ProviderResourceState
// The Azure DevOps Pipeline Service Connection ID.
AdoPipelineServiceConnectionId pulumi.StringPtrOutput `pulumi:"adoPipelineServiceConnectionId"`
// Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate
ClientCertificate pulumi.StringPtrOutput `pulumi:"clientCertificate"`
// The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate
ClientCertificatePassword pulumi.StringPtrOutput `pulumi:"clientCertificatePassword"`
// The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate.
ClientCertificatePath pulumi.StringPtrOutput `pulumi:"clientCertificatePath"`
// The Client ID which should be used.
ClientId pulumi.StringPtrOutput `pulumi:"clientId"`
// The path to a file containing the Client ID which should be used.
ClientIdFilePath pulumi.StringPtrOutput `pulumi:"clientIdFilePath"`
// The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecret pulumi.StringPtrOutput `pulumi:"clientSecret"`
// The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecretFilePath pulumi.StringPtrOutput `pulumi:"clientSecretFilePath"`
// The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadataHost` is specified.
Environment pulumi.StringPtrOutput `pulumi:"environment"`
// The Hostname which should be used for the Azure Metadata Service.
MetadataHost pulumi.StringPtrOutput `pulumi:"metadataHost"`
// The API version to use for Managed Service Identity (IMDS) - for cases where the default API version is not supported by the endpoint. e.g. for Azure Container Apps.
MsiApiVersion pulumi.StringPtrOutput `pulumi:"msiApiVersion"`
// The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically.
MsiEndpoint pulumi.StringPtrOutput `pulumi:"msiEndpoint"`
// The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestToken pulumi.StringPtrOutput `pulumi:"oidcRequestToken"`
// The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestUrl pulumi.StringPtrOutput `pulumi:"oidcRequestUrl"`
// The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcToken pulumi.StringPtrOutput `pulumi:"oidcToken"`
// The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcTokenFilePath pulumi.StringPtrOutput `pulumi:"oidcTokenFilePath"`
// A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution.
PartnerId pulumi.StringPtrOutput `pulumi:"partnerId"`
// The set of Resource Providers which should be automatically registered for the subscription.
ResourceProviderRegistrations pulumi.StringPtrOutput `pulumi:"resourceProviderRegistrations"`
// The Subscription ID which should be used.
SubscriptionId pulumi.StringPtrOutput `pulumi:"subscriptionId"`
// The Tenant ID which should be used.
TenantId pulumi.StringPtrOutput `pulumi:"tenantId"`
}
// NewProvider registers a new resource with the given unique name, arguments, and options.
func NewProvider(ctx *pulumi.Context,
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
if args == nil {
args = &ProviderArgs{}
}
if args.Environment == nil {
if d := internal.GetEnvOrDefault("public", nil, "AZURE_ENVIRONMENT", "ARM_ENVIRONMENT"); d != nil {
args.Environment = pulumi.StringPtr(d.(string))
}
}
if args.MetadataHost == nil {
if d := internal.GetEnvOrDefault(nil, nil, "ARM_METADATA_HOSTNAME"); d != nil {
args.MetadataHost = pulumi.StringPtr(d.(string))
}
}
if args.SkipProviderRegistration == nil {
if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_SKIP_PROVIDER_REGISTRATION"); d != nil {
args.SkipProviderRegistration = pulumi.BoolPtr(d.(bool))
}
}
if args.StorageUseAzuread == nil {
if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_STORAGE_USE_AZUREAD"); d != nil {
args.StorageUseAzuread = pulumi.BoolPtr(d.(bool))
}
}
if args.SubscriptionId == nil {
if d := internal.GetEnvOrDefault("", nil, "ARM_SUBSCRIPTION_ID"); d != nil {
args.SubscriptionId = pulumi.StringPtr(d.(string))
}
}
if args.AuxiliaryTenantIds != nil {
args.AuxiliaryTenantIds = pulumi.ToSecret(args.AuxiliaryTenantIds).(pulumi.StringArrayInput)
}
if args.ClientCertificate != nil {
args.ClientCertificate = pulumi.ToSecret(args.ClientCertificate).(pulumi.StringPtrInput)
}
if args.ClientCertificatePassword != nil {
args.ClientCertificatePassword = pulumi.ToSecret(args.ClientCertificatePassword).(pulumi.StringPtrInput)
}
if args.ClientCertificatePath != nil {
args.ClientCertificatePath = pulumi.ToSecret(args.ClientCertificatePath).(pulumi.StringPtrInput)
}
if args.ClientId != nil {
args.ClientId = pulumi.ToSecret(args.ClientId).(pulumi.StringPtrInput)
}
if args.ClientIdFilePath != nil {
args.ClientIdFilePath = pulumi.ToSecret(args.ClientIdFilePath).(pulumi.StringPtrInput)
}
if args.ClientSecret != nil {
args.ClientSecret = pulumi.ToSecret(args.ClientSecret).(pulumi.StringPtrInput)
}
if args.ClientSecretFilePath != nil {
args.ClientSecretFilePath = pulumi.ToSecret(args.ClientSecretFilePath).(pulumi.StringPtrInput)
}
if args.OidcRequestToken != nil {
args.OidcRequestToken = pulumi.ToSecret(args.OidcRequestToken).(pulumi.StringPtrInput)
}
if args.OidcToken != nil {
args.OidcToken = pulumi.ToSecret(args.OidcToken).(pulumi.StringPtrInput)
}
if args.OidcTokenFilePath != nil {
args.OidcTokenFilePath = pulumi.ToSecret(args.OidcTokenFilePath).(pulumi.StringPtrInput)
}
if args.SubscriptionId != nil {
args.SubscriptionId = pulumi.ToSecret(args.SubscriptionId).(pulumi.StringPtrInput)
}
if args.TenantId != nil {
args.TenantId = pulumi.ToSecret(args.TenantId).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"clientCertificate",
"clientCertificatePassword",
"clientCertificatePath",
"clientId",
"clientIdFilePath",
"clientSecret",
"clientSecretFilePath",
"oidcRequestToken",
"oidcToken",
"oidcTokenFilePath",
"subscriptionId",
"tenantId",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Provider
err := ctx.RegisterResource("pulumi:providers:azure", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type providerArgs struct {
// The Azure DevOps Pipeline Service Connection ID.
AdoPipelineServiceConnectionId *string `pulumi:"adoPipelineServiceConnectionId"`
AuxiliaryTenantIds []string `pulumi:"auxiliaryTenantIds"`
// Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate
ClientCertificate *string `pulumi:"clientCertificate"`
// The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate
ClientCertificatePassword *string `pulumi:"clientCertificatePassword"`
// The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate.
ClientCertificatePath *string `pulumi:"clientCertificatePath"`
// The Client ID which should be used.
ClientId *string `pulumi:"clientId"`
// The path to a file containing the Client ID which should be used.
ClientIdFilePath *string `pulumi:"clientIdFilePath"`
// The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecret *string `pulumi:"clientSecret"`
// The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecretFilePath *string `pulumi:"clientSecretFilePath"`
// This will disable the x-ms-correlation-request-id header.
DisableCorrelationRequestId *bool `pulumi:"disableCorrelationRequestId"`
DisableTerraformPartnerId *bool `pulumi:"disableTerraformPartnerId"`
// The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadataHost` is specified.
Environment *string `pulumi:"environment"`
Features *ProviderFeatures `pulumi:"features"`
// The Hostname which should be used for the Azure Metadata Service.
MetadataHost *string `pulumi:"metadataHost"`
// The API version to use for Managed Service Identity (IMDS) - for cases where the default API version is not supported by the endpoint. e.g. for Azure Container Apps.
MsiApiVersion *string `pulumi:"msiApiVersion"`
// The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically.
MsiEndpoint *string `pulumi:"msiEndpoint"`
// The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestToken *string `pulumi:"oidcRequestToken"`
// The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestUrl *string `pulumi:"oidcRequestUrl"`
// The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcToken *string `pulumi:"oidcToken"`
// The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcTokenFilePath *string `pulumi:"oidcTokenFilePath"`
// A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution.
PartnerId *string `pulumi:"partnerId"`
// The set of Resource Providers which should be automatically registered for the subscription.
ResourceProviderRegistrations *string `pulumi:"resourceProviderRegistrations"`
// A list of Resource Providers to explicitly register for the subscription, in addition to those specified by the `resourceProviderRegistrations` property.
ResourceProvidersToRegisters []string `pulumi:"resourceProvidersToRegisters"`
// Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they're not already registered?
//
// Deprecated: This property is deprecated and will be removed in v5.0 of the AzureRM provider. Please use the `resourceProviderRegistrations` property instead.
SkipProviderRegistration *bool `pulumi:"skipProviderRegistration"`
// Should the AzureRM Provider use Azure AD Authentication when accessing the Storage Data Plane APIs?
StorageUseAzuread *bool `pulumi:"storageUseAzuread"`
// The Subscription ID which should be used.
SubscriptionId *string `pulumi:"subscriptionId"`
// The Tenant ID which should be used.
TenantId *string `pulumi:"tenantId"`
// Allow Azure AKS Workload Identity to be used for Authentication.
UseAksWorkloadIdentity *bool `pulumi:"useAksWorkloadIdentity"`
// Allow Azure CLI to be used for Authentication.
UseCli *bool `pulumi:"useCli"`
// Allow Managed Service Identity to be used for Authentication.
UseMsi *bool `pulumi:"useMsi"`
// Allow OpenID Connect to be used for authentication
UseOidc *bool `pulumi:"useOidc"`
}
// The set of arguments for constructing a Provider resource.
type ProviderArgs struct {
// The Azure DevOps Pipeline Service Connection ID.
AdoPipelineServiceConnectionId pulumi.StringPtrInput
AuxiliaryTenantIds pulumi.StringArrayInput
// Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate
ClientCertificate pulumi.StringPtrInput
// The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate
ClientCertificatePassword pulumi.StringPtrInput
// The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate.
ClientCertificatePath pulumi.StringPtrInput
// The Client ID which should be used.
ClientId pulumi.StringPtrInput
// The path to a file containing the Client ID which should be used.
ClientIdFilePath pulumi.StringPtrInput
// The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecret pulumi.StringPtrInput
// The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
ClientSecretFilePath pulumi.StringPtrInput
// This will disable the x-ms-correlation-request-id header.
DisableCorrelationRequestId pulumi.BoolPtrInput
DisableTerraformPartnerId pulumi.BoolPtrInput
// The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadataHost` is specified.
Environment pulumi.StringPtrInput
Features ProviderFeaturesPtrInput
// The Hostname which should be used for the Azure Metadata Service.
MetadataHost pulumi.StringPtrInput
// The API version to use for Managed Service Identity (IMDS) - for cases where the default API version is not supported by the endpoint. e.g. for Azure Container Apps.
MsiApiVersion pulumi.StringPtrInput
// The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically.
MsiEndpoint pulumi.StringPtrInput
// The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestToken pulumi.StringPtrInput
// The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect.
OidcRequestUrl pulumi.StringPtrInput
// The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcToken pulumi.StringPtrInput
// The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
OidcTokenFilePath pulumi.StringPtrInput
// A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution.
PartnerId pulumi.StringPtrInput
// The set of Resource Providers which should be automatically registered for the subscription.
ResourceProviderRegistrations pulumi.StringPtrInput
// A list of Resource Providers to explicitly register for the subscription, in addition to those specified by the `resourceProviderRegistrations` property.
ResourceProvidersToRegisters pulumi.StringArrayInput
// Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they're not already registered?
//
// Deprecated: This property is deprecated and will be removed in v5.0 of the AzureRM provider. Please use the `resourceProviderRegistrations` property instead.
SkipProviderRegistration pulumi.BoolPtrInput
// Should the AzureRM Provider use Azure AD Authentication when accessing the Storage Data Plane APIs?
StorageUseAzuread pulumi.BoolPtrInput
// The Subscription ID which should be used.
SubscriptionId pulumi.StringPtrInput
// The Tenant ID which should be used.
TenantId pulumi.StringPtrInput
// Allow Azure AKS Workload Identity to be used for Authentication.
UseAksWorkloadIdentity pulumi.BoolPtrInput
// Allow Azure CLI to be used for Authentication.
UseCli pulumi.BoolPtrInput
// Allow Managed Service Identity to be used for Authentication.
UseMsi pulumi.BoolPtrInput
// Allow OpenID Connect to be used for authentication
UseOidc pulumi.BoolPtrInput
}
func (ProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*providerArgs)(nil)).Elem()
}
// This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
func (r *Provider) TerraformConfig(ctx *pulumi.Context) (ProviderTerraformConfigResultOutput, error) {
out, err := ctx.Call("pulumi:providers:azure/terraformConfig", nil, ProviderTerraformConfigResultOutput{}, r)
if err != nil {
return ProviderTerraformConfigResultOutput{}, err
}
return out.(ProviderTerraformConfigResultOutput), nil
}
type ProviderTerraformConfigResult struct {
Result map[string]interface{} `pulumi:"result"`
}
type ProviderTerraformConfigResultOutput struct{ *pulumi.OutputState }
func (ProviderTerraformConfigResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ProviderTerraformConfigResult)(nil)).Elem()
}
func (o ProviderTerraformConfigResultOutput) Result() pulumi.MapOutput {
return o.ApplyT(func(v ProviderTerraformConfigResult) map[string]interface{} { return v.Result }).(pulumi.MapOutput)
}
type ProviderInput interface {
pulumi.Input
ToProviderOutput() ProviderOutput
ToProviderOutputWithContext(ctx context.Context) ProviderOutput
}
func (*Provider) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (i *Provider) ToProviderOutput() ProviderOutput {
return i.ToProviderOutputWithContext(context.Background())
}
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput)
}
type ProviderOutput struct{ *pulumi.OutputState }
func (ProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Provider)(nil)).Elem()
}
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
return o
}
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
return o
}
// The Azure DevOps Pipeline Service Connection ID.
func (o ProviderOutput) AdoPipelineServiceConnectionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.AdoPipelineServiceConnectionId }).(pulumi.StringPtrOutput)
}
// Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate
func (o ProviderOutput) ClientCertificate() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientCertificate }).(pulumi.StringPtrOutput)
}
// The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate
func (o ProviderOutput) ClientCertificatePassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientCertificatePassword }).(pulumi.StringPtrOutput)
}
// The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate.
func (o ProviderOutput) ClientCertificatePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientCertificatePath }).(pulumi.StringPtrOutput)
}
// The Client ID which should be used.
func (o ProviderOutput) ClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientId }).(pulumi.StringPtrOutput)
}
// The path to a file containing the Client ID which should be used.
func (o ProviderOutput) ClientIdFilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientIdFilePath }).(pulumi.StringPtrOutput)
}
// The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
func (o ProviderOutput) ClientSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientSecret }).(pulumi.StringPtrOutput)
}
// The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.
func (o ProviderOutput) ClientSecretFilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ClientSecretFilePath }).(pulumi.StringPtrOutput)
}
// The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadataHost` is specified.
func (o ProviderOutput) Environment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Environment }).(pulumi.StringPtrOutput)
}
// The Hostname which should be used for the Azure Metadata Service.
func (o ProviderOutput) MetadataHost() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.MetadataHost }).(pulumi.StringPtrOutput)
}
// The API version to use for Managed Service Identity (IMDS) - for cases where the default API version is not supported by the endpoint. e.g. for Azure Container Apps.
func (o ProviderOutput) MsiApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.MsiApiVersion }).(pulumi.StringPtrOutput)
}
// The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically.
func (o ProviderOutput) MsiEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.MsiEndpoint }).(pulumi.StringPtrOutput)
}
// The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect.
func (o ProviderOutput) OidcRequestToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.OidcRequestToken }).(pulumi.StringPtrOutput)
}
// The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect.
func (o ProviderOutput) OidcRequestUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.OidcRequestUrl }).(pulumi.StringPtrOutput)
}
// The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
func (o ProviderOutput) OidcToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.OidcToken }).(pulumi.StringPtrOutput)
}
// The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect.
func (o ProviderOutput) OidcTokenFilePath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.OidcTokenFilePath }).(pulumi.StringPtrOutput)
}
// A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution.
func (o ProviderOutput) PartnerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.PartnerId }).(pulumi.StringPtrOutput)
}
// The set of Resource Providers which should be automatically registered for the subscription.
func (o ProviderOutput) ResourceProviderRegistrations() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.ResourceProviderRegistrations }).(pulumi.StringPtrOutput)
}
// The Subscription ID which should be used.
func (o ProviderOutput) SubscriptionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.SubscriptionId }).(pulumi.StringPtrOutput)
}
// The Tenant ID which should be used.
func (o ProviderOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.TenantId }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{})
pulumi.RegisterOutputType(ProviderOutput{})
pulumi.RegisterOutputType(ProviderTerraformConfigResultOutput{})
}
| 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/doc.go | sdk/go/azure/doc.go | // A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
package azure
| 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/oracle/init.go | sdk/go/azure/oracle/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 oracle
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:oracle/autonomousDatabase:AutonomousDatabase":
r = &AutonomousDatabase{}
case "azure:oracle/autonomousDatabaseBackup:AutonomousDatabaseBackup":
r = &AutonomousDatabaseBackup{}
case "azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup":
r = &AutonomousDatabaseCloneFromBackup{}
case "azure:oracle/autonomousDatabaseCloneFromDatabase:AutonomousDatabaseCloneFromDatabase":
r = &AutonomousDatabaseCloneFromDatabase{}
case "azure:oracle/cloudVmCluster:CloudVmCluster":
r = &CloudVmCluster{}
case "azure:oracle/exadataInfrastructure:ExadataInfrastructure":
r = &ExadataInfrastructure{}
case "azure:oracle/exascaleDatabaseStorageVault:ExascaleDatabaseStorageVault":
r = &ExascaleDatabaseStorageVault{}
case "azure:oracle/resourceAnchor:ResourceAnchor":
r = &ResourceAnchor{}
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",
"oracle/autonomousDatabase",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/autonomousDatabaseBackup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/autonomousDatabaseCloneFromBackup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/autonomousDatabaseCloneFromDatabase",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/cloudVmCluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/exadataInfrastructure",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/exascaleDatabaseStorageVault",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"oracle/resourceAnchor",
&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/oracle/pulumiTypes.go | sdk/go/azure/oracle/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 oracle
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 AutonomousDatabaseLongTermBackupSchedule struct {
Enabled bool `pulumi:"enabled"`
RepeatCadence string `pulumi:"repeatCadence"`
RetentionPeriodInDays int `pulumi:"retentionPeriodInDays"`
TimeOfBackup string `pulumi:"timeOfBackup"`
}
// AutonomousDatabaseLongTermBackupScheduleInput is an input type that accepts AutonomousDatabaseLongTermBackupScheduleArgs and AutonomousDatabaseLongTermBackupScheduleOutput values.
// You can construct a concrete instance of `AutonomousDatabaseLongTermBackupScheduleInput` via:
//
// AutonomousDatabaseLongTermBackupScheduleArgs{...}
type AutonomousDatabaseLongTermBackupScheduleInput interface {
pulumi.Input
ToAutonomousDatabaseLongTermBackupScheduleOutput() AutonomousDatabaseLongTermBackupScheduleOutput
ToAutonomousDatabaseLongTermBackupScheduleOutputWithContext(context.Context) AutonomousDatabaseLongTermBackupScheduleOutput
}
type AutonomousDatabaseLongTermBackupScheduleArgs struct {
Enabled pulumi.BoolInput `pulumi:"enabled"`
RepeatCadence pulumi.StringInput `pulumi:"repeatCadence"`
RetentionPeriodInDays pulumi.IntInput `pulumi:"retentionPeriodInDays"`
TimeOfBackup pulumi.StringInput `pulumi:"timeOfBackup"`
}
func (AutonomousDatabaseLongTermBackupScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AutonomousDatabaseLongTermBackupSchedule)(nil)).Elem()
}
func (i AutonomousDatabaseLongTermBackupScheduleArgs) ToAutonomousDatabaseLongTermBackupScheduleOutput() AutonomousDatabaseLongTermBackupScheduleOutput {
return i.ToAutonomousDatabaseLongTermBackupScheduleOutputWithContext(context.Background())
}
func (i AutonomousDatabaseLongTermBackupScheduleArgs) ToAutonomousDatabaseLongTermBackupScheduleOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseLongTermBackupScheduleOutput)
}
func (i AutonomousDatabaseLongTermBackupScheduleArgs) ToAutonomousDatabaseLongTermBackupSchedulePtrOutput() AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return i.ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(context.Background())
}
func (i AutonomousDatabaseLongTermBackupScheduleArgs) ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseLongTermBackupScheduleOutput).ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(ctx)
}
// AutonomousDatabaseLongTermBackupSchedulePtrInput is an input type that accepts AutonomousDatabaseLongTermBackupScheduleArgs, AutonomousDatabaseLongTermBackupSchedulePtr and AutonomousDatabaseLongTermBackupSchedulePtrOutput values.
// You can construct a concrete instance of `AutonomousDatabaseLongTermBackupSchedulePtrInput` via:
//
// AutonomousDatabaseLongTermBackupScheduleArgs{...}
//
// or:
//
// nil
type AutonomousDatabaseLongTermBackupSchedulePtrInput interface {
pulumi.Input
ToAutonomousDatabaseLongTermBackupSchedulePtrOutput() AutonomousDatabaseLongTermBackupSchedulePtrOutput
ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(context.Context) AutonomousDatabaseLongTermBackupSchedulePtrOutput
}
type autonomousDatabaseLongTermBackupSchedulePtrType AutonomousDatabaseLongTermBackupScheduleArgs
func AutonomousDatabaseLongTermBackupSchedulePtr(v *AutonomousDatabaseLongTermBackupScheduleArgs) AutonomousDatabaseLongTermBackupSchedulePtrInput {
return (*autonomousDatabaseLongTermBackupSchedulePtrType)(v)
}
func (*autonomousDatabaseLongTermBackupSchedulePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AutonomousDatabaseLongTermBackupSchedule)(nil)).Elem()
}
func (i *autonomousDatabaseLongTermBackupSchedulePtrType) ToAutonomousDatabaseLongTermBackupSchedulePtrOutput() AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return i.ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(context.Background())
}
func (i *autonomousDatabaseLongTermBackupSchedulePtrType) ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseLongTermBackupSchedulePtrOutput)
}
type AutonomousDatabaseLongTermBackupScheduleOutput struct{ *pulumi.OutputState }
func (AutonomousDatabaseLongTermBackupScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AutonomousDatabaseLongTermBackupSchedule)(nil)).Elem()
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) ToAutonomousDatabaseLongTermBackupScheduleOutput() AutonomousDatabaseLongTermBackupScheduleOutput {
return o
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) ToAutonomousDatabaseLongTermBackupScheduleOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupScheduleOutput {
return o
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) ToAutonomousDatabaseLongTermBackupSchedulePtrOutput() AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return o.ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(context.Background())
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AutonomousDatabaseLongTermBackupSchedule) *AutonomousDatabaseLongTermBackupSchedule {
return &v
}).(AutonomousDatabaseLongTermBackupSchedulePtrOutput)
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v AutonomousDatabaseLongTermBackupSchedule) bool { return v.Enabled }).(pulumi.BoolOutput)
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) RepeatCadence() pulumi.StringOutput {
return o.ApplyT(func(v AutonomousDatabaseLongTermBackupSchedule) string { return v.RepeatCadence }).(pulumi.StringOutput)
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) RetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v AutonomousDatabaseLongTermBackupSchedule) int { return v.RetentionPeriodInDays }).(pulumi.IntOutput)
}
func (o AutonomousDatabaseLongTermBackupScheduleOutput) TimeOfBackup() pulumi.StringOutput {
return o.ApplyT(func(v AutonomousDatabaseLongTermBackupSchedule) string { return v.TimeOfBackup }).(pulumi.StringOutput)
}
type AutonomousDatabaseLongTermBackupSchedulePtrOutput struct{ *pulumi.OutputState }
func (AutonomousDatabaseLongTermBackupSchedulePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AutonomousDatabaseLongTermBackupSchedule)(nil)).Elem()
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) ToAutonomousDatabaseLongTermBackupSchedulePtrOutput() AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return o
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) ToAutonomousDatabaseLongTermBackupSchedulePtrOutputWithContext(ctx context.Context) AutonomousDatabaseLongTermBackupSchedulePtrOutput {
return o
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) Elem() AutonomousDatabaseLongTermBackupScheduleOutput {
return o.ApplyT(func(v *AutonomousDatabaseLongTermBackupSchedule) AutonomousDatabaseLongTermBackupSchedule {
if v != nil {
return *v
}
var ret AutonomousDatabaseLongTermBackupSchedule
return ret
}).(AutonomousDatabaseLongTermBackupScheduleOutput)
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AutonomousDatabaseLongTermBackupSchedule) *bool {
if v == nil {
return nil
}
return &v.Enabled
}).(pulumi.BoolPtrOutput)
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) RepeatCadence() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AutonomousDatabaseLongTermBackupSchedule) *string {
if v == nil {
return nil
}
return &v.RepeatCadence
}).(pulumi.StringPtrOutput)
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) RetentionPeriodInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *AutonomousDatabaseLongTermBackupSchedule) *int {
if v == nil {
return nil
}
return &v.RetentionPeriodInDays
}).(pulumi.IntPtrOutput)
}
func (o AutonomousDatabaseLongTermBackupSchedulePtrOutput) TimeOfBackup() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AutonomousDatabaseLongTermBackupSchedule) *string {
if v == nil {
return nil
}
return &v.TimeOfBackup
}).(pulumi.StringPtrOutput)
}
type CloudVmClusterDataCollectionOptions struct {
// Indicates whether diagnostic collection is enabled for the VM Cluster/Cloud VM Cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM Cluster/Cloud VM Cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API. Changing this forces a new Cloud VM Cluster to be created.
DiagnosticsEventsEnabled *bool `pulumi:"diagnosticsEventsEnabled"`
// Indicates whether health monitoring is enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
HealthMonitoringEnabled *bool `pulumi:"healthMonitoringEnabled"`
// Indicates whether incident logs and trace collection are enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
IncidentLogsEnabled *bool `pulumi:"incidentLogsEnabled"`
}
// CloudVmClusterDataCollectionOptionsInput is an input type that accepts CloudVmClusterDataCollectionOptionsArgs and CloudVmClusterDataCollectionOptionsOutput values.
// You can construct a concrete instance of `CloudVmClusterDataCollectionOptionsInput` via:
//
// CloudVmClusterDataCollectionOptionsArgs{...}
type CloudVmClusterDataCollectionOptionsInput interface {
pulumi.Input
ToCloudVmClusterDataCollectionOptionsOutput() CloudVmClusterDataCollectionOptionsOutput
ToCloudVmClusterDataCollectionOptionsOutputWithContext(context.Context) CloudVmClusterDataCollectionOptionsOutput
}
type CloudVmClusterDataCollectionOptionsArgs struct {
// Indicates whether diagnostic collection is enabled for the VM Cluster/Cloud VM Cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM Cluster/Cloud VM Cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API. Changing this forces a new Cloud VM Cluster to be created.
DiagnosticsEventsEnabled pulumi.BoolPtrInput `pulumi:"diagnosticsEventsEnabled"`
// Indicates whether health monitoring is enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
HealthMonitoringEnabled pulumi.BoolPtrInput `pulumi:"healthMonitoringEnabled"`
// Indicates whether incident logs and trace collection are enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
IncidentLogsEnabled pulumi.BoolPtrInput `pulumi:"incidentLogsEnabled"`
}
func (CloudVmClusterDataCollectionOptionsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CloudVmClusterDataCollectionOptions)(nil)).Elem()
}
func (i CloudVmClusterDataCollectionOptionsArgs) ToCloudVmClusterDataCollectionOptionsOutput() CloudVmClusterDataCollectionOptionsOutput {
return i.ToCloudVmClusterDataCollectionOptionsOutputWithContext(context.Background())
}
func (i CloudVmClusterDataCollectionOptionsArgs) ToCloudVmClusterDataCollectionOptionsOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsOutput {
return pulumi.ToOutputWithContext(ctx, i).(CloudVmClusterDataCollectionOptionsOutput)
}
func (i CloudVmClusterDataCollectionOptionsArgs) ToCloudVmClusterDataCollectionOptionsPtrOutput() CloudVmClusterDataCollectionOptionsPtrOutput {
return i.ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(context.Background())
}
func (i CloudVmClusterDataCollectionOptionsArgs) ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CloudVmClusterDataCollectionOptionsOutput).ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(ctx)
}
// CloudVmClusterDataCollectionOptionsPtrInput is an input type that accepts CloudVmClusterDataCollectionOptionsArgs, CloudVmClusterDataCollectionOptionsPtr and CloudVmClusterDataCollectionOptionsPtrOutput values.
// You can construct a concrete instance of `CloudVmClusterDataCollectionOptionsPtrInput` via:
//
// CloudVmClusterDataCollectionOptionsArgs{...}
//
// or:
//
// nil
type CloudVmClusterDataCollectionOptionsPtrInput interface {
pulumi.Input
ToCloudVmClusterDataCollectionOptionsPtrOutput() CloudVmClusterDataCollectionOptionsPtrOutput
ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(context.Context) CloudVmClusterDataCollectionOptionsPtrOutput
}
type cloudVmClusterDataCollectionOptionsPtrType CloudVmClusterDataCollectionOptionsArgs
func CloudVmClusterDataCollectionOptionsPtr(v *CloudVmClusterDataCollectionOptionsArgs) CloudVmClusterDataCollectionOptionsPtrInput {
return (*cloudVmClusterDataCollectionOptionsPtrType)(v)
}
func (*cloudVmClusterDataCollectionOptionsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CloudVmClusterDataCollectionOptions)(nil)).Elem()
}
func (i *cloudVmClusterDataCollectionOptionsPtrType) ToCloudVmClusterDataCollectionOptionsPtrOutput() CloudVmClusterDataCollectionOptionsPtrOutput {
return i.ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(context.Background())
}
func (i *cloudVmClusterDataCollectionOptionsPtrType) ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CloudVmClusterDataCollectionOptionsPtrOutput)
}
type CloudVmClusterDataCollectionOptionsOutput struct{ *pulumi.OutputState }
func (CloudVmClusterDataCollectionOptionsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CloudVmClusterDataCollectionOptions)(nil)).Elem()
}
func (o CloudVmClusterDataCollectionOptionsOutput) ToCloudVmClusterDataCollectionOptionsOutput() CloudVmClusterDataCollectionOptionsOutput {
return o
}
func (o CloudVmClusterDataCollectionOptionsOutput) ToCloudVmClusterDataCollectionOptionsOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsOutput {
return o
}
func (o CloudVmClusterDataCollectionOptionsOutput) ToCloudVmClusterDataCollectionOptionsPtrOutput() CloudVmClusterDataCollectionOptionsPtrOutput {
return o.ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(context.Background())
}
func (o CloudVmClusterDataCollectionOptionsOutput) ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CloudVmClusterDataCollectionOptions) *CloudVmClusterDataCollectionOptions {
return &v
}).(CloudVmClusterDataCollectionOptionsPtrOutput)
}
// Indicates whether diagnostic collection is enabled for the VM Cluster/Cloud VM Cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM Cluster/Cloud VM Cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsOutput) DiagnosticsEventsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CloudVmClusterDataCollectionOptions) *bool { return v.DiagnosticsEventsEnabled }).(pulumi.BoolPtrOutput)
}
// Indicates whether health monitoring is enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsOutput) HealthMonitoringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CloudVmClusterDataCollectionOptions) *bool { return v.HealthMonitoringEnabled }).(pulumi.BoolPtrOutput)
}
// Indicates whether incident logs and trace collection are enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsOutput) IncidentLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v CloudVmClusterDataCollectionOptions) *bool { return v.IncidentLogsEnabled }).(pulumi.BoolPtrOutput)
}
type CloudVmClusterDataCollectionOptionsPtrOutput struct{ *pulumi.OutputState }
func (CloudVmClusterDataCollectionOptionsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CloudVmClusterDataCollectionOptions)(nil)).Elem()
}
func (o CloudVmClusterDataCollectionOptionsPtrOutput) ToCloudVmClusterDataCollectionOptionsPtrOutput() CloudVmClusterDataCollectionOptionsPtrOutput {
return o
}
func (o CloudVmClusterDataCollectionOptionsPtrOutput) ToCloudVmClusterDataCollectionOptionsPtrOutputWithContext(ctx context.Context) CloudVmClusterDataCollectionOptionsPtrOutput {
return o
}
func (o CloudVmClusterDataCollectionOptionsPtrOutput) Elem() CloudVmClusterDataCollectionOptionsOutput {
return o.ApplyT(func(v *CloudVmClusterDataCollectionOptions) CloudVmClusterDataCollectionOptions {
if v != nil {
return *v
}
var ret CloudVmClusterDataCollectionOptions
return ret
}).(CloudVmClusterDataCollectionOptionsOutput)
}
// Indicates whether diagnostic collection is enabled for the VM Cluster/Cloud VM Cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM Cluster/Cloud VM Cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsPtrOutput) DiagnosticsEventsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *CloudVmClusterDataCollectionOptions) *bool {
if v == nil {
return nil
}
return v.DiagnosticsEventsEnabled
}).(pulumi.BoolPtrOutput)
}
// Indicates whether health monitoring is enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsPtrOutput) HealthMonitoringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *CloudVmClusterDataCollectionOptions) *bool {
if v == nil {
return nil
}
return v.HealthMonitoringEnabled
}).(pulumi.BoolPtrOutput)
}
// Indicates whether incident logs and trace collection are enabled for the VM Cluster / Cloud VM Cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API. Changing this forces a new Cloud VM Cluster to be created.
func (o CloudVmClusterDataCollectionOptionsPtrOutput) IncidentLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *CloudVmClusterDataCollectionOptions) *bool {
if v == nil {
return nil
}
return v.IncidentLogsEnabled
}).(pulumi.BoolPtrOutput)
}
type CloudVmClusterFileSystemConfiguration struct {
// The mount path of the file system.
MountPoint *string `pulumi:"mountPoint"`
// The size of the virtual machine's file system.
SizeInGb *int `pulumi:"sizeInGb"`
}
// CloudVmClusterFileSystemConfigurationInput is an input type that accepts CloudVmClusterFileSystemConfigurationArgs and CloudVmClusterFileSystemConfigurationOutput values.
// You can construct a concrete instance of `CloudVmClusterFileSystemConfigurationInput` via:
//
// CloudVmClusterFileSystemConfigurationArgs{...}
type CloudVmClusterFileSystemConfigurationInput interface {
pulumi.Input
ToCloudVmClusterFileSystemConfigurationOutput() CloudVmClusterFileSystemConfigurationOutput
ToCloudVmClusterFileSystemConfigurationOutputWithContext(context.Context) CloudVmClusterFileSystemConfigurationOutput
}
type CloudVmClusterFileSystemConfigurationArgs struct {
// The mount path of the file system.
MountPoint pulumi.StringPtrInput `pulumi:"mountPoint"`
// The size of the virtual machine's file system.
SizeInGb pulumi.IntPtrInput `pulumi:"sizeInGb"`
}
func (CloudVmClusterFileSystemConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CloudVmClusterFileSystemConfiguration)(nil)).Elem()
}
func (i CloudVmClusterFileSystemConfigurationArgs) ToCloudVmClusterFileSystemConfigurationOutput() CloudVmClusterFileSystemConfigurationOutput {
return i.ToCloudVmClusterFileSystemConfigurationOutputWithContext(context.Background())
}
func (i CloudVmClusterFileSystemConfigurationArgs) ToCloudVmClusterFileSystemConfigurationOutputWithContext(ctx context.Context) CloudVmClusterFileSystemConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(CloudVmClusterFileSystemConfigurationOutput)
}
// CloudVmClusterFileSystemConfigurationArrayInput is an input type that accepts CloudVmClusterFileSystemConfigurationArray and CloudVmClusterFileSystemConfigurationArrayOutput values.
// You can construct a concrete instance of `CloudVmClusterFileSystemConfigurationArrayInput` via:
//
// CloudVmClusterFileSystemConfigurationArray{ CloudVmClusterFileSystemConfigurationArgs{...} }
type CloudVmClusterFileSystemConfigurationArrayInput interface {
pulumi.Input
ToCloudVmClusterFileSystemConfigurationArrayOutput() CloudVmClusterFileSystemConfigurationArrayOutput
ToCloudVmClusterFileSystemConfigurationArrayOutputWithContext(context.Context) CloudVmClusterFileSystemConfigurationArrayOutput
}
type CloudVmClusterFileSystemConfigurationArray []CloudVmClusterFileSystemConfigurationInput
func (CloudVmClusterFileSystemConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]CloudVmClusterFileSystemConfiguration)(nil)).Elem()
}
func (i CloudVmClusterFileSystemConfigurationArray) ToCloudVmClusterFileSystemConfigurationArrayOutput() CloudVmClusterFileSystemConfigurationArrayOutput {
return i.ToCloudVmClusterFileSystemConfigurationArrayOutputWithContext(context.Background())
}
func (i CloudVmClusterFileSystemConfigurationArray) ToCloudVmClusterFileSystemConfigurationArrayOutputWithContext(ctx context.Context) CloudVmClusterFileSystemConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CloudVmClusterFileSystemConfigurationArrayOutput)
}
type CloudVmClusterFileSystemConfigurationOutput struct{ *pulumi.OutputState }
func (CloudVmClusterFileSystemConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CloudVmClusterFileSystemConfiguration)(nil)).Elem()
}
func (o CloudVmClusterFileSystemConfigurationOutput) ToCloudVmClusterFileSystemConfigurationOutput() CloudVmClusterFileSystemConfigurationOutput {
return o
}
func (o CloudVmClusterFileSystemConfigurationOutput) ToCloudVmClusterFileSystemConfigurationOutputWithContext(ctx context.Context) CloudVmClusterFileSystemConfigurationOutput {
return o
}
// The mount path of the file system.
func (o CloudVmClusterFileSystemConfigurationOutput) MountPoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v CloudVmClusterFileSystemConfiguration) *string { return v.MountPoint }).(pulumi.StringPtrOutput)
}
// The size of the virtual machine's file system.
func (o CloudVmClusterFileSystemConfigurationOutput) SizeInGb() pulumi.IntPtrOutput {
return o.ApplyT(func(v CloudVmClusterFileSystemConfiguration) *int { return v.SizeInGb }).(pulumi.IntPtrOutput)
}
type CloudVmClusterFileSystemConfigurationArrayOutput struct{ *pulumi.OutputState }
func (CloudVmClusterFileSystemConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]CloudVmClusterFileSystemConfiguration)(nil)).Elem()
}
func (o CloudVmClusterFileSystemConfigurationArrayOutput) ToCloudVmClusterFileSystemConfigurationArrayOutput() CloudVmClusterFileSystemConfigurationArrayOutput {
return o
}
func (o CloudVmClusterFileSystemConfigurationArrayOutput) ToCloudVmClusterFileSystemConfigurationArrayOutputWithContext(ctx context.Context) CloudVmClusterFileSystemConfigurationArrayOutput {
return o
}
func (o CloudVmClusterFileSystemConfigurationArrayOutput) Index(i pulumi.IntInput) CloudVmClusterFileSystemConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) CloudVmClusterFileSystemConfiguration {
return vs[0].([]CloudVmClusterFileSystemConfiguration)[vs[1].(int)]
}).(CloudVmClusterFileSystemConfigurationOutput)
}
type ExadataInfrastructureMaintenanceWindow struct {
// Days during the week when maintenance should be performed. Valid values are: `0` - represents time slot `0:00 - 3:59 UTC - 4` - represents time slot `4:00 - 7:59 UTC - 8` - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot `20:00 - 23:59 UTC`. Changing this forces a new Cloud Exadata Infrastructure to be created.
DaysOfWeeks []string `pulumi:"daysOfWeeks"`
// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Changing this forces a new Cloud Exadata Infrastructure to be created.
HoursOfDays []int `pulumi:"hoursOfDays"`
// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between `1` to `4`. Changing this forces a new Cloud Exadata Infrastructure to be created.
LeadTimeInWeeks *int `pulumi:"leadTimeInWeeks"`
// Months during the year when maintenance should be performed. Changing this forces a new Cloud Exadata Infrastructure to be created.
Months []string `pulumi:"months"`
// Cloud Exadata Infrastructure node patching method, either `ROLLING` or `NONROLLING`. Default value is `ROLLING`. IMPORTANT: Non-rolling infrastructure patching involves system down time. See [Oracle-Managed Infrastructure Maintenance Updates](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle) for more information. Changing this forces a new Cloud Exadata Infrastructure to be created.
PatchingMode *string `pulumi:"patchingMode"`
// The maintenance window scheduling preference. Changing this forces a new Cloud Exadata Infrastructure to be created.
Preference *string `pulumi:"preference"`
// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. Changing this forces a new Cloud Exadata Infrastructure to be created.
WeeksOfMonths []int `pulumi:"weeksOfMonths"`
}
// ExadataInfrastructureMaintenanceWindowInput is an input type that accepts ExadataInfrastructureMaintenanceWindowArgs and ExadataInfrastructureMaintenanceWindowOutput values.
// You can construct a concrete instance of `ExadataInfrastructureMaintenanceWindowInput` via:
//
// ExadataInfrastructureMaintenanceWindowArgs{...}
type ExadataInfrastructureMaintenanceWindowInput interface {
pulumi.Input
ToExadataInfrastructureMaintenanceWindowOutput() ExadataInfrastructureMaintenanceWindowOutput
ToExadataInfrastructureMaintenanceWindowOutputWithContext(context.Context) ExadataInfrastructureMaintenanceWindowOutput
}
type ExadataInfrastructureMaintenanceWindowArgs struct {
// Days during the week when maintenance should be performed. Valid values are: `0` - represents time slot `0:00 - 3:59 UTC - 4` - represents time slot `4:00 - 7:59 UTC - 8` - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot `20:00 - 23:59 UTC`. Changing this forces a new Cloud Exadata Infrastructure 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/oracle/cloudVmCluster.go | sdk/go/azure/oracle/cloudVmCluster.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cloud VM Cluster.
//
// ## Example Usage
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Cloud VM Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/cloudVmCluster:CloudVmCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Oracle.Database/cloudVmClusters/cloudVmClusters1
// ```
type CloudVmCluster struct {
pulumi.CustomResourceState
// The backup subnet CIDR of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
BackupSubnetCidr pulumi.StringPtrOutput `pulumi:"backupSubnetCidr"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure. Changing this forces a new Cloud VM Cluster to be created.
CloudExadataInfrastructureId pulumi.StringOutput `pulumi:"cloudExadataInfrastructureId"`
// The cluster name for Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// The number of CPU cores enabled on the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
CpuCoreCount pulumi.IntOutput `pulumi:"cpuCoreCount"`
// A `dataCollectionOptions` block as defined below. Changing this forces a new Cloud VM Cluster to be created.
DataCollectionOptions CloudVmClusterDataCollectionOptionsOutput `pulumi:"dataCollectionOptions"`
// The percentage assigned to DATA storage (user data and database files). Changing this forces a new Cloud VM Cluster to be created. The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60` and `80`.
DataStoragePercentage pulumi.IntOutput `pulumi:"dataStoragePercentage"`
// The data disk group size to be allocated in TBs. Changing this forces a new Cloud VM Cluster to be created.
DataStorageSizeInTbs pulumi.Float64Output `pulumi:"dataStorageSizeInTbs"`
// The local node storage to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
DbNodeStorageSizeInGbs pulumi.IntOutput `pulumi:"dbNodeStorageSizeInGbs"`
// The list of DB servers. Changing this forces a new Cloud VM Cluster to be created.
DbServers pulumi.StringArrayOutput `pulumi:"dbServers"`
// The user-friendly name for the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created. The name does not need to be unique.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The name of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
Domain pulumi.StringOutput `pulumi:"domain"`
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations CloudVmClusterFileSystemConfigurationArrayOutput `pulumi:"fileSystemConfigurations"`
// A valid Oracle Grid Infrastructure (GI) software version. Changing this forces a new Cloud VM Cluster to be created.
GiVersion pulumi.StringOutput `pulumi:"giVersion"`
// The hostname for the Cloud VM Cluster without suffix. Changing this forces a new Cloud VM Cluster to be created.
Hostname pulumi.StringOutput `pulumi:"hostname"`
// The hostname for the Cloud VM Cluster with suffix.
HostnameActual pulumi.StringOutput `pulumi:"hostnameActual"`
// The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`. Changing this forces a new Cloud VM Cluster to be created.
LicenseModel pulumi.StringOutput `pulumi:"licenseModel"`
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If `false`, database backup on local Exadata storage is not available in the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
LocalBackupEnabled pulumi.BoolOutput `pulumi:"localBackupEnabled"`
// The Azure Region where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The memory to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
MemorySizeInGbs pulumi.IntOutput `pulumi:"memorySizeInGbs"`
// The name which should be used for this Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.
Ocid pulumi.StringOutput `pulumi:"ocid"`
// The name of the Resource Group where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The TCP Single Client Access Name (SCAN) port. The default port to 1521. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcp pulumi.IntPtrOutput `pulumi:"scanListenerPortTcp"`
// The TCPS Single Client Access Name (SCAN) port. The default port to 2484. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcpSsl pulumi.IntPtrOutput `pulumi:"scanListenerPortTcpSsl"`
// If true, the sparse disk group is configured for the Cloud VM Cluster. If `false`, the sparse disk group is not created. Changing this forces a new Cloud VM Cluster to be created.
SparseDiskgroupEnabled pulumi.BoolOutput `pulumi:"sparseDiskgroupEnabled"`
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SshPublicKeys pulumi.StringArrayOutput `pulumi:"sshPublicKeys"`
// The ID of the subnet associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// Operating system version of the Exadata image. System version must be <= Db server major version (the first two parts of the DB server version eg 23.1.X.X.XXXX). Accepted Values for Grid Infrastructure (GI) version 19.0.0.0 are 22.1.30.0.0.241204, 22.1.32.0.0.250205, 22.1.31.0.0.250110, 23.1.20.0.0.241112, 23.1.21.0.0.241204, 23.1.22.0.0.250119, 23.1.23.0.0.250207. For Grid Infrastructure (GI) version 23.0.0.0 allowed system versions are 23.1.19.0.0.241015, 23.1.20.0.0.241112, 23.1.22.0.0.250119, 23.1.21.0.0.241204, 23.1.23.0.0.250207. Changing this forces a new resource to be created.
SystemVersion pulumi.StringOutput `pulumi:"systemVersion"`
// A mapping of tags which should be assigned to the Cloud VM Cluster.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.cloud.oracle.com/iaas/Content/Database/References/timezones.htm). Changing this forces a new Cloud VM Cluster to be created.
TimeZone pulumi.StringOutput `pulumi:"timeZone"`
// The ID of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"`
// The OCID of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
ZoneId pulumi.StringOutput `pulumi:"zoneId"`
}
// NewCloudVmCluster registers a new resource with the given unique name, arguments, and options.
func NewCloudVmCluster(ctx *pulumi.Context,
name string, args *CloudVmClusterArgs, opts ...pulumi.ResourceOption) (*CloudVmCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CloudExadataInfrastructureId == nil {
return nil, errors.New("invalid value for required argument 'CloudExadataInfrastructureId'")
}
if args.CpuCoreCount == nil {
return nil, errors.New("invalid value for required argument 'CpuCoreCount'")
}
if args.DbServers == nil {
return nil, errors.New("invalid value for required argument 'DbServers'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.GiVersion == nil {
return nil, errors.New("invalid value for required argument 'GiVersion'")
}
if args.Hostname == nil {
return nil, errors.New("invalid value for required argument 'Hostname'")
}
if args.LicenseModel == nil {
return nil, errors.New("invalid value for required argument 'LicenseModel'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SshPublicKeys == nil {
return nil, errors.New("invalid value for required argument 'SshPublicKeys'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
if args.VirtualNetworkId == nil {
return nil, errors.New("invalid value for required argument 'VirtualNetworkId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CloudVmCluster
err := ctx.RegisterResource("azure:oracle/cloudVmCluster:CloudVmCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCloudVmCluster gets an existing CloudVmCluster 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 GetCloudVmCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CloudVmClusterState, opts ...pulumi.ResourceOption) (*CloudVmCluster, error) {
var resource CloudVmCluster
err := ctx.ReadResource("azure:oracle/cloudVmCluster:CloudVmCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CloudVmCluster resources.
type cloudVmClusterState struct {
// The backup subnet CIDR of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
BackupSubnetCidr *string `pulumi:"backupSubnetCidr"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure. Changing this forces a new Cloud VM Cluster to be created.
CloudExadataInfrastructureId *string `pulumi:"cloudExadataInfrastructureId"`
// The cluster name for Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
ClusterName *string `pulumi:"clusterName"`
// The number of CPU cores enabled on the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
CpuCoreCount *int `pulumi:"cpuCoreCount"`
// A `dataCollectionOptions` block as defined below. Changing this forces a new Cloud VM Cluster to be created.
DataCollectionOptions *CloudVmClusterDataCollectionOptions `pulumi:"dataCollectionOptions"`
// The percentage assigned to DATA storage (user data and database files). Changing this forces a new Cloud VM Cluster to be created. The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60` and `80`.
DataStoragePercentage *int `pulumi:"dataStoragePercentage"`
// The data disk group size to be allocated in TBs. Changing this forces a new Cloud VM Cluster to be created.
DataStorageSizeInTbs *float64 `pulumi:"dataStorageSizeInTbs"`
// The local node storage to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
DbNodeStorageSizeInGbs *int `pulumi:"dbNodeStorageSizeInGbs"`
// The list of DB servers. Changing this forces a new Cloud VM Cluster to be created.
DbServers []string `pulumi:"dbServers"`
// The user-friendly name for the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created. The name does not need to be unique.
DisplayName *string `pulumi:"displayName"`
// The name of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
Domain *string `pulumi:"domain"`
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations []CloudVmClusterFileSystemConfiguration `pulumi:"fileSystemConfigurations"`
// A valid Oracle Grid Infrastructure (GI) software version. Changing this forces a new Cloud VM Cluster to be created.
GiVersion *string `pulumi:"giVersion"`
// The hostname for the Cloud VM Cluster without suffix. Changing this forces a new Cloud VM Cluster to be created.
Hostname *string `pulumi:"hostname"`
// The hostname for the Cloud VM Cluster with suffix.
HostnameActual *string `pulumi:"hostnameActual"`
// The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`. Changing this forces a new Cloud VM Cluster to be created.
LicenseModel *string `pulumi:"licenseModel"`
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If `false`, database backup on local Exadata storage is not available in the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
LocalBackupEnabled *bool `pulumi:"localBackupEnabled"`
// The Azure Region where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
Location *string `pulumi:"location"`
// The memory to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
MemorySizeInGbs *int `pulumi:"memorySizeInGbs"`
// The name which should be used for this Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
Name *string `pulumi:"name"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.
Ocid *string `pulumi:"ocid"`
// The name of the Resource Group where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The TCP Single Client Access Name (SCAN) port. The default port to 1521. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcp *int `pulumi:"scanListenerPortTcp"`
// The TCPS Single Client Access Name (SCAN) port. The default port to 2484. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcpSsl *int `pulumi:"scanListenerPortTcpSsl"`
// If true, the sparse disk group is configured for the Cloud VM Cluster. If `false`, the sparse disk group is not created. Changing this forces a new Cloud VM Cluster to be created.
SparseDiskgroupEnabled *bool `pulumi:"sparseDiskgroupEnabled"`
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SshPublicKeys []string `pulumi:"sshPublicKeys"`
// The ID of the subnet associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SubnetId *string `pulumi:"subnetId"`
// Operating system version of the Exadata image. System version must be <= Db server major version (the first two parts of the DB server version eg 23.1.X.X.XXXX). Accepted Values for Grid Infrastructure (GI) version 19.0.0.0 are 22.1.30.0.0.241204, 22.1.32.0.0.250205, 22.1.31.0.0.250110, 23.1.20.0.0.241112, 23.1.21.0.0.241204, 23.1.22.0.0.250119, 23.1.23.0.0.250207. For Grid Infrastructure (GI) version 23.0.0.0 allowed system versions are 23.1.19.0.0.241015, 23.1.20.0.0.241112, 23.1.22.0.0.250119, 23.1.21.0.0.241204, 23.1.23.0.0.250207. Changing this forces a new resource to be created.
SystemVersion *string `pulumi:"systemVersion"`
// A mapping of tags which should be assigned to the Cloud VM Cluster.
Tags map[string]string `pulumi:"tags"`
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.cloud.oracle.com/iaas/Content/Database/References/timezones.htm). Changing this forces a new Cloud VM Cluster to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
// The OCID of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
ZoneId *string `pulumi:"zoneId"`
}
type CloudVmClusterState struct {
// The backup subnet CIDR of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
BackupSubnetCidr pulumi.StringPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure. Changing this forces a new Cloud VM Cluster to be created.
CloudExadataInfrastructureId pulumi.StringPtrInput
// The cluster name for Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
ClusterName pulumi.StringPtrInput
// The number of CPU cores enabled on the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
CpuCoreCount pulumi.IntPtrInput
// A `dataCollectionOptions` block as defined below. Changing this forces a new Cloud VM Cluster to be created.
DataCollectionOptions CloudVmClusterDataCollectionOptionsPtrInput
// The percentage assigned to DATA storage (user data and database files). Changing this forces a new Cloud VM Cluster to be created. The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60` and `80`.
DataStoragePercentage pulumi.IntPtrInput
// The data disk group size to be allocated in TBs. Changing this forces a new Cloud VM Cluster to be created.
DataStorageSizeInTbs pulumi.Float64PtrInput
// The local node storage to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
DbNodeStorageSizeInGbs pulumi.IntPtrInput
// The list of DB servers. Changing this forces a new Cloud VM Cluster to be created.
DbServers pulumi.StringArrayInput
// The user-friendly name for the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created. The name does not need to be unique.
DisplayName pulumi.StringPtrInput
// The name of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
Domain pulumi.StringPtrInput
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations CloudVmClusterFileSystemConfigurationArrayInput
// A valid Oracle Grid Infrastructure (GI) software version. Changing this forces a new Cloud VM Cluster to be created.
GiVersion pulumi.StringPtrInput
// The hostname for the Cloud VM Cluster without suffix. Changing this forces a new Cloud VM Cluster to be created.
Hostname pulumi.StringPtrInput
// The hostname for the Cloud VM Cluster with suffix.
HostnameActual pulumi.StringPtrInput
// The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`. Changing this forces a new Cloud VM Cluster to be created.
LicenseModel pulumi.StringPtrInput
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If `false`, database backup on local Exadata storage is not available in the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
LocalBackupEnabled pulumi.BoolPtrInput
// The Azure Region where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
Location pulumi.StringPtrInput
// The memory to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
MemorySizeInGbs pulumi.IntPtrInput
// The name which should be used for this Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
Name pulumi.StringPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.
Ocid pulumi.StringPtrInput
// The name of the Resource Group where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
ResourceGroupName pulumi.StringPtrInput
// The TCP Single Client Access Name (SCAN) port. The default port to 1521. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcp pulumi.IntPtrInput
// The TCPS Single Client Access Name (SCAN) port. The default port to 2484. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcpSsl pulumi.IntPtrInput
// If true, the sparse disk group is configured for the Cloud VM Cluster. If `false`, the sparse disk group is not created. Changing this forces a new Cloud VM Cluster to be created.
SparseDiskgroupEnabled pulumi.BoolPtrInput
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SshPublicKeys pulumi.StringArrayInput
// The ID of the subnet associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SubnetId pulumi.StringPtrInput
// Operating system version of the Exadata image. System version must be <= Db server major version (the first two parts of the DB server version eg 23.1.X.X.XXXX). Accepted Values for Grid Infrastructure (GI) version 19.0.0.0 are 22.1.30.0.0.241204, 22.1.32.0.0.250205, 22.1.31.0.0.250110, 23.1.20.0.0.241112, 23.1.21.0.0.241204, 23.1.22.0.0.250119, 23.1.23.0.0.250207. For Grid Infrastructure (GI) version 23.0.0.0 allowed system versions are 23.1.19.0.0.241015, 23.1.20.0.0.241112, 23.1.22.0.0.250119, 23.1.21.0.0.241204, 23.1.23.0.0.250207. Changing this forces a new resource to be created.
SystemVersion pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Cloud VM Cluster.
Tags pulumi.StringMapInput
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.cloud.oracle.com/iaas/Content/Database/References/timezones.htm). Changing this forces a new Cloud VM Cluster to be created.
TimeZone pulumi.StringPtrInput
// The ID of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
VirtualNetworkId pulumi.StringPtrInput
// The OCID of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
ZoneId pulumi.StringPtrInput
}
func (CloudVmClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*cloudVmClusterState)(nil)).Elem()
}
type cloudVmClusterArgs struct {
// The backup subnet CIDR of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
BackupSubnetCidr *string `pulumi:"backupSubnetCidr"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure. Changing this forces a new Cloud VM Cluster to be created.
CloudExadataInfrastructureId string `pulumi:"cloudExadataInfrastructureId"`
// The cluster name for Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
ClusterName *string `pulumi:"clusterName"`
// The number of CPU cores enabled on the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
CpuCoreCount int `pulumi:"cpuCoreCount"`
// A `dataCollectionOptions` block as defined below. Changing this forces a new Cloud VM Cluster to be created.
DataCollectionOptions *CloudVmClusterDataCollectionOptions `pulumi:"dataCollectionOptions"`
// The percentage assigned to DATA storage (user data and database files). Changing this forces a new Cloud VM Cluster to be created. The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60` and `80`.
DataStoragePercentage *int `pulumi:"dataStoragePercentage"`
// The data disk group size to be allocated in TBs. Changing this forces a new Cloud VM Cluster to be created.
DataStorageSizeInTbs *float64 `pulumi:"dataStorageSizeInTbs"`
// The local node storage to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
DbNodeStorageSizeInGbs *int `pulumi:"dbNodeStorageSizeInGbs"`
// The list of DB servers. Changing this forces a new Cloud VM Cluster to be created.
DbServers []string `pulumi:"dbServers"`
// The user-friendly name for the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created. The name does not need to be unique.
DisplayName string `pulumi:"displayName"`
// The name of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
Domain *string `pulumi:"domain"`
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations []CloudVmClusterFileSystemConfiguration `pulumi:"fileSystemConfigurations"`
// A valid Oracle Grid Infrastructure (GI) software version. Changing this forces a new Cloud VM Cluster to be created.
GiVersion string `pulumi:"giVersion"`
// The hostname for the Cloud VM Cluster without suffix. Changing this forces a new Cloud VM Cluster to be created.
Hostname string `pulumi:"hostname"`
// The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`. Changing this forces a new Cloud VM Cluster to be created.
LicenseModel string `pulumi:"licenseModel"`
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If `false`, database backup on local Exadata storage is not available in the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
LocalBackupEnabled *bool `pulumi:"localBackupEnabled"`
// The Azure Region where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
Location *string `pulumi:"location"`
// The memory to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
MemorySizeInGbs *int `pulumi:"memorySizeInGbs"`
// The name which should be used for this Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Cloud VM Cluster should exist. Changing this forces a new Cloud VM Cluster to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The TCP Single Client Access Name (SCAN) port. The default port to 1521. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcp *int `pulumi:"scanListenerPortTcp"`
// The TCPS Single Client Access Name (SCAN) port. The default port to 2484. Changing this forces a new Cloud VM Cluster to be created.
ScanListenerPortTcpSsl *int `pulumi:"scanListenerPortTcpSsl"`
// If true, the sparse disk group is configured for the Cloud VM Cluster. If `false`, the sparse disk group is not created. Changing this forces a new Cloud VM Cluster to be created.
SparseDiskgroupEnabled *bool `pulumi:"sparseDiskgroupEnabled"`
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SshPublicKeys []string `pulumi:"sshPublicKeys"`
// The ID of the subnet associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
SubnetId string `pulumi:"subnetId"`
// Operating system version of the Exadata image. System version must be <= Db server major version (the first two parts of the DB server version eg 23.1.X.X.XXXX). Accepted Values for Grid Infrastructure (GI) version 19.0.0.0 are 22.1.30.0.0.241204, 22.1.32.0.0.250205, 22.1.31.0.0.250110, 23.1.20.0.0.241112, 23.1.21.0.0.241204, 23.1.22.0.0.250119, 23.1.23.0.0.250207. For Grid Infrastructure (GI) version 23.0.0.0 allowed system versions are 23.1.19.0.0.241015, 23.1.20.0.0.241112, 23.1.22.0.0.250119, 23.1.21.0.0.241204, 23.1.23.0.0.250207. Changing this forces a new resource to be created.
SystemVersion *string `pulumi:"systemVersion"`
// A mapping of tags which should be assigned to the Cloud VM Cluster.
Tags map[string]string `pulumi:"tags"`
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.cloud.oracle.com/iaas/Content/Database/References/timezones.htm). Changing this forces a new Cloud VM Cluster to be created.
TimeZone *string `pulumi:"timeZone"`
// The ID of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
// The OCID of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
ZoneId *string `pulumi:"zoneId"`
}
// The set of arguments for constructing a CloudVmCluster resource.
type CloudVmClusterArgs struct {
// The backup subnet CIDR of the Virtual Network associated with the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
BackupSubnetCidr pulumi.StringPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure. Changing this forces a new Cloud VM Cluster to be created.
CloudExadataInfrastructureId pulumi.StringInput
// The cluster name for Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
ClusterName pulumi.StringPtrInput
// The number of CPU cores enabled on the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created.
CpuCoreCount pulumi.IntInput
// A `dataCollectionOptions` block as defined below. Changing this forces a new Cloud VM Cluster to be created.
DataCollectionOptions CloudVmClusterDataCollectionOptionsPtrInput
// The percentage assigned to DATA storage (user data and database files). Changing this forces a new Cloud VM Cluster to be created. The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60` and `80`.
DataStoragePercentage pulumi.IntPtrInput
// The data disk group size to be allocated in TBs. Changing this forces a new Cloud VM Cluster to be created.
DataStorageSizeInTbs pulumi.Float64PtrInput
// The local node storage to be allocated in GBs. Changing this forces a new Cloud VM Cluster to be created.
DbNodeStorageSizeInGbs pulumi.IntPtrInput
// The list of DB servers. Changing this forces a new Cloud VM Cluster to be created.
DbServers pulumi.StringArrayInput
// The user-friendly name for the Cloud VM Cluster. Changing this forces a new Cloud VM Cluster to be created. The name does not need to be unique.
DisplayName pulumi.StringInput
// The name of the OCI Private DNS Zone to be associated with the Cloud VM Cluster. This is required for specifying your own private domain name. Changing this forces a new Cloud VM Cluster to be created.
Domain pulumi.StringPtrInput
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations CloudVmClusterFileSystemConfigurationArrayInput
// A valid Oracle Grid Infrastructure (GI) software version. Changing this forces a new Cloud VM Cluster to be created.
GiVersion pulumi.StringInput
// The hostname for the Cloud VM Cluster without suffix. Changing this forces a new Cloud VM Cluster to be created.
Hostname pulumi.StringInput
// The Oracle license model that applies to the Cloud VM Cluster, either `BringYourOwnLicense` or `LicenseIncluded`. Changing this forces a new Cloud VM Cluster to be created.
LicenseModel 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/oracle/getAutonomousDatabaseCloneFromDatabase.go | sdk/go/azure/oracle/getAutonomousDatabaseCloneFromDatabase.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 oracle
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 autonomous database clone from database.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupAutonomousDatabaseCloneFromDatabase(ctx, &oracle.LookupAutonomousDatabaseCloneFromDatabaseArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupAutonomousDatabaseCloneFromDatabase(ctx *pulumi.Context, args *LookupAutonomousDatabaseCloneFromDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupAutonomousDatabaseCloneFromDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAutonomousDatabaseCloneFromDatabaseResult
err := ctx.Invoke("azure:oracle/getAutonomousDatabaseCloneFromDatabase:getAutonomousDatabaseCloneFromDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutonomousDatabaseCloneFromDatabase.
type LookupAutonomousDatabaseCloneFromDatabaseArgs struct {
// The name of this autonomous database clone from database.
Name string `pulumi:"name"`
// The name of the Resource Group where the autonomous database cloned from database exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAutonomousDatabaseCloneFromDatabase.
type LookupAutonomousDatabaseCloneFromDatabaseResult struct {
// The current amount of storage in use for user and system data, in terabytes (TB).
ActualUsedDataStorageSizeInTb float64 `pulumi:"actualUsedDataStorageSizeInTb"`
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTb` value. You can compare this value to the `actualUsedDataStorageSizeInTb` value to determine if a manual shrink operation is appropriate for your allocated storage.
AllocatedStorageSizeInTb float64 `pulumi:"allocatedStorageSizeInTb"`
// A list of IP addresses on the access control list.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// A list of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
AvailableUpgradeVersions []string `pulumi:"availableUpgradeVersions"`
// The backup retention period in days.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database.
CharacterSet string `pulumi:"characterSet"`
// The compute amount (CPUs) available to the database.
ComputeCount float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database.
ComputeModel string `pulumi:"computeModel"`
// The connection string used to connect to the Autonomous Database.
ConnectionStrings []string `pulumi:"connectionStrings"`
// The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0.
CpuCoreCount int `pulumi:"cpuCoreCount"`
// A list of Customer's contact email addresses.
CustomerContacts []string `pulumi:"customerContacts"`
// The quantity of data in the database, in gigabytes.
DataStorageSizeInGb int `pulumi:"dataStorageSizeInGb"`
// The maximum storage that can be allocated for the database, in terabytes.
DataStorageSizeInTb int `pulumi:"dataStorageSizeInTb"`
// The Oracle Database version for Autonomous Database.
DatabaseVersion string `pulumi:"databaseVersion"`
// The Autonomous Database workload type.
DatabaseWorkload string `pulumi:"databaseWorkload"`
// The display name for the Autonomous Database.
DisplayName string `pulumi:"displayName"`
// Indicates the number of seconds of data loss for a Data Guard failover.
FailedDataRecoveryInSeconds int `pulumi:"failedDataRecoveryInSeconds"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The area assigned to In-Memory tables in Autonomous Database.
InMemoryAreaInGb int `pulumi:"inMemoryAreaInGb"`
// The Oracle license model that applied to the Oracle Autonomous Database.
LicenseModel string `pulumi:"licenseModel"`
// Information about the current lifecycle state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// The current state of the backup.
LifecycleState string `pulumi:"lifecycleState"`
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard
LocalAdgAutoFailoverMaxDataLossLimitInSeconds int `pulumi:"localAdgAutoFailoverMaxDataLossLimitInSeconds"`
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
LocalDataGuardEnabled bool `pulumi:"localDataGuardEnabled"`
// The Azure Region where the autonomous database cloned from database exists.
Location string `pulumi:"location"`
// A `longTermBackupSchedule` block as defined below.
LongTermBackupSchedules []GetAutonomousDatabaseCloneFromDatabaseLongTermBackupSchedule `pulumi:"longTermBackupSchedules"`
// The amount of memory in gigabytes per ECPU or OCPU.
MemoryPerOracleComputeUnitInGb int `pulumi:"memoryPerOracleComputeUnitInGb"`
// Specifies if the Autonomous Database requires mTLS connections.
MtlsConnectionRequired bool `pulumi:"mtlsConnectionRequired"`
Name string `pulumi:"name"`
// The national character set for the autonomous database.
NationalCharacterSet string `pulumi:"nationalCharacterSet"`
NextLongTermBackupTimestamp string `pulumi:"nextLongTermBackupTimestamp"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
Ocid string `pulumi:"ocid"`
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
PeerDatabaseIds []string `pulumi:"peerDatabaseIds"`
// Indicates if the Autonomous Database version is a preview version.
Preview bool `pulumi:"preview"`
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
PreviewVersionWithServiceTermsAccepted bool `pulumi:"previewVersionWithServiceTermsAccepted"`
// The private endpoint IP address for the resource.
PrivateEndpointIp string `pulumi:"privateEndpointIp"`
// The private endpoint label for the resource.
PrivateEndpointLabel string `pulumi:"privateEndpointLabel"`
// The private endpoint for the resource.
PrivateEndpointUrl string `pulumi:"privateEndpointUrl"`
// An array of CPU values that an Autonomous Database can be scaled to.
ProvisionableCpuses []int `pulumi:"provisionableCpuses"`
// Indicates whether reconnect clone is enabled.
ReconnectCloneEnabled bool `pulumi:"reconnectCloneEnabled"`
// Indicates whether the clone is a refreshable clone.
RefreshableClone bool `pulumi:"refreshableClone"`
// The current refreshable status of the clone. Values include `Refreshing` and `NotRefreshing`.
RefreshableStatus string `pulumi:"refreshableStatus"`
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
RemoteDataGuardEnabled bool `pulumi:"remoteDataGuardEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The URL of the Service Console for the Autonomous Database.
ServiceConsoleUrl string `pulumi:"serviceConsoleUrl"`
// The ID of the source Autonomous Database from which this clone was created.
SourceAutonomousDatabaseId string `pulumi:"sourceAutonomousDatabaseId"`
// The URL of the SQL web developer portal.
SqlWebDeveloperUrl string `pulumi:"sqlWebDeveloperUrl"`
// The ID to an Azure Resource Manager subnet the resource is associated with.
SubnetId string `pulumi:"subnetId"`
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
SupportedRegionsToCloneTos []string `pulumi:"supportedRegionsToCloneTos"`
// A mapping of tags assigned to the autonomous database clone from database.
Tags map[string]string `pulumi:"tags"`
// The timestamp the Autonomous Database was created.
TimeCreatedInUtc string `pulumi:"timeCreatedInUtc"`
// The timestamp the Autonomous Data Guard role was switched for the Autonomous Database. For databases that have standbys in both the primary Data Guard region and a remote Data Guard standby region, this is the latest timestamp of either the database using the "primary" role in the primary Data Guard region, or database located in the remote Data Guard standby region.
TimeDataGuardRoleChangedInUtc string `pulumi:"timeDataGuardRoleChangedInUtc"`
// The timestamp the Always Free database will be automatically deleted because of inactivity. If the database is in the STOPPED state and without activity until this time, it will be deleted.
TimeDeletionOfFreeAutonomousDatabaseInUtc string `pulumi:"timeDeletionOfFreeAutonomousDatabaseInUtc"`
// The timestamp that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.
TimeLocalDataGuardEnabledInUtc string `pulumi:"timeLocalDataGuardEnabledInUtc"`
// The timestamp when maintenance will begin.
TimeMaintenanceBeginInUtc string `pulumi:"timeMaintenanceBeginInUtc"`
// The timestamp when maintenance will end.
TimeMaintenanceEndInUtc string `pulumi:"timeMaintenanceEndInUtc"`
// The timestamp of the last failover operation.
TimeOfLastFailoverInUtc string `pulumi:"timeOfLastFailoverInUtc"`
// The timestamp when the last refresh happened.
TimeOfLastRefreshInUtc string `pulumi:"timeOfLastRefreshInUtc"`
// The refresh point timestamp (UTC). The refresh point is the time to which the database was most recently refreshed. Data created after the refresh point is not included in the refresh.
TimeOfLastRefreshPointInUtc string `pulumi:"timeOfLastRefreshPointInUtc"`
// The timestamp of the last switchover operation for the Autonomous Database.
TimeOfLastSwitchoverInUtc string `pulumi:"timeOfLastSwitchoverInUtc"`
// The timestamp the Always Free database will be stopped because of inactivity. If this time is reached without any database activity, the database will automatically be put into the STOPPED state.
TimeReclamationOfFreeAutonomousDatabaseInUtc string `pulumi:"timeReclamationOfFreeAutonomousDatabaseInUtc"`
// The time until reconnect clone is enabled.
TimeUntilReconnectInUtc string `pulumi:"timeUntilReconnectInUtc"`
// The storage space consumed by Autonomous Database in gigabytes.
UsedDataStorageSizeInGb int `pulumi:"usedDataStorageSizeInGb"`
// The amount of storage that has been used, in terabytes.
UsedDataStorageSizeInTb int `pulumi:"usedDataStorageSizeInTb"`
// The ID to an Azure Resource Manager virtual network resource.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupAutonomousDatabaseCloneFromDatabaseOutput(ctx *pulumi.Context, args LookupAutonomousDatabaseCloneFromDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupAutonomousDatabaseCloneFromDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAutonomousDatabaseCloneFromDatabaseResultOutput, error) {
args := v.(LookupAutonomousDatabaseCloneFromDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAutonomousDatabaseCloneFromDatabase:getAutonomousDatabaseCloneFromDatabase", args, LookupAutonomousDatabaseCloneFromDatabaseResultOutput{}, options).(LookupAutonomousDatabaseCloneFromDatabaseResultOutput), nil
}).(LookupAutonomousDatabaseCloneFromDatabaseResultOutput)
}
// A collection of arguments for invoking getAutonomousDatabaseCloneFromDatabase.
type LookupAutonomousDatabaseCloneFromDatabaseOutputArgs struct {
// The name of this autonomous database clone from database.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the autonomous database cloned from database exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAutonomousDatabaseCloneFromDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseCloneFromDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getAutonomousDatabaseCloneFromDatabase.
type LookupAutonomousDatabaseCloneFromDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseCloneFromDatabaseResult)(nil)).Elem()
}
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ToLookupAutonomousDatabaseCloneFromDatabaseResultOutput() LookupAutonomousDatabaseCloneFromDatabaseResultOutput {
return o
}
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ToLookupAutonomousDatabaseCloneFromDatabaseResultOutputWithContext(ctx context.Context) LookupAutonomousDatabaseCloneFromDatabaseResultOutput {
return o
}
// The current amount of storage in use for user and system data, in terabytes (TB).
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ActualUsedDataStorageSizeInTb() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) float64 {
return v.ActualUsedDataStorageSizeInTb
}).(pulumi.Float64Output)
}
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTb` value. You can compare this value to the `actualUsedDataStorageSizeInTb` value to determine if a manual shrink operation is appropriate for your allocated storage.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) AllocatedStorageSizeInTb() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) float64 { return v.AllocatedStorageSizeInTb }).(pulumi.Float64Output)
}
// A list of IP addresses on the access control list.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) AllowedIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.AllowedIpAddresses }).(pulumi.StringArrayOutput)
}
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) AutoScalingEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.AutoScalingEnabled }).(pulumi.BoolOutput)
}
// Indicates if auto scaling is enabled for the Autonomous Database storage.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) AutoScalingForStorageEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.AutoScalingForStorageEnabled }).(pulumi.BoolOutput)
}
// A list of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) AvailableUpgradeVersions() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.AvailableUpgradeVersions }).(pulumi.StringArrayOutput)
}
// The backup retention period in days.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) BackupRetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.BackupRetentionPeriodInDays }).(pulumi.IntOutput)
}
// The character set for the autonomous database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) CharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.CharacterSet }).(pulumi.StringOutput)
}
// The compute amount (CPUs) available to the database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ComputeCount() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) float64 { return v.ComputeCount }).(pulumi.Float64Output)
}
// The compute model of the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ComputeModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.ComputeModel }).(pulumi.StringOutput)
}
// The connection string used to connect to the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ConnectionStrings() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.ConnectionStrings }).(pulumi.StringArrayOutput)
}
// The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) CpuCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.CpuCoreCount }).(pulumi.IntOutput)
}
// A list of Customer's contact email addresses.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) CustomerContacts() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.CustomerContacts }).(pulumi.StringArrayOutput)
}
// The quantity of data in the database, in gigabytes.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) DataStorageSizeInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.DataStorageSizeInGb }).(pulumi.IntOutput)
}
// The maximum storage that can be allocated for the database, in terabytes.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) DataStorageSizeInTb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.DataStorageSizeInTb }).(pulumi.IntOutput)
}
// The Oracle Database version for Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) DatabaseVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.DatabaseVersion }).(pulumi.StringOutput)
}
// The Autonomous Database workload type.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) DatabaseWorkload() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.DatabaseWorkload }).(pulumi.StringOutput)
}
// The display name for the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Indicates the number of seconds of data loss for a Data Guard failover.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) FailedDataRecoveryInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.FailedDataRecoveryInSeconds }).(pulumi.IntOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// The area assigned to In-Memory tables in Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) InMemoryAreaInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.InMemoryAreaInGb }).(pulumi.IntOutput)
}
// The Oracle license model that applied to the Oracle Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LicenseModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.LicenseModel }).(pulumi.StringOutput)
}
// Information about the current lifecycle state.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// The current state of the backup.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LocalAdgAutoFailoverMaxDataLossLimitInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int {
return v.LocalAdgAutoFailoverMaxDataLossLimitInSeconds
}).(pulumi.IntOutput)
}
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LocalDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.LocalDataGuardEnabled }).(pulumi.BoolOutput)
}
// The Azure Region where the autonomous database cloned from database exists.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.Location }).(pulumi.StringOutput)
}
// A `longTermBackupSchedule` block as defined below.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) LongTermBackupSchedules() GetAutonomousDatabaseCloneFromDatabaseLongTermBackupScheduleArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []GetAutonomousDatabaseCloneFromDatabaseLongTermBackupSchedule {
return v.LongTermBackupSchedules
}).(GetAutonomousDatabaseCloneFromDatabaseLongTermBackupScheduleArrayOutput)
}
// The amount of memory in gigabytes per ECPU or OCPU.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) MemoryPerOracleComputeUnitInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) int { return v.MemoryPerOracleComputeUnitInGb }).(pulumi.IntOutput)
}
// Specifies if the Autonomous Database requires mTLS connections.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) MtlsConnectionRequired() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.MtlsConnectionRequired }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
// The national character set for the autonomous database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) NationalCharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.NationalCharacterSet }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) NextLongTermBackupTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.NextLongTermBackupTimestamp }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.Ocid }).(pulumi.StringOutput)
}
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) PeerDatabaseIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.PeerDatabaseIds }).(pulumi.StringArrayOutput)
}
// Indicates if the Autonomous Database version is a preview version.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Preview() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.Preview }).(pulumi.BoolOutput)
}
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) PreviewVersionWithServiceTermsAccepted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool {
return v.PreviewVersionWithServiceTermsAccepted
}).(pulumi.BoolOutput)
}
// The private endpoint IP address for the resource.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) PrivateEndpointIp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.PrivateEndpointIp }).(pulumi.StringOutput)
}
// The private endpoint label for the resource.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) PrivateEndpointLabel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.PrivateEndpointLabel }).(pulumi.StringOutput)
}
// The private endpoint for the resource.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) PrivateEndpointUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.PrivateEndpointUrl }).(pulumi.StringOutput)
}
// An array of CPU values that an Autonomous Database can be scaled to.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ProvisionableCpuses() pulumi.IntArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []int { return v.ProvisionableCpuses }).(pulumi.IntArrayOutput)
}
// Indicates whether reconnect clone is enabled.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ReconnectCloneEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.ReconnectCloneEnabled }).(pulumi.BoolOutput)
}
// Indicates whether the clone is a refreshable clone.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) RefreshableClone() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.RefreshableClone }).(pulumi.BoolOutput)
}
// The current refreshable status of the clone. Values include `Refreshing` and `NotRefreshing`.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) RefreshableStatus() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.RefreshableStatus }).(pulumi.StringOutput)
}
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) RemoteDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) bool { return v.RemoteDataGuardEnabled }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The URL of the Service Console for the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) ServiceConsoleUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.ServiceConsoleUrl }).(pulumi.StringOutput)
}
// The ID of the source Autonomous Database from which this clone was created.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) SourceAutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.SourceAutonomousDatabaseId }).(pulumi.StringOutput)
}
// The URL of the SQL web developer portal.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) SqlWebDeveloperUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.SqlWebDeveloperUrl }).(pulumi.StringOutput)
}
// The ID to an Azure Resource Manager subnet the resource is associated with.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) SupportedRegionsToCloneTos() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) []string { return v.SupportedRegionsToCloneTos }).(pulumi.StringArrayOutput)
}
// A mapping of tags assigned to the autonomous database clone from database.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The timestamp the Autonomous Database was created.
func (o LookupAutonomousDatabaseCloneFromDatabaseResultOutput) TimeCreatedInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromDatabaseResult) string { return v.TimeCreatedInUtc }).(pulumi.StringOutput)
}
| 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/oracle/getGiVersions.go | sdk/go/azure/oracle/getGiVersions.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 oracle
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of GI Versions in Oracle Cloud Infrastructure Database service.
//
// Gets a list of supported GI versions.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.GetGiVersions(ctx, &oracle.GetGiVersionsArgs{
// Location: "eastus",
// Zone: pulumi.StringRef("2"),
// Shape: pulumi.StringRef("Exadata.X9M"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("example", example)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
func GetGiVersions(ctx *pulumi.Context, args *GetGiVersionsArgs, opts ...pulumi.InvokeOption) (*GetGiVersionsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetGiVersionsResult
err := ctx.Invoke("azure:oracle/getGiVersions:getGiVersions", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGiVersions.
type GetGiVersionsArgs struct {
// The Azure Region to query for the GI Versions in.
Location string `pulumi:"location"`
// The model name of the Cloud Exadata Infrastructure resource. Possible values are `ExaDbXS`, `Exadata.X9M`, and `Exadata.X11M`. This is used to filter out the available GI versions compatible with the given model.
Shape *string `pulumi:"shape"`
// Indicates the Azure zone for the Cloud Exadata Infrastructure, used to filter the available GI versions within a given zone.
Zone *string `pulumi:"zone"`
}
// A collection of values returned by getGiVersions.
type GetGiVersionsResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
Shape *string `pulumi:"shape"`
// A list of valid GI software versions.
Versions []string `pulumi:"versions"`
Zone *string `pulumi:"zone"`
}
func GetGiVersionsOutput(ctx *pulumi.Context, args GetGiVersionsOutputArgs, opts ...pulumi.InvokeOption) GetGiVersionsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetGiVersionsResultOutput, error) {
args := v.(GetGiVersionsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getGiVersions:getGiVersions", args, GetGiVersionsResultOutput{}, options).(GetGiVersionsResultOutput), nil
}).(GetGiVersionsResultOutput)
}
// A collection of arguments for invoking getGiVersions.
type GetGiVersionsOutputArgs struct {
// The Azure Region to query for the GI Versions in.
Location pulumi.StringInput `pulumi:"location"`
// The model name of the Cloud Exadata Infrastructure resource. Possible values are `ExaDbXS`, `Exadata.X9M`, and `Exadata.X11M`. This is used to filter out the available GI versions compatible with the given model.
Shape pulumi.StringPtrInput `pulumi:"shape"`
// Indicates the Azure zone for the Cloud Exadata Infrastructure, used to filter the available GI versions within a given zone.
Zone pulumi.StringPtrInput `pulumi:"zone"`
}
func (GetGiVersionsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetGiVersionsArgs)(nil)).Elem()
}
// A collection of values returned by getGiVersions.
type GetGiVersionsResultOutput struct{ *pulumi.OutputState }
func (GetGiVersionsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetGiVersionsResult)(nil)).Elem()
}
func (o GetGiVersionsResultOutput) ToGetGiVersionsResultOutput() GetGiVersionsResultOutput {
return o
}
func (o GetGiVersionsResultOutput) ToGetGiVersionsResultOutputWithContext(ctx context.Context) GetGiVersionsResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetGiVersionsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetGiVersionsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetGiVersionsResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetGiVersionsResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetGiVersionsResultOutput) Shape() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGiVersionsResult) *string { return v.Shape }).(pulumi.StringPtrOutput)
}
// A list of valid GI software versions.
func (o GetGiVersionsResultOutput) Versions() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetGiVersionsResult) []string { return v.Versions }).(pulumi.StringArrayOutput)
}
func (o GetGiVersionsResultOutput) Zone() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGiVersionsResult) *string { return v.Zone }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetGiVersionsResultOutput{})
}
| 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/oracle/autonomousDatabase.go | sdk/go/azure/oracle/autonomousDatabase.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Autonomous Database.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := oracle.NewAutonomousDatabase(ctx, "example", &oracle.AutonomousDatabaseArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// SubnetId: pulumi.String("example"),
// DisplayName: pulumi.String("example"),
// DbWorkload: pulumi.String("example"),
// MtlsConnectionRequired: pulumi.Bool(false),
// BackupRetentionPeriodInDays: pulumi.Int(42),
// ComputeModel: pulumi.String("example"),
// DataStorageSizeInGbs: 42,
// AutoScalingForStorageEnabled: pulumi.Bool(false),
// VirtualNetworkId: pulumi.String("example"),
// AdminPassword: pulumi.String("example"),
// AutoScalingEnabled: pulumi.Bool("example"),
// CharacterSet: pulumi.String("example"),
// ComputeCount: pulumi.Float64(1.23456),
// NationalCharacterSet: pulumi.String("example"),
// LicenseModel: pulumi.String("false"),
// DbVersion: pulumi.String("example"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## > **Note:** `allowedIps` cannot be updated after provisioning the resource with an empty list (i.e., a publicly accessible Autonomous Database)
//
// size: the maximum number of Ips provided shouldn't exceed 1024. At this time we only support IpV4.
//
// ***
//
// * `customerContacts` - (Optional) Specifies a list of customer contacts as email addresses. Changing this forces a new Autonomous Database to be created.
//
// * `tags` - (Optional) A mapping of tags which should be assigned to the Autonomous Database.
//
// * `longTermBackupSchedule` - (Optional) A `longTermBackupSchedule` block as defined below.
//
// > **Note:** for more information see [Create Long-Term Backups on Autonomous Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/backup-long-term.html#GUID-BD76E02E-AEB0-4450-A6AB-5C9EB1F4EAD0)
//
// ***
//
// A `longTermBackupSchedule` blocks supports the following:
//
// * `repeatCadence` - (Required) Specifies the schedule for automated long-term backups. Possible values are `Weekly`, `Monthly`, `Yearly`, or `OneTime` (does not repeat) . For example, if the Backup date and Time is `Jan 24, 2025 00:09:00 UTC` and this is a Tuesday, and Weekly is selected, the long-term backup will happen every Tuesday.
//
// * `timeOfBackup` - (Required) The date and time in which the backup should be taken in ISO8601 Date Time format.
//
// * `retentionPeriodInDays` - (Required) The retention period in days for the Autonomous Database Backup. Possible values range from `90` to `2558` days (7 years).
//
// * `enabled` - (Required) A boolean value that indicates whether the long term backup schedule is enabled.
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Autonomous Databases can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/autonomousDatabase:AutonomousDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Oracle.Database/autonomousDatabases/autonomousDatabases1
// ```
type AutonomousDatabase struct {
pulumi.CustomResourceState
// The password must be between `12` and ` 30 `characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing.
AdminPassword pulumi.StringOutput `pulumi:"adminPassword"`
// (Optional) Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses.
AllowedIps pulumi.StringArrayOutput `pulumi:"allowedIps"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled pulumi.BoolOutput `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled pulumi.BoolOutput `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups.
BackupRetentionPeriodInDays pulumi.IntOutput `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database. Allowed values are: `AL32UTF8`, `AR8ADOS710`, `AR8ADOS720`, `AR8APTEC715`, `AR8ARABICMACS`, `AR8ASMO8X`, `AR8ISO8859P6`, `AR8MSWIN1256`, `AR8MUSSAD768`, `AR8NAFITHA711`, `AR8NAFITHA721`, `AR8SAKHR706`, `AR8SAKHR707`, `AZ8ISO8859P9E`, `BG8MSWIN`, `BG8PC437S`, `BLT8CP921`, `BLT8ISO8859P13`, `BLT8MSWIN1257`, `BLT8PC775`, `BN8BSCII`, `CDN8PC863`, `CEL8ISO8859P14`, `CL8ISO8859P5`, `CL8ISOIR111`, `CL8KOI8R`, `CL8KOI8U`, `CL8MACCYRILLICS`, `CL8MSWIN1251`, `EE8ISO8859P2`, `EE8MACCES`, `EE8MACCROATIANS`, `EE8MSWIN1250`, `EE8PC852`, `EL8DEC`, `EL8ISO8859P7`, `EL8MACGREEKS`, `EL8MSWIN1253`, `EL8PC437S`, `EL8PC851`, `EL8PC869`, `ET8MSWIN923`, `HU8ABMOD`, `HU8CWI2`, `IN8ISCII`, `IS8PC861`, `IW8ISO8859P8`, `IW8MACHEBREWS`, `IW8MSWIN1255`, `IW8PC1507`, `JA16EUC`, `JA16EUCTILDE`, `JA16SJIS`, `JA16SJISTILDE`, `JA16VMS`, `KO16KSC5601`, `KO16KSCCS`, `KO16MSWIN949`, `LA8ISO6937`, `LA8PASSPORT`, `LT8MSWIN921`, `LT8PC772`, `LT8PC774`, `LV8PC1117`, `LV8PC8LR`, `LV8RST104090`, `N8PC865`, `NE8ISO8859P10`, `NEE8ISO8859P4`, `RU8BESTA`, `RU8PC855`, `RU8PC866`, `SE8ISO8859P3`, `TH8MACTHAIS`, `TH8TISASCII`, `TR8DEC`, `TR8MACTURKISHS`, `TR8MSWIN1254`, `TR8PC857`, `US7ASCII`, `US8PC437`, `UTF8`, `VN8MSWIN1258`, `VN8VN3`, `WE8DEC`, `WE8DG`, `WE8ISO8859P1`, `WE8ISO8859P15`, `WE8ISO8859P9`, `WE8MACROMAN8S`, `WE8MSWIN1252`, `WE8NCR4970`, `WE8NEXTSTEP`, `WE8PC850`, `WE8PC858`, `WE8PC860`, `WE8ROMAN8`, `ZHS16CGB231280`, `ZHS16GBK`, `ZHT16BIG5`, `ZHT16CCDC`, `ZHT16DBT`, `ZHT16HKSCS`, `ZHT16MSWIN950`, `ZHT32EUC`, `ZHT32SOPS`, `ZHT32TRIS`. Changing this forces a new Autonomous Database to be created.
CharacterSet pulumi.StringOutput `pulumi:"characterSet"`
// The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the `ECPU` compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU.
ComputeCount pulumi.Float64Output `pulumi:"computeCount"`
// The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. Changing this forces a new Autonomous Database to be created.
ComputeModel pulumi.StringOutput `pulumi:"computeModel"`
CustomerContacts pulumi.StringArrayOutput `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes.
DataStorageSizeInTbs pulumi.IntOutput `pulumi:"dataStorageSizeInTbs"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database to be created.
DbVersion pulumi.StringOutput `pulumi:"dbVersion"`
// The Autonomous Database workload type. Changing this forces a new Autonomous Database to be created. Possible values are `AJD`, `APEX`, `DW` and `OLTP`.
//
// > **Note:** `AJD` indicates an Autonomous JSON database; `APEX` indicates an Autonomous Database with the Oracle APEX Application Development workload type; `DW` indicates an Autonomous Data Warehouse database; `OLTP` indicates an Autonomous Transaction Processing database
// **Note:** When Provisioning Database with `APEX` workload `mtlsConnectionRequired` must be set to `true`.
DbWorkload pulumi.StringOutput `pulumi:"dbWorkload"`
// The user-friendly name for the Autonomous Database. The name does not have to be unique. Changing this forces a new Autonomous Database to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database to be created. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter.
LicenseModel pulumi.StringOutput `pulumi:"licenseModel"`
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
Location pulumi.StringOutput `pulumi:"location"`
LongTermBackupSchedule AutonomousDatabaseLongTermBackupSchedulePtrOutput `pulumi:"longTermBackupSchedule"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database to be created. Default value `false`.
//
// > **Note:** `mtlsConnectionRequired` must be set to `true` for all workload types except 'APEX' when creating a database with public access.
MtlsConnectionRequired pulumi.BoolOutput `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this Autonomous Database. Changing this forces a new Autonomous Database to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database to be created. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
NationalCharacterSet pulumi.StringOutput `pulumi:"nationalCharacterSet"`
// The name of the Resource Group where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. Changing this forces a new Autonomous Database to be created.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the vnet associated with the cloud VM cluster. Changing this forces a new Autonomous Database to be created.
VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"`
}
// NewAutonomousDatabase registers a new resource with the given unique name, arguments, and options.
func NewAutonomousDatabase(ctx *pulumi.Context,
name string, args *AutonomousDatabaseArgs, opts ...pulumi.ResourceOption) (*AutonomousDatabase, 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.AutoScalingEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingEnabled'")
}
if args.AutoScalingForStorageEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingForStorageEnabled'")
}
if args.BackupRetentionPeriodInDays == nil {
return nil, errors.New("invalid value for required argument 'BackupRetentionPeriodInDays'")
}
if args.CharacterSet == nil {
return nil, errors.New("invalid value for required argument 'CharacterSet'")
}
if args.ComputeCount == nil {
return nil, errors.New("invalid value for required argument 'ComputeCount'")
}
if args.ComputeModel == nil {
return nil, errors.New("invalid value for required argument 'ComputeModel'")
}
if args.DataStorageSizeInTbs == nil {
return nil, errors.New("invalid value for required argument 'DataStorageSizeInTbs'")
}
if args.DbVersion == nil {
return nil, errors.New("invalid value for required argument 'DbVersion'")
}
if args.DbWorkload == nil {
return nil, errors.New("invalid value for required argument 'DbWorkload'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.LicenseModel == nil {
return nil, errors.New("invalid value for required argument 'LicenseModel'")
}
if args.MtlsConnectionRequired == nil {
return nil, errors.New("invalid value for required argument 'MtlsConnectionRequired'")
}
if args.NationalCharacterSet == nil {
return nil, errors.New("invalid value for required argument 'NationalCharacterSet'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.AdminPassword != nil {
args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"adminPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutonomousDatabase
err := ctx.RegisterResource("azure:oracle/autonomousDatabase:AutonomousDatabase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutonomousDatabase gets an existing AutonomousDatabase 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 GetAutonomousDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutonomousDatabaseState, opts ...pulumi.ResourceOption) (*AutonomousDatabase, error) {
var resource AutonomousDatabase
err := ctx.ReadResource("azure:oracle/autonomousDatabase:AutonomousDatabase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutonomousDatabase resources.
type autonomousDatabaseState struct {
// The password must be between `12` and ` 30 `characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing.
AdminPassword *string `pulumi:"adminPassword"`
// (Optional) Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses.
AllowedIps []string `pulumi:"allowedIps"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled *bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled *bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups.
BackupRetentionPeriodInDays *int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database. Allowed values are: `AL32UTF8`, `AR8ADOS710`, `AR8ADOS720`, `AR8APTEC715`, `AR8ARABICMACS`, `AR8ASMO8X`, `AR8ISO8859P6`, `AR8MSWIN1256`, `AR8MUSSAD768`, `AR8NAFITHA711`, `AR8NAFITHA721`, `AR8SAKHR706`, `AR8SAKHR707`, `AZ8ISO8859P9E`, `BG8MSWIN`, `BG8PC437S`, `BLT8CP921`, `BLT8ISO8859P13`, `BLT8MSWIN1257`, `BLT8PC775`, `BN8BSCII`, `CDN8PC863`, `CEL8ISO8859P14`, `CL8ISO8859P5`, `CL8ISOIR111`, `CL8KOI8R`, `CL8KOI8U`, `CL8MACCYRILLICS`, `CL8MSWIN1251`, `EE8ISO8859P2`, `EE8MACCES`, `EE8MACCROATIANS`, `EE8MSWIN1250`, `EE8PC852`, `EL8DEC`, `EL8ISO8859P7`, `EL8MACGREEKS`, `EL8MSWIN1253`, `EL8PC437S`, `EL8PC851`, `EL8PC869`, `ET8MSWIN923`, `HU8ABMOD`, `HU8CWI2`, `IN8ISCII`, `IS8PC861`, `IW8ISO8859P8`, `IW8MACHEBREWS`, `IW8MSWIN1255`, `IW8PC1507`, `JA16EUC`, `JA16EUCTILDE`, `JA16SJIS`, `JA16SJISTILDE`, `JA16VMS`, `KO16KSC5601`, `KO16KSCCS`, `KO16MSWIN949`, `LA8ISO6937`, `LA8PASSPORT`, `LT8MSWIN921`, `LT8PC772`, `LT8PC774`, `LV8PC1117`, `LV8PC8LR`, `LV8RST104090`, `N8PC865`, `NE8ISO8859P10`, `NEE8ISO8859P4`, `RU8BESTA`, `RU8PC855`, `RU8PC866`, `SE8ISO8859P3`, `TH8MACTHAIS`, `TH8TISASCII`, `TR8DEC`, `TR8MACTURKISHS`, `TR8MSWIN1254`, `TR8PC857`, `US7ASCII`, `US8PC437`, `UTF8`, `VN8MSWIN1258`, `VN8VN3`, `WE8DEC`, `WE8DG`, `WE8ISO8859P1`, `WE8ISO8859P15`, `WE8ISO8859P9`, `WE8MACROMAN8S`, `WE8MSWIN1252`, `WE8NCR4970`, `WE8NEXTSTEP`, `WE8PC850`, `WE8PC858`, `WE8PC860`, `WE8ROMAN8`, `ZHS16CGB231280`, `ZHS16GBK`, `ZHT16BIG5`, `ZHT16CCDC`, `ZHT16DBT`, `ZHT16HKSCS`, `ZHT16MSWIN950`, `ZHT32EUC`, `ZHT32SOPS`, `ZHT32TRIS`. Changing this forces a new Autonomous Database to be created.
CharacterSet *string `pulumi:"characterSet"`
// The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the `ECPU` compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU.
ComputeCount *float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. Changing this forces a new Autonomous Database to be created.
ComputeModel *string `pulumi:"computeModel"`
CustomerContacts []string `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes.
DataStorageSizeInTbs *int `pulumi:"dataStorageSizeInTbs"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database to be created.
DbVersion *string `pulumi:"dbVersion"`
// The Autonomous Database workload type. Changing this forces a new Autonomous Database to be created. Possible values are `AJD`, `APEX`, `DW` and `OLTP`.
//
// > **Note:** `AJD` indicates an Autonomous JSON database; `APEX` indicates an Autonomous Database with the Oracle APEX Application Development workload type; `DW` indicates an Autonomous Data Warehouse database; `OLTP` indicates an Autonomous Transaction Processing database
// **Note:** When Provisioning Database with `APEX` workload `mtlsConnectionRequired` must be set to `true`.
DbWorkload *string `pulumi:"dbWorkload"`
// The user-friendly name for the Autonomous Database. The name does not have to be unique. Changing this forces a new Autonomous Database to be created.
DisplayName *string `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database to be created. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter.
LicenseModel *string `pulumi:"licenseModel"`
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
Location *string `pulumi:"location"`
LongTermBackupSchedule *AutonomousDatabaseLongTermBackupSchedule `pulumi:"longTermBackupSchedule"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database to be created. Default value `false`.
//
// > **Note:** `mtlsConnectionRequired` must be set to `true` for all workload types except 'APEX' when creating a database with public access.
MtlsConnectionRequired *bool `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this Autonomous Database. Changing this forces a new Autonomous Database to be created.
Name *string `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database to be created. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
NationalCharacterSet *string `pulumi:"nationalCharacterSet"`
// The name of the Resource Group where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. Changing this forces a new Autonomous Database to be created.
SubnetId *string `pulumi:"subnetId"`
Tags map[string]string `pulumi:"tags"`
// The ID of the vnet associated with the cloud VM cluster. Changing this forces a new Autonomous Database to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type AutonomousDatabaseState struct {
// The password must be between `12` and ` 30 `characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing.
AdminPassword pulumi.StringPtrInput
// (Optional) Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses.
AllowedIps pulumi.StringArrayInput
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled pulumi.BoolPtrInput
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled pulumi.BoolPtrInput
// Retention period, in days, for backups.
BackupRetentionPeriodInDays pulumi.IntPtrInput
// The character set for the autonomous database. Allowed values are: `AL32UTF8`, `AR8ADOS710`, `AR8ADOS720`, `AR8APTEC715`, `AR8ARABICMACS`, `AR8ASMO8X`, `AR8ISO8859P6`, `AR8MSWIN1256`, `AR8MUSSAD768`, `AR8NAFITHA711`, `AR8NAFITHA721`, `AR8SAKHR706`, `AR8SAKHR707`, `AZ8ISO8859P9E`, `BG8MSWIN`, `BG8PC437S`, `BLT8CP921`, `BLT8ISO8859P13`, `BLT8MSWIN1257`, `BLT8PC775`, `BN8BSCII`, `CDN8PC863`, `CEL8ISO8859P14`, `CL8ISO8859P5`, `CL8ISOIR111`, `CL8KOI8R`, `CL8KOI8U`, `CL8MACCYRILLICS`, `CL8MSWIN1251`, `EE8ISO8859P2`, `EE8MACCES`, `EE8MACCROATIANS`, `EE8MSWIN1250`, `EE8PC852`, `EL8DEC`, `EL8ISO8859P7`, `EL8MACGREEKS`, `EL8MSWIN1253`, `EL8PC437S`, `EL8PC851`, `EL8PC869`, `ET8MSWIN923`, `HU8ABMOD`, `HU8CWI2`, `IN8ISCII`, `IS8PC861`, `IW8ISO8859P8`, `IW8MACHEBREWS`, `IW8MSWIN1255`, `IW8PC1507`, `JA16EUC`, `JA16EUCTILDE`, `JA16SJIS`, `JA16SJISTILDE`, `JA16VMS`, `KO16KSC5601`, `KO16KSCCS`, `KO16MSWIN949`, `LA8ISO6937`, `LA8PASSPORT`, `LT8MSWIN921`, `LT8PC772`, `LT8PC774`, `LV8PC1117`, `LV8PC8LR`, `LV8RST104090`, `N8PC865`, `NE8ISO8859P10`, `NEE8ISO8859P4`, `RU8BESTA`, `RU8PC855`, `RU8PC866`, `SE8ISO8859P3`, `TH8MACTHAIS`, `TH8TISASCII`, `TR8DEC`, `TR8MACTURKISHS`, `TR8MSWIN1254`, `TR8PC857`, `US7ASCII`, `US8PC437`, `UTF8`, `VN8MSWIN1258`, `VN8VN3`, `WE8DEC`, `WE8DG`, `WE8ISO8859P1`, `WE8ISO8859P15`, `WE8ISO8859P9`, `WE8MACROMAN8S`, `WE8MSWIN1252`, `WE8NCR4970`, `WE8NEXTSTEP`, `WE8PC850`, `WE8PC858`, `WE8PC860`, `WE8ROMAN8`, `ZHS16CGB231280`, `ZHS16GBK`, `ZHT16BIG5`, `ZHT16CCDC`, `ZHT16DBT`, `ZHT16HKSCS`, `ZHT16MSWIN950`, `ZHT32EUC`, `ZHT32SOPS`, `ZHT32TRIS`. Changing this forces a new Autonomous Database to be created.
CharacterSet pulumi.StringPtrInput
// The compute amount (CPUs) available to the database. Minimum and maximum values depend on the compute model and whether the database is an Autonomous Database Serverless instance or an Autonomous Database on Dedicated Exadata Infrastructure. For an Autonomous Database Serverless instance, the `ECPU` compute model requires a minimum value of one, for databases in the elastic resource pool and minimum value of two, otherwise. Required when using the `computeModel` parameter. When using `cpuCoreCount` parameter, it is an error to specify computeCount to a non-null value. Providing `computeModel` and `computeCount` is the preferred method for both OCPU and ECPU.
ComputeCount pulumi.Float64PtrInput
// The compute model of the Autonomous Database. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy. Changing this forces a new Autonomous Database to be created.
ComputeModel pulumi.StringPtrInput
CustomerContacts pulumi.StringArrayInput
// The maximum storage that can be allocated for the database, in terabytes.
DataStorageSizeInTbs pulumi.IntPtrInput
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database to be created.
DbVersion pulumi.StringPtrInput
// The Autonomous Database workload type. Changing this forces a new Autonomous Database to be created. Possible values are `AJD`, `APEX`, `DW` and `OLTP`.
//
// > **Note:** `AJD` indicates an Autonomous JSON database; `APEX` indicates an Autonomous Database with the Oracle APEX Application Development workload type; `DW` indicates an Autonomous Data Warehouse database; `OLTP` indicates an Autonomous Transaction Processing database
// **Note:** When Provisioning Database with `APEX` workload `mtlsConnectionRequired` must be set to `true`.
DbWorkload pulumi.StringPtrInput
// The user-friendly name for the Autonomous Database. The name does not have to be unique. Changing this forces a new Autonomous Database to be created.
DisplayName pulumi.StringPtrInput
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database to be created. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Oracle Database service. Note that when provisioning an [Autonomous Database on dedicated Exadata infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html), this attribute must be null. It is already set at the Autonomous Exadata Infrastructure level. When provisioning an [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) database, if a value is not specified, the system defaults the value to `BRING_YOUR_OWN_LICENSE`. Bring your own license (BYOL) also allows you to select the DB edition using the optional parameter.
LicenseModel pulumi.StringPtrInput
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
Location pulumi.StringPtrInput
LongTermBackupSchedule AutonomousDatabaseLongTermBackupSchedulePtrInput
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database to be created. Default value `false`.
//
// > **Note:** `mtlsConnectionRequired` must be set to `true` for all workload types except 'APEX' when creating a database with public access.
MtlsConnectionRequired pulumi.BoolPtrInput
// The name which should be used for this Autonomous Database. Changing this forces a new Autonomous Database to be created.
Name pulumi.StringPtrInput
// The national character set for the autonomous database. Changing this forces a new Autonomous Database to be created. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
NationalCharacterSet pulumi.StringPtrInput
// The name of the Resource Group where the Autonomous Database should exist. Changing this forces a new Autonomous Database to be created.
ResourceGroupName pulumi.StringPtrInput
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with. Changing this forces a new Autonomous Database to be created.
SubnetId pulumi.StringPtrInput
Tags pulumi.StringMapInput
// The ID of the vnet associated with the cloud VM cluster. Changing this forces a new Autonomous Database to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (AutonomousDatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*autonomousDatabaseState)(nil)).Elem()
}
type autonomousDatabaseArgs struct {
// The password must be between `12` and ` 30 `characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing.
AdminPassword string `pulumi:"adminPassword"`
// (Optional) Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses.
AllowedIps []string `pulumi:"allowedIps"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
| 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/oracle/exascaleDatabaseStorageVault.go | sdk/go/azure/oracle/exascaleDatabaseStorageVault.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Exadata Database Storage 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/oracle"
// "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 = oracle.NewExascaleDatabaseStorageVault(ctx, "example", &oracle.ExascaleDatabaseStorageVaultArgs{
// Name: pulumi.String("example-exascale-db-storage-vault"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Zones: pulumi.StringArray{
// pulumi.String("1"),
// },
// DisplayName: pulumi.String("example-exascale-db-storage-vault"),
// Description: pulumi.String("description"),
// AdditionalFlashCachePercentage: pulumi.Int(100),
// HighCapacityDatabaseStorage: &oracle.ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageArgs{
// TotalSizeInGb: pulumi.Int(300),
// },
// TimeZone: pulumi.String("UTC"),
// })
// 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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Exadata Database Storage Vaults can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/exascaleDatabaseStorageVault:ExascaleDatabaseStorageVault example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Oracle.Database/exascaleDbStorageVaults/exascaleDbStorageVaults1
// ```
type ExascaleDatabaseStorageVault struct {
pulumi.CustomResourceState
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
AdditionalFlashCachePercentage pulumi.IntOutput `pulumi:"additionalFlashCachePercentage"`
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
Description pulumi.StringOutput `pulumi:"description"`
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
HighCapacityDatabaseStorage ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageOutput `pulumi:"highCapacityDatabaseStorage"`
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
TimeZone pulumi.StringPtrOutput `pulumi:"timeZone"`
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
Zones pulumi.StringArrayOutput `pulumi:"zones"`
}
// NewExascaleDatabaseStorageVault registers a new resource with the given unique name, arguments, and options.
func NewExascaleDatabaseStorageVault(ctx *pulumi.Context,
name string, args *ExascaleDatabaseStorageVaultArgs, opts ...pulumi.ResourceOption) (*ExascaleDatabaseStorageVault, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AdditionalFlashCachePercentage == nil {
return nil, errors.New("invalid value for required argument 'AdditionalFlashCachePercentage'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.HighCapacityDatabaseStorage == nil {
return nil, errors.New("invalid value for required argument 'HighCapacityDatabaseStorage'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Zones == nil {
return nil, errors.New("invalid value for required argument 'Zones'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ExascaleDatabaseStorageVault
err := ctx.RegisterResource("azure:oracle/exascaleDatabaseStorageVault:ExascaleDatabaseStorageVault", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetExascaleDatabaseStorageVault gets an existing ExascaleDatabaseStorageVault 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 GetExascaleDatabaseStorageVault(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ExascaleDatabaseStorageVaultState, opts ...pulumi.ResourceOption) (*ExascaleDatabaseStorageVault, error) {
var resource ExascaleDatabaseStorageVault
err := ctx.ReadResource("azure:oracle/exascaleDatabaseStorageVault:ExascaleDatabaseStorageVault", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ExascaleDatabaseStorageVault resources.
type exascaleDatabaseStorageVaultState struct {
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
AdditionalFlashCachePercentage *int `pulumi:"additionalFlashCachePercentage"`
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
Description *string `pulumi:"description"`
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
DisplayName *string `pulumi:"displayName"`
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
HighCapacityDatabaseStorage *ExascaleDatabaseStorageVaultHighCapacityDatabaseStorage `pulumi:"highCapacityDatabaseStorage"`
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
Tags map[string]string `pulumi:"tags"`
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
TimeZone *string `pulumi:"timeZone"`
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
Zones []string `pulumi:"zones"`
}
type ExascaleDatabaseStorageVaultState struct {
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
AdditionalFlashCachePercentage pulumi.IntPtrInput
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
Description pulumi.StringPtrInput
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
DisplayName pulumi.StringPtrInput
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
HighCapacityDatabaseStorage ExascaleDatabaseStorageVaultHighCapacityDatabaseStoragePtrInput
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
Tags pulumi.StringMapInput
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
TimeZone pulumi.StringPtrInput
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
Zones pulumi.StringArrayInput
}
func (ExascaleDatabaseStorageVaultState) ElementType() reflect.Type {
return reflect.TypeOf((*exascaleDatabaseStorageVaultState)(nil)).Elem()
}
type exascaleDatabaseStorageVaultArgs struct {
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
AdditionalFlashCachePercentage int `pulumi:"additionalFlashCachePercentage"`
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
Description *string `pulumi:"description"`
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
DisplayName string `pulumi:"displayName"`
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
HighCapacityDatabaseStorage ExascaleDatabaseStorageVaultHighCapacityDatabaseStorage `pulumi:"highCapacityDatabaseStorage"`
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
Tags map[string]string `pulumi:"tags"`
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
TimeZone *string `pulumi:"timeZone"`
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
Zones []string `pulumi:"zones"`
}
// The set of arguments for constructing a ExascaleDatabaseStorageVault resource.
type ExascaleDatabaseStorageVaultArgs struct {
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
AdditionalFlashCachePercentage pulumi.IntInput
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
Description pulumi.StringPtrInput
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
DisplayName pulumi.StringInput
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
HighCapacityDatabaseStorage ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageInput
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
Tags pulumi.StringMapInput
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
TimeZone pulumi.StringPtrInput
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
Zones pulumi.StringArrayInput
}
func (ExascaleDatabaseStorageVaultArgs) ElementType() reflect.Type {
return reflect.TypeOf((*exascaleDatabaseStorageVaultArgs)(nil)).Elem()
}
type ExascaleDatabaseStorageVaultInput interface {
pulumi.Input
ToExascaleDatabaseStorageVaultOutput() ExascaleDatabaseStorageVaultOutput
ToExascaleDatabaseStorageVaultOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultOutput
}
func (*ExascaleDatabaseStorageVault) ElementType() reflect.Type {
return reflect.TypeOf((**ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (i *ExascaleDatabaseStorageVault) ToExascaleDatabaseStorageVaultOutput() ExascaleDatabaseStorageVaultOutput {
return i.ToExascaleDatabaseStorageVaultOutputWithContext(context.Background())
}
func (i *ExascaleDatabaseStorageVault) ToExascaleDatabaseStorageVaultOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExascaleDatabaseStorageVaultOutput)
}
// ExascaleDatabaseStorageVaultArrayInput is an input type that accepts ExascaleDatabaseStorageVaultArray and ExascaleDatabaseStorageVaultArrayOutput values.
// You can construct a concrete instance of `ExascaleDatabaseStorageVaultArrayInput` via:
//
// ExascaleDatabaseStorageVaultArray{ ExascaleDatabaseStorageVaultArgs{...} }
type ExascaleDatabaseStorageVaultArrayInput interface {
pulumi.Input
ToExascaleDatabaseStorageVaultArrayOutput() ExascaleDatabaseStorageVaultArrayOutput
ToExascaleDatabaseStorageVaultArrayOutputWithContext(context.Context) ExascaleDatabaseStorageVaultArrayOutput
}
type ExascaleDatabaseStorageVaultArray []ExascaleDatabaseStorageVaultInput
func (ExascaleDatabaseStorageVaultArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (i ExascaleDatabaseStorageVaultArray) ToExascaleDatabaseStorageVaultArrayOutput() ExascaleDatabaseStorageVaultArrayOutput {
return i.ToExascaleDatabaseStorageVaultArrayOutputWithContext(context.Background())
}
func (i ExascaleDatabaseStorageVaultArray) ToExascaleDatabaseStorageVaultArrayOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExascaleDatabaseStorageVaultArrayOutput)
}
// ExascaleDatabaseStorageVaultMapInput is an input type that accepts ExascaleDatabaseStorageVaultMap and ExascaleDatabaseStorageVaultMapOutput values.
// You can construct a concrete instance of `ExascaleDatabaseStorageVaultMapInput` via:
//
// ExascaleDatabaseStorageVaultMap{ "key": ExascaleDatabaseStorageVaultArgs{...} }
type ExascaleDatabaseStorageVaultMapInput interface {
pulumi.Input
ToExascaleDatabaseStorageVaultMapOutput() ExascaleDatabaseStorageVaultMapOutput
ToExascaleDatabaseStorageVaultMapOutputWithContext(context.Context) ExascaleDatabaseStorageVaultMapOutput
}
type ExascaleDatabaseStorageVaultMap map[string]ExascaleDatabaseStorageVaultInput
func (ExascaleDatabaseStorageVaultMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (i ExascaleDatabaseStorageVaultMap) ToExascaleDatabaseStorageVaultMapOutput() ExascaleDatabaseStorageVaultMapOutput {
return i.ToExascaleDatabaseStorageVaultMapOutputWithContext(context.Background())
}
func (i ExascaleDatabaseStorageVaultMap) ToExascaleDatabaseStorageVaultMapOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExascaleDatabaseStorageVaultMapOutput)
}
type ExascaleDatabaseStorageVaultOutput struct{ *pulumi.OutputState }
func (ExascaleDatabaseStorageVaultOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (o ExascaleDatabaseStorageVaultOutput) ToExascaleDatabaseStorageVaultOutput() ExascaleDatabaseStorageVaultOutput {
return o
}
func (o ExascaleDatabaseStorageVaultOutput) ToExascaleDatabaseStorageVaultOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultOutput {
return o
}
// The size of additional Flash Cache in percentage of High Capacity database storage. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) AdditionalFlashCachePercentage() pulumi.IntOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.IntOutput { return v.AdditionalFlashCachePercentage }).(pulumi.IntOutput)
}
// Exadata Database Storage Vault description. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The user-friendly name for the Exadata Database Storage Vault resource. The name does not need to be unique. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// A `highCapacityDatabaseStorage` block as defined below. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) HighCapacityDatabaseStorage() ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageOutput {
return v.HighCapacityDatabaseStorage
}).(ExascaleDatabaseStorageVaultHighCapacityDatabaseStorageOutput)
}
// The Azure Region where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Exadata Database Storage Vault should exist. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Exadata Database Storage Vault.
func (o ExascaleDatabaseStorageVaultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The time zone that you want to use for the Exadata Database Storage Vault. Changing this forces a new Exadata Database Storage Vault to be created. For details, see [Time Zones](https://docs.oracle.com/en/cloud/paas/base-database/time-zone/).
func (o ExascaleDatabaseStorageVaultOutput) TimeZone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringPtrOutput { return v.TimeZone }).(pulumi.StringPtrOutput)
}
// Exadata Database Storage Vault zones. Changing this forces a new Exadata Database Storage Vault to be created.
func (o ExascaleDatabaseStorageVaultOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ExascaleDatabaseStorageVault) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput)
}
type ExascaleDatabaseStorageVaultArrayOutput struct{ *pulumi.OutputState }
func (ExascaleDatabaseStorageVaultArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (o ExascaleDatabaseStorageVaultArrayOutput) ToExascaleDatabaseStorageVaultArrayOutput() ExascaleDatabaseStorageVaultArrayOutput {
return o
}
func (o ExascaleDatabaseStorageVaultArrayOutput) ToExascaleDatabaseStorageVaultArrayOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultArrayOutput {
return o
}
func (o ExascaleDatabaseStorageVaultArrayOutput) Index(i pulumi.IntInput) ExascaleDatabaseStorageVaultOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExascaleDatabaseStorageVault {
return vs[0].([]*ExascaleDatabaseStorageVault)[vs[1].(int)]
}).(ExascaleDatabaseStorageVaultOutput)
}
type ExascaleDatabaseStorageVaultMapOutput struct{ *pulumi.OutputState }
func (ExascaleDatabaseStorageVaultMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExascaleDatabaseStorageVault)(nil)).Elem()
}
func (o ExascaleDatabaseStorageVaultMapOutput) ToExascaleDatabaseStorageVaultMapOutput() ExascaleDatabaseStorageVaultMapOutput {
return o
}
func (o ExascaleDatabaseStorageVaultMapOutput) ToExascaleDatabaseStorageVaultMapOutputWithContext(ctx context.Context) ExascaleDatabaseStorageVaultMapOutput {
return o
}
func (o ExascaleDatabaseStorageVaultMapOutput) MapIndex(k pulumi.StringInput) ExascaleDatabaseStorageVaultOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExascaleDatabaseStorageVault {
return vs[0].(map[string]*ExascaleDatabaseStorageVault)[vs[1].(string)]
}).(ExascaleDatabaseStorageVaultOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ExascaleDatabaseStorageVaultInput)(nil)).Elem(), &ExascaleDatabaseStorageVault{})
pulumi.RegisterInputType(reflect.TypeOf((*ExascaleDatabaseStorageVaultArrayInput)(nil)).Elem(), ExascaleDatabaseStorageVaultArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ExascaleDatabaseStorageVaultMapInput)(nil)).Elem(), ExascaleDatabaseStorageVaultMap{})
pulumi.RegisterOutputType(ExascaleDatabaseStorageVaultOutput{})
pulumi.RegisterOutputType(ExascaleDatabaseStorageVaultArrayOutput{})
pulumi.RegisterOutputType(ExascaleDatabaseStorageVaultMapOutput{})
}
| 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/oracle/getDbSystemShapes.go | sdk/go/azure/oracle/getDbSystemShapes.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 oracle
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This data source provides the list of DB System Shapes in Oracle Cloud Infrastructure Database service.
//
// Gets a list of the shapes that can be used to launch a new DB system. The shape determines resources to allocate to the DB system - CPU cores and memory for VM shapes; CPU cores, memory and storage for non-VM (or bare metal) shapes.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.GetDbSystemShapes(ctx, &oracle.GetDbSystemShapesArgs{
// Location: "eastus",
// Zone: pulumi.StringRef("2"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("example", example)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
func GetDbSystemShapes(ctx *pulumi.Context, args *GetDbSystemShapesArgs, opts ...pulumi.InvokeOption) (*GetDbSystemShapesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDbSystemShapesResult
err := ctx.Invoke("azure:oracle/getDbSystemShapes:getDbSystemShapes", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDbSystemShapes.
type GetDbSystemShapesArgs struct {
// The Azure Region to query for the system shapes in.
Location string `pulumi:"location"`
// The Cloud Exadata Infrastructure Azure zone, used to filter out the available DB System Shapes in the specific zone.
Zone *string `pulumi:"zone"`
}
// A collection of values returned by getDbSystemShapes.
type GetDbSystemShapesResult struct {
// A `dbSystemShapes` block as defined below.
DbSystemShapes []GetDbSystemShapesDbSystemShape `pulumi:"dbSystemShapes"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
Zone *string `pulumi:"zone"`
}
func GetDbSystemShapesOutput(ctx *pulumi.Context, args GetDbSystemShapesOutputArgs, opts ...pulumi.InvokeOption) GetDbSystemShapesResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDbSystemShapesResultOutput, error) {
args := v.(GetDbSystemShapesArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getDbSystemShapes:getDbSystemShapes", args, GetDbSystemShapesResultOutput{}, options).(GetDbSystemShapesResultOutput), nil
}).(GetDbSystemShapesResultOutput)
}
// A collection of arguments for invoking getDbSystemShapes.
type GetDbSystemShapesOutputArgs struct {
// The Azure Region to query for the system shapes in.
Location pulumi.StringInput `pulumi:"location"`
// The Cloud Exadata Infrastructure Azure zone, used to filter out the available DB System Shapes in the specific zone.
Zone pulumi.StringPtrInput `pulumi:"zone"`
}
func (GetDbSystemShapesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbSystemShapesArgs)(nil)).Elem()
}
// A collection of values returned by getDbSystemShapes.
type GetDbSystemShapesResultOutput struct{ *pulumi.OutputState }
func (GetDbSystemShapesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbSystemShapesResult)(nil)).Elem()
}
func (o GetDbSystemShapesResultOutput) ToGetDbSystemShapesResultOutput() GetDbSystemShapesResultOutput {
return o
}
func (o GetDbSystemShapesResultOutput) ToGetDbSystemShapesResultOutputWithContext(ctx context.Context) GetDbSystemShapesResultOutput {
return o
}
// A `dbSystemShapes` block as defined below.
func (o GetDbSystemShapesResultOutput) DbSystemShapes() GetDbSystemShapesDbSystemShapeArrayOutput {
return o.ApplyT(func(v GetDbSystemShapesResult) []GetDbSystemShapesDbSystemShape { return v.DbSystemShapes }).(GetDbSystemShapesDbSystemShapeArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetDbSystemShapesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDbSystemShapesResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetDbSystemShapesResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetDbSystemShapesResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetDbSystemShapesResultOutput) Zone() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetDbSystemShapesResult) *string { return v.Zone }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetDbSystemShapesResultOutput{})
}
| 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/oracle/autonomousDatabaseBackup.go | sdk/go/azure/oracle/autonomousDatabaseBackup.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Oracle Autonomous Database Backup in 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/oracle"
// "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
// }
// exampleAutonomousDatabase, err := oracle.NewAutonomousDatabase(ctx, "example", &oracle.AutonomousDatabaseArgs{
// Name: pulumi.String("example-adb"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = oracle.NewAutonomousDatabaseBackup(ctx, "example", &oracle.AutonomousDatabaseBackupArgs{
// Name: pulumi.String("example-backup"),
// AutonomousDatabaseId: exampleAutonomousDatabase.ID(),
// RetentionPeriodInDays: pulumi.Int(120),
// BackupType: "Full",
// })
// 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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Autonomous Database Backups can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/autonomousDatabaseBackup:AutonomousDatabaseBackup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Oracle.Database/autonomousDatabases/autonomousDatabase1/autonomousDatabaseBackups/autonomousDatabaseBackup1
// ```
type AutonomousDatabaseBackup struct {
pulumi.CustomResourceState
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
AutonomousDatabaseId pulumi.StringOutput `pulumi:"autonomousDatabaseId"`
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
RetentionPeriodInDays pulumi.IntOutput `pulumi:"retentionPeriodInDays"`
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
Type pulumi.StringPtrOutput `pulumi:"type"`
}
// NewAutonomousDatabaseBackup registers a new resource with the given unique name, arguments, and options.
func NewAutonomousDatabaseBackup(ctx *pulumi.Context,
name string, args *AutonomousDatabaseBackupArgs, opts ...pulumi.ResourceOption) (*AutonomousDatabaseBackup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutonomousDatabaseId == nil {
return nil, errors.New("invalid value for required argument 'AutonomousDatabaseId'")
}
if args.RetentionPeriodInDays == nil {
return nil, errors.New("invalid value for required argument 'RetentionPeriodInDays'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutonomousDatabaseBackup
err := ctx.RegisterResource("azure:oracle/autonomousDatabaseBackup:AutonomousDatabaseBackup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutonomousDatabaseBackup gets an existing AutonomousDatabaseBackup 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 GetAutonomousDatabaseBackup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutonomousDatabaseBackupState, opts ...pulumi.ResourceOption) (*AutonomousDatabaseBackup, error) {
var resource AutonomousDatabaseBackup
err := ctx.ReadResource("azure:oracle/autonomousDatabaseBackup:AutonomousDatabaseBackup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutonomousDatabaseBackup resources.
type autonomousDatabaseBackupState struct {
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
AutonomousDatabaseId *string `pulumi:"autonomousDatabaseId"`
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
RetentionPeriodInDays *int `pulumi:"retentionPeriodInDays"`
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
}
type AutonomousDatabaseBackupState struct {
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
AutonomousDatabaseId pulumi.StringPtrInput
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
RetentionPeriodInDays pulumi.IntPtrInput
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
}
func (AutonomousDatabaseBackupState) ElementType() reflect.Type {
return reflect.TypeOf((*autonomousDatabaseBackupState)(nil)).Elem()
}
type autonomousDatabaseBackupArgs struct {
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
RetentionPeriodInDays int `pulumi:"retentionPeriodInDays"`
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
}
// The set of arguments for constructing a AutonomousDatabaseBackup resource.
type AutonomousDatabaseBackupArgs struct {
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
AutonomousDatabaseId pulumi.StringInput
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
RetentionPeriodInDays pulumi.IntInput
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
}
func (AutonomousDatabaseBackupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*autonomousDatabaseBackupArgs)(nil)).Elem()
}
type AutonomousDatabaseBackupInput interface {
pulumi.Input
ToAutonomousDatabaseBackupOutput() AutonomousDatabaseBackupOutput
ToAutonomousDatabaseBackupOutputWithContext(ctx context.Context) AutonomousDatabaseBackupOutput
}
func (*AutonomousDatabaseBackup) ElementType() reflect.Type {
return reflect.TypeOf((**AutonomousDatabaseBackup)(nil)).Elem()
}
func (i *AutonomousDatabaseBackup) ToAutonomousDatabaseBackupOutput() AutonomousDatabaseBackupOutput {
return i.ToAutonomousDatabaseBackupOutputWithContext(context.Background())
}
func (i *AutonomousDatabaseBackup) ToAutonomousDatabaseBackupOutputWithContext(ctx context.Context) AutonomousDatabaseBackupOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseBackupOutput)
}
// AutonomousDatabaseBackupArrayInput is an input type that accepts AutonomousDatabaseBackupArray and AutonomousDatabaseBackupArrayOutput values.
// You can construct a concrete instance of `AutonomousDatabaseBackupArrayInput` via:
//
// AutonomousDatabaseBackupArray{ AutonomousDatabaseBackupArgs{...} }
type AutonomousDatabaseBackupArrayInput interface {
pulumi.Input
ToAutonomousDatabaseBackupArrayOutput() AutonomousDatabaseBackupArrayOutput
ToAutonomousDatabaseBackupArrayOutputWithContext(context.Context) AutonomousDatabaseBackupArrayOutput
}
type AutonomousDatabaseBackupArray []AutonomousDatabaseBackupInput
func (AutonomousDatabaseBackupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutonomousDatabaseBackup)(nil)).Elem()
}
func (i AutonomousDatabaseBackupArray) ToAutonomousDatabaseBackupArrayOutput() AutonomousDatabaseBackupArrayOutput {
return i.ToAutonomousDatabaseBackupArrayOutputWithContext(context.Background())
}
func (i AutonomousDatabaseBackupArray) ToAutonomousDatabaseBackupArrayOutputWithContext(ctx context.Context) AutonomousDatabaseBackupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseBackupArrayOutput)
}
// AutonomousDatabaseBackupMapInput is an input type that accepts AutonomousDatabaseBackupMap and AutonomousDatabaseBackupMapOutput values.
// You can construct a concrete instance of `AutonomousDatabaseBackupMapInput` via:
//
// AutonomousDatabaseBackupMap{ "key": AutonomousDatabaseBackupArgs{...} }
type AutonomousDatabaseBackupMapInput interface {
pulumi.Input
ToAutonomousDatabaseBackupMapOutput() AutonomousDatabaseBackupMapOutput
ToAutonomousDatabaseBackupMapOutputWithContext(context.Context) AutonomousDatabaseBackupMapOutput
}
type AutonomousDatabaseBackupMap map[string]AutonomousDatabaseBackupInput
func (AutonomousDatabaseBackupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutonomousDatabaseBackup)(nil)).Elem()
}
func (i AutonomousDatabaseBackupMap) ToAutonomousDatabaseBackupMapOutput() AutonomousDatabaseBackupMapOutput {
return i.ToAutonomousDatabaseBackupMapOutputWithContext(context.Background())
}
func (i AutonomousDatabaseBackupMap) ToAutonomousDatabaseBackupMapOutputWithContext(ctx context.Context) AutonomousDatabaseBackupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutonomousDatabaseBackupMapOutput)
}
type AutonomousDatabaseBackupOutput struct{ *pulumi.OutputState }
func (AutonomousDatabaseBackupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AutonomousDatabaseBackup)(nil)).Elem()
}
func (o AutonomousDatabaseBackupOutput) ToAutonomousDatabaseBackupOutput() AutonomousDatabaseBackupOutput {
return o
}
func (o AutonomousDatabaseBackupOutput) ToAutonomousDatabaseBackupOutputWithContext(ctx context.Context) AutonomousDatabaseBackupOutput {
return o
}
// The azureId of the Autonomous Database that this backup is for. Changing this forces a new resource to be created.
func (o AutonomousDatabaseBackupOutput) AutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v *AutonomousDatabaseBackup) pulumi.StringOutput { return v.AutonomousDatabaseId }).(pulumi.StringOutput)
}
// The display name of the Autonomous Database Backup. Changing this forces a new resource to be created.
func (o AutonomousDatabaseBackupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AutonomousDatabaseBackup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// (Updatable) The number of days to retain the backup. Must be between 90 and 3650 days.
func (o AutonomousDatabaseBackupOutput) RetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v *AutonomousDatabaseBackup) pulumi.IntOutput { return v.RetentionPeriodInDays }).(pulumi.IntOutput)
}
// The type of backup to create.Currently, only `LongTerm` backup operations are supported through the Oracle database At azure service. Defaults to `LongTerm`. Changing this forces a new resource to be created.
func (o AutonomousDatabaseBackupOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AutonomousDatabaseBackup) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput)
}
type AutonomousDatabaseBackupArrayOutput struct{ *pulumi.OutputState }
func (AutonomousDatabaseBackupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutonomousDatabaseBackup)(nil)).Elem()
}
func (o AutonomousDatabaseBackupArrayOutput) ToAutonomousDatabaseBackupArrayOutput() AutonomousDatabaseBackupArrayOutput {
return o
}
func (o AutonomousDatabaseBackupArrayOutput) ToAutonomousDatabaseBackupArrayOutputWithContext(ctx context.Context) AutonomousDatabaseBackupArrayOutput {
return o
}
func (o AutonomousDatabaseBackupArrayOutput) Index(i pulumi.IntInput) AutonomousDatabaseBackupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AutonomousDatabaseBackup {
return vs[0].([]*AutonomousDatabaseBackup)[vs[1].(int)]
}).(AutonomousDatabaseBackupOutput)
}
type AutonomousDatabaseBackupMapOutput struct{ *pulumi.OutputState }
func (AutonomousDatabaseBackupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutonomousDatabaseBackup)(nil)).Elem()
}
func (o AutonomousDatabaseBackupMapOutput) ToAutonomousDatabaseBackupMapOutput() AutonomousDatabaseBackupMapOutput {
return o
}
func (o AutonomousDatabaseBackupMapOutput) ToAutonomousDatabaseBackupMapOutputWithContext(ctx context.Context) AutonomousDatabaseBackupMapOutput {
return o
}
func (o AutonomousDatabaseBackupMapOutput) MapIndex(k pulumi.StringInput) AutonomousDatabaseBackupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AutonomousDatabaseBackup {
return vs[0].(map[string]*AutonomousDatabaseBackup)[vs[1].(string)]
}).(AutonomousDatabaseBackupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AutonomousDatabaseBackupInput)(nil)).Elem(), &AutonomousDatabaseBackup{})
pulumi.RegisterInputType(reflect.TypeOf((*AutonomousDatabaseBackupArrayInput)(nil)).Elem(), AutonomousDatabaseBackupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AutonomousDatabaseBackupMapInput)(nil)).Elem(), AutonomousDatabaseBackupMap{})
pulumi.RegisterOutputType(AutonomousDatabaseBackupOutput{})
pulumi.RegisterOutputType(AutonomousDatabaseBackupArrayOutput{})
pulumi.RegisterOutputType(AutonomousDatabaseBackupMapOutput{})
}
| 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/oracle/getAdbsNationalCharacterSets.go | sdk/go/azure/oracle/getAdbsNationalCharacterSets.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 oracle
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a list of supported national character sets.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := oracle.GetAdbsCharacterSets(ctx, &oracle.GetAdbsCharacterSetsArgs{
// Location: "West Europe",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("example", exampleAzurermOracleAdbsNationalCharacterSets)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
func GetAdbsNationalCharacterSets(ctx *pulumi.Context, args *GetAdbsNationalCharacterSetsArgs, opts ...pulumi.InvokeOption) (*GetAdbsNationalCharacterSetsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAdbsNationalCharacterSetsResult
err := ctx.Invoke("azure:oracle/getAdbsNationalCharacterSets:getAdbsNationalCharacterSets", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAdbsNationalCharacterSets.
type GetAdbsNationalCharacterSetsArgs struct {
// The Azure Region to query for the national character sets in.
Location string `pulumi:"location"`
}
// A collection of values returned by getAdbsNationalCharacterSets.
type GetAdbsNationalCharacterSetsResult struct {
// A `characterSets` block as defined below.
CharacterSets []GetAdbsNationalCharacterSetsCharacterSet `pulumi:"characterSets"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
}
func GetAdbsNationalCharacterSetsOutput(ctx *pulumi.Context, args GetAdbsNationalCharacterSetsOutputArgs, opts ...pulumi.InvokeOption) GetAdbsNationalCharacterSetsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetAdbsNationalCharacterSetsResultOutput, error) {
args := v.(GetAdbsNationalCharacterSetsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAdbsNationalCharacterSets:getAdbsNationalCharacterSets", args, GetAdbsNationalCharacterSetsResultOutput{}, options).(GetAdbsNationalCharacterSetsResultOutput), nil
}).(GetAdbsNationalCharacterSetsResultOutput)
}
// A collection of arguments for invoking getAdbsNationalCharacterSets.
type GetAdbsNationalCharacterSetsOutputArgs struct {
// The Azure Region to query for the national character sets in.
Location pulumi.StringInput `pulumi:"location"`
}
func (GetAdbsNationalCharacterSetsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAdbsNationalCharacterSetsArgs)(nil)).Elem()
}
// A collection of values returned by getAdbsNationalCharacterSets.
type GetAdbsNationalCharacterSetsResultOutput struct{ *pulumi.OutputState }
func (GetAdbsNationalCharacterSetsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAdbsNationalCharacterSetsResult)(nil)).Elem()
}
func (o GetAdbsNationalCharacterSetsResultOutput) ToGetAdbsNationalCharacterSetsResultOutput() GetAdbsNationalCharacterSetsResultOutput {
return o
}
func (o GetAdbsNationalCharacterSetsResultOutput) ToGetAdbsNationalCharacterSetsResultOutputWithContext(ctx context.Context) GetAdbsNationalCharacterSetsResultOutput {
return o
}
// A `characterSets` block as defined below.
func (o GetAdbsNationalCharacterSetsResultOutput) CharacterSets() GetAdbsNationalCharacterSetsCharacterSetArrayOutput {
return o.ApplyT(func(v GetAdbsNationalCharacterSetsResult) []GetAdbsNationalCharacterSetsCharacterSet {
return v.CharacterSets
}).(GetAdbsNationalCharacterSetsCharacterSetArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAdbsNationalCharacterSetsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAdbsNationalCharacterSetsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetAdbsNationalCharacterSetsResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetAdbsNationalCharacterSetsResult) string { return v.Location }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetAdbsNationalCharacterSetsResultOutput{})
}
| 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/oracle/getResourceAnchor.go | sdk/go/azure/oracle/getResourceAnchor.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 oracle
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 Oracle Resource Anchor.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupResourceAnchor(ctx, &oracle.LookupResourceAnchorArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupResourceAnchor(ctx *pulumi.Context, args *LookupResourceAnchorArgs, opts ...pulumi.InvokeOption) (*LookupResourceAnchorResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupResourceAnchorResult
err := ctx.Invoke("azure:oracle/getResourceAnchor:getResourceAnchor", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getResourceAnchor.
type LookupResourceAnchorArgs struct {
// The name of this Oracle Resource Anchor.
Name string `pulumi:"name"`
// The name of the Resource Group where the Oracle Resource Anchor exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getResourceAnchor.
type LookupResourceAnchorResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
LinkedCompartmentId string `pulumi:"linkedCompartmentId"`
// The Azure Region where the Oracle Resource Anchor exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Oracle Resource Anchor.
Tags map[string]string `pulumi:"tags"`
}
func LookupResourceAnchorOutput(ctx *pulumi.Context, args LookupResourceAnchorOutputArgs, opts ...pulumi.InvokeOption) LookupResourceAnchorResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupResourceAnchorResultOutput, error) {
args := v.(LookupResourceAnchorArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getResourceAnchor:getResourceAnchor", args, LookupResourceAnchorResultOutput{}, options).(LookupResourceAnchorResultOutput), nil
}).(LookupResourceAnchorResultOutput)
}
// A collection of arguments for invoking getResourceAnchor.
type LookupResourceAnchorOutputArgs struct {
// The name of this Oracle Resource Anchor.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Oracle Resource Anchor exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupResourceAnchorOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResourceAnchorArgs)(nil)).Elem()
}
// A collection of values returned by getResourceAnchor.
type LookupResourceAnchorResultOutput struct{ *pulumi.OutputState }
func (LookupResourceAnchorResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupResourceAnchorResult)(nil)).Elem()
}
func (o LookupResourceAnchorResultOutput) ToLookupResourceAnchorResultOutput() LookupResourceAnchorResultOutput {
return o
}
func (o LookupResourceAnchorResultOutput) ToLookupResourceAnchorResultOutputWithContext(ctx context.Context) LookupResourceAnchorResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupResourceAnchorResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) string { return v.Id }).(pulumi.StringOutput)
}
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
func (o LookupResourceAnchorResultOutput) LinkedCompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) string { return v.LinkedCompartmentId }).(pulumi.StringOutput)
}
// The Azure Region where the Oracle Resource Anchor exists.
func (o LookupResourceAnchorResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupResourceAnchorResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupResourceAnchorResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Oracle Resource Anchor.
func (o LookupResourceAnchorResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupResourceAnchorResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupResourceAnchorResultOutput{})
}
| 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/oracle/getAdbsCharacterSets.go | sdk/go/azure/oracle/getAdbsCharacterSets.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 oracle
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a list of supported character sets.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.GetAdbsCharacterSets(ctx, &oracle.GetAdbsCharacterSetsArgs{
// Location: "West Europe",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("example", example)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
func GetAdbsCharacterSets(ctx *pulumi.Context, args *GetAdbsCharacterSetsArgs, opts ...pulumi.InvokeOption) (*GetAdbsCharacterSetsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAdbsCharacterSetsResult
err := ctx.Invoke("azure:oracle/getAdbsCharacterSets:getAdbsCharacterSets", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAdbsCharacterSets.
type GetAdbsCharacterSetsArgs struct {
// The Azure Region to query for the character sets in.
Location string `pulumi:"location"`
}
// A collection of values returned by getAdbsCharacterSets.
type GetAdbsCharacterSetsResult struct {
// A `characterSets` block as defined below.
CharacterSets []GetAdbsCharacterSetsCharacterSet `pulumi:"characterSets"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
}
func GetAdbsCharacterSetsOutput(ctx *pulumi.Context, args GetAdbsCharacterSetsOutputArgs, opts ...pulumi.InvokeOption) GetAdbsCharacterSetsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetAdbsCharacterSetsResultOutput, error) {
args := v.(GetAdbsCharacterSetsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAdbsCharacterSets:getAdbsCharacterSets", args, GetAdbsCharacterSetsResultOutput{}, options).(GetAdbsCharacterSetsResultOutput), nil
}).(GetAdbsCharacterSetsResultOutput)
}
// A collection of arguments for invoking getAdbsCharacterSets.
type GetAdbsCharacterSetsOutputArgs struct {
// The Azure Region to query for the character sets in.
Location pulumi.StringInput `pulumi:"location"`
}
func (GetAdbsCharacterSetsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAdbsCharacterSetsArgs)(nil)).Elem()
}
// A collection of values returned by getAdbsCharacterSets.
type GetAdbsCharacterSetsResultOutput struct{ *pulumi.OutputState }
func (GetAdbsCharacterSetsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAdbsCharacterSetsResult)(nil)).Elem()
}
func (o GetAdbsCharacterSetsResultOutput) ToGetAdbsCharacterSetsResultOutput() GetAdbsCharacterSetsResultOutput {
return o
}
func (o GetAdbsCharacterSetsResultOutput) ToGetAdbsCharacterSetsResultOutputWithContext(ctx context.Context) GetAdbsCharacterSetsResultOutput {
return o
}
// A `characterSets` block as defined below.
func (o GetAdbsCharacterSetsResultOutput) CharacterSets() GetAdbsCharacterSetsCharacterSetArrayOutput {
return o.ApplyT(func(v GetAdbsCharacterSetsResult) []GetAdbsCharacterSetsCharacterSet { return v.CharacterSets }).(GetAdbsCharacterSetsCharacterSetArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAdbsCharacterSetsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAdbsCharacterSetsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetAdbsCharacterSetsResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetAdbsCharacterSetsResult) string { return v.Location }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetAdbsCharacterSetsResultOutput{})
}
| 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/oracle/exadataInfrastructure.go | sdk/go/azure/oracle/exadataInfrastructure.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cloud Exadata Infrastructure.
//
// ## 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/oracle"
// "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 = oracle.NewExadataInfrastructure(ctx, "example", &oracle.ExadataInfrastructureArgs{
// Name: pulumi.String("example-exadata-infra"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Zones: pulumi.StringArray{
// pulumi.String("1"),
// },
// DisplayName: pulumi.String("example-exadata-infra"),
// StorageCount: pulumi.Int(3),
// ComputeCount: pulumi.Int(2),
// Shape: pulumi.String("Exadata.X11M"),
// DatabaseServerType: pulumi.String("X11M"),
// StorageServerType: pulumi.String("X11M-HC"),
// })
// 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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Cloud Exadata Infrastructures can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/exadataInfrastructure:ExadataInfrastructure example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Oracle.Database/cloudExadataInfrastructures/cloudExadataInfrastructures1
// ```
type ExadataInfrastructure struct {
pulumi.CustomResourceState
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
ComputeCount pulumi.IntOutput `pulumi:"computeCount"`
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
CustomerContacts pulumi.StringArrayOutput `pulumi:"customerContacts"`
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
DatabaseServerType pulumi.StringOutput `pulumi:"databaseServerType"`
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
Location pulumi.StringOutput `pulumi:"location"`
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
MaintenanceWindows ExadataInfrastructureMaintenanceWindowArrayOutput `pulumi:"maintenanceWindows"`
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
Shape pulumi.StringOutput `pulumi:"shape"`
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageCount pulumi.IntOutput `pulumi:"storageCount"`
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageServerType pulumi.StringOutput `pulumi:"storageServerType"`
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
Zones pulumi.StringArrayOutput `pulumi:"zones"`
}
// NewExadataInfrastructure registers a new resource with the given unique name, arguments, and options.
func NewExadataInfrastructure(ctx *pulumi.Context,
name string, args *ExadataInfrastructureArgs, opts ...pulumi.ResourceOption) (*ExadataInfrastructure, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ComputeCount == nil {
return nil, errors.New("invalid value for required argument 'ComputeCount'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Shape == nil {
return nil, errors.New("invalid value for required argument 'Shape'")
}
if args.StorageCount == nil {
return nil, errors.New("invalid value for required argument 'StorageCount'")
}
if args.Zones == nil {
return nil, errors.New("invalid value for required argument 'Zones'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ExadataInfrastructure
err := ctx.RegisterResource("azure:oracle/exadataInfrastructure:ExadataInfrastructure", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetExadataInfrastructure gets an existing ExadataInfrastructure 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 GetExadataInfrastructure(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ExadataInfrastructureState, opts ...pulumi.ResourceOption) (*ExadataInfrastructure, error) {
var resource ExadataInfrastructure
err := ctx.ReadResource("azure:oracle/exadataInfrastructure:ExadataInfrastructure", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ExadataInfrastructure resources.
type exadataInfrastructureState struct {
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
ComputeCount *int `pulumi:"computeCount"`
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
DatabaseServerType *string `pulumi:"databaseServerType"`
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
DisplayName *string `pulumi:"displayName"`
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
Location *string `pulumi:"location"`
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
MaintenanceWindows []ExadataInfrastructureMaintenanceWindow `pulumi:"maintenanceWindows"`
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
Shape *string `pulumi:"shape"`
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageCount *int `pulumi:"storageCount"`
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageServerType *string `pulumi:"storageServerType"`
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
Tags map[string]string `pulumi:"tags"`
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
Zones []string `pulumi:"zones"`
}
type ExadataInfrastructureState struct {
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
ComputeCount pulumi.IntPtrInput
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
CustomerContacts pulumi.StringArrayInput
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
DatabaseServerType pulumi.StringPtrInput
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
DisplayName pulumi.StringPtrInput
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
Location pulumi.StringPtrInput
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
MaintenanceWindows ExadataInfrastructureMaintenanceWindowArrayInput
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
ResourceGroupName pulumi.StringPtrInput
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
Shape pulumi.StringPtrInput
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageCount pulumi.IntPtrInput
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageServerType pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
Tags pulumi.StringMapInput
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
Zones pulumi.StringArrayInput
}
func (ExadataInfrastructureState) ElementType() reflect.Type {
return reflect.TypeOf((*exadataInfrastructureState)(nil)).Elem()
}
type exadataInfrastructureArgs struct {
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
ComputeCount int `pulumi:"computeCount"`
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
DatabaseServerType *string `pulumi:"databaseServerType"`
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
DisplayName string `pulumi:"displayName"`
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
Location *string `pulumi:"location"`
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
MaintenanceWindows []ExadataInfrastructureMaintenanceWindow `pulumi:"maintenanceWindows"`
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
Shape string `pulumi:"shape"`
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageCount int `pulumi:"storageCount"`
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageServerType *string `pulumi:"storageServerType"`
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
Tags map[string]string `pulumi:"tags"`
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
Zones []string `pulumi:"zones"`
}
// The set of arguments for constructing a ExadataInfrastructure resource.
type ExadataInfrastructureArgs struct {
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
ComputeCount pulumi.IntInput
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
CustomerContacts pulumi.StringArrayInput
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
DatabaseServerType pulumi.StringPtrInput
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
DisplayName pulumi.StringInput
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
Location pulumi.StringPtrInput
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
MaintenanceWindows ExadataInfrastructureMaintenanceWindowArrayInput
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
ResourceGroupName pulumi.StringInput
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
Shape pulumi.StringInput
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageCount pulumi.IntInput
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
StorageServerType pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
Tags pulumi.StringMapInput
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
Zones pulumi.StringArrayInput
}
func (ExadataInfrastructureArgs) ElementType() reflect.Type {
return reflect.TypeOf((*exadataInfrastructureArgs)(nil)).Elem()
}
type ExadataInfrastructureInput interface {
pulumi.Input
ToExadataInfrastructureOutput() ExadataInfrastructureOutput
ToExadataInfrastructureOutputWithContext(ctx context.Context) ExadataInfrastructureOutput
}
func (*ExadataInfrastructure) ElementType() reflect.Type {
return reflect.TypeOf((**ExadataInfrastructure)(nil)).Elem()
}
func (i *ExadataInfrastructure) ToExadataInfrastructureOutput() ExadataInfrastructureOutput {
return i.ToExadataInfrastructureOutputWithContext(context.Background())
}
func (i *ExadataInfrastructure) ToExadataInfrastructureOutputWithContext(ctx context.Context) ExadataInfrastructureOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExadataInfrastructureOutput)
}
// ExadataInfrastructureArrayInput is an input type that accepts ExadataInfrastructureArray and ExadataInfrastructureArrayOutput values.
// You can construct a concrete instance of `ExadataInfrastructureArrayInput` via:
//
// ExadataInfrastructureArray{ ExadataInfrastructureArgs{...} }
type ExadataInfrastructureArrayInput interface {
pulumi.Input
ToExadataInfrastructureArrayOutput() ExadataInfrastructureArrayOutput
ToExadataInfrastructureArrayOutputWithContext(context.Context) ExadataInfrastructureArrayOutput
}
type ExadataInfrastructureArray []ExadataInfrastructureInput
func (ExadataInfrastructureArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExadataInfrastructure)(nil)).Elem()
}
func (i ExadataInfrastructureArray) ToExadataInfrastructureArrayOutput() ExadataInfrastructureArrayOutput {
return i.ToExadataInfrastructureArrayOutputWithContext(context.Background())
}
func (i ExadataInfrastructureArray) ToExadataInfrastructureArrayOutputWithContext(ctx context.Context) ExadataInfrastructureArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExadataInfrastructureArrayOutput)
}
// ExadataInfrastructureMapInput is an input type that accepts ExadataInfrastructureMap and ExadataInfrastructureMapOutput values.
// You can construct a concrete instance of `ExadataInfrastructureMapInput` via:
//
// ExadataInfrastructureMap{ "key": ExadataInfrastructureArgs{...} }
type ExadataInfrastructureMapInput interface {
pulumi.Input
ToExadataInfrastructureMapOutput() ExadataInfrastructureMapOutput
ToExadataInfrastructureMapOutputWithContext(context.Context) ExadataInfrastructureMapOutput
}
type ExadataInfrastructureMap map[string]ExadataInfrastructureInput
func (ExadataInfrastructureMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExadataInfrastructure)(nil)).Elem()
}
func (i ExadataInfrastructureMap) ToExadataInfrastructureMapOutput() ExadataInfrastructureMapOutput {
return i.ToExadataInfrastructureMapOutputWithContext(context.Background())
}
func (i ExadataInfrastructureMap) ToExadataInfrastructureMapOutputWithContext(ctx context.Context) ExadataInfrastructureMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExadataInfrastructureMapOutput)
}
type ExadataInfrastructureOutput struct{ *pulumi.OutputState }
func (ExadataInfrastructureOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ExadataInfrastructure)(nil)).Elem()
}
func (o ExadataInfrastructureOutput) ToExadataInfrastructureOutput() ExadataInfrastructureOutput {
return o
}
func (o ExadataInfrastructureOutput) ToExadataInfrastructureOutputWithContext(ctx context.Context) ExadataInfrastructureOutput {
return o
}
// The number of compute servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) ComputeCount() pulumi.IntOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.IntOutput { return v.ComputeCount }).(pulumi.IntOutput)
}
// The email address used by Oracle to send notifications regarding databases and infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) CustomerContacts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringArrayOutput { return v.CustomerContacts }).(pulumi.StringArrayOutput)
}
// The database server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) DatabaseServerType() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.DatabaseServerType }).(pulumi.StringOutput)
}
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The Azure Region where the Cloud Exadata Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// One or more `maintenanceWindow` blocks as defined below. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) MaintenanceWindows() ExadataInfrastructureMaintenanceWindowArrayOutput {
return o.ApplyT(func(v *ExadataInfrastructure) ExadataInfrastructureMaintenanceWindowArrayOutput {
return v.MaintenanceWindows
}).(ExadataInfrastructureMaintenanceWindowArrayOutput)
}
// The name which should be used for this Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the ODB@A Infrastructure should exist. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The shape of the ODB@A infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) Shape() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.Shape }).(pulumi.StringOutput)
}
// The number of storage servers for the Cloud Exadata Infrastructure. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) StorageCount() pulumi.IntOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.IntOutput { return v.StorageCount }).(pulumi.IntOutput)
}
// The storage server model type of the cloud Exadata infrastructure resource. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) StorageServerType() pulumi.StringOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringOutput { return v.StorageServerType }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Cloud Exadata Infrastructure.
func (o ExadataInfrastructureOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Cloud Exadata Infrastructure zones. Changing this forces a new Cloud Exadata Infrastructure to be created.
func (o ExadataInfrastructureOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ExadataInfrastructure) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput)
}
type ExadataInfrastructureArrayOutput struct{ *pulumi.OutputState }
func (ExadataInfrastructureArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExadataInfrastructure)(nil)).Elem()
}
func (o ExadataInfrastructureArrayOutput) ToExadataInfrastructureArrayOutput() ExadataInfrastructureArrayOutput {
return o
}
func (o ExadataInfrastructureArrayOutput) ToExadataInfrastructureArrayOutputWithContext(ctx context.Context) ExadataInfrastructureArrayOutput {
return o
}
func (o ExadataInfrastructureArrayOutput) Index(i pulumi.IntInput) ExadataInfrastructureOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExadataInfrastructure {
return vs[0].([]*ExadataInfrastructure)[vs[1].(int)]
}).(ExadataInfrastructureOutput)
}
type ExadataInfrastructureMapOutput struct{ *pulumi.OutputState }
func (ExadataInfrastructureMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExadataInfrastructure)(nil)).Elem()
}
func (o ExadataInfrastructureMapOutput) ToExadataInfrastructureMapOutput() ExadataInfrastructureMapOutput {
return o
}
func (o ExadataInfrastructureMapOutput) ToExadataInfrastructureMapOutputWithContext(ctx context.Context) ExadataInfrastructureMapOutput {
return o
}
func (o ExadataInfrastructureMapOutput) MapIndex(k pulumi.StringInput) ExadataInfrastructureOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExadataInfrastructure {
return vs[0].(map[string]*ExadataInfrastructure)[vs[1].(string)]
}).(ExadataInfrastructureOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ExadataInfrastructureInput)(nil)).Elem(), &ExadataInfrastructure{})
pulumi.RegisterInputType(reflect.TypeOf((*ExadataInfrastructureArrayInput)(nil)).Elem(), ExadataInfrastructureArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ExadataInfrastructureMapInput)(nil)).Elem(), ExadataInfrastructureMap{})
pulumi.RegisterOutputType(ExadataInfrastructureOutput{})
pulumi.RegisterOutputType(ExadataInfrastructureArrayOutput{})
pulumi.RegisterOutputType(ExadataInfrastructureMapOutput{})
}
| 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/oracle/getAutonomousDatabaseBackup.go | sdk/go/azure/oracle/getAutonomousDatabaseBackup.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 oracle
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 Autonomous Database Backups.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := oracle.LookupAutonomousDatabaseBackup(ctx, &oracle.LookupAutonomousDatabaseBackupArgs{
// AutonomousDatabaseId: exampleAzurermOracleAutonomousDatabase.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:
//
// * `Oracle.Database` - 2025-09-01
func LookupAutonomousDatabaseBackup(ctx *pulumi.Context, args *LookupAutonomousDatabaseBackupArgs, opts ...pulumi.InvokeOption) (*LookupAutonomousDatabaseBackupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAutonomousDatabaseBackupResult
err := ctx.Invoke("azure:oracle/getAutonomousDatabaseBackup:getAutonomousDatabaseBackup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutonomousDatabaseBackup.
type LookupAutonomousDatabaseBackupArgs struct {
// The azureId of the Autonomous Database for we will be listing the backups.
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
Name string `pulumi:"name"`
}
// A collection of values returned by getAutonomousDatabaseBackup.
type LookupAutonomousDatabaseBackupResult struct {
Automatic bool `pulumi:"automatic"`
// The backup OCID.
AutonomousDatabaseBackupOcid string `pulumi:"autonomousDatabaseBackupOcid"`
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
// The OCID of the Autonomous Database OCID.
AutonomousDatabaseOcid string `pulumi:"autonomousDatabaseOcid"`
DatabaseBackupSizeInTbs float64 `pulumi:"databaseBackupSizeInTbs"`
DatabaseVersion string `pulumi:"databaseVersion"`
// The user-friendly name of the backup.
DisplayName string `pulumi:"displayName"`
// The ID of the Autonomous Database Backup.
Id string `pulumi:"id"`
// Information about the current lifecycle state of the backup.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// The current state of the backup.
LifecycleState string `pulumi:"lifecycleState"`
// `- The Azure Region where the Autonomous Database Backup exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The current provisioning state of the Autonomous Database Backup.
ProvisioningState string `pulumi:"provisioningState"`
Restorable bool `pulumi:"restorable"`
// The retention period in days for the Autonomous Database Backup.
RetentionPeriodInDays int `pulumi:"retentionPeriodInDays"`
// The date and time the backup will become unusable.
TimeAvailableTil string `pulumi:"timeAvailableTil"`
// The date and time the backup was completed.
TimeEnded string `pulumi:"timeEnded"`
// The date and time the backup started.
TimeStarted string `pulumi:"timeStarted"`
Type string `pulumi:"type"`
}
func LookupAutonomousDatabaseBackupOutput(ctx *pulumi.Context, args LookupAutonomousDatabaseBackupOutputArgs, opts ...pulumi.InvokeOption) LookupAutonomousDatabaseBackupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAutonomousDatabaseBackupResultOutput, error) {
args := v.(LookupAutonomousDatabaseBackupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAutonomousDatabaseBackup:getAutonomousDatabaseBackup", args, LookupAutonomousDatabaseBackupResultOutput{}, options).(LookupAutonomousDatabaseBackupResultOutput), nil
}).(LookupAutonomousDatabaseBackupResultOutput)
}
// A collection of arguments for invoking getAutonomousDatabaseBackup.
type LookupAutonomousDatabaseBackupOutputArgs struct {
// The azureId of the Autonomous Database for we will be listing the backups.
AutonomousDatabaseId pulumi.StringInput `pulumi:"autonomousDatabaseId"`
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupAutonomousDatabaseBackupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseBackupArgs)(nil)).Elem()
}
// A collection of values returned by getAutonomousDatabaseBackup.
type LookupAutonomousDatabaseBackupResultOutput struct{ *pulumi.OutputState }
func (LookupAutonomousDatabaseBackupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseBackupResult)(nil)).Elem()
}
func (o LookupAutonomousDatabaseBackupResultOutput) ToLookupAutonomousDatabaseBackupResultOutput() LookupAutonomousDatabaseBackupResultOutput {
return o
}
func (o LookupAutonomousDatabaseBackupResultOutput) ToLookupAutonomousDatabaseBackupResultOutputWithContext(ctx context.Context) LookupAutonomousDatabaseBackupResultOutput {
return o
}
func (o LookupAutonomousDatabaseBackupResultOutput) Automatic() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) bool { return v.Automatic }).(pulumi.BoolOutput)
}
// The backup OCID.
func (o LookupAutonomousDatabaseBackupResultOutput) AutonomousDatabaseBackupOcid() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.AutonomousDatabaseBackupOcid }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseBackupResultOutput) AutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.AutonomousDatabaseId }).(pulumi.StringOutput)
}
// The OCID of the Autonomous Database OCID.
func (o LookupAutonomousDatabaseBackupResultOutput) AutonomousDatabaseOcid() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.AutonomousDatabaseOcid }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseBackupResultOutput) DatabaseBackupSizeInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) float64 { return v.DatabaseBackupSizeInTbs }).(pulumi.Float64Output)
}
func (o LookupAutonomousDatabaseBackupResultOutput) DatabaseVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.DatabaseVersion }).(pulumi.StringOutput)
}
// The user-friendly name of the backup.
func (o LookupAutonomousDatabaseBackupResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The ID of the Autonomous Database Backup.
func (o LookupAutonomousDatabaseBackupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.Id }).(pulumi.StringOutput)
}
// Information about the current lifecycle state of the backup.
func (o LookupAutonomousDatabaseBackupResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// The current state of the backup.
func (o LookupAutonomousDatabaseBackupResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// `- The Azure Region where the Autonomous Database Backup exists.
func (o LookupAutonomousDatabaseBackupResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseBackupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.Name }).(pulumi.StringOutput)
}
// The current provisioning state of the Autonomous Database Backup.
func (o LookupAutonomousDatabaseBackupResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseBackupResultOutput) Restorable() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) bool { return v.Restorable }).(pulumi.BoolOutput)
}
// The retention period in days for the Autonomous Database Backup.
func (o LookupAutonomousDatabaseBackupResultOutput) RetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) int { return v.RetentionPeriodInDays }).(pulumi.IntOutput)
}
// The date and time the backup will become unusable.
func (o LookupAutonomousDatabaseBackupResultOutput) TimeAvailableTil() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.TimeAvailableTil }).(pulumi.StringOutput)
}
// The date and time the backup was completed.
func (o LookupAutonomousDatabaseBackupResultOutput) TimeEnded() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.TimeEnded }).(pulumi.StringOutput)
}
// The date and time the backup started.
func (o LookupAutonomousDatabaseBackupResultOutput) TimeStarted() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.TimeStarted }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseBackupResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseBackupResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAutonomousDatabaseBackupResultOutput{})
}
| 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/oracle/getDbServers.go | sdk/go/azure/oracle/getDbServers.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 oracle
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 DB Servers.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.GetDbServers(ctx, &oracle.GetDbServersArgs{
// ResourceGroupName: "existing",
// CloudExadataInfrastructureName: "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:
//
// * `Oracle.Database` - 2025-09-01
func GetDbServers(ctx *pulumi.Context, args *GetDbServersArgs, opts ...pulumi.InvokeOption) (*GetDbServersResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDbServersResult
err := ctx.Invoke("azure:oracle/getDbServers:getDbServers", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDbServers.
type GetDbServersArgs struct {
// The name of the Cloud Exadata Infrastructure.
CloudExadataInfrastructureName string `pulumi:"cloudExadataInfrastructureName"`
// The name of the Resource Group where the DB Server exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDbServers.
type GetDbServersResult struct {
CloudExadataInfrastructureName string `pulumi:"cloudExadataInfrastructureName"`
// A `dbServers` block as defined below.
DbServers []GetDbServersDbServer `pulumi:"dbServers"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func GetDbServersOutput(ctx *pulumi.Context, args GetDbServersOutputArgs, opts ...pulumi.InvokeOption) GetDbServersResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDbServersResultOutput, error) {
args := v.(GetDbServersArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getDbServers:getDbServers", args, GetDbServersResultOutput{}, options).(GetDbServersResultOutput), nil
}).(GetDbServersResultOutput)
}
// A collection of arguments for invoking getDbServers.
type GetDbServersOutputArgs struct {
// The name of the Cloud Exadata Infrastructure.
CloudExadataInfrastructureName pulumi.StringInput `pulumi:"cloudExadataInfrastructureName"`
// The name of the Resource Group where the DB Server exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetDbServersOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbServersArgs)(nil)).Elem()
}
// A collection of values returned by getDbServers.
type GetDbServersResultOutput struct{ *pulumi.OutputState }
func (GetDbServersResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbServersResult)(nil)).Elem()
}
func (o GetDbServersResultOutput) ToGetDbServersResultOutput() GetDbServersResultOutput {
return o
}
func (o GetDbServersResultOutput) ToGetDbServersResultOutputWithContext(ctx context.Context) GetDbServersResultOutput {
return o
}
func (o GetDbServersResultOutput) CloudExadataInfrastructureName() pulumi.StringOutput {
return o.ApplyT(func(v GetDbServersResult) string { return v.CloudExadataInfrastructureName }).(pulumi.StringOutput)
}
// A `dbServers` block as defined below.
func (o GetDbServersResultOutput) DbServers() GetDbServersDbServerArrayOutput {
return o.ApplyT(func(v GetDbServersResult) []GetDbServersDbServer { return v.DbServers }).(GetDbServersDbServerArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetDbServersResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDbServersResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetDbServersResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetDbServersResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetDbServersResultOutput{})
}
| 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/oracle/resourceAnchor.go | sdk/go/azure/oracle/resourceAnchor.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Oracle Resource Anchor.
//
// ## 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/oracle"
// "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("eastus"),
// })
// if err != nil {
// return err
// }
// _, err = oracle.NewResourceAnchor(ctx, "example", &oracle.ResourceAnchorArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// Oracle Resource Anchors can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/resourceAnchor:ResourceAnchor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/resourceAnchors/example
// ```
type ResourceAnchor struct {
pulumi.CustomResourceState
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
LinkedCompartmentId pulumi.StringOutput `pulumi:"linkedCompartmentId"`
// The Azure Region where the Oracle Resource Anchor exists.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewResourceAnchor registers a new resource with the given unique name, arguments, and options.
func NewResourceAnchor(ctx *pulumi.Context,
name string, args *ResourceAnchorArgs, opts ...pulumi.ResourceOption) (*ResourceAnchor, 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 ResourceAnchor
err := ctx.RegisterResource("azure:oracle/resourceAnchor:ResourceAnchor", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetResourceAnchor gets an existing ResourceAnchor 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 GetResourceAnchor(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ResourceAnchorState, opts ...pulumi.ResourceOption) (*ResourceAnchor, error) {
var resource ResourceAnchor
err := ctx.ReadResource("azure:oracle/resourceAnchor:ResourceAnchor", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ResourceAnchor resources.
type resourceAnchorState struct {
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
LinkedCompartmentId *string `pulumi:"linkedCompartmentId"`
// The Azure Region where the Oracle Resource Anchor exists.
Location *string `pulumi:"location"`
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
Tags map[string]string `pulumi:"tags"`
}
type ResourceAnchorState struct {
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
LinkedCompartmentId pulumi.StringPtrInput
// The Azure Region where the Oracle Resource Anchor exists.
Location pulumi.StringPtrInput
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
Tags pulumi.StringMapInput
}
func (ResourceAnchorState) ElementType() reflect.Type {
return reflect.TypeOf((*resourceAnchorState)(nil)).Elem()
}
type resourceAnchorArgs struct {
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ResourceAnchor resource.
type ResourceAnchorArgs struct {
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
Tags pulumi.StringMapInput
}
func (ResourceAnchorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*resourceAnchorArgs)(nil)).Elem()
}
type ResourceAnchorInput interface {
pulumi.Input
ToResourceAnchorOutput() ResourceAnchorOutput
ToResourceAnchorOutputWithContext(ctx context.Context) ResourceAnchorOutput
}
func (*ResourceAnchor) ElementType() reflect.Type {
return reflect.TypeOf((**ResourceAnchor)(nil)).Elem()
}
func (i *ResourceAnchor) ToResourceAnchorOutput() ResourceAnchorOutput {
return i.ToResourceAnchorOutputWithContext(context.Background())
}
func (i *ResourceAnchor) ToResourceAnchorOutputWithContext(ctx context.Context) ResourceAnchorOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceAnchorOutput)
}
// ResourceAnchorArrayInput is an input type that accepts ResourceAnchorArray and ResourceAnchorArrayOutput values.
// You can construct a concrete instance of `ResourceAnchorArrayInput` via:
//
// ResourceAnchorArray{ ResourceAnchorArgs{...} }
type ResourceAnchorArrayInput interface {
pulumi.Input
ToResourceAnchorArrayOutput() ResourceAnchorArrayOutput
ToResourceAnchorArrayOutputWithContext(context.Context) ResourceAnchorArrayOutput
}
type ResourceAnchorArray []ResourceAnchorInput
func (ResourceAnchorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResourceAnchor)(nil)).Elem()
}
func (i ResourceAnchorArray) ToResourceAnchorArrayOutput() ResourceAnchorArrayOutput {
return i.ToResourceAnchorArrayOutputWithContext(context.Background())
}
func (i ResourceAnchorArray) ToResourceAnchorArrayOutputWithContext(ctx context.Context) ResourceAnchorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceAnchorArrayOutput)
}
// ResourceAnchorMapInput is an input type that accepts ResourceAnchorMap and ResourceAnchorMapOutput values.
// You can construct a concrete instance of `ResourceAnchorMapInput` via:
//
// ResourceAnchorMap{ "key": ResourceAnchorArgs{...} }
type ResourceAnchorMapInput interface {
pulumi.Input
ToResourceAnchorMapOutput() ResourceAnchorMapOutput
ToResourceAnchorMapOutputWithContext(context.Context) ResourceAnchorMapOutput
}
type ResourceAnchorMap map[string]ResourceAnchorInput
func (ResourceAnchorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResourceAnchor)(nil)).Elem()
}
func (i ResourceAnchorMap) ToResourceAnchorMapOutput() ResourceAnchorMapOutput {
return i.ToResourceAnchorMapOutputWithContext(context.Background())
}
func (i ResourceAnchorMap) ToResourceAnchorMapOutputWithContext(ctx context.Context) ResourceAnchorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ResourceAnchorMapOutput)
}
type ResourceAnchorOutput struct{ *pulumi.OutputState }
func (ResourceAnchorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ResourceAnchor)(nil)).Elem()
}
func (o ResourceAnchorOutput) ToResourceAnchorOutput() ResourceAnchorOutput {
return o
}
func (o ResourceAnchorOutput) ToResourceAnchorOutputWithContext(ctx context.Context) ResourceAnchorOutput {
return o
}
// Oracle Cloud Infrastructure compartment [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) which was created or linked by customer with Resource Anchor.
func (o ResourceAnchorOutput) LinkedCompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceAnchor) pulumi.StringOutput { return v.LinkedCompartmentId }).(pulumi.StringOutput)
}
// The Azure Region where the Oracle Resource Anchor exists.
func (o ResourceAnchorOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceAnchor) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Oracle Resource Anchor. Changing this forces a new Oracle Resource Anchor to be created.
func (o ResourceAnchorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceAnchor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Oracle Resource Anchor should exist. Changing this forces a new Oracle Resource Anchor to be created.
func (o ResourceAnchorOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ResourceAnchor) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Oracle Resource Anchor.
func (o ResourceAnchorOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ResourceAnchor) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ResourceAnchorArrayOutput struct{ *pulumi.OutputState }
func (ResourceAnchorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ResourceAnchor)(nil)).Elem()
}
func (o ResourceAnchorArrayOutput) ToResourceAnchorArrayOutput() ResourceAnchorArrayOutput {
return o
}
func (o ResourceAnchorArrayOutput) ToResourceAnchorArrayOutputWithContext(ctx context.Context) ResourceAnchorArrayOutput {
return o
}
func (o ResourceAnchorArrayOutput) Index(i pulumi.IntInput) ResourceAnchorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceAnchor {
return vs[0].([]*ResourceAnchor)[vs[1].(int)]
}).(ResourceAnchorOutput)
}
type ResourceAnchorMapOutput struct{ *pulumi.OutputState }
func (ResourceAnchorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ResourceAnchor)(nil)).Elem()
}
func (o ResourceAnchorMapOutput) ToResourceAnchorMapOutput() ResourceAnchorMapOutput {
return o
}
func (o ResourceAnchorMapOutput) ToResourceAnchorMapOutputWithContext(ctx context.Context) ResourceAnchorMapOutput {
return o
}
func (o ResourceAnchorMapOutput) MapIndex(k pulumi.StringInput) ResourceAnchorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceAnchor {
return vs[0].(map[string]*ResourceAnchor)[vs[1].(string)]
}).(ResourceAnchorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ResourceAnchorInput)(nil)).Elem(), &ResourceAnchor{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceAnchorArrayInput)(nil)).Elem(), ResourceAnchorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ResourceAnchorMapInput)(nil)).Elem(), ResourceAnchorMap{})
pulumi.RegisterOutputType(ResourceAnchorOutput{})
pulumi.RegisterOutputType(ResourceAnchorArrayOutput{})
pulumi.RegisterOutputType(ResourceAnchorMapOutput{})
}
| 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/oracle/getAutonomousDatabaseBackups.go | sdk/go/azure/oracle/getAutonomousDatabaseBackups.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 oracle
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 Autonomous Database Backups.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := oracle.GetAutonomousDatabaseBackups(ctx, &oracle.GetAutonomousDatabaseBackupsArgs{
// AutonomousDatabaseId: exampleAzurermOracleAutonomousDatabase.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:
//
// * `Oracle.Database` - 2025-09-01
func GetAutonomousDatabaseBackups(ctx *pulumi.Context, args *GetAutonomousDatabaseBackupsArgs, opts ...pulumi.InvokeOption) (*GetAutonomousDatabaseBackupsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAutonomousDatabaseBackupsResult
err := ctx.Invoke("azure:oracle/getAutonomousDatabaseBackups:getAutonomousDatabaseBackups", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutonomousDatabaseBackups.
type GetAutonomousDatabaseBackupsArgs struct {
// The azureId of the Autonomous Database for which the backups will be listed.
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
}
// A collection of values returned by getAutonomousDatabaseBackups.
type GetAutonomousDatabaseBackupsResult struct {
// An `autonomousDatabaseBackups` block as defined below.
AutonomousDatabaseBackups []GetAutonomousDatabaseBackupsAutonomousDatabaseBackup `pulumi:"autonomousDatabaseBackups"`
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
}
func GetAutonomousDatabaseBackupsOutput(ctx *pulumi.Context, args GetAutonomousDatabaseBackupsOutputArgs, opts ...pulumi.InvokeOption) GetAutonomousDatabaseBackupsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetAutonomousDatabaseBackupsResultOutput, error) {
args := v.(GetAutonomousDatabaseBackupsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAutonomousDatabaseBackups:getAutonomousDatabaseBackups", args, GetAutonomousDatabaseBackupsResultOutput{}, options).(GetAutonomousDatabaseBackupsResultOutput), nil
}).(GetAutonomousDatabaseBackupsResultOutput)
}
// A collection of arguments for invoking getAutonomousDatabaseBackups.
type GetAutonomousDatabaseBackupsOutputArgs struct {
// The azureId of the Autonomous Database for which the backups will be listed.
AutonomousDatabaseId pulumi.StringInput `pulumi:"autonomousDatabaseId"`
}
func (GetAutonomousDatabaseBackupsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAutonomousDatabaseBackupsArgs)(nil)).Elem()
}
// A collection of values returned by getAutonomousDatabaseBackups.
type GetAutonomousDatabaseBackupsResultOutput struct{ *pulumi.OutputState }
func (GetAutonomousDatabaseBackupsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAutonomousDatabaseBackupsResult)(nil)).Elem()
}
func (o GetAutonomousDatabaseBackupsResultOutput) ToGetAutonomousDatabaseBackupsResultOutput() GetAutonomousDatabaseBackupsResultOutput {
return o
}
func (o GetAutonomousDatabaseBackupsResultOutput) ToGetAutonomousDatabaseBackupsResultOutputWithContext(ctx context.Context) GetAutonomousDatabaseBackupsResultOutput {
return o
}
// An `autonomousDatabaseBackups` block as defined below.
func (o GetAutonomousDatabaseBackupsResultOutput) AutonomousDatabaseBackups() GetAutonomousDatabaseBackupsAutonomousDatabaseBackupArrayOutput {
return o.ApplyT(func(v GetAutonomousDatabaseBackupsResult) []GetAutonomousDatabaseBackupsAutonomousDatabaseBackup {
return v.AutonomousDatabaseBackups
}).(GetAutonomousDatabaseBackupsAutonomousDatabaseBackupArrayOutput)
}
func (o GetAutonomousDatabaseBackupsResultOutput) AutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v GetAutonomousDatabaseBackupsResult) string { return v.AutonomousDatabaseId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAutonomousDatabaseBackupsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAutonomousDatabaseBackupsResult) string { return v.Id }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetAutonomousDatabaseBackupsResultOutput{})
}
| 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/oracle/getAutonomousDatabaseCloneFromBackup.go | sdk/go/azure/oracle/getAutonomousDatabaseCloneFromBackup.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 oracle
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 autonomous database clone from backup.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupAutonomousDatabaseCloneFromBackup(ctx, &oracle.LookupAutonomousDatabaseCloneFromBackupArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupAutonomousDatabaseCloneFromBackup(ctx *pulumi.Context, args *LookupAutonomousDatabaseCloneFromBackupArgs, opts ...pulumi.InvokeOption) (*LookupAutonomousDatabaseCloneFromBackupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAutonomousDatabaseCloneFromBackupResult
err := ctx.Invoke("azure:oracle/getAutonomousDatabaseCloneFromBackup:getAutonomousDatabaseCloneFromBackup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutonomousDatabaseCloneFromBackup.
type LookupAutonomousDatabaseCloneFromBackupArgs struct {
// The name of this autonomous database clone from backup.
Name string `pulumi:"name"`
// The name of the Resource Group where the Autonomous Database Clone exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAutonomousDatabaseCloneFromBackup.
type LookupAutonomousDatabaseCloneFromBackupResult struct {
// The current amount of storage in use for user and system data in terabytes.
ActualUsedDataStorageSizeInTb float64 `pulumi:"actualUsedDataStorageSizeInTb"`
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTb` value. You can compare this value to the `actualUsedDataStorageSizeInTb` value to determine if a manual shrink operation is appropriate for your allocated storage.
AllocatedStorageSizeInTb float64 `pulumi:"allocatedStorageSizeInTb"`
// A list of IP addresses on the access control list.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Whether auto-scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Whether auto-scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// A list of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
AvailableUpgradeVersions []string `pulumi:"availableUpgradeVersions"`
// The backup retention period in days.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database.
CharacterSet string `pulumi:"characterSet"`
// The compute amount (CPUs) available to the database.
ComputeCount float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database.
ComputeModel string `pulumi:"computeModel"`
// The connection string used to connect to the Autonomous Database.
ConnectionStrings []string `pulumi:"connectionStrings"`
// The number of CPU cores available to the database. When the ECPU is selected, the value for cpuCoreCount is 0.
CpuCoreCount int `pulumi:"cpuCoreCount"`
// A list of Customer's contact email addresses.
CustomerContacts []string `pulumi:"customerContacts"`
// The quantity of data in the database in gigabytes.
DataStorageSizeInGb int `pulumi:"dataStorageSizeInGb"`
// The maximum storage that can be allocated for the database in terabytes.
DataStorageSizeInTb int `pulumi:"dataStorageSizeInTb"`
// The Oracle Database version for Autonomous Database.
DatabaseVersion string `pulumi:"databaseVersion"`
// The Autonomous Database workload type.
DatabaseWorkload string `pulumi:"databaseWorkload"`
// The display name for the Autonomous Database.
DisplayName string `pulumi:"displayName"`
// Indicates the number of seconds of data loss for Data Guard failover.
FailedDataRecoveryInSeconds int `pulumi:"failedDataRecoveryInSeconds"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The area assigned to In-Memory tables in Autonomous Database.
InMemoryAreaInGb int `pulumi:"inMemoryAreaInGb"`
// The Oracle license model that applied to the Oracle Autonomous Database.
LicenseModel string `pulumi:"licenseModel"`
// Information about the current lifecycle state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// The current state of the backup.
LifecycleState string `pulumi:"lifecycleState"`
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard.
LocalAdgAutoFailoverMaxDataLossLimitInSeconds int `pulumi:"localAdgAutoFailoverMaxDataLossLimitInSeconds"`
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
LocalDataGuardEnabled bool `pulumi:"localDataGuardEnabled"`
// The Azure Region where the autonomous database cloned from backup exists.
Location string `pulumi:"location"`
// A `longTermBackupSchedule` block as defined below.
LongTermBackupSchedules []GetAutonomousDatabaseCloneFromBackupLongTermBackupSchedule `pulumi:"longTermBackupSchedules"`
// The amount of memory in gigabytes per ECPU or OCPU.
MemoryPerOracleComputeUnitInGb int `pulumi:"memoryPerOracleComputeUnitInGb"`
// Specifies if the Autonomous Database requires mTLS connections.
MtlsConnectionRequired bool `pulumi:"mtlsConnectionRequired"`
Name string `pulumi:"name"`
// The national character set for the autonomous database.
NationalCharacterSet string `pulumi:"nationalCharacterSet"`
NextLongTermBackupTimestamp string `pulumi:"nextLongTermBackupTimestamp"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
Ocid string `pulumi:"ocid"`
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
PeerDatabaseIds []string `pulumi:"peerDatabaseIds"`
// Indicates if the Autonomous Database version is a preview version.
Preview bool `pulumi:"preview"`
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
PreviewVersionWithServiceTermsAccepted bool `pulumi:"previewVersionWithServiceTermsAccepted"`
// The private endpoint IP address for the resource.
PrivateEndpointIp string `pulumi:"privateEndpointIp"`
// The private endpoint label for the resource.
PrivateEndpointLabel string `pulumi:"privateEndpointLabel"`
// The private endpoint for the resource.
PrivateEndpointUrl string `pulumi:"privateEndpointUrl"`
// An array of CPU values that an Autonomous Database can be scaled to.
ProvisionableCpuses []int `pulumi:"provisionableCpuses"`
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
RemoteDataGuardEnabled bool `pulumi:"remoteDataGuardEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The URL of the Service Console for the Autonomous Database.
ServiceConsoleUrl string `pulumi:"serviceConsoleUrl"`
// The ID of the source Autonomous Database from which this clone was created.
SourceAutonomousDatabaseId string `pulumi:"sourceAutonomousDatabaseId"`
// The URL of the SQL web developer portal.
SqlWebDeveloperUrl string `pulumi:"sqlWebDeveloperUrl"`
// The ID to an Azure Resource Manager subnet the resource is associated with.
SubnetId string `pulumi:"subnetId"`
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
SupportedRegionsToCloneTos []string `pulumi:"supportedRegionsToCloneTos"`
// A mapping of tags assigned to the autonomous database clone from backup.
Tags map[string]string `pulumi:"tags"`
// The timestamp the Autonomous Database was created.
TimeCreatedInUtc string `pulumi:"timeCreatedInUtc"`
// The timestamp the Autonomous Data Guard role was switched for the Autonomous Database. For databases that have standbys in both the primary Data Guard region and a remote Data Guard standby region, this is the latest timestamp of either the database using the "primary" role in the primary Data Guard region, or database located in the remote Data Guard standby region.
TimeDataGuardRoleChangedInUtc string `pulumi:"timeDataGuardRoleChangedInUtc"`
// The timestamp the Always Free database will be automatically deleted because of inactivity. If the database is in the STOPPED state and without activity until this time, it will be deleted.
TimeDeletionOfFreeAutonomousDatabaseInUtc string `pulumi:"timeDeletionOfFreeAutonomousDatabaseInUtc"`
// The timestamp that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.
TimeLocalDataGuardEnabledInUtc string `pulumi:"timeLocalDataGuardEnabledInUtc"`
// The timestamp when maintenance will begin.
TimeMaintenanceBeginInUtc string `pulumi:"timeMaintenanceBeginInUtc"`
// The timestamp when maintenance will end.
TimeMaintenanceEndInUtc string `pulumi:"timeMaintenanceEndInUtc"`
// The timestamp of the last failover operation.
TimeOfLastFailoverInUtc string `pulumi:"timeOfLastFailoverInUtc"`
// The timestamp when the last refresh happened.
TimeOfLastRefreshInUtc string `pulumi:"timeOfLastRefreshInUtc"`
// The refresh point timestamp (UTC). The refresh point is the time to which the database was most recently refreshed. Data created after the refresh point is not included in the refresh.
TimeOfLastRefreshPointInUtc string `pulumi:"timeOfLastRefreshPointInUtc"`
// The timestamp of the last switchover operation for the Autonomous Database.
TimeOfLastSwitchoverInUtc string `pulumi:"timeOfLastSwitchoverInUtc"`
// The timestamp the Always Free database will be stopped because of inactivity. If this time is reached without any database activity, the database will automatically be put into the STOPPED state.
TimeReclamationOfFreeAutonomousDatabaseInUtc string `pulumi:"timeReclamationOfFreeAutonomousDatabaseInUtc"`
// The storage space consumed by Autonomous Database in gigabytes.
UsedDataStorageSizeInGb int `pulumi:"usedDataStorageSizeInGb"`
// The amount of storage that has been used, in terabytes.
UsedDataStorageSizeInTb int `pulumi:"usedDataStorageSizeInTb"`
// The ID to an Azure Resource Manager virtual network resource.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupAutonomousDatabaseCloneFromBackupOutput(ctx *pulumi.Context, args LookupAutonomousDatabaseCloneFromBackupOutputArgs, opts ...pulumi.InvokeOption) LookupAutonomousDatabaseCloneFromBackupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAutonomousDatabaseCloneFromBackupResultOutput, error) {
args := v.(LookupAutonomousDatabaseCloneFromBackupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAutonomousDatabaseCloneFromBackup:getAutonomousDatabaseCloneFromBackup", args, LookupAutonomousDatabaseCloneFromBackupResultOutput{}, options).(LookupAutonomousDatabaseCloneFromBackupResultOutput), nil
}).(LookupAutonomousDatabaseCloneFromBackupResultOutput)
}
// A collection of arguments for invoking getAutonomousDatabaseCloneFromBackup.
type LookupAutonomousDatabaseCloneFromBackupOutputArgs struct {
// The name of this autonomous database clone from backup.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Autonomous Database Clone exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAutonomousDatabaseCloneFromBackupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseCloneFromBackupArgs)(nil)).Elem()
}
// A collection of values returned by getAutonomousDatabaseCloneFromBackup.
type LookupAutonomousDatabaseCloneFromBackupResultOutput struct{ *pulumi.OutputState }
func (LookupAutonomousDatabaseCloneFromBackupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseCloneFromBackupResult)(nil)).Elem()
}
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ToLookupAutonomousDatabaseCloneFromBackupResultOutput() LookupAutonomousDatabaseCloneFromBackupResultOutput {
return o
}
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ToLookupAutonomousDatabaseCloneFromBackupResultOutputWithContext(ctx context.Context) LookupAutonomousDatabaseCloneFromBackupResultOutput {
return o
}
// The current amount of storage in use for user and system data in terabytes.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ActualUsedDataStorageSizeInTb() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) float64 { return v.ActualUsedDataStorageSizeInTb }).(pulumi.Float64Output)
}
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTb` value. You can compare this value to the `actualUsedDataStorageSizeInTb` value to determine if a manual shrink operation is appropriate for your allocated storage.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) AllocatedStorageSizeInTb() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) float64 { return v.AllocatedStorageSizeInTb }).(pulumi.Float64Output)
}
// A list of IP addresses on the access control list.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) AllowedIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.AllowedIpAddresses }).(pulumi.StringArrayOutput)
}
// Whether auto-scaling is enabled for the Autonomous Database CPU core count.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) AutoScalingEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.AutoScalingEnabled }).(pulumi.BoolOutput)
}
// Whether auto-scaling is enabled for the Autonomous Database storage.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) AutoScalingForStorageEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.AutoScalingForStorageEnabled }).(pulumi.BoolOutput)
}
// A list of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) AvailableUpgradeVersions() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.AvailableUpgradeVersions }).(pulumi.StringArrayOutput)
}
// The backup retention period in days.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) BackupRetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.BackupRetentionPeriodInDays }).(pulumi.IntOutput)
}
// The character set for the autonomous database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) CharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.CharacterSet }).(pulumi.StringOutput)
}
// The compute amount (CPUs) available to the database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ComputeCount() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) float64 { return v.ComputeCount }).(pulumi.Float64Output)
}
// The compute model of the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ComputeModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.ComputeModel }).(pulumi.StringOutput)
}
// The connection string used to connect to the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ConnectionStrings() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.ConnectionStrings }).(pulumi.StringArrayOutput)
}
// The number of CPU cores available to the database. When the ECPU is selected, the value for cpuCoreCount is 0.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) CpuCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.CpuCoreCount }).(pulumi.IntOutput)
}
// A list of Customer's contact email addresses.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) CustomerContacts() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.CustomerContacts }).(pulumi.StringArrayOutput)
}
// The quantity of data in the database in gigabytes.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) DataStorageSizeInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.DataStorageSizeInGb }).(pulumi.IntOutput)
}
// The maximum storage that can be allocated for the database in terabytes.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) DataStorageSizeInTb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.DataStorageSizeInTb }).(pulumi.IntOutput)
}
// The Oracle Database version for Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) DatabaseVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.DatabaseVersion }).(pulumi.StringOutput)
}
// The Autonomous Database workload type.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) DatabaseWorkload() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.DatabaseWorkload }).(pulumi.StringOutput)
}
// The display name for the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Indicates the number of seconds of data loss for Data Guard failover.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) FailedDataRecoveryInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.FailedDataRecoveryInSeconds }).(pulumi.IntOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.Id }).(pulumi.StringOutput)
}
// The area assigned to In-Memory tables in Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) InMemoryAreaInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.InMemoryAreaInGb }).(pulumi.IntOutput)
}
// The Oracle license model that applied to the Oracle Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LicenseModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.LicenseModel }).(pulumi.StringOutput)
}
// Information about the current lifecycle state.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// The current state of the backup.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LocalAdgAutoFailoverMaxDataLossLimitInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int {
return v.LocalAdgAutoFailoverMaxDataLossLimitInSeconds
}).(pulumi.IntOutput)
}
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LocalDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.LocalDataGuardEnabled }).(pulumi.BoolOutput)
}
// The Azure Region where the autonomous database cloned from backup exists.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.Location }).(pulumi.StringOutput)
}
// A `longTermBackupSchedule` block as defined below.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) LongTermBackupSchedules() GetAutonomousDatabaseCloneFromBackupLongTermBackupScheduleArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []GetAutonomousDatabaseCloneFromBackupLongTermBackupSchedule {
return v.LongTermBackupSchedules
}).(GetAutonomousDatabaseCloneFromBackupLongTermBackupScheduleArrayOutput)
}
// The amount of memory in gigabytes per ECPU or OCPU.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) MemoryPerOracleComputeUnitInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) int { return v.MemoryPerOracleComputeUnitInGb }).(pulumi.IntOutput)
}
// Specifies if the Autonomous Database requires mTLS connections.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) MtlsConnectionRequired() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.MtlsConnectionRequired }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.Name }).(pulumi.StringOutput)
}
// The national character set for the autonomous database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) NationalCharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.NationalCharacterSet }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) NextLongTermBackupTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.NextLongTermBackupTimestamp }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.Ocid }).(pulumi.StringOutput)
}
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) PeerDatabaseIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.PeerDatabaseIds }).(pulumi.StringArrayOutput)
}
// Indicates if the Autonomous Database version is a preview version.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Preview() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.Preview }).(pulumi.BoolOutput)
}
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) PreviewVersionWithServiceTermsAccepted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool {
return v.PreviewVersionWithServiceTermsAccepted
}).(pulumi.BoolOutput)
}
// The private endpoint IP address for the resource.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) PrivateEndpointIp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.PrivateEndpointIp }).(pulumi.StringOutput)
}
// The private endpoint label for the resource.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) PrivateEndpointLabel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.PrivateEndpointLabel }).(pulumi.StringOutput)
}
// The private endpoint for the resource.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) PrivateEndpointUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.PrivateEndpointUrl }).(pulumi.StringOutput)
}
// An array of CPU values that an Autonomous Database can be scaled to.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ProvisionableCpuses() pulumi.IntArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []int { return v.ProvisionableCpuses }).(pulumi.IntArrayOutput)
}
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) RemoteDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) bool { return v.RemoteDataGuardEnabled }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The URL of the Service Console for the Autonomous Database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) ServiceConsoleUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.ServiceConsoleUrl }).(pulumi.StringOutput)
}
// The ID of the source Autonomous Database from which this clone was created.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) SourceAutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.SourceAutonomousDatabaseId }).(pulumi.StringOutput)
}
// The URL of the SQL web developer portal.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) SqlWebDeveloperUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.SqlWebDeveloperUrl }).(pulumi.StringOutput)
}
// The ID to an Azure Resource Manager subnet the resource is associated with.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) SupportedRegionsToCloneTos() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) []string { return v.SupportedRegionsToCloneTos }).(pulumi.StringArrayOutput)
}
// A mapping of tags assigned to the autonomous database clone from backup.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The timestamp the Autonomous Database was created.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeCreatedInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.TimeCreatedInUtc }).(pulumi.StringOutput)
}
// The timestamp the Autonomous Data Guard role was switched for the Autonomous Database. For databases that have standbys in both the primary Data Guard region and a remote Data Guard standby region, this is the latest timestamp of either the database using the "primary" role in the primary Data Guard region, or database located in the remote Data Guard standby region.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeDataGuardRoleChangedInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.TimeDataGuardRoleChangedInUtc }).(pulumi.StringOutput)
}
// The timestamp the Always Free database will be automatically deleted because of inactivity. If the database is in the STOPPED state and without activity until this time, it will be deleted.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeDeletionOfFreeAutonomousDatabaseInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string {
return v.TimeDeletionOfFreeAutonomousDatabaseInUtc
}).(pulumi.StringOutput)
}
// The timestamp that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeLocalDataGuardEnabledInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.TimeLocalDataGuardEnabledInUtc }).(pulumi.StringOutput)
}
// The timestamp when maintenance will begin.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeMaintenanceBeginInUtc() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseCloneFromBackupResult) string { return v.TimeMaintenanceBeginInUtc }).(pulumi.StringOutput)
}
// The timestamp when maintenance will end.
func (o LookupAutonomousDatabaseCloneFromBackupResultOutput) TimeMaintenanceEndInUtc() pulumi.StringOutput {
| 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/oracle/getAutonomousDatabase.go | sdk/go/azure/oracle/getAutonomousDatabase.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 oracle
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 Autonomous Database.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupAutonomousDatabase(ctx, &oracle.LookupAutonomousDatabaseArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupAutonomousDatabase(ctx *pulumi.Context, args *LookupAutonomousDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupAutonomousDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAutonomousDatabaseResult
err := ctx.Invoke("azure:oracle/getAutonomousDatabase:getAutonomousDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAutonomousDatabase.
type LookupAutonomousDatabaseArgs struct {
// The name of this Autonomous Database.
Name string `pulumi:"name"`
// The name of the Resource Group where the Autonomous Database exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAutonomousDatabase.
type LookupAutonomousDatabaseResult struct {
// The current amount of storage in use for user and system data, in terabytes (TB).
ActualUsedDataStorageSizeInTbs float64 `pulumi:"actualUsedDataStorageSizeInTbs"`
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTBs` value. You can compare this value to the `actualUsedDataStorageSizeInTBs` value to determine if a manual shrink operation is appropriate for your allocated storage.
AllocatedStorageSizeInTbs float64 `pulumi:"allocatedStorageSizeInTbs"`
// The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. If `arePrimaryWhitelistedIpsUsed` is 'TRUE' then Autonomous Database uses this primary's IP access control list (ACL) for the disaster recovery peer called `standbywhitelistedips`.
AllowedIps []int `pulumi:"allowedIps"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
AutonomousDatabaseId string `pulumi:"autonomousDatabaseId"`
// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
AvailableUpgradeVersions []string `pulumi:"availableUpgradeVersions"`
// Retention period, in days, for backups.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database.
CharacterSet string `pulumi:"characterSet"`
// The compute amount (CPUs) available to the database.
ComputeCount float64 `pulumi:"computeCount"`
// The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details.
CpuCoreCount int `pulumi:"cpuCoreCount"`
// The quantity of data in the database, in gigabytes.
DataStorageSizeInGbs int `pulumi:"dataStorageSizeInGbs"`
// The maximum storage that can be allocated for the database, in terabytes.
DataStorageSizeInTbs int `pulumi:"dataStorageSizeInTbs"`
// The DB node storage size in, in gigabytes.
DbNodeStorageSizeInGbs int `pulumi:"dbNodeStorageSizeInGbs"`
// A valid Oracle Database version for Autonomous Database.
DbVersion string `pulumi:"dbVersion"`
// The user-friendly name for the Autonomous Database. The name does not have to be unique.
DisplayName string `pulumi:"displayName"`
// Indicates the number of seconds of data loss for a Data Guard failover.
FailedDataRecoveryInSeconds int `pulumi:"failedDataRecoveryInSeconds"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The area assigned to In-Memory tables in Autonomous Database.
InMemoryAreaInGbs int `pulumi:"inMemoryAreaInGbs"`
// Information about the current lifecycle state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard
LocalAdgAutoFailoverMaxDataLossLimit int `pulumi:"localAdgAutoFailoverMaxDataLossLimit"`
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
LocalDataGuardEnabled bool `pulumi:"localDataGuardEnabled"`
// The Azure Region where the Autonomous Database exists.
Location string `pulumi:"location"`
// A `longTermBackupSchedule` block as defined below
LongTermBackupSchedules []GetAutonomousDatabaseLongTermBackupSchedule `pulumi:"longTermBackupSchedules"`
// The amount of memory (in GBs) enabled per ECPU or OCPU.
MemoryPerOracleComputeUnitInGbs int `pulumi:"memoryPerOracleComputeUnitInGbs"`
// Specifies if the Autonomous Database requires mTLS connections.
MtlsConnectionRequired bool `pulumi:"mtlsConnectionRequired"`
Name string `pulumi:"name"`
// The national character set for the autonomous database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
NationalCharacterSet string `pulumi:"nationalCharacterSet"`
// The date and time when the next long-term backup would be created.
NextLongTermBackupTimeStamp string `pulumi:"nextLongTermBackupTimeStamp"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
Ocid string `pulumi:"ocid"`
PeerDbId string `pulumi:"peerDbId"`
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
PeerDbIds []string `pulumi:"peerDbIds"`
// Indicates if the Autonomous Database version is a preview version.
Preview bool `pulumi:"preview"`
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
PreviewVersionWithServiceTermsAccepted bool `pulumi:"previewVersionWithServiceTermsAccepted"`
// The private endpoint for the resource.
PrivateEndpoint string `pulumi:"privateEndpoint"`
// The private endpoint Ip address for the resource.
PrivateEndpointIp string `pulumi:"privateEndpointIp"`
// The private endpoint label for the resource.
PrivateEndpointLabel string `pulumi:"privateEndpointLabel"`
// An array of CPU values that an Autonomous Database can be scaled to.
ProvisionableCpuses []int `pulumi:"provisionableCpuses"`
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
RemoteDataGuardEnabled bool `pulumi:"remoteDataGuardEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The URL of the Service Console for the Autonomous Database.
ServiceConsoleUrl string `pulumi:"serviceConsoleUrl"`
// The URL of the SQL web developer.
SqlWebDeveloperUrl string `pulumi:"sqlWebDeveloperUrl"`
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with.
SubnetId string `pulumi:"subnetId"`
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
SupportedRegionsToCloneTos []string `pulumi:"supportedRegionsToCloneTos"`
// A mapping of tags assigned to the Autonomous Database.
Tags map[string]string `pulumi:"tags"`
// The date and time the Autonomous Database was created.
TimeCreated string `pulumi:"timeCreated"`
// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. For databases that have standbys in both the primary Data Guard region and a remote Data Guard standby region, this is the latest timestamp of either the database using the "primary" role in the primary Data Guard region, or database located in the remote Data Guard standby region.
TimeDataGuardRoleChanged string `pulumi:"timeDataGuardRoleChanged"`
// The date and time the Always Free database will be automatically deleted because of inactivity. If the database is in the STOPPED state and without activity until this time, it will be deleted.
TimeDeletionOfFreeAutonomousDatabase string `pulumi:"timeDeletionOfFreeAutonomousDatabase"`
// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.
TimeLocalDataGuardEnabledOn string `pulumi:"timeLocalDataGuardEnabledOn"`
// The date and time when maintenance will begin.
TimeMaintenanceBegin string `pulumi:"timeMaintenanceBegin"`
// The date and time when maintenance will end.
TimeMaintenanceEnd string `pulumi:"timeMaintenanceEnd"`
// The timestamp of the last failover operation.
TimeOfLastFailover string `pulumi:"timeOfLastFailover"`
// The date and time when last refresh happened.
TimeOfLastRefresh string `pulumi:"timeOfLastRefresh"`
// The refresh point timestamp (UTC). The refresh point is the time to which the database was most recently refreshed. Data created after the refresh point is not included in the refresh.
TimeOfLastRefreshPoint string `pulumi:"timeOfLastRefreshPoint"`
// The timestamp of the last switchover operation for the Autonomous Database.
TimeOfLastSwitchover string `pulumi:"timeOfLastSwitchover"`
// The date and time the Always Free database will be stopped because of inactivity. If this time is reached without any database activity, the database will automatically be put into the STOPPED state.
TimeReclamationOfFreeAutonomousDatabase string `pulumi:"timeReclamationOfFreeAutonomousDatabase"`
// The storage space consumed by Autonomous Database in GBs.
UsedDataStorageSizeInGbs int `pulumi:"usedDataStorageSizeInGbs"`
// The amount of storage that has been used, in terabytes.
UsedDataStorageSizeInTbs int `pulumi:"usedDataStorageSizeInTbs"`
// The ID to an Azure Resource Manager vnet resource.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
func LookupAutonomousDatabaseOutput(ctx *pulumi.Context, args LookupAutonomousDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupAutonomousDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAutonomousDatabaseResultOutput, error) {
args := v.(LookupAutonomousDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getAutonomousDatabase:getAutonomousDatabase", args, LookupAutonomousDatabaseResultOutput{}, options).(LookupAutonomousDatabaseResultOutput), nil
}).(LookupAutonomousDatabaseResultOutput)
}
// A collection of arguments for invoking getAutonomousDatabase.
type LookupAutonomousDatabaseOutputArgs struct {
// The name of this Autonomous Database.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Autonomous Database exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAutonomousDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getAutonomousDatabase.
type LookupAutonomousDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupAutonomousDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAutonomousDatabaseResult)(nil)).Elem()
}
func (o LookupAutonomousDatabaseResultOutput) ToLookupAutonomousDatabaseResultOutput() LookupAutonomousDatabaseResultOutput {
return o
}
func (o LookupAutonomousDatabaseResultOutput) ToLookupAutonomousDatabaseResultOutputWithContext(ctx context.Context) LookupAutonomousDatabaseResultOutput {
return o
}
// The current amount of storage in use for user and system data, in terabytes (TB).
func (o LookupAutonomousDatabaseResultOutput) ActualUsedDataStorageSizeInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) float64 { return v.ActualUsedDataStorageSizeInTbs }).(pulumi.Float64Output)
}
// The amount of storage currently allocated for the database tables and billed for, rounded up. When auto-scaling is not enabled, this value is equal to the `dataStorageSizeInTBs` value. You can compare this value to the `actualUsedDataStorageSizeInTBs` value to determine if a manual shrink operation is appropriate for your allocated storage.
func (o LookupAutonomousDatabaseResultOutput) AllocatedStorageSizeInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) float64 { return v.AllocatedStorageSizeInTbs }).(pulumi.Float64Output)
}
// The client IP access control list (ACL). This feature is available for [Autonomous Database Serverless] (https://docs.oracle.com/en/cloud/paas/autonomous-database/index.html) and on Exadata Cloud@Customer. Only clients connecting from an IP address included in the ACL may access the Autonomous Database instance. If `arePrimaryWhitelistedIpsUsed` is 'TRUE' then Autonomous Database uses this primary's IP access control list (ACL) for the disaster recovery peer called `standbywhitelistedips`.
func (o LookupAutonomousDatabaseResultOutput) AllowedIps() pulumi.IntArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []int { return v.AllowedIps }).(pulumi.IntArrayOutput)
}
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count.
func (o LookupAutonomousDatabaseResultOutput) AutoScalingEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.AutoScalingEnabled }).(pulumi.BoolOutput)
}
// Indicates if auto scaling is enabled for the Autonomous Database storage.
func (o LookupAutonomousDatabaseResultOutput) AutoScalingForStorageEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.AutoScalingForStorageEnabled }).(pulumi.BoolOutput)
}
// The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
func (o LookupAutonomousDatabaseResultOutput) AutonomousDatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.AutonomousDatabaseId }).(pulumi.StringOutput)
}
// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.
func (o LookupAutonomousDatabaseResultOutput) AvailableUpgradeVersions() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []string { return v.AvailableUpgradeVersions }).(pulumi.StringArrayOutput)
}
// Retention period, in days, for backups.
func (o LookupAutonomousDatabaseResultOutput) BackupRetentionPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.BackupRetentionPeriodInDays }).(pulumi.IntOutput)
}
// The character set for the autonomous database.
func (o LookupAutonomousDatabaseResultOutput) CharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.CharacterSet }).(pulumi.StringOutput)
}
// The compute amount (CPUs) available to the database.
func (o LookupAutonomousDatabaseResultOutput) ComputeCount() pulumi.Float64Output {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) float64 { return v.ComputeCount }).(pulumi.Float64Output)
}
// The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details.
func (o LookupAutonomousDatabaseResultOutput) CpuCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.CpuCoreCount }).(pulumi.IntOutput)
}
// The quantity of data in the database, in gigabytes.
func (o LookupAutonomousDatabaseResultOutput) DataStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.DataStorageSizeInGbs }).(pulumi.IntOutput)
}
// The maximum storage that can be allocated for the database, in terabytes.
func (o LookupAutonomousDatabaseResultOutput) DataStorageSizeInTbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.DataStorageSizeInTbs }).(pulumi.IntOutput)
}
// The DB node storage size in, in gigabytes.
func (o LookupAutonomousDatabaseResultOutput) DbNodeStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.DbNodeStorageSizeInGbs }).(pulumi.IntOutput)
}
// A valid Oracle Database version for Autonomous Database.
func (o LookupAutonomousDatabaseResultOutput) DbVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.DbVersion }).(pulumi.StringOutput)
}
// The user-friendly name for the Autonomous Database. The name does not have to be unique.
func (o LookupAutonomousDatabaseResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// Indicates the number of seconds of data loss for a Data Guard failover.
func (o LookupAutonomousDatabaseResultOutput) FailedDataRecoveryInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.FailedDataRecoveryInSeconds }).(pulumi.IntOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAutonomousDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// The area assigned to In-Memory tables in Autonomous Database.
func (o LookupAutonomousDatabaseResultOutput) InMemoryAreaInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.InMemoryAreaInGbs }).(pulumi.IntOutput)
}
// Information about the current lifecycle state.
func (o LookupAutonomousDatabaseResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard
func (o LookupAutonomousDatabaseResultOutput) LocalAdgAutoFailoverMaxDataLossLimit() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.LocalAdgAutoFailoverMaxDataLossLimit }).(pulumi.IntOutput)
}
// Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseResultOutput) LocalDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.LocalDataGuardEnabled }).(pulumi.BoolOutput)
}
// The Azure Region where the Autonomous Database exists.
func (o LookupAutonomousDatabaseResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.Location }).(pulumi.StringOutput)
}
// A `longTermBackupSchedule` block as defined below
func (o LookupAutonomousDatabaseResultOutput) LongTermBackupSchedules() GetAutonomousDatabaseLongTermBackupScheduleArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []GetAutonomousDatabaseLongTermBackupSchedule {
return v.LongTermBackupSchedules
}).(GetAutonomousDatabaseLongTermBackupScheduleArrayOutput)
}
// The amount of memory (in GBs) enabled per ECPU or OCPU.
func (o LookupAutonomousDatabaseResultOutput) MemoryPerOracleComputeUnitInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.MemoryPerOracleComputeUnitInGbs }).(pulumi.IntOutput)
}
// Specifies if the Autonomous Database requires mTLS connections.
func (o LookupAutonomousDatabaseResultOutput) MtlsConnectionRequired() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.MtlsConnectionRequired }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
// The national character set for the autonomous database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
func (o LookupAutonomousDatabaseResultOutput) NationalCharacterSet() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.NationalCharacterSet }).(pulumi.StringOutput)
}
// The date and time when the next long-term backup would be created.
func (o LookupAutonomousDatabaseResultOutput) NextLongTermBackupTimeStamp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.NextLongTermBackupTimeStamp }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupAutonomousDatabaseResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the autonomous database.
func (o LookupAutonomousDatabaseResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.Ocid }).(pulumi.StringOutput)
}
func (o LookupAutonomousDatabaseResultOutput) PeerDbId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.PeerDbId }).(pulumi.StringOutput)
}
// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.
func (o LookupAutonomousDatabaseResultOutput) PeerDbIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []string { return v.PeerDbIds }).(pulumi.StringArrayOutput)
}
// Indicates if the Autonomous Database version is a preview version.
func (o LookupAutonomousDatabaseResultOutput) Preview() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.Preview }).(pulumi.BoolOutput)
}
// Indicates if the Autonomous Database version is a preview version with service terms accepted.
func (o LookupAutonomousDatabaseResultOutput) PreviewVersionWithServiceTermsAccepted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.PreviewVersionWithServiceTermsAccepted }).(pulumi.BoolOutput)
}
// The private endpoint for the resource.
func (o LookupAutonomousDatabaseResultOutput) PrivateEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.PrivateEndpoint }).(pulumi.StringOutput)
}
// The private endpoint Ip address for the resource.
func (o LookupAutonomousDatabaseResultOutput) PrivateEndpointIp() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.PrivateEndpointIp }).(pulumi.StringOutput)
}
// The private endpoint label for the resource.
func (o LookupAutonomousDatabaseResultOutput) PrivateEndpointLabel() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.PrivateEndpointLabel }).(pulumi.StringOutput)
}
// An array of CPU values that an Autonomous Database can be scaled to.
func (o LookupAutonomousDatabaseResultOutput) ProvisionableCpuses() pulumi.IntArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []int { return v.ProvisionableCpuses }).(pulumi.IntArrayOutput)
}
// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. Not applicable to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
func (o LookupAutonomousDatabaseResultOutput) RemoteDataGuardEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) bool { return v.RemoteDataGuardEnabled }).(pulumi.BoolOutput)
}
func (o LookupAutonomousDatabaseResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The URL of the Service Console for the Autonomous Database.
func (o LookupAutonomousDatabaseResultOutput) ServiceConsoleUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.ServiceConsoleUrl }).(pulumi.StringOutput)
}
// The URL of the SQL web developer.
func (o LookupAutonomousDatabaseResultOutput) SqlWebDeveloperUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.SqlWebDeveloperUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet the resource is associated with.
func (o LookupAutonomousDatabaseResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.
func (o LookupAutonomousDatabaseResultOutput) SupportedRegionsToCloneTos() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) []string { return v.SupportedRegionsToCloneTos }).(pulumi.StringArrayOutput)
}
// A mapping of tags assigned to the Autonomous Database.
func (o LookupAutonomousDatabaseResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The date and time the Autonomous Database was created.
func (o LookupAutonomousDatabaseResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. For databases that have standbys in both the primary Data Guard region and a remote Data Guard standby region, this is the latest timestamp of either the database using the "primary" role in the primary Data Guard region, or database located in the remote Data Guard standby region.
func (o LookupAutonomousDatabaseResultOutput) TimeDataGuardRoleChanged() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeDataGuardRoleChanged }).(pulumi.StringOutput)
}
// The date and time the Always Free database will be automatically deleted because of inactivity. If the database is in the STOPPED state and without activity until this time, it will be deleted.
func (o LookupAutonomousDatabaseResultOutput) TimeDeletionOfFreeAutonomousDatabase() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeDeletionOfFreeAutonomousDatabase }).(pulumi.StringOutput)
}
// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.
func (o LookupAutonomousDatabaseResultOutput) TimeLocalDataGuardEnabledOn() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeLocalDataGuardEnabledOn }).(pulumi.StringOutput)
}
// The date and time when maintenance will begin.
func (o LookupAutonomousDatabaseResultOutput) TimeMaintenanceBegin() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeMaintenanceBegin }).(pulumi.StringOutput)
}
// The date and time when maintenance will end.
func (o LookupAutonomousDatabaseResultOutput) TimeMaintenanceEnd() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeMaintenanceEnd }).(pulumi.StringOutput)
}
// The timestamp of the last failover operation.
func (o LookupAutonomousDatabaseResultOutput) TimeOfLastFailover() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeOfLastFailover }).(pulumi.StringOutput)
}
// The date and time when last refresh happened.
func (o LookupAutonomousDatabaseResultOutput) TimeOfLastRefresh() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeOfLastRefresh }).(pulumi.StringOutput)
}
// The refresh point timestamp (UTC). The refresh point is the time to which the database was most recently refreshed. Data created after the refresh point is not included in the refresh.
func (o LookupAutonomousDatabaseResultOutput) TimeOfLastRefreshPoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeOfLastRefreshPoint }).(pulumi.StringOutput)
}
// The timestamp of the last switchover operation for the Autonomous Database.
func (o LookupAutonomousDatabaseResultOutput) TimeOfLastSwitchover() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeOfLastSwitchover }).(pulumi.StringOutput)
}
// The date and time the Always Free database will be stopped because of inactivity. If this time is reached without any database activity, the database will automatically be put into the STOPPED state.
func (o LookupAutonomousDatabaseResultOutput) TimeReclamationOfFreeAutonomousDatabase() pulumi.StringOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) string { return v.TimeReclamationOfFreeAutonomousDatabase }).(pulumi.StringOutput)
}
// The storage space consumed by Autonomous Database in GBs.
func (o LookupAutonomousDatabaseResultOutput) UsedDataStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupAutonomousDatabaseResult) int { return v.UsedDataStorageSizeInGbs }).(pulumi.IntOutput)
}
// The amount of storage that has been used, in terabytes.
func (o LookupAutonomousDatabaseResultOutput) UsedDataStorageSizeInTbs() pulumi.IntOutput {
| 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/oracle/autonomousDatabaseCloneFromBackup.go | sdk/go/azure/oracle/autonomousDatabaseCloneFromBackup.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manage an autonomous database clone from backup.
//
// ## 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/oracle"
// "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("eastus"),
// })
// if err != nil {
// return err
// }
// exampleAutonomousDatabase, err := oracle.NewAutonomousDatabase(ctx, "example", &oracle.AutonomousDatabaseArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdminPassword: pulumi.String("BEstrO0ng_#11"),
// BackupRetentionPeriodInDays: pulumi.Int(7),
// CharacterSet: pulumi.String("AL32UTF8"),
// ComputeCount: pulumi.Float64(2),
// ComputeModel: pulumi.String("ECPU"),
// DataStorageSizeInTbs: pulumi.Int(1),
// DbVersion: pulumi.String("19c"),
// DbWorkload: pulumi.String("OLTP"),
// DisplayName: pulumi.String("Example"),
// LicenseModel: pulumi.String("LicenseIncluded"),
// AutoScalingEnabled: pulumi.Bool(false),
// AutoScalingForStorageEnabled: pulumi.Bool(true),
// MtlsConnectionRequired: pulumi.Bool(true),
// NationalCharacterSet: pulumi.String("AL16UTF16"),
// AllowedIps: pulumi.StringArray{},
// })
// if err != nil {
// return err
// }
// _, err = oracle.NewAutonomousDatabaseCloneFromBackup(ctx, "example", &oracle.AutonomousDatabaseCloneFromBackupArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleAutonomousDatabase.ResourceGroupName,
// Location: exampleAutonomousDatabase.Location,
// SourceAutonomousDatabaseId: exampleAutonomousDatabase.ID(),
// CloneType: pulumi.String("Metadata"),
// BackupTimestamp: pulumi.String("2025-09-23T02:22:13.000Z"),
// AdminPassword: pulumi.String("BEstrO0ng_#11"),
// BackupRetentionPeriodInDays: pulumi.Int(7),
// CharacterSet: pulumi.String("AL32UTF8"),
// ComputeCount: pulumi.Float64(2),
// ComputeModel: pulumi.String("ECPU"),
// DataStorageSizeInTb: pulumi.Int(1),
// DatabaseVersion: pulumi.String("19c"),
// DatabaseWorkload: pulumi.String("OLTP"),
// DisplayName: pulumi.String("ExampleClone"),
// LicenseModel: pulumi.String("LicenseIncluded"),
// AutoScalingEnabled: pulumi.Bool(false),
// AutoScalingForStorageEnabled: pulumi.Bool(true),
// MtlsConnectionRequired: pulumi.Bool(true),
// NationalCharacterSet: pulumi.String("AL16UTF16"),
// AllowedIpAddresses: pulumi.StringArray{},
// })
// 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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// autonomous database clone from backups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/autonomousDatabases/example
// ```
type AutonomousDatabaseCloneFromBackup struct {
pulumi.CustomResourceState
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin," regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword pulumi.StringOutput `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses pulumi.StringArrayOutput `pulumi:"allowedIpAddresses"`
// Indicates if auto-scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled pulumi.BoolOutput `pulumi:"autoScalingEnabled"`
// Indicates if auto-scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled pulumi.BoolOutput `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays pulumi.IntOutput `pulumi:"backupRetentionPeriodInDays"`
// The autonomous database backup time stamp to be used for a cloning autonomous database. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** If `backupTimestamp` is not provided latest backup timestamp will be used.
BackupTimestamp pulumi.StringPtrOutput `pulumi:"backupTimestamp"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet pulumi.StringOutput `pulumi:"characterSet"`
// The type of clone to create. Possible values are Full and Metadata. Changing this forces a new Autonomous Database Clone to be created.
CloneType pulumi.StringOutput `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount pulumi.Float64Output `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel pulumi.StringOutput `pulumi:"computeModel"`
// Specifies a list of customer contact email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts pulumi.StringArrayOutput `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb pulumi.IntOutput `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion pulumi.StringOutput `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP`, `DW`, `APEX`, and `AJD`. Changing this forces a new Autonomous Database Clone to be created.
//
// * OLTP: Indicates an Autonomous Transaction Processing database.
// * DW: Indicates an Autonomous Data Warehouse database.
// * AJD: Indicates an Autonomous JSON Database.
// * APEX: Indicates an Autonomous Database with the Oracle APEX Application Development workload type.
DatabaseWorkload pulumi.StringOutput `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel pulumi.StringOutput `pulumi:"licenseModel"`
// The Azure Region where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired pulumi.BoolOutput `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet pulumi.StringOutput `pulumi:"nationalCharacterSet"`
// The name of the Resource Group where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId pulumi.StringOutput `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"`
}
// NewAutonomousDatabaseCloneFromBackup registers a new resource with the given unique name, arguments, and options.
func NewAutonomousDatabaseCloneFromBackup(ctx *pulumi.Context,
name string, args *AutonomousDatabaseCloneFromBackupArgs, opts ...pulumi.ResourceOption) (*AutonomousDatabaseCloneFromBackup, 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.AutoScalingEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingEnabled'")
}
if args.AutoScalingForStorageEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingForStorageEnabled'")
}
if args.BackupRetentionPeriodInDays == nil {
return nil, errors.New("invalid value for required argument 'BackupRetentionPeriodInDays'")
}
if args.CharacterSet == nil {
return nil, errors.New("invalid value for required argument 'CharacterSet'")
}
if args.CloneType == nil {
return nil, errors.New("invalid value for required argument 'CloneType'")
}
if args.ComputeCount == nil {
return nil, errors.New("invalid value for required argument 'ComputeCount'")
}
if args.ComputeModel == nil {
return nil, errors.New("invalid value for required argument 'ComputeModel'")
}
if args.DataStorageSizeInTb == nil {
return nil, errors.New("invalid value for required argument 'DataStorageSizeInTb'")
}
if args.DatabaseVersion == nil {
return nil, errors.New("invalid value for required argument 'DatabaseVersion'")
}
if args.DatabaseWorkload == nil {
return nil, errors.New("invalid value for required argument 'DatabaseWorkload'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.LicenseModel == nil {
return nil, errors.New("invalid value for required argument 'LicenseModel'")
}
if args.MtlsConnectionRequired == nil {
return nil, errors.New("invalid value for required argument 'MtlsConnectionRequired'")
}
if args.NationalCharacterSet == nil {
return nil, errors.New("invalid value for required argument 'NationalCharacterSet'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SourceAutonomousDatabaseId == nil {
return nil, errors.New("invalid value for required argument 'SourceAutonomousDatabaseId'")
}
if args.AdminPassword != nil {
args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"adminPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutonomousDatabaseCloneFromBackup
err := ctx.RegisterResource("azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutonomousDatabaseCloneFromBackup gets an existing AutonomousDatabaseCloneFromBackup 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 GetAutonomousDatabaseCloneFromBackup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutonomousDatabaseCloneFromBackupState, opts ...pulumi.ResourceOption) (*AutonomousDatabaseCloneFromBackup, error) {
var resource AutonomousDatabaseCloneFromBackup
err := ctx.ReadResource("azure:oracle/autonomousDatabaseCloneFromBackup:AutonomousDatabaseCloneFromBackup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutonomousDatabaseCloneFromBackup resources.
type autonomousDatabaseCloneFromBackupState struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin," regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword *string `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Indicates if auto-scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled *bool `pulumi:"autoScalingEnabled"`
// Indicates if auto-scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled *bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays *int `pulumi:"backupRetentionPeriodInDays"`
// The autonomous database backup time stamp to be used for a cloning autonomous database. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** If `backupTimestamp` is not provided latest backup timestamp will be used.
BackupTimestamp *string `pulumi:"backupTimestamp"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet *string `pulumi:"characterSet"`
// The type of clone to create. Possible values are Full and Metadata. Changing this forces a new Autonomous Database Clone to be created.
CloneType *string `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount *float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel *string `pulumi:"computeModel"`
// Specifies a list of customer contact email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb *int `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion *string `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP`, `DW`, `APEX`, and `AJD`. Changing this forces a new Autonomous Database Clone to be created.
//
// * OLTP: Indicates an Autonomous Transaction Processing database.
// * DW: Indicates an Autonomous Data Warehouse database.
// * AJD: Indicates an Autonomous JSON Database.
// * APEX: Indicates an Autonomous Database with the Oracle APEX Application Development workload type.
DatabaseWorkload *string `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName *string `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel *string `pulumi:"licenseModel"`
// The Azure Region where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
Location *string `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired *bool `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Name *string `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet *string `pulumi:"nationalCharacterSet"`
// The name of the Resource Group where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId *string `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type AutonomousDatabaseCloneFromBackupState struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin," regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword pulumi.StringPtrInput
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses pulumi.StringArrayInput
// Indicates if auto-scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled pulumi.BoolPtrInput
// Indicates if auto-scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled pulumi.BoolPtrInput
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays pulumi.IntPtrInput
// The autonomous database backup time stamp to be used for a cloning autonomous database. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** If `backupTimestamp` is not provided latest backup timestamp will be used.
BackupTimestamp pulumi.StringPtrInput
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet pulumi.StringPtrInput
// The type of clone to create. Possible values are Full and Metadata. Changing this forces a new Autonomous Database Clone to be created.
CloneType pulumi.StringPtrInput
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount pulumi.Float64PtrInput
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel pulumi.StringPtrInput
// Specifies a list of customer contact email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts pulumi.StringArrayInput
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb pulumi.IntPtrInput
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion pulumi.StringPtrInput
// The Autonomous Database workload type. Possible values are `OLTP`, `DW`, `APEX`, and `AJD`. Changing this forces a new Autonomous Database Clone to be created.
//
// * OLTP: Indicates an Autonomous Transaction Processing database.
// * DW: Indicates an Autonomous Data Warehouse database.
// * AJD: Indicates an Autonomous JSON Database.
// * APEX: Indicates an Autonomous Database with the Oracle APEX Application Development workload type.
DatabaseWorkload pulumi.StringPtrInput
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName pulumi.StringPtrInput
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel pulumi.StringPtrInput
// The Azure Region where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
Location pulumi.StringPtrInput
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired pulumi.BoolPtrInput
// The name which should be used for this autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Name pulumi.StringPtrInput
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet pulumi.StringPtrInput
// The name of the Resource Group where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId pulumi.StringPtrInput
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Tags pulumi.StringMapInput
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (AutonomousDatabaseCloneFromBackupState) ElementType() reflect.Type {
return reflect.TypeOf((*autonomousDatabaseCloneFromBackupState)(nil)).Elem()
}
type autonomousDatabaseCloneFromBackupArgs struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin," regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword string `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Indicates if auto-scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Indicates if auto-scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
// The autonomous database backup time stamp to be used for a cloning autonomous database. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** If `backupTimestamp` is not provided latest backup timestamp will be used.
BackupTimestamp *string `pulumi:"backupTimestamp"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet string `pulumi:"characterSet"`
// The type of clone to create. Possible values are Full and Metadata. Changing this forces a new Autonomous Database Clone to be created.
CloneType string `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel string `pulumi:"computeModel"`
// Specifies a list of customer contact email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb int `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion string `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP`, `DW`, `APEX`, and `AJD`. Changing this forces a new Autonomous Database Clone to be created.
//
// * OLTP: Indicates an Autonomous Transaction Processing database.
// * DW: Indicates an Autonomous Data Warehouse database.
// * AJD: Indicates an Autonomous JSON Database.
// * APEX: Indicates an Autonomous Database with the Oracle APEX Application Development workload type.
DatabaseWorkload string `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName string `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel string `pulumi:"licenseModel"`
// The Azure Region where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
Location *string `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired bool `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Name *string `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet string `pulumi:"nationalCharacterSet"`
// The name of the Resource Group where the autonomous database clone from backup should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId string `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the autonomous database clone from backup. Changing this forces a new Autonomous Database Clone to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
// The set of arguments for constructing a AutonomousDatabaseCloneFromBackup resource.
type AutonomousDatabaseCloneFromBackupArgs struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin," regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword 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/oracle/getExadataInfrastructure.go | sdk/go/azure/oracle/getExadataInfrastructure.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 oracle
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 Cloud Exadata Infrastructure.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupExadataInfrastructure(ctx, &oracle.LookupExadataInfrastructureArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupExadataInfrastructure(ctx *pulumi.Context, args *LookupExadataInfrastructureArgs, opts ...pulumi.InvokeOption) (*LookupExadataInfrastructureResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupExadataInfrastructureResult
err := ctx.Invoke("azure:oracle/getExadataInfrastructure:getExadataInfrastructure", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getExadataInfrastructure.
type LookupExadataInfrastructureArgs struct {
// The name of this Cloud Exadata Infrastructure.
Name string `pulumi:"name"`
// The name of the Resource Group where the Cloud Exadata Infrastructure exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getExadataInfrastructure.
type LookupExadataInfrastructureResult struct {
// The requested number of additional storage servers activated for the Cloud Exadata Infrastructure.
ActivatedStorageCount int `pulumi:"activatedStorageCount"`
// The requested number of additional storage servers for the Cloud Exadata Infrastructure.
AdditionalStorageCount int `pulumi:"additionalStorageCount"`
// The available storage can be allocated to the Cloud Exadata Infrastructure resource, in gigabytes (GB).
AvailableStorageSizeInGbs int `pulumi:"availableStorageSizeInGbs"`
// The number of compute servers for the Cloud Exadata Infrastructure.
ComputeCount int `pulumi:"computeCount"`
// The compute model of the Exadata Infrastructure.
ComputeModel string `pulumi:"computeModel"`
// The total number of CPU cores allocated.
CpuCount int `pulumi:"cpuCount"`
// A `customerContacts` block as defined below.
CustomerContacts []string `pulumi:"customerContacts"`
// The data storage size in terabytes of the DATA disk group.
DataStorageSizeInTbs float64 `pulumi:"dataStorageSizeInTbs"`
// The database server model type of the cloud Exadata infrastructure resource.
DatabaseServerType string `pulumi:"databaseServerType"`
// The local node storage allocated in GBs.
DbNodeStorageSizeInGbs int `pulumi:"dbNodeStorageSizeInGbs"`
// The software version of the database servers (dom0) in the Cloud Exadata Infrastructure.
DbServerVersion string `pulumi:"dbServerVersion"`
// A `definedFileSystemConfiguration` block as defined below.
DefinedFileSystemConfigurations []GetExadataInfrastructureDefinedFileSystemConfiguration `pulumi:"definedFileSystemConfigurations"`
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique.
DisplayName string `pulumi:"displayName"`
// A `estimatedPatchingTime` block as defined below.
EstimatedPatchingTimes []GetExadataInfrastructureEstimatedPatchingTime `pulumi:"estimatedPatchingTimes"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance run.
LastMaintenanceRunId string `pulumi:"lastMaintenanceRunId"`
// Additional information about the current lifecycle state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// Cloud Exadata Infrastructure lifecycle state.
LifecycleState string `pulumi:"lifecycleState"`
// The Azure Region where the Cloud Exadata Infrastructure exists.
Location string `pulumi:"location"`
// A `maintenanceWindow` block as defined below.
MaintenanceWindows []GetExadataInfrastructureMaintenanceWindow `pulumi:"maintenanceWindows"`
// The total number of CPU cores available.
MaxCpuCount int `pulumi:"maxCpuCount"`
// The total available DATA disk group size.
MaxDataStorageInTbs float64 `pulumi:"maxDataStorageInTbs"`
// The total local node storage available in GBs.
MaxDbNodeStorageSizeInGbs int `pulumi:"maxDbNodeStorageSizeInGbs"`
// The total memory available in GBs.
MaxMemoryInGbs int `pulumi:"maxMemoryInGbs"`
// The memory allocated in GBs.
MemorySizeInGbs int `pulumi:"memorySizeInGbs"`
// The monthly software version of the database servers (dom0) in the Cloud Exadata Infrastructure.
MonthlyDbServerVersion string `pulumi:"monthlyDbServerVersion"`
// The monthly software version of the storage servers (cells) in the Cloud Exadata Infrastructure.
MonthlyStorageServerVersion string `pulumi:"monthlyStorageServerVersion"`
Name string `pulumi:"name"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
NextMaintenanceRunId string `pulumi:"nextMaintenanceRunId"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata Infrastructure.
Ocid string `pulumi:"ocid"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The model name of the Cloud Exadata Infrastructure resource.
Shape string `pulumi:"shape"`
// The number of storage servers for the Cloud Exadata Infrastructure.
StorageCount int `pulumi:"storageCount"`
// The storage server model type of the cloud Exadata infrastructure resource.
StorageServerType string `pulumi:"storageServerType"`
// The software version of the storage servers (cells) in the Cloud Exadata Infrastructure.
StorageServerVersion string `pulumi:"storageServerVersion"`
// A mapping of tags assigned to the Cloud Exadata Infrastructure.
Tags map[string]string `pulumi:"tags"`
// The date and time the Cloud Exadata Infrastructure resource was created.
TimeCreated string `pulumi:"timeCreated"`
// The total storage allocated to the Cloud Exadata Infrastructure resource, in gigabytes (GB).
TotalStorageSizeInGbs int `pulumi:"totalStorageSizeInGbs"`
// The Cloud Exadata Infrastructure Azure zones.
Zones []string `pulumi:"zones"`
}
func LookupExadataInfrastructureOutput(ctx *pulumi.Context, args LookupExadataInfrastructureOutputArgs, opts ...pulumi.InvokeOption) LookupExadataInfrastructureResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupExadataInfrastructureResultOutput, error) {
args := v.(LookupExadataInfrastructureArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getExadataInfrastructure:getExadataInfrastructure", args, LookupExadataInfrastructureResultOutput{}, options).(LookupExadataInfrastructureResultOutput), nil
}).(LookupExadataInfrastructureResultOutput)
}
// A collection of arguments for invoking getExadataInfrastructure.
type LookupExadataInfrastructureOutputArgs struct {
// The name of this Cloud Exadata Infrastructure.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Cloud Exadata Infrastructure exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupExadataInfrastructureOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupExadataInfrastructureArgs)(nil)).Elem()
}
// A collection of values returned by getExadataInfrastructure.
type LookupExadataInfrastructureResultOutput struct{ *pulumi.OutputState }
func (LookupExadataInfrastructureResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupExadataInfrastructureResult)(nil)).Elem()
}
func (o LookupExadataInfrastructureResultOutput) ToLookupExadataInfrastructureResultOutput() LookupExadataInfrastructureResultOutput {
return o
}
func (o LookupExadataInfrastructureResultOutput) ToLookupExadataInfrastructureResultOutputWithContext(ctx context.Context) LookupExadataInfrastructureResultOutput {
return o
}
// The requested number of additional storage servers activated for the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) ActivatedStorageCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.ActivatedStorageCount }).(pulumi.IntOutput)
}
// The requested number of additional storage servers for the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) AdditionalStorageCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.AdditionalStorageCount }).(pulumi.IntOutput)
}
// The available storage can be allocated to the Cloud Exadata Infrastructure resource, in gigabytes (GB).
func (o LookupExadataInfrastructureResultOutput) AvailableStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.AvailableStorageSizeInGbs }).(pulumi.IntOutput)
}
// The number of compute servers for the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) ComputeCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.ComputeCount }).(pulumi.IntOutput)
}
// The compute model of the Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) ComputeModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.ComputeModel }).(pulumi.StringOutput)
}
// The total number of CPU cores allocated.
func (o LookupExadataInfrastructureResultOutput) CpuCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.CpuCount }).(pulumi.IntOutput)
}
// A `customerContacts` block as defined below.
func (o LookupExadataInfrastructureResultOutput) CustomerContacts() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) []string { return v.CustomerContacts }).(pulumi.StringArrayOutput)
}
// The data storage size in terabytes of the DATA disk group.
func (o LookupExadataInfrastructureResultOutput) DataStorageSizeInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupExadataInfrastructureResult) float64 { return v.DataStorageSizeInTbs }).(pulumi.Float64Output)
}
// The database server model type of the cloud Exadata infrastructure resource.
func (o LookupExadataInfrastructureResultOutput) DatabaseServerType() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.DatabaseServerType }).(pulumi.StringOutput)
}
// The local node storage allocated in GBs.
func (o LookupExadataInfrastructureResultOutput) DbNodeStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.DbNodeStorageSizeInGbs }).(pulumi.IntOutput)
}
// The software version of the database servers (dom0) in the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) DbServerVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.DbServerVersion }).(pulumi.StringOutput)
}
// A `definedFileSystemConfiguration` block as defined below.
func (o LookupExadataInfrastructureResultOutput) DefinedFileSystemConfigurations() GetExadataInfrastructureDefinedFileSystemConfigurationArrayOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) []GetExadataInfrastructureDefinedFileSystemConfiguration {
return v.DefinedFileSystemConfigurations
}).(GetExadataInfrastructureDefinedFileSystemConfigurationArrayOutput)
}
// The user-friendly name for the Cloud Exadata Infrastructure resource. The name does not need to be unique.
func (o LookupExadataInfrastructureResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// A `estimatedPatchingTime` block as defined below.
func (o LookupExadataInfrastructureResultOutput) EstimatedPatchingTimes() GetExadataInfrastructureEstimatedPatchingTimeArrayOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) []GetExadataInfrastructureEstimatedPatchingTime {
return v.EstimatedPatchingTimes
}).(GetExadataInfrastructureEstimatedPatchingTimeArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupExadataInfrastructureResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.Id }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance run.
func (o LookupExadataInfrastructureResultOutput) LastMaintenanceRunId() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.LastMaintenanceRunId }).(pulumi.StringOutput)
}
// Additional information about the current lifecycle state.
func (o LookupExadataInfrastructureResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// Cloud Exadata Infrastructure lifecycle state.
func (o LookupExadataInfrastructureResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// The Azure Region where the Cloud Exadata Infrastructure exists.
func (o LookupExadataInfrastructureResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.Location }).(pulumi.StringOutput)
}
// A `maintenanceWindow` block as defined below.
func (o LookupExadataInfrastructureResultOutput) MaintenanceWindows() GetExadataInfrastructureMaintenanceWindowArrayOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) []GetExadataInfrastructureMaintenanceWindow {
return v.MaintenanceWindows
}).(GetExadataInfrastructureMaintenanceWindowArrayOutput)
}
// The total number of CPU cores available.
func (o LookupExadataInfrastructureResultOutput) MaxCpuCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.MaxCpuCount }).(pulumi.IntOutput)
}
// The total available DATA disk group size.
func (o LookupExadataInfrastructureResultOutput) MaxDataStorageInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupExadataInfrastructureResult) float64 { return v.MaxDataStorageInTbs }).(pulumi.Float64Output)
}
// The total local node storage available in GBs.
func (o LookupExadataInfrastructureResultOutput) MaxDbNodeStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.MaxDbNodeStorageSizeInGbs }).(pulumi.IntOutput)
}
// The total memory available in GBs.
func (o LookupExadataInfrastructureResultOutput) MaxMemoryInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.MaxMemoryInGbs }).(pulumi.IntOutput)
}
// The memory allocated in GBs.
func (o LookupExadataInfrastructureResultOutput) MemorySizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.MemorySizeInGbs }).(pulumi.IntOutput)
}
// The monthly software version of the database servers (dom0) in the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) MonthlyDbServerVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.MonthlyDbServerVersion }).(pulumi.StringOutput)
}
// The monthly software version of the storage servers (cells) in the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) MonthlyStorageServerVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.MonthlyStorageServerVersion }).(pulumi.StringOutput)
}
func (o LookupExadataInfrastructureResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.Name }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
func (o LookupExadataInfrastructureResultOutput) NextMaintenanceRunId() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.NextMaintenanceRunId }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupExadataInfrastructureResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.Ocid }).(pulumi.StringOutput)
}
func (o LookupExadataInfrastructureResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The model name of the Cloud Exadata Infrastructure resource.
func (o LookupExadataInfrastructureResultOutput) Shape() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.Shape }).(pulumi.StringOutput)
}
// The number of storage servers for the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) StorageCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.StorageCount }).(pulumi.IntOutput)
}
// The storage server model type of the cloud Exadata infrastructure resource.
func (o LookupExadataInfrastructureResultOutput) StorageServerType() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.StorageServerType }).(pulumi.StringOutput)
}
// The software version of the storage servers (cells) in the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) StorageServerVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.StorageServerVersion }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Cloud Exadata Infrastructure.
func (o LookupExadataInfrastructureResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The date and time the Cloud Exadata Infrastructure resource was created.
func (o LookupExadataInfrastructureResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The total storage allocated to the Cloud Exadata Infrastructure resource, in gigabytes (GB).
func (o LookupExadataInfrastructureResultOutput) TotalStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) int { return v.TotalStorageSizeInGbs }).(pulumi.IntOutput)
}
// The Cloud Exadata Infrastructure Azure zones.
func (o LookupExadataInfrastructureResultOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupExadataInfrastructureResult) []string { return v.Zones }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupExadataInfrastructureResultOutput{})
}
| 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/oracle/autonomousDatabaseCloneFromDatabase.go | sdk/go/azure/oracle/autonomousDatabaseCloneFromDatabase.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 oracle
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an autonomous database clone from database.
//
// ## 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/oracle"
// "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("eastus"),
// })
// if err != nil {
// return err
// }
// exampleAutonomousDatabase, err := oracle.NewAutonomousDatabase(ctx, "example", &oracle.AutonomousDatabaseArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdminPassword: pulumi.String("BEstrO0ng_#11"),
// BackupRetentionPeriodInDays: pulumi.Int(7),
// CharacterSet: pulumi.String("AL32UTF8"),
// ComputeCount: pulumi.Float64(2),
// ComputeModel: pulumi.String("ECPU"),
// DataStorageSizeInTbs: pulumi.Int(1),
// DbVersion: pulumi.String("19c"),
// DbWorkload: pulumi.String("OLTP"),
// DisplayName: pulumi.String("Example"),
// LicenseModel: pulumi.String("LicenseIncluded"),
// AutoScalingEnabled: pulumi.Bool(false),
// AutoScalingForStorageEnabled: pulumi.Bool(true),
// MtlsConnectionRequired: pulumi.Bool(true),
// NationalCharacterSet: pulumi.String("AL16UTF16"),
// AllowedIps: pulumi.StringArray{},
// })
// if err != nil {
// return err
// }
// _, err = oracle.NewAutonomousDatabaseCloneFromDatabase(ctx, "example", &oracle.AutonomousDatabaseCloneFromDatabaseArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleAutonomousDatabase.ResourceGroupName,
// Location: exampleAutonomousDatabase.Location,
// SourceAutonomousDatabaseId: exampleAutonomousDatabase.ID(),
// CloneType: pulumi.String("Full"),
// AdminPassword: pulumi.String("BEstrO0ng_#11"),
// BackupRetentionPeriodInDays: pulumi.Int(7),
// CharacterSet: pulumi.String("AL32UTF8"),
// ComputeCount: pulumi.Float64(2),
// ComputeModel: pulumi.String("ECPU"),
// DataStorageSizeInTb: pulumi.Int(1),
// DatabaseVersion: pulumi.String("19c"),
// DatabaseWorkload: pulumi.String("OLTP"),
// DisplayName: pulumi.String("ExampleClone"),
// LicenseModel: pulumi.String("LicenseIncluded"),
// AutoScalingEnabled: pulumi.Bool(false),
// AutoScalingForStorageEnabled: pulumi.Bool(true),
// MtlsConnectionRequired: pulumi.Bool(true),
// NationalCharacterSet: pulumi.String("AL16UTF16"),
// AllowedIpAddresses: pulumi.StringArray{},
// })
// 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:
//
// * `Oracle.Database` - 2025-09-01
//
// ## Import
//
// autonomous database clone from databases can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:oracle/autonomousDatabaseCloneFromDatabase:AutonomousDatabaseCloneFromDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Oracle.Database/autonomousDatabases/example
// ```
type AutonomousDatabaseCloneFromDatabase struct {
pulumi.CustomResourceState
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (`"`) or the username "admin", regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword pulumi.StringOutput `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses pulumi.StringArrayOutput `pulumi:"allowedIpAddresses"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled pulumi.BoolOutput `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled pulumi.BoolOutput `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays pulumi.IntOutput `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet pulumi.StringOutput `pulumi:"characterSet"`
// The type of clone to create. Possible values are `Full` and `Metadata`. Changing this forces a new Autonomous Database Clone to be created.
CloneType pulumi.StringOutput `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount pulumi.Float64Output `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel pulumi.StringOutput `pulumi:"computeModel"`
// Specifies a list of customer contacts as email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts pulumi.StringArrayOutput `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb pulumi.IntOutput `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion pulumi.StringOutput `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP` and `DW`, `APEX`, `AJD`. Changing this forces a new Autonomous Database Clone to be created.
// * OLTP - indicates an Autonomous Transaction Processing database
// * DW - indicates an Autonomous Data Warehouse database
// * AJD - indicates an Autonomous JSON Database
// * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type.
//
// > **Note:** To clone the database with a different `databaseWorkload` type, please refer to the documentation [here](https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/autonomous-database-serverless/doc/autonomous-clone-cross-workload-type.html#GUID-527A712D-FF82-498B-AB35-8A1623E36EDD) for correct configuration steps.
DatabaseWorkload pulumi.StringOutput `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel pulumi.StringOutput `pulumi:"licenseModel"`
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database Clone to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired pulumi.BoolOutput `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from database. Changing this forces a new Autonomous Database Clone to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet pulumi.StringOutput `pulumi:"nationalCharacterSet"`
// The refreshable model for the clone. Possible values are `Automatic` and `Manual`. Changing this forces a new Autonomous Database Clone to be created.
RefreshableModel pulumi.StringPtrOutput `pulumi:"refreshableModel"`
// The name of the Resource Group where the autonomous database clone from database should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId pulumi.StringOutput `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the Autonomous Database Clone. Changing this forces a new Autonomous Database Clone to be created.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId pulumi.StringPtrOutput `pulumi:"virtualNetworkId"`
}
// NewAutonomousDatabaseCloneFromDatabase registers a new resource with the given unique name, arguments, and options.
func NewAutonomousDatabaseCloneFromDatabase(ctx *pulumi.Context,
name string, args *AutonomousDatabaseCloneFromDatabaseArgs, opts ...pulumi.ResourceOption) (*AutonomousDatabaseCloneFromDatabase, 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.AutoScalingEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingEnabled'")
}
if args.AutoScalingForStorageEnabled == nil {
return nil, errors.New("invalid value for required argument 'AutoScalingForStorageEnabled'")
}
if args.BackupRetentionPeriodInDays == nil {
return nil, errors.New("invalid value for required argument 'BackupRetentionPeriodInDays'")
}
if args.CharacterSet == nil {
return nil, errors.New("invalid value for required argument 'CharacterSet'")
}
if args.CloneType == nil {
return nil, errors.New("invalid value for required argument 'CloneType'")
}
if args.ComputeCount == nil {
return nil, errors.New("invalid value for required argument 'ComputeCount'")
}
if args.ComputeModel == nil {
return nil, errors.New("invalid value for required argument 'ComputeModel'")
}
if args.DataStorageSizeInTb == nil {
return nil, errors.New("invalid value for required argument 'DataStorageSizeInTb'")
}
if args.DatabaseVersion == nil {
return nil, errors.New("invalid value for required argument 'DatabaseVersion'")
}
if args.DatabaseWorkload == nil {
return nil, errors.New("invalid value for required argument 'DatabaseWorkload'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.LicenseModel == nil {
return nil, errors.New("invalid value for required argument 'LicenseModel'")
}
if args.MtlsConnectionRequired == nil {
return nil, errors.New("invalid value for required argument 'MtlsConnectionRequired'")
}
if args.NationalCharacterSet == nil {
return nil, errors.New("invalid value for required argument 'NationalCharacterSet'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SourceAutonomousDatabaseId == nil {
return nil, errors.New("invalid value for required argument 'SourceAutonomousDatabaseId'")
}
if args.AdminPassword != nil {
args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"adminPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutonomousDatabaseCloneFromDatabase
err := ctx.RegisterResource("azure:oracle/autonomousDatabaseCloneFromDatabase:AutonomousDatabaseCloneFromDatabase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutonomousDatabaseCloneFromDatabase gets an existing AutonomousDatabaseCloneFromDatabase 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 GetAutonomousDatabaseCloneFromDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutonomousDatabaseCloneFromDatabaseState, opts ...pulumi.ResourceOption) (*AutonomousDatabaseCloneFromDatabase, error) {
var resource AutonomousDatabaseCloneFromDatabase
err := ctx.ReadResource("azure:oracle/autonomousDatabaseCloneFromDatabase:AutonomousDatabaseCloneFromDatabase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutonomousDatabaseCloneFromDatabase resources.
type autonomousDatabaseCloneFromDatabaseState struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (`"`) or the username "admin", regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword *string `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled *bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled *bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays *int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet *string `pulumi:"characterSet"`
// The type of clone to create. Possible values are `Full` and `Metadata`. Changing this forces a new Autonomous Database Clone to be created.
CloneType *string `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount *float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel *string `pulumi:"computeModel"`
// Specifies a list of customer contacts as email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb *int `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion *string `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP` and `DW`, `APEX`, `AJD`. Changing this forces a new Autonomous Database Clone to be created.
// * OLTP - indicates an Autonomous Transaction Processing database
// * DW - indicates an Autonomous Data Warehouse database
// * AJD - indicates an Autonomous JSON Database
// * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type.
//
// > **Note:** To clone the database with a different `databaseWorkload` type, please refer to the documentation [here](https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/autonomous-database-serverless/doc/autonomous-clone-cross-workload-type.html#GUID-527A712D-FF82-498B-AB35-8A1623E36EDD) for correct configuration steps.
DatabaseWorkload *string `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName *string `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel *string `pulumi:"licenseModel"`
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database Clone to be created.
Location *string `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired *bool `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from database. Changing this forces a new Autonomous Database Clone to be created.
Name *string `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet *string `pulumi:"nationalCharacterSet"`
// The refreshable model for the clone. Possible values are `Automatic` and `Manual`. Changing this forces a new Autonomous Database Clone to be created.
RefreshableModel *string `pulumi:"refreshableModel"`
// The name of the Resource Group where the autonomous database clone from database should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId *string `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the Autonomous Database Clone. Changing this forces a new Autonomous Database Clone to be created.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type AutonomousDatabaseCloneFromDatabaseState struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (`"`) or the username "admin", regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword pulumi.StringPtrInput
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses pulumi.StringArrayInput
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled pulumi.BoolPtrInput
// Indicates if auto scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled pulumi.BoolPtrInput
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays pulumi.IntPtrInput
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet pulumi.StringPtrInput
// The type of clone to create. Possible values are `Full` and `Metadata`. Changing this forces a new Autonomous Database Clone to be created.
CloneType pulumi.StringPtrInput
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount pulumi.Float64PtrInput
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel pulumi.StringPtrInput
// Specifies a list of customer contacts as email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts pulumi.StringArrayInput
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb pulumi.IntPtrInput
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion pulumi.StringPtrInput
// The Autonomous Database workload type. Possible values are `OLTP` and `DW`, `APEX`, `AJD`. Changing this forces a new Autonomous Database Clone to be created.
// * OLTP - indicates an Autonomous Transaction Processing database
// * DW - indicates an Autonomous Data Warehouse database
// * AJD - indicates an Autonomous JSON Database
// * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type.
//
// > **Note:** To clone the database with a different `databaseWorkload` type, please refer to the documentation [here](https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/autonomous-database-serverless/doc/autonomous-clone-cross-workload-type.html#GUID-527A712D-FF82-498B-AB35-8A1623E36EDD) for correct configuration steps.
DatabaseWorkload pulumi.StringPtrInput
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName pulumi.StringPtrInput
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel pulumi.StringPtrInput
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database Clone to be created.
Location pulumi.StringPtrInput
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired pulumi.BoolPtrInput
// The name which should be used for this autonomous database clone from database. Changing this forces a new Autonomous Database Clone to be created.
Name pulumi.StringPtrInput
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet pulumi.StringPtrInput
// The refreshable model for the clone. Possible values are `Automatic` and `Manual`. Changing this forces a new Autonomous Database Clone to be created.
RefreshableModel pulumi.StringPtrInput
// The name of the Resource Group where the autonomous database clone from database should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId pulumi.StringPtrInput
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the Autonomous Database Clone. Changing this forces a new Autonomous Database Clone to be created.
Tags pulumi.StringMapInput
// The ID of the Virtual Network this Autonomous Database Clone should be created in. Changing this forces a new Autonomous Database Clone to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (AutonomousDatabaseCloneFromDatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*autonomousDatabaseCloneFromDatabaseState)(nil)).Elem()
}
type autonomousDatabaseCloneFromDatabaseArgs struct {
// The password for the SYS, SYSTEM, and PDB Admin users. The password must be at least 12 characters long, and contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (`"`) or the username "admin", regardless of casing. Changing this forces a new Autonomous Database Clone to be created.
AdminPassword string `pulumi:"adminPassword"`
// Defines the network access type for the Autonomous Database. If the property is explicitly set to an empty list, it allows secure public access to the database from any IP address. If specific ACL (Access Control List) values are provided, access will be restricted to only the specified IP addresses. Changing this forces a new Autonomous Database Clone to be created.
AllowedIpAddresses []string `pulumi:"allowedIpAddresses"`
// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingEnabled bool `pulumi:"autoScalingEnabled"`
// Indicates if auto scaling is enabled for the Autonomous Database storage. Changing this forces a new Autonomous Database Clone to be created.
AutoScalingForStorageEnabled bool `pulumi:"autoScalingForStorageEnabled"`
// Retention period, in days, for backups. Possible values range between `1` and `60`. Changing this forces a new Autonomous Database Clone to be created.
BackupRetentionPeriodInDays int `pulumi:"backupRetentionPeriodInDays"`
// The character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
CharacterSet string `pulumi:"characterSet"`
// The type of clone to create. Possible values are `Full` and `Metadata`. Changing this forces a new Autonomous Database Clone to be created.
CloneType string `pulumi:"cloneType"`
// The compute amount (CPUs) available to the database. Possible values range between `2.0` and `512.0`. Changing this forces a new Autonomous Database Clone to be created.
ComputeCount float64 `pulumi:"computeCount"`
// The compute model of the Autonomous Database. Possible values are `ECPU` and `OCPU`. Changing this forces a new Autonomous Database Clone to be created.
//
// > **Note:** `ECPU` compute model is the recommended model and `OCPU` compute model is legacy.
ComputeModel string `pulumi:"computeModel"`
// Specifies a list of customer contacts as email addresses. Changing this forces a new Autonomous Database Clone to be created.
CustomerContacts []string `pulumi:"customerContacts"`
// The maximum storage that can be allocated for the database, in terabytes. Possible values range between `1` and `384`. Changing this forces a new Autonomous Database Clone to be created.
DataStorageSizeInTb int `pulumi:"dataStorageSizeInTb"`
// A valid Oracle Database version for Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DatabaseVersion string `pulumi:"databaseVersion"`
// The Autonomous Database workload type. Possible values are `OLTP` and `DW`, `APEX`, `AJD`. Changing this forces a new Autonomous Database Clone to be created.
// * OLTP - indicates an Autonomous Transaction Processing database
// * DW - indicates an Autonomous Data Warehouse database
// * AJD - indicates an Autonomous JSON Database
// * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type.
//
// > **Note:** To clone the database with a different `databaseWorkload` type, please refer to the documentation [here](https://docs.public.oneportal.content.oci.oraclecloud.com/iaas/autonomous-database-serverless/doc/autonomous-clone-cross-workload-type.html#GUID-527A712D-FF82-498B-AB35-8A1623E36EDD) for correct configuration steps.
DatabaseWorkload string `pulumi:"databaseWorkload"`
// The user-friendly name for the Autonomous Database. Changing this forces a new Autonomous Database Clone to be created.
DisplayName string `pulumi:"displayName"`
// The Oracle license model that applies to the Oracle Autonomous Database. Possible values are `LicenseIncluded` and `BringYourOwnLicense`. Changing this forces a new Autonomous Database Clone to be created.
LicenseModel string `pulumi:"licenseModel"`
// The Azure Region where the Autonomous Database should exist. Changing this forces a new Autonomous Database Clone to be created.
Location *string `pulumi:"location"`
// Specifies if the Autonomous Database requires mTLS connections. Changing this forces a new Autonomous Database Clone to be created.
MtlsConnectionRequired bool `pulumi:"mtlsConnectionRequired"`
// The name which should be used for this autonomous database clone from database. Changing this forces a new Autonomous Database Clone to be created.
Name *string `pulumi:"name"`
// The national character set for the autonomous database. Changing this forces a new Autonomous Database Clone to be created.
NationalCharacterSet string `pulumi:"nationalCharacterSet"`
// The refreshable model for the clone. Possible values are `Automatic` and `Manual`. Changing this forces a new Autonomous Database Clone to be created.
RefreshableModel *string `pulumi:"refreshableModel"`
// The name of the Resource Group where the autonomous database clone from database should exist. Changing this forces a new Autonomous Database Clone to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the source Autonomous Database to clone from. Changing this forces a new Autonomous Database Clone to be created.
SourceAutonomousDatabaseId string `pulumi:"sourceAutonomousDatabaseId"`
// The ID of the subnet the resource is associated with. Changing this forces a new Autonomous Database Clone to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the Autonomous Database Clone. Changing this forces a new Autonomous Database Clone 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/oracle/getDbNodes.go | sdk/go/azure/oracle/getDbNodes.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 oracle
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Lists the database nodes for the specified Cloud VM Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.GetDbNodes(ctx, &oracle.GetDbNodesArgs{
// CloudVmClusterId: "existing",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("example", example)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Oracle.Database` - 2025-09-01
func GetDbNodes(ctx *pulumi.Context, args *GetDbNodesArgs, opts ...pulumi.InvokeOption) (*GetDbNodesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDbNodesResult
err := ctx.Invoke("azure:oracle/getDbNodes:getDbNodes", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDbNodes.
type GetDbNodesArgs struct {
// The id of the Cloud VM cluster.
CloudVmClusterId string `pulumi:"cloudVmClusterId"`
}
// A collection of values returned by getDbNodes.
type GetDbNodesResult struct {
CloudVmClusterId string `pulumi:"cloudVmClusterId"`
// A `dbNodes` block as defined below.
DbNodes []GetDbNodesDbNode `pulumi:"dbNodes"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
}
func GetDbNodesOutput(ctx *pulumi.Context, args GetDbNodesOutputArgs, opts ...pulumi.InvokeOption) GetDbNodesResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDbNodesResultOutput, error) {
args := v.(GetDbNodesArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getDbNodes:getDbNodes", args, GetDbNodesResultOutput{}, options).(GetDbNodesResultOutput), nil
}).(GetDbNodesResultOutput)
}
// A collection of arguments for invoking getDbNodes.
type GetDbNodesOutputArgs struct {
// The id of the Cloud VM cluster.
CloudVmClusterId pulumi.StringInput `pulumi:"cloudVmClusterId"`
}
func (GetDbNodesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbNodesArgs)(nil)).Elem()
}
// A collection of values returned by getDbNodes.
type GetDbNodesResultOutput struct{ *pulumi.OutputState }
func (GetDbNodesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDbNodesResult)(nil)).Elem()
}
func (o GetDbNodesResultOutput) ToGetDbNodesResultOutput() GetDbNodesResultOutput {
return o
}
func (o GetDbNodesResultOutput) ToGetDbNodesResultOutputWithContext(ctx context.Context) GetDbNodesResultOutput {
return o
}
func (o GetDbNodesResultOutput) CloudVmClusterId() pulumi.StringOutput {
return o.ApplyT(func(v GetDbNodesResult) string { return v.CloudVmClusterId }).(pulumi.StringOutput)
}
// A `dbNodes` block as defined below.
func (o GetDbNodesResultOutput) DbNodes() GetDbNodesDbNodeArrayOutput {
return o.ApplyT(func(v GetDbNodesResult) []GetDbNodesDbNode { return v.DbNodes }).(GetDbNodesDbNodeArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetDbNodesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDbNodesResult) string { return v.Id }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetDbNodesResultOutput{})
}
| 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/oracle/getCloudVmCluster.go | sdk/go/azure/oracle/getCloudVmCluster.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 oracle
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 Cloud VM Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupCloudVmCluster(ctx, &oracle.LookupCloudVmClusterArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupCloudVmCluster(ctx *pulumi.Context, args *LookupCloudVmClusterArgs, opts ...pulumi.InvokeOption) (*LookupCloudVmClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupCloudVmClusterResult
err := ctx.Invoke("azure:oracle/getCloudVmCluster:getCloudVmCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCloudVmCluster.
type LookupCloudVmClusterArgs struct {
// The name of this Cloud VM Cluster.
Name string `pulumi:"name"`
// The name of the Resource Group where the Cloud VM Cluster exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCloudVmCluster.
type LookupCloudVmClusterResult struct {
// Client OCI backup subnet CIDR, default is `192.168.252.0/22`.
BackupSubnetCidr string `pulumi:"backupSubnetCidr"`
// The Cloud Exadata Infrastructure ID.
CloudExadataInfrastructureId string `pulumi:"cloudExadataInfrastructureId"`
// The cluster name for Cloud VM Cluster.
ClusterName string `pulumi:"clusterName"`
// The OCID of the compartment.
CompartmentId string `pulumi:"compartmentId"`
// The compute model of the Exadata Infrastructure.
ComputeModel string `pulumi:"computeModel"`
// A `computeNodes` block as defined below.
ComputeNodes []string `pulumi:"computeNodes"`
// The number of CPU cores enabled on the Cloud VM Cluster.
CpuCoreCount int `pulumi:"cpuCoreCount"`
// A `dataCollectionOptions` block as defined below.
DataCollectionOptions []GetCloudVmClusterDataCollectionOption `pulumi:"dataCollectionOptions"`
// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60`, and 80. The default is `80` percent assigned to DATA storage. See [Storage Configuration](https://docs.oracle.com/en-us/iaas/exadatacloud/index.html#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage.
DataStoragePercentage int `pulumi:"dataStoragePercentage"`
// The data disk group size to be allocated in TBs.
DataStorageSizeInTbs float64 `pulumi:"dataStorageSizeInTbs"`
// The local node storage to be allocated in GBs.
DbNodeStorageSizeInGbs int `pulumi:"dbNodeStorageSizeInGbs"`
// A `dbServers` block as defined below.
DbServers []string `pulumi:"dbServers"`
// The type of redundancy configured for the Cloud Vm Cluster. `NORMAL` is 2-way redundancy. `HIGH` is 3-way redundancy.
DiskRedundancy string `pulumi:"diskRedundancy"`
// The user-friendly name for the Cloud VM Cluster. The name does not need to be unique.
DisplayName string `pulumi:"displayName"`
// The domain name for the Cloud VM Cluster.
Domain string `pulumi:"domain"`
// A `fileSystemConfiguration` block as defined below.
FileSystemConfigurations []GetCloudVmClusterFileSystemConfiguration `pulumi:"fileSystemConfigurations"`
// A valid Oracle Grid Infrastructure (GI) software version.
GiVersion string `pulumi:"giVersion"`
// The hostname for the Cloud VM Cluster without suffix.
Hostname string `pulumi:"hostname"`
// The hostname for the Cloud VM Cluster with suffix.
HostnameActual string `pulumi:"hostnameActual"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `iormConfigCache` block as defined below.
IormConfigCaches []GetCloudVmClusterIormConfigCache `pulumi:"iormConfigCaches"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts.
LastUpdateHistoryEntryId string `pulumi:"lastUpdateHistoryEntryId"`
// The Oracle license model that applies to the Cloud VM Cluster.
LicenseModel string `pulumi:"licenseModel"`
// Additional information about the current `lifecycleState`.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// The current state of IORM configuration for the Exadata DB system.
LifecycleState string `pulumi:"lifecycleState"`
// The port number configured for the listener on the Cloud VM Cluster.
ListenerPort int `pulumi:"listenerPort"`
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If false, database backup on local Exadata storage is not available in the Cloud VM Cluster.
LocalBackupEnabled bool `pulumi:"localBackupEnabled"`
// The Azure Region where the Cloud VM Cluster exists.
Location string `pulumi:"location"`
// The memory to be allocated in GBs.
MemorySizeInGbs int `pulumi:"memorySizeInGbs"`
Name string `pulumi:"name"`
// The number of nodes in the Cloud VM Cluster.
NodeCount int `pulumi:"nodeCount"`
// The list of [OCIDs](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/securityrules.htm). NsgIds restrictions:
// * A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty.
NsgUrl string `pulumi:"nsgUrl"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.
Ocid string `pulumi:"ocid"`
// The number of OCPU cores to enable on the Cloud VM Cluster. Only 1 decimal place is allowed for the fractional part.
OcpuCount float64 `pulumi:"ocpuCount"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Cloud VM Cluster.
ScanDnsName string `pulumi:"scanDnsName"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Cloud VM Cluster.
ScanDnsRecordId string `pulumi:"scanDnsRecordId"`
// A `scanIpIds` block as defined below.
ScanIpIds []string `pulumi:"scanIpIds"`
// The TCP Single Client Access Name (SCAN) port. The default port is 1521.
ScanListenerPortTcp int `pulumi:"scanListenerPortTcp"`
// The TCPS Single Client Access Name (SCAN) port. The default port is 2484.
ScanListenerPortTcpSsl int `pulumi:"scanListenerPortTcpSsl"`
// The model name of the Exadata hardware running the Cloud VM Cluster.
Shape string `pulumi:"shape"`
// If true, sparse disk group is configured for the Cloud VM Cluster. If false, sparse disk group is not created.
SparseDiskgroupEnabled bool `pulumi:"sparseDiskgroupEnabled"`
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster.
SshPublicKeys []string `pulumi:"sshPublicKeys"`
// The storage allocation for the disk group, in gigabytes (GB).
StorageSizeInGbs int `pulumi:"storageSizeInGbs"`
// The ID of the Azure Resource Manager subnet resource.
SubnetId string `pulumi:"subnetId"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Cloud VM Cluster.
SubnetOcid string `pulumi:"subnetOcid"`
// Operating system version of the image.
SystemVersion string `pulumi:"systemVersion"`
// A mapping of tags assigned to the Cloud VM Cluster.
Tags map[string]string `pulumi:"tags"`
// The date and time that the Cloud VM Cluster was created.
TimeCreated string `pulumi:"timeCreated"`
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.oracle.com/en-us/iaas/base-database/doc/manage-time-zone.html).
TimeZone string `pulumi:"timeZone"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Cloud VM Cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the Cluster.
VipOds []string `pulumi:"vipOds"`
// The ID to an Azure Resource Manager Virtual Network resource.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the zone the Cloud VM Cluster is associated with.
ZoneId string `pulumi:"zoneId"`
}
func LookupCloudVmClusterOutput(ctx *pulumi.Context, args LookupCloudVmClusterOutputArgs, opts ...pulumi.InvokeOption) LookupCloudVmClusterResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupCloudVmClusterResultOutput, error) {
args := v.(LookupCloudVmClusterArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getCloudVmCluster:getCloudVmCluster", args, LookupCloudVmClusterResultOutput{}, options).(LookupCloudVmClusterResultOutput), nil
}).(LookupCloudVmClusterResultOutput)
}
// A collection of arguments for invoking getCloudVmCluster.
type LookupCloudVmClusterOutputArgs struct {
// The name of this Cloud VM Cluster.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Cloud VM Cluster exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupCloudVmClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCloudVmClusterArgs)(nil)).Elem()
}
// A collection of values returned by getCloudVmCluster.
type LookupCloudVmClusterResultOutput struct{ *pulumi.OutputState }
func (LookupCloudVmClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCloudVmClusterResult)(nil)).Elem()
}
func (o LookupCloudVmClusterResultOutput) ToLookupCloudVmClusterResultOutput() LookupCloudVmClusterResultOutput {
return o
}
func (o LookupCloudVmClusterResultOutput) ToLookupCloudVmClusterResultOutputWithContext(ctx context.Context) LookupCloudVmClusterResultOutput {
return o
}
// Client OCI backup subnet CIDR, default is `192.168.252.0/22`.
func (o LookupCloudVmClusterResultOutput) BackupSubnetCidr() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.BackupSubnetCidr }).(pulumi.StringOutput)
}
// The Cloud Exadata Infrastructure ID.
func (o LookupCloudVmClusterResultOutput) CloudExadataInfrastructureId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.CloudExadataInfrastructureId }).(pulumi.StringOutput)
}
// The cluster name for Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ClusterName }).(pulumi.StringOutput)
}
// The OCID of the compartment.
func (o LookupCloudVmClusterResultOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.CompartmentId }).(pulumi.StringOutput)
}
// The compute model of the Exadata Infrastructure.
func (o LookupCloudVmClusterResultOutput) ComputeModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ComputeModel }).(pulumi.StringOutput)
}
// A `computeNodes` block as defined below.
func (o LookupCloudVmClusterResultOutput) ComputeNodes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []string { return v.ComputeNodes }).(pulumi.StringArrayOutput)
}
// The number of CPU cores enabled on the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) CpuCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.CpuCoreCount }).(pulumi.IntOutput)
}
// A `dataCollectionOptions` block as defined below.
func (o LookupCloudVmClusterResultOutput) DataCollectionOptions() GetCloudVmClusterDataCollectionOptionArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []GetCloudVmClusterDataCollectionOption {
return v.DataCollectionOptions
}).(GetCloudVmClusterDataCollectionOptionArrayOutput)
}
// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are `35`, `40`, `60`, and 80. The default is `80` percent assigned to DATA storage. See [Storage Configuration](https://docs.oracle.com/en-us/iaas/exadatacloud/index.html#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage.
func (o LookupCloudVmClusterResultOutput) DataStoragePercentage() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.DataStoragePercentage }).(pulumi.IntOutput)
}
// The data disk group size to be allocated in TBs.
func (o LookupCloudVmClusterResultOutput) DataStorageSizeInTbs() pulumi.Float64Output {
return o.ApplyT(func(v LookupCloudVmClusterResult) float64 { return v.DataStorageSizeInTbs }).(pulumi.Float64Output)
}
// The local node storage to be allocated in GBs.
func (o LookupCloudVmClusterResultOutput) DbNodeStorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.DbNodeStorageSizeInGbs }).(pulumi.IntOutput)
}
// A `dbServers` block as defined below.
func (o LookupCloudVmClusterResultOutput) DbServers() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []string { return v.DbServers }).(pulumi.StringArrayOutput)
}
// The type of redundancy configured for the Cloud Vm Cluster. `NORMAL` is 2-way redundancy. `HIGH` is 3-way redundancy.
func (o LookupCloudVmClusterResultOutput) DiskRedundancy() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.DiskRedundancy }).(pulumi.StringOutput)
}
// The user-friendly name for the Cloud VM Cluster. The name does not need to be unique.
func (o LookupCloudVmClusterResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The domain name for the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) Domain() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Domain }).(pulumi.StringOutput)
}
// A `fileSystemConfiguration` block as defined below.
func (o LookupCloudVmClusterResultOutput) FileSystemConfigurations() GetCloudVmClusterFileSystemConfigurationArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []GetCloudVmClusterFileSystemConfiguration {
return v.FileSystemConfigurations
}).(GetCloudVmClusterFileSystemConfigurationArrayOutput)
}
// A valid Oracle Grid Infrastructure (GI) software version.
func (o LookupCloudVmClusterResultOutput) GiVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.GiVersion }).(pulumi.StringOutput)
}
// The hostname for the Cloud VM Cluster without suffix.
func (o LookupCloudVmClusterResultOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Hostname }).(pulumi.StringOutput)
}
// The hostname for the Cloud VM Cluster with suffix.
func (o LookupCloudVmClusterResultOutput) HostnameActual() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.HostnameActual }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupCloudVmClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `iormConfigCache` block as defined below.
func (o LookupCloudVmClusterResultOutput) IormConfigCaches() GetCloudVmClusterIormConfigCacheArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []GetCloudVmClusterIormConfigCache { return v.IormConfigCaches }).(GetCloudVmClusterIormConfigCacheArrayOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance update history entry. This value is updated when a maintenance update starts.
func (o LookupCloudVmClusterResultOutput) LastUpdateHistoryEntryId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.LastUpdateHistoryEntryId }).(pulumi.StringOutput)
}
// The Oracle license model that applies to the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) LicenseModel() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.LicenseModel }).(pulumi.StringOutput)
}
// Additional information about the current `lifecycleState`.
func (o LookupCloudVmClusterResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// The current state of IORM configuration for the Exadata DB system.
func (o LookupCloudVmClusterResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// The port number configured for the listener on the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) ListenerPort() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.ListenerPort }).(pulumi.IntOutput)
}
// If true, database backup on local Exadata storage is configured for the Cloud VM Cluster. If false, database backup on local Exadata storage is not available in the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) LocalBackupEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) bool { return v.LocalBackupEnabled }).(pulumi.BoolOutput)
}
// The Azure Region where the Cloud VM Cluster exists.
func (o LookupCloudVmClusterResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Location }).(pulumi.StringOutput)
}
// The memory to be allocated in GBs.
func (o LookupCloudVmClusterResultOutput) MemorySizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.MemorySizeInGbs }).(pulumi.IntOutput)
}
func (o LookupCloudVmClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
// The number of nodes in the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) NodeCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.NodeCount }).(pulumi.IntOutput)
}
// The list of [OCIDs](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](https://docs.oracle.com/en-us/iaas/Content/Network/Concepts/securityrules.htm). NsgIds restrictions:
// * A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty.
func (o LookupCloudVmClusterResultOutput) NsgUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.NsgUrl }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupCloudVmClusterResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Ocid }).(pulumi.StringOutput)
}
// The number of OCPU cores to enable on the Cloud VM Cluster. Only 1 decimal place is allowed for the fractional part.
func (o LookupCloudVmClusterResultOutput) OcpuCount() pulumi.Float64Output {
return o.ApplyT(func(v LookupCloudVmClusterResult) float64 { return v.OcpuCount }).(pulumi.Float64Output)
}
func (o LookupCloudVmClusterResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) ScanDnsName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ScanDnsName }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the DNS record for the SCAN IP addresses that are associated with the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) ScanDnsRecordId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ScanDnsRecordId }).(pulumi.StringOutput)
}
// A `scanIpIds` block as defined below.
func (o LookupCloudVmClusterResultOutput) ScanIpIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []string { return v.ScanIpIds }).(pulumi.StringArrayOutput)
}
// The TCP Single Client Access Name (SCAN) port. The default port is 1521.
func (o LookupCloudVmClusterResultOutput) ScanListenerPortTcp() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.ScanListenerPortTcp }).(pulumi.IntOutput)
}
// The TCPS Single Client Access Name (SCAN) port. The default port is 2484.
func (o LookupCloudVmClusterResultOutput) ScanListenerPortTcpSsl() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.ScanListenerPortTcpSsl }).(pulumi.IntOutput)
}
// The model name of the Exadata hardware running the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) Shape() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.Shape }).(pulumi.StringOutput)
}
// If true, sparse disk group is configured for the Cloud VM Cluster. If false, sparse disk group is not created.
func (o LookupCloudVmClusterResultOutput) SparseDiskgroupEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) bool { return v.SparseDiskgroupEnabled }).(pulumi.BoolOutput)
}
// The public key portion of one or more key pairs used for SSH access to the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) SshPublicKeys() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []string { return v.SshPublicKeys }).(pulumi.StringArrayOutput)
}
// The storage allocation for the disk group, in gigabytes (GB).
func (o LookupCloudVmClusterResultOutput) StorageSizeInGbs() pulumi.IntOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) int { return v.StorageSizeInGbs }).(pulumi.IntOutput)
}
// The ID of the Azure Resource Manager subnet resource.
func (o LookupCloudVmClusterResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the subnet associated with the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) SubnetOcid() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.SubnetOcid }).(pulumi.StringOutput)
}
// Operating system version of the image.
func (o LookupCloudVmClusterResultOutput) SystemVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.SystemVersion }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Cloud VM Cluster.
func (o LookupCloudVmClusterResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The date and time that the Cloud VM Cluster was created.
func (o LookupCloudVmClusterResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The time zone of the Cloud VM Cluster. For details, see [Exadata Infrastructure Time Zones](https://docs.oracle.com/en-us/iaas/base-database/doc/manage-time-zone.html).
func (o LookupCloudVmClusterResultOutput) TimeZone() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.TimeZone }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the virtual IP (VIP) addresses associated with the Cloud VM Cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the Cluster.
func (o LookupCloudVmClusterResultOutput) VipOds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) []string { return v.VipOds }).(pulumi.StringArrayOutput)
}
// The ID to an Azure Resource Manager Virtual Network resource.
func (o LookupCloudVmClusterResultOutput) VirtualNetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.VirtualNetworkId }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the zone the Cloud VM Cluster is associated with.
func (o LookupCloudVmClusterResultOutput) ZoneId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCloudVmClusterResult) string { return v.ZoneId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupCloudVmClusterResultOutput{})
}
| 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/oracle/getExascaleDatabaseStorageVault.go | sdk/go/azure/oracle/getExascaleDatabaseStorageVault.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 oracle
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 Exadata Database Storage Vault
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/oracle"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := oracle.LookupExascaleDatabaseStorageVault(ctx, &oracle.LookupExascaleDatabaseStorageVaultArgs{
// 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:
//
// * `Oracle.Database` - 2025-09-01
func LookupExascaleDatabaseStorageVault(ctx *pulumi.Context, args *LookupExascaleDatabaseStorageVaultArgs, opts ...pulumi.InvokeOption) (*LookupExascaleDatabaseStorageVaultResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupExascaleDatabaseStorageVaultResult
err := ctx.Invoke("azure:oracle/getExascaleDatabaseStorageVault:getExascaleDatabaseStorageVault", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getExascaleDatabaseStorageVault.
type LookupExascaleDatabaseStorageVaultArgs struct {
// The name of this Exadata Database Storage Vault.
Name string `pulumi:"name"`
// The name of the Resource Group where the Exadata Database Storage Vault exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getExascaleDatabaseStorageVault.
type LookupExascaleDatabaseStorageVaultResult struct {
// The size of additional Flash Cache in percentage of High Capacity database storage.
AdditionalFlashCachePercentage int `pulumi:"additionalFlashCachePercentage"`
// Exadata Database Storage Vault description.
Description string `pulumi:"description"`
// The user-friendly name for the Exadata Database Storage Vault.
DisplayName string `pulumi:"displayName"`
// A `highCapacityDatabaseStorage` block as defined below.
HighCapacityDatabaseStorages []GetExascaleDatabaseStorageVaultHighCapacityDatabaseStorage `pulumi:"highCapacityDatabaseStorages"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Additional information about the current lifecycle state.
LifecycleDetails string `pulumi:"lifecycleDetails"`
// Exadata Database Storage Vault lifecycle state enum.
LifecycleState string `pulumi:"lifecycleState"`
// The Azure Region where the Exadata Database Storage Vault exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The URL of the resource in the OCI console.
OciUrl string `pulumi:"ociUrl"`
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault.
Ocid string `pulumi:"ocid"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The time zone of the Exadata Database Storage Vault.
TimeZone string `pulumi:"timeZone"`
// The number of Exadata virtual machine clusters used the Exadata Database Storage Vault.
VirtualMachineClusterCount int `pulumi:"virtualMachineClusterCount"`
// The Exadata Database Storage Vault Azure zones.
Zones []string `pulumi:"zones"`
}
func LookupExascaleDatabaseStorageVaultOutput(ctx *pulumi.Context, args LookupExascaleDatabaseStorageVaultOutputArgs, opts ...pulumi.InvokeOption) LookupExascaleDatabaseStorageVaultResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupExascaleDatabaseStorageVaultResultOutput, error) {
args := v.(LookupExascaleDatabaseStorageVaultArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:oracle/getExascaleDatabaseStorageVault:getExascaleDatabaseStorageVault", args, LookupExascaleDatabaseStorageVaultResultOutput{}, options).(LookupExascaleDatabaseStorageVaultResultOutput), nil
}).(LookupExascaleDatabaseStorageVaultResultOutput)
}
// A collection of arguments for invoking getExascaleDatabaseStorageVault.
type LookupExascaleDatabaseStorageVaultOutputArgs struct {
// The name of this Exadata Database Storage Vault.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Exadata Database Storage Vault exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupExascaleDatabaseStorageVaultOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupExascaleDatabaseStorageVaultArgs)(nil)).Elem()
}
// A collection of values returned by getExascaleDatabaseStorageVault.
type LookupExascaleDatabaseStorageVaultResultOutput struct{ *pulumi.OutputState }
func (LookupExascaleDatabaseStorageVaultResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupExascaleDatabaseStorageVaultResult)(nil)).Elem()
}
func (o LookupExascaleDatabaseStorageVaultResultOutput) ToLookupExascaleDatabaseStorageVaultResultOutput() LookupExascaleDatabaseStorageVaultResultOutput {
return o
}
func (o LookupExascaleDatabaseStorageVaultResultOutput) ToLookupExascaleDatabaseStorageVaultResultOutputWithContext(ctx context.Context) LookupExascaleDatabaseStorageVaultResultOutput {
return o
}
// The size of additional Flash Cache in percentage of High Capacity database storage.
func (o LookupExascaleDatabaseStorageVaultResultOutput) AdditionalFlashCachePercentage() pulumi.IntOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) int { return v.AdditionalFlashCachePercentage }).(pulumi.IntOutput)
}
// Exadata Database Storage Vault description.
func (o LookupExascaleDatabaseStorageVaultResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.Description }).(pulumi.StringOutput)
}
// The user-friendly name for the Exadata Database Storage Vault.
func (o LookupExascaleDatabaseStorageVaultResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// A `highCapacityDatabaseStorage` block as defined below.
func (o LookupExascaleDatabaseStorageVaultResultOutput) HighCapacityDatabaseStorages() GetExascaleDatabaseStorageVaultHighCapacityDatabaseStorageArrayOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) []GetExascaleDatabaseStorageVaultHighCapacityDatabaseStorage {
return v.HighCapacityDatabaseStorages
}).(GetExascaleDatabaseStorageVaultHighCapacityDatabaseStorageArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupExascaleDatabaseStorageVaultResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.Id }).(pulumi.StringOutput)
}
// Additional information about the current lifecycle state.
func (o LookupExascaleDatabaseStorageVaultResultOutput) LifecycleDetails() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.LifecycleDetails }).(pulumi.StringOutput)
}
// Exadata Database Storage Vault lifecycle state enum.
func (o LookupExascaleDatabaseStorageVaultResultOutput) LifecycleState() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.LifecycleState }).(pulumi.StringOutput)
}
// The Azure Region where the Exadata Database Storage Vault exists.
func (o LookupExascaleDatabaseStorageVaultResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupExascaleDatabaseStorageVaultResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.Name }).(pulumi.StringOutput)
}
// The URL of the resource in the OCI console.
func (o LookupExascaleDatabaseStorageVaultResultOutput) OciUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.OciUrl }).(pulumi.StringOutput)
}
// The [OCID](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm) of the Exadata Database Storage Vault.
func (o LookupExascaleDatabaseStorageVaultResultOutput) Ocid() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.Ocid }).(pulumi.StringOutput)
}
func (o LookupExascaleDatabaseStorageVaultResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The time zone of the Exadata Database Storage Vault.
func (o LookupExascaleDatabaseStorageVaultResultOutput) TimeZone() pulumi.StringOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) string { return v.TimeZone }).(pulumi.StringOutput)
}
// The number of Exadata virtual machine clusters used the Exadata Database Storage Vault.
func (o LookupExascaleDatabaseStorageVaultResultOutput) VirtualMachineClusterCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) int { return v.VirtualMachineClusterCount }).(pulumi.IntOutput)
}
// The Exadata Database Storage Vault Azure zones.
func (o LookupExascaleDatabaseStorageVaultResultOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupExascaleDatabaseStorageVaultResult) []string { return v.Zones }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupExascaleDatabaseStorageVaultResultOutput{})
}
| 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/batch/init.go | sdk/go/azure/batch/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 batch
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:batch/account:Account":
r = &Account{}
case "azure:batch/application:Application":
r = &Application{}
case "azure:batch/certificate:Certificate":
r = &Certificate{}
case "azure:batch/job:Job":
r = &Job{}
case "azure:batch/pool:Pool":
r = &Pool{}
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",
"batch/account",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"batch/application",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"batch/certificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"batch/job",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"batch/pool",
&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/batch/pulumiTypes.go | sdk/go/azure/batch/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 batch
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 AccountEncryption struct {
// The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
}
// AccountEncryptionInput is an input type that accepts AccountEncryptionArgs and AccountEncryptionOutput values.
// You can construct a concrete instance of `AccountEncryptionInput` via:
//
// AccountEncryptionArgs{...}
type AccountEncryptionInput interface {
pulumi.Input
ToAccountEncryptionOutput() AccountEncryptionOutput
ToAccountEncryptionOutputWithContext(context.Context) AccountEncryptionOutput
}
type AccountEncryptionArgs struct {
// The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported.
KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"`
}
func (AccountEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountEncryption)(nil)).Elem()
}
func (i AccountEncryptionArgs) ToAccountEncryptionOutput() AccountEncryptionOutput {
return i.ToAccountEncryptionOutputWithContext(context.Background())
}
func (i AccountEncryptionArgs) ToAccountEncryptionOutputWithContext(ctx context.Context) AccountEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountEncryptionOutput)
}
func (i AccountEncryptionArgs) ToAccountEncryptionPtrOutput() AccountEncryptionPtrOutput {
return i.ToAccountEncryptionPtrOutputWithContext(context.Background())
}
func (i AccountEncryptionArgs) ToAccountEncryptionPtrOutputWithContext(ctx context.Context) AccountEncryptionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountEncryptionOutput).ToAccountEncryptionPtrOutputWithContext(ctx)
}
// AccountEncryptionPtrInput is an input type that accepts AccountEncryptionArgs, AccountEncryptionPtr and AccountEncryptionPtrOutput values.
// You can construct a concrete instance of `AccountEncryptionPtrInput` via:
//
// AccountEncryptionArgs{...}
//
// or:
//
// nil
type AccountEncryptionPtrInput interface {
pulumi.Input
ToAccountEncryptionPtrOutput() AccountEncryptionPtrOutput
ToAccountEncryptionPtrOutputWithContext(context.Context) AccountEncryptionPtrOutput
}
type accountEncryptionPtrType AccountEncryptionArgs
func AccountEncryptionPtr(v *AccountEncryptionArgs) AccountEncryptionPtrInput {
return (*accountEncryptionPtrType)(v)
}
func (*accountEncryptionPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountEncryption)(nil)).Elem()
}
func (i *accountEncryptionPtrType) ToAccountEncryptionPtrOutput() AccountEncryptionPtrOutput {
return i.ToAccountEncryptionPtrOutputWithContext(context.Background())
}
func (i *accountEncryptionPtrType) ToAccountEncryptionPtrOutputWithContext(ctx context.Context) AccountEncryptionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountEncryptionPtrOutput)
}
type AccountEncryptionOutput struct{ *pulumi.OutputState }
func (AccountEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountEncryption)(nil)).Elem()
}
func (o AccountEncryptionOutput) ToAccountEncryptionOutput() AccountEncryptionOutput {
return o
}
func (o AccountEncryptionOutput) ToAccountEncryptionOutputWithContext(ctx context.Context) AccountEncryptionOutput {
return o
}
func (o AccountEncryptionOutput) ToAccountEncryptionPtrOutput() AccountEncryptionPtrOutput {
return o.ToAccountEncryptionPtrOutputWithContext(context.Background())
}
func (o AccountEncryptionOutput) ToAccountEncryptionPtrOutputWithContext(ctx context.Context) AccountEncryptionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountEncryption) *AccountEncryption {
return &v
}).(AccountEncryptionPtrOutput)
}
// The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported.
func (o AccountEncryptionOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v AccountEncryption) string { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
type AccountEncryptionPtrOutput struct{ *pulumi.OutputState }
func (AccountEncryptionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountEncryption)(nil)).Elem()
}
func (o AccountEncryptionPtrOutput) ToAccountEncryptionPtrOutput() AccountEncryptionPtrOutput {
return o
}
func (o AccountEncryptionPtrOutput) ToAccountEncryptionPtrOutputWithContext(ctx context.Context) AccountEncryptionPtrOutput {
return o
}
func (o AccountEncryptionPtrOutput) Elem() AccountEncryptionOutput {
return o.ApplyT(func(v *AccountEncryption) AccountEncryption {
if v != nil {
return *v
}
var ret AccountEncryption
return ret
}).(AccountEncryptionOutput)
}
// The full URL path to the Azure key vault key id that should be used to encrypt data, as documented [here](https://docs.microsoft.com/azure/batch/batch-customer-managed-key). Both versioned and versionless keys are supported.
func (o AccountEncryptionPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountEncryption) *string {
if v == nil {
return nil
}
return &v.KeyVaultKeyId
}).(pulumi.StringPtrOutput)
}
type AccountIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Batch Account.
//
// > **NOTE:** This is required when `type` is set to `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Batch Account. Possible values are `SystemAssigned` or `UserAssigned`.
Type string `pulumi:"type"`
}
// AccountIdentityInput is an input type that accepts AccountIdentityArgs and AccountIdentityOutput values.
// You can construct a concrete instance of `AccountIdentityInput` via:
//
// AccountIdentityArgs{...}
type AccountIdentityInput interface {
pulumi.Input
ToAccountIdentityOutput() AccountIdentityOutput
ToAccountIdentityOutputWithContext(context.Context) AccountIdentityOutput
}
type AccountIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this Batch Account.
//
// > **NOTE:** This is required when `type` is set to `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Batch Account. Possible values are `SystemAssigned` or `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (AccountIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (i AccountIdentityArgs) ToAccountIdentityOutput() AccountIdentityOutput {
return i.ToAccountIdentityOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput)
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i AccountIdentityArgs) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput).ToAccountIdentityPtrOutputWithContext(ctx)
}
// AccountIdentityPtrInput is an input type that accepts AccountIdentityArgs, AccountIdentityPtr and AccountIdentityPtrOutput values.
// You can construct a concrete instance of `AccountIdentityPtrInput` via:
//
// AccountIdentityArgs{...}
//
// or:
//
// nil
type AccountIdentityPtrInput interface {
pulumi.Input
ToAccountIdentityPtrOutput() AccountIdentityPtrOutput
ToAccountIdentityPtrOutputWithContext(context.Context) AccountIdentityPtrOutput
}
type accountIdentityPtrType AccountIdentityArgs
func AccountIdentityPtr(v *AccountIdentityArgs) AccountIdentityPtrInput {
return (*accountIdentityPtrType)(v)
}
func (*accountIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return i.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (i *accountIdentityPtrType) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityPtrOutput)
}
type AccountIdentityOutput struct{ *pulumi.OutputState }
func (AccountIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityOutput) ToAccountIdentityOutput() AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput {
return o
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o.ToAccountIdentityPtrOutputWithContext(context.Background())
}
func (o AccountIdentityOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountIdentity) *AccountIdentity {
return &v
}).(AccountIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Batch Account.
//
// > **NOTE:** This is required when `type` is set to `UserAssigned`.
func (o AccountIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AccountIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AccountIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AccountIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Batch Account. Possible values are `SystemAssigned` or `UserAssigned`.
func (o AccountIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AccountIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AccountIdentityPtrOutput struct{ *pulumi.OutputState }
func (AccountIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIdentity)(nil)).Elem()
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput {
return o
}
func (o AccountIdentityPtrOutput) Elem() AccountIdentityOutput {
return o.ApplyT(func(v *AccountIdentity) AccountIdentity {
if v != nil {
return *v
}
var ret AccountIdentity
return ret
}).(AccountIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this Batch Account.
//
// > **NOTE:** This is required when `type` is set to `UserAssigned`.
func (o AccountIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o AccountIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o AccountIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Batch Account. Possible values are `SystemAssigned` or `UserAssigned`.
func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AccountKeyVaultReference struct {
// The Azure identifier of the Azure KeyVault to use.
Id string `pulumi:"id"`
// The HTTPS URL of the Azure KeyVault to use.
Url string `pulumi:"url"`
}
// AccountKeyVaultReferenceInput is an input type that accepts AccountKeyVaultReferenceArgs and AccountKeyVaultReferenceOutput values.
// You can construct a concrete instance of `AccountKeyVaultReferenceInput` via:
//
// AccountKeyVaultReferenceArgs{...}
type AccountKeyVaultReferenceInput interface {
pulumi.Input
ToAccountKeyVaultReferenceOutput() AccountKeyVaultReferenceOutput
ToAccountKeyVaultReferenceOutputWithContext(context.Context) AccountKeyVaultReferenceOutput
}
type AccountKeyVaultReferenceArgs struct {
// The Azure identifier of the Azure KeyVault to use.
Id pulumi.StringInput `pulumi:"id"`
// The HTTPS URL of the Azure KeyVault to use.
Url pulumi.StringInput `pulumi:"url"`
}
func (AccountKeyVaultReferenceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountKeyVaultReference)(nil)).Elem()
}
func (i AccountKeyVaultReferenceArgs) ToAccountKeyVaultReferenceOutput() AccountKeyVaultReferenceOutput {
return i.ToAccountKeyVaultReferenceOutputWithContext(context.Background())
}
func (i AccountKeyVaultReferenceArgs) ToAccountKeyVaultReferenceOutputWithContext(ctx context.Context) AccountKeyVaultReferenceOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountKeyVaultReferenceOutput)
}
func (i AccountKeyVaultReferenceArgs) ToAccountKeyVaultReferencePtrOutput() AccountKeyVaultReferencePtrOutput {
return i.ToAccountKeyVaultReferencePtrOutputWithContext(context.Background())
}
func (i AccountKeyVaultReferenceArgs) ToAccountKeyVaultReferencePtrOutputWithContext(ctx context.Context) AccountKeyVaultReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountKeyVaultReferenceOutput).ToAccountKeyVaultReferencePtrOutputWithContext(ctx)
}
// AccountKeyVaultReferencePtrInput is an input type that accepts AccountKeyVaultReferenceArgs, AccountKeyVaultReferencePtr and AccountKeyVaultReferencePtrOutput values.
// You can construct a concrete instance of `AccountKeyVaultReferencePtrInput` via:
//
// AccountKeyVaultReferenceArgs{...}
//
// or:
//
// nil
type AccountKeyVaultReferencePtrInput interface {
pulumi.Input
ToAccountKeyVaultReferencePtrOutput() AccountKeyVaultReferencePtrOutput
ToAccountKeyVaultReferencePtrOutputWithContext(context.Context) AccountKeyVaultReferencePtrOutput
}
type accountKeyVaultReferencePtrType AccountKeyVaultReferenceArgs
func AccountKeyVaultReferencePtr(v *AccountKeyVaultReferenceArgs) AccountKeyVaultReferencePtrInput {
return (*accountKeyVaultReferencePtrType)(v)
}
func (*accountKeyVaultReferencePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountKeyVaultReference)(nil)).Elem()
}
func (i *accountKeyVaultReferencePtrType) ToAccountKeyVaultReferencePtrOutput() AccountKeyVaultReferencePtrOutput {
return i.ToAccountKeyVaultReferencePtrOutputWithContext(context.Background())
}
func (i *accountKeyVaultReferencePtrType) ToAccountKeyVaultReferencePtrOutputWithContext(ctx context.Context) AccountKeyVaultReferencePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountKeyVaultReferencePtrOutput)
}
type AccountKeyVaultReferenceOutput struct{ *pulumi.OutputState }
func (AccountKeyVaultReferenceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountKeyVaultReference)(nil)).Elem()
}
func (o AccountKeyVaultReferenceOutput) ToAccountKeyVaultReferenceOutput() AccountKeyVaultReferenceOutput {
return o
}
func (o AccountKeyVaultReferenceOutput) ToAccountKeyVaultReferenceOutputWithContext(ctx context.Context) AccountKeyVaultReferenceOutput {
return o
}
func (o AccountKeyVaultReferenceOutput) ToAccountKeyVaultReferencePtrOutput() AccountKeyVaultReferencePtrOutput {
return o.ToAccountKeyVaultReferencePtrOutputWithContext(context.Background())
}
func (o AccountKeyVaultReferenceOutput) ToAccountKeyVaultReferencePtrOutputWithContext(ctx context.Context) AccountKeyVaultReferencePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountKeyVaultReference) *AccountKeyVaultReference {
return &v
}).(AccountKeyVaultReferencePtrOutput)
}
// The Azure identifier of the Azure KeyVault to use.
func (o AccountKeyVaultReferenceOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v AccountKeyVaultReference) string { return v.Id }).(pulumi.StringOutput)
}
// The HTTPS URL of the Azure KeyVault to use.
func (o AccountKeyVaultReferenceOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v AccountKeyVaultReference) string { return v.Url }).(pulumi.StringOutput)
}
type AccountKeyVaultReferencePtrOutput struct{ *pulumi.OutputState }
func (AccountKeyVaultReferencePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountKeyVaultReference)(nil)).Elem()
}
func (o AccountKeyVaultReferencePtrOutput) ToAccountKeyVaultReferencePtrOutput() AccountKeyVaultReferencePtrOutput {
return o
}
func (o AccountKeyVaultReferencePtrOutput) ToAccountKeyVaultReferencePtrOutputWithContext(ctx context.Context) AccountKeyVaultReferencePtrOutput {
return o
}
func (o AccountKeyVaultReferencePtrOutput) Elem() AccountKeyVaultReferenceOutput {
return o.ApplyT(func(v *AccountKeyVaultReference) AccountKeyVaultReference {
if v != nil {
return *v
}
var ret AccountKeyVaultReference
return ret
}).(AccountKeyVaultReferenceOutput)
}
// The Azure identifier of the Azure KeyVault to use.
func (o AccountKeyVaultReferencePtrOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountKeyVaultReference) *string {
if v == nil {
return nil
}
return &v.Id
}).(pulumi.StringPtrOutput)
}
// The HTTPS URL of the Azure KeyVault to use.
func (o AccountKeyVaultReferencePtrOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountKeyVaultReference) *string {
if v == nil {
return nil
}
return &v.Url
}).(pulumi.StringPtrOutput)
}
type AccountNetworkProfile struct {
// An `accountAccess` block as defined below.
AccountAccess *AccountNetworkProfileAccountAccess `pulumi:"accountAccess"`
// A `nodeManagementAccess` block as defined below.
//
// > **NOTE:** At least one of `accountAccess` or `nodeManagementAccess` must be specified.
NodeManagementAccess *AccountNetworkProfileNodeManagementAccess `pulumi:"nodeManagementAccess"`
}
// AccountNetworkProfileInput is an input type that accepts AccountNetworkProfileArgs and AccountNetworkProfileOutput values.
// You can construct a concrete instance of `AccountNetworkProfileInput` via:
//
// AccountNetworkProfileArgs{...}
type AccountNetworkProfileInput interface {
pulumi.Input
ToAccountNetworkProfileOutput() AccountNetworkProfileOutput
ToAccountNetworkProfileOutputWithContext(context.Context) AccountNetworkProfileOutput
}
type AccountNetworkProfileArgs struct {
// An `accountAccess` block as defined below.
AccountAccess AccountNetworkProfileAccountAccessPtrInput `pulumi:"accountAccess"`
// A `nodeManagementAccess` block as defined below.
//
// > **NOTE:** At least one of `accountAccess` or `nodeManagementAccess` must be specified.
NodeManagementAccess AccountNetworkProfileNodeManagementAccessPtrInput `pulumi:"nodeManagementAccess"`
}
func (AccountNetworkProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountNetworkProfile)(nil)).Elem()
}
func (i AccountNetworkProfileArgs) ToAccountNetworkProfileOutput() AccountNetworkProfileOutput {
return i.ToAccountNetworkProfileOutputWithContext(context.Background())
}
func (i AccountNetworkProfileArgs) ToAccountNetworkProfileOutputWithContext(ctx context.Context) AccountNetworkProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfileOutput)
}
func (i AccountNetworkProfileArgs) ToAccountNetworkProfilePtrOutput() AccountNetworkProfilePtrOutput {
return i.ToAccountNetworkProfilePtrOutputWithContext(context.Background())
}
func (i AccountNetworkProfileArgs) ToAccountNetworkProfilePtrOutputWithContext(ctx context.Context) AccountNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfileOutput).ToAccountNetworkProfilePtrOutputWithContext(ctx)
}
// AccountNetworkProfilePtrInput is an input type that accepts AccountNetworkProfileArgs, AccountNetworkProfilePtr and AccountNetworkProfilePtrOutput values.
// You can construct a concrete instance of `AccountNetworkProfilePtrInput` via:
//
// AccountNetworkProfileArgs{...}
//
// or:
//
// nil
type AccountNetworkProfilePtrInput interface {
pulumi.Input
ToAccountNetworkProfilePtrOutput() AccountNetworkProfilePtrOutput
ToAccountNetworkProfilePtrOutputWithContext(context.Context) AccountNetworkProfilePtrOutput
}
type accountNetworkProfilePtrType AccountNetworkProfileArgs
func AccountNetworkProfilePtr(v *AccountNetworkProfileArgs) AccountNetworkProfilePtrInput {
return (*accountNetworkProfilePtrType)(v)
}
func (*accountNetworkProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkProfile)(nil)).Elem()
}
func (i *accountNetworkProfilePtrType) ToAccountNetworkProfilePtrOutput() AccountNetworkProfilePtrOutput {
return i.ToAccountNetworkProfilePtrOutputWithContext(context.Background())
}
func (i *accountNetworkProfilePtrType) ToAccountNetworkProfilePtrOutputWithContext(ctx context.Context) AccountNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfilePtrOutput)
}
type AccountNetworkProfileOutput struct{ *pulumi.OutputState }
func (AccountNetworkProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountNetworkProfile)(nil)).Elem()
}
func (o AccountNetworkProfileOutput) ToAccountNetworkProfileOutput() AccountNetworkProfileOutput {
return o
}
func (o AccountNetworkProfileOutput) ToAccountNetworkProfileOutputWithContext(ctx context.Context) AccountNetworkProfileOutput {
return o
}
func (o AccountNetworkProfileOutput) ToAccountNetworkProfilePtrOutput() AccountNetworkProfilePtrOutput {
return o.ToAccountNetworkProfilePtrOutputWithContext(context.Background())
}
func (o AccountNetworkProfileOutput) ToAccountNetworkProfilePtrOutputWithContext(ctx context.Context) AccountNetworkProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountNetworkProfile) *AccountNetworkProfile {
return &v
}).(AccountNetworkProfilePtrOutput)
}
// An `accountAccess` block as defined below.
func (o AccountNetworkProfileOutput) AccountAccess() AccountNetworkProfileAccountAccessPtrOutput {
return o.ApplyT(func(v AccountNetworkProfile) *AccountNetworkProfileAccountAccess { return v.AccountAccess }).(AccountNetworkProfileAccountAccessPtrOutput)
}
// A `nodeManagementAccess` block as defined below.
//
// > **NOTE:** At least one of `accountAccess` or `nodeManagementAccess` must be specified.
func (o AccountNetworkProfileOutput) NodeManagementAccess() AccountNetworkProfileNodeManagementAccessPtrOutput {
return o.ApplyT(func(v AccountNetworkProfile) *AccountNetworkProfileNodeManagementAccess {
return v.NodeManagementAccess
}).(AccountNetworkProfileNodeManagementAccessPtrOutput)
}
type AccountNetworkProfilePtrOutput struct{ *pulumi.OutputState }
func (AccountNetworkProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkProfile)(nil)).Elem()
}
func (o AccountNetworkProfilePtrOutput) ToAccountNetworkProfilePtrOutput() AccountNetworkProfilePtrOutput {
return o
}
func (o AccountNetworkProfilePtrOutput) ToAccountNetworkProfilePtrOutputWithContext(ctx context.Context) AccountNetworkProfilePtrOutput {
return o
}
func (o AccountNetworkProfilePtrOutput) Elem() AccountNetworkProfileOutput {
return o.ApplyT(func(v *AccountNetworkProfile) AccountNetworkProfile {
if v != nil {
return *v
}
var ret AccountNetworkProfile
return ret
}).(AccountNetworkProfileOutput)
}
// An `accountAccess` block as defined below.
func (o AccountNetworkProfilePtrOutput) AccountAccess() AccountNetworkProfileAccountAccessPtrOutput {
return o.ApplyT(func(v *AccountNetworkProfile) *AccountNetworkProfileAccountAccess {
if v == nil {
return nil
}
return v.AccountAccess
}).(AccountNetworkProfileAccountAccessPtrOutput)
}
// A `nodeManagementAccess` block as defined below.
//
// > **NOTE:** At least one of `accountAccess` or `nodeManagementAccess` must be specified.
func (o AccountNetworkProfilePtrOutput) NodeManagementAccess() AccountNetworkProfileNodeManagementAccessPtrOutput {
return o.ApplyT(func(v *AccountNetworkProfile) *AccountNetworkProfileNodeManagementAccess {
if v == nil {
return nil
}
return v.NodeManagementAccess
}).(AccountNetworkProfileNodeManagementAccessPtrOutput)
}
type AccountNetworkProfileAccountAccess struct {
// Specifies the default action for the account access. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction *string `pulumi:"defaultAction"`
// One or more `ipRule` blocks as defined below.
IpRules []AccountNetworkProfileAccountAccessIpRule `pulumi:"ipRules"`
}
// AccountNetworkProfileAccountAccessInput is an input type that accepts AccountNetworkProfileAccountAccessArgs and AccountNetworkProfileAccountAccessOutput values.
// You can construct a concrete instance of `AccountNetworkProfileAccountAccessInput` via:
//
// AccountNetworkProfileAccountAccessArgs{...}
type AccountNetworkProfileAccountAccessInput interface {
pulumi.Input
ToAccountNetworkProfileAccountAccessOutput() AccountNetworkProfileAccountAccessOutput
ToAccountNetworkProfileAccountAccessOutputWithContext(context.Context) AccountNetworkProfileAccountAccessOutput
}
type AccountNetworkProfileAccountAccessArgs struct {
// Specifies the default action for the account access. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction pulumi.StringPtrInput `pulumi:"defaultAction"`
// One or more `ipRule` blocks as defined below.
IpRules AccountNetworkProfileAccountAccessIpRuleArrayInput `pulumi:"ipRules"`
}
func (AccountNetworkProfileAccountAccessArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountNetworkProfileAccountAccess)(nil)).Elem()
}
func (i AccountNetworkProfileAccountAccessArgs) ToAccountNetworkProfileAccountAccessOutput() AccountNetworkProfileAccountAccessOutput {
return i.ToAccountNetworkProfileAccountAccessOutputWithContext(context.Background())
}
func (i AccountNetworkProfileAccountAccessArgs) ToAccountNetworkProfileAccountAccessOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfileAccountAccessOutput)
}
func (i AccountNetworkProfileAccountAccessArgs) ToAccountNetworkProfileAccountAccessPtrOutput() AccountNetworkProfileAccountAccessPtrOutput {
return i.ToAccountNetworkProfileAccountAccessPtrOutputWithContext(context.Background())
}
func (i AccountNetworkProfileAccountAccessArgs) ToAccountNetworkProfileAccountAccessPtrOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfileAccountAccessOutput).ToAccountNetworkProfileAccountAccessPtrOutputWithContext(ctx)
}
// AccountNetworkProfileAccountAccessPtrInput is an input type that accepts AccountNetworkProfileAccountAccessArgs, AccountNetworkProfileAccountAccessPtr and AccountNetworkProfileAccountAccessPtrOutput values.
// You can construct a concrete instance of `AccountNetworkProfileAccountAccessPtrInput` via:
//
// AccountNetworkProfileAccountAccessArgs{...}
//
// or:
//
// nil
type AccountNetworkProfileAccountAccessPtrInput interface {
pulumi.Input
ToAccountNetworkProfileAccountAccessPtrOutput() AccountNetworkProfileAccountAccessPtrOutput
ToAccountNetworkProfileAccountAccessPtrOutputWithContext(context.Context) AccountNetworkProfileAccountAccessPtrOutput
}
type accountNetworkProfileAccountAccessPtrType AccountNetworkProfileAccountAccessArgs
func AccountNetworkProfileAccountAccessPtr(v *AccountNetworkProfileAccountAccessArgs) AccountNetworkProfileAccountAccessPtrInput {
return (*accountNetworkProfileAccountAccessPtrType)(v)
}
func (*accountNetworkProfileAccountAccessPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkProfileAccountAccess)(nil)).Elem()
}
func (i *accountNetworkProfileAccountAccessPtrType) ToAccountNetworkProfileAccountAccessPtrOutput() AccountNetworkProfileAccountAccessPtrOutput {
return i.ToAccountNetworkProfileAccountAccessPtrOutputWithContext(context.Background())
}
func (i *accountNetworkProfileAccountAccessPtrType) ToAccountNetworkProfileAccountAccessPtrOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkProfileAccountAccessPtrOutput)
}
type AccountNetworkProfileAccountAccessOutput struct{ *pulumi.OutputState }
func (AccountNetworkProfileAccountAccessOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountNetworkProfileAccountAccess)(nil)).Elem()
}
func (o AccountNetworkProfileAccountAccessOutput) ToAccountNetworkProfileAccountAccessOutput() AccountNetworkProfileAccountAccessOutput {
return o
}
func (o AccountNetworkProfileAccountAccessOutput) ToAccountNetworkProfileAccountAccessOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessOutput {
return o
}
func (o AccountNetworkProfileAccountAccessOutput) ToAccountNetworkProfileAccountAccessPtrOutput() AccountNetworkProfileAccountAccessPtrOutput {
return o.ToAccountNetworkProfileAccountAccessPtrOutputWithContext(context.Background())
}
func (o AccountNetworkProfileAccountAccessOutput) ToAccountNetworkProfileAccountAccessPtrOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountNetworkProfileAccountAccess) *AccountNetworkProfileAccountAccess {
return &v
}).(AccountNetworkProfileAccountAccessPtrOutput)
}
// Specifies the default action for the account access. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
func (o AccountNetworkProfileAccountAccessOutput) DefaultAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountNetworkProfileAccountAccess) *string { return v.DefaultAction }).(pulumi.StringPtrOutput)
}
// One or more `ipRule` blocks as defined below.
func (o AccountNetworkProfileAccountAccessOutput) IpRules() AccountNetworkProfileAccountAccessIpRuleArrayOutput {
return o.ApplyT(func(v AccountNetworkProfileAccountAccess) []AccountNetworkProfileAccountAccessIpRule {
return v.IpRules
}).(AccountNetworkProfileAccountAccessIpRuleArrayOutput)
}
type AccountNetworkProfileAccountAccessPtrOutput struct{ *pulumi.OutputState }
func (AccountNetworkProfileAccountAccessPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkProfileAccountAccess)(nil)).Elem()
}
func (o AccountNetworkProfileAccountAccessPtrOutput) ToAccountNetworkProfileAccountAccessPtrOutput() AccountNetworkProfileAccountAccessPtrOutput {
return o
}
func (o AccountNetworkProfileAccountAccessPtrOutput) ToAccountNetworkProfileAccountAccessPtrOutputWithContext(ctx context.Context) AccountNetworkProfileAccountAccessPtrOutput {
return o
}
func (o AccountNetworkProfileAccountAccessPtrOutput) Elem() AccountNetworkProfileAccountAccessOutput {
return o.ApplyT(func(v *AccountNetworkProfileAccountAccess) AccountNetworkProfileAccountAccess {
if v != nil {
| 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/batch/job.go | sdk/go/azure/batch/job.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 batch
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Batch Job.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "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
// }
// exampleAccount, err := batch.NewAccount(ctx, "example", &batch.AccountArgs{
// Name: pulumi.String("exampleaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// examplePool, err := batch.NewPool(ctx, "example", &batch.PoolArgs{
// Name: pulumi.String("examplepool"),
// ResourceGroupName: example.Name,
// AccountName: exampleAccount.Name,
// NodeAgentSkuId: pulumi.String("batch.node.ubuntu 16.04"),
// VmSize: pulumi.String("STANDARD_A1_V2"),
// FixedScale: &batch.PoolFixedScaleArgs{
// TargetDedicatedNodes: pulumi.Int(1),
// },
// StorageImageReference: &batch.PoolStorageImageReferenceArgs{
// 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 = batch.NewJob(ctx, "example", &batch.JobArgs{
// Name: pulumi.String("examplejob"),
// BatchPoolId: examplePool.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Batch Jobs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:batch/job:Job example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Batch/batchAccounts/account1/pools/pool1/jobs/job1
// ```
type Job struct {
pulumi.CustomResourceState
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
BatchPoolId pulumi.StringOutput `pulumi:"batchPoolId"`
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
CommonEnvironmentProperties pulumi.StringMapOutput `pulumi:"commonEnvironmentProperties"`
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
Priority pulumi.IntPtrOutput `pulumi:"priority"`
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
TaskRetryMaximum pulumi.IntPtrOutput `pulumi:"taskRetryMaximum"`
}
// NewJob registers a new resource with the given unique name, arguments, and options.
func NewJob(ctx *pulumi.Context,
name string, args *JobArgs, opts ...pulumi.ResourceOption) (*Job, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BatchPoolId == nil {
return nil, errors.New("invalid value for required argument 'BatchPoolId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Job
err := ctx.RegisterResource("azure:batch/job:Job", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJob gets an existing Job 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 GetJob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobState, opts ...pulumi.ResourceOption) (*Job, error) {
var resource Job
err := ctx.ReadResource("azure:batch/job:Job", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Job resources.
type jobState struct {
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
BatchPoolId *string `pulumi:"batchPoolId"`
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
CommonEnvironmentProperties map[string]string `pulumi:"commonEnvironmentProperties"`
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
DisplayName *string `pulumi:"displayName"`
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
Name *string `pulumi:"name"`
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
Priority *int `pulumi:"priority"`
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
TaskRetryMaximum *int `pulumi:"taskRetryMaximum"`
}
type JobState struct {
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
BatchPoolId pulumi.StringPtrInput
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
CommonEnvironmentProperties pulumi.StringMapInput
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
DisplayName pulumi.StringPtrInput
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
Name pulumi.StringPtrInput
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
Priority pulumi.IntPtrInput
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
TaskRetryMaximum pulumi.IntPtrInput
}
func (JobState) ElementType() reflect.Type {
return reflect.TypeOf((*jobState)(nil)).Elem()
}
type jobArgs struct {
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
BatchPoolId string `pulumi:"batchPoolId"`
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
CommonEnvironmentProperties map[string]string `pulumi:"commonEnvironmentProperties"`
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
DisplayName *string `pulumi:"displayName"`
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
Name *string `pulumi:"name"`
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
Priority *int `pulumi:"priority"`
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
TaskRetryMaximum *int `pulumi:"taskRetryMaximum"`
}
// The set of arguments for constructing a Job resource.
type JobArgs struct {
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
BatchPoolId pulumi.StringInput
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
CommonEnvironmentProperties pulumi.StringMapInput
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
DisplayName pulumi.StringPtrInput
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
Name pulumi.StringPtrInput
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
Priority pulumi.IntPtrInput
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
TaskRetryMaximum pulumi.IntPtrInput
}
func (JobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobArgs)(nil)).Elem()
}
type JobInput interface {
pulumi.Input
ToJobOutput() JobOutput
ToJobOutputWithContext(ctx context.Context) JobOutput
}
func (*Job) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (i *Job) ToJobOutput() JobOutput {
return i.ToJobOutputWithContext(context.Background())
}
func (i *Job) ToJobOutputWithContext(ctx context.Context) JobOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobOutput)
}
// JobArrayInput is an input type that accepts JobArray and JobArrayOutput values.
// You can construct a concrete instance of `JobArrayInput` via:
//
// JobArray{ JobArgs{...} }
type JobArrayInput interface {
pulumi.Input
ToJobArrayOutput() JobArrayOutput
ToJobArrayOutputWithContext(context.Context) JobArrayOutput
}
type JobArray []JobInput
func (JobArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Job)(nil)).Elem()
}
func (i JobArray) ToJobArrayOutput() JobArrayOutput {
return i.ToJobArrayOutputWithContext(context.Background())
}
func (i JobArray) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobArrayOutput)
}
// JobMapInput is an input type that accepts JobMap and JobMapOutput values.
// You can construct a concrete instance of `JobMapInput` via:
//
// JobMap{ "key": JobArgs{...} }
type JobMapInput interface {
pulumi.Input
ToJobMapOutput() JobMapOutput
ToJobMapOutputWithContext(context.Context) JobMapOutput
}
type JobMap map[string]JobInput
func (JobMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Job)(nil)).Elem()
}
func (i JobMap) ToJobMapOutput() JobMapOutput {
return i.ToJobMapOutputWithContext(context.Background())
}
func (i JobMap) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobMapOutput)
}
type JobOutput struct{ *pulumi.OutputState }
func (JobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (o JobOutput) ToJobOutput() JobOutput {
return o
}
func (o JobOutput) ToJobOutputWithContext(ctx context.Context) JobOutput {
return o
}
// The ID of the Batch Pool. Changing this forces a new Batch Job to be created.
func (o JobOutput) BatchPoolId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.BatchPoolId }).(pulumi.StringOutput)
}
// Specifies a map of common environment settings applied to this Batch Job. Changing this forces a new Batch Job to be created.
func (o JobOutput) CommonEnvironmentProperties() pulumi.StringMapOutput {
return o.ApplyT(func(v *Job) pulumi.StringMapOutput { return v.CommonEnvironmentProperties }).(pulumi.StringMapOutput)
}
// The display name of this Batch Job. Changing this forces a new Batch Job to be created.
func (o JobOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Batch Job. Changing this forces a new Batch Job to be created.
func (o JobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The priority of this Batch Job, possible values can range from -1000 (lowest) to 1000 (highest). Defaults to `0`.
func (o JobOutput) Priority() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Job) pulumi.IntPtrOutput { return v.Priority }).(pulumi.IntPtrOutput)
}
// The number of retries to each Batch Task belongs to this Batch Job. If this is set to `0`, the Batch service does not retry Tasks. If this is set to `-1`, the Batch service retries Batch Tasks without limit.
func (o JobOutput) TaskRetryMaximum() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Job) pulumi.IntPtrOutput { return v.TaskRetryMaximum }).(pulumi.IntPtrOutput)
}
type JobArrayOutput struct{ *pulumi.OutputState }
func (JobArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Job)(nil)).Elem()
}
func (o JobArrayOutput) ToJobArrayOutput() JobArrayOutput {
return o
}
func (o JobArrayOutput) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput {
return o
}
func (o JobArrayOutput) Index(i pulumi.IntInput) JobOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Job {
return vs[0].([]*Job)[vs[1].(int)]
}).(JobOutput)
}
type JobMapOutput struct{ *pulumi.OutputState }
func (JobMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Job)(nil)).Elem()
}
func (o JobMapOutput) ToJobMapOutput() JobMapOutput {
return o
}
func (o JobMapOutput) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput {
return o
}
func (o JobMapOutput) MapIndex(k pulumi.StringInput) JobOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Job {
return vs[0].(map[string]*Job)[vs[1].(string)]
}).(JobOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobInput)(nil)).Elem(), &Job{})
pulumi.RegisterInputType(reflect.TypeOf((*JobArrayInput)(nil)).Elem(), JobArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobMapInput)(nil)).Elem(), JobMap{})
pulumi.RegisterOutputType(JobOutput{})
pulumi.RegisterOutputType(JobArrayOutput{})
pulumi.RegisterOutputType(JobMapOutput{})
}
| 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/batch/getPool.go | sdk/go/azure/batch/getPool.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 batch
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 Batch pool
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := batch.LookupPool(ctx, &batch.LookupPoolArgs{
// Name: "examplebatchpool",
// AccountName: "examplebatchaccount",
// ResourceGroupName: "example",
// }, 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.Batch` - 2024-07-01
func LookupPool(ctx *pulumi.Context, args *LookupPoolArgs, opts ...pulumi.InvokeOption) (*LookupPoolResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPoolResult
err := ctx.Invoke("azure:batch/getPool:getPool", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPool.
type LookupPoolArgs struct {
// The Batch Account name associated with the Batch pool.
AccountName string `pulumi:"accountName"`
// The name of the Batch pool.
Name string `pulumi:"name"`
// The name of the resource group in which the Batch pool exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getPool.
type LookupPoolResult struct {
// The Azure Storage Account name.
AccountName string `pulumi:"accountName"`
// A `autoScale` block that describes the scale settings when using auto scale.
AutoScales []GetPoolAutoScale `pulumi:"autoScales"`
// One or more `certificate` blocks that describe the certificates installed on each compute node in the pool.
Certificates []GetPoolCertificate `pulumi:"certificates"`
// The container configuration used in the pool's VMs.
ContainerConfigurations []GetPoolContainerConfiguration `pulumi:"containerConfigurations"`
// A `dataDisks` block describes the data disk settings.
DataDisks []GetPoolDataDisk `pulumi:"dataDisks"`
// A `diskEncryption` block describes the disk encryption configuration applied on compute nodes in the pool.
DiskEncryptions []GetPoolDiskEncryption `pulumi:"diskEncryptions"`
DisplayName string `pulumi:"displayName"`
// An `extensions` block describes the extension settings
Extensions []GetPoolExtension `pulumi:"extensions"`
// A `fixedScale` block that describes the scale settings when using fixed scale.
FixedScales []GetPoolFixedScale `pulumi:"fixedScales"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool.
InterNodeCommunication string `pulumi:"interNodeCommunication"`
// The type of on-premises license to be used when deploying the operating system.
LicenseType string `pulumi:"licenseType"`
// The maximum number of tasks that can run concurrently on a single compute node in the pool.
MaxTasksPerNode int `pulumi:"maxTasksPerNode"`
Metadata map[string]string `pulumi:"metadata"`
// A `mount` block that describes mount configuration.
Mounts []GetPoolMount `pulumi:"mounts"`
// The name of the user account.
Name string `pulumi:"name"`
NetworkConfigurations []GetPoolNetworkConfiguration `pulumi:"networkConfigurations"`
// The SKU of the node agents in the Batch pool.
NodeAgentSkuId string `pulumi:"nodeAgentSkuId"`
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool.
NodePlacements []GetPoolNodePlacement `pulumi:"nodePlacements"`
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool.
OsDiskPlacement string `pulumi:"osDiskPlacement"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `startTask` block that describes the start task settings for the Batch pool.
StartTasks []GetPoolStartTask `pulumi:"startTasks"`
// The reference of the storage image used by the nodes in the Batch pool.
StorageImageReferences []GetPoolStorageImageReference `pulumi:"storageImageReferences"`
// A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool.
TaskSchedulingPolicies []GetPoolTaskSchedulingPolicy `pulumi:"taskSchedulingPolicies"`
// A `userAccounts` block that describes the list of user accounts to be created on each node in the pool.
UserAccounts []GetPoolUserAccount `pulumi:"userAccounts"`
// The size of the VM created in the Batch pool.
VmSize string `pulumi:"vmSize"`
// A `windows` block that describes the Windows configuration in the pool.
Windows []GetPoolWindow `pulumi:"windows"`
}
func LookupPoolOutput(ctx *pulumi.Context, args LookupPoolOutputArgs, opts ...pulumi.InvokeOption) LookupPoolResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupPoolResultOutput, error) {
args := v.(LookupPoolArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:batch/getPool:getPool", args, LookupPoolResultOutput{}, options).(LookupPoolResultOutput), nil
}).(LookupPoolResultOutput)
}
// A collection of arguments for invoking getPool.
type LookupPoolOutputArgs struct {
// The Batch Account name associated with the Batch pool.
AccountName pulumi.StringInput `pulumi:"accountName"`
// The name of the Batch pool.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the Batch pool exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupPoolOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPoolArgs)(nil)).Elem()
}
// A collection of values returned by getPool.
type LookupPoolResultOutput struct{ *pulumi.OutputState }
func (LookupPoolResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPoolResult)(nil)).Elem()
}
func (o LookupPoolResultOutput) ToLookupPoolResultOutput() LookupPoolResultOutput {
return o
}
func (o LookupPoolResultOutput) ToLookupPoolResultOutputWithContext(ctx context.Context) LookupPoolResultOutput {
return o
}
// The Azure Storage Account name.
func (o LookupPoolResultOutput) AccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.AccountName }).(pulumi.StringOutput)
}
// A `autoScale` block that describes the scale settings when using auto scale.
func (o LookupPoolResultOutput) AutoScales() GetPoolAutoScaleArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolAutoScale { return v.AutoScales }).(GetPoolAutoScaleArrayOutput)
}
// One or more `certificate` blocks that describe the certificates installed on each compute node in the pool.
func (o LookupPoolResultOutput) Certificates() GetPoolCertificateArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolCertificate { return v.Certificates }).(GetPoolCertificateArrayOutput)
}
// The container configuration used in the pool's VMs.
func (o LookupPoolResultOutput) ContainerConfigurations() GetPoolContainerConfigurationArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolContainerConfiguration { return v.ContainerConfigurations }).(GetPoolContainerConfigurationArrayOutput)
}
// A `dataDisks` block describes the data disk settings.
func (o LookupPoolResultOutput) DataDisks() GetPoolDataDiskArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolDataDisk { return v.DataDisks }).(GetPoolDataDiskArrayOutput)
}
// A `diskEncryption` block describes the disk encryption configuration applied on compute nodes in the pool.
func (o LookupPoolResultOutput) DiskEncryptions() GetPoolDiskEncryptionArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolDiskEncryption { return v.DiskEncryptions }).(GetPoolDiskEncryptionArrayOutput)
}
func (o LookupPoolResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// An `extensions` block describes the extension settings
func (o LookupPoolResultOutput) Extensions() GetPoolExtensionArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolExtension { return v.Extensions }).(GetPoolExtensionArrayOutput)
}
// A `fixedScale` block that describes the scale settings when using fixed scale.
func (o LookupPoolResultOutput) FixedScales() GetPoolFixedScaleArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolFixedScale { return v.FixedScales }).(GetPoolFixedScaleArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupPoolResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.Id }).(pulumi.StringOutput)
}
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool.
func (o LookupPoolResultOutput) InterNodeCommunication() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.InterNodeCommunication }).(pulumi.StringOutput)
}
// The type of on-premises license to be used when deploying the operating system.
func (o LookupPoolResultOutput) LicenseType() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.LicenseType }).(pulumi.StringOutput)
}
// The maximum number of tasks that can run concurrently on a single compute node in the pool.
func (o LookupPoolResultOutput) MaxTasksPerNode() pulumi.IntOutput {
return o.ApplyT(func(v LookupPoolResult) int { return v.MaxTasksPerNode }).(pulumi.IntOutput)
}
func (o LookupPoolResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupPoolResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
// A `mount` block that describes mount configuration.
func (o LookupPoolResultOutput) Mounts() GetPoolMountArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolMount { return v.Mounts }).(GetPoolMountArrayOutput)
}
// The name of the user account.
func (o LookupPoolResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupPoolResultOutput) NetworkConfigurations() GetPoolNetworkConfigurationArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolNetworkConfiguration { return v.NetworkConfigurations }).(GetPoolNetworkConfigurationArrayOutput)
}
// The SKU of the node agents in the Batch pool.
func (o LookupPoolResultOutput) NodeAgentSkuId() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.NodeAgentSkuId }).(pulumi.StringOutput)
}
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool.
func (o LookupPoolResultOutput) NodePlacements() GetPoolNodePlacementArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolNodePlacement { return v.NodePlacements }).(GetPoolNodePlacementArrayOutput)
}
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool.
func (o LookupPoolResultOutput) OsDiskPlacement() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.OsDiskPlacement }).(pulumi.StringOutput)
}
func (o LookupPoolResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `startTask` block that describes the start task settings for the Batch pool.
func (o LookupPoolResultOutput) StartTasks() GetPoolStartTaskArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolStartTask { return v.StartTasks }).(GetPoolStartTaskArrayOutput)
}
// The reference of the storage image used by the nodes in the Batch pool.
func (o LookupPoolResultOutput) StorageImageReferences() GetPoolStorageImageReferenceArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolStorageImageReference { return v.StorageImageReferences }).(GetPoolStorageImageReferenceArrayOutput)
}
// A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool.
func (o LookupPoolResultOutput) TaskSchedulingPolicies() GetPoolTaskSchedulingPolicyArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolTaskSchedulingPolicy { return v.TaskSchedulingPolicies }).(GetPoolTaskSchedulingPolicyArrayOutput)
}
// A `userAccounts` block that describes the list of user accounts to be created on each node in the pool.
func (o LookupPoolResultOutput) UserAccounts() GetPoolUserAccountArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolUserAccount { return v.UserAccounts }).(GetPoolUserAccountArrayOutput)
}
// The size of the VM created in the Batch pool.
func (o LookupPoolResultOutput) VmSize() pulumi.StringOutput {
return o.ApplyT(func(v LookupPoolResult) string { return v.VmSize }).(pulumi.StringOutput)
}
// A `windows` block that describes the Windows configuration in the pool.
func (o LookupPoolResultOutput) Windows() GetPoolWindowArrayOutput {
return o.ApplyT(func(v LookupPoolResult) []GetPoolWindow { return v.Windows }).(GetPoolWindowArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPoolResultOutput{})
}
| 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/batch/getAccount.go | sdk/go/azure/batch/getAccount.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package batch
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 Batch Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := batch.LookupAccount(ctx, &batch.LookupAccountArgs{
// Name: "testbatchaccount",
// ResourceGroupName: "test",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("poolAllocationMode", example.PoolAllocationMode)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Batch` - 2024-07-01
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccountResult
err := ctx.Invoke("azure:batch/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// The name of the Batch account.
Name string `pulumi:"name"`
// The Name of the Resource Group where this Batch account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The account endpoint used to interact with the Batch service.
AccountEndpoint string `pulumi:"accountEndpoint"`
// The `encryption` block that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
Encryptions []GetAccountEncryption `pulumi:"encryptions"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The `keyVaultReference` block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReferences []GetAccountKeyVaultReference `pulumi:"keyVaultReferences"`
// The Azure Region in which this Batch account exists.
Location string `pulumi:"location"`
// The Batch account name.
Name string `pulumi:"name"`
// The pool allocation mode configured for this Batch account.
PoolAllocationMode string `pulumi:"poolAllocationMode"`
// The Batch account primary access key.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Batch account secondary access key.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// The ID of the Storage Account used for this Batch account.
StorageAccountId string `pulumi:"storageAccountId"`
// A map of tags assigned to the Batch account.
Tags map[string]string `pulumi:"tags"`
}
func LookupAccountOutput(ctx *pulumi.Context, args LookupAccountOutputArgs, opts ...pulumi.InvokeOption) LookupAccountResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAccountResultOutput, error) {
args := v.(LookupAccountArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:batch/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// The name of the Batch account.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where this Batch account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupAccountOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountArgs)(nil)).Elem()
}
// A collection of values returned by getAccount.
type LookupAccountResultOutput struct{ *pulumi.OutputState }
func (LookupAccountResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountResult)(nil)).Elem()
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutput() LookupAccountResultOutput {
return o
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutputWithContext(ctx context.Context) LookupAccountResultOutput {
return o
}
// The account endpoint used to interact with the Batch service.
func (o LookupAccountResultOutput) AccountEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccountEndpoint }).(pulumi.StringOutput)
}
// The `encryption` block that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
func (o LookupAccountResultOutput) Encryptions() GetAccountEncryptionArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountEncryption { return v.Encryptions }).(GetAccountEncryptionArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAccountResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Id }).(pulumi.StringOutput)
}
// The `keyVaultReference` block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
func (o LookupAccountResultOutput) KeyVaultReferences() GetAccountKeyVaultReferenceArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountKeyVaultReference { return v.KeyVaultReferences }).(GetAccountKeyVaultReferenceArrayOutput)
}
// The Azure Region in which this Batch account exists.
func (o LookupAccountResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Location }).(pulumi.StringOutput)
}
// The Batch account name.
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
// The pool allocation mode configured for this Batch account.
func (o LookupAccountResultOutput) PoolAllocationMode() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PoolAllocationMode }).(pulumi.StringOutput)
}
// The Batch account primary access key.
func (o LookupAccountResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Batch account secondary access key.
func (o LookupAccountResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// The ID of the Storage Account used for this Batch account.
func (o LookupAccountResultOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
// A map of tags assigned to the Batch account.
func (o LookupAccountResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAccountResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAccountResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/batch/pool.go | sdk/go/azure/batch/pool.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 batch
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 Batch pool.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("testaccbatch"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("testaccsa"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleAccount2, err := batch.NewAccount(ctx, "example", &batch.AccountArgs{
// Name: pulumi.String("testaccbatch"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PoolAllocationMode: pulumi.String("BatchService"),
// StorageAccountId: exampleAccount.ID(),
// StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
// Tags: pulumi.StringMap{
// "env": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate.cer",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := batch.NewCertificate(ctx, "example", &batch.CertificateArgs{
// ResourceGroupName: example.Name,
// AccountName: exampleAccount2.Name,
// Certificate: pulumi.String(invokeFilebase64.Result),
// Format: pulumi.String("Cer"),
// Thumbprint: pulumi.String("312d31a79fa0cef49c00f769afc2b73e9f4edf34"),
// ThumbprintAlgorithm: pulumi.String("SHA1"),
// })
// if err != nil {
// return err
// }
// _, err = batch.NewPool(ctx, "example", &batch.PoolArgs{
// Name: pulumi.String("testaccpool"),
// ResourceGroupName: example.Name,
// AccountName: exampleAccount2.Name,
// DisplayName: pulumi.String("Test Acc Pool Auto"),
// VmSize: pulumi.String("STANDARD_A1_V2"),
// NodeAgentSkuId: pulumi.String("batch.node.ubuntu 20.04"),
// AutoScale: &batch.PoolAutoScaleArgs{
// EvaluationInterval: pulumi.String("PT15M"),
// Formula: pulumi.String(` startingNumberOfVMs = 1;
// maxNumberofVMs = 25;
// pendingTaskSamplePercent = $PendingTasks.GetSamplePercent(180 * TimeInterval_Second);
// pendingTaskSamples = pendingTaskSamplePercent < 70 ? startingNumberOfVMs : avg($PendingTasks.GetSample(180 * TimeInterval_Second));
// $TargetDedicatedNodes=min(maxNumberofVMs, pendingTaskSamples);
//
// `),
//
// },
// StorageImageReference: &batch.PoolStorageImageReferenceArgs{
// Publisher: pulumi.String("microsoft-azure-batch"),
// Offer: pulumi.String("ubuntu-server-container"),
// Sku: pulumi.String("20-04-lts"),
// Version: pulumi.String("latest"),
// },
// ContainerConfiguration: &batch.PoolContainerConfigurationArgs{
// Type: pulumi.String("DockerCompatible"),
// ContainerRegistries: batch.PoolContainerConfigurationContainerRegistryArray{
// &batch.PoolContainerConfigurationContainerRegistryArgs{
// RegistryServer: pulumi.String("docker.io"),
// UserName: pulumi.String("login"),
// Password: pulumi.String("apassword"),
// },
// },
// },
// StartTask: &batch.PoolStartTaskArgs{
// CommandLine: pulumi.String("echo 'Hello World from $env'"),
// TaskRetryMaximum: pulumi.Int(1),
// WaitForSuccess: pulumi.Bool(true),
// CommonEnvironmentProperties: pulumi.StringMap{
// "env": pulumi.String("TEST"),
// },
// UserIdentity: &batch.PoolStartTaskUserIdentityArgs{
// AutoUser: &batch.PoolStartTaskUserIdentityAutoUserArgs{
// ElevationLevel: pulumi.String("NonAdmin"),
// Scope: pulumi.String("Task"),
// },
// },
// },
// Certificates: batch.PoolCertificateArray{
// &batch.PoolCertificateArgs{
// Id: exampleCertificate.ID(),
// StoreLocation: pulumi.String("CurrentUser"),
// Visibilities: pulumi.StringArray{
// pulumi.String("StartTask"),
// },
// },
// },
// })
// 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.Batch` - 2024-07-01
//
// ## Import
//
// Batch Pools can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:batch/pool:Pool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Batch/batchAccounts/myBatchAccount1/pools/myBatchPool1
// ```
type Pool struct {
pulumi.CustomResourceState
// Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
AccountName pulumi.StringOutput `pulumi:"accountName"`
// A `autoScale` block that describes the scale settings when using auto scale as defined below.
AutoScale PoolAutoScalePtrOutput `pulumi:"autoScale"`
// One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool as defined below.
Certificates PoolCertificateArrayOutput `pulumi:"certificates"`
// The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below.
ContainerConfiguration PoolContainerConfigurationPtrOutput `pulumi:"containerConfiguration"`
// A `dataDisks` block describes the data disk settings as defined below.
DataDisks PoolDataDiskArrayOutput `pulumi:"dataDisks"`
// A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.
DiskEncryptions PoolDiskEncryptionArrayOutput `pulumi:"diskEncryptions"`
// Specifies the display name of the Batch pool. Changing this forces a new resource to be created.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// An `extensions` block as defined below.
Extensions PoolExtensionArrayOutput `pulumi:"extensions"`
// A `fixedScale` block that describes the scale settings when using fixed scale as defined below.
FixedScale PoolFixedScalePtrOutput `pulumi:"fixedScale"`
// An `identity` block as defined below.
Identity PoolIdentityPtrOutput `pulumi:"identity"`
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`.
InterNodeCommunication pulumi.StringPtrOutput `pulumi:"interNodeCommunication"`
// The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client.
LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"`
// Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
MaxTasksPerNode pulumi.IntPtrOutput `pulumi:"maxTasksPerNode"`
// A map of custom batch pool metadata.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// A `mount` block defined as below.
Mounts PoolMountArrayOutput `pulumi:"mounts"`
// Specifies the name of the Batch pool. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created.
NetworkConfiguration PoolNetworkConfigurationPtrOutput `pulumi:"networkConfiguration"`
// Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created.
NodeAgentSkuId pulumi.StringOutput `pulumi:"nodeAgentSkuId"`
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below.
NodePlacements PoolNodePlacementArrayOutput `pulumi:"nodePlacements"`
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements> and Linux VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements>. The only possible value is `CacheDisk`.
OsDiskPlacement pulumi.StringPtrOutput `pulumi:"osDiskPlacement"`
// The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created.
SecurityProfile PoolSecurityProfilePtrOutput `pulumi:"securityProfile"`
// A `startTask` block that describes the start task settings for the Batch pool as defined below.
StartTask PoolStartTaskPtrOutput `pulumi:"startTask"`
// Whether to stop if there is a pending resize operation on this pool.
StopPendingResizeOperation pulumi.BoolPtrOutput `pulumi:"stopPendingResizeOperation"`
// A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created.
StorageImageReference PoolStorageImageReferenceOutput `pulumi:"storageImageReference"`
// The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`.
TargetNodeCommunicationMode pulumi.StringPtrOutput `pulumi:"targetNodeCommunicationMode"`
// A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below.
TaskSchedulingPolicies PoolTaskSchedulingPolicyArrayOutput `pulumi:"taskSchedulingPolicies"`
// A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below.
UserAccounts PoolUserAccountArrayOutput `pulumi:"userAccounts"`
// Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created.
VmSize pulumi.StringOutput `pulumi:"vmSize"`
// A `windows` block that describes the Windows configuration in the pool as defined below.
//
// > **Note:** For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable `AZ_BATCH_CERTIFICATES_DIR` is supplied to the task to query for this location. For certificates with visibility of `remoteUser`, a `certs` directory is created in the user's home directory (e.g., `/home/{user-name}/certs`) and certificates are placed in that directory.
//
// > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time.
Windows PoolWindowArrayOutput `pulumi:"windows"`
}
// NewPool registers a new resource with the given unique name, arguments, and options.
func NewPool(ctx *pulumi.Context,
name string, args *PoolArgs, opts ...pulumi.ResourceOption) (*Pool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountName == nil {
return nil, errors.New("invalid value for required argument 'AccountName'")
}
if args.NodeAgentSkuId == nil {
return nil, errors.New("invalid value for required argument 'NodeAgentSkuId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageImageReference == nil {
return nil, errors.New("invalid value for required argument 'StorageImageReference'")
}
if args.VmSize == nil {
return nil, errors.New("invalid value for required argument 'VmSize'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Pool
err := ctx.RegisterResource("azure:batch/pool:Pool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPool gets an existing Pool 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 GetPool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PoolState, opts ...pulumi.ResourceOption) (*Pool, error) {
var resource Pool
err := ctx.ReadResource("azure:batch/pool:Pool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Pool resources.
type poolState struct {
// Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
AccountName *string `pulumi:"accountName"`
// A `autoScale` block that describes the scale settings when using auto scale as defined below.
AutoScale *PoolAutoScale `pulumi:"autoScale"`
// One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool as defined below.
Certificates []PoolCertificate `pulumi:"certificates"`
// The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below.
ContainerConfiguration *PoolContainerConfiguration `pulumi:"containerConfiguration"`
// A `dataDisks` block describes the data disk settings as defined below.
DataDisks []PoolDataDisk `pulumi:"dataDisks"`
// A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.
DiskEncryptions []PoolDiskEncryption `pulumi:"diskEncryptions"`
// Specifies the display name of the Batch pool. Changing this forces a new resource to be created.
DisplayName *string `pulumi:"displayName"`
// An `extensions` block as defined below.
Extensions []PoolExtension `pulumi:"extensions"`
// A `fixedScale` block that describes the scale settings when using fixed scale as defined below.
FixedScale *PoolFixedScale `pulumi:"fixedScale"`
// An `identity` block as defined below.
Identity *PoolIdentity `pulumi:"identity"`
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`.
InterNodeCommunication *string `pulumi:"interNodeCommunication"`
// The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client.
LicenseType *string `pulumi:"licenseType"`
// Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
MaxTasksPerNode *int `pulumi:"maxTasksPerNode"`
// A map of custom batch pool metadata.
Metadata map[string]string `pulumi:"metadata"`
// A `mount` block defined as below.
Mounts []PoolMount `pulumi:"mounts"`
// Specifies the name of the Batch pool. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created.
NetworkConfiguration *PoolNetworkConfiguration `pulumi:"networkConfiguration"`
// Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created.
NodeAgentSkuId *string `pulumi:"nodeAgentSkuId"`
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below.
NodePlacements []PoolNodePlacement `pulumi:"nodePlacements"`
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements> and Linux VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements>. The only possible value is `CacheDisk`.
OsDiskPlacement *string `pulumi:"osDiskPlacement"`
// The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created.
SecurityProfile *PoolSecurityProfile `pulumi:"securityProfile"`
// A `startTask` block that describes the start task settings for the Batch pool as defined below.
StartTask *PoolStartTask `pulumi:"startTask"`
// Whether to stop if there is a pending resize operation on this pool.
StopPendingResizeOperation *bool `pulumi:"stopPendingResizeOperation"`
// A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created.
StorageImageReference *PoolStorageImageReference `pulumi:"storageImageReference"`
// The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`.
TargetNodeCommunicationMode *string `pulumi:"targetNodeCommunicationMode"`
// A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below.
TaskSchedulingPolicies []PoolTaskSchedulingPolicy `pulumi:"taskSchedulingPolicies"`
// A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below.
UserAccounts []PoolUserAccount `pulumi:"userAccounts"`
// Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created.
VmSize *string `pulumi:"vmSize"`
// A `windows` block that describes the Windows configuration in the pool as defined below.
//
// > **Note:** For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable `AZ_BATCH_CERTIFICATES_DIR` is supplied to the task to query for this location. For certificates with visibility of `remoteUser`, a `certs` directory is created in the user's home directory (e.g., `/home/{user-name}/certs`) and certificates are placed in that directory.
//
// > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time.
Windows []PoolWindow `pulumi:"windows"`
}
type PoolState struct {
// Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
AccountName pulumi.StringPtrInput
// A `autoScale` block that describes the scale settings when using auto scale as defined below.
AutoScale PoolAutoScalePtrInput
// One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool as defined below.
Certificates PoolCertificateArrayInput
// The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below.
ContainerConfiguration PoolContainerConfigurationPtrInput
// A `dataDisks` block describes the data disk settings as defined below.
DataDisks PoolDataDiskArrayInput
// A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.
DiskEncryptions PoolDiskEncryptionArrayInput
// Specifies the display name of the Batch pool. Changing this forces a new resource to be created.
DisplayName pulumi.StringPtrInput
// An `extensions` block as defined below.
Extensions PoolExtensionArrayInput
// A `fixedScale` block that describes the scale settings when using fixed scale as defined below.
FixedScale PoolFixedScalePtrInput
// An `identity` block as defined below.
Identity PoolIdentityPtrInput
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`.
InterNodeCommunication pulumi.StringPtrInput
// The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client.
LicenseType pulumi.StringPtrInput
// Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
MaxTasksPerNode pulumi.IntPtrInput
// A map of custom batch pool metadata.
Metadata pulumi.StringMapInput
// A `mount` block defined as below.
Mounts PoolMountArrayInput
// Specifies the name of the Batch pool. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created.
NetworkConfiguration PoolNetworkConfigurationPtrInput
// Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created.
NodeAgentSkuId pulumi.StringPtrInput
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below.
NodePlacements PoolNodePlacementArrayInput
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements> and Linux VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements>. The only possible value is `CacheDisk`.
OsDiskPlacement pulumi.StringPtrInput
// The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created.
SecurityProfile PoolSecurityProfilePtrInput
// A `startTask` block that describes the start task settings for the Batch pool as defined below.
StartTask PoolStartTaskPtrInput
// Whether to stop if there is a pending resize operation on this pool.
StopPendingResizeOperation pulumi.BoolPtrInput
// A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created.
StorageImageReference PoolStorageImageReferencePtrInput
// The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`.
TargetNodeCommunicationMode pulumi.StringPtrInput
// A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below.
TaskSchedulingPolicies PoolTaskSchedulingPolicyArrayInput
// A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below.
UserAccounts PoolUserAccountArrayInput
// Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created.
VmSize pulumi.StringPtrInput
// A `windows` block that describes the Windows configuration in the pool as defined below.
//
// > **Note:** For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable `AZ_BATCH_CERTIFICATES_DIR` is supplied to the task to query for this location. For certificates with visibility of `remoteUser`, a `certs` directory is created in the user's home directory (e.g., `/home/{user-name}/certs`) and certificates are placed in that directory.
//
// > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time.
Windows PoolWindowArrayInput
}
func (PoolState) ElementType() reflect.Type {
return reflect.TypeOf((*poolState)(nil)).Elem()
}
type poolArgs struct {
// Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created.
AccountName string `pulumi:"accountName"`
// A `autoScale` block that describes the scale settings when using auto scale as defined below.
AutoScale *PoolAutoScale `pulumi:"autoScale"`
// One or more `certificate` blocks that describe the certificates to be installed on each compute node in the pool as defined below.
Certificates []PoolCertificate `pulumi:"certificates"`
// The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below.
ContainerConfiguration *PoolContainerConfiguration `pulumi:"containerConfiguration"`
// A `dataDisks` block describes the data disk settings as defined below.
DataDisks []PoolDataDisk `pulumi:"dataDisks"`
// A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.
DiskEncryptions []PoolDiskEncryption `pulumi:"diskEncryptions"`
// Specifies the display name of the Batch pool. Changing this forces a new resource to be created.
DisplayName *string `pulumi:"displayName"`
// An `extensions` block as defined below.
Extensions []PoolExtension `pulumi:"extensions"`
// A `fixedScale` block that describes the scale settings when using fixed scale as defined below.
FixedScale *PoolFixedScale `pulumi:"fixedScale"`
// An `identity` block as defined below.
Identity *PoolIdentity `pulumi:"identity"`
// Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`.
InterNodeCommunication *string `pulumi:"interNodeCommunication"`
// The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client.
LicenseType *string `pulumi:"licenseType"`
// Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created.
MaxTasksPerNode *int `pulumi:"maxTasksPerNode"`
// A map of custom batch pool metadata.
Metadata map[string]string `pulumi:"metadata"`
// A `mount` block defined as below.
Mounts []PoolMount `pulumi:"mounts"`
// Specifies the name of the Batch pool. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created.
NetworkConfiguration *PoolNetworkConfiguration `pulumi:"networkConfiguration"`
// Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created.
NodeAgentSkuId string `pulumi:"nodeAgentSkuId"`
// A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below.
NodePlacements []PoolNodePlacement `pulumi:"nodePlacements"`
// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements> and Linux VMs at <https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements>. The only possible value is `CacheDisk`.
OsDiskPlacement *string `pulumi:"osDiskPlacement"`
// The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created.
SecurityProfile *PoolSecurityProfile `pulumi:"securityProfile"`
// A `startTask` block that describes the start task settings for the Batch pool as defined below.
StartTask *PoolStartTask `pulumi:"startTask"`
// Whether to stop if there is a pending resize operation on this pool.
| 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/batch/certificate.go | sdk/go/azure/batch/certificate.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 batch
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a certificate in an Azure Batch account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("testbatch"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("teststorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleAccount2, err := batch.NewAccount(ctx, "example", &batch.AccountArgs{
// Name: pulumi.String("testbatchaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PoolAllocationMode: pulumi.String("BatchService"),
// StorageAccountId: exampleAccount.ID(),
// StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
// Tags: pulumi.StringMap{
// "env": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate.pfx",
// }, nil)
// if err != nil {
// return err
// }
// _, err = batch.NewCertificate(ctx, "example", &batch.CertificateArgs{
// ResourceGroupName: example.Name,
// AccountName: exampleAccount2.Name,
// Certificate: pulumi.String(invokeFilebase64.Result),
// Format: pulumi.String("Pfx"),
// Password: pulumi.String("password"),
// Thumbprint: pulumi.String("42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"),
// ThumbprintAlgorithm: pulumi.String("SHA1"),
// })
// 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.Batch` - 2024-07-01
//
// ## Import
//
// Batch Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:batch/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Batch/batchAccounts/batch1/certificates/certificate1
// ```
type Certificate struct {
pulumi.CustomResourceState
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringOutput `pulumi:"accountName"`
// The base64-encoded contents of the certificate.
Certificate pulumi.StringOutput `pulumi:"certificate"`
// The format of the certificate. Possible values are `Cer` or `Pfx`.
Format pulumi.StringOutput `pulumi:"format"`
// The generated name of the certificate.
Name pulumi.StringOutput `pulumi:"name"`
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
Password pulumi.StringPtrOutput `pulumi:"password"`
// The public key of the certificate.
PublicData pulumi.StringOutput `pulumi:"publicData"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The thumbprint of the certificate. Changing this forces a new resource to be created.
Thumbprint pulumi.StringOutput `pulumi:"thumbprint"`
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
ThumbprintAlgorithm pulumi.StringOutput `pulumi:"thumbprintAlgorithm"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountName == nil {
return nil, errors.New("invalid value for required argument 'AccountName'")
}
if args.Certificate == nil {
return nil, errors.New("invalid value for required argument 'Certificate'")
}
if args.Format == nil {
return nil, errors.New("invalid value for required argument 'Format'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Thumbprint == nil {
return nil, errors.New("invalid value for required argument 'Thumbprint'")
}
if args.ThumbprintAlgorithm == nil {
return nil, errors.New("invalid value for required argument 'ThumbprintAlgorithm'")
}
if args.Certificate != nil {
args.Certificate = pulumi.ToSecret(args.Certificate).(pulumi.StringInput)
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"certificate",
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("azure:batch/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate 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 GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("azure:batch/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
AccountName *string `pulumi:"accountName"`
// The base64-encoded contents of the certificate.
Certificate *string `pulumi:"certificate"`
// The format of the certificate. Possible values are `Cer` or `Pfx`.
Format *string `pulumi:"format"`
// The generated name of the certificate.
Name *string `pulumi:"name"`
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
Password *string `pulumi:"password"`
// The public key of the certificate.
PublicData *string `pulumi:"publicData"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The thumbprint of the certificate. Changing this forces a new resource to be created.
Thumbprint *string `pulumi:"thumbprint"`
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
ThumbprintAlgorithm *string `pulumi:"thumbprintAlgorithm"`
}
type CertificateState struct {
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringPtrInput
// The base64-encoded contents of the certificate.
Certificate pulumi.StringPtrInput
// The format of the certificate. Possible values are `Cer` or `Pfx`.
Format pulumi.StringPtrInput
// The generated name of the certificate.
Name pulumi.StringPtrInput
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
Password pulumi.StringPtrInput
// The public key of the certificate.
PublicData pulumi.StringPtrInput
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The thumbprint of the certificate. Changing this forces a new resource to be created.
Thumbprint pulumi.StringPtrInput
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
ThumbprintAlgorithm pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
AccountName string `pulumi:"accountName"`
// The base64-encoded contents of the certificate.
Certificate string `pulumi:"certificate"`
// The format of the certificate. Possible values are `Cer` or `Pfx`.
Format string `pulumi:"format"`
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
Password *string `pulumi:"password"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The thumbprint of the certificate. Changing this forces a new resource to be created.
Thumbprint string `pulumi:"thumbprint"`
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
ThumbprintAlgorithm string `pulumi:"thumbprintAlgorithm"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringInput
// The base64-encoded contents of the certificate.
Certificate pulumi.StringInput
// The format of the certificate. Possible values are `Cer` or `Pfx`.
Format pulumi.StringInput
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
Password pulumi.StringPtrInput
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The thumbprint of the certificate. Changing this forces a new resource to be created.
Thumbprint pulumi.StringInput
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
ThumbprintAlgorithm pulumi.StringInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// Specifies the name of the Batch account. Changing this forces a new resource to be created.
func (o CertificateOutput) AccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.AccountName }).(pulumi.StringOutput)
}
// The base64-encoded contents of the certificate.
func (o CertificateOutput) Certificate() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Certificate }).(pulumi.StringOutput)
}
// The format of the certificate. Possible values are `Cer` or `Pfx`.
func (o CertificateOutput) Format() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Format }).(pulumi.StringOutput)
}
// The generated name of the certificate.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The password to access the certificate's private key. This can only be specified when `format` is `Pfx`.
func (o CertificateOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// The public key of the certificate.
func (o CertificateOutput) PublicData() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.PublicData }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
func (o CertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The thumbprint of the certificate. Changing this forces a new resource to be created.
func (o CertificateOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput)
}
// The algorithm of the certificate thumbprint. At this time the only supported value is `SHA1`. Changing this forces a new resource to be created.
func (o CertificateOutput) ThumbprintAlgorithm() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ThumbprintAlgorithm }).(pulumi.StringOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}
| 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/batch/application.go | sdk/go/azure/batch/application.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 batch
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages Azure Batch Application instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "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
// }
// 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
// }
// exampleAccount2, err := batch.NewAccount(ctx, "example", &batch.AccountArgs{
// Name: pulumi.String("exampleba"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PoolAllocationMode: pulumi.String("BatchService"),
// StorageAccountId: exampleAccount.ID(),
// StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
// })
// if err != nil {
// return err
// }
// _, err = batch.NewApplication(ctx, "example", &batch.ApplicationArgs{
// Name: pulumi.String("example-batch-application"),
// ResourceGroupName: example.Name,
// AccountName: exampleAccount2.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.Batch` - 2024-07-01
//
// ## Import
//
// Batch Applications can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:batch/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Batch/batchAccounts/exampleba/applications/example-batch-application
// ```
type Application struct {
pulumi.CustomResourceState
// The name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringOutput `pulumi:"accountName"`
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
AllowUpdates pulumi.BoolPtrOutput `pulumi:"allowUpdates"`
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
DefaultVersion pulumi.StringPtrOutput `pulumi:"defaultVersion"`
// The display name for the application.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewApplication registers a new resource with the given unique name, arguments, and options.
func NewApplication(ctx *pulumi.Context,
name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountName == nil {
return nil, errors.New("invalid value for required argument 'AccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Application
err := ctx.RegisterResource("azure:batch/application:Application", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplication gets an existing Application 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 GetApplication(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) {
var resource Application
err := ctx.ReadResource("azure:batch/application:Application", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Application resources.
type applicationState struct {
// The name of the Batch account. Changing this forces a new resource to be created.
AccountName *string `pulumi:"accountName"`
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
AllowUpdates *bool `pulumi:"allowUpdates"`
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
DefaultVersion *string `pulumi:"defaultVersion"`
// The display name for the application.
DisplayName *string `pulumi:"displayName"`
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ApplicationState struct {
// The name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringPtrInput
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
AllowUpdates pulumi.BoolPtrInput
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
DefaultVersion pulumi.StringPtrInput
// The display name for the application.
DisplayName pulumi.StringPtrInput
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ApplicationState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationState)(nil)).Elem()
}
type applicationArgs struct {
// The name of the Batch account. Changing this forces a new resource to be created.
AccountName string `pulumi:"accountName"`
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
AllowUpdates *bool `pulumi:"allowUpdates"`
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
DefaultVersion *string `pulumi:"defaultVersion"`
// The display name for the application.
DisplayName *string `pulumi:"displayName"`
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a Application resource.
type ApplicationArgs struct {
// The name of the Batch account. Changing this forces a new resource to be created.
AccountName pulumi.StringInput
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
AllowUpdates pulumi.BoolPtrInput
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
DefaultVersion pulumi.StringPtrInput
// The display name for the application.
DisplayName pulumi.StringPtrInput
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ApplicationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationArgs)(nil)).Elem()
}
type ApplicationInput interface {
pulumi.Input
ToApplicationOutput() ApplicationOutput
ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput
}
func (*Application) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (i *Application) ToApplicationOutput() ApplicationOutput {
return i.ToApplicationOutputWithContext(context.Background())
}
func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput)
}
// ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values.
// You can construct a concrete instance of `ApplicationArrayInput` via:
//
// ApplicationArray{ ApplicationArgs{...} }
type ApplicationArrayInput interface {
pulumi.Input
ToApplicationArrayOutput() ApplicationArrayOutput
ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput
}
type ApplicationArray []ApplicationInput
func (ApplicationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput {
return i.ToApplicationArrayOutputWithContext(context.Background())
}
func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput)
}
// ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values.
// You can construct a concrete instance of `ApplicationMapInput` via:
//
// ApplicationMap{ "key": ApplicationArgs{...} }
type ApplicationMapInput interface {
pulumi.Input
ToApplicationMapOutput() ApplicationMapOutput
ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput
}
type ApplicationMap map[string]ApplicationInput
func (ApplicationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput {
return i.ToApplicationMapOutputWithContext(context.Background())
}
func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput)
}
type ApplicationOutput struct{ *pulumi.OutputState }
func (ApplicationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput {
return o
}
func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return o
}
// The name of the Batch account. Changing this forces a new resource to be created.
func (o ApplicationOutput) AccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.AccountName }).(pulumi.StringOutput)
}
// A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
func (o ApplicationOutput) AllowUpdates() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Application) pulumi.BoolPtrOutput { return v.AllowUpdates }).(pulumi.BoolPtrOutput)
}
// The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
func (o ApplicationOutput) DefaultVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.DefaultVersion }).(pulumi.StringPtrOutput)
}
// The display name for the application.
func (o ApplicationOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
func (o ApplicationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
func (o ApplicationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ApplicationArrayOutput struct{ *pulumi.OutputState }
func (ApplicationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application {
return vs[0].([]*Application)[vs[1].(int)]
}).(ApplicationOutput)
}
type ApplicationMapOutput struct{ *pulumi.OutputState }
func (ApplicationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application {
return vs[0].(map[string]*Application)[vs[1].(string)]
}).(ApplicationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{})
pulumi.RegisterOutputType(ApplicationOutput{})
pulumi.RegisterOutputType(ApplicationArrayOutput{})
pulumi.RegisterOutputType(ApplicationMapOutput{})
}
| 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/batch/account.go | sdk/go/azure/batch/account.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package batch
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 Batch account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "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("testbatch"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("teststorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = batch.NewAccount(ctx, "example", &batch.AccountArgs{
// Name: pulumi.String("testbatchaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PoolAllocationMode: pulumi.String("BatchService"),
// StorageAccountId: exampleAccount.ID(),
// StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
// Tags: pulumi.StringMap{
// "env": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Batch` - 2024-07-01
//
// ## Import
//
// Batch Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:batch/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Batch/batchAccounts/account1
// ```
type Account struct {
pulumi.CustomResourceState
// The account endpoint used to interact with the Batch service.
AccountEndpoint pulumi.StringOutput `pulumi:"accountEndpoint"`
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
AllowedAuthenticationModes pulumi.StringArrayOutput `pulumi:"allowedAuthenticationModes"`
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
Encryption AccountEncryptionPtrOutput `pulumi:"encryption"`
// An `identity` block as defined below.
Identity AccountIdentityPtrOutput `pulumi:"identity"`
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReference AccountKeyVaultReferencePtrOutput `pulumi:"keyVaultReference"`
// 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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile AccountNetworkProfilePtrOutput `pulumi:"networkProfile"`
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
PoolAllocationMode pulumi.StringPtrOutput `pulumi:"poolAllocationMode"`
// The Batch account primary access key.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Batch account secondary access key.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
StorageAccountAuthenticationMode pulumi.StringPtrOutput `pulumi:"storageAccountAuthenticationMode"`
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"`
// Specifies the user assigned identity for the storage account.
StorageAccountNodeIdentity pulumi.StringPtrOutput `pulumi:"storageAccountNodeIdentity"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccount registers a new resource with the given unique name, arguments, and options.
func NewAccount(ctx *pulumi.Context,
name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:batch/account:Account", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccount gets an existing Account resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) {
var resource Account
err := ctx.ReadResource("azure:batch/account:Account", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Account resources.
type accountState struct {
// The account endpoint used to interact with the Batch service.
AccountEndpoint *string `pulumi:"accountEndpoint"`
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
AllowedAuthenticationModes []string `pulumi:"allowedAuthenticationModes"`
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
Encryption *AccountEncryption `pulumi:"encryption"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReference *AccountKeyVaultReference `pulumi:"keyVaultReference"`
// 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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *AccountNetworkProfile `pulumi:"networkProfile"`
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
PoolAllocationMode *string `pulumi:"poolAllocationMode"`
// The Batch account primary access key.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Batch account secondary access key.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
StorageAccountAuthenticationMode *string `pulumi:"storageAccountAuthenticationMode"`
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the user assigned identity for the storage account.
StorageAccountNodeIdentity *string `pulumi:"storageAccountNodeIdentity"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// The account endpoint used to interact with the Batch service.
AccountEndpoint pulumi.StringPtrInput
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
AllowedAuthenticationModes pulumi.StringArrayInput
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
Encryption AccountEncryptionPtrInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReference AccountKeyVaultReferencePtrInput
// 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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile AccountNetworkProfilePtrInput
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
PoolAllocationMode pulumi.StringPtrInput
// The Batch account primary access key.
PrimaryAccessKey pulumi.StringPtrInput
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
ResourceGroupName pulumi.StringPtrInput
// The Batch account secondary access key.
SecondaryAccessKey pulumi.StringPtrInput
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
StorageAccountAuthenticationMode pulumi.StringPtrInput
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
StorageAccountId pulumi.StringPtrInput
// Specifies the user assigned identity for the storage account.
StorageAccountNodeIdentity pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
AllowedAuthenticationModes []string `pulumi:"allowedAuthenticationModes"`
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
Encryption *AccountEncryption `pulumi:"encryption"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReference *AccountKeyVaultReference `pulumi:"keyVaultReference"`
// 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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *AccountNetworkProfile `pulumi:"networkProfile"`
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
PoolAllocationMode *string `pulumi:"poolAllocationMode"`
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
StorageAccountAuthenticationMode *string `pulumi:"storageAccountAuthenticationMode"`
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the user assigned identity for the storage account.
StorageAccountNodeIdentity *string `pulumi:"storageAccountNodeIdentity"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
AllowedAuthenticationModes pulumi.StringArrayInput
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
Encryption AccountEncryptionPtrInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
KeyVaultReference AccountKeyVaultReferencePtrInput
// 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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile AccountNetworkProfilePtrInput
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
PoolAllocationMode pulumi.StringPtrInput
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
ResourceGroupName pulumi.StringInput
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
StorageAccountAuthenticationMode pulumi.StringPtrInput
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
StorageAccountId pulumi.StringPtrInput
// Specifies the user assigned identity for the storage account.
StorageAccountNodeIdentity pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountArgs)(nil)).Elem()
}
type AccountInput interface {
pulumi.Input
ToAccountOutput() AccountOutput
ToAccountOutputWithContext(ctx context.Context) AccountOutput
}
func (*Account) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (i *Account) ToAccountOutput() AccountOutput {
return i.ToAccountOutputWithContext(context.Background())
}
func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountOutput)
}
// AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values.
// You can construct a concrete instance of `AccountArrayInput` via:
//
// AccountArray{ AccountArgs{...} }
type AccountArrayInput interface {
pulumi.Input
ToAccountArrayOutput() AccountArrayOutput
ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput
}
type AccountArray []AccountInput
func (AccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput {
return i.ToAccountArrayOutputWithContext(context.Background())
}
func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountArrayOutput)
}
// AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values.
// You can construct a concrete instance of `AccountMapInput` via:
//
// AccountMap{ "key": AccountArgs{...} }
type AccountMapInput interface {
pulumi.Input
ToAccountMapOutput() AccountMapOutput
ToAccountMapOutputWithContext(context.Context) AccountMapOutput
}
type AccountMap map[string]AccountInput
func (AccountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (i AccountMap) ToAccountMapOutput() AccountMapOutput {
return i.ToAccountMapOutputWithContext(context.Background())
}
func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountMapOutput)
}
type AccountOutput struct{ *pulumi.OutputState }
func (AccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Account)(nil)).Elem()
}
func (o AccountOutput) ToAccountOutput() AccountOutput {
return o
}
func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput {
return o
}
// The account endpoint used to interact with the Batch service.
func (o AccountOutput) AccountEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.AccountEndpoint }).(pulumi.StringOutput)
}
// Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
func (o AccountOutput) AllowedAuthenticationModes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Account) pulumi.StringArrayOutput { return v.AllowedAuthenticationModes }).(pulumi.StringArrayOutput)
}
// Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
func (o AccountOutput) Encryption() AccountEncryptionPtrOutput {
return o.ApplyT(func(v *Account) AccountEncryptionPtrOutput { return v.Encryption }).(AccountEncryptionPtrOutput)
}
// An `identity` block as defined below.
func (o AccountOutput) Identity() AccountIdentityPtrOutput {
return o.ApplyT(func(v *Account) AccountIdentityPtrOutput { return v.Identity }).(AccountIdentityPtrOutput)
}
// A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
func (o AccountOutput) KeyVaultReference() AccountKeyVaultReferencePtrOutput {
return o.ApplyT(func(v *Account) AccountKeyVaultReferencePtrOutput { return v.KeyVaultReference }).(AccountKeyVaultReferencePtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AccountOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
func (o AccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o AccountOutput) NetworkProfile() AccountNetworkProfilePtrOutput {
return o.ApplyT(func(v *Account) AccountNetworkProfilePtrOutput { return v.NetworkProfile }).(AccountNetworkProfilePtrOutput)
}
// Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
func (o AccountOutput) PoolAllocationMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.PoolAllocationMode }).(pulumi.StringPtrOutput)
}
// The Batch account primary access key.
func (o AccountOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether public network access is allowed for this server. Defaults to `true`.
//
// > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below.
//
// > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
func (o AccountOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
//
// > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
func (o AccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Batch account secondary access key.
func (o AccountOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
//
// > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
func (o AccountOutput) StorageAccountAuthenticationMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.StorageAccountAuthenticationMode }).(pulumi.StringPtrOutput)
}
// Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
//
// > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well.
func (o AccountOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// Specifies the user assigned identity for the storage account.
func (o AccountOutput) StorageAccountNodeIdentity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.StorageAccountNodeIdentity }).(pulumi.StringPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AccountArrayOutput struct{ *pulumi.OutputState }
func (AccountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Account)(nil)).Elem()
}
func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput {
return o
}
func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput {
return o
}
func (o AccountArrayOutput) Index(i pulumi.IntInput) AccountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Account {
return vs[0].([]*Account)[vs[1].(int)]
}).(AccountOutput)
}
type AccountMapOutput struct{ *pulumi.OutputState }
func (AccountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Account)(nil)).Elem()
}
func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput {
return o
}
func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput {
return o
}
func (o AccountMapOutput) MapIndex(k pulumi.StringInput) AccountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Account {
return vs[0].(map[string]*Account)[vs[1].(string)]
}).(AccountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountInput)(nil)).Elem(), &Account{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountArrayInput)(nil)).Elem(), AccountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountMapInput)(nil)).Elem(), AccountMap{})
pulumi.RegisterOutputType(AccountOutput{})
pulumi.RegisterOutputType(AccountArrayOutput{})
pulumi.RegisterOutputType(AccountMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/batch/getApplication.go | sdk/go/azure/batch/getApplication.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 batch
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 Batch Application instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := batch.LookupApplication(ctx, &batch.LookupApplicationArgs{
// Name: "testapplication",
// ResourceGroupName: "test",
// AccountName: "testbatchaccount",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("batchApplicationId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Batch` - 2024-07-01
func LookupApplication(ctx *pulumi.Context, args *LookupApplicationArgs, opts ...pulumi.InvokeOption) (*LookupApplicationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApplicationResult
err := ctx.Invoke("azure:batch/getApplication:getApplication", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApplication.
type LookupApplicationArgs struct {
// The name of the Batch account.
AccountName string `pulumi:"accountName"`
// The name of the Application.
Name string `pulumi:"name"`
// The name of the Resource Group where this Batch account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getApplication.
type LookupApplicationResult struct {
AccountName string `pulumi:"accountName"`
// May packages within the application be overwritten using the same version string.
AllowUpdates bool `pulumi:"allowUpdates"`
// The package to use if a client requests the application but does not specify a version.
DefaultVersion string `pulumi:"defaultVersion"`
// The display name for the application.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Batch application name.
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func LookupApplicationOutput(ctx *pulumi.Context, args LookupApplicationOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApplicationResultOutput, error) {
args := v.(LookupApplicationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:batch/getApplication:getApplication", args, LookupApplicationResultOutput{}, options).(LookupApplicationResultOutput), nil
}).(LookupApplicationResultOutput)
}
// A collection of arguments for invoking getApplication.
type LookupApplicationOutputArgs struct {
// The name of the Batch account.
AccountName pulumi.StringInput `pulumi:"accountName"`
// The name of the Application.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where this Batch account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupApplicationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationArgs)(nil)).Elem()
}
// A collection of values returned by getApplication.
type LookupApplicationResultOutput struct{ *pulumi.OutputState }
func (LookupApplicationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationResult)(nil)).Elem()
}
func (o LookupApplicationResultOutput) ToLookupApplicationResultOutput() LookupApplicationResultOutput {
return o
}
func (o LookupApplicationResultOutput) ToLookupApplicationResultOutputWithContext(ctx context.Context) LookupApplicationResultOutput {
return o
}
func (o LookupApplicationResultOutput) AccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.AccountName }).(pulumi.StringOutput)
}
// May packages within the application be overwritten using the same version string.
func (o LookupApplicationResultOutput) AllowUpdates() pulumi.BoolOutput {
return o.ApplyT(func(v LookupApplicationResult) bool { return v.AllowUpdates }).(pulumi.BoolOutput)
}
// The package to use if a client requests the application but does not specify a version.
func (o LookupApplicationResultOutput) DefaultVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.DefaultVersion }).(pulumi.StringOutput)
}
// The display name for the application.
func (o LookupApplicationResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupApplicationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Batch application name.
func (o LookupApplicationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupApplicationResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApplicationResultOutput{})
}
| 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/batch/getCertificate.go | sdk/go/azure/batch/getCertificate.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 batch
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 certificate in a Batch Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := batch.LookupCertificate(ctx, &batch.LookupCertificateArgs{
// Name: "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
// AccountName: "examplebatchaccount",
// ResourceGroupName: "example",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("thumbprint", example.Thumbprint)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Batch` - 2024-07-01
func LookupCertificate(ctx *pulumi.Context, args *LookupCertificateArgs, opts ...pulumi.InvokeOption) (*LookupCertificateResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupCertificateResult
err := ctx.Invoke("azure:batch/getCertificate:getCertificate", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCertificate.
type LookupCertificateArgs struct {
// The name of the Batch account.
AccountName string `pulumi:"accountName"`
// The name of the Batch certificate.
Name string `pulumi:"name"`
// The Name of the Resource Group where this Batch account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCertificate.
type LookupCertificateResult struct {
AccountName string `pulumi:"accountName"`
// The format of the certificate, such as `Cer` or `Pfx`.
Format string `pulumi:"format"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The public key of the certificate.
PublicData string `pulumi:"publicData"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The thumbprint of the certificate.
Thumbprint string `pulumi:"thumbprint"`
// The algorithm of the certificate thumbprint.
ThumbprintAlgorithm string `pulumi:"thumbprintAlgorithm"`
}
func LookupCertificateOutput(ctx *pulumi.Context, args LookupCertificateOutputArgs, opts ...pulumi.InvokeOption) LookupCertificateResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupCertificateResultOutput, error) {
args := v.(LookupCertificateArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:batch/getCertificate:getCertificate", args, LookupCertificateResultOutput{}, options).(LookupCertificateResultOutput), nil
}).(LookupCertificateResultOutput)
}
// A collection of arguments for invoking getCertificate.
type LookupCertificateOutputArgs struct {
// The name of the Batch account.
AccountName pulumi.StringInput `pulumi:"accountName"`
// The name of the Batch certificate.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where this Batch account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupCertificateOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCertificateArgs)(nil)).Elem()
}
// A collection of values returned by getCertificate.
type LookupCertificateResultOutput struct{ *pulumi.OutputState }
func (LookupCertificateResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCertificateResult)(nil)).Elem()
}
func (o LookupCertificateResultOutput) ToLookupCertificateResultOutput() LookupCertificateResultOutput {
return o
}
func (o LookupCertificateResultOutput) ToLookupCertificateResultOutputWithContext(ctx context.Context) LookupCertificateResultOutput {
return o
}
func (o LookupCertificateResultOutput) AccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.AccountName }).(pulumi.StringOutput)
}
// The format of the certificate, such as `Cer` or `Pfx`.
func (o LookupCertificateResultOutput) Format() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Format }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupCertificateResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupCertificateResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Name }).(pulumi.StringOutput)
}
// The public key of the certificate.
func (o LookupCertificateResultOutput) PublicData() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.PublicData }).(pulumi.StringOutput)
}
func (o LookupCertificateResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The thumbprint of the certificate.
func (o LookupCertificateResultOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.Thumbprint }).(pulumi.StringOutput)
}
// The algorithm of the certificate thumbprint.
func (o LookupCertificateResultOutput) ThumbprintAlgorithm() pulumi.StringOutput {
return o.ApplyT(func(v LookupCertificateResult) string { return v.ThumbprintAlgorithm }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupCertificateResultOutput{})
}
| 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/billing/init.go | sdk/go/azure/billing/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 billing
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:billing/accountCostManagementExport:AccountCostManagementExport":
r = &AccountCostManagementExport{}
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",
"billing/accountCostManagementExport",
&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/billing/pulumiTypes.go | sdk/go/azure/billing/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 billing
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 AccountCostManagementExportExportDataOptions struct {
// The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`.
TimeFrame string `pulumi:"timeFrame"`
// The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`.
Type string `pulumi:"type"`
}
// AccountCostManagementExportExportDataOptionsInput is an input type that accepts AccountCostManagementExportExportDataOptionsArgs and AccountCostManagementExportExportDataOptionsOutput values.
// You can construct a concrete instance of `AccountCostManagementExportExportDataOptionsInput` via:
//
// AccountCostManagementExportExportDataOptionsArgs{...}
type AccountCostManagementExportExportDataOptionsInput interface {
pulumi.Input
ToAccountCostManagementExportExportDataOptionsOutput() AccountCostManagementExportExportDataOptionsOutput
ToAccountCostManagementExportExportDataOptionsOutputWithContext(context.Context) AccountCostManagementExportExportDataOptionsOutput
}
type AccountCostManagementExportExportDataOptionsArgs struct {
// The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`.
TimeFrame pulumi.StringInput `pulumi:"timeFrame"`
// The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`.
Type pulumi.StringInput `pulumi:"type"`
}
func (AccountCostManagementExportExportDataOptionsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountCostManagementExportExportDataOptions)(nil)).Elem()
}
func (i AccountCostManagementExportExportDataOptionsArgs) ToAccountCostManagementExportExportDataOptionsOutput() AccountCostManagementExportExportDataOptionsOutput {
return i.ToAccountCostManagementExportExportDataOptionsOutputWithContext(context.Background())
}
func (i AccountCostManagementExportExportDataOptionsArgs) ToAccountCostManagementExportExportDataOptionsOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataOptionsOutput)
}
func (i AccountCostManagementExportExportDataOptionsArgs) ToAccountCostManagementExportExportDataOptionsPtrOutput() AccountCostManagementExportExportDataOptionsPtrOutput {
return i.ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(context.Background())
}
func (i AccountCostManagementExportExportDataOptionsArgs) ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataOptionsOutput).ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(ctx)
}
// AccountCostManagementExportExportDataOptionsPtrInput is an input type that accepts AccountCostManagementExportExportDataOptionsArgs, AccountCostManagementExportExportDataOptionsPtr and AccountCostManagementExportExportDataOptionsPtrOutput values.
// You can construct a concrete instance of `AccountCostManagementExportExportDataOptionsPtrInput` via:
//
// AccountCostManagementExportExportDataOptionsArgs{...}
//
// or:
//
// nil
type AccountCostManagementExportExportDataOptionsPtrInput interface {
pulumi.Input
ToAccountCostManagementExportExportDataOptionsPtrOutput() AccountCostManagementExportExportDataOptionsPtrOutput
ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(context.Context) AccountCostManagementExportExportDataOptionsPtrOutput
}
type accountCostManagementExportExportDataOptionsPtrType AccountCostManagementExportExportDataOptionsArgs
func AccountCostManagementExportExportDataOptionsPtr(v *AccountCostManagementExportExportDataOptionsArgs) AccountCostManagementExportExportDataOptionsPtrInput {
return (*accountCostManagementExportExportDataOptionsPtrType)(v)
}
func (*accountCostManagementExportExportDataOptionsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExportExportDataOptions)(nil)).Elem()
}
func (i *accountCostManagementExportExportDataOptionsPtrType) ToAccountCostManagementExportExportDataOptionsPtrOutput() AccountCostManagementExportExportDataOptionsPtrOutput {
return i.ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(context.Background())
}
func (i *accountCostManagementExportExportDataOptionsPtrType) ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataOptionsPtrOutput)
}
type AccountCostManagementExportExportDataOptionsOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportExportDataOptionsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountCostManagementExportExportDataOptions)(nil)).Elem()
}
func (o AccountCostManagementExportExportDataOptionsOutput) ToAccountCostManagementExportExportDataOptionsOutput() AccountCostManagementExportExportDataOptionsOutput {
return o
}
func (o AccountCostManagementExportExportDataOptionsOutput) ToAccountCostManagementExportExportDataOptionsOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsOutput {
return o
}
func (o AccountCostManagementExportExportDataOptionsOutput) ToAccountCostManagementExportExportDataOptionsPtrOutput() AccountCostManagementExportExportDataOptionsPtrOutput {
return o.ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(context.Background())
}
func (o AccountCostManagementExportExportDataOptionsOutput) ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountCostManagementExportExportDataOptions) *AccountCostManagementExportExportDataOptions {
return &v
}).(AccountCostManagementExportExportDataOptionsPtrOutput)
}
// The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`.
func (o AccountCostManagementExportExportDataOptionsOutput) TimeFrame() pulumi.StringOutput {
return o.ApplyT(func(v AccountCostManagementExportExportDataOptions) string { return v.TimeFrame }).(pulumi.StringOutput)
}
// The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`.
func (o AccountCostManagementExportExportDataOptionsOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AccountCostManagementExportExportDataOptions) string { return v.Type }).(pulumi.StringOutput)
}
type AccountCostManagementExportExportDataOptionsPtrOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportExportDataOptionsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExportExportDataOptions)(nil)).Elem()
}
func (o AccountCostManagementExportExportDataOptionsPtrOutput) ToAccountCostManagementExportExportDataOptionsPtrOutput() AccountCostManagementExportExportDataOptionsPtrOutput {
return o
}
func (o AccountCostManagementExportExportDataOptionsPtrOutput) ToAccountCostManagementExportExportDataOptionsPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataOptionsPtrOutput {
return o
}
func (o AccountCostManagementExportExportDataOptionsPtrOutput) Elem() AccountCostManagementExportExportDataOptionsOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataOptions) AccountCostManagementExportExportDataOptions {
if v != nil {
return *v
}
var ret AccountCostManagementExportExportDataOptions
return ret
}).(AccountCostManagementExportExportDataOptionsOutput)
}
// The time frame for pulling data for the query. If custom, then a specific time period must be provided. Possible values include: `WeekToDate`, `MonthToDate`, `BillingMonthToDate`, `TheLast7Days`, `TheLastMonth`, `TheLastBillingMonth`, `Custom`.
func (o AccountCostManagementExportExportDataOptionsPtrOutput) TimeFrame() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataOptions) *string {
if v == nil {
return nil
}
return &v.TimeFrame
}).(pulumi.StringPtrOutput)
}
// The type of the query. Possible values are `ActualCost`, `AmortizedCost` and `Usage`.
func (o AccountCostManagementExportExportDataOptionsPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataOptions) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AccountCostManagementExportExportDataStorageLocation struct {
// The Resource Manager ID of the container where exports will be uploaded. Changing this forces a new resource to be created.
ContainerId string `pulumi:"containerId"`
// The path of the directory where exports will be uploaded. Changing this forces a new resource to be created.
//
// > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resourceManagerId` attribute of the `storage.Container` resource.
RootFolderPath string `pulumi:"rootFolderPath"`
}
// AccountCostManagementExportExportDataStorageLocationInput is an input type that accepts AccountCostManagementExportExportDataStorageLocationArgs and AccountCostManagementExportExportDataStorageLocationOutput values.
// You can construct a concrete instance of `AccountCostManagementExportExportDataStorageLocationInput` via:
//
// AccountCostManagementExportExportDataStorageLocationArgs{...}
type AccountCostManagementExportExportDataStorageLocationInput interface {
pulumi.Input
ToAccountCostManagementExportExportDataStorageLocationOutput() AccountCostManagementExportExportDataStorageLocationOutput
ToAccountCostManagementExportExportDataStorageLocationOutputWithContext(context.Context) AccountCostManagementExportExportDataStorageLocationOutput
}
type AccountCostManagementExportExportDataStorageLocationArgs struct {
// The Resource Manager ID of the container where exports will be uploaded. Changing this forces a new resource to be created.
ContainerId pulumi.StringInput `pulumi:"containerId"`
// The path of the directory where exports will be uploaded. Changing this forces a new resource to be created.
//
// > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resourceManagerId` attribute of the `storage.Container` resource.
RootFolderPath pulumi.StringInput `pulumi:"rootFolderPath"`
}
func (AccountCostManagementExportExportDataStorageLocationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountCostManagementExportExportDataStorageLocation)(nil)).Elem()
}
func (i AccountCostManagementExportExportDataStorageLocationArgs) ToAccountCostManagementExportExportDataStorageLocationOutput() AccountCostManagementExportExportDataStorageLocationOutput {
return i.ToAccountCostManagementExportExportDataStorageLocationOutputWithContext(context.Background())
}
func (i AccountCostManagementExportExportDataStorageLocationArgs) ToAccountCostManagementExportExportDataStorageLocationOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataStorageLocationOutput)
}
func (i AccountCostManagementExportExportDataStorageLocationArgs) ToAccountCostManagementExportExportDataStorageLocationPtrOutput() AccountCostManagementExportExportDataStorageLocationPtrOutput {
return i.ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(context.Background())
}
func (i AccountCostManagementExportExportDataStorageLocationArgs) ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataStorageLocationOutput).ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(ctx)
}
// AccountCostManagementExportExportDataStorageLocationPtrInput is an input type that accepts AccountCostManagementExportExportDataStorageLocationArgs, AccountCostManagementExportExportDataStorageLocationPtr and AccountCostManagementExportExportDataStorageLocationPtrOutput values.
// You can construct a concrete instance of `AccountCostManagementExportExportDataStorageLocationPtrInput` via:
//
// AccountCostManagementExportExportDataStorageLocationArgs{...}
//
// or:
//
// nil
type AccountCostManagementExportExportDataStorageLocationPtrInput interface {
pulumi.Input
ToAccountCostManagementExportExportDataStorageLocationPtrOutput() AccountCostManagementExportExportDataStorageLocationPtrOutput
ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(context.Context) AccountCostManagementExportExportDataStorageLocationPtrOutput
}
type accountCostManagementExportExportDataStorageLocationPtrType AccountCostManagementExportExportDataStorageLocationArgs
func AccountCostManagementExportExportDataStorageLocationPtr(v *AccountCostManagementExportExportDataStorageLocationArgs) AccountCostManagementExportExportDataStorageLocationPtrInput {
return (*accountCostManagementExportExportDataStorageLocationPtrType)(v)
}
func (*accountCostManagementExportExportDataStorageLocationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExportExportDataStorageLocation)(nil)).Elem()
}
func (i *accountCostManagementExportExportDataStorageLocationPtrType) ToAccountCostManagementExportExportDataStorageLocationPtrOutput() AccountCostManagementExportExportDataStorageLocationPtrOutput {
return i.ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(context.Background())
}
func (i *accountCostManagementExportExportDataStorageLocationPtrType) ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportExportDataStorageLocationPtrOutput)
}
type AccountCostManagementExportExportDataStorageLocationOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportExportDataStorageLocationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountCostManagementExportExportDataStorageLocation)(nil)).Elem()
}
func (o AccountCostManagementExportExportDataStorageLocationOutput) ToAccountCostManagementExportExportDataStorageLocationOutput() AccountCostManagementExportExportDataStorageLocationOutput {
return o
}
func (o AccountCostManagementExportExportDataStorageLocationOutput) ToAccountCostManagementExportExportDataStorageLocationOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationOutput {
return o
}
func (o AccountCostManagementExportExportDataStorageLocationOutput) ToAccountCostManagementExportExportDataStorageLocationPtrOutput() AccountCostManagementExportExportDataStorageLocationPtrOutput {
return o.ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(context.Background())
}
func (o AccountCostManagementExportExportDataStorageLocationOutput) ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountCostManagementExportExportDataStorageLocation) *AccountCostManagementExportExportDataStorageLocation {
return &v
}).(AccountCostManagementExportExportDataStorageLocationPtrOutput)
}
// The Resource Manager ID of the container where exports will be uploaded. Changing this forces a new resource to be created.
func (o AccountCostManagementExportExportDataStorageLocationOutput) ContainerId() pulumi.StringOutput {
return o.ApplyT(func(v AccountCostManagementExportExportDataStorageLocation) string { return v.ContainerId }).(pulumi.StringOutput)
}
// The path of the directory where exports will be uploaded. Changing this forces a new resource to be created.
//
// > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resourceManagerId` attribute of the `storage.Container` resource.
func (o AccountCostManagementExportExportDataStorageLocationOutput) RootFolderPath() pulumi.StringOutput {
return o.ApplyT(func(v AccountCostManagementExportExportDataStorageLocation) string { return v.RootFolderPath }).(pulumi.StringOutput)
}
type AccountCostManagementExportExportDataStorageLocationPtrOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportExportDataStorageLocationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExportExportDataStorageLocation)(nil)).Elem()
}
func (o AccountCostManagementExportExportDataStorageLocationPtrOutput) ToAccountCostManagementExportExportDataStorageLocationPtrOutput() AccountCostManagementExportExportDataStorageLocationPtrOutput {
return o
}
func (o AccountCostManagementExportExportDataStorageLocationPtrOutput) ToAccountCostManagementExportExportDataStorageLocationPtrOutputWithContext(ctx context.Context) AccountCostManagementExportExportDataStorageLocationPtrOutput {
return o
}
func (o AccountCostManagementExportExportDataStorageLocationPtrOutput) Elem() AccountCostManagementExportExportDataStorageLocationOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataStorageLocation) AccountCostManagementExportExportDataStorageLocation {
if v != nil {
return *v
}
var ret AccountCostManagementExportExportDataStorageLocation
return ret
}).(AccountCostManagementExportExportDataStorageLocationOutput)
}
// The Resource Manager ID of the container where exports will be uploaded. Changing this forces a new resource to be created.
func (o AccountCostManagementExportExportDataStorageLocationPtrOutput) ContainerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataStorageLocation) *string {
if v == nil {
return nil
}
return &v.ContainerId
}).(pulumi.StringPtrOutput)
}
// The path of the directory where exports will be uploaded. Changing this forces a new resource to be created.
//
// > **Note:** The Resource Manager ID of a Storage Container is exposed via the `resourceManagerId` attribute of the `storage.Container` resource.
func (o AccountCostManagementExportExportDataStorageLocationPtrOutput) RootFolderPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExportExportDataStorageLocation) *string {
if v == nil {
return nil
}
return &v.RootFolderPath
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportExportDataOptionsInput)(nil)).Elem(), AccountCostManagementExportExportDataOptionsArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportExportDataOptionsPtrInput)(nil)).Elem(), AccountCostManagementExportExportDataOptionsArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportExportDataStorageLocationInput)(nil)).Elem(), AccountCostManagementExportExportDataStorageLocationArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportExportDataStorageLocationPtrInput)(nil)).Elem(), AccountCostManagementExportExportDataStorageLocationArgs{})
pulumi.RegisterOutputType(AccountCostManagementExportExportDataOptionsOutput{})
pulumi.RegisterOutputType(AccountCostManagementExportExportDataOptionsPtrOutput{})
pulumi.RegisterOutputType(AccountCostManagementExportExportDataStorageLocationOutput{})
pulumi.RegisterOutputType(AccountCostManagementExportExportDataStorageLocationPtrOutput{})
}
| 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/billing/getMpaAccountScope.go | sdk/go/azure/billing/getMpaAccountScope.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 billing
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 an ID for your MPA Account billing scope.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := billing.GetMpaAccountScope(ctx, &billing.GetMpaAccountScopeArgs{
// BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
// CustomerName: "2281f543-7321-4cf9-1e23-edb4Oc31a31c",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
func GetMpaAccountScope(ctx *pulumi.Context, args *GetMpaAccountScopeArgs, opts ...pulumi.InvokeOption) (*GetMpaAccountScopeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetMpaAccountScopeResult
err := ctx.Invoke("azure:billing/getMpaAccountScope:getMpaAccountScope", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMpaAccountScope.
type GetMpaAccountScopeArgs struct {
// The Billing Account Name of the MPA account.
BillingAccountName string `pulumi:"billingAccountName"`
// The Customer Name in the above Billing Account.
CustomerName string `pulumi:"customerName"`
}
// A collection of values returned by getMpaAccountScope.
type GetMpaAccountScopeResult struct {
BillingAccountName string `pulumi:"billingAccountName"`
CustomerName string `pulumi:"customerName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
}
func GetMpaAccountScopeOutput(ctx *pulumi.Context, args GetMpaAccountScopeOutputArgs, opts ...pulumi.InvokeOption) GetMpaAccountScopeResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetMpaAccountScopeResultOutput, error) {
args := v.(GetMpaAccountScopeArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:billing/getMpaAccountScope:getMpaAccountScope", args, GetMpaAccountScopeResultOutput{}, options).(GetMpaAccountScopeResultOutput), nil
}).(GetMpaAccountScopeResultOutput)
}
// A collection of arguments for invoking getMpaAccountScope.
type GetMpaAccountScopeOutputArgs struct {
// The Billing Account Name of the MPA account.
BillingAccountName pulumi.StringInput `pulumi:"billingAccountName"`
// The Customer Name in the above Billing Account.
CustomerName pulumi.StringInput `pulumi:"customerName"`
}
func (GetMpaAccountScopeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetMpaAccountScopeArgs)(nil)).Elem()
}
// A collection of values returned by getMpaAccountScope.
type GetMpaAccountScopeResultOutput struct{ *pulumi.OutputState }
func (GetMpaAccountScopeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetMpaAccountScopeResult)(nil)).Elem()
}
func (o GetMpaAccountScopeResultOutput) ToGetMpaAccountScopeResultOutput() GetMpaAccountScopeResultOutput {
return o
}
func (o GetMpaAccountScopeResultOutput) ToGetMpaAccountScopeResultOutputWithContext(ctx context.Context) GetMpaAccountScopeResultOutput {
return o
}
func (o GetMpaAccountScopeResultOutput) BillingAccountName() pulumi.StringOutput {
return o.ApplyT(func(v GetMpaAccountScopeResult) string { return v.BillingAccountName }).(pulumi.StringOutput)
}
func (o GetMpaAccountScopeResultOutput) CustomerName() pulumi.StringOutput {
return o.ApplyT(func(v GetMpaAccountScopeResult) string { return v.CustomerName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetMpaAccountScopeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetMpaAccountScopeResult) string { return v.Id }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetMpaAccountScopeResultOutput{})
}
| 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/billing/getMcaAccountScope.go | sdk/go/azure/billing/getMcaAccountScope.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 billing
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 an ID for your MCA Account billing scope.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := billing.GetMcaAccountScope(ctx, &billing.GetMcaAccountScopeArgs{
// BillingAccountName: "e879cf0f-2b4d-5431-109a-f72fc9868693:024cabf4-7321-4cf9-be59-df0c77ca51de_2019-05-31",
// BillingProfileName: "PE2Q-NOIT-BG7-TGB",
// InvoiceSectionName: "MTT4-OBS7-PJA-TGB",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
func GetMcaAccountScope(ctx *pulumi.Context, args *GetMcaAccountScopeArgs, opts ...pulumi.InvokeOption) (*GetMcaAccountScopeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetMcaAccountScopeResult
err := ctx.Invoke("azure:billing/getMcaAccountScope:getMcaAccountScope", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMcaAccountScope.
type GetMcaAccountScopeArgs struct {
// The Billing Account Name of the MCA account.
BillingAccountName string `pulumi:"billingAccountName"`
// The Billing Profile Name in the above Billing Account.
BillingProfileName string `pulumi:"billingProfileName"`
// The Invoice Section Name in the above Billing Profile.
InvoiceSectionName string `pulumi:"invoiceSectionName"`
}
// A collection of values returned by getMcaAccountScope.
type GetMcaAccountScopeResult struct {
BillingAccountName string `pulumi:"billingAccountName"`
BillingProfileName string `pulumi:"billingProfileName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
InvoiceSectionName string `pulumi:"invoiceSectionName"`
}
func GetMcaAccountScopeOutput(ctx *pulumi.Context, args GetMcaAccountScopeOutputArgs, opts ...pulumi.InvokeOption) GetMcaAccountScopeResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetMcaAccountScopeResultOutput, error) {
args := v.(GetMcaAccountScopeArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:billing/getMcaAccountScope:getMcaAccountScope", args, GetMcaAccountScopeResultOutput{}, options).(GetMcaAccountScopeResultOutput), nil
}).(GetMcaAccountScopeResultOutput)
}
// A collection of arguments for invoking getMcaAccountScope.
type GetMcaAccountScopeOutputArgs struct {
// The Billing Account Name of the MCA account.
BillingAccountName pulumi.StringInput `pulumi:"billingAccountName"`
// The Billing Profile Name in the above Billing Account.
BillingProfileName pulumi.StringInput `pulumi:"billingProfileName"`
// The Invoice Section Name in the above Billing Profile.
InvoiceSectionName pulumi.StringInput `pulumi:"invoiceSectionName"`
}
func (GetMcaAccountScopeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetMcaAccountScopeArgs)(nil)).Elem()
}
// A collection of values returned by getMcaAccountScope.
type GetMcaAccountScopeResultOutput struct{ *pulumi.OutputState }
func (GetMcaAccountScopeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetMcaAccountScopeResult)(nil)).Elem()
}
func (o GetMcaAccountScopeResultOutput) ToGetMcaAccountScopeResultOutput() GetMcaAccountScopeResultOutput {
return o
}
func (o GetMcaAccountScopeResultOutput) ToGetMcaAccountScopeResultOutputWithContext(ctx context.Context) GetMcaAccountScopeResultOutput {
return o
}
func (o GetMcaAccountScopeResultOutput) BillingAccountName() pulumi.StringOutput {
return o.ApplyT(func(v GetMcaAccountScopeResult) string { return v.BillingAccountName }).(pulumi.StringOutput)
}
func (o GetMcaAccountScopeResultOutput) BillingProfileName() pulumi.StringOutput {
return o.ApplyT(func(v GetMcaAccountScopeResult) string { return v.BillingProfileName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetMcaAccountScopeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetMcaAccountScopeResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetMcaAccountScopeResultOutput) InvoiceSectionName() pulumi.StringOutput {
return o.ApplyT(func(v GetMcaAccountScopeResult) string { return v.InvoiceSectionName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetMcaAccountScopeResultOutput{})
}
| 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/billing/getEnrollmentAccountScope.go | sdk/go/azure/billing/getEnrollmentAccountScope.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 billing
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 Enrollment Account Billing Scope.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := billing.GetEnrollmentAccountScope(ctx, &billing.GetEnrollmentAccountScopeArgs{
// BillingAccountName: "existing",
// EnrollmentAccountName: "existing",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
func GetEnrollmentAccountScope(ctx *pulumi.Context, args *GetEnrollmentAccountScopeArgs, opts ...pulumi.InvokeOption) (*GetEnrollmentAccountScopeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetEnrollmentAccountScopeResult
err := ctx.Invoke("azure:billing/getEnrollmentAccountScope:getEnrollmentAccountScope", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEnrollmentAccountScope.
type GetEnrollmentAccountScopeArgs struct {
// The Billing Account Name of the Enterprise Account.
BillingAccountName string `pulumi:"billingAccountName"`
// The Enrollment Account Name in the above Enterprise Account.
EnrollmentAccountName string `pulumi:"enrollmentAccountName"`
}
// A collection of values returned by getEnrollmentAccountScope.
type GetEnrollmentAccountScopeResult struct {
BillingAccountName string `pulumi:"billingAccountName"`
EnrollmentAccountName string `pulumi:"enrollmentAccountName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
}
func GetEnrollmentAccountScopeOutput(ctx *pulumi.Context, args GetEnrollmentAccountScopeOutputArgs, opts ...pulumi.InvokeOption) GetEnrollmentAccountScopeResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetEnrollmentAccountScopeResultOutput, error) {
args := v.(GetEnrollmentAccountScopeArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:billing/getEnrollmentAccountScope:getEnrollmentAccountScope", args, GetEnrollmentAccountScopeResultOutput{}, options).(GetEnrollmentAccountScopeResultOutput), nil
}).(GetEnrollmentAccountScopeResultOutput)
}
// A collection of arguments for invoking getEnrollmentAccountScope.
type GetEnrollmentAccountScopeOutputArgs struct {
// The Billing Account Name of the Enterprise Account.
BillingAccountName pulumi.StringInput `pulumi:"billingAccountName"`
// The Enrollment Account Name in the above Enterprise Account.
EnrollmentAccountName pulumi.StringInput `pulumi:"enrollmentAccountName"`
}
func (GetEnrollmentAccountScopeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetEnrollmentAccountScopeArgs)(nil)).Elem()
}
// A collection of values returned by getEnrollmentAccountScope.
type GetEnrollmentAccountScopeResultOutput struct{ *pulumi.OutputState }
func (GetEnrollmentAccountScopeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetEnrollmentAccountScopeResult)(nil)).Elem()
}
func (o GetEnrollmentAccountScopeResultOutput) ToGetEnrollmentAccountScopeResultOutput() GetEnrollmentAccountScopeResultOutput {
return o
}
func (o GetEnrollmentAccountScopeResultOutput) ToGetEnrollmentAccountScopeResultOutputWithContext(ctx context.Context) GetEnrollmentAccountScopeResultOutput {
return o
}
func (o GetEnrollmentAccountScopeResultOutput) BillingAccountName() pulumi.StringOutput {
return o.ApplyT(func(v GetEnrollmentAccountScopeResult) string { return v.BillingAccountName }).(pulumi.StringOutput)
}
func (o GetEnrollmentAccountScopeResultOutput) EnrollmentAccountName() pulumi.StringOutput {
return o.ApplyT(func(v GetEnrollmentAccountScopeResult) string { return v.EnrollmentAccountName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetEnrollmentAccountScopeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetEnrollmentAccountScopeResult) string { return v.Id }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetEnrollmentAccountScopeResultOutput{})
}
| 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/billing/accountCostManagementExport.go | sdk/go/azure/billing/accountCostManagementExport.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 billing
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Cost Management Export for a Billing Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/billing"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("examplecontainer"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// _, err = billing.NewAccountCostManagementExport(ctx, "example", &billing.AccountCostManagementExportArgs{
// Name: pulumi.String("example"),
// BillingAccountId: pulumi.String("example"),
// RecurrenceType: pulumi.String("Monthly"),
// RecurrencePeriodStartDate: pulumi.String("2020-08-18T00:00:00Z"),
// RecurrencePeriodEndDate: pulumi.String("2020-09-18T00:00:00Z"),
// FileFormat: pulumi.String("Csv"),
// ExportDataStorageLocation: &billing.AccountCostManagementExportExportDataStorageLocationArgs{
// ContainerId: exampleContainer.ID(),
// RootFolderPath: pulumi.String("/root/updated"),
// },
// ExportDataOptions: &billing.AccountCostManagementExportExportDataOptionsArgs{
// Type: pulumi.String("Usage"),
// TimeFrame: pulumi.String("WeekToDate"),
// },
// })
// 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.CostManagement` - 2023-08-01
//
// ## Import
//
// Billing Account Cost Management Exports can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:billing/accountCostManagementExport:AccountCostManagementExport example /providers/Microsoft.Billing/billingAccounts/12345678/providers/Microsoft.CostManagement/exports/export1
// ```
type AccountCostManagementExport struct {
pulumi.CustomResourceState
// Is the cost management export active? Default is `true`.
Active pulumi.BoolPtrOutput `pulumi:"active"`
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
BillingAccountId pulumi.StringOutput `pulumi:"billingAccountId"`
// A `exportDataOptions` block as defined below.
ExportDataOptions AccountCostManagementExportExportDataOptionsOutput `pulumi:"exportDataOptions"`
// A `exportDataStorageLocation` block as defined below.
ExportDataStorageLocation AccountCostManagementExportExportDataStorageLocationOutput `pulumi:"exportDataStorageLocation"`
// Format for export. Valid values are `Csv` only. Default is `Csv`.
FileFormat pulumi.StringPtrOutput `pulumi:"fileFormat"`
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The date the export will stop capturing information.
RecurrencePeriodEndDate pulumi.StringOutput `pulumi:"recurrencePeriodEndDate"`
// The date the export will start capturing information.
RecurrencePeriodStartDate pulumi.StringOutput `pulumi:"recurrencePeriodStartDate"`
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
RecurrenceType pulumi.StringOutput `pulumi:"recurrenceType"`
}
// NewAccountCostManagementExport registers a new resource with the given unique name, arguments, and options.
func NewAccountCostManagementExport(ctx *pulumi.Context,
name string, args *AccountCostManagementExportArgs, opts ...pulumi.ResourceOption) (*AccountCostManagementExport, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BillingAccountId == nil {
return nil, errors.New("invalid value for required argument 'BillingAccountId'")
}
if args.ExportDataOptions == nil {
return nil, errors.New("invalid value for required argument 'ExportDataOptions'")
}
if args.ExportDataStorageLocation == nil {
return nil, errors.New("invalid value for required argument 'ExportDataStorageLocation'")
}
if args.RecurrencePeriodEndDate == nil {
return nil, errors.New("invalid value for required argument 'RecurrencePeriodEndDate'")
}
if args.RecurrencePeriodStartDate == nil {
return nil, errors.New("invalid value for required argument 'RecurrencePeriodStartDate'")
}
if args.RecurrenceType == nil {
return nil, errors.New("invalid value for required argument 'RecurrenceType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountCostManagementExport
err := ctx.RegisterResource("azure:billing/accountCostManagementExport:AccountCostManagementExport", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountCostManagementExport gets an existing AccountCostManagementExport 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 GetAccountCostManagementExport(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountCostManagementExportState, opts ...pulumi.ResourceOption) (*AccountCostManagementExport, error) {
var resource AccountCostManagementExport
err := ctx.ReadResource("azure:billing/accountCostManagementExport:AccountCostManagementExport", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountCostManagementExport resources.
type accountCostManagementExportState struct {
// Is the cost management export active? Default is `true`.
Active *bool `pulumi:"active"`
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
BillingAccountId *string `pulumi:"billingAccountId"`
// A `exportDataOptions` block as defined below.
ExportDataOptions *AccountCostManagementExportExportDataOptions `pulumi:"exportDataOptions"`
// A `exportDataStorageLocation` block as defined below.
ExportDataStorageLocation *AccountCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"`
// Format for export. Valid values are `Csv` only. Default is `Csv`.
FileFormat *string `pulumi:"fileFormat"`
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The date the export will stop capturing information.
RecurrencePeriodEndDate *string `pulumi:"recurrencePeriodEndDate"`
// The date the export will start capturing information.
RecurrencePeriodStartDate *string `pulumi:"recurrencePeriodStartDate"`
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
RecurrenceType *string `pulumi:"recurrenceType"`
}
type AccountCostManagementExportState struct {
// Is the cost management export active? Default is `true`.
Active pulumi.BoolPtrInput
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
BillingAccountId pulumi.StringPtrInput
// A `exportDataOptions` block as defined below.
ExportDataOptions AccountCostManagementExportExportDataOptionsPtrInput
// A `exportDataStorageLocation` block as defined below.
ExportDataStorageLocation AccountCostManagementExportExportDataStorageLocationPtrInput
// Format for export. Valid values are `Csv` only. Default is `Csv`.
FileFormat pulumi.StringPtrInput
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The date the export will stop capturing information.
RecurrencePeriodEndDate pulumi.StringPtrInput
// The date the export will start capturing information.
RecurrencePeriodStartDate pulumi.StringPtrInput
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
RecurrenceType pulumi.StringPtrInput
}
func (AccountCostManagementExportState) ElementType() reflect.Type {
return reflect.TypeOf((*accountCostManagementExportState)(nil)).Elem()
}
type accountCostManagementExportArgs struct {
// Is the cost management export active? Default is `true`.
Active *bool `pulumi:"active"`
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
BillingAccountId string `pulumi:"billingAccountId"`
// A `exportDataOptions` block as defined below.
ExportDataOptions AccountCostManagementExportExportDataOptions `pulumi:"exportDataOptions"`
// A `exportDataStorageLocation` block as defined below.
ExportDataStorageLocation AccountCostManagementExportExportDataStorageLocation `pulumi:"exportDataStorageLocation"`
// Format for export. Valid values are `Csv` only. Default is `Csv`.
FileFormat *string `pulumi:"fileFormat"`
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The date the export will stop capturing information.
RecurrencePeriodEndDate string `pulumi:"recurrencePeriodEndDate"`
// The date the export will start capturing information.
RecurrencePeriodStartDate string `pulumi:"recurrencePeriodStartDate"`
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
RecurrenceType string `pulumi:"recurrenceType"`
}
// The set of arguments for constructing a AccountCostManagementExport resource.
type AccountCostManagementExportArgs struct {
// Is the cost management export active? Default is `true`.
Active pulumi.BoolPtrInput
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
BillingAccountId pulumi.StringInput
// A `exportDataOptions` block as defined below.
ExportDataOptions AccountCostManagementExportExportDataOptionsInput
// A `exportDataStorageLocation` block as defined below.
ExportDataStorageLocation AccountCostManagementExportExportDataStorageLocationInput
// Format for export. Valid values are `Csv` only. Default is `Csv`.
FileFormat pulumi.StringPtrInput
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The date the export will stop capturing information.
RecurrencePeriodEndDate pulumi.StringInput
// The date the export will start capturing information.
RecurrencePeriodStartDate pulumi.StringInput
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
RecurrenceType pulumi.StringInput
}
func (AccountCostManagementExportArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountCostManagementExportArgs)(nil)).Elem()
}
type AccountCostManagementExportInput interface {
pulumi.Input
ToAccountCostManagementExportOutput() AccountCostManagementExportOutput
ToAccountCostManagementExportOutputWithContext(ctx context.Context) AccountCostManagementExportOutput
}
func (*AccountCostManagementExport) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExport)(nil)).Elem()
}
func (i *AccountCostManagementExport) ToAccountCostManagementExportOutput() AccountCostManagementExportOutput {
return i.ToAccountCostManagementExportOutputWithContext(context.Background())
}
func (i *AccountCostManagementExport) ToAccountCostManagementExportOutputWithContext(ctx context.Context) AccountCostManagementExportOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportOutput)
}
// AccountCostManagementExportArrayInput is an input type that accepts AccountCostManagementExportArray and AccountCostManagementExportArrayOutput values.
// You can construct a concrete instance of `AccountCostManagementExportArrayInput` via:
//
// AccountCostManagementExportArray{ AccountCostManagementExportArgs{...} }
type AccountCostManagementExportArrayInput interface {
pulumi.Input
ToAccountCostManagementExportArrayOutput() AccountCostManagementExportArrayOutput
ToAccountCostManagementExportArrayOutputWithContext(context.Context) AccountCostManagementExportArrayOutput
}
type AccountCostManagementExportArray []AccountCostManagementExportInput
func (AccountCostManagementExportArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountCostManagementExport)(nil)).Elem()
}
func (i AccountCostManagementExportArray) ToAccountCostManagementExportArrayOutput() AccountCostManagementExportArrayOutput {
return i.ToAccountCostManagementExportArrayOutputWithContext(context.Background())
}
func (i AccountCostManagementExportArray) ToAccountCostManagementExportArrayOutputWithContext(ctx context.Context) AccountCostManagementExportArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportArrayOutput)
}
// AccountCostManagementExportMapInput is an input type that accepts AccountCostManagementExportMap and AccountCostManagementExportMapOutput values.
// You can construct a concrete instance of `AccountCostManagementExportMapInput` via:
//
// AccountCostManagementExportMap{ "key": AccountCostManagementExportArgs{...} }
type AccountCostManagementExportMapInput interface {
pulumi.Input
ToAccountCostManagementExportMapOutput() AccountCostManagementExportMapOutput
ToAccountCostManagementExportMapOutputWithContext(context.Context) AccountCostManagementExportMapOutput
}
type AccountCostManagementExportMap map[string]AccountCostManagementExportInput
func (AccountCostManagementExportMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountCostManagementExport)(nil)).Elem()
}
func (i AccountCostManagementExportMap) ToAccountCostManagementExportMapOutput() AccountCostManagementExportMapOutput {
return i.ToAccountCostManagementExportMapOutputWithContext(context.Background())
}
func (i AccountCostManagementExportMap) ToAccountCostManagementExportMapOutputWithContext(ctx context.Context) AccountCostManagementExportMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountCostManagementExportMapOutput)
}
type AccountCostManagementExportOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountCostManagementExport)(nil)).Elem()
}
func (o AccountCostManagementExportOutput) ToAccountCostManagementExportOutput() AccountCostManagementExportOutput {
return o
}
func (o AccountCostManagementExportOutput) ToAccountCostManagementExportOutputWithContext(ctx context.Context) AccountCostManagementExportOutput {
return o
}
// Is the cost management export active? Default is `true`.
func (o AccountCostManagementExportOutput) Active() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.BoolPtrOutput { return v.Active }).(pulumi.BoolPtrOutput)
}
// The id of the billing account on which to create an export. Changing this forces a new resource to be created.
func (o AccountCostManagementExportOutput) BillingAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringOutput { return v.BillingAccountId }).(pulumi.StringOutput)
}
// A `exportDataOptions` block as defined below.
func (o AccountCostManagementExportOutput) ExportDataOptions() AccountCostManagementExportExportDataOptionsOutput {
return o.ApplyT(func(v *AccountCostManagementExport) AccountCostManagementExportExportDataOptionsOutput {
return v.ExportDataOptions
}).(AccountCostManagementExportExportDataOptionsOutput)
}
// A `exportDataStorageLocation` block as defined below.
func (o AccountCostManagementExportOutput) ExportDataStorageLocation() AccountCostManagementExportExportDataStorageLocationOutput {
return o.ApplyT(func(v *AccountCostManagementExport) AccountCostManagementExportExportDataStorageLocationOutput {
return v.ExportDataStorageLocation
}).(AccountCostManagementExportExportDataStorageLocationOutput)
}
// Format for export. Valid values are `Csv` only. Default is `Csv`.
func (o AccountCostManagementExportOutput) FileFormat() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringPtrOutput { return v.FileFormat }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.
func (o AccountCostManagementExportOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The date the export will stop capturing information.
func (o AccountCostManagementExportOutput) RecurrencePeriodEndDate() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodEndDate }).(pulumi.StringOutput)
}
// The date the export will start capturing information.
func (o AccountCostManagementExportOutput) RecurrencePeriodStartDate() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringOutput { return v.RecurrencePeriodStartDate }).(pulumi.StringOutput)
}
// How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.
func (o AccountCostManagementExportOutput) RecurrenceType() pulumi.StringOutput {
return o.ApplyT(func(v *AccountCostManagementExport) pulumi.StringOutput { return v.RecurrenceType }).(pulumi.StringOutput)
}
type AccountCostManagementExportArrayOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountCostManagementExport)(nil)).Elem()
}
func (o AccountCostManagementExportArrayOutput) ToAccountCostManagementExportArrayOutput() AccountCostManagementExportArrayOutput {
return o
}
func (o AccountCostManagementExportArrayOutput) ToAccountCostManagementExportArrayOutputWithContext(ctx context.Context) AccountCostManagementExportArrayOutput {
return o
}
func (o AccountCostManagementExportArrayOutput) Index(i pulumi.IntInput) AccountCostManagementExportOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountCostManagementExport {
return vs[0].([]*AccountCostManagementExport)[vs[1].(int)]
}).(AccountCostManagementExportOutput)
}
type AccountCostManagementExportMapOutput struct{ *pulumi.OutputState }
func (AccountCostManagementExportMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountCostManagementExport)(nil)).Elem()
}
func (o AccountCostManagementExportMapOutput) ToAccountCostManagementExportMapOutput() AccountCostManagementExportMapOutput {
return o
}
func (o AccountCostManagementExportMapOutput) ToAccountCostManagementExportMapOutputWithContext(ctx context.Context) AccountCostManagementExportMapOutput {
return o
}
func (o AccountCostManagementExportMapOutput) MapIndex(k pulumi.StringInput) AccountCostManagementExportOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountCostManagementExport {
return vs[0].(map[string]*AccountCostManagementExport)[vs[1].(string)]
}).(AccountCostManagementExportOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportInput)(nil)).Elem(), &AccountCostManagementExport{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportArrayInput)(nil)).Elem(), AccountCostManagementExportArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountCostManagementExportMapInput)(nil)).Elem(), AccountCostManagementExportMap{})
pulumi.RegisterOutputType(AccountCostManagementExportOutput{})
pulumi.RegisterOutputType(AccountCostManagementExportArrayOutput{})
pulumi.RegisterOutputType(AccountCostManagementExportMapOutput{})
}
| 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/fluidrelay/init.go | sdk/go/azure/fluidrelay/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 fluidrelay
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:fluidrelay/server:Server":
r = &Server{}
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",
"fluidrelay/server",
&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/fluidrelay/pulumiTypes.go | sdk/go/azure/fluidrelay/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 fluidrelay
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 ServerCustomerManagedKey struct {
// The Key Vault Key Id that will be used to encrypt the Fluid Relay Server.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
UserAssignedIdentityId string `pulumi:"userAssignedIdentityId"`
}
// ServerCustomerManagedKeyInput is an input type that accepts ServerCustomerManagedKeyArgs and ServerCustomerManagedKeyOutput values.
// You can construct a concrete instance of `ServerCustomerManagedKeyInput` via:
//
// ServerCustomerManagedKeyArgs{...}
type ServerCustomerManagedKeyInput interface {
pulumi.Input
ToServerCustomerManagedKeyOutput() ServerCustomerManagedKeyOutput
ToServerCustomerManagedKeyOutputWithContext(context.Context) ServerCustomerManagedKeyOutput
}
type ServerCustomerManagedKeyArgs struct {
// The Key Vault Key Id that will be used to encrypt the Fluid Relay Server.
KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"`
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
UserAssignedIdentityId pulumi.StringInput `pulumi:"userAssignedIdentityId"`
}
func (ServerCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServerCustomerManagedKey)(nil)).Elem()
}
func (i ServerCustomerManagedKeyArgs) ToServerCustomerManagedKeyOutput() ServerCustomerManagedKeyOutput {
return i.ToServerCustomerManagedKeyOutputWithContext(context.Background())
}
func (i ServerCustomerManagedKeyArgs) ToServerCustomerManagedKeyOutputWithContext(ctx context.Context) ServerCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerCustomerManagedKeyOutput)
}
func (i ServerCustomerManagedKeyArgs) ToServerCustomerManagedKeyPtrOutput() ServerCustomerManagedKeyPtrOutput {
return i.ToServerCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (i ServerCustomerManagedKeyArgs) ToServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ServerCustomerManagedKeyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerCustomerManagedKeyOutput).ToServerCustomerManagedKeyPtrOutputWithContext(ctx)
}
// ServerCustomerManagedKeyPtrInput is an input type that accepts ServerCustomerManagedKeyArgs, ServerCustomerManagedKeyPtr and ServerCustomerManagedKeyPtrOutput values.
// You can construct a concrete instance of `ServerCustomerManagedKeyPtrInput` via:
//
// ServerCustomerManagedKeyArgs{...}
//
// or:
//
// nil
type ServerCustomerManagedKeyPtrInput interface {
pulumi.Input
ToServerCustomerManagedKeyPtrOutput() ServerCustomerManagedKeyPtrOutput
ToServerCustomerManagedKeyPtrOutputWithContext(context.Context) ServerCustomerManagedKeyPtrOutput
}
type serverCustomerManagedKeyPtrType ServerCustomerManagedKeyArgs
func ServerCustomerManagedKeyPtr(v *ServerCustomerManagedKeyArgs) ServerCustomerManagedKeyPtrInput {
return (*serverCustomerManagedKeyPtrType)(v)
}
func (*serverCustomerManagedKeyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServerCustomerManagedKey)(nil)).Elem()
}
func (i *serverCustomerManagedKeyPtrType) ToServerCustomerManagedKeyPtrOutput() ServerCustomerManagedKeyPtrOutput {
return i.ToServerCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (i *serverCustomerManagedKeyPtrType) ToServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ServerCustomerManagedKeyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerCustomerManagedKeyPtrOutput)
}
type ServerCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (ServerCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServerCustomerManagedKey)(nil)).Elem()
}
func (o ServerCustomerManagedKeyOutput) ToServerCustomerManagedKeyOutput() ServerCustomerManagedKeyOutput {
return o
}
func (o ServerCustomerManagedKeyOutput) ToServerCustomerManagedKeyOutputWithContext(ctx context.Context) ServerCustomerManagedKeyOutput {
return o
}
func (o ServerCustomerManagedKeyOutput) ToServerCustomerManagedKeyPtrOutput() ServerCustomerManagedKeyPtrOutput {
return o.ToServerCustomerManagedKeyPtrOutputWithContext(context.Background())
}
func (o ServerCustomerManagedKeyOutput) ToServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ServerCustomerManagedKeyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ServerCustomerManagedKey) *ServerCustomerManagedKey {
return &v
}).(ServerCustomerManagedKeyPtrOutput)
}
// The Key Vault Key Id that will be used to encrypt the Fluid Relay Server.
func (o ServerCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v ServerCustomerManagedKey) string { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
func (o ServerCustomerManagedKeyOutput) UserAssignedIdentityId() pulumi.StringOutput {
return o.ApplyT(func(v ServerCustomerManagedKey) string { return v.UserAssignedIdentityId }).(pulumi.StringOutput)
}
type ServerCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState }
func (ServerCustomerManagedKeyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerCustomerManagedKey)(nil)).Elem()
}
func (o ServerCustomerManagedKeyPtrOutput) ToServerCustomerManagedKeyPtrOutput() ServerCustomerManagedKeyPtrOutput {
return o
}
func (o ServerCustomerManagedKeyPtrOutput) ToServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ServerCustomerManagedKeyPtrOutput {
return o
}
func (o ServerCustomerManagedKeyPtrOutput) Elem() ServerCustomerManagedKeyOutput {
return o.ApplyT(func(v *ServerCustomerManagedKey) ServerCustomerManagedKey {
if v != nil {
return *v
}
var ret ServerCustomerManagedKey
return ret
}).(ServerCustomerManagedKeyOutput)
}
// The Key Vault Key Id that will be used to encrypt the Fluid Relay Server.
func (o ServerCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerCustomerManagedKey) *string {
if v == nil {
return nil
}
return &v.KeyVaultKeyId
}).(pulumi.StringPtrOutput)
}
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
func (o ServerCustomerManagedKeyPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerCustomerManagedKey) *string {
if v == nil {
return nil
}
return &v.UserAssignedIdentityId
}).(pulumi.StringPtrOutput)
}
type ServerIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Fluid Relay Service.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Fluid Relay Service. Possible values are `SystemAssigned`,`UserAssigned` and `SystemAssigned, UserAssigned`.
Type string `pulumi:"type"`
}
// ServerIdentityInput is an input type that accepts ServerIdentityArgs and ServerIdentityOutput values.
// You can construct a concrete instance of `ServerIdentityInput` via:
//
// ServerIdentityArgs{...}
type ServerIdentityInput interface {
pulumi.Input
ToServerIdentityOutput() ServerIdentityOutput
ToServerIdentityOutputWithContext(context.Context) ServerIdentityOutput
}
type ServerIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Fluid Relay Service.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Fluid Relay Service. Possible values are `SystemAssigned`,`UserAssigned` and `SystemAssigned, UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (ServerIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServerIdentity)(nil)).Elem()
}
func (i ServerIdentityArgs) ToServerIdentityOutput() ServerIdentityOutput {
return i.ToServerIdentityOutputWithContext(context.Background())
}
func (i ServerIdentityArgs) ToServerIdentityOutputWithContext(ctx context.Context) ServerIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerIdentityOutput)
}
func (i ServerIdentityArgs) ToServerIdentityPtrOutput() ServerIdentityPtrOutput {
return i.ToServerIdentityPtrOutputWithContext(context.Background())
}
func (i ServerIdentityArgs) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerIdentityOutput).ToServerIdentityPtrOutputWithContext(ctx)
}
// ServerIdentityPtrInput is an input type that accepts ServerIdentityArgs, ServerIdentityPtr and ServerIdentityPtrOutput values.
// You can construct a concrete instance of `ServerIdentityPtrInput` via:
//
// ServerIdentityArgs{...}
//
// or:
//
// nil
type ServerIdentityPtrInput interface {
pulumi.Input
ToServerIdentityPtrOutput() ServerIdentityPtrOutput
ToServerIdentityPtrOutputWithContext(context.Context) ServerIdentityPtrOutput
}
type serverIdentityPtrType ServerIdentityArgs
func ServerIdentityPtr(v *ServerIdentityArgs) ServerIdentityPtrInput {
return (*serverIdentityPtrType)(v)
}
func (*serverIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServerIdentity)(nil)).Elem()
}
func (i *serverIdentityPtrType) ToServerIdentityPtrOutput() ServerIdentityPtrOutput {
return i.ToServerIdentityPtrOutputWithContext(context.Background())
}
func (i *serverIdentityPtrType) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerIdentityPtrOutput)
}
type ServerIdentityOutput struct{ *pulumi.OutputState }
func (ServerIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServerIdentity)(nil)).Elem()
}
func (o ServerIdentityOutput) ToServerIdentityOutput() ServerIdentityOutput {
return o
}
func (o ServerIdentityOutput) ToServerIdentityOutputWithContext(ctx context.Context) ServerIdentityOutput {
return o
}
func (o ServerIdentityOutput) ToServerIdentityPtrOutput() ServerIdentityPtrOutput {
return o.ToServerIdentityPtrOutputWithContext(context.Background())
}
func (o ServerIdentityOutput) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ServerIdentity) *ServerIdentity {
return &v
}).(ServerIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Fluid Relay Service.
func (o ServerIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServerIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server.
func (o ServerIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServerIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server.
func (o ServerIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServerIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Fluid Relay Service. Possible values are `SystemAssigned`,`UserAssigned` and `SystemAssigned, UserAssigned`.
func (o ServerIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ServerIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ServerIdentityPtrOutput struct{ *pulumi.OutputState }
func (ServerIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerIdentity)(nil)).Elem()
}
func (o ServerIdentityPtrOutput) ToServerIdentityPtrOutput() ServerIdentityPtrOutput {
return o
}
func (o ServerIdentityPtrOutput) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput {
return o
}
func (o ServerIdentityPtrOutput) Elem() ServerIdentityOutput {
return o.ApplyT(func(v *ServerIdentity) ServerIdentity {
if v != nil {
return *v
}
var ret ServerIdentity
return ret
}).(ServerIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Fluid Relay Service.
func (o ServerIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServerIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Identity of this Fluid Relay Server.
func (o ServerIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Identity of this Fluid Relay Server.
func (o ServerIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Fluid Relay Service. Possible values are `SystemAssigned`,`UserAssigned` and `SystemAssigned, UserAssigned`.
func (o ServerIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerCustomerManagedKeyInput)(nil)).Elem(), ServerCustomerManagedKeyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerCustomerManagedKeyPtrInput)(nil)).Elem(), ServerCustomerManagedKeyArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerIdentityInput)(nil)).Elem(), ServerIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerIdentityPtrInput)(nil)).Elem(), ServerIdentityArgs{})
pulumi.RegisterOutputType(ServerCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(ServerCustomerManagedKeyPtrOutput{})
pulumi.RegisterOutputType(ServerIdentityOutput{})
pulumi.RegisterOutputType(ServerIdentityPtrOutput{})
}
| 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/fluidrelay/server.go | sdk/go/azure/fluidrelay/server.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 fluidrelay
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Fluid Relay 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/fluidrelay"
// "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 = fluidrelay.NewServer(ctx, "example", &fluidrelay.ServerArgs{
// Name: pulumi.String("example"),
// 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.FluidRelay` - 2022-05-26
//
// ## Import
//
// Fluid Relay Servers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:fluidrelay/server:Server example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.FluidRelay/fluidRelayServers/server1
// ```
type Server struct {
pulumi.CustomResourceState
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
CustomerManagedKey ServerCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"`
// The Fluid tenantId for this server.
FrsTenantId pulumi.StringOutput `pulumi:"frsTenantId"`
// An `identity` block as defined below.
Identity ServerIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An array of the Fluid Relay Orderer endpoints. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
OrdererEndpoints pulumi.StringArrayOutput `pulumi:"ordererEndpoints"`
// The primary key for this server.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary key for this server.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// An array of service endpoints for this Fluid Relay Server.
ServiceEndpoints pulumi.StringArrayOutput `pulumi:"serviceEndpoints"`
// An array of storage endpoints for this Fluid Relay Server. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
StorageEndpoints pulumi.StringArrayOutput `pulumi:"storageEndpoints"`
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
StorageSku pulumi.StringOutput `pulumi:"storageSku"`
// A mapping of tags which should be assigned to the Fluid Relay Server.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewServer registers a new resource with the given unique name, arguments, and options.
func NewServer(ctx *pulumi.Context,
name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, 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'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryKey",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Server
err := ctx.RegisterResource("azure:fluidrelay/server:Server", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServer gets an existing Server 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 GetServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) {
var resource Server
err := ctx.ReadResource("azure:fluidrelay/server:Server", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Server resources.
type serverState struct {
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
CustomerManagedKey *ServerCustomerManagedKey `pulumi:"customerManagedKey"`
// The Fluid tenantId for this server.
FrsTenantId *string `pulumi:"frsTenantId"`
// An `identity` block as defined below.
Identity *ServerIdentity `pulumi:"identity"`
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
Name *string `pulumi:"name"`
// An array of the Fluid Relay Orderer endpoints. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
OrdererEndpoints []string `pulumi:"ordererEndpoints"`
// The primary key for this server.
PrimaryKey *string `pulumi:"primaryKey"`
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary key for this server.
SecondaryKey *string `pulumi:"secondaryKey"`
// An array of service endpoints for this Fluid Relay Server.
ServiceEndpoints []string `pulumi:"serviceEndpoints"`
// An array of storage endpoints for this Fluid Relay Server. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
StorageEndpoints []string `pulumi:"storageEndpoints"`
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
StorageSku *string `pulumi:"storageSku"`
// A mapping of tags which should be assigned to the Fluid Relay Server.
Tags map[string]string `pulumi:"tags"`
}
type ServerState struct {
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
CustomerManagedKey ServerCustomerManagedKeyPtrInput
// The Fluid tenantId for this server.
FrsTenantId pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ServerIdentityPtrInput
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
Name pulumi.StringPtrInput
// An array of the Fluid Relay Orderer endpoints. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
OrdererEndpoints pulumi.StringArrayInput
// The primary key for this server.
PrimaryKey pulumi.StringPtrInput
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary key for this server.
SecondaryKey pulumi.StringPtrInput
// An array of service endpoints for this Fluid Relay Server.
ServiceEndpoints pulumi.StringArrayInput
// An array of storage endpoints for this Fluid Relay Server. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
StorageEndpoints pulumi.StringArrayInput
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
StorageSku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Fluid Relay Server.
Tags pulumi.StringMapInput
}
func (ServerState) ElementType() reflect.Type {
return reflect.TypeOf((*serverState)(nil)).Elem()
}
type serverArgs struct {
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
CustomerManagedKey *ServerCustomerManagedKey `pulumi:"customerManagedKey"`
// An `identity` block as defined below.
Identity *ServerIdentity `pulumi:"identity"`
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
StorageSku *string `pulumi:"storageSku"`
// A mapping of tags which should be assigned to the Fluid Relay Server.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Server resource.
type ServerArgs struct {
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
CustomerManagedKey ServerCustomerManagedKeyPtrInput
// An `identity` block as defined below.
Identity ServerIdentityPtrInput
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
ResourceGroupName pulumi.StringInput
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
StorageSku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Fluid Relay Server.
Tags pulumi.StringMapInput
}
func (ServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverArgs)(nil)).Elem()
}
type ServerInput interface {
pulumi.Input
ToServerOutput() ServerOutput
ToServerOutputWithContext(ctx context.Context) ServerOutput
}
func (*Server) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil)).Elem()
}
func (i *Server) ToServerOutput() ServerOutput {
return i.ToServerOutputWithContext(context.Background())
}
func (i *Server) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerOutput)
}
// ServerArrayInput is an input type that accepts ServerArray and ServerArrayOutput values.
// You can construct a concrete instance of `ServerArrayInput` via:
//
// ServerArray{ ServerArgs{...} }
type ServerArrayInput interface {
pulumi.Input
ToServerArrayOutput() ServerArrayOutput
ToServerArrayOutputWithContext(context.Context) ServerArrayOutput
}
type ServerArray []ServerInput
func (ServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Server)(nil)).Elem()
}
func (i ServerArray) ToServerArrayOutput() ServerArrayOutput {
return i.ToServerArrayOutputWithContext(context.Background())
}
func (i ServerArray) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerArrayOutput)
}
// ServerMapInput is an input type that accepts ServerMap and ServerMapOutput values.
// You can construct a concrete instance of `ServerMapInput` via:
//
// ServerMap{ "key": ServerArgs{...} }
type ServerMapInput interface {
pulumi.Input
ToServerMapOutput() ServerMapOutput
ToServerMapOutputWithContext(context.Context) ServerMapOutput
}
type ServerMap map[string]ServerInput
func (ServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
}
func (i ServerMap) ToServerMapOutput() ServerMapOutput {
return i.ToServerMapOutputWithContext(context.Background())
}
func (i ServerMap) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMapOutput)
}
type ServerOutput struct{ *pulumi.OutputState }
func (ServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil)).Elem()
}
func (o ServerOutput) ToServerOutput() ServerOutput {
return o
}
func (o ServerOutput) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return o
}
// A `customerManagedKey` block as defined below. Changing this forces a new resource to be created.
func (o ServerOutput) CustomerManagedKey() ServerCustomerManagedKeyPtrOutput {
return o.ApplyT(func(v *Server) ServerCustomerManagedKeyPtrOutput { return v.CustomerManagedKey }).(ServerCustomerManagedKeyPtrOutput)
}
// The Fluid tenantId for this server.
func (o ServerOutput) FrsTenantId() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.FrsTenantId }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o ServerOutput) Identity() ServerIdentityPtrOutput {
return o.ApplyT(func(v *Server) ServerIdentityPtrOutput { return v.Identity }).(ServerIdentityPtrOutput)
}
// The Azure Region where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
func (o ServerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Fluid Relay Server. Changing this forces a new Fluid Relay Server to be created.
func (o ServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An array of the Fluid Relay Orderer endpoints. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
func (o ServerOutput) OrdererEndpoints() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Server) pulumi.StringArrayOutput { return v.OrdererEndpoints }).(pulumi.StringArrayOutput)
}
// The primary key for this server.
func (o ServerOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Fluid Relay Server should exist. Changing this forces a new Fluid Relay Server to be created.
func (o ServerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary key for this server.
func (o ServerOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// An array of service endpoints for this Fluid Relay Server.
func (o ServerOutput) ServiceEndpoints() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Server) pulumi.StringArrayOutput { return v.ServiceEndpoints }).(pulumi.StringArrayOutput)
}
// An array of storage endpoints for this Fluid Relay Server. This will be deprecated in future version of fluid relay server and will always be empty, [more details](https://learn.microsoft.com/en-us/azure/azure-fluid-relay/concepts/version-compatibility).
func (o ServerOutput) StorageEndpoints() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Server) pulumi.StringArrayOutput { return v.StorageEndpoints }).(pulumi.StringArrayOutput)
}
// Sku of the storage associated with the resource, Possible values are `standard` and `basic`. Changing this forces a new Fluid Relay Server to be created.
func (o ServerOutput) StorageSku() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.StorageSku }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Fluid Relay Server.
func (o ServerOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Server) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ServerArrayOutput struct{ *pulumi.OutputState }
func (ServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Server)(nil)).Elem()
}
func (o ServerArrayOutput) ToServerArrayOutput() ServerArrayOutput {
return o
}
func (o ServerArrayOutput) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return o
}
func (o ServerArrayOutput) Index(i pulumi.IntInput) ServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Server {
return vs[0].([]*Server)[vs[1].(int)]
}).(ServerOutput)
}
type ServerMapOutput struct{ *pulumi.OutputState }
func (ServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
}
func (o ServerMapOutput) ToServerMapOutput() ServerMapOutput {
return o
}
func (o ServerMapOutput) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return o
}
func (o ServerMapOutput) MapIndex(k pulumi.StringInput) ServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Server {
return vs[0].(map[string]*Server)[vs[1].(string)]
}).(ServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerInput)(nil)).Elem(), &Server{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerArrayInput)(nil)).Elem(), ServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerMapInput)(nil)).Elem(), ServerMap{})
pulumi.RegisterOutputType(ServerOutput{})
pulumi.RegisterOutputType(ServerArrayOutput{})
pulumi.RegisterOutputType(ServerMapOutput{})
}
| 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/hsm/init.go | sdk/go/azure/hsm/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 hsm
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:hsm/module:Module":
r = &Module{}
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",
"hsm/module",
&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/hsm/pulumiTypes.go | sdk/go/azure/hsm/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 hsm
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 ModuleManagementNetworkProfile struct {
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
NetworkInterfacePrivateIpAddresses []string `pulumi:"networkInterfacePrivateIpAddresses"`
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
SubnetId string `pulumi:"subnetId"`
}
// ModuleManagementNetworkProfileInput is an input type that accepts ModuleManagementNetworkProfileArgs and ModuleManagementNetworkProfileOutput values.
// You can construct a concrete instance of `ModuleManagementNetworkProfileInput` via:
//
// ModuleManagementNetworkProfileArgs{...}
type ModuleManagementNetworkProfileInput interface {
pulumi.Input
ToModuleManagementNetworkProfileOutput() ModuleManagementNetworkProfileOutput
ToModuleManagementNetworkProfileOutputWithContext(context.Context) ModuleManagementNetworkProfileOutput
}
type ModuleManagementNetworkProfileArgs struct {
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
NetworkInterfacePrivateIpAddresses pulumi.StringArrayInput `pulumi:"networkInterfacePrivateIpAddresses"`
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (ModuleManagementNetworkProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleManagementNetworkProfile)(nil)).Elem()
}
func (i ModuleManagementNetworkProfileArgs) ToModuleManagementNetworkProfileOutput() ModuleManagementNetworkProfileOutput {
return i.ToModuleManagementNetworkProfileOutputWithContext(context.Background())
}
func (i ModuleManagementNetworkProfileArgs) ToModuleManagementNetworkProfileOutputWithContext(ctx context.Context) ModuleManagementNetworkProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleManagementNetworkProfileOutput)
}
func (i ModuleManagementNetworkProfileArgs) ToModuleManagementNetworkProfilePtrOutput() ModuleManagementNetworkProfilePtrOutput {
return i.ToModuleManagementNetworkProfilePtrOutputWithContext(context.Background())
}
func (i ModuleManagementNetworkProfileArgs) ToModuleManagementNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleManagementNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleManagementNetworkProfileOutput).ToModuleManagementNetworkProfilePtrOutputWithContext(ctx)
}
// ModuleManagementNetworkProfilePtrInput is an input type that accepts ModuleManagementNetworkProfileArgs, ModuleManagementNetworkProfilePtr and ModuleManagementNetworkProfilePtrOutput values.
// You can construct a concrete instance of `ModuleManagementNetworkProfilePtrInput` via:
//
// ModuleManagementNetworkProfileArgs{...}
//
// or:
//
// nil
type ModuleManagementNetworkProfilePtrInput interface {
pulumi.Input
ToModuleManagementNetworkProfilePtrOutput() ModuleManagementNetworkProfilePtrOutput
ToModuleManagementNetworkProfilePtrOutputWithContext(context.Context) ModuleManagementNetworkProfilePtrOutput
}
type moduleManagementNetworkProfilePtrType ModuleManagementNetworkProfileArgs
func ModuleManagementNetworkProfilePtr(v *ModuleManagementNetworkProfileArgs) ModuleManagementNetworkProfilePtrInput {
return (*moduleManagementNetworkProfilePtrType)(v)
}
func (*moduleManagementNetworkProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleManagementNetworkProfile)(nil)).Elem()
}
func (i *moduleManagementNetworkProfilePtrType) ToModuleManagementNetworkProfilePtrOutput() ModuleManagementNetworkProfilePtrOutput {
return i.ToModuleManagementNetworkProfilePtrOutputWithContext(context.Background())
}
func (i *moduleManagementNetworkProfilePtrType) ToModuleManagementNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleManagementNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleManagementNetworkProfilePtrOutput)
}
type ModuleManagementNetworkProfileOutput struct{ *pulumi.OutputState }
func (ModuleManagementNetworkProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleManagementNetworkProfile)(nil)).Elem()
}
func (o ModuleManagementNetworkProfileOutput) ToModuleManagementNetworkProfileOutput() ModuleManagementNetworkProfileOutput {
return o
}
func (o ModuleManagementNetworkProfileOutput) ToModuleManagementNetworkProfileOutputWithContext(ctx context.Context) ModuleManagementNetworkProfileOutput {
return o
}
func (o ModuleManagementNetworkProfileOutput) ToModuleManagementNetworkProfilePtrOutput() ModuleManagementNetworkProfilePtrOutput {
return o.ToModuleManagementNetworkProfilePtrOutputWithContext(context.Background())
}
func (o ModuleManagementNetworkProfileOutput) ToModuleManagementNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleManagementNetworkProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ModuleManagementNetworkProfile) *ModuleManagementNetworkProfile {
return &v
}).(ModuleManagementNetworkProfilePtrOutput)
}
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleManagementNetworkProfileOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v ModuleManagementNetworkProfile) []string { return v.NetworkInterfacePrivateIpAddresses }).(pulumi.StringArrayOutput)
}
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleManagementNetworkProfileOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v ModuleManagementNetworkProfile) string { return v.SubnetId }).(pulumi.StringOutput)
}
type ModuleManagementNetworkProfilePtrOutput struct{ *pulumi.OutputState }
func (ModuleManagementNetworkProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleManagementNetworkProfile)(nil)).Elem()
}
func (o ModuleManagementNetworkProfilePtrOutput) ToModuleManagementNetworkProfilePtrOutput() ModuleManagementNetworkProfilePtrOutput {
return o
}
func (o ModuleManagementNetworkProfilePtrOutput) ToModuleManagementNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleManagementNetworkProfilePtrOutput {
return o
}
func (o ModuleManagementNetworkProfilePtrOutput) Elem() ModuleManagementNetworkProfileOutput {
return o.ApplyT(func(v *ModuleManagementNetworkProfile) ModuleManagementNetworkProfile {
if v != nil {
return *v
}
var ret ModuleManagementNetworkProfile
return ret
}).(ModuleManagementNetworkProfileOutput)
}
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleManagementNetworkProfilePtrOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ModuleManagementNetworkProfile) []string {
if v == nil {
return nil
}
return v.NetworkInterfacePrivateIpAddresses
}).(pulumi.StringArrayOutput)
}
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleManagementNetworkProfilePtrOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ModuleManagementNetworkProfile) *string {
if v == nil {
return nil
}
return &v.SubnetId
}).(pulumi.StringPtrOutput)
}
type ModuleNetworkProfile struct {
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
NetworkInterfacePrivateIpAddresses []string `pulumi:"networkInterfacePrivateIpAddresses"`
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
SubnetId string `pulumi:"subnetId"`
}
// ModuleNetworkProfileInput is an input type that accepts ModuleNetworkProfileArgs and ModuleNetworkProfileOutput values.
// You can construct a concrete instance of `ModuleNetworkProfileInput` via:
//
// ModuleNetworkProfileArgs{...}
type ModuleNetworkProfileInput interface {
pulumi.Input
ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput
ToModuleNetworkProfileOutputWithContext(context.Context) ModuleNetworkProfileOutput
}
type ModuleNetworkProfileArgs struct {
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
NetworkInterfacePrivateIpAddresses pulumi.StringArrayInput `pulumi:"networkInterfacePrivateIpAddresses"`
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (ModuleNetworkProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleNetworkProfile)(nil)).Elem()
}
func (i ModuleNetworkProfileArgs) ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput {
return i.ToModuleNetworkProfileOutputWithContext(context.Background())
}
func (i ModuleNetworkProfileArgs) ToModuleNetworkProfileOutputWithContext(ctx context.Context) ModuleNetworkProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleNetworkProfileOutput)
}
func (i ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput {
return i.ToModuleNetworkProfilePtrOutputWithContext(context.Background())
}
func (i ModuleNetworkProfileArgs) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleNetworkProfileOutput).ToModuleNetworkProfilePtrOutputWithContext(ctx)
}
// ModuleNetworkProfilePtrInput is an input type that accepts ModuleNetworkProfileArgs, ModuleNetworkProfilePtr and ModuleNetworkProfilePtrOutput values.
// You can construct a concrete instance of `ModuleNetworkProfilePtrInput` via:
//
// ModuleNetworkProfileArgs{...}
//
// or:
//
// nil
type ModuleNetworkProfilePtrInput interface {
pulumi.Input
ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput
ToModuleNetworkProfilePtrOutputWithContext(context.Context) ModuleNetworkProfilePtrOutput
}
type moduleNetworkProfilePtrType ModuleNetworkProfileArgs
func ModuleNetworkProfilePtr(v *ModuleNetworkProfileArgs) ModuleNetworkProfilePtrInput {
return (*moduleNetworkProfilePtrType)(v)
}
func (*moduleNetworkProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleNetworkProfile)(nil)).Elem()
}
func (i *moduleNetworkProfilePtrType) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput {
return i.ToModuleNetworkProfilePtrOutputWithContext(context.Background())
}
func (i *moduleNetworkProfilePtrType) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleNetworkProfilePtrOutput)
}
type ModuleNetworkProfileOutput struct{ *pulumi.OutputState }
func (ModuleNetworkProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleNetworkProfile)(nil)).Elem()
}
func (o ModuleNetworkProfileOutput) ToModuleNetworkProfileOutput() ModuleNetworkProfileOutput {
return o
}
func (o ModuleNetworkProfileOutput) ToModuleNetworkProfileOutputWithContext(ctx context.Context) ModuleNetworkProfileOutput {
return o
}
func (o ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput {
return o.ToModuleNetworkProfilePtrOutputWithContext(context.Background())
}
func (o ModuleNetworkProfileOutput) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ModuleNetworkProfile) *ModuleNetworkProfile {
return &v
}).(ModuleNetworkProfilePtrOutput)
}
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleNetworkProfileOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v ModuleNetworkProfile) []string { return v.NetworkInterfacePrivateIpAddresses }).(pulumi.StringArrayOutput)
}
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleNetworkProfileOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v ModuleNetworkProfile) string { return v.SubnetId }).(pulumi.StringOutput)
}
type ModuleNetworkProfilePtrOutput struct{ *pulumi.OutputState }
func (ModuleNetworkProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleNetworkProfile)(nil)).Elem()
}
func (o ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutput() ModuleNetworkProfilePtrOutput {
return o
}
func (o ModuleNetworkProfilePtrOutput) ToModuleNetworkProfilePtrOutputWithContext(ctx context.Context) ModuleNetworkProfilePtrOutput {
return o
}
func (o ModuleNetworkProfilePtrOutput) Elem() ModuleNetworkProfileOutput {
return o.ApplyT(func(v *ModuleNetworkProfile) ModuleNetworkProfile {
if v != nil {
return *v
}
var ret ModuleNetworkProfile
return ret
}).(ModuleNetworkProfileOutput)
}
// The private IPv4 address of the network interface. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleNetworkProfilePtrOutput) NetworkInterfacePrivateIpAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ModuleNetworkProfile) []string {
if v == nil {
return nil
}
return v.NetworkInterfacePrivateIpAddresses
}).(pulumi.StringArrayOutput)
}
// The ID of the subnet. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleNetworkProfilePtrOutput) SubnetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ModuleNetworkProfile) *string {
if v == nil {
return nil
}
return &v.SubnetId
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ModuleManagementNetworkProfileInput)(nil)).Elem(), ModuleManagementNetworkProfileArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleManagementNetworkProfilePtrInput)(nil)).Elem(), ModuleManagementNetworkProfileArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleNetworkProfileInput)(nil)).Elem(), ModuleNetworkProfileArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleNetworkProfilePtrInput)(nil)).Elem(), ModuleNetworkProfileArgs{})
pulumi.RegisterOutputType(ModuleManagementNetworkProfileOutput{})
pulumi.RegisterOutputType(ModuleManagementNetworkProfilePtrOutput{})
pulumi.RegisterOutputType(ModuleNetworkProfileOutput{})
pulumi.RegisterOutputType(ModuleNetworkProfilePtrOutput{})
}
| 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/hsm/module.go | sdk/go/azure/hsm/module.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 hsm
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Dedicated Hardware Security Module.
//
// > **Note:** Before using this resource, it's required to submit the request of registering the providers and features with Azure CLI `az provider register --namespace Microsoft.HardwareSecurityModules && az feature register --namespace Microsoft.HardwareSecurityModules --name AzureDedicatedHSM && az provider register --namespace Microsoft.Network && az feature register --namespace Microsoft.Network --name AllowBaremetalServers` and ask service team (hsmrequest@microsoft.com) to approve. See more details from <https://docs.microsoft.com/azure/dedicated-hsm/tutorial-deploy-hsm-cli#prerequisites>.
//
// > **Note:** If the quota is not enough in some region, please submit the quota request to service team.
//
// ## 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/hsm"
// "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-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.2.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-compute"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.2.0.0/24"),
// },
// })
// if err != nil {
// return err
// }
// example2, err := network.NewSubnet(ctx, "example2", &network.SubnetArgs{
// Name: pulumi.String("example-hsmsubnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.2.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("first"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/networkinterfaces/*"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// example3, err := network.NewSubnet(ctx, "example3", &network.SubnetArgs{
// Name: pulumi.String("gatewaysubnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.2.255.0/26"),
// },
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-pip"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{
// Name: pulumi.String("example-vnetgateway"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("ExpressRoute"),
// VpnType: pulumi.String("PolicyBased"),
// Sku: pulumi.String("Standard"),
// IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{
// &network.VirtualNetworkGatewayIpConfigurationArgs{
// PublicIpAddressId: examplePublicIp.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// SubnetId: example3.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = hsm.NewModule(ctx, "example", &hsm.ModuleArgs{
// Name: pulumi.String("example-hsm"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("payShield10K_LMK1_CPS60"),
// ManagementNetworkProfile: &hsm.ModuleManagementNetworkProfileArgs{
// NetworkInterfacePrivateIpAddresses: pulumi.StringArray{
// pulumi.String("10.2.1.7"),
// },
// SubnetId: example2.ID(),
// },
// NetworkProfile: &hsm.ModuleNetworkProfileArgs{
// NetworkInterfacePrivateIpAddresses: pulumi.StringArray{
// pulumi.String("10.2.1.8"),
// },
// SubnetId: example2.ID(),
// },
// StampId: pulumi.String("stamp2"),
// Tags: pulumi.StringMap{
// "env": pulumi.String("Test"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleVirtualNetworkGateway,
// }))
// 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.HardwareSecurityModules` - 2021-11-30
//
// ## Import
//
// Dedicated Hardware Security Module can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:hsm/module:Module example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1
// ```
type Module struct {
pulumi.CustomResourceState
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
ManagementNetworkProfile ModuleManagementNetworkProfilePtrOutput `pulumi:"managementNetworkProfile"`
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile ModuleNetworkProfileOutput `pulumi:"networkProfile"`
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
StampId pulumi.StringPtrOutput `pulumi:"stampId"`
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
Zones pulumi.StringArrayOutput `pulumi:"zones"`
}
// NewModule registers a new resource with the given unique name, arguments, and options.
func NewModule(ctx *pulumi.Context,
name string, args *ModuleArgs, opts ...pulumi.ResourceOption) (*Module, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
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 Module
err := ctx.RegisterResource("azure:hsm/module:Module", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetModule gets an existing Module 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 GetModule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ModuleState, opts ...pulumi.ResourceOption) (*Module, error) {
var resource Module
err := ctx.ReadResource("azure:hsm/module:Module", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Module resources.
type moduleState struct {
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
Location *string `pulumi:"location"`
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
ManagementNetworkProfile *ModuleManagementNetworkProfile `pulumi:"managementNetworkProfile"`
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *ModuleNetworkProfile `pulumi:"networkProfile"`
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
SkuName *string `pulumi:"skuName"`
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
StampId *string `pulumi:"stampId"`
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
Tags map[string]string `pulumi:"tags"`
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
Zones []string `pulumi:"zones"`
}
type ModuleState struct {
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
Location pulumi.StringPtrInput
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
ManagementNetworkProfile ModuleManagementNetworkProfilePtrInput
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile ModuleNetworkProfilePtrInput
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
SkuName pulumi.StringPtrInput
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
StampId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
Tags pulumi.StringMapInput
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
Zones pulumi.StringArrayInput
}
func (ModuleState) ElementType() reflect.Type {
return reflect.TypeOf((*moduleState)(nil)).Elem()
}
type moduleArgs struct {
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
Location *string `pulumi:"location"`
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
ManagementNetworkProfile *ModuleManagementNetworkProfile `pulumi:"managementNetworkProfile"`
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile ModuleNetworkProfile `pulumi:"networkProfile"`
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
SkuName string `pulumi:"skuName"`
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
StampId *string `pulumi:"stampId"`
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
Tags map[string]string `pulumi:"tags"`
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
Zones []string `pulumi:"zones"`
}
// The set of arguments for constructing a Module resource.
type ModuleArgs struct {
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
Location pulumi.StringPtrInput
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
ManagementNetworkProfile ModuleManagementNetworkProfilePtrInput
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile ModuleNetworkProfileInput
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
ResourceGroupName pulumi.StringInput
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
SkuName pulumi.StringInput
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
StampId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
Tags pulumi.StringMapInput
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
Zones pulumi.StringArrayInput
}
func (ModuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moduleArgs)(nil)).Elem()
}
type ModuleInput interface {
pulumi.Input
ToModuleOutput() ModuleOutput
ToModuleOutputWithContext(ctx context.Context) ModuleOutput
}
func (*Module) ElementType() reflect.Type {
return reflect.TypeOf((**Module)(nil)).Elem()
}
func (i *Module) ToModuleOutput() ModuleOutput {
return i.ToModuleOutputWithContext(context.Background())
}
func (i *Module) ToModuleOutputWithContext(ctx context.Context) ModuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleOutput)
}
// ModuleArrayInput is an input type that accepts ModuleArray and ModuleArrayOutput values.
// You can construct a concrete instance of `ModuleArrayInput` via:
//
// ModuleArray{ ModuleArgs{...} }
type ModuleArrayInput interface {
pulumi.Input
ToModuleArrayOutput() ModuleArrayOutput
ToModuleArrayOutputWithContext(context.Context) ModuleArrayOutput
}
type ModuleArray []ModuleInput
func (ModuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Module)(nil)).Elem()
}
func (i ModuleArray) ToModuleArrayOutput() ModuleArrayOutput {
return i.ToModuleArrayOutputWithContext(context.Background())
}
func (i ModuleArray) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleArrayOutput)
}
// ModuleMapInput is an input type that accepts ModuleMap and ModuleMapOutput values.
// You can construct a concrete instance of `ModuleMapInput` via:
//
// ModuleMap{ "key": ModuleArgs{...} }
type ModuleMapInput interface {
pulumi.Input
ToModuleMapOutput() ModuleMapOutput
ToModuleMapOutputWithContext(context.Context) ModuleMapOutput
}
type ModuleMap map[string]ModuleInput
func (ModuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Module)(nil)).Elem()
}
func (i ModuleMap) ToModuleMapOutput() ModuleMapOutput {
return i.ToModuleMapOutputWithContext(context.Background())
}
func (i ModuleMap) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleMapOutput)
}
type ModuleOutput struct{ *pulumi.OutputState }
func (ModuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Module)(nil)).Elem()
}
func (o ModuleOutput) ToModuleOutput() ModuleOutput {
return o
}
func (o ModuleOutput) ToModuleOutputWithContext(ctx context.Context) ModuleOutput {
return o
}
// The Azure Region where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A `managementNetworkProfile` block as defined below.
//
// > **Note:** The `managementNetworkProfile` should not be specified when `skuName` is `SafeNet Luna Network HSM A790`.
func (o ModuleOutput) ManagementNetworkProfile() ModuleManagementNetworkProfilePtrOutput {
return o.ApplyT(func(v *Module) ModuleManagementNetworkProfilePtrOutput { return v.ManagementNetworkProfile }).(ModuleManagementNetworkProfilePtrOutput)
}
// The name which should be used for this Dedicated Hardware Security Module. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o ModuleOutput) NetworkProfile() ModuleNetworkProfileOutput {
return o.ApplyT(func(v *Module) ModuleNetworkProfileOutput { return v.NetworkProfile }).(ModuleNetworkProfileOutput)
}
// The name of the Resource Group where the Dedicated Hardware Security Module should exist. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU name of the dedicated hardware security module. Possible values are `payShield10K_LMK1_CPS60`,`payShield10K_LMK1_CPS250`,`payShield10K_LMK1_CPS2500`,`payShield10K_LMK2_CPS60`,`payShield10K_LMK2_CPS250`,`payShield10K_LMK2_CPS2500` and `SafeNet Luna Network HSM A790`. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// The ID of the stamp. Possible values are `stamp1` or `stamp2`. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) StampId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Module) pulumi.StringPtrOutput { return v.StampId }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to the Dedicated Hardware Security Module.
func (o ModuleOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Module) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies a list of Availability Zones in which this Dedicated Hardware Security Module should be located. Changing this forces a new Dedicated Hardware Security Module to be created.
func (o ModuleOutput) Zones() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Module) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput)
}
type ModuleArrayOutput struct{ *pulumi.OutputState }
func (ModuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Module)(nil)).Elem()
}
func (o ModuleArrayOutput) ToModuleArrayOutput() ModuleArrayOutput {
return o
}
func (o ModuleArrayOutput) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput {
return o
}
func (o ModuleArrayOutput) Index(i pulumi.IntInput) ModuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Module {
return vs[0].([]*Module)[vs[1].(int)]
}).(ModuleOutput)
}
type ModuleMapOutput struct{ *pulumi.OutputState }
func (ModuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Module)(nil)).Elem()
}
func (o ModuleMapOutput) ToModuleMapOutput() ModuleMapOutput {
return o
}
func (o ModuleMapOutput) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput {
return o
}
func (o ModuleMapOutput) MapIndex(k pulumi.StringInput) ModuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Module {
return vs[0].(map[string]*Module)[vs[1].(string)]
}).(ModuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ModuleInput)(nil)).Elem(), &Module{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleArrayInput)(nil)).Elem(), ModuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleMapInput)(nil)).Elem(), ModuleMap{})
pulumi.RegisterOutputType(ModuleOutput{})
pulumi.RegisterOutputType(ModuleArrayOutput{})
pulumi.RegisterOutputType(ModuleMapOutput{})
}
| 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/orbital/contactProfile.go | sdk/go/azure/orbital/contactProfile.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 orbital
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Contact profile.
//
// > **Note:** The `orbital.ContactProfile` resource has been deprecated and will be removed in v5.0 of the AzureRM Provider.
//
// ## 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/orbital"
// "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("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("testvnet"),
// 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("testsubnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("orbitalgateway"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Orbital/orbitalGateways"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/publicIPAddresses/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/read"),
// pulumi.String("Microsoft.Network/publicIPAddresses/read"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = orbital.NewContactProfile(ctx, "example", &orbital.ContactProfileArgs{
// Name: pulumi.String("example-contact-profile"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// MinimumVariableContactDuration: pulumi.String("PT1M"),
// AutoTracking: pulumi.String("disabled"),
// Links: orbital.ContactProfileLinkArray{
// &orbital.ContactProfileLinkArgs{
// Channels: orbital.ContactProfileLinkChannelArray{
// &orbital.ContactProfileLinkChannelArgs{
// Name: pulumi.String("channelname"),
// BandwidthMhz: pulumi.Float64(100),
// CenterFrequencyMhz: pulumi.Float64(101),
// EndPoints: orbital.ContactProfileLinkChannelEndPointArray{
// &orbital.ContactProfileLinkChannelEndPointArgs{
// EndPointName: pulumi.String("AQUA_command"),
// IpAddress: pulumi.String("10.0.1.0"),
// Port: pulumi.String("49513"),
// Protocol: pulumi.String("TCP"),
// },
// },
// },
// },
// Direction: pulumi.String("Uplink"),
// Name: pulumi.String("RHCP_UL"),
// Polarization: pulumi.String("RHCP"),
// },
// },
// NetworkConfigurationSubnetId: exampleSubnet.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.Orbital` - 2022-11-01
//
// ## Import
//
// Contact profile can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:orbital/contactProfile:ContactProfile example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Orbital/contactProfiles/contactProfile1
// ```
type ContactProfile struct {
pulumi.CustomResourceState
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
AutoTracking pulumi.StringOutput `pulumi:"autoTracking"`
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
EventHubUri pulumi.StringPtrOutput `pulumi:"eventHubUri"`
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
Links ContactProfileLinkArrayOutput `pulumi:"links"`
// The location where the contact profile exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Maximum elevation of the antenna during the contact in decimal degrees.
MinimumElevationDegrees pulumi.Float64PtrOutput `pulumi:"minimumElevationDegrees"`
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
MinimumVariableContactDuration pulumi.StringOutput `pulumi:"minimumVariableContactDuration"`
// The name of the contact profile. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
NetworkConfigurationSubnetId pulumi.StringOutput `pulumi:"networkConfigurationSubnetId"`
// The name of the Resource Group where the contact profile exists. 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"`
}
// NewContactProfile registers a new resource with the given unique name, arguments, and options.
func NewContactProfile(ctx *pulumi.Context,
name string, args *ContactProfileArgs, opts ...pulumi.ResourceOption) (*ContactProfile, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutoTracking == nil {
return nil, errors.New("invalid value for required argument 'AutoTracking'")
}
if args.Links == nil {
return nil, errors.New("invalid value for required argument 'Links'")
}
if args.MinimumVariableContactDuration == nil {
return nil, errors.New("invalid value for required argument 'MinimumVariableContactDuration'")
}
if args.NetworkConfigurationSubnetId == nil {
return nil, errors.New("invalid value for required argument 'NetworkConfigurationSubnetId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ContactProfile
err := ctx.RegisterResource("azure:orbital/contactProfile:ContactProfile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContactProfile gets an existing ContactProfile 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 GetContactProfile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContactProfileState, opts ...pulumi.ResourceOption) (*ContactProfile, error) {
var resource ContactProfile
err := ctx.ReadResource("azure:orbital/contactProfile:ContactProfile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ContactProfile resources.
type contactProfileState struct {
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
AutoTracking *string `pulumi:"autoTracking"`
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
EventHubUri *string `pulumi:"eventHubUri"`
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
Links []ContactProfileLink `pulumi:"links"`
// The location where the contact profile exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Maximum elevation of the antenna during the contact in decimal degrees.
MinimumElevationDegrees *float64 `pulumi:"minimumElevationDegrees"`
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
MinimumVariableContactDuration *string `pulumi:"minimumVariableContactDuration"`
// The name of the contact profile. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
NetworkConfigurationSubnetId *string `pulumi:"networkConfigurationSubnetId"`
// The name of the Resource Group where the contact profile exists. 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 ContactProfileState struct {
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
AutoTracking pulumi.StringPtrInput
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
EventHubUri pulumi.StringPtrInput
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
Links ContactProfileLinkArrayInput
// The location where the contact profile exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Maximum elevation of the antenna during the contact in decimal degrees.
MinimumElevationDegrees pulumi.Float64PtrInput
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
MinimumVariableContactDuration pulumi.StringPtrInput
// The name of the contact profile. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
NetworkConfigurationSubnetId pulumi.StringPtrInput
// The name of the Resource Group where the contact profile exists. 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 (ContactProfileState) ElementType() reflect.Type {
return reflect.TypeOf((*contactProfileState)(nil)).Elem()
}
type contactProfileArgs struct {
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
AutoTracking string `pulumi:"autoTracking"`
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
EventHubUri *string `pulumi:"eventHubUri"`
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
Links []ContactProfileLink `pulumi:"links"`
// The location where the contact profile exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Maximum elevation of the antenna during the contact in decimal degrees.
MinimumElevationDegrees *float64 `pulumi:"minimumElevationDegrees"`
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
MinimumVariableContactDuration string `pulumi:"minimumVariableContactDuration"`
// The name of the contact profile. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
NetworkConfigurationSubnetId string `pulumi:"networkConfigurationSubnetId"`
// The name of the Resource Group where the contact profile exists. 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 ContactProfile resource.
type ContactProfileArgs struct {
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
AutoTracking pulumi.StringInput
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
EventHubUri pulumi.StringPtrInput
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
Links ContactProfileLinkArrayInput
// The location where the contact profile exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Maximum elevation of the antenna during the contact in decimal degrees.
MinimumElevationDegrees pulumi.Float64PtrInput
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
MinimumVariableContactDuration pulumi.StringInput
// The name of the contact profile. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
NetworkConfigurationSubnetId pulumi.StringInput
// The name of the Resource Group where the contact profile exists. 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 (ContactProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*contactProfileArgs)(nil)).Elem()
}
type ContactProfileInput interface {
pulumi.Input
ToContactProfileOutput() ContactProfileOutput
ToContactProfileOutputWithContext(ctx context.Context) ContactProfileOutput
}
func (*ContactProfile) ElementType() reflect.Type {
return reflect.TypeOf((**ContactProfile)(nil)).Elem()
}
func (i *ContactProfile) ToContactProfileOutput() ContactProfileOutput {
return i.ToContactProfileOutputWithContext(context.Background())
}
func (i *ContactProfile) ToContactProfileOutputWithContext(ctx context.Context) ContactProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileOutput)
}
// ContactProfileArrayInput is an input type that accepts ContactProfileArray and ContactProfileArrayOutput values.
// You can construct a concrete instance of `ContactProfileArrayInput` via:
//
// ContactProfileArray{ ContactProfileArgs{...} }
type ContactProfileArrayInput interface {
pulumi.Input
ToContactProfileArrayOutput() ContactProfileArrayOutput
ToContactProfileArrayOutputWithContext(context.Context) ContactProfileArrayOutput
}
type ContactProfileArray []ContactProfileInput
func (ContactProfileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContactProfile)(nil)).Elem()
}
func (i ContactProfileArray) ToContactProfileArrayOutput() ContactProfileArrayOutput {
return i.ToContactProfileArrayOutputWithContext(context.Background())
}
func (i ContactProfileArray) ToContactProfileArrayOutputWithContext(ctx context.Context) ContactProfileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileArrayOutput)
}
// ContactProfileMapInput is an input type that accepts ContactProfileMap and ContactProfileMapOutput values.
// You can construct a concrete instance of `ContactProfileMapInput` via:
//
// ContactProfileMap{ "key": ContactProfileArgs{...} }
type ContactProfileMapInput interface {
pulumi.Input
ToContactProfileMapOutput() ContactProfileMapOutput
ToContactProfileMapOutputWithContext(context.Context) ContactProfileMapOutput
}
type ContactProfileMap map[string]ContactProfileInput
func (ContactProfileMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContactProfile)(nil)).Elem()
}
func (i ContactProfileMap) ToContactProfileMapOutput() ContactProfileMapOutput {
return i.ToContactProfileMapOutputWithContext(context.Background())
}
func (i ContactProfileMap) ToContactProfileMapOutputWithContext(ctx context.Context) ContactProfileMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileMapOutput)
}
type ContactProfileOutput struct{ *pulumi.OutputState }
func (ContactProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContactProfile)(nil)).Elem()
}
func (o ContactProfileOutput) ToContactProfileOutput() ContactProfileOutput {
return o
}
func (o ContactProfileOutput) ToContactProfileOutputWithContext(ctx context.Context) ContactProfileOutput {
return o
}
// Auto-tracking configurations for a spacecraft. Possible values are `disabled`, `xBand` and `sBand`.
func (o ContactProfileOutput) AutoTracking() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.AutoTracking }).(pulumi.StringOutput)
}
// ARM resource identifier of the Event Hub used for telemetry. Requires granting Orbital Resource Provider the rights to send telemetry into the hub.
func (o ContactProfileOutput) EventHubUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringPtrOutput { return v.EventHubUri }).(pulumi.StringPtrOutput)
}
// A list of spacecraft links. A `links` block as defined below. Changing this forces a new resource to be created.
func (o ContactProfileOutput) Links() ContactProfileLinkArrayOutput {
return o.ApplyT(func(v *ContactProfile) ContactProfileLinkArrayOutput { return v.Links }).(ContactProfileLinkArrayOutput)
}
// The location where the contact profile exists. Changing this forces a new resource to be created.
func (o ContactProfileOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Maximum elevation of the antenna during the contact in decimal degrees.
func (o ContactProfileOutput) MinimumElevationDegrees() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.Float64PtrOutput { return v.MinimumElevationDegrees }).(pulumi.Float64PtrOutput)
}
// Minimum viable contact duration in ISO 8601 format. Used for listing the available contacts with a spacecraft at a given ground station.
func (o ContactProfileOutput) MinimumVariableContactDuration() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.MinimumVariableContactDuration }).(pulumi.StringOutput)
}
// The name of the contact profile. Changing this forces a new resource to be created.
func (o ContactProfileOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// ARM resource identifier of the subnet delegated to the Microsoft.Orbital/orbitalGateways. Needs to be at least a class C subnet, and should not have any IP created in it. Changing this forces a new resource to be created.
func (o ContactProfileOutput) NetworkConfigurationSubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.NetworkConfigurationSubnetId }).(pulumi.StringOutput)
}
// The name of the Resource Group where the contact profile exists. Changing this forces a new resource to be created.
func (o ContactProfileOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ContactProfileOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ContactProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ContactProfileArrayOutput struct{ *pulumi.OutputState }
func (ContactProfileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContactProfile)(nil)).Elem()
}
func (o ContactProfileArrayOutput) ToContactProfileArrayOutput() ContactProfileArrayOutput {
return o
}
func (o ContactProfileArrayOutput) ToContactProfileArrayOutputWithContext(ctx context.Context) ContactProfileArrayOutput {
return o
}
func (o ContactProfileArrayOutput) Index(i pulumi.IntInput) ContactProfileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ContactProfile {
return vs[0].([]*ContactProfile)[vs[1].(int)]
}).(ContactProfileOutput)
}
type ContactProfileMapOutput struct{ *pulumi.OutputState }
func (ContactProfileMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContactProfile)(nil)).Elem()
}
func (o ContactProfileMapOutput) ToContactProfileMapOutput() ContactProfileMapOutput {
return o
}
func (o ContactProfileMapOutput) ToContactProfileMapOutputWithContext(ctx context.Context) ContactProfileMapOutput {
return o
}
func (o ContactProfileMapOutput) MapIndex(k pulumi.StringInput) ContactProfileOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ContactProfile {
return vs[0].(map[string]*ContactProfile)[vs[1].(string)]
}).(ContactProfileOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileInput)(nil)).Elem(), &ContactProfile{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileArrayInput)(nil)).Elem(), ContactProfileArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileMapInput)(nil)).Elem(), ContactProfileMap{})
pulumi.RegisterOutputType(ContactProfileOutput{})
pulumi.RegisterOutputType(ContactProfileArrayOutput{})
pulumi.RegisterOutputType(ContactProfileMapOutput{})
}
| 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/orbital/init.go | sdk/go/azure/orbital/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 orbital
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:orbital/contact:Contact":
r = &Contact{}
case "azure:orbital/contactProfile:ContactProfile":
r = &ContactProfile{}
case "azure:orbital/spacecraft:Spacecraft":
r = &Spacecraft{}
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",
"orbital/contact",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"orbital/contactProfile",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"orbital/spacecraft",
&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/orbital/pulumiTypes.go | sdk/go/azure/orbital/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 orbital
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 ContactProfileLink struct {
// A list of contact profile link channels. A `channels` block as defined below.
Channels []ContactProfileLinkChannel `pulumi:"channels"`
// Direction of the link. Possible values are `Uplink` and `Downlink`.
Direction string `pulumi:"direction"`
// Name of the link.
Name string `pulumi:"name"`
// Polarization of the link. Possible values are `LHCP`, `RHCP`, `linearVertical` and `linearHorizontal`.
Polarization string `pulumi:"polarization"`
}
// ContactProfileLinkInput is an input type that accepts ContactProfileLinkArgs and ContactProfileLinkOutput values.
// You can construct a concrete instance of `ContactProfileLinkInput` via:
//
// ContactProfileLinkArgs{...}
type ContactProfileLinkInput interface {
pulumi.Input
ToContactProfileLinkOutput() ContactProfileLinkOutput
ToContactProfileLinkOutputWithContext(context.Context) ContactProfileLinkOutput
}
type ContactProfileLinkArgs struct {
// A list of contact profile link channels. A `channels` block as defined below.
Channels ContactProfileLinkChannelArrayInput `pulumi:"channels"`
// Direction of the link. Possible values are `Uplink` and `Downlink`.
Direction pulumi.StringInput `pulumi:"direction"`
// Name of the link.
Name pulumi.StringInput `pulumi:"name"`
// Polarization of the link. Possible values are `LHCP`, `RHCP`, `linearVertical` and `linearHorizontal`.
Polarization pulumi.StringInput `pulumi:"polarization"`
}
func (ContactProfileLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLink)(nil)).Elem()
}
func (i ContactProfileLinkArgs) ToContactProfileLinkOutput() ContactProfileLinkOutput {
return i.ToContactProfileLinkOutputWithContext(context.Background())
}
func (i ContactProfileLinkArgs) ToContactProfileLinkOutputWithContext(ctx context.Context) ContactProfileLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkOutput)
}
// ContactProfileLinkArrayInput is an input type that accepts ContactProfileLinkArray and ContactProfileLinkArrayOutput values.
// You can construct a concrete instance of `ContactProfileLinkArrayInput` via:
//
// ContactProfileLinkArray{ ContactProfileLinkArgs{...} }
type ContactProfileLinkArrayInput interface {
pulumi.Input
ToContactProfileLinkArrayOutput() ContactProfileLinkArrayOutput
ToContactProfileLinkArrayOutputWithContext(context.Context) ContactProfileLinkArrayOutput
}
type ContactProfileLinkArray []ContactProfileLinkInput
func (ContactProfileLinkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLink)(nil)).Elem()
}
func (i ContactProfileLinkArray) ToContactProfileLinkArrayOutput() ContactProfileLinkArrayOutput {
return i.ToContactProfileLinkArrayOutputWithContext(context.Background())
}
func (i ContactProfileLinkArray) ToContactProfileLinkArrayOutputWithContext(ctx context.Context) ContactProfileLinkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkArrayOutput)
}
type ContactProfileLinkOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLink)(nil)).Elem()
}
func (o ContactProfileLinkOutput) ToContactProfileLinkOutput() ContactProfileLinkOutput {
return o
}
func (o ContactProfileLinkOutput) ToContactProfileLinkOutputWithContext(ctx context.Context) ContactProfileLinkOutput {
return o
}
// A list of contact profile link channels. A `channels` block as defined below.
func (o ContactProfileLinkOutput) Channels() ContactProfileLinkChannelArrayOutput {
return o.ApplyT(func(v ContactProfileLink) []ContactProfileLinkChannel { return v.Channels }).(ContactProfileLinkChannelArrayOutput)
}
// Direction of the link. Possible values are `Uplink` and `Downlink`.
func (o ContactProfileLinkOutput) Direction() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLink) string { return v.Direction }).(pulumi.StringOutput)
}
// Name of the link.
func (o ContactProfileLinkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLink) string { return v.Name }).(pulumi.StringOutput)
}
// Polarization of the link. Possible values are `LHCP`, `RHCP`, `linearVertical` and `linearHorizontal`.
func (o ContactProfileLinkOutput) Polarization() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLink) string { return v.Polarization }).(pulumi.StringOutput)
}
type ContactProfileLinkArrayOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLink)(nil)).Elem()
}
func (o ContactProfileLinkArrayOutput) ToContactProfileLinkArrayOutput() ContactProfileLinkArrayOutput {
return o
}
func (o ContactProfileLinkArrayOutput) ToContactProfileLinkArrayOutputWithContext(ctx context.Context) ContactProfileLinkArrayOutput {
return o
}
func (o ContactProfileLinkArrayOutput) Index(i pulumi.IntInput) ContactProfileLinkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ContactProfileLink {
return vs[0].([]ContactProfileLink)[vs[1].(int)]
}).(ContactProfileLinkOutput)
}
type ContactProfileLinkChannel struct {
// Bandwidth in MHz.
BandwidthMhz float64 `pulumi:"bandwidthMhz"`
// Center frequency in MHz.
CenterFrequencyMhz float64 `pulumi:"centerFrequencyMhz"`
// Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a VITA.49 stream.
DemodulationConfiguration *string `pulumi:"demodulationConfiguration"`
// Customer End point to store/retrieve data during a contact. An `endPoint` block as defined below.
EndPoints []ContactProfileLinkChannelEndPoint `pulumi:"endPoints"`
// Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream.
ModulationConfiguration *string `pulumi:"modulationConfiguration"`
// Name of the channel.
Name string `pulumi:"name"`
}
// ContactProfileLinkChannelInput is an input type that accepts ContactProfileLinkChannelArgs and ContactProfileLinkChannelOutput values.
// You can construct a concrete instance of `ContactProfileLinkChannelInput` via:
//
// ContactProfileLinkChannelArgs{...}
type ContactProfileLinkChannelInput interface {
pulumi.Input
ToContactProfileLinkChannelOutput() ContactProfileLinkChannelOutput
ToContactProfileLinkChannelOutputWithContext(context.Context) ContactProfileLinkChannelOutput
}
type ContactProfileLinkChannelArgs struct {
// Bandwidth in MHz.
BandwidthMhz pulumi.Float64Input `pulumi:"bandwidthMhz"`
// Center frequency in MHz.
CenterFrequencyMhz pulumi.Float64Input `pulumi:"centerFrequencyMhz"`
// Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a VITA.49 stream.
DemodulationConfiguration pulumi.StringPtrInput `pulumi:"demodulationConfiguration"`
// Customer End point to store/retrieve data during a contact. An `endPoint` block as defined below.
EndPoints ContactProfileLinkChannelEndPointArrayInput `pulumi:"endPoints"`
// Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream.
ModulationConfiguration pulumi.StringPtrInput `pulumi:"modulationConfiguration"`
// Name of the channel.
Name pulumi.StringInput `pulumi:"name"`
}
func (ContactProfileLinkChannelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLinkChannel)(nil)).Elem()
}
func (i ContactProfileLinkChannelArgs) ToContactProfileLinkChannelOutput() ContactProfileLinkChannelOutput {
return i.ToContactProfileLinkChannelOutputWithContext(context.Background())
}
func (i ContactProfileLinkChannelArgs) ToContactProfileLinkChannelOutputWithContext(ctx context.Context) ContactProfileLinkChannelOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkChannelOutput)
}
// ContactProfileLinkChannelArrayInput is an input type that accepts ContactProfileLinkChannelArray and ContactProfileLinkChannelArrayOutput values.
// You can construct a concrete instance of `ContactProfileLinkChannelArrayInput` via:
//
// ContactProfileLinkChannelArray{ ContactProfileLinkChannelArgs{...} }
type ContactProfileLinkChannelArrayInput interface {
pulumi.Input
ToContactProfileLinkChannelArrayOutput() ContactProfileLinkChannelArrayOutput
ToContactProfileLinkChannelArrayOutputWithContext(context.Context) ContactProfileLinkChannelArrayOutput
}
type ContactProfileLinkChannelArray []ContactProfileLinkChannelInput
func (ContactProfileLinkChannelArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLinkChannel)(nil)).Elem()
}
func (i ContactProfileLinkChannelArray) ToContactProfileLinkChannelArrayOutput() ContactProfileLinkChannelArrayOutput {
return i.ToContactProfileLinkChannelArrayOutputWithContext(context.Background())
}
func (i ContactProfileLinkChannelArray) ToContactProfileLinkChannelArrayOutputWithContext(ctx context.Context) ContactProfileLinkChannelArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkChannelArrayOutput)
}
type ContactProfileLinkChannelOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkChannelOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLinkChannel)(nil)).Elem()
}
func (o ContactProfileLinkChannelOutput) ToContactProfileLinkChannelOutput() ContactProfileLinkChannelOutput {
return o
}
func (o ContactProfileLinkChannelOutput) ToContactProfileLinkChannelOutputWithContext(ctx context.Context) ContactProfileLinkChannelOutput {
return o
}
// Bandwidth in MHz.
func (o ContactProfileLinkChannelOutput) BandwidthMhz() pulumi.Float64Output {
return o.ApplyT(func(v ContactProfileLinkChannel) float64 { return v.BandwidthMhz }).(pulumi.Float64Output)
}
// Center frequency in MHz.
func (o ContactProfileLinkChannelOutput) CenterFrequencyMhz() pulumi.Float64Output {
return o.ApplyT(func(v ContactProfileLinkChannel) float64 { return v.CenterFrequencyMhz }).(pulumi.Float64Output)
}
// Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a VITA.49 stream.
func (o ContactProfileLinkChannelOutput) DemodulationConfiguration() pulumi.StringPtrOutput {
return o.ApplyT(func(v ContactProfileLinkChannel) *string { return v.DemodulationConfiguration }).(pulumi.StringPtrOutput)
}
// Customer End point to store/retrieve data during a contact. An `endPoint` block as defined below.
func (o ContactProfileLinkChannelOutput) EndPoints() ContactProfileLinkChannelEndPointArrayOutput {
return o.ApplyT(func(v ContactProfileLinkChannel) []ContactProfileLinkChannelEndPoint { return v.EndPoints }).(ContactProfileLinkChannelEndPointArrayOutput)
}
// Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream.
func (o ContactProfileLinkChannelOutput) ModulationConfiguration() pulumi.StringPtrOutput {
return o.ApplyT(func(v ContactProfileLinkChannel) *string { return v.ModulationConfiguration }).(pulumi.StringPtrOutput)
}
// Name of the channel.
func (o ContactProfileLinkChannelOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLinkChannel) string { return v.Name }).(pulumi.StringOutput)
}
type ContactProfileLinkChannelArrayOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkChannelArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLinkChannel)(nil)).Elem()
}
func (o ContactProfileLinkChannelArrayOutput) ToContactProfileLinkChannelArrayOutput() ContactProfileLinkChannelArrayOutput {
return o
}
func (o ContactProfileLinkChannelArrayOutput) ToContactProfileLinkChannelArrayOutputWithContext(ctx context.Context) ContactProfileLinkChannelArrayOutput {
return o
}
func (o ContactProfileLinkChannelArrayOutput) Index(i pulumi.IntInput) ContactProfileLinkChannelOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ContactProfileLinkChannel {
return vs[0].([]ContactProfileLinkChannel)[vs[1].(int)]
}).(ContactProfileLinkChannelOutput)
}
type ContactProfileLinkChannelEndPoint struct {
// Name of an end point.
EndPointName string `pulumi:"endPointName"`
// IP address of an end point.
IpAddress *string `pulumi:"ipAddress"`
// TCP port to listen on to receive data.
Port string `pulumi:"port"`
// Protocol of an end point. Possible values are `TCP` and `UDP`.
Protocol string `pulumi:"protocol"`
}
// ContactProfileLinkChannelEndPointInput is an input type that accepts ContactProfileLinkChannelEndPointArgs and ContactProfileLinkChannelEndPointOutput values.
// You can construct a concrete instance of `ContactProfileLinkChannelEndPointInput` via:
//
// ContactProfileLinkChannelEndPointArgs{...}
type ContactProfileLinkChannelEndPointInput interface {
pulumi.Input
ToContactProfileLinkChannelEndPointOutput() ContactProfileLinkChannelEndPointOutput
ToContactProfileLinkChannelEndPointOutputWithContext(context.Context) ContactProfileLinkChannelEndPointOutput
}
type ContactProfileLinkChannelEndPointArgs struct {
// Name of an end point.
EndPointName pulumi.StringInput `pulumi:"endPointName"`
// IP address of an end point.
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
// TCP port to listen on to receive data.
Port pulumi.StringInput `pulumi:"port"`
// Protocol of an end point. Possible values are `TCP` and `UDP`.
Protocol pulumi.StringInput `pulumi:"protocol"`
}
func (ContactProfileLinkChannelEndPointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLinkChannelEndPoint)(nil)).Elem()
}
func (i ContactProfileLinkChannelEndPointArgs) ToContactProfileLinkChannelEndPointOutput() ContactProfileLinkChannelEndPointOutput {
return i.ToContactProfileLinkChannelEndPointOutputWithContext(context.Background())
}
func (i ContactProfileLinkChannelEndPointArgs) ToContactProfileLinkChannelEndPointOutputWithContext(ctx context.Context) ContactProfileLinkChannelEndPointOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkChannelEndPointOutput)
}
// ContactProfileLinkChannelEndPointArrayInput is an input type that accepts ContactProfileLinkChannelEndPointArray and ContactProfileLinkChannelEndPointArrayOutput values.
// You can construct a concrete instance of `ContactProfileLinkChannelEndPointArrayInput` via:
//
// ContactProfileLinkChannelEndPointArray{ ContactProfileLinkChannelEndPointArgs{...} }
type ContactProfileLinkChannelEndPointArrayInput interface {
pulumi.Input
ToContactProfileLinkChannelEndPointArrayOutput() ContactProfileLinkChannelEndPointArrayOutput
ToContactProfileLinkChannelEndPointArrayOutputWithContext(context.Context) ContactProfileLinkChannelEndPointArrayOutput
}
type ContactProfileLinkChannelEndPointArray []ContactProfileLinkChannelEndPointInput
func (ContactProfileLinkChannelEndPointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLinkChannelEndPoint)(nil)).Elem()
}
func (i ContactProfileLinkChannelEndPointArray) ToContactProfileLinkChannelEndPointArrayOutput() ContactProfileLinkChannelEndPointArrayOutput {
return i.ToContactProfileLinkChannelEndPointArrayOutputWithContext(context.Background())
}
func (i ContactProfileLinkChannelEndPointArray) ToContactProfileLinkChannelEndPointArrayOutputWithContext(ctx context.Context) ContactProfileLinkChannelEndPointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactProfileLinkChannelEndPointArrayOutput)
}
type ContactProfileLinkChannelEndPointOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkChannelEndPointOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ContactProfileLinkChannelEndPoint)(nil)).Elem()
}
func (o ContactProfileLinkChannelEndPointOutput) ToContactProfileLinkChannelEndPointOutput() ContactProfileLinkChannelEndPointOutput {
return o
}
func (o ContactProfileLinkChannelEndPointOutput) ToContactProfileLinkChannelEndPointOutputWithContext(ctx context.Context) ContactProfileLinkChannelEndPointOutput {
return o
}
// Name of an end point.
func (o ContactProfileLinkChannelEndPointOutput) EndPointName() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLinkChannelEndPoint) string { return v.EndPointName }).(pulumi.StringOutput)
}
// IP address of an end point.
func (o ContactProfileLinkChannelEndPointOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v ContactProfileLinkChannelEndPoint) *string { return v.IpAddress }).(pulumi.StringPtrOutput)
}
// TCP port to listen on to receive data.
func (o ContactProfileLinkChannelEndPointOutput) Port() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLinkChannelEndPoint) string { return v.Port }).(pulumi.StringOutput)
}
// Protocol of an end point. Possible values are `TCP` and `UDP`.
func (o ContactProfileLinkChannelEndPointOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v ContactProfileLinkChannelEndPoint) string { return v.Protocol }).(pulumi.StringOutput)
}
type ContactProfileLinkChannelEndPointArrayOutput struct{ *pulumi.OutputState }
func (ContactProfileLinkChannelEndPointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ContactProfileLinkChannelEndPoint)(nil)).Elem()
}
func (o ContactProfileLinkChannelEndPointArrayOutput) ToContactProfileLinkChannelEndPointArrayOutput() ContactProfileLinkChannelEndPointArrayOutput {
return o
}
func (o ContactProfileLinkChannelEndPointArrayOutput) ToContactProfileLinkChannelEndPointArrayOutputWithContext(ctx context.Context) ContactProfileLinkChannelEndPointArrayOutput {
return o
}
func (o ContactProfileLinkChannelEndPointArrayOutput) Index(i pulumi.IntInput) ContactProfileLinkChannelEndPointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ContactProfileLinkChannelEndPoint {
return vs[0].([]ContactProfileLinkChannelEndPoint)[vs[1].(int)]
}).(ContactProfileLinkChannelEndPointOutput)
}
type SpacecraftLink struct {
// Bandwidth in Mhz.
BandwidthMhz float64 `pulumi:"bandwidthMhz"`
// Center frequency in Mhz.
//
// > **Note:** The value of `centerFrequencyMhz +/- bandwidthMhz / 2` should fall in one of these ranges: `Uplink/LHCP`: [2025, 2120]; `Uplink/Linear`: [399, 403],[435, 438],[449, 451]; `Uplink/RHCP`: [399, 403],[435, 438],[449, 451],[2025, 2120]; `Downlink/LHCP`: [2200, 2300], [7500, 8400]; `Downlink/Linear`: [399, 403], [435, 438], [449, 451]; Downlink/Linear`: [399, 403], [435, 438], [449, 451], [2200, 2300], [7500, 8400]
CenterFrequencyMhz float64 `pulumi:"centerFrequencyMhz"`
// Direction if the communication. Possible values are `Uplink` and `Downlink`.
Direction string `pulumi:"direction"`
// Name of the link.
Name string `pulumi:"name"`
// Polarization. Possible values are `RHCP`, `LHCP`, `linearVertical` and `linearHorizontal`.
Polarization string `pulumi:"polarization"`
}
// SpacecraftLinkInput is an input type that accepts SpacecraftLinkArgs and SpacecraftLinkOutput values.
// You can construct a concrete instance of `SpacecraftLinkInput` via:
//
// SpacecraftLinkArgs{...}
type SpacecraftLinkInput interface {
pulumi.Input
ToSpacecraftLinkOutput() SpacecraftLinkOutput
ToSpacecraftLinkOutputWithContext(context.Context) SpacecraftLinkOutput
}
type SpacecraftLinkArgs struct {
// Bandwidth in Mhz.
BandwidthMhz pulumi.Float64Input `pulumi:"bandwidthMhz"`
// Center frequency in Mhz.
//
// > **Note:** The value of `centerFrequencyMhz +/- bandwidthMhz / 2` should fall in one of these ranges: `Uplink/LHCP`: [2025, 2120]; `Uplink/Linear`: [399, 403],[435, 438],[449, 451]; `Uplink/RHCP`: [399, 403],[435, 438],[449, 451],[2025, 2120]; `Downlink/LHCP`: [2200, 2300], [7500, 8400]; `Downlink/Linear`: [399, 403], [435, 438], [449, 451]; Downlink/Linear`: [399, 403], [435, 438], [449, 451], [2200, 2300], [7500, 8400]
CenterFrequencyMhz pulumi.Float64Input `pulumi:"centerFrequencyMhz"`
// Direction if the communication. Possible values are `Uplink` and `Downlink`.
Direction pulumi.StringInput `pulumi:"direction"`
// Name of the link.
Name pulumi.StringInput `pulumi:"name"`
// Polarization. Possible values are `RHCP`, `LHCP`, `linearVertical` and `linearHorizontal`.
Polarization pulumi.StringInput `pulumi:"polarization"`
}
func (SpacecraftLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SpacecraftLink)(nil)).Elem()
}
func (i SpacecraftLinkArgs) ToSpacecraftLinkOutput() SpacecraftLinkOutput {
return i.ToSpacecraftLinkOutputWithContext(context.Background())
}
func (i SpacecraftLinkArgs) ToSpacecraftLinkOutputWithContext(ctx context.Context) SpacecraftLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpacecraftLinkOutput)
}
// SpacecraftLinkArrayInput is an input type that accepts SpacecraftLinkArray and SpacecraftLinkArrayOutput values.
// You can construct a concrete instance of `SpacecraftLinkArrayInput` via:
//
// SpacecraftLinkArray{ SpacecraftLinkArgs{...} }
type SpacecraftLinkArrayInput interface {
pulumi.Input
ToSpacecraftLinkArrayOutput() SpacecraftLinkArrayOutput
ToSpacecraftLinkArrayOutputWithContext(context.Context) SpacecraftLinkArrayOutput
}
type SpacecraftLinkArray []SpacecraftLinkInput
func (SpacecraftLinkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]SpacecraftLink)(nil)).Elem()
}
func (i SpacecraftLinkArray) ToSpacecraftLinkArrayOutput() SpacecraftLinkArrayOutput {
return i.ToSpacecraftLinkArrayOutputWithContext(context.Background())
}
func (i SpacecraftLinkArray) ToSpacecraftLinkArrayOutputWithContext(ctx context.Context) SpacecraftLinkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpacecraftLinkArrayOutput)
}
type SpacecraftLinkOutput struct{ *pulumi.OutputState }
func (SpacecraftLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((*SpacecraftLink)(nil)).Elem()
}
func (o SpacecraftLinkOutput) ToSpacecraftLinkOutput() SpacecraftLinkOutput {
return o
}
func (o SpacecraftLinkOutput) ToSpacecraftLinkOutputWithContext(ctx context.Context) SpacecraftLinkOutput {
return o
}
// Bandwidth in Mhz.
func (o SpacecraftLinkOutput) BandwidthMhz() pulumi.Float64Output {
return o.ApplyT(func(v SpacecraftLink) float64 { return v.BandwidthMhz }).(pulumi.Float64Output)
}
// Center frequency in Mhz.
//
// > **Note:** The value of `centerFrequencyMhz +/- bandwidthMhz / 2` should fall in one of these ranges: `Uplink/LHCP`: [2025, 2120]; `Uplink/Linear`: [399, 403],[435, 438],[449, 451]; `Uplink/RHCP`: [399, 403],[435, 438],[449, 451],[2025, 2120]; `Downlink/LHCP`: [2200, 2300], [7500, 8400]; `Downlink/Linear`: [399, 403], [435, 438], [449, 451]; Downlink/Linear`: [399, 403], [435, 438], [449, 451], [2200, 2300], [7500, 8400]
func (o SpacecraftLinkOutput) CenterFrequencyMhz() pulumi.Float64Output {
return o.ApplyT(func(v SpacecraftLink) float64 { return v.CenterFrequencyMhz }).(pulumi.Float64Output)
}
// Direction if the communication. Possible values are `Uplink` and `Downlink`.
func (o SpacecraftLinkOutput) Direction() pulumi.StringOutput {
return o.ApplyT(func(v SpacecraftLink) string { return v.Direction }).(pulumi.StringOutput)
}
// Name of the link.
func (o SpacecraftLinkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v SpacecraftLink) string { return v.Name }).(pulumi.StringOutput)
}
// Polarization. Possible values are `RHCP`, `LHCP`, `linearVertical` and `linearHorizontal`.
func (o SpacecraftLinkOutput) Polarization() pulumi.StringOutput {
return o.ApplyT(func(v SpacecraftLink) string { return v.Polarization }).(pulumi.StringOutput)
}
type SpacecraftLinkArrayOutput struct{ *pulumi.OutputState }
func (SpacecraftLinkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]SpacecraftLink)(nil)).Elem()
}
func (o SpacecraftLinkArrayOutput) ToSpacecraftLinkArrayOutput() SpacecraftLinkArrayOutput {
return o
}
func (o SpacecraftLinkArrayOutput) ToSpacecraftLinkArrayOutputWithContext(ctx context.Context) SpacecraftLinkArrayOutput {
return o
}
func (o SpacecraftLinkArrayOutput) Index(i pulumi.IntInput) SpacecraftLinkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) SpacecraftLink {
return vs[0].([]SpacecraftLink)[vs[1].(int)]
}).(SpacecraftLinkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkInput)(nil)).Elem(), ContactProfileLinkArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkArrayInput)(nil)).Elem(), ContactProfileLinkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkChannelInput)(nil)).Elem(), ContactProfileLinkChannelArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkChannelArrayInput)(nil)).Elem(), ContactProfileLinkChannelArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkChannelEndPointInput)(nil)).Elem(), ContactProfileLinkChannelEndPointArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactProfileLinkChannelEndPointArrayInput)(nil)).Elem(), ContactProfileLinkChannelEndPointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpacecraftLinkInput)(nil)).Elem(), SpacecraftLinkArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*SpacecraftLinkArrayInput)(nil)).Elem(), SpacecraftLinkArray{})
pulumi.RegisterOutputType(ContactProfileLinkOutput{})
pulumi.RegisterOutputType(ContactProfileLinkArrayOutput{})
pulumi.RegisterOutputType(ContactProfileLinkChannelOutput{})
pulumi.RegisterOutputType(ContactProfileLinkChannelArrayOutput{})
pulumi.RegisterOutputType(ContactProfileLinkChannelEndPointOutput{})
pulumi.RegisterOutputType(ContactProfileLinkChannelEndPointArrayOutput{})
pulumi.RegisterOutputType(SpacecraftLinkOutput{})
pulumi.RegisterOutputType(SpacecraftLinkArrayOutput{})
}
| 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/orbital/contact.go | sdk/go/azure/orbital/contact.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 orbital
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an orbital contact.
//
// > **Note:** The `orbital.Contact` resource has been deprecated and will be removed in v5.0 of the AzureRM Provider.
//
// ## 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/orbital"
// "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("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleSpacecraft, err := orbital.NewSpacecraft(ctx, "example", &orbital.SpacecraftArgs{
// Name: pulumi.String("example-spacecraft"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("westeurope"),
// NoradId: pulumi.String("12345"),
// Links: orbital.SpacecraftLinkArray{
// &orbital.SpacecraftLinkArgs{
// BandwidthMhz: pulumi.Float64(100),
// CenterFrequencyMhz: pulumi.Float64(101),
// Direction: pulumi.String("Uplink"),
// Polarization: pulumi.String("LHCP"),
// Name: pulumi.String("examplename"),
// },
// },
// TwoLineElements: pulumi.StringArray{
// pulumi.String("1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"),
// pulumi.String("2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"),
// },
// TitleLine: pulumi.String("AQUA"),
// Tags: pulumi.StringMap{
// "aks-managed-cluster-name": pulumi.String("9a57225d-a405-4d40-aa46-f13d2342abef"),
// },
// })
// 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: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("orbitalgateway"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Orbital/orbitalGateways"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/publicIPAddresses/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/read"),
// pulumi.String("Microsoft.Network/publicIPAddresses/read"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleContactProfile, err := orbital.NewContactProfile(ctx, "example", &orbital.ContactProfileArgs{
// Name: pulumi.String("example-contactprofile"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// MinimumVariableContactDuration: pulumi.String("PT1M"),
// AutoTracking: pulumi.String("disabled"),
// Links: orbital.ContactProfileLinkArray{
// &orbital.ContactProfileLinkArgs{
// Channels: orbital.ContactProfileLinkChannelArray{
// &orbital.ContactProfileLinkChannelArgs{
// Name: pulumi.String("channelname"),
// BandwidthMhz: pulumi.Float64(100),
// CenterFrequencyMhz: pulumi.Float64(101),
// EndPoints: orbital.ContactProfileLinkChannelEndPointArray{
// &orbital.ContactProfileLinkChannelEndPointArgs{
// EndPointName: pulumi.String("AQUA_command"),
// IpAddress: pulumi.String("10.0.1.0"),
// Port: pulumi.String("49153"),
// Protocol: pulumi.String("TCP"),
// },
// },
// },
// },
// Direction: pulumi.String("Uplink"),
// Name: pulumi.String("RHCP_UL"),
// Polarization: pulumi.String("RHCP"),
// },
// },
// NetworkConfigurationSubnetId: exampleSubnet.ID(),
// })
// if err != nil {
// return err
// }
// _, err = orbital.NewContact(ctx, "example", &orbital.ContactArgs{
// Name: pulumi.String("example-contact"),
// SpacecraftId: exampleSpacecraft.ID(),
// ReservationStartTime: pulumi.String("2020-07-16T20:35:00.00Z"),
// ReservationEndTime: pulumi.String("2020-07-16T20:55:00.00Z"),
// GroundStationName: pulumi.String("WESTUS2_0"),
// ContactProfileId: exampleContactProfile.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.Orbital` - 2022-11-01
//
// ## Import
//
// Spacecraft can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:orbital/contact:Contact example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Orbital/spacecrafts/spacecraft1/contacts/contact1
// ```
type Contact struct {
pulumi.CustomResourceState
// ID of the orbital contact profile. Changing this forces a new resource to be created.
ContactProfileId pulumi.StringOutput `pulumi:"contactProfileId"`
// Name of the Azure ground station. Changing this forces a new resource to be created.
GroundStationName pulumi.StringOutput `pulumi:"groundStationName"`
// The name of the Contact. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Reservation end time of the Contact. Changing this forces a new resource to be created.
ReservationEndTime pulumi.StringOutput `pulumi:"reservationEndTime"`
// Reservation start time of the Contact. Changing this forces a new resource to be created.
ReservationStartTime pulumi.StringOutput `pulumi:"reservationStartTime"`
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
SpacecraftId pulumi.StringOutput `pulumi:"spacecraftId"`
}
// NewContact registers a new resource with the given unique name, arguments, and options.
func NewContact(ctx *pulumi.Context,
name string, args *ContactArgs, opts ...pulumi.ResourceOption) (*Contact, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ContactProfileId == nil {
return nil, errors.New("invalid value for required argument 'ContactProfileId'")
}
if args.GroundStationName == nil {
return nil, errors.New("invalid value for required argument 'GroundStationName'")
}
if args.ReservationEndTime == nil {
return nil, errors.New("invalid value for required argument 'ReservationEndTime'")
}
if args.ReservationStartTime == nil {
return nil, errors.New("invalid value for required argument 'ReservationStartTime'")
}
if args.SpacecraftId == nil {
return nil, errors.New("invalid value for required argument 'SpacecraftId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Contact
err := ctx.RegisterResource("azure:orbital/contact:Contact", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContact gets an existing Contact 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 GetContact(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContactState, opts ...pulumi.ResourceOption) (*Contact, error) {
var resource Contact
err := ctx.ReadResource("azure:orbital/contact:Contact", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Contact resources.
type contactState struct {
// ID of the orbital contact profile. Changing this forces a new resource to be created.
ContactProfileId *string `pulumi:"contactProfileId"`
// Name of the Azure ground station. Changing this forces a new resource to be created.
GroundStationName *string `pulumi:"groundStationName"`
// The name of the Contact. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Reservation end time of the Contact. Changing this forces a new resource to be created.
ReservationEndTime *string `pulumi:"reservationEndTime"`
// Reservation start time of the Contact. Changing this forces a new resource to be created.
ReservationStartTime *string `pulumi:"reservationStartTime"`
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
SpacecraftId *string `pulumi:"spacecraftId"`
}
type ContactState struct {
// ID of the orbital contact profile. Changing this forces a new resource to be created.
ContactProfileId pulumi.StringPtrInput
// Name of the Azure ground station. Changing this forces a new resource to be created.
GroundStationName pulumi.StringPtrInput
// The name of the Contact. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Reservation end time of the Contact. Changing this forces a new resource to be created.
ReservationEndTime pulumi.StringPtrInput
// Reservation start time of the Contact. Changing this forces a new resource to be created.
ReservationStartTime pulumi.StringPtrInput
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
SpacecraftId pulumi.StringPtrInput
}
func (ContactState) ElementType() reflect.Type {
return reflect.TypeOf((*contactState)(nil)).Elem()
}
type contactArgs struct {
// ID of the orbital contact profile. Changing this forces a new resource to be created.
ContactProfileId string `pulumi:"contactProfileId"`
// Name of the Azure ground station. Changing this forces a new resource to be created.
GroundStationName string `pulumi:"groundStationName"`
// The name of the Contact. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Reservation end time of the Contact. Changing this forces a new resource to be created.
ReservationEndTime string `pulumi:"reservationEndTime"`
// Reservation start time of the Contact. Changing this forces a new resource to be created.
ReservationStartTime string `pulumi:"reservationStartTime"`
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
SpacecraftId string `pulumi:"spacecraftId"`
}
// The set of arguments for constructing a Contact resource.
type ContactArgs struct {
// ID of the orbital contact profile. Changing this forces a new resource to be created.
ContactProfileId pulumi.StringInput
// Name of the Azure ground station. Changing this forces a new resource to be created.
GroundStationName pulumi.StringInput
// The name of the Contact. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Reservation end time of the Contact. Changing this forces a new resource to be created.
ReservationEndTime pulumi.StringInput
// Reservation start time of the Contact. Changing this forces a new resource to be created.
ReservationStartTime pulumi.StringInput
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
SpacecraftId pulumi.StringInput
}
func (ContactArgs) ElementType() reflect.Type {
return reflect.TypeOf((*contactArgs)(nil)).Elem()
}
type ContactInput interface {
pulumi.Input
ToContactOutput() ContactOutput
ToContactOutputWithContext(ctx context.Context) ContactOutput
}
func (*Contact) ElementType() reflect.Type {
return reflect.TypeOf((**Contact)(nil)).Elem()
}
func (i *Contact) ToContactOutput() ContactOutput {
return i.ToContactOutputWithContext(context.Background())
}
func (i *Contact) ToContactOutputWithContext(ctx context.Context) ContactOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactOutput)
}
// ContactArrayInput is an input type that accepts ContactArray and ContactArrayOutput values.
// You can construct a concrete instance of `ContactArrayInput` via:
//
// ContactArray{ ContactArgs{...} }
type ContactArrayInput interface {
pulumi.Input
ToContactArrayOutput() ContactArrayOutput
ToContactArrayOutputWithContext(context.Context) ContactArrayOutput
}
type ContactArray []ContactInput
func (ContactArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Contact)(nil)).Elem()
}
func (i ContactArray) ToContactArrayOutput() ContactArrayOutput {
return i.ToContactArrayOutputWithContext(context.Background())
}
func (i ContactArray) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactArrayOutput)
}
// ContactMapInput is an input type that accepts ContactMap and ContactMapOutput values.
// You can construct a concrete instance of `ContactMapInput` via:
//
// ContactMap{ "key": ContactArgs{...} }
type ContactMapInput interface {
pulumi.Input
ToContactMapOutput() ContactMapOutput
ToContactMapOutputWithContext(context.Context) ContactMapOutput
}
type ContactMap map[string]ContactInput
func (ContactMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Contact)(nil)).Elem()
}
func (i ContactMap) ToContactMapOutput() ContactMapOutput {
return i.ToContactMapOutputWithContext(context.Background())
}
func (i ContactMap) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactMapOutput)
}
type ContactOutput struct{ *pulumi.OutputState }
func (ContactOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Contact)(nil)).Elem()
}
func (o ContactOutput) ToContactOutput() ContactOutput {
return o
}
func (o ContactOutput) ToContactOutputWithContext(ctx context.Context) ContactOutput {
return o
}
// ID of the orbital contact profile. Changing this forces a new resource to be created.
func (o ContactOutput) ContactProfileId() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.ContactProfileId }).(pulumi.StringOutput)
}
// Name of the Azure ground station. Changing this forces a new resource to be created.
func (o ContactOutput) GroundStationName() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.GroundStationName }).(pulumi.StringOutput)
}
// The name of the Contact. Changing this forces a new resource to be created.
func (o ContactOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Reservation end time of the Contact. Changing this forces a new resource to be created.
func (o ContactOutput) ReservationEndTime() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.ReservationEndTime }).(pulumi.StringOutput)
}
// Reservation start time of the Contact. Changing this forces a new resource to be created.
func (o ContactOutput) ReservationStartTime() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.ReservationStartTime }).(pulumi.StringOutput)
}
// The ID of the spacecraft which the contact will be made to. Changing this forces a new resource to be created.
func (o ContactOutput) SpacecraftId() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.SpacecraftId }).(pulumi.StringOutput)
}
type ContactArrayOutput struct{ *pulumi.OutputState }
func (ContactArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Contact)(nil)).Elem()
}
func (o ContactArrayOutput) ToContactArrayOutput() ContactArrayOutput {
return o
}
func (o ContactArrayOutput) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput {
return o
}
func (o ContactArrayOutput) Index(i pulumi.IntInput) ContactOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Contact {
return vs[0].([]*Contact)[vs[1].(int)]
}).(ContactOutput)
}
type ContactMapOutput struct{ *pulumi.OutputState }
func (ContactMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Contact)(nil)).Elem()
}
func (o ContactMapOutput) ToContactMapOutput() ContactMapOutput {
return o
}
func (o ContactMapOutput) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput {
return o
}
func (o ContactMapOutput) MapIndex(k pulumi.StringInput) ContactOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Contact {
return vs[0].(map[string]*Contact)[vs[1].(string)]
}).(ContactOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContactInput)(nil)).Elem(), &Contact{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactArrayInput)(nil)).Elem(), ContactArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactMapInput)(nil)).Elem(), ContactMap{})
pulumi.RegisterOutputType(ContactOutput{})
pulumi.RegisterOutputType(ContactArrayOutput{})
pulumi.RegisterOutputType(ContactMapOutput{})
}
| 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/orbital/spacecraft.go | sdk/go/azure/orbital/spacecraft.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 orbital
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Spacecraft.
//
// > **Note:** The `orbital.Spacecraft` resource has been deprecated and will be removed in v5.0 of the AzureRM Provider.
//
// ## 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/orbital"
// "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("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = orbital.NewSpacecraft(ctx, "example", &orbital.SpacecraftArgs{
// Name: pulumi.String("example-spacecraft"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("westeurope"),
// NoradId: pulumi.String("12345"),
// Links: orbital.SpacecraftLinkArray{
// &orbital.SpacecraftLinkArgs{
// BandwidthMhz: pulumi.Float64(30),
// CenterFrequencyMhz: pulumi.Float64(2050),
// Direction: pulumi.String("Uplink"),
// Polarization: pulumi.String("LHCP"),
// Name: pulumi.String("examplename"),
// },
// },
// TwoLineElements: pulumi.StringArray{
// pulumi.String("1 23455U 94089A 97320.90946019 .00000140 00000-0 10191-3 0 2621"),
// pulumi.String("2 23455 99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495"),
// },
// TitleLine: pulumi.String("AQUA"),
// Tags: pulumi.StringMap{
// "aks-managed-cluster-name": pulumi.String("9a57225d-a405-4d40-aa46-f13d2342abef"),
// },
// })
// 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.Orbital` - 2022-11-01
//
// ## Import
//
// Spacecraft can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:orbital/spacecraft:Spacecraft example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Orbital/spacecrafts/spacecraft1
// ```
type Spacecraft struct {
pulumi.CustomResourceState
// A `links` block as defined below. Changing this forces a new resource to be created.
Links SpacecraftLinkArrayOutput `pulumi:"links"`
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Spacecraft. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// NORAD ID of the Spacecraft.
NoradId pulumi.StringOutput `pulumi:"noradId"`
// The name of the Resource Group where the Spacecraft exists. 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"`
// Title of the two line elements (TLE).
TitleLine pulumi.StringOutput `pulumi:"titleLine"`
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
TwoLineElements pulumi.StringArrayOutput `pulumi:"twoLineElements"`
}
// NewSpacecraft registers a new resource with the given unique name, arguments, and options.
func NewSpacecraft(ctx *pulumi.Context,
name string, args *SpacecraftArgs, opts ...pulumi.ResourceOption) (*Spacecraft, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Links == nil {
return nil, errors.New("invalid value for required argument 'Links'")
}
if args.NoradId == nil {
return nil, errors.New("invalid value for required argument 'NoradId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.TitleLine == nil {
return nil, errors.New("invalid value for required argument 'TitleLine'")
}
if args.TwoLineElements == nil {
return nil, errors.New("invalid value for required argument 'TwoLineElements'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Spacecraft
err := ctx.RegisterResource("azure:orbital/spacecraft:Spacecraft", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSpacecraft gets an existing Spacecraft 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 GetSpacecraft(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SpacecraftState, opts ...pulumi.ResourceOption) (*Spacecraft, error) {
var resource Spacecraft
err := ctx.ReadResource("azure:orbital/spacecraft:Spacecraft", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Spacecraft resources.
type spacecraftState struct {
// A `links` block as defined below. Changing this forces a new resource to be created.
Links []SpacecraftLink `pulumi:"links"`
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Spacecraft. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// NORAD ID of the Spacecraft.
NoradId *string `pulumi:"noradId"`
// The name of the Resource Group where the Spacecraft exists. 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"`
// Title of the two line elements (TLE).
TitleLine *string `pulumi:"titleLine"`
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
TwoLineElements []string `pulumi:"twoLineElements"`
}
type SpacecraftState struct {
// A `links` block as defined below. Changing this forces a new resource to be created.
Links SpacecraftLinkArrayInput
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Spacecraft. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// NORAD ID of the Spacecraft.
NoradId pulumi.StringPtrInput
// The name of the Resource Group where the Spacecraft exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Title of the two line elements (TLE).
TitleLine pulumi.StringPtrInput
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
TwoLineElements pulumi.StringArrayInput
}
func (SpacecraftState) ElementType() reflect.Type {
return reflect.TypeOf((*spacecraftState)(nil)).Elem()
}
type spacecraftArgs struct {
// A `links` block as defined below. Changing this forces a new resource to be created.
Links []SpacecraftLink `pulumi:"links"`
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Spacecraft. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// NORAD ID of the Spacecraft.
NoradId string `pulumi:"noradId"`
// The name of the Resource Group where the Spacecraft exists. 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"`
// Title of the two line elements (TLE).
TitleLine string `pulumi:"titleLine"`
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
TwoLineElements []string `pulumi:"twoLineElements"`
}
// The set of arguments for constructing a Spacecraft resource.
type SpacecraftArgs struct {
// A `links` block as defined below. Changing this forces a new resource to be created.
Links SpacecraftLinkArrayInput
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Spacecraft. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// NORAD ID of the Spacecraft.
NoradId pulumi.StringInput
// The name of the Resource Group where the Spacecraft exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Title of the two line elements (TLE).
TitleLine pulumi.StringInput
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
TwoLineElements pulumi.StringArrayInput
}
func (SpacecraftArgs) ElementType() reflect.Type {
return reflect.TypeOf((*spacecraftArgs)(nil)).Elem()
}
type SpacecraftInput interface {
pulumi.Input
ToSpacecraftOutput() SpacecraftOutput
ToSpacecraftOutputWithContext(ctx context.Context) SpacecraftOutput
}
func (*Spacecraft) ElementType() reflect.Type {
return reflect.TypeOf((**Spacecraft)(nil)).Elem()
}
func (i *Spacecraft) ToSpacecraftOutput() SpacecraftOutput {
return i.ToSpacecraftOutputWithContext(context.Background())
}
func (i *Spacecraft) ToSpacecraftOutputWithContext(ctx context.Context) SpacecraftOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpacecraftOutput)
}
// SpacecraftArrayInput is an input type that accepts SpacecraftArray and SpacecraftArrayOutput values.
// You can construct a concrete instance of `SpacecraftArrayInput` via:
//
// SpacecraftArray{ SpacecraftArgs{...} }
type SpacecraftArrayInput interface {
pulumi.Input
ToSpacecraftArrayOutput() SpacecraftArrayOutput
ToSpacecraftArrayOutputWithContext(context.Context) SpacecraftArrayOutput
}
type SpacecraftArray []SpacecraftInput
func (SpacecraftArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Spacecraft)(nil)).Elem()
}
func (i SpacecraftArray) ToSpacecraftArrayOutput() SpacecraftArrayOutput {
return i.ToSpacecraftArrayOutputWithContext(context.Background())
}
func (i SpacecraftArray) ToSpacecraftArrayOutputWithContext(ctx context.Context) SpacecraftArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpacecraftArrayOutput)
}
// SpacecraftMapInput is an input type that accepts SpacecraftMap and SpacecraftMapOutput values.
// You can construct a concrete instance of `SpacecraftMapInput` via:
//
// SpacecraftMap{ "key": SpacecraftArgs{...} }
type SpacecraftMapInput interface {
pulumi.Input
ToSpacecraftMapOutput() SpacecraftMapOutput
ToSpacecraftMapOutputWithContext(context.Context) SpacecraftMapOutput
}
type SpacecraftMap map[string]SpacecraftInput
func (SpacecraftMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Spacecraft)(nil)).Elem()
}
func (i SpacecraftMap) ToSpacecraftMapOutput() SpacecraftMapOutput {
return i.ToSpacecraftMapOutputWithContext(context.Background())
}
func (i SpacecraftMap) ToSpacecraftMapOutputWithContext(ctx context.Context) SpacecraftMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SpacecraftMapOutput)
}
type SpacecraftOutput struct{ *pulumi.OutputState }
func (SpacecraftOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Spacecraft)(nil)).Elem()
}
func (o SpacecraftOutput) ToSpacecraftOutput() SpacecraftOutput {
return o
}
func (o SpacecraftOutput) ToSpacecraftOutputWithContext(ctx context.Context) SpacecraftOutput {
return o
}
// A `links` block as defined below. Changing this forces a new resource to be created.
func (o SpacecraftOutput) Links() SpacecraftLinkArrayOutput {
return o.ApplyT(func(v *Spacecraft) SpacecraftLinkArrayOutput { return v.Links }).(SpacecraftLinkArrayOutput)
}
// The location where the Spacecraft exists. Changing this forces a new resource to be created.
func (o SpacecraftOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Spacecraft. Changing this forces a new resource to be created.
func (o SpacecraftOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// NORAD ID of the Spacecraft.
func (o SpacecraftOutput) NoradId() pulumi.StringOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringOutput { return v.NoradId }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Spacecraft exists. Changing this forces a new resource to be created.
func (o SpacecraftOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o SpacecraftOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Title of the two line elements (TLE).
func (o SpacecraftOutput) TitleLine() pulumi.StringOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringOutput { return v.TitleLine }).(pulumi.StringOutput)
}
// A list of the two line elements (TLE), the first string being the first of the TLE, the second string being the second line of the TLE. Changing this forces a new resource to be created.
func (o SpacecraftOutput) TwoLineElements() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Spacecraft) pulumi.StringArrayOutput { return v.TwoLineElements }).(pulumi.StringArrayOutput)
}
type SpacecraftArrayOutput struct{ *pulumi.OutputState }
func (SpacecraftArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Spacecraft)(nil)).Elem()
}
func (o SpacecraftArrayOutput) ToSpacecraftArrayOutput() SpacecraftArrayOutput {
return o
}
func (o SpacecraftArrayOutput) ToSpacecraftArrayOutputWithContext(ctx context.Context) SpacecraftArrayOutput {
return o
}
func (o SpacecraftArrayOutput) Index(i pulumi.IntInput) SpacecraftOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Spacecraft {
return vs[0].([]*Spacecraft)[vs[1].(int)]
}).(SpacecraftOutput)
}
type SpacecraftMapOutput struct{ *pulumi.OutputState }
func (SpacecraftMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Spacecraft)(nil)).Elem()
}
func (o SpacecraftMapOutput) ToSpacecraftMapOutput() SpacecraftMapOutput {
return o
}
func (o SpacecraftMapOutput) ToSpacecraftMapOutputWithContext(ctx context.Context) SpacecraftMapOutput {
return o
}
func (o SpacecraftMapOutput) MapIndex(k pulumi.StringInput) SpacecraftOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Spacecraft {
return vs[0].(map[string]*Spacecraft)[vs[1].(string)]
}).(SpacecraftOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SpacecraftInput)(nil)).Elem(), &Spacecraft{})
pulumi.RegisterInputType(reflect.TypeOf((*SpacecraftArrayInput)(nil)).Elem(), SpacecraftArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SpacecraftMapInput)(nil)).Elem(), SpacecraftMap{})
pulumi.RegisterOutputType(SpacecraftOutput{})
pulumi.RegisterOutputType(SpacecraftArrayOutput{})
pulumi.RegisterOutputType(SpacecraftMapOutput{})
}
| 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/marketplace/init.go | sdk/go/azure/marketplace/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 marketplace
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:marketplace/agreement:Agreement":
r = &Agreement{}
case "azure:marketplace/roleAssignment:RoleAssignment":
r = &RoleAssignment{}
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",
"marketplace/agreement",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"marketplace/roleAssignment",
&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/marketplace/agreement.go | sdk/go/azure/marketplace/agreement.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 marketplace
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows accepting the Legal Terms for a Marketplace Image.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/marketplace"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := marketplace.NewAgreement(ctx, "barracuda", &marketplace.AgreementArgs{
// Publisher: pulumi.String("barracudanetworks"),
// Offer: pulumi.String("waf"),
// Plan: pulumi.String("hourly"),
// })
// 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.MarketplaceOrdering` - 2015-06-01
//
// ## Import
//
// Marketplace Agreement can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:marketplace/agreement:Agreement example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MarketplaceOrdering/agreements/publisher1/offers/offer1/plans/plan1
// ```
type Agreement struct {
pulumi.CustomResourceState
LicenseTextLink pulumi.StringOutput `pulumi:"licenseTextLink"`
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
Offer pulumi.StringOutput `pulumi:"offer"`
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
Plan pulumi.StringOutput `pulumi:"plan"`
PrivacyPolicyLink pulumi.StringOutput `pulumi:"privacyPolicyLink"`
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
Publisher pulumi.StringOutput `pulumi:"publisher"`
}
// NewAgreement registers a new resource with the given unique name, arguments, and options.
func NewAgreement(ctx *pulumi.Context,
name string, args *AgreementArgs, opts ...pulumi.ResourceOption) (*Agreement, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Offer == nil {
return nil, errors.New("invalid value for required argument 'Offer'")
}
if args.Plan == nil {
return nil, errors.New("invalid value for required argument 'Plan'")
}
if args.Publisher == nil {
return nil, errors.New("invalid value for required argument 'Publisher'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Agreement
err := ctx.RegisterResource("azure:marketplace/agreement:Agreement", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAgreement gets an existing Agreement 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 GetAgreement(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AgreementState, opts ...pulumi.ResourceOption) (*Agreement, error) {
var resource Agreement
err := ctx.ReadResource("azure:marketplace/agreement:Agreement", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Agreement resources.
type agreementState struct {
LicenseTextLink *string `pulumi:"licenseTextLink"`
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
Offer *string `pulumi:"offer"`
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
Plan *string `pulumi:"plan"`
PrivacyPolicyLink *string `pulumi:"privacyPolicyLink"`
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
Publisher *string `pulumi:"publisher"`
}
type AgreementState struct {
LicenseTextLink pulumi.StringPtrInput
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
Offer pulumi.StringPtrInput
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
Plan pulumi.StringPtrInput
PrivacyPolicyLink pulumi.StringPtrInput
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
Publisher pulumi.StringPtrInput
}
func (AgreementState) ElementType() reflect.Type {
return reflect.TypeOf((*agreementState)(nil)).Elem()
}
type agreementArgs struct {
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
Offer string `pulumi:"offer"`
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
Plan string `pulumi:"plan"`
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
Publisher string `pulumi:"publisher"`
}
// The set of arguments for constructing a Agreement resource.
type AgreementArgs struct {
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
Offer pulumi.StringInput
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
Plan pulumi.StringInput
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
Publisher pulumi.StringInput
}
func (AgreementArgs) ElementType() reflect.Type {
return reflect.TypeOf((*agreementArgs)(nil)).Elem()
}
type AgreementInput interface {
pulumi.Input
ToAgreementOutput() AgreementOutput
ToAgreementOutputWithContext(ctx context.Context) AgreementOutput
}
func (*Agreement) ElementType() reflect.Type {
return reflect.TypeOf((**Agreement)(nil)).Elem()
}
func (i *Agreement) ToAgreementOutput() AgreementOutput {
return i.ToAgreementOutputWithContext(context.Background())
}
func (i *Agreement) ToAgreementOutputWithContext(ctx context.Context) AgreementOutput {
return pulumi.ToOutputWithContext(ctx, i).(AgreementOutput)
}
// AgreementArrayInput is an input type that accepts AgreementArray and AgreementArrayOutput values.
// You can construct a concrete instance of `AgreementArrayInput` via:
//
// AgreementArray{ AgreementArgs{...} }
type AgreementArrayInput interface {
pulumi.Input
ToAgreementArrayOutput() AgreementArrayOutput
ToAgreementArrayOutputWithContext(context.Context) AgreementArrayOutput
}
type AgreementArray []AgreementInput
func (AgreementArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Agreement)(nil)).Elem()
}
func (i AgreementArray) ToAgreementArrayOutput() AgreementArrayOutput {
return i.ToAgreementArrayOutputWithContext(context.Background())
}
func (i AgreementArray) ToAgreementArrayOutputWithContext(ctx context.Context) AgreementArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AgreementArrayOutput)
}
// AgreementMapInput is an input type that accepts AgreementMap and AgreementMapOutput values.
// You can construct a concrete instance of `AgreementMapInput` via:
//
// AgreementMap{ "key": AgreementArgs{...} }
type AgreementMapInput interface {
pulumi.Input
ToAgreementMapOutput() AgreementMapOutput
ToAgreementMapOutputWithContext(context.Context) AgreementMapOutput
}
type AgreementMap map[string]AgreementInput
func (AgreementMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Agreement)(nil)).Elem()
}
func (i AgreementMap) ToAgreementMapOutput() AgreementMapOutput {
return i.ToAgreementMapOutputWithContext(context.Background())
}
func (i AgreementMap) ToAgreementMapOutputWithContext(ctx context.Context) AgreementMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AgreementMapOutput)
}
type AgreementOutput struct{ *pulumi.OutputState }
func (AgreementOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Agreement)(nil)).Elem()
}
func (o AgreementOutput) ToAgreementOutput() AgreementOutput {
return o
}
func (o AgreementOutput) ToAgreementOutputWithContext(ctx context.Context) AgreementOutput {
return o
}
func (o AgreementOutput) LicenseTextLink() pulumi.StringOutput {
return o.ApplyT(func(v *Agreement) pulumi.StringOutput { return v.LicenseTextLink }).(pulumi.StringOutput)
}
// The Offer of the Marketplace Image. Changing this forces a new resource to be created.
func (o AgreementOutput) Offer() pulumi.StringOutput {
return o.ApplyT(func(v *Agreement) pulumi.StringOutput { return v.Offer }).(pulumi.StringOutput)
}
// The Plan of the Marketplace Image. Changing this forces a new resource to be created.
func (o AgreementOutput) Plan() pulumi.StringOutput {
return o.ApplyT(func(v *Agreement) pulumi.StringOutput { return v.Plan }).(pulumi.StringOutput)
}
func (o AgreementOutput) PrivacyPolicyLink() pulumi.StringOutput {
return o.ApplyT(func(v *Agreement) pulumi.StringOutput { return v.PrivacyPolicyLink }).(pulumi.StringOutput)
}
// The Publisher of the Marketplace Image. Changing this forces a new resource to be created.
func (o AgreementOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v *Agreement) pulumi.StringOutput { return v.Publisher }).(pulumi.StringOutput)
}
type AgreementArrayOutput struct{ *pulumi.OutputState }
func (AgreementArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Agreement)(nil)).Elem()
}
func (o AgreementArrayOutput) ToAgreementArrayOutput() AgreementArrayOutput {
return o
}
func (o AgreementArrayOutput) ToAgreementArrayOutputWithContext(ctx context.Context) AgreementArrayOutput {
return o
}
func (o AgreementArrayOutput) Index(i pulumi.IntInput) AgreementOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Agreement {
return vs[0].([]*Agreement)[vs[1].(int)]
}).(AgreementOutput)
}
type AgreementMapOutput struct{ *pulumi.OutputState }
func (AgreementMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Agreement)(nil)).Elem()
}
func (o AgreementMapOutput) ToAgreementMapOutput() AgreementMapOutput {
return o
}
func (o AgreementMapOutput) ToAgreementMapOutputWithContext(ctx context.Context) AgreementMapOutput {
return o
}
func (o AgreementMapOutput) MapIndex(k pulumi.StringInput) AgreementOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Agreement {
return vs[0].(map[string]*Agreement)[vs[1].(string)]
}).(AgreementOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AgreementInput)(nil)).Elem(), &Agreement{})
pulumi.RegisterInputType(reflect.TypeOf((*AgreementArrayInput)(nil)).Elem(), AgreementArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AgreementMapInput)(nil)).Elem(), AgreementMap{})
pulumi.RegisterOutputType(AgreementOutput{})
pulumi.RegisterOutputType(AgreementArrayOutput{})
pulumi.RegisterOutputType(AgreementMapOutput{})
}
| 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/marketplace/getAgreement.go | sdk/go/azure/marketplace/getAgreement.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 marketplace
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Uses this data source to access information about an existing Marketplace Agreement.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/marketplace"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := marketplace.LookupAgreement(ctx, &marketplace.LookupAgreementArgs{
// Publisher: "barracudanetworks",
// Offer: "waf",
// Plan: "hourly",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("azurermMarketplaceAgreementId", id)
// ctx.Export("azurermMarketplaceAgreementAccepted", accepted)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.MarketplaceOrdering` - 2015-06-01
func LookupAgreement(ctx *pulumi.Context, args *LookupAgreementArgs, opts ...pulumi.InvokeOption) (*LookupAgreementResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAgreementResult
err := ctx.Invoke("azure:marketplace/getAgreement:getAgreement", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAgreement.
type LookupAgreementArgs struct {
// The Offer of the Marketplace Image.
Offer string `pulumi:"offer"`
// The Plan of the Marketplace Image.
Plan string `pulumi:"plan"`
// The Publisher of the Marketplace Image.
Publisher string `pulumi:"publisher"`
}
// A collection of values returned by getAgreement.
type LookupAgreementResult struct {
// Whether the Marketplace Agreement has been accepted.
Accepted bool `pulumi:"accepted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
LicenseTextLink string `pulumi:"licenseTextLink"`
Offer string `pulumi:"offer"`
Plan string `pulumi:"plan"`
PrivacyPolicyLink string `pulumi:"privacyPolicyLink"`
Publisher string `pulumi:"publisher"`
}
func LookupAgreementOutput(ctx *pulumi.Context, args LookupAgreementOutputArgs, opts ...pulumi.InvokeOption) LookupAgreementResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAgreementResultOutput, error) {
args := v.(LookupAgreementArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:marketplace/getAgreement:getAgreement", args, LookupAgreementResultOutput{}, options).(LookupAgreementResultOutput), nil
}).(LookupAgreementResultOutput)
}
// A collection of arguments for invoking getAgreement.
type LookupAgreementOutputArgs struct {
// The Offer of the Marketplace Image.
Offer pulumi.StringInput `pulumi:"offer"`
// The Plan of the Marketplace Image.
Plan pulumi.StringInput `pulumi:"plan"`
// The Publisher of the Marketplace Image.
Publisher pulumi.StringInput `pulumi:"publisher"`
}
func (LookupAgreementOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAgreementArgs)(nil)).Elem()
}
// A collection of values returned by getAgreement.
type LookupAgreementResultOutput struct{ *pulumi.OutputState }
func (LookupAgreementResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAgreementResult)(nil)).Elem()
}
func (o LookupAgreementResultOutput) ToLookupAgreementResultOutput() LookupAgreementResultOutput {
return o
}
func (o LookupAgreementResultOutput) ToLookupAgreementResultOutputWithContext(ctx context.Context) LookupAgreementResultOutput {
return o
}
// Whether the Marketplace Agreement has been accepted.
func (o LookupAgreementResultOutput) Accepted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAgreementResult) bool { return v.Accepted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAgreementResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupAgreementResultOutput) LicenseTextLink() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.LicenseTextLink }).(pulumi.StringOutput)
}
func (o LookupAgreementResultOutput) Offer() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.Offer }).(pulumi.StringOutput)
}
func (o LookupAgreementResultOutput) Plan() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.Plan }).(pulumi.StringOutput)
}
func (o LookupAgreementResultOutput) PrivacyPolicyLink() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.PrivacyPolicyLink }).(pulumi.StringOutput)
}
func (o LookupAgreementResultOutput) Publisher() pulumi.StringOutput {
return o.ApplyT(func(v LookupAgreementResult) string { return v.Publisher }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAgreementResultOutput{})
}
| 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/marketplace/roleAssignment.go | sdk/go/azure/marketplace/roleAssignment.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 marketplace
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Assigns a given Principal (User or Group) to a given Role in a Private Azure Marketplace.
//
// ## Example Usage
//
// ### Using A Role Definition Name)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/marketplace"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// _, err = marketplace.NewRoleAssignment(ctx, "example", &marketplace.RoleAssignmentArgs{
// RoleDefinitionName: pulumi.String("Marketplace Admin"),
// PrincipalId: pulumi.String(example.ObjectId),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Using A Role Definition ID)
//
// ```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/marketplace"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
// Name: pulumi.StringRef("Log Analytics Reader"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = marketplace.NewRoleAssignment(ctx, "example", &marketplace.RoleAssignmentArgs{
// RoleDefinitionId: pulumi.String(exampleGetRoleDefinition.Id),
// PrincipalId: pulumi.String(example.ObjectId),
// })
// 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.Authorization` - 2022-05-01-preview, 2022-04-01
//
// ## Import
//
// Role Assignments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:marketplace/roleAssignment:RoleAssignment example /providers/Microsoft.Marketplace/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000
// ```
//
// text
//
// /providers/Microsoft.Marketplace/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000
type RoleAssignment struct {
pulumi.CustomResourceState
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
Condition pulumi.StringPtrOutput `pulumi:"condition"`
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
ConditionVersion pulumi.StringPtrOutput `pulumi:"conditionVersion"`
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
DelegatedManagedIdentityResourceId pulumi.StringPtrOutput `pulumi:"delegatedManagedIdentityResourceId"`
// The description for this Role Assignment. Changing this forces a new resource to be created.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
PrincipalId pulumi.StringOutput `pulumi:"principalId"`
// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
PrincipalType pulumi.StringOutput `pulumi:"principalType"`
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
RoleDefinitionId pulumi.StringPtrOutput `pulumi:"roleDefinitionId"`
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
RoleDefinitionName pulumi.StringPtrOutput `pulumi:"roleDefinitionName"`
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
SkipServicePrincipalAadCheck pulumi.BoolPtrOutput `pulumi:"skipServicePrincipalAadCheck"`
}
// NewRoleAssignment registers a new resource with the given unique name, arguments, and options.
func NewRoleAssignment(ctx *pulumi.Context,
name string, args *RoleAssignmentArgs, opts ...pulumi.ResourceOption) (*RoleAssignment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrincipalId == nil {
return nil, errors.New("invalid value for required argument 'PrincipalId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource RoleAssignment
err := ctx.RegisterResource("azure:marketplace/roleAssignment:RoleAssignment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRoleAssignment gets an existing RoleAssignment 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 GetRoleAssignment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RoleAssignmentState, opts ...pulumi.ResourceOption) (*RoleAssignment, error) {
var resource RoleAssignment
err := ctx.ReadResource("azure:marketplace/roleAssignment:RoleAssignment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RoleAssignment resources.
type roleAssignmentState struct {
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
Condition *string `pulumi:"condition"`
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
ConditionVersion *string `pulumi:"conditionVersion"`
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
DelegatedManagedIdentityResourceId *string `pulumi:"delegatedManagedIdentityResourceId"`
// The description for this Role Assignment. Changing this forces a new resource to be created.
Description *string `pulumi:"description"`
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
PrincipalId *string `pulumi:"principalId"`
// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
PrincipalType *string `pulumi:"principalType"`
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
RoleDefinitionId *string `pulumi:"roleDefinitionId"`
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
RoleDefinitionName *string `pulumi:"roleDefinitionName"`
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
SkipServicePrincipalAadCheck *bool `pulumi:"skipServicePrincipalAadCheck"`
}
type RoleAssignmentState struct {
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
Condition pulumi.StringPtrInput
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
ConditionVersion pulumi.StringPtrInput
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
DelegatedManagedIdentityResourceId pulumi.StringPtrInput
// The description for this Role Assignment. Changing this forces a new resource to be created.
Description pulumi.StringPtrInput
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
PrincipalId pulumi.StringPtrInput
// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
PrincipalType pulumi.StringPtrInput
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
RoleDefinitionId pulumi.StringPtrInput
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
RoleDefinitionName pulumi.StringPtrInput
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
SkipServicePrincipalAadCheck pulumi.BoolPtrInput
}
func (RoleAssignmentState) ElementType() reflect.Type {
return reflect.TypeOf((*roleAssignmentState)(nil)).Elem()
}
type roleAssignmentArgs struct {
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
Condition *string `pulumi:"condition"`
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
ConditionVersion *string `pulumi:"conditionVersion"`
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
DelegatedManagedIdentityResourceId *string `pulumi:"delegatedManagedIdentityResourceId"`
// The description for this Role Assignment. Changing this forces a new resource to be created.
Description *string `pulumi:"description"`
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
PrincipalId string `pulumi:"principalId"`
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
RoleDefinitionId *string `pulumi:"roleDefinitionId"`
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
RoleDefinitionName *string `pulumi:"roleDefinitionName"`
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
SkipServicePrincipalAadCheck *bool `pulumi:"skipServicePrincipalAadCheck"`
}
// The set of arguments for constructing a RoleAssignment resource.
type RoleAssignmentArgs struct {
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
Condition pulumi.StringPtrInput
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
ConditionVersion pulumi.StringPtrInput
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
DelegatedManagedIdentityResourceId pulumi.StringPtrInput
// The description for this Role Assignment. Changing this forces a new resource to be created.
Description pulumi.StringPtrInput
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
PrincipalId pulumi.StringInput
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
RoleDefinitionId pulumi.StringPtrInput
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
RoleDefinitionName pulumi.StringPtrInput
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
SkipServicePrincipalAadCheck pulumi.BoolPtrInput
}
func (RoleAssignmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*roleAssignmentArgs)(nil)).Elem()
}
type RoleAssignmentInput interface {
pulumi.Input
ToRoleAssignmentOutput() RoleAssignmentOutput
ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput
}
func (*RoleAssignment) ElementType() reflect.Type {
return reflect.TypeOf((**RoleAssignment)(nil)).Elem()
}
func (i *RoleAssignment) ToRoleAssignmentOutput() RoleAssignmentOutput {
return i.ToRoleAssignmentOutputWithContext(context.Background())
}
func (i *RoleAssignment) ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentOutput)
}
// RoleAssignmentArrayInput is an input type that accepts RoleAssignmentArray and RoleAssignmentArrayOutput values.
// You can construct a concrete instance of `RoleAssignmentArrayInput` via:
//
// RoleAssignmentArray{ RoleAssignmentArgs{...} }
type RoleAssignmentArrayInput interface {
pulumi.Input
ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput
ToRoleAssignmentArrayOutputWithContext(context.Context) RoleAssignmentArrayOutput
}
type RoleAssignmentArray []RoleAssignmentInput
func (RoleAssignmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RoleAssignment)(nil)).Elem()
}
func (i RoleAssignmentArray) ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput {
return i.ToRoleAssignmentArrayOutputWithContext(context.Background())
}
func (i RoleAssignmentArray) ToRoleAssignmentArrayOutputWithContext(ctx context.Context) RoleAssignmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentArrayOutput)
}
// RoleAssignmentMapInput is an input type that accepts RoleAssignmentMap and RoleAssignmentMapOutput values.
// You can construct a concrete instance of `RoleAssignmentMapInput` via:
//
// RoleAssignmentMap{ "key": RoleAssignmentArgs{...} }
type RoleAssignmentMapInput interface {
pulumi.Input
ToRoleAssignmentMapOutput() RoleAssignmentMapOutput
ToRoleAssignmentMapOutputWithContext(context.Context) RoleAssignmentMapOutput
}
type RoleAssignmentMap map[string]RoleAssignmentInput
func (RoleAssignmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RoleAssignment)(nil)).Elem()
}
func (i RoleAssignmentMap) ToRoleAssignmentMapOutput() RoleAssignmentMapOutput {
return i.ToRoleAssignmentMapOutputWithContext(context.Background())
}
func (i RoleAssignmentMap) ToRoleAssignmentMapOutputWithContext(ctx context.Context) RoleAssignmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RoleAssignmentMapOutput)
}
type RoleAssignmentOutput struct{ *pulumi.OutputState }
func (RoleAssignmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RoleAssignment)(nil)).Elem()
}
func (o RoleAssignmentOutput) ToRoleAssignmentOutput() RoleAssignmentOutput {
return o
}
func (o RoleAssignmentOutput) ToRoleAssignmentOutputWithContext(ctx context.Context) RoleAssignmentOutput {
return o
}
// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
func (o RoleAssignmentOutput) Condition() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput)
}
// The version of the condition. Possible values are `1.0` or `2.0`. Changing this forces a new resource to be created.
func (o RoleAssignmentOutput) ConditionVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.ConditionVersion }).(pulumi.StringPtrOutput)
}
// The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
//
// > **Note:** This field is only used in cross tenant scenarios.
func (o RoleAssignmentOutput) DelegatedManagedIdentityResourceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.DelegatedManagedIdentityResourceId }).(pulumi.StringPtrOutput)
}
// The description for this Role Assignment. Changing this forces a new resource to be created.
func (o RoleAssignmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
func (o RoleAssignmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
//
// > **Note:** The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have `Microsoft.Authorization/roleAssignments/write` permissions. See [documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal) for more information.
func (o RoleAssignmentOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput)
}
// The type of the `principalId`, e.g. User, Group, Service Principal, Application, etc.
func (o RoleAssignmentOutput) PrincipalType() pulumi.StringOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput)
}
// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with `roleDefinitionName`.
func (o RoleAssignmentOutput) RoleDefinitionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.RoleDefinitionId }).(pulumi.StringPtrOutput)
}
// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with `roleDefinitionId`.
//
// > **Note:** To assign `Marketplace Admin` role, the calling Principal must first be assigned Privileged Role Administrator (like `Owner` role) or Global Administrator. See [documentation](https://learn.microsoft.com/en-us/marketplace/create-manage-private-azure-marketplace-new#prerequisites) for more information.
func (o RoleAssignmentOutput) RoleDefinitionName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.StringPtrOutput { return v.RoleDefinitionName }).(pulumi.StringPtrOutput)
}
// If the `principalId` is a newly provisioned `Service Principal` set this value to `true` to skip the `Azure Active Directory` check which may fail due to replication lag. This argument is only valid if the `principalId` is a `Service Principal` identity. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** This field takes effect only when `principalId` is a `Service Principal` identity.
func (o RoleAssignmentOutput) SkipServicePrincipalAadCheck() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *RoleAssignment) pulumi.BoolPtrOutput { return v.SkipServicePrincipalAadCheck }).(pulumi.BoolPtrOutput)
}
type RoleAssignmentArrayOutput struct{ *pulumi.OutputState }
func (RoleAssignmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RoleAssignment)(nil)).Elem()
}
func (o RoleAssignmentArrayOutput) ToRoleAssignmentArrayOutput() RoleAssignmentArrayOutput {
return o
}
func (o RoleAssignmentArrayOutput) ToRoleAssignmentArrayOutputWithContext(ctx context.Context) RoleAssignmentArrayOutput {
return o
}
func (o RoleAssignmentArrayOutput) Index(i pulumi.IntInput) RoleAssignmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoleAssignment {
return vs[0].([]*RoleAssignment)[vs[1].(int)]
}).(RoleAssignmentOutput)
}
type RoleAssignmentMapOutput struct{ *pulumi.OutputState }
func (RoleAssignmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RoleAssignment)(nil)).Elem()
}
func (o RoleAssignmentMapOutput) ToRoleAssignmentMapOutput() RoleAssignmentMapOutput {
return o
}
func (o RoleAssignmentMapOutput) ToRoleAssignmentMapOutputWithContext(ctx context.Context) RoleAssignmentMapOutput {
return o
}
func (o RoleAssignmentMapOutput) MapIndex(k pulumi.StringInput) RoleAssignmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoleAssignment {
return vs[0].(map[string]*RoleAssignment)[vs[1].(string)]
}).(RoleAssignmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentInput)(nil)).Elem(), &RoleAssignment{})
pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentArrayInput)(nil)).Elem(), RoleAssignmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RoleAssignmentMapInput)(nil)).Elem(), RoleAssignmentMap{})
pulumi.RegisterOutputType(RoleAssignmentOutput{})
pulumi.RegisterOutputType(RoleAssignmentArrayOutput{})
pulumi.RegisterOutputType(RoleAssignmentMapOutput{})
}
| 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/mssql/elasticPool.go | sdk/go/azure/mssql/elasticPool.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows you to manage an Azure SQL Elastic Pool.
//
// ## 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/mssql"
// "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-resource-group"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("my-sql-server"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewElasticPool(ctx, "example", &mssql.ElasticPoolArgs{
// Name: pulumi.String("test-epool"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ServerName: exampleServer.Name,
// LicenseType: pulumi.String("LicenseIncluded"),
// MaxSizeGb: pulumi.Float64(756),
// Sku: &mssql.ElasticPoolSkuArgs{
// Name: pulumi.String("BasicPool"),
// Tier: pulumi.String("Basic"),
// Family: pulumi.String("Gen4"),
// Capacity: pulumi.Int(4),
// },
// PerDatabaseSettings: &mssql.ElasticPoolPerDatabaseSettingsArgs{
// MinCapacity: pulumi.Float64(0.25),
// MaxCapacity: pulumi.Float64(4),
// },
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Elastic Pool can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/elasticPool:ElasticPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/elasticPools/myelasticpoolname
// ```
type ElasticPool struct {
pulumi.CustomResourceState
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
EnclaveType pulumi.StringOutput `pulumi:"enclaveType"`
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
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"`
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
MaintenanceConfigurationName pulumi.StringPtrOutput `pulumi:"maintenanceConfigurationName"`
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
MaxSizeBytes pulumi.IntOutput `pulumi:"maxSizeBytes"`
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
MaxSizeGb pulumi.Float64Output `pulumi:"maxSizeGb"`
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `perDatabaseSettings` block as defined below.
PerDatabaseSettings ElasticPoolPerDatabaseSettingsOutput `pulumi:"perDatabaseSettings"`
// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
ServerName pulumi.StringOutput `pulumi:"serverName"`
// A `sku` block as defined below.
Sku ElasticPoolSkuOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`.
ZoneRedundant pulumi.BoolPtrOutput `pulumi:"zoneRedundant"`
}
// NewElasticPool registers a new resource with the given unique name, arguments, and options.
func NewElasticPool(ctx *pulumi.Context,
name string, args *ElasticPoolArgs, opts ...pulumi.ResourceOption) (*ElasticPool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PerDatabaseSettings == nil {
return nil, errors.New("invalid value for required argument 'PerDatabaseSettings'")
}
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.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ElasticPool
err := ctx.RegisterResource("azure:mssql/elasticPool:ElasticPool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetElasticPool gets an existing ElasticPool 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 GetElasticPool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ElasticPoolState, opts ...pulumi.ResourceOption) (*ElasticPool, error) {
var resource ElasticPool
err := ctx.ReadResource("azure:mssql/elasticPool:ElasticPool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ElasticPool resources.
type elasticPoolState struct {
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
EnclaveType *string `pulumi:"enclaveType"`
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
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"`
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
MaintenanceConfigurationName *string `pulumi:"maintenanceConfigurationName"`
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
MaxSizeBytes *int `pulumi:"maxSizeBytes"`
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
MaxSizeGb *float64 `pulumi:"maxSizeGb"`
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `perDatabaseSettings` block as defined below.
PerDatabaseSettings *ElasticPoolPerDatabaseSettings `pulumi:"perDatabaseSettings"`
// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
ServerName *string `pulumi:"serverName"`
// A `sku` block as defined below.
Sku *ElasticPoolSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`.
ZoneRedundant *bool `pulumi:"zoneRedundant"`
}
type ElasticPoolState struct {
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
EnclaveType pulumi.StringPtrInput
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
LicenseType pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
MaintenanceConfigurationName pulumi.StringPtrInput
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
MaxSizeBytes pulumi.IntPtrInput
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
MaxSizeGb pulumi.Float64PtrInput
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `perDatabaseSettings` block as defined below.
PerDatabaseSettings ElasticPoolPerDatabaseSettingsPtrInput
// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
ServerName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku ElasticPoolSkuPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`.
ZoneRedundant pulumi.BoolPtrInput
}
func (ElasticPoolState) ElementType() reflect.Type {
return reflect.TypeOf((*elasticPoolState)(nil)).Elem()
}
type elasticPoolArgs struct {
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
EnclaveType *string `pulumi:"enclaveType"`
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
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"`
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
MaintenanceConfigurationName *string `pulumi:"maintenanceConfigurationName"`
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
MaxSizeBytes *int `pulumi:"maxSizeBytes"`
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
MaxSizeGb *float64 `pulumi:"maxSizeGb"`
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `perDatabaseSettings` block as defined below.
PerDatabaseSettings ElasticPoolPerDatabaseSettings `pulumi:"perDatabaseSettings"`
// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
ServerName string `pulumi:"serverName"`
// A `sku` block as defined below.
Sku ElasticPoolSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`.
ZoneRedundant *bool `pulumi:"zoneRedundant"`
}
// The set of arguments for constructing a ElasticPool resource.
type ElasticPoolArgs struct {
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
EnclaveType pulumi.StringPtrInput
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
LicenseType pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
MaintenanceConfigurationName pulumi.StringPtrInput
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
MaxSizeBytes pulumi.IntPtrInput
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
MaxSizeGb pulumi.Float64PtrInput
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `perDatabaseSettings` block as defined below.
PerDatabaseSettings ElasticPoolPerDatabaseSettingsInput
// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
ServerName pulumi.StringInput
// A `sku` block as defined below.
Sku ElasticPoolSkuInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Whether or not this elastic pool is zone redundant. `tier` needs to be `Premium` for `DTU` based or `BusinessCritical` for `vCore` based `sku`.
ZoneRedundant pulumi.BoolPtrInput
}
func (ElasticPoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*elasticPoolArgs)(nil)).Elem()
}
type ElasticPoolInput interface {
pulumi.Input
ToElasticPoolOutput() ElasticPoolOutput
ToElasticPoolOutputWithContext(ctx context.Context) ElasticPoolOutput
}
func (*ElasticPool) ElementType() reflect.Type {
return reflect.TypeOf((**ElasticPool)(nil)).Elem()
}
func (i *ElasticPool) ToElasticPoolOutput() ElasticPoolOutput {
return i.ToElasticPoolOutputWithContext(context.Background())
}
func (i *ElasticPool) ToElasticPoolOutputWithContext(ctx context.Context) ElasticPoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(ElasticPoolOutput)
}
// ElasticPoolArrayInput is an input type that accepts ElasticPoolArray and ElasticPoolArrayOutput values.
// You can construct a concrete instance of `ElasticPoolArrayInput` via:
//
// ElasticPoolArray{ ElasticPoolArgs{...} }
type ElasticPoolArrayInput interface {
pulumi.Input
ToElasticPoolArrayOutput() ElasticPoolArrayOutput
ToElasticPoolArrayOutputWithContext(context.Context) ElasticPoolArrayOutput
}
type ElasticPoolArray []ElasticPoolInput
func (ElasticPoolArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ElasticPool)(nil)).Elem()
}
func (i ElasticPoolArray) ToElasticPoolArrayOutput() ElasticPoolArrayOutput {
return i.ToElasticPoolArrayOutputWithContext(context.Background())
}
func (i ElasticPoolArray) ToElasticPoolArrayOutputWithContext(ctx context.Context) ElasticPoolArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ElasticPoolArrayOutput)
}
// ElasticPoolMapInput is an input type that accepts ElasticPoolMap and ElasticPoolMapOutput values.
// You can construct a concrete instance of `ElasticPoolMapInput` via:
//
// ElasticPoolMap{ "key": ElasticPoolArgs{...} }
type ElasticPoolMapInput interface {
pulumi.Input
ToElasticPoolMapOutput() ElasticPoolMapOutput
ToElasticPoolMapOutputWithContext(context.Context) ElasticPoolMapOutput
}
type ElasticPoolMap map[string]ElasticPoolInput
func (ElasticPoolMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ElasticPool)(nil)).Elem()
}
func (i ElasticPoolMap) ToElasticPoolMapOutput() ElasticPoolMapOutput {
return i.ToElasticPoolMapOutputWithContext(context.Background())
}
func (i ElasticPoolMap) ToElasticPoolMapOutputWithContext(ctx context.Context) ElasticPoolMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ElasticPoolMapOutput)
}
type ElasticPoolOutput struct{ *pulumi.OutputState }
func (ElasticPoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ElasticPool)(nil)).Elem()
}
func (o ElasticPoolOutput) ToElasticPoolOutput() ElasticPoolOutput {
return o
}
func (o ElasticPoolOutput) ToElasticPoolOutputWithContext(ctx context.Context) ElasticPoolOutput {
return o
}
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the elastic pool. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** All databases that are added to the elastic pool must have the same `enclaveType` as the elastic pool.
//
// > **Note:** `enclaveType` is not supported for DC-series SKUs.
//
// > **Note:** The default value for `enclaveType` field is unset not `Default`.
func (o ElasticPoolOutput) EnclaveType() pulumi.StringOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.StringOutput { return v.EnclaveType }).(pulumi.StringOutput)
}
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
func (o ElasticPoolOutput) LicenseType() pulumi.StringOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.StringOutput { return v.LicenseType }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ElasticPoolOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
func (o ElasticPoolOutput) MaintenanceConfigurationName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.StringPtrOutput { return v.MaintenanceConfigurationName }).(pulumi.StringPtrOutput)
}
// The max data size of the elastic pool in bytes. Conflicts with `maxSizeGb`.
//
// > **Note:** One of either `maxSizeGb` or `maxSizeBytes` must be specified.
func (o ElasticPoolOutput) MaxSizeBytes() pulumi.IntOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.IntOutput { return v.MaxSizeBytes }).(pulumi.IntOutput)
}
// The max data size of the elastic pool in gigabytes. Conflicts with `maxSizeBytes`.
func (o ElasticPoolOutput) MaxSizeGb() pulumi.Float64Output {
return o.ApplyT(func(v *ElasticPool) pulumi.Float64Output { return v.MaxSizeGb }).(pulumi.Float64Output)
}
// The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
func (o ElasticPoolOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ElasticPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `perDatabaseSettings` block as defined below.
func (o ElasticPoolOutput) PerDatabaseSettings() ElasticPoolPerDatabaseSettingsOutput {
return o.ApplyT(func(v *ElasticPool) ElasticPoolPerDatabaseSettingsOutput { return v.PerDatabaseSettings }).(ElasticPoolPerDatabaseSettingsOutput)
}
| 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/mssql/jobStep.go | sdk/go/azure/mssql/jobStep.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Elastic Job Step.
//
// ## 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/mssql"
// "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("westeurope"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// exampleJobAgent, err := mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.ID(),
// })
// if err != nil {
// return err
// }
// exampleJobCredential, err := mssql.NewJobCredential(ctx, "example", &mssql.JobCredentialArgs{
// Name: pulumi.String("example-job-credential"),
// JobAgentId: exampleJobAgent.ID(),
// Username: pulumi.String("exampleusername"),
// Password: pulumi.String("examplepassword"),
// })
// if err != nil {
// return err
// }
// exampleJobTargetGroup, err := mssql.NewJobTargetGroup(ctx, "example", &mssql.JobTargetGroupArgs{
// Name: pulumi.String("example-target-group"),
// JobAgentId: exampleJobAgent.ID(),
// JobTargets: mssql.JobTargetGroupJobTargetArray{
// &mssql.JobTargetGroupJobTargetArgs{
// ServerName: exampleServer.Name,
// DatabaseName: exampleDatabase.Name,
// JobCredentialId: exampleJobCredential.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleJob, err := mssql.NewJob(ctx, "example", &mssql.JobArgs{
// Name: pulumi.String("example-job"),
// JobAgentId: exampleJobAgent.ID(),
// Description: pulumi.String("example description"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobStep(ctx, "test", &mssql.JobStepArgs{
// Name: pulumi.String("example-job-step"),
// JobId: exampleJob.ID(),
// JobCredentialId: exampleJobCredential.ID(),
// JobTargetGroupId: exampleJobTargetGroup.ID(),
// JobStepIndex: pulumi.Int(1),
// SqlScript: pulumi.String(`IF NOT EXISTS (SELECT * FROM sys.objects WHERE [name] = N'Pets')
// CREATE TABLE Pets (
// Animal NVARCHAR(50),
// Name NVARCHAR(50),
// );
//
// `),
//
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Elastic Job Steps can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/jobStep:JobStep example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/jobs/myjob1/steps/myjobstep1
// ```
type JobStep struct {
pulumi.CustomResourceState
// The initial retry interval in seconds. Defaults to `1`.
InitialRetryIntervalSeconds pulumi.IntPtrOutput `pulumi:"initialRetryIntervalSeconds"`
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
JobCredentialId pulumi.StringPtrOutput `pulumi:"jobCredentialId"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
JobId pulumi.StringOutput `pulumi:"jobId"`
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
JobStepIndex pulumi.IntOutput `pulumi:"jobStepIndex"`
// The ID of the Elastic Job Target Group.
JobTargetGroupId pulumi.StringOutput `pulumi:"jobTargetGroupId"`
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
MaximumRetryIntervalSeconds pulumi.IntPtrOutput `pulumi:"maximumRetryIntervalSeconds"`
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An `outputTarget` block as defined below.
OutputTarget JobStepOutputTargetPtrOutput `pulumi:"outputTarget"`
// The number of retry attempts. Defaults to `10`.
RetryAttempts pulumi.IntPtrOutput `pulumi:"retryAttempts"`
// The multiplier for time between retries. Defaults to `2.0`.
RetryIntervalBackoffMultiplier pulumi.Float64PtrOutput `pulumi:"retryIntervalBackoffMultiplier"`
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
SqlScript pulumi.StringOutput `pulumi:"sqlScript"`
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
TimeoutSeconds pulumi.IntPtrOutput `pulumi:"timeoutSeconds"`
}
// NewJobStep registers a new resource with the given unique name, arguments, and options.
func NewJobStep(ctx *pulumi.Context,
name string, args *JobStepArgs, opts ...pulumi.ResourceOption) (*JobStep, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.JobId == nil {
return nil, errors.New("invalid value for required argument 'JobId'")
}
if args.JobStepIndex == nil {
return nil, errors.New("invalid value for required argument 'JobStepIndex'")
}
if args.JobTargetGroupId == nil {
return nil, errors.New("invalid value for required argument 'JobTargetGroupId'")
}
if args.SqlScript == nil {
return nil, errors.New("invalid value for required argument 'SqlScript'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobStep
err := ctx.RegisterResource("azure:mssql/jobStep:JobStep", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobStep gets an existing JobStep 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 GetJobStep(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobStepState, opts ...pulumi.ResourceOption) (*JobStep, error) {
var resource JobStep
err := ctx.ReadResource("azure:mssql/jobStep:JobStep", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobStep resources.
type jobStepState struct {
// The initial retry interval in seconds. Defaults to `1`.
InitialRetryIntervalSeconds *int `pulumi:"initialRetryIntervalSeconds"`
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
JobCredentialId *string `pulumi:"jobCredentialId"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
JobId *string `pulumi:"jobId"`
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
JobStepIndex *int `pulumi:"jobStepIndex"`
// The ID of the Elastic Job Target Group.
JobTargetGroupId *string `pulumi:"jobTargetGroupId"`
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
MaximumRetryIntervalSeconds *int `pulumi:"maximumRetryIntervalSeconds"`
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
Name *string `pulumi:"name"`
// An `outputTarget` block as defined below.
OutputTarget *JobStepOutputTarget `pulumi:"outputTarget"`
// The number of retry attempts. Defaults to `10`.
RetryAttempts *int `pulumi:"retryAttempts"`
// The multiplier for time between retries. Defaults to `2.0`.
RetryIntervalBackoffMultiplier *float64 `pulumi:"retryIntervalBackoffMultiplier"`
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
SqlScript *string `pulumi:"sqlScript"`
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
TimeoutSeconds *int `pulumi:"timeoutSeconds"`
}
type JobStepState struct {
// The initial retry interval in seconds. Defaults to `1`.
InitialRetryIntervalSeconds pulumi.IntPtrInput
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
JobCredentialId pulumi.StringPtrInput
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
JobId pulumi.StringPtrInput
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
JobStepIndex pulumi.IntPtrInput
// The ID of the Elastic Job Target Group.
JobTargetGroupId pulumi.StringPtrInput
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
MaximumRetryIntervalSeconds pulumi.IntPtrInput
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
Name pulumi.StringPtrInput
// An `outputTarget` block as defined below.
OutputTarget JobStepOutputTargetPtrInput
// The number of retry attempts. Defaults to `10`.
RetryAttempts pulumi.IntPtrInput
// The multiplier for time between retries. Defaults to `2.0`.
RetryIntervalBackoffMultiplier pulumi.Float64PtrInput
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
SqlScript pulumi.StringPtrInput
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
TimeoutSeconds pulumi.IntPtrInput
}
func (JobStepState) ElementType() reflect.Type {
return reflect.TypeOf((*jobStepState)(nil)).Elem()
}
type jobStepArgs struct {
// The initial retry interval in seconds. Defaults to `1`.
InitialRetryIntervalSeconds *int `pulumi:"initialRetryIntervalSeconds"`
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
JobCredentialId *string `pulumi:"jobCredentialId"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
JobId string `pulumi:"jobId"`
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
JobStepIndex int `pulumi:"jobStepIndex"`
// The ID of the Elastic Job Target Group.
JobTargetGroupId string `pulumi:"jobTargetGroupId"`
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
MaximumRetryIntervalSeconds *int `pulumi:"maximumRetryIntervalSeconds"`
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
Name *string `pulumi:"name"`
// An `outputTarget` block as defined below.
OutputTarget *JobStepOutputTarget `pulumi:"outputTarget"`
// The number of retry attempts. Defaults to `10`.
RetryAttempts *int `pulumi:"retryAttempts"`
// The multiplier for time between retries. Defaults to `2.0`.
RetryIntervalBackoffMultiplier *float64 `pulumi:"retryIntervalBackoffMultiplier"`
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
SqlScript string `pulumi:"sqlScript"`
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
TimeoutSeconds *int `pulumi:"timeoutSeconds"`
}
// The set of arguments for constructing a JobStep resource.
type JobStepArgs struct {
// The initial retry interval in seconds. Defaults to `1`.
InitialRetryIntervalSeconds pulumi.IntPtrInput
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
JobCredentialId pulumi.StringPtrInput
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
JobId pulumi.StringInput
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
JobStepIndex pulumi.IntInput
// The ID of the Elastic Job Target Group.
JobTargetGroupId pulumi.StringInput
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
MaximumRetryIntervalSeconds pulumi.IntPtrInput
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
Name pulumi.StringPtrInput
// An `outputTarget` block as defined below.
OutputTarget JobStepOutputTargetPtrInput
// The number of retry attempts. Defaults to `10`.
RetryAttempts pulumi.IntPtrInput
// The multiplier for time between retries. Defaults to `2.0`.
RetryIntervalBackoffMultiplier pulumi.Float64PtrInput
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
SqlScript pulumi.StringInput
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
TimeoutSeconds pulumi.IntPtrInput
}
func (JobStepArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobStepArgs)(nil)).Elem()
}
type JobStepInput interface {
pulumi.Input
ToJobStepOutput() JobStepOutput
ToJobStepOutputWithContext(ctx context.Context) JobStepOutput
}
func (*JobStep) ElementType() reflect.Type {
return reflect.TypeOf((**JobStep)(nil)).Elem()
}
func (i *JobStep) ToJobStepOutput() JobStepOutput {
return i.ToJobStepOutputWithContext(context.Background())
}
func (i *JobStep) ToJobStepOutputWithContext(ctx context.Context) JobStepOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobStepOutput)
}
// JobStepArrayInput is an input type that accepts JobStepArray and JobStepArrayOutput values.
// You can construct a concrete instance of `JobStepArrayInput` via:
//
// JobStepArray{ JobStepArgs{...} }
type JobStepArrayInput interface {
pulumi.Input
ToJobStepArrayOutput() JobStepArrayOutput
ToJobStepArrayOutputWithContext(context.Context) JobStepArrayOutput
}
type JobStepArray []JobStepInput
func (JobStepArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobStep)(nil)).Elem()
}
func (i JobStepArray) ToJobStepArrayOutput() JobStepArrayOutput {
return i.ToJobStepArrayOutputWithContext(context.Background())
}
func (i JobStepArray) ToJobStepArrayOutputWithContext(ctx context.Context) JobStepArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobStepArrayOutput)
}
// JobStepMapInput is an input type that accepts JobStepMap and JobStepMapOutput values.
// You can construct a concrete instance of `JobStepMapInput` via:
//
// JobStepMap{ "key": JobStepArgs{...} }
type JobStepMapInput interface {
pulumi.Input
ToJobStepMapOutput() JobStepMapOutput
ToJobStepMapOutputWithContext(context.Context) JobStepMapOutput
}
type JobStepMap map[string]JobStepInput
func (JobStepMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobStep)(nil)).Elem()
}
func (i JobStepMap) ToJobStepMapOutput() JobStepMapOutput {
return i.ToJobStepMapOutputWithContext(context.Background())
}
func (i JobStepMap) ToJobStepMapOutputWithContext(ctx context.Context) JobStepMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobStepMapOutput)
}
type JobStepOutput struct{ *pulumi.OutputState }
func (JobStepOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobStep)(nil)).Elem()
}
func (o JobStepOutput) ToJobStepOutput() JobStepOutput {
return o
}
func (o JobStepOutput) ToJobStepOutputWithContext(ctx context.Context) JobStepOutput {
return o
}
// The initial retry interval in seconds. Defaults to `1`.
func (o JobStepOutput) InitialRetryIntervalSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.IntPtrOutput { return v.InitialRetryIntervalSeconds }).(pulumi.IntPtrOutput)
}
// The ID of the Elastic Job Credential to use when executing this Elastic Job Step. Omit this argument to run the step under the Job Agent's managed identity (user-assigned).
//
// !> **Note:** Once set, `jobCredentialId` cannot be removed. Removing the credential will force a new resource to be created.
func (o JobStepOutput) JobCredentialId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.StringPtrOutput { return v.JobCredentialId }).(pulumi.StringPtrOutput)
}
// The ID of the Elastic Job. Changing this forces a new Elastic Job Step to be created.
func (o JobStepOutput) JobId() pulumi.StringOutput {
return o.ApplyT(func(v *JobStep) pulumi.StringOutput { return v.JobId }).(pulumi.StringOutput)
}
// The index at which to insert this Elastic Job Step into the Elastic Job.
//
// > **Note:** This value must be greater than or equal to 1 and less than or equal to the number of job steps in the Elastic Job.
func (o JobStepOutput) JobStepIndex() pulumi.IntOutput {
return o.ApplyT(func(v *JobStep) pulumi.IntOutput { return v.JobStepIndex }).(pulumi.IntOutput)
}
// The ID of the Elastic Job Target Group.
func (o JobStepOutput) JobTargetGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *JobStep) pulumi.StringOutput { return v.JobTargetGroupId }).(pulumi.StringOutput)
}
// The maximum retry interval in seconds. Defaults to `120`.
//
// > **Note:** `maximumRetryIntervalSeconds` must be greater than `initialRetryIntervalSeconds`.
func (o JobStepOutput) MaximumRetryIntervalSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.IntPtrOutput { return v.MaximumRetryIntervalSeconds }).(pulumi.IntPtrOutput)
}
// The name which should be used for this Elastic Job Step. Changing this forces a new Elastic Job Step to be created.
func (o JobStepOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *JobStep) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An `outputTarget` block as defined below.
func (o JobStepOutput) OutputTarget() JobStepOutputTargetPtrOutput {
return o.ApplyT(func(v *JobStep) JobStepOutputTargetPtrOutput { return v.OutputTarget }).(JobStepOutputTargetPtrOutput)
}
// The number of retry attempts. Defaults to `10`.
func (o JobStepOutput) RetryAttempts() pulumi.IntPtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.IntPtrOutput { return v.RetryAttempts }).(pulumi.IntPtrOutput)
}
// The multiplier for time between retries. Defaults to `2.0`.
func (o JobStepOutput) RetryIntervalBackoffMultiplier() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.Float64PtrOutput { return v.RetryIntervalBackoffMultiplier }).(pulumi.Float64PtrOutput)
}
// The T-SQL script to be executed by this Elastic Job Step.
//
// > **Note:** While Azure places no restrictions on the script provided here, it is recommended to ensure the script is idempotent.
func (o JobStepOutput) SqlScript() pulumi.StringOutput {
return o.ApplyT(func(v *JobStep) pulumi.StringOutput { return v.SqlScript }).(pulumi.StringOutput)
}
// The execution timeout in seconds for this Elastic Job Step. Defaults to `43200`.
func (o JobStepOutput) TimeoutSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *JobStep) pulumi.IntPtrOutput { return v.TimeoutSeconds }).(pulumi.IntPtrOutput)
}
type JobStepArrayOutput struct{ *pulumi.OutputState }
func (JobStepArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobStep)(nil)).Elem()
}
func (o JobStepArrayOutput) ToJobStepArrayOutput() JobStepArrayOutput {
return o
}
func (o JobStepArrayOutput) ToJobStepArrayOutputWithContext(ctx context.Context) JobStepArrayOutput {
return o
}
func (o JobStepArrayOutput) Index(i pulumi.IntInput) JobStepOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobStep {
return vs[0].([]*JobStep)[vs[1].(int)]
}).(JobStepOutput)
}
type JobStepMapOutput struct{ *pulumi.OutputState }
func (JobStepMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobStep)(nil)).Elem()
}
func (o JobStepMapOutput) ToJobStepMapOutput() JobStepMapOutput {
return o
}
func (o JobStepMapOutput) ToJobStepMapOutputWithContext(ctx context.Context) JobStepMapOutput {
return o
}
func (o JobStepMapOutput) MapIndex(k pulumi.StringInput) JobStepOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobStep {
return vs[0].(map[string]*JobStep)[vs[1].(string)]
}).(JobStepOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobStepInput)(nil)).Elem(), &JobStep{})
pulumi.RegisterInputType(reflect.TypeOf((*JobStepArrayInput)(nil)).Elem(), JobStepArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobStepMapInput)(nil)).Elem(), JobStepMap{})
pulumi.RegisterOutputType(JobStepOutput{})
pulumi.RegisterOutputType(JobStepArrayOutput{})
pulumi.RegisterOutputType(JobStepMapOutput{})
}
| 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/mssql/init.go | sdk/go/azure/mssql/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 mssql
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:mssql/database:Database":
r = &Database{}
case "azure:mssql/databaseExtendedAuditingPolicy:DatabaseExtendedAuditingPolicy":
r = &DatabaseExtendedAuditingPolicy{}
case "azure:mssql/databaseVulnerabilityAssessmentRuleBaseline:DatabaseVulnerabilityAssessmentRuleBaseline":
r = &DatabaseVulnerabilityAssessmentRuleBaseline{}
case "azure:mssql/elasticPool:ElasticPool":
r = &ElasticPool{}
case "azure:mssql/failoverGroup:FailoverGroup":
r = &FailoverGroup{}
case "azure:mssql/firewallRule:FirewallRule":
r = &FirewallRule{}
case "azure:mssql/job:Job":
r = &Job{}
case "azure:mssql/jobAgent:JobAgent":
r = &JobAgent{}
case "azure:mssql/jobCredential:JobCredential":
r = &JobCredential{}
case "azure:mssql/jobSchedule:JobSchedule":
r = &JobSchedule{}
case "azure:mssql/jobStep:JobStep":
r = &JobStep{}
case "azure:mssql/jobTargetGroup:JobTargetGroup":
r = &JobTargetGroup{}
case "azure:mssql/managedDatabase:ManagedDatabase":
r = &ManagedDatabase{}
case "azure:mssql/managedInstance:ManagedInstance":
r = &ManagedInstance{}
case "azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator":
r = &ManagedInstanceActiveDirectoryAdministrator{}
case "azure:mssql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup":
r = &ManagedInstanceFailoverGroup{}
case "azure:mssql/managedInstanceSecurityAlertPolicy:ManagedInstanceSecurityAlertPolicy":
r = &ManagedInstanceSecurityAlertPolicy{}
case "azure:mssql/managedInstanceStartStopSchedule:ManagedInstanceStartStopSchedule":
r = &ManagedInstanceStartStopSchedule{}
case "azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption":
r = &ManagedInstanceTransparentDataEncryption{}
case "azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment":
r = &ManagedInstanceVulnerabilityAssessment{}
case "azure:mssql/outboundFirewallRule:OutboundFirewallRule":
r = &OutboundFirewallRule{}
case "azure:mssql/server:Server":
r = &Server{}
case "azure:mssql/serverDnsAlias:ServerDnsAlias":
r = &ServerDnsAlias{}
case "azure:mssql/serverExtendedAuditingPolicy:ServerExtendedAuditingPolicy":
r = &ServerExtendedAuditingPolicy{}
case "azure:mssql/serverMicrosoftSupportAuditingPolicy:ServerMicrosoftSupportAuditingPolicy":
r = &ServerMicrosoftSupportAuditingPolicy{}
case "azure:mssql/serverSecurityAlertPolicy:ServerSecurityAlertPolicy":
r = &ServerSecurityAlertPolicy{}
case "azure:mssql/serverTransparentDataEncryption:ServerTransparentDataEncryption":
r = &ServerTransparentDataEncryption{}
case "azure:mssql/serverVulnerabilityAssessment:ServerVulnerabilityAssessment":
r = &ServerVulnerabilityAssessment{}
case "azure:mssql/virtualMachine:VirtualMachine":
r = &VirtualMachine{}
case "azure:mssql/virtualMachineAvailabilityGroupListener:VirtualMachineAvailabilityGroupListener":
r = &VirtualMachineAvailabilityGroupListener{}
case "azure:mssql/virtualMachineGroup:VirtualMachineGroup":
r = &VirtualMachineGroup{}
case "azure:mssql/virtualNetworkRule:VirtualNetworkRule":
r = &VirtualNetworkRule{}
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",
"mssql/database",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/databaseExtendedAuditingPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/databaseVulnerabilityAssessmentRuleBaseline",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/elasticPool",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/failoverGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/firewallRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/job",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/jobAgent",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/jobCredential",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/jobSchedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/jobStep",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/jobTargetGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedDatabase",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstance",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceActiveDirectoryAdministrator",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceFailoverGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceSecurityAlertPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceStartStopSchedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceTransparentDataEncryption",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/managedInstanceVulnerabilityAssessment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/outboundFirewallRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/server",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverDnsAlias",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverExtendedAuditingPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverMicrosoftSupportAuditingPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverSecurityAlertPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverTransparentDataEncryption",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/serverVulnerabilityAssessment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/virtualMachine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/virtualMachineAvailabilityGroupListener",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/virtualMachineGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"mssql/virtualNetworkRule",
&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/mssql/jobTargetGroup.go | sdk/go/azure/mssql/jobTargetGroup.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Job Target Group.
//
// ## 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/mssql"
// "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("westeurope"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// exampleJobAgent, err := mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.ID(),
// })
// if err != nil {
// return err
// }
// exampleJobCredential, err := mssql.NewJobCredential(ctx, "example", &mssql.JobCredentialArgs{
// Name: pulumi.String("example-job-credential"),
// JobAgentId: exampleJobAgent.ID(),
// Username: pulumi.String("testusername"),
// Password: pulumi.String("testpassword"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobTargetGroup(ctx, "example", &mssql.JobTargetGroupArgs{
// Name: pulumi.String("example-target-group"),
// JobAgentId: exampleJobAgent.ID(),
// JobTargets: mssql.JobTargetGroupJobTargetArray{
// &mssql.JobTargetGroupJobTargetArgs{
// ServerName: exampleServer.Name,
// JobCredentialId: exampleJobCredential.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Job Target Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/jobTargetGroup:JobTargetGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/targetGroups/mytargetgroup1
// ```
type JobTargetGroup struct {
pulumi.CustomResourceState
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
JobAgentId pulumi.StringOutput `pulumi:"jobAgentId"`
// One or more `jobTarget` blocks as defined below.
JobTargets JobTargetGroupJobTargetArrayOutput `pulumi:"jobTargets"`
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewJobTargetGroup registers a new resource with the given unique name, arguments, and options.
func NewJobTargetGroup(ctx *pulumi.Context,
name string, args *JobTargetGroupArgs, opts ...pulumi.ResourceOption) (*JobTargetGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.JobAgentId == nil {
return nil, errors.New("invalid value for required argument 'JobAgentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobTargetGroup
err := ctx.RegisterResource("azure:mssql/jobTargetGroup:JobTargetGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobTargetGroup gets an existing JobTargetGroup 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 GetJobTargetGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobTargetGroupState, opts ...pulumi.ResourceOption) (*JobTargetGroup, error) {
var resource JobTargetGroup
err := ctx.ReadResource("azure:mssql/jobTargetGroup:JobTargetGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobTargetGroup resources.
type jobTargetGroupState struct {
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
JobAgentId *string `pulumi:"jobAgentId"`
// One or more `jobTarget` blocks as defined below.
JobTargets []JobTargetGroupJobTarget `pulumi:"jobTargets"`
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
Name *string `pulumi:"name"`
}
type JobTargetGroupState struct {
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
JobAgentId pulumi.StringPtrInput
// One or more `jobTarget` blocks as defined below.
JobTargets JobTargetGroupJobTargetArrayInput
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
Name pulumi.StringPtrInput
}
func (JobTargetGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*jobTargetGroupState)(nil)).Elem()
}
type jobTargetGroupArgs struct {
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
JobAgentId string `pulumi:"jobAgentId"`
// One or more `jobTarget` blocks as defined below.
JobTargets []JobTargetGroupJobTarget `pulumi:"jobTargets"`
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a JobTargetGroup resource.
type JobTargetGroupArgs struct {
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
JobAgentId pulumi.StringInput
// One or more `jobTarget` blocks as defined below.
JobTargets JobTargetGroupJobTargetArrayInput
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
Name pulumi.StringPtrInput
}
func (JobTargetGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobTargetGroupArgs)(nil)).Elem()
}
type JobTargetGroupInput interface {
pulumi.Input
ToJobTargetGroupOutput() JobTargetGroupOutput
ToJobTargetGroupOutputWithContext(ctx context.Context) JobTargetGroupOutput
}
func (*JobTargetGroup) ElementType() reflect.Type {
return reflect.TypeOf((**JobTargetGroup)(nil)).Elem()
}
func (i *JobTargetGroup) ToJobTargetGroupOutput() JobTargetGroupOutput {
return i.ToJobTargetGroupOutputWithContext(context.Background())
}
func (i *JobTargetGroup) ToJobTargetGroupOutputWithContext(ctx context.Context) JobTargetGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobTargetGroupOutput)
}
// JobTargetGroupArrayInput is an input type that accepts JobTargetGroupArray and JobTargetGroupArrayOutput values.
// You can construct a concrete instance of `JobTargetGroupArrayInput` via:
//
// JobTargetGroupArray{ JobTargetGroupArgs{...} }
type JobTargetGroupArrayInput interface {
pulumi.Input
ToJobTargetGroupArrayOutput() JobTargetGroupArrayOutput
ToJobTargetGroupArrayOutputWithContext(context.Context) JobTargetGroupArrayOutput
}
type JobTargetGroupArray []JobTargetGroupInput
func (JobTargetGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobTargetGroup)(nil)).Elem()
}
func (i JobTargetGroupArray) ToJobTargetGroupArrayOutput() JobTargetGroupArrayOutput {
return i.ToJobTargetGroupArrayOutputWithContext(context.Background())
}
func (i JobTargetGroupArray) ToJobTargetGroupArrayOutputWithContext(ctx context.Context) JobTargetGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobTargetGroupArrayOutput)
}
// JobTargetGroupMapInput is an input type that accepts JobTargetGroupMap and JobTargetGroupMapOutput values.
// You can construct a concrete instance of `JobTargetGroupMapInput` via:
//
// JobTargetGroupMap{ "key": JobTargetGroupArgs{...} }
type JobTargetGroupMapInput interface {
pulumi.Input
ToJobTargetGroupMapOutput() JobTargetGroupMapOutput
ToJobTargetGroupMapOutputWithContext(context.Context) JobTargetGroupMapOutput
}
type JobTargetGroupMap map[string]JobTargetGroupInput
func (JobTargetGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobTargetGroup)(nil)).Elem()
}
func (i JobTargetGroupMap) ToJobTargetGroupMapOutput() JobTargetGroupMapOutput {
return i.ToJobTargetGroupMapOutputWithContext(context.Background())
}
func (i JobTargetGroupMap) ToJobTargetGroupMapOutputWithContext(ctx context.Context) JobTargetGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobTargetGroupMapOutput)
}
type JobTargetGroupOutput struct{ *pulumi.OutputState }
func (JobTargetGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobTargetGroup)(nil)).Elem()
}
func (o JobTargetGroupOutput) ToJobTargetGroupOutput() JobTargetGroupOutput {
return o
}
func (o JobTargetGroupOutput) ToJobTargetGroupOutputWithContext(ctx context.Context) JobTargetGroupOutput {
return o
}
// The ID of the Elastic Job Agent. Changing this forces a new Job Target Group to be created.
func (o JobTargetGroupOutput) JobAgentId() pulumi.StringOutput {
return o.ApplyT(func(v *JobTargetGroup) pulumi.StringOutput { return v.JobAgentId }).(pulumi.StringOutput)
}
// One or more `jobTarget` blocks as defined below.
func (o JobTargetGroupOutput) JobTargets() JobTargetGroupJobTargetArrayOutput {
return o.ApplyT(func(v *JobTargetGroup) JobTargetGroupJobTargetArrayOutput { return v.JobTargets }).(JobTargetGroupJobTargetArrayOutput)
}
// The name which should be used for this Job Target Group. Changing this forces a new Job Target Group to be created.
func (o JobTargetGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *JobTargetGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type JobTargetGroupArrayOutput struct{ *pulumi.OutputState }
func (JobTargetGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobTargetGroup)(nil)).Elem()
}
func (o JobTargetGroupArrayOutput) ToJobTargetGroupArrayOutput() JobTargetGroupArrayOutput {
return o
}
func (o JobTargetGroupArrayOutput) ToJobTargetGroupArrayOutputWithContext(ctx context.Context) JobTargetGroupArrayOutput {
return o
}
func (o JobTargetGroupArrayOutput) Index(i pulumi.IntInput) JobTargetGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobTargetGroup {
return vs[0].([]*JobTargetGroup)[vs[1].(int)]
}).(JobTargetGroupOutput)
}
type JobTargetGroupMapOutput struct{ *pulumi.OutputState }
func (JobTargetGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobTargetGroup)(nil)).Elem()
}
func (o JobTargetGroupMapOutput) ToJobTargetGroupMapOutput() JobTargetGroupMapOutput {
return o
}
func (o JobTargetGroupMapOutput) ToJobTargetGroupMapOutputWithContext(ctx context.Context) JobTargetGroupMapOutput {
return o
}
func (o JobTargetGroupMapOutput) MapIndex(k pulumi.StringInput) JobTargetGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobTargetGroup {
return vs[0].(map[string]*JobTargetGroup)[vs[1].(string)]
}).(JobTargetGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobTargetGroupInput)(nil)).Elem(), &JobTargetGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*JobTargetGroupArrayInput)(nil)).Elem(), JobTargetGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobTargetGroupMapInput)(nil)).Elem(), JobTargetGroupMap{})
pulumi.RegisterOutputType(JobTargetGroupOutput{})
pulumi.RegisterOutputType(JobTargetGroupArrayOutput{})
pulumi.RegisterOutputType(JobTargetGroupMapOutput{})
}
| 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/mssql/pulumiTypes.go | sdk/go/azure/mssql/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 mssql
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 DatabaseIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Database.
IdentityIds []string `pulumi:"identityIds"`
// Specifies the type of Managed Service Identity that should be configured on this SQL Database. Possible value is `UserAssigned`.
Type string `pulumi:"type"`
}
// DatabaseIdentityInput is an input type that accepts DatabaseIdentityArgs and DatabaseIdentityOutput values.
// You can construct a concrete instance of `DatabaseIdentityInput` via:
//
// DatabaseIdentityArgs{...}
type DatabaseIdentityInput interface {
pulumi.Input
ToDatabaseIdentityOutput() DatabaseIdentityOutput
ToDatabaseIdentityOutputWithContext(context.Context) DatabaseIdentityOutput
}
type DatabaseIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Database.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// Specifies the type of Managed Service Identity that should be configured on this SQL Database. Possible value is `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (DatabaseIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseIdentity)(nil)).Elem()
}
func (i DatabaseIdentityArgs) ToDatabaseIdentityOutput() DatabaseIdentityOutput {
return i.ToDatabaseIdentityOutputWithContext(context.Background())
}
func (i DatabaseIdentityArgs) ToDatabaseIdentityOutputWithContext(ctx context.Context) DatabaseIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseIdentityOutput)
}
func (i DatabaseIdentityArgs) ToDatabaseIdentityPtrOutput() DatabaseIdentityPtrOutput {
return i.ToDatabaseIdentityPtrOutputWithContext(context.Background())
}
func (i DatabaseIdentityArgs) ToDatabaseIdentityPtrOutputWithContext(ctx context.Context) DatabaseIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseIdentityOutput).ToDatabaseIdentityPtrOutputWithContext(ctx)
}
// DatabaseIdentityPtrInput is an input type that accepts DatabaseIdentityArgs, DatabaseIdentityPtr and DatabaseIdentityPtrOutput values.
// You can construct a concrete instance of `DatabaseIdentityPtrInput` via:
//
// DatabaseIdentityArgs{...}
//
// or:
//
// nil
type DatabaseIdentityPtrInput interface {
pulumi.Input
ToDatabaseIdentityPtrOutput() DatabaseIdentityPtrOutput
ToDatabaseIdentityPtrOutputWithContext(context.Context) DatabaseIdentityPtrOutput
}
type databaseIdentityPtrType DatabaseIdentityArgs
func DatabaseIdentityPtr(v *DatabaseIdentityArgs) DatabaseIdentityPtrInput {
return (*databaseIdentityPtrType)(v)
}
func (*databaseIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseIdentity)(nil)).Elem()
}
func (i *databaseIdentityPtrType) ToDatabaseIdentityPtrOutput() DatabaseIdentityPtrOutput {
return i.ToDatabaseIdentityPtrOutputWithContext(context.Background())
}
func (i *databaseIdentityPtrType) ToDatabaseIdentityPtrOutputWithContext(ctx context.Context) DatabaseIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseIdentityPtrOutput)
}
type DatabaseIdentityOutput struct{ *pulumi.OutputState }
func (DatabaseIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseIdentity)(nil)).Elem()
}
func (o DatabaseIdentityOutput) ToDatabaseIdentityOutput() DatabaseIdentityOutput {
return o
}
func (o DatabaseIdentityOutput) ToDatabaseIdentityOutputWithContext(ctx context.Context) DatabaseIdentityOutput {
return o
}
func (o DatabaseIdentityOutput) ToDatabaseIdentityPtrOutput() DatabaseIdentityPtrOutput {
return o.ToDatabaseIdentityPtrOutputWithContext(context.Background())
}
func (o DatabaseIdentityOutput) ToDatabaseIdentityPtrOutputWithContext(ctx context.Context) DatabaseIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DatabaseIdentity) *DatabaseIdentity {
return &v
}).(DatabaseIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Database.
func (o DatabaseIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v DatabaseIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this SQL Database. Possible value is `UserAssigned`.
func (o DatabaseIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type DatabaseIdentityPtrOutput struct{ *pulumi.OutputState }
func (DatabaseIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseIdentity)(nil)).Elem()
}
func (o DatabaseIdentityPtrOutput) ToDatabaseIdentityPtrOutput() DatabaseIdentityPtrOutput {
return o
}
func (o DatabaseIdentityPtrOutput) ToDatabaseIdentityPtrOutputWithContext(ctx context.Context) DatabaseIdentityPtrOutput {
return o
}
func (o DatabaseIdentityPtrOutput) Elem() DatabaseIdentityOutput {
return o.ApplyT(func(v *DatabaseIdentity) DatabaseIdentity {
if v != nil {
return *v
}
var ret DatabaseIdentity
return ret
}).(DatabaseIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Database.
func (o DatabaseIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DatabaseIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this SQL Database. Possible value is `UserAssigned`.
func (o DatabaseIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type DatabaseImport struct {
// Specifies the name of the SQL administrator.
AdministratorLogin string `pulumi:"administratorLogin"`
// Specifies the password of the SQL administrator.
AdministratorLoginPassword string `pulumi:"administratorLoginPassword"`
// Specifies the type of authentication used to access the server. Valid values are `SQL` or `ADPassword`.
AuthenticationType string `pulumi:"authenticationType"`
// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storageUri parameter.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the access key for the storage account.
StorageKey string `pulumi:"storageKey"`
// Specifies the type of access key for the storage account. Valid values are `StorageAccessKey` or `SharedAccessKey`.
StorageKeyType string `pulumi:"storageKeyType"`
// Specifies the blob URI of the .bacpac file.
StorageUri string `pulumi:"storageUri"`
}
// DatabaseImportInput is an input type that accepts DatabaseImportArgs and DatabaseImportOutput values.
// You can construct a concrete instance of `DatabaseImportInput` via:
//
// DatabaseImportArgs{...}
type DatabaseImportInput interface {
pulumi.Input
ToDatabaseImportOutput() DatabaseImportOutput
ToDatabaseImportOutputWithContext(context.Context) DatabaseImportOutput
}
type DatabaseImportArgs struct {
// Specifies the name of the SQL administrator.
AdministratorLogin pulumi.StringInput `pulumi:"administratorLogin"`
// Specifies the password of the SQL administrator.
AdministratorLoginPassword pulumi.StringInput `pulumi:"administratorLoginPassword"`
// Specifies the type of authentication used to access the server. Valid values are `SQL` or `ADPassword`.
AuthenticationType pulumi.StringInput `pulumi:"authenticationType"`
// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storageUri parameter.
StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"`
// Specifies the access key for the storage account.
StorageKey pulumi.StringInput `pulumi:"storageKey"`
// Specifies the type of access key for the storage account. Valid values are `StorageAccessKey` or `SharedAccessKey`.
StorageKeyType pulumi.StringInput `pulumi:"storageKeyType"`
// Specifies the blob URI of the .bacpac file.
StorageUri pulumi.StringInput `pulumi:"storageUri"`
}
func (DatabaseImportArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseImport)(nil)).Elem()
}
func (i DatabaseImportArgs) ToDatabaseImportOutput() DatabaseImportOutput {
return i.ToDatabaseImportOutputWithContext(context.Background())
}
func (i DatabaseImportArgs) ToDatabaseImportOutputWithContext(ctx context.Context) DatabaseImportOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseImportOutput)
}
func (i DatabaseImportArgs) ToDatabaseImportPtrOutput() DatabaseImportPtrOutput {
return i.ToDatabaseImportPtrOutputWithContext(context.Background())
}
func (i DatabaseImportArgs) ToDatabaseImportPtrOutputWithContext(ctx context.Context) DatabaseImportPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseImportOutput).ToDatabaseImportPtrOutputWithContext(ctx)
}
// DatabaseImportPtrInput is an input type that accepts DatabaseImportArgs, DatabaseImportPtr and DatabaseImportPtrOutput values.
// You can construct a concrete instance of `DatabaseImportPtrInput` via:
//
// DatabaseImportArgs{...}
//
// or:
//
// nil
type DatabaseImportPtrInput interface {
pulumi.Input
ToDatabaseImportPtrOutput() DatabaseImportPtrOutput
ToDatabaseImportPtrOutputWithContext(context.Context) DatabaseImportPtrOutput
}
type databaseImportPtrType DatabaseImportArgs
func DatabaseImportPtr(v *DatabaseImportArgs) DatabaseImportPtrInput {
return (*databaseImportPtrType)(v)
}
func (*databaseImportPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseImport)(nil)).Elem()
}
func (i *databaseImportPtrType) ToDatabaseImportPtrOutput() DatabaseImportPtrOutput {
return i.ToDatabaseImportPtrOutputWithContext(context.Background())
}
func (i *databaseImportPtrType) ToDatabaseImportPtrOutputWithContext(ctx context.Context) DatabaseImportPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseImportPtrOutput)
}
type DatabaseImportOutput struct{ *pulumi.OutputState }
func (DatabaseImportOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseImport)(nil)).Elem()
}
func (o DatabaseImportOutput) ToDatabaseImportOutput() DatabaseImportOutput {
return o
}
func (o DatabaseImportOutput) ToDatabaseImportOutputWithContext(ctx context.Context) DatabaseImportOutput {
return o
}
func (o DatabaseImportOutput) ToDatabaseImportPtrOutput() DatabaseImportPtrOutput {
return o.ToDatabaseImportPtrOutputWithContext(context.Background())
}
func (o DatabaseImportOutput) ToDatabaseImportPtrOutputWithContext(ctx context.Context) DatabaseImportPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DatabaseImport) *DatabaseImport {
return &v
}).(DatabaseImportPtrOutput)
}
// Specifies the name of the SQL administrator.
func (o DatabaseImportOutput) AdministratorLogin() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.AdministratorLogin }).(pulumi.StringOutput)
}
// Specifies the password of the SQL administrator.
func (o DatabaseImportOutput) AdministratorLoginPassword() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.AdministratorLoginPassword }).(pulumi.StringOutput)
}
// Specifies the type of authentication used to access the server. Valid values are `SQL` or `ADPassword`.
func (o DatabaseImportOutput) AuthenticationType() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.AuthenticationType }).(pulumi.StringOutput)
}
// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storageUri parameter.
func (o DatabaseImportOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v DatabaseImport) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// Specifies the access key for the storage account.
func (o DatabaseImportOutput) StorageKey() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.StorageKey }).(pulumi.StringOutput)
}
// Specifies the type of access key for the storage account. Valid values are `StorageAccessKey` or `SharedAccessKey`.
func (o DatabaseImportOutput) StorageKeyType() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.StorageKeyType }).(pulumi.StringOutput)
}
// Specifies the blob URI of the .bacpac file.
func (o DatabaseImportOutput) StorageUri() pulumi.StringOutput {
return o.ApplyT(func(v DatabaseImport) string { return v.StorageUri }).(pulumi.StringOutput)
}
type DatabaseImportPtrOutput struct{ *pulumi.OutputState }
func (DatabaseImportPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseImport)(nil)).Elem()
}
func (o DatabaseImportPtrOutput) ToDatabaseImportPtrOutput() DatabaseImportPtrOutput {
return o
}
func (o DatabaseImportPtrOutput) ToDatabaseImportPtrOutputWithContext(ctx context.Context) DatabaseImportPtrOutput {
return o
}
func (o DatabaseImportPtrOutput) Elem() DatabaseImportOutput {
return o.ApplyT(func(v *DatabaseImport) DatabaseImport {
if v != nil {
return *v
}
var ret DatabaseImport
return ret
}).(DatabaseImportOutput)
}
// Specifies the name of the SQL administrator.
func (o DatabaseImportPtrOutput) AdministratorLogin() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.AdministratorLogin
}).(pulumi.StringPtrOutput)
}
// Specifies the password of the SQL administrator.
func (o DatabaseImportPtrOutput) AdministratorLoginPassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.AdministratorLoginPassword
}).(pulumi.StringPtrOutput)
}
// Specifies the type of authentication used to access the server. Valid values are `SQL` or `ADPassword`.
func (o DatabaseImportPtrOutput) AuthenticationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.AuthenticationType
}).(pulumi.StringPtrOutput)
}
// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storageUri parameter.
func (o DatabaseImportPtrOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return v.StorageAccountId
}).(pulumi.StringPtrOutput)
}
// Specifies the access key for the storage account.
func (o DatabaseImportPtrOutput) StorageKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.StorageKey
}).(pulumi.StringPtrOutput)
}
// Specifies the type of access key for the storage account. Valid values are `StorageAccessKey` or `SharedAccessKey`.
func (o DatabaseImportPtrOutput) StorageKeyType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.StorageKeyType
}).(pulumi.StringPtrOutput)
}
// Specifies the blob URI of the .bacpac file.
func (o DatabaseImportPtrOutput) StorageUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseImport) *string {
if v == nil {
return nil
}
return &v.StorageUri
}).(pulumi.StringPtrOutput)
}
type DatabaseLongTermRetentionPolicy struct {
// Specifies if the backups are immutable. Defaults to `false`.
ImmutableBackupsEnabled *bool `pulumi:"immutableBackupsEnabled"`
// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. Defaults to `PT0S`.
MonthlyRetention *string `pulumi:"monthlyRetention"`
// The week of year to take the yearly backup. Value has to be between `1` and `52`.
WeekOfYear *int `pulumi:"weekOfYear"`
// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. Defaults to `PT0S`.
WeeklyRetention *string `pulumi:"weeklyRetention"`
// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. Defaults to `PT0S`.
YearlyRetention *string `pulumi:"yearlyRetention"`
}
// DatabaseLongTermRetentionPolicyInput is an input type that accepts DatabaseLongTermRetentionPolicyArgs and DatabaseLongTermRetentionPolicyOutput values.
// You can construct a concrete instance of `DatabaseLongTermRetentionPolicyInput` via:
//
// DatabaseLongTermRetentionPolicyArgs{...}
type DatabaseLongTermRetentionPolicyInput interface {
pulumi.Input
ToDatabaseLongTermRetentionPolicyOutput() DatabaseLongTermRetentionPolicyOutput
ToDatabaseLongTermRetentionPolicyOutputWithContext(context.Context) DatabaseLongTermRetentionPolicyOutput
}
type DatabaseLongTermRetentionPolicyArgs struct {
// Specifies if the backups are immutable. Defaults to `false`.
ImmutableBackupsEnabled pulumi.BoolPtrInput `pulumi:"immutableBackupsEnabled"`
// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. Defaults to `PT0S`.
MonthlyRetention pulumi.StringPtrInput `pulumi:"monthlyRetention"`
// The week of year to take the yearly backup. Value has to be between `1` and `52`.
WeekOfYear pulumi.IntPtrInput `pulumi:"weekOfYear"`
// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. Defaults to `PT0S`.
WeeklyRetention pulumi.StringPtrInput `pulumi:"weeklyRetention"`
// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. Defaults to `PT0S`.
YearlyRetention pulumi.StringPtrInput `pulumi:"yearlyRetention"`
}
func (DatabaseLongTermRetentionPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseLongTermRetentionPolicy)(nil)).Elem()
}
func (i DatabaseLongTermRetentionPolicyArgs) ToDatabaseLongTermRetentionPolicyOutput() DatabaseLongTermRetentionPolicyOutput {
return i.ToDatabaseLongTermRetentionPolicyOutputWithContext(context.Background())
}
func (i DatabaseLongTermRetentionPolicyArgs) ToDatabaseLongTermRetentionPolicyOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseLongTermRetentionPolicyOutput)
}
func (i DatabaseLongTermRetentionPolicyArgs) ToDatabaseLongTermRetentionPolicyPtrOutput() DatabaseLongTermRetentionPolicyPtrOutput {
return i.ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (i DatabaseLongTermRetentionPolicyArgs) ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseLongTermRetentionPolicyOutput).ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(ctx)
}
// DatabaseLongTermRetentionPolicyPtrInput is an input type that accepts DatabaseLongTermRetentionPolicyArgs, DatabaseLongTermRetentionPolicyPtr and DatabaseLongTermRetentionPolicyPtrOutput values.
// You can construct a concrete instance of `DatabaseLongTermRetentionPolicyPtrInput` via:
//
// DatabaseLongTermRetentionPolicyArgs{...}
//
// or:
//
// nil
type DatabaseLongTermRetentionPolicyPtrInput interface {
pulumi.Input
ToDatabaseLongTermRetentionPolicyPtrOutput() DatabaseLongTermRetentionPolicyPtrOutput
ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(context.Context) DatabaseLongTermRetentionPolicyPtrOutput
}
type databaseLongTermRetentionPolicyPtrType DatabaseLongTermRetentionPolicyArgs
func DatabaseLongTermRetentionPolicyPtr(v *DatabaseLongTermRetentionPolicyArgs) DatabaseLongTermRetentionPolicyPtrInput {
return (*databaseLongTermRetentionPolicyPtrType)(v)
}
func (*databaseLongTermRetentionPolicyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseLongTermRetentionPolicy)(nil)).Elem()
}
func (i *databaseLongTermRetentionPolicyPtrType) ToDatabaseLongTermRetentionPolicyPtrOutput() DatabaseLongTermRetentionPolicyPtrOutput {
return i.ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (i *databaseLongTermRetentionPolicyPtrType) ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseLongTermRetentionPolicyPtrOutput)
}
type DatabaseLongTermRetentionPolicyOutput struct{ *pulumi.OutputState }
func (DatabaseLongTermRetentionPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseLongTermRetentionPolicy)(nil)).Elem()
}
func (o DatabaseLongTermRetentionPolicyOutput) ToDatabaseLongTermRetentionPolicyOutput() DatabaseLongTermRetentionPolicyOutput {
return o
}
func (o DatabaseLongTermRetentionPolicyOutput) ToDatabaseLongTermRetentionPolicyOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyOutput {
return o
}
func (o DatabaseLongTermRetentionPolicyOutput) ToDatabaseLongTermRetentionPolicyPtrOutput() DatabaseLongTermRetentionPolicyPtrOutput {
return o.ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (o DatabaseLongTermRetentionPolicyOutput) ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DatabaseLongTermRetentionPolicy) *DatabaseLongTermRetentionPolicy {
return &v
}).(DatabaseLongTermRetentionPolicyPtrOutput)
}
// Specifies if the backups are immutable. Defaults to `false`.
func (o DatabaseLongTermRetentionPolicyOutput) ImmutableBackupsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v DatabaseLongTermRetentionPolicy) *bool { return v.ImmutableBackupsEnabled }).(pulumi.BoolPtrOutput)
}
// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyOutput) MonthlyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v DatabaseLongTermRetentionPolicy) *string { return v.MonthlyRetention }).(pulumi.StringPtrOutput)
}
// The week of year to take the yearly backup. Value has to be between `1` and `52`.
func (o DatabaseLongTermRetentionPolicyOutput) WeekOfYear() pulumi.IntPtrOutput {
return o.ApplyT(func(v DatabaseLongTermRetentionPolicy) *int { return v.WeekOfYear }).(pulumi.IntPtrOutput)
}
// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyOutput) WeeklyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v DatabaseLongTermRetentionPolicy) *string { return v.WeeklyRetention }).(pulumi.StringPtrOutput)
}
// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyOutput) YearlyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v DatabaseLongTermRetentionPolicy) *string { return v.YearlyRetention }).(pulumi.StringPtrOutput)
}
type DatabaseLongTermRetentionPolicyPtrOutput struct{ *pulumi.OutputState }
func (DatabaseLongTermRetentionPolicyPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseLongTermRetentionPolicy)(nil)).Elem()
}
func (o DatabaseLongTermRetentionPolicyPtrOutput) ToDatabaseLongTermRetentionPolicyPtrOutput() DatabaseLongTermRetentionPolicyPtrOutput {
return o
}
func (o DatabaseLongTermRetentionPolicyPtrOutput) ToDatabaseLongTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseLongTermRetentionPolicyPtrOutput {
return o
}
func (o DatabaseLongTermRetentionPolicyPtrOutput) Elem() DatabaseLongTermRetentionPolicyOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) DatabaseLongTermRetentionPolicy {
if v != nil {
return *v
}
var ret DatabaseLongTermRetentionPolicy
return ret
}).(DatabaseLongTermRetentionPolicyOutput)
}
// Specifies if the backups are immutable. Defaults to `false`.
func (o DatabaseLongTermRetentionPolicyPtrOutput) ImmutableBackupsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) *bool {
if v == nil {
return nil
}
return v.ImmutableBackupsEnabled
}).(pulumi.BoolPtrOutput)
}
// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyPtrOutput) MonthlyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) *string {
if v == nil {
return nil
}
return v.MonthlyRetention
}).(pulumi.StringPtrOutput)
}
// The week of year to take the yearly backup. Value has to be between `1` and `52`.
func (o DatabaseLongTermRetentionPolicyPtrOutput) WeekOfYear() pulumi.IntPtrOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) *int {
if v == nil {
return nil
}
return v.WeekOfYear
}).(pulumi.IntPtrOutput)
}
// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyPtrOutput) WeeklyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) *string {
if v == nil {
return nil
}
return v.WeeklyRetention
}).(pulumi.StringPtrOutput)
}
// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. Defaults to `PT0S`.
func (o DatabaseLongTermRetentionPolicyPtrOutput) YearlyRetention() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseLongTermRetentionPolicy) *string {
if v == nil {
return nil
}
return v.YearlyRetention
}).(pulumi.StringPtrOutput)
}
type DatabaseShortTermRetentionPolicy struct {
// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
BackupIntervalInHours *int `pulumi:"backupIntervalInHours"`
// Point In Time Restore configuration. Value has to be between `1` and `35`.
RetentionDays int `pulumi:"retentionDays"`
}
// DatabaseShortTermRetentionPolicyInput is an input type that accepts DatabaseShortTermRetentionPolicyArgs and DatabaseShortTermRetentionPolicyOutput values.
// You can construct a concrete instance of `DatabaseShortTermRetentionPolicyInput` via:
//
// DatabaseShortTermRetentionPolicyArgs{...}
type DatabaseShortTermRetentionPolicyInput interface {
pulumi.Input
ToDatabaseShortTermRetentionPolicyOutput() DatabaseShortTermRetentionPolicyOutput
ToDatabaseShortTermRetentionPolicyOutputWithContext(context.Context) DatabaseShortTermRetentionPolicyOutput
}
type DatabaseShortTermRetentionPolicyArgs struct {
// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
BackupIntervalInHours pulumi.IntPtrInput `pulumi:"backupIntervalInHours"`
// Point In Time Restore configuration. Value has to be between `1` and `35`.
RetentionDays pulumi.IntInput `pulumi:"retentionDays"`
}
func (DatabaseShortTermRetentionPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseShortTermRetentionPolicy)(nil)).Elem()
}
func (i DatabaseShortTermRetentionPolicyArgs) ToDatabaseShortTermRetentionPolicyOutput() DatabaseShortTermRetentionPolicyOutput {
return i.ToDatabaseShortTermRetentionPolicyOutputWithContext(context.Background())
}
func (i DatabaseShortTermRetentionPolicyArgs) ToDatabaseShortTermRetentionPolicyOutputWithContext(ctx context.Context) DatabaseShortTermRetentionPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseShortTermRetentionPolicyOutput)
}
func (i DatabaseShortTermRetentionPolicyArgs) ToDatabaseShortTermRetentionPolicyPtrOutput() DatabaseShortTermRetentionPolicyPtrOutput {
return i.ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (i DatabaseShortTermRetentionPolicyArgs) ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseShortTermRetentionPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseShortTermRetentionPolicyOutput).ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(ctx)
}
// DatabaseShortTermRetentionPolicyPtrInput is an input type that accepts DatabaseShortTermRetentionPolicyArgs, DatabaseShortTermRetentionPolicyPtr and DatabaseShortTermRetentionPolicyPtrOutput values.
// You can construct a concrete instance of `DatabaseShortTermRetentionPolicyPtrInput` via:
//
// DatabaseShortTermRetentionPolicyArgs{...}
//
// or:
//
// nil
type DatabaseShortTermRetentionPolicyPtrInput interface {
pulumi.Input
ToDatabaseShortTermRetentionPolicyPtrOutput() DatabaseShortTermRetentionPolicyPtrOutput
ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(context.Context) DatabaseShortTermRetentionPolicyPtrOutput
}
type databaseShortTermRetentionPolicyPtrType DatabaseShortTermRetentionPolicyArgs
func DatabaseShortTermRetentionPolicyPtr(v *DatabaseShortTermRetentionPolicyArgs) DatabaseShortTermRetentionPolicyPtrInput {
return (*databaseShortTermRetentionPolicyPtrType)(v)
}
func (*databaseShortTermRetentionPolicyPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseShortTermRetentionPolicy)(nil)).Elem()
}
func (i *databaseShortTermRetentionPolicyPtrType) ToDatabaseShortTermRetentionPolicyPtrOutput() DatabaseShortTermRetentionPolicyPtrOutput {
return i.ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (i *databaseShortTermRetentionPolicyPtrType) ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseShortTermRetentionPolicyPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseShortTermRetentionPolicyPtrOutput)
}
type DatabaseShortTermRetentionPolicyOutput struct{ *pulumi.OutputState }
func (DatabaseShortTermRetentionPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DatabaseShortTermRetentionPolicy)(nil)).Elem()
}
func (o DatabaseShortTermRetentionPolicyOutput) ToDatabaseShortTermRetentionPolicyOutput() DatabaseShortTermRetentionPolicyOutput {
return o
}
func (o DatabaseShortTermRetentionPolicyOutput) ToDatabaseShortTermRetentionPolicyOutputWithContext(ctx context.Context) DatabaseShortTermRetentionPolicyOutput {
return o
}
func (o DatabaseShortTermRetentionPolicyOutput) ToDatabaseShortTermRetentionPolicyPtrOutput() DatabaseShortTermRetentionPolicyPtrOutput {
return o.ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(context.Background())
}
func (o DatabaseShortTermRetentionPolicyOutput) ToDatabaseShortTermRetentionPolicyPtrOutputWithContext(ctx context.Context) DatabaseShortTermRetentionPolicyPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DatabaseShortTermRetentionPolicy) *DatabaseShortTermRetentionPolicy {
return &v
}).(DatabaseShortTermRetentionPolicyPtrOutput)
}
// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be `12` or `24`. Defaults to `12` hours.
func (o DatabaseShortTermRetentionPolicyOutput) BackupIntervalInHours() pulumi.IntPtrOutput {
return o.ApplyT(func(v DatabaseShortTermRetentionPolicy) *int { return v.BackupIntervalInHours }).(pulumi.IntPtrOutput)
}
// Point In Time Restore configuration. Value has to be between `1` and `35`.
func (o DatabaseShortTermRetentionPolicyOutput) RetentionDays() pulumi.IntOutput {
| 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/mssql/job.go | sdk/go/azure/mssql/job.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Elastic Job.
//
// ## 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/mssql"
// "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-resource-group"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// exampleJobAgent, err := mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.ID(),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobCredential(ctx, "example", &mssql.JobCredentialArgs{
// Name: pulumi.String("example-job-credential"),
// JobAgentId: exampleJobAgent.ID(),
// Username: pulumi.String("my-username"),
// Password: pulumi.String("MyP4ssw0rd!!!"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJob(ctx, "example", &mssql.JobArgs{
// Name: pulumi.String("example-job"),
// JobAgentId: exampleJobAgent.ID(),
// Description: pulumi.String("example description"),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Elastic Jobs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/job:Job example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/jobs/myjob1
// ```
type Job struct {
pulumi.CustomResourceState
// The description of the Elastic Job.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
JobAgentId pulumi.StringOutput `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewJob registers a new resource with the given unique name, arguments, and options.
func NewJob(ctx *pulumi.Context,
name string, args *JobArgs, opts ...pulumi.ResourceOption) (*Job, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.JobAgentId == nil {
return nil, errors.New("invalid value for required argument 'JobAgentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Job
err := ctx.RegisterResource("azure:mssql/job:Job", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJob gets an existing Job 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 GetJob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobState, opts ...pulumi.ResourceOption) (*Job, error) {
var resource Job
err := ctx.ReadResource("azure:mssql/job:Job", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Job resources.
type jobState struct {
// The description of the Elastic Job.
Description *string `pulumi:"description"`
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
JobAgentId *string `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
Name *string `pulumi:"name"`
}
type JobState struct {
// The description of the Elastic Job.
Description pulumi.StringPtrInput
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
JobAgentId pulumi.StringPtrInput
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
Name pulumi.StringPtrInput
}
func (JobState) ElementType() reflect.Type {
return reflect.TypeOf((*jobState)(nil)).Elem()
}
type jobArgs struct {
// The description of the Elastic Job.
Description *string `pulumi:"description"`
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
JobAgentId string `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a Job resource.
type JobArgs struct {
// The description of the Elastic Job.
Description pulumi.StringPtrInput
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
JobAgentId pulumi.StringInput
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
Name pulumi.StringPtrInput
}
func (JobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobArgs)(nil)).Elem()
}
type JobInput interface {
pulumi.Input
ToJobOutput() JobOutput
ToJobOutputWithContext(ctx context.Context) JobOutput
}
func (*Job) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (i *Job) ToJobOutput() JobOutput {
return i.ToJobOutputWithContext(context.Background())
}
func (i *Job) ToJobOutputWithContext(ctx context.Context) JobOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobOutput)
}
// JobArrayInput is an input type that accepts JobArray and JobArrayOutput values.
// You can construct a concrete instance of `JobArrayInput` via:
//
// JobArray{ JobArgs{...} }
type JobArrayInput interface {
pulumi.Input
ToJobArrayOutput() JobArrayOutput
ToJobArrayOutputWithContext(context.Context) JobArrayOutput
}
type JobArray []JobInput
func (JobArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Job)(nil)).Elem()
}
func (i JobArray) ToJobArrayOutput() JobArrayOutput {
return i.ToJobArrayOutputWithContext(context.Background())
}
func (i JobArray) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobArrayOutput)
}
// JobMapInput is an input type that accepts JobMap and JobMapOutput values.
// You can construct a concrete instance of `JobMapInput` via:
//
// JobMap{ "key": JobArgs{...} }
type JobMapInput interface {
pulumi.Input
ToJobMapOutput() JobMapOutput
ToJobMapOutputWithContext(context.Context) JobMapOutput
}
type JobMap map[string]JobInput
func (JobMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Job)(nil)).Elem()
}
func (i JobMap) ToJobMapOutput() JobMapOutput {
return i.ToJobMapOutputWithContext(context.Background())
}
func (i JobMap) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobMapOutput)
}
type JobOutput struct{ *pulumi.OutputState }
func (JobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Job)(nil)).Elem()
}
func (o JobOutput) ToJobOutput() JobOutput {
return o
}
func (o JobOutput) ToJobOutputWithContext(ctx context.Context) JobOutput {
return o
}
// The description of the Elastic Job.
func (o JobOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Job) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job to be created.
func (o JobOutput) JobAgentId() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.JobAgentId }).(pulumi.StringOutput)
}
// The name which should be used for this Elastic Job. Changing this forces a new Elastic Job to be created.
func (o JobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Job) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type JobArrayOutput struct{ *pulumi.OutputState }
func (JobArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Job)(nil)).Elem()
}
func (o JobArrayOutput) ToJobArrayOutput() JobArrayOutput {
return o
}
func (o JobArrayOutput) ToJobArrayOutputWithContext(ctx context.Context) JobArrayOutput {
return o
}
func (o JobArrayOutput) Index(i pulumi.IntInput) JobOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Job {
return vs[0].([]*Job)[vs[1].(int)]
}).(JobOutput)
}
type JobMapOutput struct{ *pulumi.OutputState }
func (JobMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Job)(nil)).Elem()
}
func (o JobMapOutput) ToJobMapOutput() JobMapOutput {
return o
}
func (o JobMapOutput) ToJobMapOutputWithContext(ctx context.Context) JobMapOutput {
return o
}
func (o JobMapOutput) MapIndex(k pulumi.StringInput) JobOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Job {
return vs[0].(map[string]*Job)[vs[1].(string)]
}).(JobOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobInput)(nil)).Elem(), &Job{})
pulumi.RegisterInputType(reflect.TypeOf((*JobArrayInput)(nil)).Elem(), JobArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobMapInput)(nil)).Elem(), JobMap{})
pulumi.RegisterOutputType(JobOutput{})
pulumi.RegisterOutputType(JobArrayOutput{})
pulumi.RegisterOutputType(JobMapOutput{})
}
| 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/mssql/getServer.go | sdk/go/azure/mssql/getServer.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 mssql
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 Microsoft SQL Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := mssql.LookupServer(ctx, &mssql.LookupServerArgs{
// Name: "existingMsSqlServer",
// 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.Sql` - 2023-08-01-preview
func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServerResult
err := ctx.Invoke("azure:mssql/getServer:getServer", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServer.
type LookupServerArgs struct {
// The name of this Microsoft SQL Server.
Name string `pulumi:"name"`
// The name of the Resource Group where the Microsoft SQL Server exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getServer.
type LookupServerResult struct {
// The administrator login name of the Microsoft SQL Server.
AdministratorLogin string `pulumi:"administratorLogin"`
// Whether the Express Vulnerability Assessment Configuration is enabled.
ExpressVulnerabilityAssessmentEnabled bool `pulumi:"expressVulnerabilityAssessmentEnabled"`
// The fully qualified domain name of the Microsoft SQL Server.
FullyQualifiedDomainName string `pulumi:"fullyQualifiedDomainName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetServerIdentity `pulumi:"identities"`
// The Azure Region where the Microsoft SQL Server exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A list of dropped restorable database IDs on the Microsoft SQL Server.
RestorableDroppedDatabaseIds []string `pulumi:"restorableDroppedDatabaseIds"`
// A mapping of tags assigned to this Microsoft SQL Server.
Tags map[string]string `pulumi:"tags"`
// The Key Vault Key URI to be used as the `Customer Managed Key` (CMK/BYOK) for the `Transparent Data Encryption` (TDE) layer.
TransparentDataEncryptionKeyVaultKeyId string `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// The version of the Microsoft SQL Server.
Version string `pulumi:"version"`
}
func LookupServerOutput(ctx *pulumi.Context, args LookupServerOutputArgs, opts ...pulumi.InvokeOption) LookupServerResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupServerResultOutput, error) {
args := v.(LookupServerArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getServer:getServer", args, LookupServerResultOutput{}, options).(LookupServerResultOutput), nil
}).(LookupServerResultOutput)
}
// A collection of arguments for invoking getServer.
type LookupServerOutputArgs struct {
// The name of this Microsoft SQL Server.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Microsoft SQL Server exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupServerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerArgs)(nil)).Elem()
}
// A collection of values returned by getServer.
type LookupServerResultOutput struct{ *pulumi.OutputState }
func (LookupServerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServerResult)(nil)).Elem()
}
func (o LookupServerResultOutput) ToLookupServerResultOutput() LookupServerResultOutput {
return o
}
func (o LookupServerResultOutput) ToLookupServerResultOutputWithContext(ctx context.Context) LookupServerResultOutput {
return o
}
// The administrator login name of the Microsoft SQL Server.
func (o LookupServerResultOutput) AdministratorLogin() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.AdministratorLogin }).(pulumi.StringOutput)
}
// Whether the Express Vulnerability Assessment Configuration is enabled.
func (o LookupServerResultOutput) ExpressVulnerabilityAssessmentEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServerResult) bool { return v.ExpressVulnerabilityAssessmentEnabled }).(pulumi.BoolOutput)
}
// The fully qualified domain name of the Microsoft SQL Server.
func (o LookupServerResultOutput) FullyQualifiedDomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.FullyQualifiedDomainName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServerResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupServerResultOutput) Identities() GetServerIdentityArrayOutput {
return o.ApplyT(func(v LookupServerResult) []GetServerIdentity { return v.Identities }).(GetServerIdentityArrayOutput)
}
// The Azure Region where the Microsoft SQL Server exists.
func (o LookupServerResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupServerResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupServerResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A list of dropped restorable database IDs on the Microsoft SQL Server.
func (o LookupServerResultOutput) RestorableDroppedDatabaseIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupServerResult) []string { return v.RestorableDroppedDatabaseIds }).(pulumi.StringArrayOutput)
}
// A mapping of tags assigned to this Microsoft SQL Server.
func (o LookupServerResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Key Vault Key URI to be used as the `Customer Managed Key` (CMK/BYOK) for the `Transparent Data Encryption` (TDE) layer.
func (o LookupServerResultOutput) TransparentDataEncryptionKeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.TransparentDataEncryptionKeyVaultKeyId }).(pulumi.StringOutput)
}
// The version of the Microsoft SQL Server.
func (o LookupServerResultOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v LookupServerResult) string { return v.Version }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServerResultOutput{})
}
| 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/mssql/getManagedInstance.go | sdk/go/azure/mssql/getManagedInstance.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 mssql
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 Microsoft SQL Azure Managed Instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := mssql.LookupManagedInstance(ctx, &mssql.LookupManagedInstanceArgs{
// Name: "managedsqlinstance",
// ResourceGroupName: exampleAzurermResourceGroup.Name,
// }, 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.Sql` - 2023-08-01-preview
func LookupManagedInstance(ctx *pulumi.Context, args *LookupManagedInstanceArgs, opts ...pulumi.InvokeOption) (*LookupManagedInstanceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupManagedInstanceResult
err := ctx.Invoke("azure:mssql/getManagedInstance:getManagedInstance", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getManagedInstance.
type LookupManagedInstanceArgs struct {
// The name of the SQL Managed Instance.
Name string `pulumi:"name"`
// The name of the resource group where the SQL Managed Instance exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getManagedInstance.
type LookupManagedInstanceResult struct {
// The administrator login name for the SQL Managed Instance.
AdministratorLogin string `pulumi:"administratorLogin"`
// Specifies how the SQL Managed Instance will be collated.
Collation string `pulumi:"collation"`
CustomerManagedKeyId string `pulumi:"customerManagedKeyId"`
// The Dns Zone where the SQL Managed Instance is located.
DnsZone string `pulumi:"dnsZone"`
// The ID of the SQL Managed Instance which shares the DNS zone.
DnsZonePartnerId string `pulumi:"dnsZonePartnerId"`
// The fully qualified domain name of the Azure Managed SQL Instance.
Fqdn string `pulumi:"fqdn"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetManagedInstanceIdentity `pulumi:"identities"`
// What type of license the SQL Managed Instance uses.
LicenseType string `pulumi:"licenseType"`
// Specifies the supported Azure location where the resource exists.
Location string `pulumi:"location"`
// The Minimum TLS Version.
MinimumTlsVersion string `pulumi:"minimumTlsVersion"`
Name string `pulumi:"name"`
// Specifies how the SQL Managed Instance will be accessed.
ProxyOverride string `pulumi:"proxyOverride"`
// Whether the public data endpoint is enabled.
PublicDataEndpointEnabled bool `pulumi:"publicDataEndpointEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the SKU Name of the SQL Managed Instance.
SkuName string `pulumi:"skuName"`
// Specifies the storage account type used to store backups for this database.
StorageAccountType string `pulumi:"storageAccountType"`
// Maximum storage space allocated for the SQL Managed Instance.
StorageSizeInGb int `pulumi:"storageSizeInGb"`
// The subnet resource ID that the SQL Managed Instance is associated with.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The TimeZone ID that the SQL Managed Instance is running in.
TimezoneId string `pulumi:"timezoneId"`
// Number of cores that are assigned to the SQL Managed Instance.
Vcores int `pulumi:"vcores"`
}
func LookupManagedInstanceOutput(ctx *pulumi.Context, args LookupManagedInstanceOutputArgs, opts ...pulumi.InvokeOption) LookupManagedInstanceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupManagedInstanceResultOutput, error) {
args := v.(LookupManagedInstanceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getManagedInstance:getManagedInstance", args, LookupManagedInstanceResultOutput{}, options).(LookupManagedInstanceResultOutput), nil
}).(LookupManagedInstanceResultOutput)
}
// A collection of arguments for invoking getManagedInstance.
type LookupManagedInstanceOutputArgs struct {
// The name of the SQL Managed Instance.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group where the SQL Managed Instance exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupManagedInstanceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagedInstanceArgs)(nil)).Elem()
}
// A collection of values returned by getManagedInstance.
type LookupManagedInstanceResultOutput struct{ *pulumi.OutputState }
func (LookupManagedInstanceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagedInstanceResult)(nil)).Elem()
}
func (o LookupManagedInstanceResultOutput) ToLookupManagedInstanceResultOutput() LookupManagedInstanceResultOutput {
return o
}
func (o LookupManagedInstanceResultOutput) ToLookupManagedInstanceResultOutputWithContext(ctx context.Context) LookupManagedInstanceResultOutput {
return o
}
// The administrator login name for the SQL Managed Instance.
func (o LookupManagedInstanceResultOutput) AdministratorLogin() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.AdministratorLogin }).(pulumi.StringOutput)
}
// Specifies how the SQL Managed Instance will be collated.
func (o LookupManagedInstanceResultOutput) Collation() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.Collation }).(pulumi.StringOutput)
}
func (o LookupManagedInstanceResultOutput) CustomerManagedKeyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.CustomerManagedKeyId }).(pulumi.StringOutput)
}
// The Dns Zone where the SQL Managed Instance is located.
func (o LookupManagedInstanceResultOutput) DnsZone() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.DnsZone }).(pulumi.StringOutput)
}
// The ID of the SQL Managed Instance which shares the DNS zone.
func (o LookupManagedInstanceResultOutput) DnsZonePartnerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.DnsZonePartnerId }).(pulumi.StringOutput)
}
// The fully qualified domain name of the Azure Managed SQL Instance.
func (o LookupManagedInstanceResultOutput) Fqdn() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.Fqdn }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupManagedInstanceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupManagedInstanceResultOutput) Identities() GetManagedInstanceIdentityArrayOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) []GetManagedInstanceIdentity { return v.Identities }).(GetManagedInstanceIdentityArrayOutput)
}
// What type of license the SQL Managed Instance uses.
func (o LookupManagedInstanceResultOutput) LicenseType() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.LicenseType }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists.
func (o LookupManagedInstanceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.Location }).(pulumi.StringOutput)
}
// The Minimum TLS Version.
func (o LookupManagedInstanceResultOutput) MinimumTlsVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.MinimumTlsVersion }).(pulumi.StringOutput)
}
func (o LookupManagedInstanceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.Name }).(pulumi.StringOutput)
}
// Specifies how the SQL Managed Instance will be accessed.
func (o LookupManagedInstanceResultOutput) ProxyOverride() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.ProxyOverride }).(pulumi.StringOutput)
}
// Whether the public data endpoint is enabled.
func (o LookupManagedInstanceResultOutput) PublicDataEndpointEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) bool { return v.PublicDataEndpointEnabled }).(pulumi.BoolOutput)
}
func (o LookupManagedInstanceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the SKU Name of the SQL Managed Instance.
func (o LookupManagedInstanceResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.SkuName }).(pulumi.StringOutput)
}
// Specifies the storage account type used to store backups for this database.
func (o LookupManagedInstanceResultOutput) StorageAccountType() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.StorageAccountType }).(pulumi.StringOutput)
}
// Maximum storage space allocated for the SQL Managed Instance.
func (o LookupManagedInstanceResultOutput) StorageSizeInGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) int { return v.StorageSizeInGb }).(pulumi.IntOutput)
}
// The subnet resource ID that the SQL Managed Instance is associated with.
func (o LookupManagedInstanceResultOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupManagedInstanceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The TimeZone ID that the SQL Managed Instance is running in.
func (o LookupManagedInstanceResultOutput) TimezoneId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) string { return v.TimezoneId }).(pulumi.StringOutput)
}
// Number of cores that are assigned to the SQL Managed Instance.
func (o LookupManagedInstanceResultOutput) Vcores() pulumi.IntOutput {
return o.ApplyT(func(v LookupManagedInstanceResult) int { return v.Vcores }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupManagedInstanceResultOutput{})
}
| 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/mssql/databaseExtendedAuditingPolicy.go | sdk/go/azure/mssql/databaseExtendedAuditingPolicy.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a MS SQL Database Extended Auditing 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// })
// 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 = mssql.NewDatabaseExtendedAuditingPolicy(ctx, "example", &mssql.DatabaseExtendedAuditingPolicyArgs{
// DatabaseId: exampleDatabase.ID(),
// StorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// StorageAccountAccessKeyIsSecondary: pulumi.Bool(false),
// RetentionInDays: pulumi.Int(6),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Database Extended Auditing Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/databaseExtendedAuditingPolicy:DatabaseExtendedAuditingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlServer1/databases/db1/extendedAuditingSettings/default
// ```
type DatabaseExtendedAuditingPolicy struct {
pulumi.CustomResourceState
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
DatabaseId pulumi.StringOutput `pulumi:"databaseId"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
LogMonitoringEnabled pulumi.BoolPtrOutput `pulumi:"logMonitoringEnabled"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrOutput `pulumi:"storageAccountAccessKeyIsSecondary"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"`
}
// NewDatabaseExtendedAuditingPolicy registers a new resource with the given unique name, arguments, and options.
func NewDatabaseExtendedAuditingPolicy(ctx *pulumi.Context,
name string, args *DatabaseExtendedAuditingPolicyArgs, opts ...pulumi.ResourceOption) (*DatabaseExtendedAuditingPolicy, 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.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatabaseExtendedAuditingPolicy
err := ctx.RegisterResource("azure:mssql/databaseExtendedAuditingPolicy:DatabaseExtendedAuditingPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatabaseExtendedAuditingPolicy gets an existing DatabaseExtendedAuditingPolicy 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 GetDatabaseExtendedAuditingPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatabaseExtendedAuditingPolicyState, opts ...pulumi.ResourceOption) (*DatabaseExtendedAuditingPolicy, error) {
var resource DatabaseExtendedAuditingPolicy
err := ctx.ReadResource("azure:mssql/databaseExtendedAuditingPolicy:DatabaseExtendedAuditingPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatabaseExtendedAuditingPolicy resources.
type databaseExtendedAuditingPolicyState struct {
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
DatabaseId *string `pulumi:"databaseId"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
type DatabaseExtendedAuditingPolicyState struct {
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
DatabaseId pulumi.StringPtrInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
LogMonitoringEnabled pulumi.BoolPtrInput
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrInput
}
func (DatabaseExtendedAuditingPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*databaseExtendedAuditingPolicyState)(nil)).Elem()
}
type databaseExtendedAuditingPolicyArgs struct {
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
DatabaseId string `pulumi:"databaseId"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
// The set of arguments for constructing a DatabaseExtendedAuditingPolicy resource.
type DatabaseExtendedAuditingPolicyArgs struct {
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
DatabaseId pulumi.StringInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
LogMonitoringEnabled pulumi.BoolPtrInput
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrInput
}
func (DatabaseExtendedAuditingPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*databaseExtendedAuditingPolicyArgs)(nil)).Elem()
}
type DatabaseExtendedAuditingPolicyInput interface {
pulumi.Input
ToDatabaseExtendedAuditingPolicyOutput() DatabaseExtendedAuditingPolicyOutput
ToDatabaseExtendedAuditingPolicyOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyOutput
}
func (*DatabaseExtendedAuditingPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (i *DatabaseExtendedAuditingPolicy) ToDatabaseExtendedAuditingPolicyOutput() DatabaseExtendedAuditingPolicyOutput {
return i.ToDatabaseExtendedAuditingPolicyOutputWithContext(context.Background())
}
func (i *DatabaseExtendedAuditingPolicy) ToDatabaseExtendedAuditingPolicyOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseExtendedAuditingPolicyOutput)
}
// DatabaseExtendedAuditingPolicyArrayInput is an input type that accepts DatabaseExtendedAuditingPolicyArray and DatabaseExtendedAuditingPolicyArrayOutput values.
// You can construct a concrete instance of `DatabaseExtendedAuditingPolicyArrayInput` via:
//
// DatabaseExtendedAuditingPolicyArray{ DatabaseExtendedAuditingPolicyArgs{...} }
type DatabaseExtendedAuditingPolicyArrayInput interface {
pulumi.Input
ToDatabaseExtendedAuditingPolicyArrayOutput() DatabaseExtendedAuditingPolicyArrayOutput
ToDatabaseExtendedAuditingPolicyArrayOutputWithContext(context.Context) DatabaseExtendedAuditingPolicyArrayOutput
}
type DatabaseExtendedAuditingPolicyArray []DatabaseExtendedAuditingPolicyInput
func (DatabaseExtendedAuditingPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (i DatabaseExtendedAuditingPolicyArray) ToDatabaseExtendedAuditingPolicyArrayOutput() DatabaseExtendedAuditingPolicyArrayOutput {
return i.ToDatabaseExtendedAuditingPolicyArrayOutputWithContext(context.Background())
}
func (i DatabaseExtendedAuditingPolicyArray) ToDatabaseExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseExtendedAuditingPolicyArrayOutput)
}
// DatabaseExtendedAuditingPolicyMapInput is an input type that accepts DatabaseExtendedAuditingPolicyMap and DatabaseExtendedAuditingPolicyMapOutput values.
// You can construct a concrete instance of `DatabaseExtendedAuditingPolicyMapInput` via:
//
// DatabaseExtendedAuditingPolicyMap{ "key": DatabaseExtendedAuditingPolicyArgs{...} }
type DatabaseExtendedAuditingPolicyMapInput interface {
pulumi.Input
ToDatabaseExtendedAuditingPolicyMapOutput() DatabaseExtendedAuditingPolicyMapOutput
ToDatabaseExtendedAuditingPolicyMapOutputWithContext(context.Context) DatabaseExtendedAuditingPolicyMapOutput
}
type DatabaseExtendedAuditingPolicyMap map[string]DatabaseExtendedAuditingPolicyInput
func (DatabaseExtendedAuditingPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (i DatabaseExtendedAuditingPolicyMap) ToDatabaseExtendedAuditingPolicyMapOutput() DatabaseExtendedAuditingPolicyMapOutput {
return i.ToDatabaseExtendedAuditingPolicyMapOutputWithContext(context.Background())
}
func (i DatabaseExtendedAuditingPolicyMap) ToDatabaseExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseExtendedAuditingPolicyMapOutput)
}
type DatabaseExtendedAuditingPolicyOutput struct{ *pulumi.OutputState }
func (DatabaseExtendedAuditingPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (o DatabaseExtendedAuditingPolicyOutput) ToDatabaseExtendedAuditingPolicyOutput() DatabaseExtendedAuditingPolicyOutput {
return o
}
func (o DatabaseExtendedAuditingPolicyOutput) ToDatabaseExtendedAuditingPolicyOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyOutput {
return o
}
// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created.
func (o DatabaseExtendedAuditingPolicyOutput) DatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.StringOutput { return v.DatabaseId }).(pulumi.StringOutput)
}
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
func (o DatabaseExtendedAuditingPolicyOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Enable audit events to Azure Monitor? Defaults to `true`.
//
// > **Note:** To enable sending audit events to Log Analytics, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_log_analytics` directory within the GitHub Repository. To enable sending server audit events to Log Analytics, please enable the master database to send audit events to Log Analytics.
// To enable audit events to Eventhub, please refer to the example which can be found in the `./examples/sql-azure/sql_auditing_eventhub` directory within the GitHub Repository.
func (o DatabaseExtendedAuditingPolicyOutput) LogMonitoringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.LogMonitoringEnabled }).(pulumi.BoolPtrOutput)
}
// The number of days to retain logs for in the storage account. Defaults to `0`.
func (o DatabaseExtendedAuditingPolicyOutput) RetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput)
}
// The access key to use for the auditing storage account.
func (o DatabaseExtendedAuditingPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// Is `storageAccountAccessKey` value the storage's secondary key?
func (o DatabaseExtendedAuditingPolicyOutput) StorageAccountAccessKeyIsSecondary() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.BoolPtrOutput {
return v.StorageAccountAccessKeyIsSecondary
}).(pulumi.BoolPtrOutput)
}
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
func (o DatabaseExtendedAuditingPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput)
}
type DatabaseExtendedAuditingPolicyArrayOutput struct{ *pulumi.OutputState }
func (DatabaseExtendedAuditingPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (o DatabaseExtendedAuditingPolicyArrayOutput) ToDatabaseExtendedAuditingPolicyArrayOutput() DatabaseExtendedAuditingPolicyArrayOutput {
return o
}
func (o DatabaseExtendedAuditingPolicyArrayOutput) ToDatabaseExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyArrayOutput {
return o
}
func (o DatabaseExtendedAuditingPolicyArrayOutput) Index(i pulumi.IntInput) DatabaseExtendedAuditingPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatabaseExtendedAuditingPolicy {
return vs[0].([]*DatabaseExtendedAuditingPolicy)[vs[1].(int)]
}).(DatabaseExtendedAuditingPolicyOutput)
}
type DatabaseExtendedAuditingPolicyMapOutput struct{ *pulumi.OutputState }
func (DatabaseExtendedAuditingPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatabaseExtendedAuditingPolicy)(nil)).Elem()
}
func (o DatabaseExtendedAuditingPolicyMapOutput) ToDatabaseExtendedAuditingPolicyMapOutput() DatabaseExtendedAuditingPolicyMapOutput {
return o
}
func (o DatabaseExtendedAuditingPolicyMapOutput) ToDatabaseExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) DatabaseExtendedAuditingPolicyMapOutput {
return o
}
func (o DatabaseExtendedAuditingPolicyMapOutput) MapIndex(k pulumi.StringInput) DatabaseExtendedAuditingPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatabaseExtendedAuditingPolicy {
return vs[0].(map[string]*DatabaseExtendedAuditingPolicy)[vs[1].(string)]
}).(DatabaseExtendedAuditingPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseExtendedAuditingPolicyInput)(nil)).Elem(), &DatabaseExtendedAuditingPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseExtendedAuditingPolicyArrayInput)(nil)).Elem(), DatabaseExtendedAuditingPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseExtendedAuditingPolicyMapInput)(nil)).Elem(), DatabaseExtendedAuditingPolicyMap{})
pulumi.RegisterOutputType(DatabaseExtendedAuditingPolicyOutput{})
pulumi.RegisterOutputType(DatabaseExtendedAuditingPolicyArrayOutput{})
pulumi.RegisterOutputType(DatabaseExtendedAuditingPolicyMapOutput{})
}
| 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/mssql/outboundFirewallRule.go | sdk/go/azure/mssql/outboundFirewallRule.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows you to manage an Azure SQL Outbound Firewall Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mysqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// OutboundNetworkRestrictionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewOutboundFirewallRule(ctx, "example", &mssql.OutboundFirewallRuleArgs{
// Name: pulumi.String("sqlexamplefdqn.database.windows.net"),
// ServerId: exampleServer.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Outbound Firewall Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/outboundFirewallRule:OutboundFirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/outboundFirewallRules/fqdn1
// ```
type OutboundFirewallRule struct {
pulumi.CustomResourceState
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
}
// NewOutboundFirewallRule registers a new resource with the given unique name, arguments, and options.
func NewOutboundFirewallRule(ctx *pulumi.Context,
name string, args *OutboundFirewallRuleArgs, opts ...pulumi.ResourceOption) (*OutboundFirewallRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource OutboundFirewallRule
err := ctx.RegisterResource("azure:mssql/outboundFirewallRule:OutboundFirewallRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOutboundFirewallRule gets an existing OutboundFirewallRule 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 GetOutboundFirewallRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OutboundFirewallRuleState, opts ...pulumi.ResourceOption) (*OutboundFirewallRule, error) {
var resource OutboundFirewallRule
err := ctx.ReadResource("azure:mssql/outboundFirewallRule:OutboundFirewallRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OutboundFirewallRule resources.
type outboundFirewallRuleState struct {
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
}
type OutboundFirewallRuleState struct {
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
}
func (OutboundFirewallRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*outboundFirewallRuleState)(nil)).Elem()
}
type outboundFirewallRuleArgs struct {
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
}
// The set of arguments for constructing a OutboundFirewallRule resource.
type OutboundFirewallRuleArgs struct {
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
}
func (OutboundFirewallRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*outboundFirewallRuleArgs)(nil)).Elem()
}
type OutboundFirewallRuleInput interface {
pulumi.Input
ToOutboundFirewallRuleOutput() OutboundFirewallRuleOutput
ToOutboundFirewallRuleOutputWithContext(ctx context.Context) OutboundFirewallRuleOutput
}
func (*OutboundFirewallRule) ElementType() reflect.Type {
return reflect.TypeOf((**OutboundFirewallRule)(nil)).Elem()
}
func (i *OutboundFirewallRule) ToOutboundFirewallRuleOutput() OutboundFirewallRuleOutput {
return i.ToOutboundFirewallRuleOutputWithContext(context.Background())
}
func (i *OutboundFirewallRule) ToOutboundFirewallRuleOutputWithContext(ctx context.Context) OutboundFirewallRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(OutboundFirewallRuleOutput)
}
// OutboundFirewallRuleArrayInput is an input type that accepts OutboundFirewallRuleArray and OutboundFirewallRuleArrayOutput values.
// You can construct a concrete instance of `OutboundFirewallRuleArrayInput` via:
//
// OutboundFirewallRuleArray{ OutboundFirewallRuleArgs{...} }
type OutboundFirewallRuleArrayInput interface {
pulumi.Input
ToOutboundFirewallRuleArrayOutput() OutboundFirewallRuleArrayOutput
ToOutboundFirewallRuleArrayOutputWithContext(context.Context) OutboundFirewallRuleArrayOutput
}
type OutboundFirewallRuleArray []OutboundFirewallRuleInput
func (OutboundFirewallRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OutboundFirewallRule)(nil)).Elem()
}
func (i OutboundFirewallRuleArray) ToOutboundFirewallRuleArrayOutput() OutboundFirewallRuleArrayOutput {
return i.ToOutboundFirewallRuleArrayOutputWithContext(context.Background())
}
func (i OutboundFirewallRuleArray) ToOutboundFirewallRuleArrayOutputWithContext(ctx context.Context) OutboundFirewallRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OutboundFirewallRuleArrayOutput)
}
// OutboundFirewallRuleMapInput is an input type that accepts OutboundFirewallRuleMap and OutboundFirewallRuleMapOutput values.
// You can construct a concrete instance of `OutboundFirewallRuleMapInput` via:
//
// OutboundFirewallRuleMap{ "key": OutboundFirewallRuleArgs{...} }
type OutboundFirewallRuleMapInput interface {
pulumi.Input
ToOutboundFirewallRuleMapOutput() OutboundFirewallRuleMapOutput
ToOutboundFirewallRuleMapOutputWithContext(context.Context) OutboundFirewallRuleMapOutput
}
type OutboundFirewallRuleMap map[string]OutboundFirewallRuleInput
func (OutboundFirewallRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OutboundFirewallRule)(nil)).Elem()
}
func (i OutboundFirewallRuleMap) ToOutboundFirewallRuleMapOutput() OutboundFirewallRuleMapOutput {
return i.ToOutboundFirewallRuleMapOutputWithContext(context.Background())
}
func (i OutboundFirewallRuleMap) ToOutboundFirewallRuleMapOutputWithContext(ctx context.Context) OutboundFirewallRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OutboundFirewallRuleMapOutput)
}
type OutboundFirewallRuleOutput struct{ *pulumi.OutputState }
func (OutboundFirewallRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OutboundFirewallRule)(nil)).Elem()
}
func (o OutboundFirewallRuleOutput) ToOutboundFirewallRuleOutput() OutboundFirewallRuleOutput {
return o
}
func (o OutboundFirewallRuleOutput) ToOutboundFirewallRuleOutputWithContext(ctx context.Context) OutboundFirewallRuleOutput {
return o
}
// The name of the outbound firewall rule. This should be a FQDN. Changing this forces a new resource to be created.
func (o OutboundFirewallRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *OutboundFirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created.
func (o OutboundFirewallRuleOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *OutboundFirewallRule) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
type OutboundFirewallRuleArrayOutput struct{ *pulumi.OutputState }
func (OutboundFirewallRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OutboundFirewallRule)(nil)).Elem()
}
func (o OutboundFirewallRuleArrayOutput) ToOutboundFirewallRuleArrayOutput() OutboundFirewallRuleArrayOutput {
return o
}
func (o OutboundFirewallRuleArrayOutput) ToOutboundFirewallRuleArrayOutputWithContext(ctx context.Context) OutboundFirewallRuleArrayOutput {
return o
}
func (o OutboundFirewallRuleArrayOutput) Index(i pulumi.IntInput) OutboundFirewallRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OutboundFirewallRule {
return vs[0].([]*OutboundFirewallRule)[vs[1].(int)]
}).(OutboundFirewallRuleOutput)
}
type OutboundFirewallRuleMapOutput struct{ *pulumi.OutputState }
func (OutboundFirewallRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OutboundFirewallRule)(nil)).Elem()
}
func (o OutboundFirewallRuleMapOutput) ToOutboundFirewallRuleMapOutput() OutboundFirewallRuleMapOutput {
return o
}
func (o OutboundFirewallRuleMapOutput) ToOutboundFirewallRuleMapOutputWithContext(ctx context.Context) OutboundFirewallRuleMapOutput {
return o
}
func (o OutboundFirewallRuleMapOutput) MapIndex(k pulumi.StringInput) OutboundFirewallRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OutboundFirewallRule {
return vs[0].(map[string]*OutboundFirewallRule)[vs[1].(string)]
}).(OutboundFirewallRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OutboundFirewallRuleInput)(nil)).Elem(), &OutboundFirewallRule{})
pulumi.RegisterInputType(reflect.TypeOf((*OutboundFirewallRuleArrayInput)(nil)).Elem(), OutboundFirewallRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OutboundFirewallRuleMapInput)(nil)).Elem(), OutboundFirewallRuleMap{})
pulumi.RegisterOutputType(OutboundFirewallRuleOutput{})
pulumi.RegisterOutputType(OutboundFirewallRuleArrayOutput{})
pulumi.RegisterOutputType(OutboundFirewallRuleMapOutput{})
}
| 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/mssql/serverExtendedAuditingPolicy.go | sdk/go/azure/mssql/serverExtendedAuditingPolicy.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a MS SQL Server Extended Auditing 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// })
// 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 = mssql.NewServerExtendedAuditingPolicy(ctx, "example", &mssql.ServerExtendedAuditingPolicyArgs{
// ServerId: exampleServer.ID(),
// StorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// StorageAccountAccessKeyIsSecondary: pulumi.Bool(false),
// RetentionInDays: pulumi.Int(6),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Storage Account Behind VNet And Firewall
//
// ```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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
// "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
// }
// _, err = core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("virtnetname-1"),
// 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("subnetname-1"),
// ResourceGroupName: exampleResourceGroup.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// ServiceEndpoints: pulumi.StringArray{
// pulumi.String("Microsoft.Sql"),
// pulumi.String("Microsoft.Storage"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// MinimumTlsVersion: pulumi.String("1.2"),
// Identity: &mssql.ServerIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: pulumi.String(primary.Id),
// RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"),
// PrincipalId: pulumi.String(exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = azurerm.NewSqlVirtualNetworkRule(ctx, "sqlvnetrule", &azurerm.SqlVirtualNetworkRuleArgs{
// Name: "sql-vnet-rule",
// ResourceGroupName: exampleResourceGroup.Name,
// ServerName: exampleServer.Name,
// SubnetId: exampleSubnet.ID(),
// })
// if err != nil {
// return err
// }
// _, err = azurerm.NewSqlFirewallRule(ctx, "example", &azurerm.SqlFirewallRuleArgs{
// Name: "FirewallRule1",
// ResourceGroupName: exampleResourceGroup.Name,
// ServerName: exampleServer.Name,
// StartIpAddress: "0.0.0.0",
// EndIpAddress: "0.0.0.0",
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("StorageV2"),
// AllowNestedItemsToBePublic: pulumi.Bool(false),
// NetworkRules: &storage.AccountNetworkRulesTypeArgs{
// DefaultAction: pulumi.String("Deny"),
// IpRules: pulumi.StringArray{
// pulumi.String("127.0.0.1"),
// },
// VirtualNetworkSubnetIds: pulumi.StringArray{
// exampleSubnet.ID(),
// },
// Bypasses: pulumi.StringArray{
// pulumi.String("AzureServices"),
// },
// },
// Identity: &storage.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerExtendedAuditingPolicy(ctx, "example", &mssql.ServerExtendedAuditingPolicyArgs{
// StorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// ServerId: exampleServer.ID(),
// RetentionInDays: pulumi.Int(6),
// LogMonitoringEnabled: pulumi.Bool(false),
// StorageAccountSubscriptionId: pulumi.Any(primaryAzurermSubscription.SubscriptionId),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// exampleAccount,
// }))
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// MS SQL Server Extended Auditing Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverExtendedAuditingPolicy:ServerExtendedAuditingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlServer1/extendedAuditingSettings/default
// ```
type ServerExtendedAuditingPolicy struct {
pulumi.CustomResourceState
// A list of Actions-Groups and Actions to audit.
AuditActionsAndGroups pulumi.StringArrayOutput `pulumi:"auditActionsAndGroups"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrOutput `pulumi:"logMonitoringEnabled"`
// Specifies condition of where clause when creating an audit.
PredicateExpression pulumi.StringPtrOutput `pulumi:"predicateExpression"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrOutput `pulumi:"storageAccountAccessKeyIsSecondary"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrOutput `pulumi:"storageAccountSubscriptionId"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"`
}
// NewServerExtendedAuditingPolicy registers a new resource with the given unique name, arguments, and options.
func NewServerExtendedAuditingPolicy(ctx *pulumi.Context,
name string, args *ServerExtendedAuditingPolicyArgs, opts ...pulumi.ResourceOption) (*ServerExtendedAuditingPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
if args.StorageAccountSubscriptionId != nil {
args.StorageAccountSubscriptionId = pulumi.ToSecret(args.StorageAccountSubscriptionId).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
"storageAccountSubscriptionId",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerExtendedAuditingPolicy
err := ctx.RegisterResource("azure:mssql/serverExtendedAuditingPolicy:ServerExtendedAuditingPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerExtendedAuditingPolicy gets an existing ServerExtendedAuditingPolicy 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 GetServerExtendedAuditingPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerExtendedAuditingPolicyState, opts ...pulumi.ResourceOption) (*ServerExtendedAuditingPolicy, error) {
var resource ServerExtendedAuditingPolicy
err := ctx.ReadResource("azure:mssql/serverExtendedAuditingPolicy:ServerExtendedAuditingPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerExtendedAuditingPolicy resources.
type serverExtendedAuditingPolicyState struct {
// A list of Actions-Groups and Actions to audit.
AuditActionsAndGroups []string `pulumi:"auditActionsAndGroups"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// Specifies condition of where clause when creating an audit.
PredicateExpression *string `pulumi:"predicateExpression"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId *string `pulumi:"storageAccountSubscriptionId"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
type ServerExtendedAuditingPolicyState struct {
// A list of Actions-Groups and Actions to audit.
AuditActionsAndGroups pulumi.StringArrayInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrInput
// Specifies condition of where clause when creating an audit.
PredicateExpression pulumi.StringPtrInput
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrInput
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrInput
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrInput
}
func (ServerExtendedAuditingPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*serverExtendedAuditingPolicyState)(nil)).Elem()
}
type serverExtendedAuditingPolicyArgs struct {
// A list of Actions-Groups and Actions to audit.
AuditActionsAndGroups []string `pulumi:"auditActionsAndGroups"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// Specifies condition of where clause when creating an audit.
PredicateExpression *string `pulumi:"predicateExpression"`
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays *int `pulumi:"retentionInDays"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary *bool `pulumi:"storageAccountAccessKeyIsSecondary"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId *string `pulumi:"storageAccountSubscriptionId"`
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
// The set of arguments for constructing a ServerExtendedAuditingPolicy resource.
type ServerExtendedAuditingPolicyArgs struct {
// A list of Actions-Groups and Actions to audit.
AuditActionsAndGroups pulumi.StringArrayInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrInput
// Specifies condition of where clause when creating an audit.
PredicateExpression pulumi.StringPtrInput
// The number of days to retain logs for in the storage account. Defaults to `0`.
RetentionInDays pulumi.IntPtrInput
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// Is `storageAccountAccessKey` value the storage's secondary key?
StorageAccountAccessKeyIsSecondary pulumi.BoolPtrInput
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrInput
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
StorageEndpoint pulumi.StringPtrInput
}
func (ServerExtendedAuditingPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverExtendedAuditingPolicyArgs)(nil)).Elem()
}
type ServerExtendedAuditingPolicyInput interface {
pulumi.Input
ToServerExtendedAuditingPolicyOutput() ServerExtendedAuditingPolicyOutput
ToServerExtendedAuditingPolicyOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyOutput
}
func (*ServerExtendedAuditingPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (i *ServerExtendedAuditingPolicy) ToServerExtendedAuditingPolicyOutput() ServerExtendedAuditingPolicyOutput {
return i.ToServerExtendedAuditingPolicyOutputWithContext(context.Background())
}
func (i *ServerExtendedAuditingPolicy) ToServerExtendedAuditingPolicyOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerExtendedAuditingPolicyOutput)
}
// ServerExtendedAuditingPolicyArrayInput is an input type that accepts ServerExtendedAuditingPolicyArray and ServerExtendedAuditingPolicyArrayOutput values.
// You can construct a concrete instance of `ServerExtendedAuditingPolicyArrayInput` via:
//
// ServerExtendedAuditingPolicyArray{ ServerExtendedAuditingPolicyArgs{...} }
type ServerExtendedAuditingPolicyArrayInput interface {
pulumi.Input
ToServerExtendedAuditingPolicyArrayOutput() ServerExtendedAuditingPolicyArrayOutput
ToServerExtendedAuditingPolicyArrayOutputWithContext(context.Context) ServerExtendedAuditingPolicyArrayOutput
}
type ServerExtendedAuditingPolicyArray []ServerExtendedAuditingPolicyInput
func (ServerExtendedAuditingPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (i ServerExtendedAuditingPolicyArray) ToServerExtendedAuditingPolicyArrayOutput() ServerExtendedAuditingPolicyArrayOutput {
return i.ToServerExtendedAuditingPolicyArrayOutputWithContext(context.Background())
}
func (i ServerExtendedAuditingPolicyArray) ToServerExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerExtendedAuditingPolicyArrayOutput)
}
// ServerExtendedAuditingPolicyMapInput is an input type that accepts ServerExtendedAuditingPolicyMap and ServerExtendedAuditingPolicyMapOutput values.
// You can construct a concrete instance of `ServerExtendedAuditingPolicyMapInput` via:
//
// ServerExtendedAuditingPolicyMap{ "key": ServerExtendedAuditingPolicyArgs{...} }
type ServerExtendedAuditingPolicyMapInput interface {
pulumi.Input
ToServerExtendedAuditingPolicyMapOutput() ServerExtendedAuditingPolicyMapOutput
ToServerExtendedAuditingPolicyMapOutputWithContext(context.Context) ServerExtendedAuditingPolicyMapOutput
}
type ServerExtendedAuditingPolicyMap map[string]ServerExtendedAuditingPolicyInput
func (ServerExtendedAuditingPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (i ServerExtendedAuditingPolicyMap) ToServerExtendedAuditingPolicyMapOutput() ServerExtendedAuditingPolicyMapOutput {
return i.ToServerExtendedAuditingPolicyMapOutputWithContext(context.Background())
}
func (i ServerExtendedAuditingPolicyMap) ToServerExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerExtendedAuditingPolicyMapOutput)
}
type ServerExtendedAuditingPolicyOutput struct{ *pulumi.OutputState }
func (ServerExtendedAuditingPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (o ServerExtendedAuditingPolicyOutput) ToServerExtendedAuditingPolicyOutput() ServerExtendedAuditingPolicyOutput {
return o
}
func (o ServerExtendedAuditingPolicyOutput) ToServerExtendedAuditingPolicyOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyOutput {
return o
}
// A list of Actions-Groups and Actions to audit.
func (o ServerExtendedAuditingPolicyOutput) AuditActionsAndGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringArrayOutput { return v.AuditActionsAndGroups }).(pulumi.StringArrayOutput)
}
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `storageEndpoint` or `logMonitoringEnabled` are required.
func (o ServerExtendedAuditingPolicyOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
func (o ServerExtendedAuditingPolicyOutput) LogMonitoringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.BoolPtrOutput { return v.LogMonitoringEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies condition of where clause when creating an audit.
func (o ServerExtendedAuditingPolicyOutput) PredicateExpression() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.PredicateExpression }).(pulumi.StringPtrOutput)
}
// The number of days to retain logs for in the storage account. Defaults to `0`.
func (o ServerExtendedAuditingPolicyOutput) RetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput)
}
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
func (o ServerExtendedAuditingPolicyOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The access key to use for the auditing storage account.
func (o ServerExtendedAuditingPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// Is `storageAccountAccessKey` value the storage's secondary key?
func (o ServerExtendedAuditingPolicyOutput) StorageAccountAccessKeyIsSecondary() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.BoolPtrOutput {
return v.StorageAccountAccessKeyIsSecondary
}).(pulumi.BoolPtrOutput)
}
// The ID of the Subscription containing the Storage Account.
func (o ServerExtendedAuditingPolicyOutput) StorageAccountSubscriptionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountSubscriptionId }).(pulumi.StringPtrOutput)
}
// The blob storage endpoint (e.g. <https://example.blob.core.windows.net>). This blob storage will hold all extended auditing logs.
func (o ServerExtendedAuditingPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerExtendedAuditingPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput)
}
type ServerExtendedAuditingPolicyArrayOutput struct{ *pulumi.OutputState }
func (ServerExtendedAuditingPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (o ServerExtendedAuditingPolicyArrayOutput) ToServerExtendedAuditingPolicyArrayOutput() ServerExtendedAuditingPolicyArrayOutput {
return o
}
func (o ServerExtendedAuditingPolicyArrayOutput) ToServerExtendedAuditingPolicyArrayOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyArrayOutput {
return o
}
func (o ServerExtendedAuditingPolicyArrayOutput) Index(i pulumi.IntInput) ServerExtendedAuditingPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerExtendedAuditingPolicy {
return vs[0].([]*ServerExtendedAuditingPolicy)[vs[1].(int)]
}).(ServerExtendedAuditingPolicyOutput)
}
type ServerExtendedAuditingPolicyMapOutput struct{ *pulumi.OutputState }
func (ServerExtendedAuditingPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerExtendedAuditingPolicy)(nil)).Elem()
}
func (o ServerExtendedAuditingPolicyMapOutput) ToServerExtendedAuditingPolicyMapOutput() ServerExtendedAuditingPolicyMapOutput {
return o
}
func (o ServerExtendedAuditingPolicyMapOutput) ToServerExtendedAuditingPolicyMapOutputWithContext(ctx context.Context) ServerExtendedAuditingPolicyMapOutput {
return o
}
func (o ServerExtendedAuditingPolicyMapOutput) MapIndex(k pulumi.StringInput) ServerExtendedAuditingPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerExtendedAuditingPolicy {
return vs[0].(map[string]*ServerExtendedAuditingPolicy)[vs[1].(string)]
}).(ServerExtendedAuditingPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerExtendedAuditingPolicyInput)(nil)).Elem(), &ServerExtendedAuditingPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerExtendedAuditingPolicyArrayInput)(nil)).Elem(), ServerExtendedAuditingPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerExtendedAuditingPolicyMapInput)(nil)).Elem(), ServerExtendedAuditingPolicyMap{})
pulumi.RegisterOutputType(ServerExtendedAuditingPolicyOutput{})
pulumi.RegisterOutputType(ServerExtendedAuditingPolicyArrayOutput{})
pulumi.RegisterOutputType(ServerExtendedAuditingPolicyMapOutput{})
}
| 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/mssql/managedInstance.go | sdk/go/azure/mssql/managedInstance.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft SQL Azure Managed Instance.
//
// > **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).
//
// > **Note:** SQL Managed Instance needs permission to read Azure Active Directory when configuring the AAD administrator. [Read more about provisioning AAD administrators](https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql#provision-azure-ad-admin-sql-managed-instance).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("database-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("mi-security-group"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_inbound"),
// Priority: pulumi.Int(106),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("9000"),
// pulumi.String("9003"),
// pulumi.String("1438"),
// pulumi.String("1440"),
// pulumi.String("1452"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_inbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_health_probe_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_health_probe_inbound"),
// Priority: pulumi.Int(300),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("AzureLoadBalancer"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_tds_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_tds_inbound"),
// Priority: pulumi.Int(1000),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("1433"),
// SourceAddressPrefix: pulumi.String("VirtualNetwork"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_inbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_outbound"),
// Priority: pulumi.Int(102),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("80"),
// pulumi.String("443"),
// pulumi.String("12000"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_outbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_outbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("vnet-mi"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnet-mi"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// exampleRouteTable, err := network.NewRouteTable(ctx, "example", &network.RouteTableArgs{
// Name: pulumi.String("routetable-mi"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// BgpRoutePropagationEnabled: pulumi.Bool(true),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnet,
// }))
// if err != nil {
// return err
// }
// exampleSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "example", &network.SubnetRouteTableAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// RouteTableId: exampleRouteTable.ID(),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("managedsqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("mradministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnetNetworkSecurityGroupAssociation,
// exampleSubnetRouteTableAssociation,
// }))
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Microsoft SQL Managed Instances can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstance:ManagedInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver
// ```
type ManagedInstance struct {
pulumi.CustomResourceState
// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx)
//
// > **Note:** Unless `azure_active_directory_administrator.azuread_authentication_only_enabled` is set to `true`, `administratorLogin` and `administratorLoginPassword` are required.
AdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"administratorLoginPassword"`
// An `azureActiveDirectoryAdministrator` block as defined below.
AzureActiveDirectoryAdministrator ManagedInstanceAzureActiveDirectoryAdministratorPtrOutput `pulumi:"azureActiveDirectoryAdministrator"`
// Specifies how the SQL Managed Instance will be collated. Defaults to `SQL_Latin1_General_CP1_CI_AS`. Changing this forces a new resource to be created.
Collation pulumi.StringPtrOutput `pulumi:"collation"`
// Specifies the internal format of the SQL Managed Instance databases specific to the SQL engine version. Possible values are `AlwaysUpToDate` and `SQLServer2022`. Defaults to `SQLServer2022`.
//
// > **Note:** Changing `databaseFormat` from `AlwaysUpToDate` to `SQLServer2022` forces a new SQL Managed Instance to be created.
DatabaseFormat pulumi.StringPtrOutput `pulumi:"databaseFormat"`
// The Dns Zone where the SQL Managed Instance is located.
DnsZone pulumi.StringOutput `pulumi:"dnsZone"`
// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an `azurermSqlManagedInstanceFailoverGroup`. Setting this after creation forces a new resource to be created.
DnsZonePartnerId pulumi.StringPtrOutput `pulumi:"dnsZonePartnerId"`
// The fully qualified domain name of the Azure Managed SQL Instance
Fqdn pulumi.StringOutput `pulumi:"fqdn"`
// Specifies the hybrid secondary usage for disaster recovery of the SQL Managed Instance. Possible values are `Active` and `Passive`. Defaults to `Active`.
HybridSecondaryUsage pulumi.StringPtrOutput `pulumi:"hybridSecondaryUsage"`
// An `identity` block as defined below.
Identity ManagedInstanceIdentityPtrOutput `pulumi:"identity"`
// What type of license the Managed Instance will use. Possible values are `LicenseIncluded` and `BasePrice`.
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"`
// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Possible values are `SQL_Default` or an Azure Location in the format `SQL_{Location}_MI_{Size}`(for example `SQL_EastUS_MI_1`). Defaults to `SQL_Default`.
MaintenanceConfigurationName pulumi.StringPtrOutput `pulumi:"maintenanceConfigurationName"`
// The Minimum TLS Version. Default value is `1.2` Valid values include `1.0`, `1.1`, `1.2`.
//
// > **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 SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies how the SQL Managed Instance will be accessed. Defaults to `Default`. Possible values are `Default`, `Proxy`, and `Redirect`.
ProxyOverride pulumi.StringPtrOutput `pulumi:"proxyOverride"`
// Is the public data endpoint enabled? Defaults to `false`.
PublicDataEndpointEnabled pulumi.BoolPtrOutput `pulumi:"publicDataEndpointEnabled"`
// The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The service principal type. The only possible value is `SystemAssigned`.
ServicePrincipalType pulumi.StringPtrOutput `pulumi:"servicePrincipalType"`
// Specifies the SKU Name for the SQL Managed Instance. Possible values are `GP_Gen4`, `GP_Gen5`, `GP_Gen8IM`, `GP_Gen8IH`, `BC_Gen4`, `BC_Gen5`, `BC_Gen8IM` or `BC_Gen8IH`.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// Specifies the storage account type used to store backups for this database. Possible values are `GRS`, `GZRS`, `LRS`, and `ZRS`. Defaults to `GRS`.
StorageAccountType pulumi.StringPtrOutput `pulumi:"storageAccountType"`
// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).
StorageSizeInGb pulumi.IntOutput `pulumi:"storageSizeInGb"`
// The subnet resource id that the SQL Managed Instance will be associated with.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The TimeZone ID that the SQL Managed Instance will be operating in. Defaults to `UTC`. Changing this forces a new resource to be created.
TimezoneId pulumi.StringPtrOutput `pulumi:"timezoneId"`
// Number of cores that should be assigned to the SQL Managed Instance. Values can be `8`, `16`, or `24` for Gen4 SKUs, or `4`, `6`, `8`, `10`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `56`, `64`, `80`, `96` or `128` for Gen5 SKUs.
Vcores pulumi.IntOutput `pulumi:"vcores"`
// Specifies whether the SQL Managed Instance is zone redundant. Defaults to `false`.
ZoneRedundantEnabled pulumi.BoolPtrOutput `pulumi:"zoneRedundantEnabled"`
}
// NewManagedInstance registers a new resource with the given unique name, arguments, and options.
func NewManagedInstance(ctx *pulumi.Context,
name string, args *ManagedInstanceArgs, opts ...pulumi.ResourceOption) (*ManagedInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LicenseType == nil {
return nil, errors.New("invalid value for required argument 'LicenseType'")
}
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.StorageSizeInGb == nil {
return nil, errors.New("invalid value for required argument 'StorageSizeInGb'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
if args.Vcores == nil {
return nil, errors.New("invalid value for required argument 'Vcores'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/managedInstance:ManagedInstance"),
},
})
opts = append(opts, aliases)
if args.AdministratorLoginPassword != nil {
args.AdministratorLoginPassword = pulumi.ToSecret(args.AdministratorLoginPassword).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"administratorLoginPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstance
err := ctx.RegisterResource("azure:mssql/managedInstance:ManagedInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstance gets an existing ManagedInstance 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 GetManagedInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceState, opts ...pulumi.ResourceOption) (*ManagedInstance, error) {
var resource ManagedInstance
err := ctx.ReadResource("azure:mssql/managedInstance:ManagedInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstance resources.
type managedInstanceState struct {
// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx)
//
// > **Note:** Unless `azure_active_directory_administrator.azuread_authentication_only_enabled` is set to `true`, `administratorLogin` and `administratorLoginPassword` are required.
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// An `azureActiveDirectoryAdministrator` block as defined below.
AzureActiveDirectoryAdministrator *ManagedInstanceAzureActiveDirectoryAdministrator `pulumi:"azureActiveDirectoryAdministrator"`
// Specifies how the SQL Managed Instance will be collated. Defaults to `SQL_Latin1_General_CP1_CI_AS`. Changing this forces a new resource to be created.
Collation *string `pulumi:"collation"`
// Specifies the internal format of the SQL Managed Instance databases specific to the SQL engine version. Possible values are `AlwaysUpToDate` and `SQLServer2022`. Defaults to `SQLServer2022`.
//
// > **Note:** Changing `databaseFormat` from `AlwaysUpToDate` to `SQLServer2022` forces a new SQL Managed Instance to be created.
DatabaseFormat *string `pulumi:"databaseFormat"`
// The Dns Zone where the SQL Managed Instance is located.
DnsZone *string `pulumi:"dnsZone"`
// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an `azurermSqlManagedInstanceFailoverGroup`. Setting this after creation forces a new resource to be created.
DnsZonePartnerId *string `pulumi:"dnsZonePartnerId"`
// The fully qualified domain name of the Azure Managed SQL Instance
Fqdn *string `pulumi:"fqdn"`
// Specifies the hybrid secondary usage for disaster recovery of the SQL Managed Instance. Possible values are `Active` and `Passive`. Defaults to `Active`.
HybridSecondaryUsage *string `pulumi:"hybridSecondaryUsage"`
// An `identity` block as defined below.
Identity *ManagedInstanceIdentity `pulumi:"identity"`
// What type of license the Managed Instance will use. Possible values are `LicenseIncluded` and `BasePrice`.
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"`
// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Possible values are `SQL_Default` or an Azure Location in the format `SQL_{Location}_MI_{Size}`(for example `SQL_EastUS_MI_1`). Defaults to `SQL_Default`.
MaintenanceConfigurationName *string `pulumi:"maintenanceConfigurationName"`
// The Minimum TLS Version. Default value is `1.2` Valid values include `1.0`, `1.1`, `1.2`.
//
// > **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 SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies how the SQL Managed Instance will be accessed. Defaults to `Default`. Possible values are `Default`, `Proxy`, and `Redirect`.
ProxyOverride *string `pulumi:"proxyOverride"`
// Is the public data endpoint enabled? Defaults to `false`.
PublicDataEndpointEnabled *bool `pulumi:"publicDataEndpointEnabled"`
// The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The service principal type. The only possible value is `SystemAssigned`.
ServicePrincipalType *string `pulumi:"servicePrincipalType"`
// Specifies the SKU Name for the SQL Managed Instance. Possible values are `GP_Gen4`, `GP_Gen5`, `GP_Gen8IM`, `GP_Gen8IH`, `BC_Gen4`, `BC_Gen5`, `BC_Gen8IM` or `BC_Gen8IH`.
SkuName *string `pulumi:"skuName"`
// Specifies the storage account type used to store backups for this database. Possible values are `GRS`, `GZRS`, `LRS`, and `ZRS`. Defaults to `GRS`.
StorageAccountType *string `pulumi:"storageAccountType"`
// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).
StorageSizeInGb *int `pulumi:"storageSizeInGb"`
// The subnet resource id that the SQL Managed Instance will be associated with.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The TimeZone ID that the SQL Managed Instance will be operating in. Defaults to `UTC`. Changing this forces a new resource to be created.
TimezoneId *string `pulumi:"timezoneId"`
// Number of cores that should be assigned to the SQL Managed Instance. Values can be `8`, `16`, or `24` for Gen4 SKUs, or `4`, `6`, `8`, `10`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `56`, `64`, `80`, `96` or `128` for Gen5 SKUs.
Vcores *int `pulumi:"vcores"`
// Specifies whether the SQL Managed Instance is zone redundant. Defaults to `false`.
ZoneRedundantEnabled *bool `pulumi:"zoneRedundantEnabled"`
}
type ManagedInstanceState struct {
// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringPtrInput
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx)
//
// > **Note:** Unless `azure_active_directory_administrator.azuread_authentication_only_enabled` is set to `true`, `administratorLogin` and `administratorLoginPassword` are required.
AdministratorLoginPassword pulumi.StringPtrInput
// An `azureActiveDirectoryAdministrator` block as defined below.
AzureActiveDirectoryAdministrator ManagedInstanceAzureActiveDirectoryAdministratorPtrInput
// Specifies how the SQL Managed Instance will be collated. Defaults to `SQL_Latin1_General_CP1_CI_AS`. Changing this forces a new resource to be created.
Collation pulumi.StringPtrInput
// Specifies the internal format of the SQL Managed Instance databases specific to the SQL engine version. Possible values are `AlwaysUpToDate` and `SQLServer2022`. Defaults to `SQLServer2022`.
//
// > **Note:** Changing `databaseFormat` from `AlwaysUpToDate` to `SQLServer2022` forces a new SQL Managed Instance to be created.
DatabaseFormat pulumi.StringPtrInput
// The Dns Zone where the SQL Managed Instance is located.
DnsZone pulumi.StringPtrInput
// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an `azurermSqlManagedInstanceFailoverGroup`. Setting this after creation forces a new resource to be created.
DnsZonePartnerId pulumi.StringPtrInput
// The fully qualified domain name of the Azure Managed SQL Instance
Fqdn pulumi.StringPtrInput
// Specifies the hybrid secondary usage for disaster recovery of the SQL Managed Instance. Possible values are `Active` and `Passive`. Defaults to `Active`.
HybridSecondaryUsage pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ManagedInstanceIdentityPtrInput
// What type of license the Managed Instance will use. Possible values are `LicenseIncluded` and `BasePrice`.
LicenseType pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Possible values are `SQL_Default` or an Azure Location in the format `SQL_{Location}_MI_{Size}`(for example `SQL_EastUS_MI_1`). Defaults to `SQL_Default`.
MaintenanceConfigurationName pulumi.StringPtrInput
// The Minimum TLS Version. Default value is `1.2` Valid values include `1.0`, `1.1`, `1.2`.
//
// > **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 SQL Managed Instance. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies how the SQL Managed Instance will be accessed. Defaults to `Default`. Possible values are `Default`, `Proxy`, and `Redirect`.
ProxyOverride pulumi.StringPtrInput
// Is the public data endpoint enabled? Defaults to `false`.
PublicDataEndpointEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The service principal type. The only possible value is `SystemAssigned`.
ServicePrincipalType pulumi.StringPtrInput
// Specifies the SKU Name for the SQL Managed Instance. Possible values are `GP_Gen4`, `GP_Gen5`, `GP_Gen8IM`, `GP_Gen8IH`, `BC_Gen4`, `BC_Gen5`, `BC_Gen8IM` or `BC_Gen8IH`.
SkuName pulumi.StringPtrInput
// Specifies the storage account type used to store backups for this database. Possible values are `GRS`, `GZRS`, `LRS`, and `ZRS`. Defaults to `GRS`.
StorageAccountType pulumi.StringPtrInput
// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB).
StorageSizeInGb pulumi.IntPtrInput
// The subnet resource id that the SQL Managed Instance will be associated with.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The TimeZone ID that the SQL Managed Instance will be operating in. Defaults to `UTC`. Changing this forces a new resource to be created.
TimezoneId pulumi.StringPtrInput
// Number of cores that should be assigned to the SQL Managed Instance. Values can be `8`, `16`, or `24` for Gen4 SKUs, or `4`, `6`, `8`, `10`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `56`, `64`, `80`, `96` or `128` for Gen5 SKUs.
Vcores pulumi.IntPtrInput
// Specifies whether the SQL Managed Instance is zone redundant. Defaults to `false`.
ZoneRedundantEnabled pulumi.BoolPtrInput
}
func (ManagedInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceState)(nil)).Elem()
}
type managedInstanceArgs struct {
// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx)
//
// > **Note:** Unless `azure_active_directory_administrator.azuread_authentication_only_enabled` is set to `true`, `administratorLogin` and `administratorLoginPassword` are required.
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// An `azureActiveDirectoryAdministrator` block as defined below.
AzureActiveDirectoryAdministrator *ManagedInstanceAzureActiveDirectoryAdministrator `pulumi:"azureActiveDirectoryAdministrator"`
// Specifies how the SQL Managed Instance will be collated. Defaults to `SQL_Latin1_General_CP1_CI_AS`. Changing this forces a new resource to be created.
Collation *string `pulumi:"collation"`
// Specifies the internal format of the SQL Managed Instance databases specific to the SQL engine version. Possible values are `AlwaysUpToDate` and `SQLServer2022`. Defaults to `SQLServer2022`.
//
// > **Note:** Changing `databaseFormat` from `AlwaysUpToDate` to `SQLServer2022` forces a new SQL Managed Instance to be created.
DatabaseFormat *string `pulumi:"databaseFormat"`
// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an `azurermSqlManagedInstanceFailoverGroup`. Setting this after creation forces a new resource to be created.
DnsZonePartnerId *string `pulumi:"dnsZonePartnerId"`
// Specifies the hybrid secondary usage for disaster recovery of the SQL Managed Instance. Possible values are `Active` and `Passive`. Defaults to `Active`.
HybridSecondaryUsage *string `pulumi:"hybridSecondaryUsage"`
// An `identity` block as defined below.
Identity *ManagedInstanceIdentity `pulumi:"identity"`
| 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/mssql/serverMicrosoftSupportAuditingPolicy.go | sdk/go/azure/mssql/serverMicrosoftSupportAuditingPolicy.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a MS SQL Server Microsoft Support Auditing 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// })
// 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 = mssql.NewServerMicrosoftSupportAuditingPolicy(ctx, "example", &mssql.ServerMicrosoftSupportAuditingPolicyArgs{
// ServerId: exampleServer.ID(),
// BlobStorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Storage Account Behind VNet And Firewall
// ```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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
// "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
// }
// _, err = core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("virtnetname-1"),
// 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("subnetname-1"),
// ResourceGroupName: exampleResourceGroup.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// ServiceEndpoints: pulumi.StringArray{
// pulumi.String("Microsoft.Sql"),
// pulumi.String("Microsoft.Storage"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// MinimumTlsVersion: pulumi.String("1.2"),
// Identity: &mssql.ServerIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
// Scope: pulumi.String(primary.Id),
// RoleDefinitionName: pulumi.String("Storage Blob Data Contributor"),
// PrincipalId: pulumi.String(exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// _, err = azurerm.NewSqlVirtualNetworkRule(ctx, "sqlvnetrule", &azurerm.SqlVirtualNetworkRuleArgs{
// Name: "sql-vnet-rule",
// ResourceGroupName: exampleResourceGroup.Name,
// ServerName: exampleServer.Name,
// SubnetId: exampleSubnet.ID(),
// })
// if err != nil {
// return err
// }
// _, err = azurerm.NewSqlFirewallRule(ctx, "example", &azurerm.SqlFirewallRuleArgs{
// Name: "FirewallRule1",
// ResourceGroupName: exampleResourceGroup.Name,
// ServerName: exampleServer.Name,
// StartIpAddress: "0.0.0.0",
// EndIpAddress: "0.0.0.0",
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("StorageV2"),
// AllowNestedItemsToBePublic: pulumi.Bool(false),
// NetworkRules: &storage.AccountNetworkRulesTypeArgs{
// DefaultAction: pulumi.String("Deny"),
// IpRules: pulumi.StringArray{
// pulumi.String("127.0.0.1"),
// },
// VirtualNetworkSubnetIds: pulumi.StringArray{
// exampleSubnet.ID(),
// },
// Bypasses: pulumi.StringArray{
// pulumi.String("AzureServices"),
// },
// },
// Identity: &storage.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerMicrosoftSupportAuditingPolicy(ctx, "example", &mssql.ServerMicrosoftSupportAuditingPolicyArgs{
// BlobStorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// ServerId: exampleServer.ID(),
// LogMonitoringEnabled: pulumi.Bool(false),
// StorageAccountSubscriptionId: pulumi.Any(primaryAzurermSubscription.SubscriptionId),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAssignment,
// exampleAccount,
// }))
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Server Microsoft Support Auditing Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverMicrosoftSupportAuditingPolicy:ServerMicrosoftSupportAuditingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlServer1/devOpsAuditingSettings/default
// ```
type ServerMicrosoftSupportAuditingPolicy struct {
pulumi.CustomResourceState
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
BlobStorageEndpoint pulumi.StringPtrOutput `pulumi:"blobStorageEndpoint"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrOutput `pulumi:"logMonitoringEnabled"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrOutput `pulumi:"storageAccountSubscriptionId"`
}
// NewServerMicrosoftSupportAuditingPolicy registers a new resource with the given unique name, arguments, and options.
func NewServerMicrosoftSupportAuditingPolicy(ctx *pulumi.Context,
name string, args *ServerMicrosoftSupportAuditingPolicyArgs, opts ...pulumi.ResourceOption) (*ServerMicrosoftSupportAuditingPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
if args.StorageAccountSubscriptionId != nil {
args.StorageAccountSubscriptionId = pulumi.ToSecret(args.StorageAccountSubscriptionId).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
"storageAccountSubscriptionId",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerMicrosoftSupportAuditingPolicy
err := ctx.RegisterResource("azure:mssql/serverMicrosoftSupportAuditingPolicy:ServerMicrosoftSupportAuditingPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerMicrosoftSupportAuditingPolicy gets an existing ServerMicrosoftSupportAuditingPolicy 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 GetServerMicrosoftSupportAuditingPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerMicrosoftSupportAuditingPolicyState, opts ...pulumi.ResourceOption) (*ServerMicrosoftSupportAuditingPolicy, error) {
var resource ServerMicrosoftSupportAuditingPolicy
err := ctx.ReadResource("azure:mssql/serverMicrosoftSupportAuditingPolicy:ServerMicrosoftSupportAuditingPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerMicrosoftSupportAuditingPolicy resources.
type serverMicrosoftSupportAuditingPolicyState struct {
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
BlobStorageEndpoint *string `pulumi:"blobStorageEndpoint"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId *string `pulumi:"storageAccountSubscriptionId"`
}
type ServerMicrosoftSupportAuditingPolicyState struct {
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
BlobStorageEndpoint pulumi.StringPtrInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrInput
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrInput
}
func (ServerMicrosoftSupportAuditingPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*serverMicrosoftSupportAuditingPolicyState)(nil)).Elem()
}
type serverMicrosoftSupportAuditingPolicyArgs struct {
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
BlobStorageEndpoint *string `pulumi:"blobStorageEndpoint"`
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
Enabled *bool `pulumi:"enabled"`
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled *bool `pulumi:"logMonitoringEnabled"`
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The access key to use for the auditing storage account.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId *string `pulumi:"storageAccountSubscriptionId"`
}
// The set of arguments for constructing a ServerMicrosoftSupportAuditingPolicy resource.
type ServerMicrosoftSupportAuditingPolicyArgs struct {
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
BlobStorageEndpoint pulumi.StringPtrInput
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
Enabled pulumi.BoolPtrInput
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
LogMonitoringEnabled pulumi.BoolPtrInput
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The access key to use for the auditing storage account.
StorageAccountAccessKey pulumi.StringPtrInput
// The ID of the Subscription containing the Storage Account.
StorageAccountSubscriptionId pulumi.StringPtrInput
}
func (ServerMicrosoftSupportAuditingPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverMicrosoftSupportAuditingPolicyArgs)(nil)).Elem()
}
type ServerMicrosoftSupportAuditingPolicyInput interface {
pulumi.Input
ToServerMicrosoftSupportAuditingPolicyOutput() ServerMicrosoftSupportAuditingPolicyOutput
ToServerMicrosoftSupportAuditingPolicyOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyOutput
}
func (*ServerMicrosoftSupportAuditingPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (i *ServerMicrosoftSupportAuditingPolicy) ToServerMicrosoftSupportAuditingPolicyOutput() ServerMicrosoftSupportAuditingPolicyOutput {
return i.ToServerMicrosoftSupportAuditingPolicyOutputWithContext(context.Background())
}
func (i *ServerMicrosoftSupportAuditingPolicy) ToServerMicrosoftSupportAuditingPolicyOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMicrosoftSupportAuditingPolicyOutput)
}
// ServerMicrosoftSupportAuditingPolicyArrayInput is an input type that accepts ServerMicrosoftSupportAuditingPolicyArray and ServerMicrosoftSupportAuditingPolicyArrayOutput values.
// You can construct a concrete instance of `ServerMicrosoftSupportAuditingPolicyArrayInput` via:
//
// ServerMicrosoftSupportAuditingPolicyArray{ ServerMicrosoftSupportAuditingPolicyArgs{...} }
type ServerMicrosoftSupportAuditingPolicyArrayInput interface {
pulumi.Input
ToServerMicrosoftSupportAuditingPolicyArrayOutput() ServerMicrosoftSupportAuditingPolicyArrayOutput
ToServerMicrosoftSupportAuditingPolicyArrayOutputWithContext(context.Context) ServerMicrosoftSupportAuditingPolicyArrayOutput
}
type ServerMicrosoftSupportAuditingPolicyArray []ServerMicrosoftSupportAuditingPolicyInput
func (ServerMicrosoftSupportAuditingPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (i ServerMicrosoftSupportAuditingPolicyArray) ToServerMicrosoftSupportAuditingPolicyArrayOutput() ServerMicrosoftSupportAuditingPolicyArrayOutput {
return i.ToServerMicrosoftSupportAuditingPolicyArrayOutputWithContext(context.Background())
}
func (i ServerMicrosoftSupportAuditingPolicyArray) ToServerMicrosoftSupportAuditingPolicyArrayOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMicrosoftSupportAuditingPolicyArrayOutput)
}
// ServerMicrosoftSupportAuditingPolicyMapInput is an input type that accepts ServerMicrosoftSupportAuditingPolicyMap and ServerMicrosoftSupportAuditingPolicyMapOutput values.
// You can construct a concrete instance of `ServerMicrosoftSupportAuditingPolicyMapInput` via:
//
// ServerMicrosoftSupportAuditingPolicyMap{ "key": ServerMicrosoftSupportAuditingPolicyArgs{...} }
type ServerMicrosoftSupportAuditingPolicyMapInput interface {
pulumi.Input
ToServerMicrosoftSupportAuditingPolicyMapOutput() ServerMicrosoftSupportAuditingPolicyMapOutput
ToServerMicrosoftSupportAuditingPolicyMapOutputWithContext(context.Context) ServerMicrosoftSupportAuditingPolicyMapOutput
}
type ServerMicrosoftSupportAuditingPolicyMap map[string]ServerMicrosoftSupportAuditingPolicyInput
func (ServerMicrosoftSupportAuditingPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (i ServerMicrosoftSupportAuditingPolicyMap) ToServerMicrosoftSupportAuditingPolicyMapOutput() ServerMicrosoftSupportAuditingPolicyMapOutput {
return i.ToServerMicrosoftSupportAuditingPolicyMapOutputWithContext(context.Background())
}
func (i ServerMicrosoftSupportAuditingPolicyMap) ToServerMicrosoftSupportAuditingPolicyMapOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMicrosoftSupportAuditingPolicyMapOutput)
}
type ServerMicrosoftSupportAuditingPolicyOutput struct{ *pulumi.OutputState }
func (ServerMicrosoftSupportAuditingPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (o ServerMicrosoftSupportAuditingPolicyOutput) ToServerMicrosoftSupportAuditingPolicyOutput() ServerMicrosoftSupportAuditingPolicyOutput {
return o
}
func (o ServerMicrosoftSupportAuditingPolicyOutput) ToServerMicrosoftSupportAuditingPolicyOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyOutput {
return o
}
// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Microsoft support auditing logs.
func (o ServerMicrosoftSupportAuditingPolicyOutput) BlobStorageEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.StringPtrOutput { return v.BlobStorageEndpoint }).(pulumi.StringPtrOutput)
}
// Whether to enable the extended auditing policy. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** If `enabled` is `true`, `blobStorageEndpoint` or `logMonitoringEnabled` are required.
func (o ServerMicrosoftSupportAuditingPolicyOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Enable audit events to Azure Monitor? To enable server audit events to Azure Monitor, please enable its main database audit events to Azure Monitor. Defaults to `true`.
func (o ServerMicrosoftSupportAuditingPolicyOutput) LogMonitoringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.BoolPtrOutput { return v.LogMonitoringEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the SQL Server to set the extended auditing policy. Changing this forces a new resource to be created.
func (o ServerMicrosoftSupportAuditingPolicyOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The access key to use for the auditing storage account.
func (o ServerMicrosoftSupportAuditingPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// The ID of the Subscription containing the Storage Account.
func (o ServerMicrosoftSupportAuditingPolicyOutput) StorageAccountSubscriptionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerMicrosoftSupportAuditingPolicy) pulumi.StringPtrOutput {
return v.StorageAccountSubscriptionId
}).(pulumi.StringPtrOutput)
}
type ServerMicrosoftSupportAuditingPolicyArrayOutput struct{ *pulumi.OutputState }
func (ServerMicrosoftSupportAuditingPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (o ServerMicrosoftSupportAuditingPolicyArrayOutput) ToServerMicrosoftSupportAuditingPolicyArrayOutput() ServerMicrosoftSupportAuditingPolicyArrayOutput {
return o
}
func (o ServerMicrosoftSupportAuditingPolicyArrayOutput) ToServerMicrosoftSupportAuditingPolicyArrayOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyArrayOutput {
return o
}
func (o ServerMicrosoftSupportAuditingPolicyArrayOutput) Index(i pulumi.IntInput) ServerMicrosoftSupportAuditingPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerMicrosoftSupportAuditingPolicy {
return vs[0].([]*ServerMicrosoftSupportAuditingPolicy)[vs[1].(int)]
}).(ServerMicrosoftSupportAuditingPolicyOutput)
}
type ServerMicrosoftSupportAuditingPolicyMapOutput struct{ *pulumi.OutputState }
func (ServerMicrosoftSupportAuditingPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerMicrosoftSupportAuditingPolicy)(nil)).Elem()
}
func (o ServerMicrosoftSupportAuditingPolicyMapOutput) ToServerMicrosoftSupportAuditingPolicyMapOutput() ServerMicrosoftSupportAuditingPolicyMapOutput {
return o
}
func (o ServerMicrosoftSupportAuditingPolicyMapOutput) ToServerMicrosoftSupportAuditingPolicyMapOutputWithContext(ctx context.Context) ServerMicrosoftSupportAuditingPolicyMapOutput {
return o
}
func (o ServerMicrosoftSupportAuditingPolicyMapOutput) MapIndex(k pulumi.StringInput) ServerMicrosoftSupportAuditingPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerMicrosoftSupportAuditingPolicy {
return vs[0].(map[string]*ServerMicrosoftSupportAuditingPolicy)[vs[1].(string)]
}).(ServerMicrosoftSupportAuditingPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerMicrosoftSupportAuditingPolicyInput)(nil)).Elem(), &ServerMicrosoftSupportAuditingPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerMicrosoftSupportAuditingPolicyArrayInput)(nil)).Elem(), ServerMicrosoftSupportAuditingPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerMicrosoftSupportAuditingPolicyMapInput)(nil)).Elem(), ServerMicrosoftSupportAuditingPolicyMap{})
pulumi.RegisterOutputType(ServerMicrosoftSupportAuditingPolicyOutput{})
pulumi.RegisterOutputType(ServerMicrosoftSupportAuditingPolicyArrayOutput{})
pulumi.RegisterOutputType(ServerMicrosoftSupportAuditingPolicyMapOutput{})
}
| 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/mssql/serverDnsAlias.go | sdk/go/azure/mssql/serverDnsAlias.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a MS SQL Server DNS Alias.
//
// ## 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/mssql"
// "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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("AdminPassword123!"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerDnsAlias(ctx, "example", &mssql.ServerDnsAliasArgs{
// Name: pulumi.String("example-dns-alias"),
// MssqlServerId: exampleServer.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MSSQL Server DNS Aliass can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverDnsAlias:ServerDnsAlias example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/dnsAliases/default
// ```
type ServerDnsAlias struct {
pulumi.CustomResourceState
// The fully qualified DNS record for alias.
DnsRecord pulumi.StringOutput `pulumi:"dnsRecord"`
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
MssqlServerId pulumi.StringOutput `pulumi:"mssqlServerId"`
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewServerDnsAlias registers a new resource with the given unique name, arguments, and options.
func NewServerDnsAlias(ctx *pulumi.Context,
name string, args *ServerDnsAliasArgs, opts ...pulumi.ResourceOption) (*ServerDnsAlias, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MssqlServerId == nil {
return nil, errors.New("invalid value for required argument 'MssqlServerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerDnsAlias
err := ctx.RegisterResource("azure:mssql/serverDnsAlias:ServerDnsAlias", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerDnsAlias gets an existing ServerDnsAlias 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 GetServerDnsAlias(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerDnsAliasState, opts ...pulumi.ResourceOption) (*ServerDnsAlias, error) {
var resource ServerDnsAlias
err := ctx.ReadResource("azure:mssql/serverDnsAlias:ServerDnsAlias", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerDnsAlias resources.
type serverDnsAliasState struct {
// The fully qualified DNS record for alias.
DnsRecord *string `pulumi:"dnsRecord"`
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
MssqlServerId *string `pulumi:"mssqlServerId"`
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Name *string `pulumi:"name"`
}
type ServerDnsAliasState struct {
// The fully qualified DNS record for alias.
DnsRecord pulumi.StringPtrInput
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
MssqlServerId pulumi.StringPtrInput
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Name pulumi.StringPtrInput
}
func (ServerDnsAliasState) ElementType() reflect.Type {
return reflect.TypeOf((*serverDnsAliasState)(nil)).Elem()
}
type serverDnsAliasArgs struct {
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
MssqlServerId string `pulumi:"mssqlServerId"`
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a ServerDnsAlias resource.
type ServerDnsAliasArgs struct {
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
MssqlServerId pulumi.StringInput
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
Name pulumi.StringPtrInput
}
func (ServerDnsAliasArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverDnsAliasArgs)(nil)).Elem()
}
type ServerDnsAliasInput interface {
pulumi.Input
ToServerDnsAliasOutput() ServerDnsAliasOutput
ToServerDnsAliasOutputWithContext(ctx context.Context) ServerDnsAliasOutput
}
func (*ServerDnsAlias) ElementType() reflect.Type {
return reflect.TypeOf((**ServerDnsAlias)(nil)).Elem()
}
func (i *ServerDnsAlias) ToServerDnsAliasOutput() ServerDnsAliasOutput {
return i.ToServerDnsAliasOutputWithContext(context.Background())
}
func (i *ServerDnsAlias) ToServerDnsAliasOutputWithContext(ctx context.Context) ServerDnsAliasOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerDnsAliasOutput)
}
// ServerDnsAliasArrayInput is an input type that accepts ServerDnsAliasArray and ServerDnsAliasArrayOutput values.
// You can construct a concrete instance of `ServerDnsAliasArrayInput` via:
//
// ServerDnsAliasArray{ ServerDnsAliasArgs{...} }
type ServerDnsAliasArrayInput interface {
pulumi.Input
ToServerDnsAliasArrayOutput() ServerDnsAliasArrayOutput
ToServerDnsAliasArrayOutputWithContext(context.Context) ServerDnsAliasArrayOutput
}
type ServerDnsAliasArray []ServerDnsAliasInput
func (ServerDnsAliasArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerDnsAlias)(nil)).Elem()
}
func (i ServerDnsAliasArray) ToServerDnsAliasArrayOutput() ServerDnsAliasArrayOutput {
return i.ToServerDnsAliasArrayOutputWithContext(context.Background())
}
func (i ServerDnsAliasArray) ToServerDnsAliasArrayOutputWithContext(ctx context.Context) ServerDnsAliasArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerDnsAliasArrayOutput)
}
// ServerDnsAliasMapInput is an input type that accepts ServerDnsAliasMap and ServerDnsAliasMapOutput values.
// You can construct a concrete instance of `ServerDnsAliasMapInput` via:
//
// ServerDnsAliasMap{ "key": ServerDnsAliasArgs{...} }
type ServerDnsAliasMapInput interface {
pulumi.Input
ToServerDnsAliasMapOutput() ServerDnsAliasMapOutput
ToServerDnsAliasMapOutputWithContext(context.Context) ServerDnsAliasMapOutput
}
type ServerDnsAliasMap map[string]ServerDnsAliasInput
func (ServerDnsAliasMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerDnsAlias)(nil)).Elem()
}
func (i ServerDnsAliasMap) ToServerDnsAliasMapOutput() ServerDnsAliasMapOutput {
return i.ToServerDnsAliasMapOutputWithContext(context.Background())
}
func (i ServerDnsAliasMap) ToServerDnsAliasMapOutputWithContext(ctx context.Context) ServerDnsAliasMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerDnsAliasMapOutput)
}
type ServerDnsAliasOutput struct{ *pulumi.OutputState }
func (ServerDnsAliasOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerDnsAlias)(nil)).Elem()
}
func (o ServerDnsAliasOutput) ToServerDnsAliasOutput() ServerDnsAliasOutput {
return o
}
func (o ServerDnsAliasOutput) ToServerDnsAliasOutputWithContext(ctx context.Context) ServerDnsAliasOutput {
return o
}
// The fully qualified DNS record for alias.
func (o ServerDnsAliasOutput) DnsRecord() pulumi.StringOutput {
return o.ApplyT(func(v *ServerDnsAlias) pulumi.StringOutput { return v.DnsRecord }).(pulumi.StringOutput)
}
// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created.
func (o ServerDnsAliasOutput) MssqlServerId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerDnsAlias) pulumi.StringOutput { return v.MssqlServerId }).(pulumi.StringOutput)
}
// The name which should be used for this MSSQL Server DNS Alias. Changing this forces a new MSSQL Server DNS Alias to be created.
func (o ServerDnsAliasOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServerDnsAlias) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type ServerDnsAliasArrayOutput struct{ *pulumi.OutputState }
func (ServerDnsAliasArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerDnsAlias)(nil)).Elem()
}
func (o ServerDnsAliasArrayOutput) ToServerDnsAliasArrayOutput() ServerDnsAliasArrayOutput {
return o
}
func (o ServerDnsAliasArrayOutput) ToServerDnsAliasArrayOutputWithContext(ctx context.Context) ServerDnsAliasArrayOutput {
return o
}
func (o ServerDnsAliasArrayOutput) Index(i pulumi.IntInput) ServerDnsAliasOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerDnsAlias {
return vs[0].([]*ServerDnsAlias)[vs[1].(int)]
}).(ServerDnsAliasOutput)
}
type ServerDnsAliasMapOutput struct{ *pulumi.OutputState }
func (ServerDnsAliasMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerDnsAlias)(nil)).Elem()
}
func (o ServerDnsAliasMapOutput) ToServerDnsAliasMapOutput() ServerDnsAliasMapOutput {
return o
}
func (o ServerDnsAliasMapOutput) ToServerDnsAliasMapOutputWithContext(ctx context.Context) ServerDnsAliasMapOutput {
return o
}
func (o ServerDnsAliasMapOutput) MapIndex(k pulumi.StringInput) ServerDnsAliasOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerDnsAlias {
return vs[0].(map[string]*ServerDnsAlias)[vs[1].(string)]
}).(ServerDnsAliasOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerDnsAliasInput)(nil)).Elem(), &ServerDnsAlias{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerDnsAliasArrayInput)(nil)).Elem(), ServerDnsAliasArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerDnsAliasMapInput)(nil)).Elem(), ServerDnsAliasMap{})
pulumi.RegisterOutputType(ServerDnsAliasOutput{})
pulumi.RegisterOutputType(ServerDnsAliasArrayOutput{})
pulumi.RegisterOutputType(ServerDnsAliasMapOutput{})
}
| 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/mssql/managedInstanceFailoverGroup.go | sdk/go/azure/mssql/managedInstanceFailoverGroup.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 mssql
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 SQL Managed Instance Failover Group.
//
// ## Example Usage
//
// > **Note:** For a more complete example, see the `./examples/sql-azure/managed_instance_failover_group` directory within the GitHub Repository.
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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 {
// name := "mymssqlmitest"
// primaryName := fmt.Sprintf("%v-primary", name)
// primaryLocation := "West Europe"
// failoverName := fmt.Sprintf("%v-failover", name)
// failoverLocation := "North Europe"
// // # Primary SQL Managed Instance
// primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{
// Name: pulumi.String(primaryName),
// Location: pulumi.String(primaryLocation),
// })
// if err != nil {
// return err
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.Sprintf("%v.private", name),
// ResourceGroupName: primary.Name,
// })
// if err != nil {
// return err
// }
// primaryVirtualNetwork, err := network.NewVirtualNetwork(ctx, "primary", &network.VirtualNetworkArgs{
// Name: pulumi.String(primaryName),
// Location: primary.Location,
// ResourceGroupName: primary.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// primaryZoneVirtualNetworkLink, err := privatedns.NewZoneVirtualNetworkLink(ctx, "primary", &privatedns.ZoneVirtualNetworkLinkArgs{
// Name: pulumi.String("primary-link"),
// ResourceGroupName: primary.Name,
// PrivateDnsZoneName: exampleZone.Name,
// VirtualNetworkId: primaryVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// primarySubnet, err := network.NewSubnet(ctx, "primary", &network.SubnetArgs{
// Name: pulumi.String(primaryName),
// ResourceGroupName: primary.Name,
// VirtualNetworkName: primaryVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// primaryNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "primary", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String(primaryName),
// Location: primary.Location,
// ResourceGroupName: primary.Name,
// })
// if err != nil {
// return err
// }
// primarySubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "primary", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: primarySubnet.ID(),
// NetworkSecurityGroupId: primaryNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// primaryRouteTable, err := network.NewRouteTable(ctx, "primary", &network.RouteTableArgs{
// Name: pulumi.String(primaryName),
// Location: primary.Location,
// ResourceGroupName: primary.Name,
// })
// if err != nil {
// return err
// }
// primarySubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "primary", &network.SubnetRouteTableAssociationArgs{
// SubnetId: primarySubnet.ID(),
// RouteTableId: primaryRouteTable.ID(),
// })
// if err != nil {
// return err
// }
// primaryManagedInstance, err := mssql.NewManagedInstance(ctx, "primary", &mssql.ManagedInstanceArgs{
// Name: pulumi.String(primaryName),
// ResourceGroupName: primary.Name,
// Location: primary.Location,
// AdministratorLogin: pulumi.String("mradministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// LicenseType: pulumi.String("BasePrice"),
// SubnetId: primarySubnet.ID(),
// SkuName: pulumi.String("GP_Gen5"),
// Vcores: pulumi.Int(4),
// StorageSizeInGb: pulumi.Int(32),
// }, pulumi.DependsOn([]pulumi.Resource{
// primarySubnetNetworkSecurityGroupAssociation,
// primarySubnetRouteTableAssociation,
// }))
// if err != nil {
// return err
// }
// // # Secondary (Fail-over) SQL Managed Instance
// failover, err := core.NewResourceGroup(ctx, "failover", &core.ResourceGroupArgs{
// Name: pulumi.String(failoverName),
// Location: pulumi.String(failoverLocation),
// })
// if err != nil {
// return err
// }
// failoverVirtualNetwork, err := network.NewVirtualNetwork(ctx, "failover", &network.VirtualNetworkArgs{
// Name: pulumi.String(failoverName),
// Location: failover.Location,
// ResourceGroupName: failover.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.1.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// failoverZoneVirtualNetworkLink, err := privatedns.NewZoneVirtualNetworkLink(ctx, "failover", &privatedns.ZoneVirtualNetworkLinkArgs{
// Name: pulumi.String("failover-link"),
// ResourceGroupName: exampleZone.ResourceGroupName,
// PrivateDnsZoneName: exampleZone.Name,
// VirtualNetworkId: failoverVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// failoverSubnet, err := network.NewSubnet(ctx, "failover", &network.SubnetArgs{
// Name: pulumi.String("ManagedInstance"),
// ResourceGroupName: failover.Name,
// VirtualNetworkName: failoverVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// failoverNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "failover", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String(failoverName),
// Location: failover.Location,
// ResourceGroupName: failover.Name,
// })
// if err != nil {
// return err
// }
// failoverSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "failover", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: failoverSubnet.ID(),
// NetworkSecurityGroupId: failoverNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// failoverRouteTable, err := network.NewRouteTable(ctx, "failover", &network.RouteTableArgs{
// Name: pulumi.String(failoverName),
// Location: failover.Location,
// ResourceGroupName: failover.Name,
// })
// if err != nil {
// return err
// }
// failoverSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "failover", &network.SubnetRouteTableAssociationArgs{
// SubnetId: failoverSubnet.ID(),
// RouteTableId: failoverRouteTable.ID(),
// })
// if err != nil {
// return err
// }
// failoverManagedInstance, err := mssql.NewManagedInstance(ctx, "failover", &mssql.ManagedInstanceArgs{
// Name: pulumi.String(failoverName),
// ResourceGroupName: failover.Name,
// Location: failover.Location,
// AdministratorLogin: pulumi.String("mradministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// LicenseType: pulumi.String("BasePrice"),
// SubnetId: failoverSubnet.ID(),
// SkuName: pulumi.String("GP_Gen5"),
// Vcores: pulumi.Int(4),
// StorageSizeInGb: pulumi.Int(32),
// DnsZonePartnerId: primaryManagedInstance.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// failoverSubnetNetworkSecurityGroupAssociation,
// failoverSubnetRouteTableAssociation,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceFailoverGroup(ctx, "example", &mssql.ManagedInstanceFailoverGroupArgs{
// Name: pulumi.String("example-failover-group"),
// Location: primaryManagedInstance.Location,
// ManagedInstanceId: primaryManagedInstance.ID(),
// PartnerManagedInstanceId: failoverManagedInstance.ID(),
// SecondaryType: pulumi.String("Geo"),
// ReadWriteEndpointFailoverPolicy: &mssql.ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs{
// Mode: pulumi.String("Automatic"),
// GraceMinutes: pulumi.Int(60),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// primaryZoneVirtualNetworkLink,
// failoverZoneVirtualNetworkLink,
// }))
// if err != nil {
// return err
// }
// _, err = network.NewVirtualNetworkPeering(ctx, "primary_to_failover", &network.VirtualNetworkPeeringArgs{
// Name: pulumi.String("primary-to-failover"),
// RemoteVirtualNetworkId: failoverVirtualNetwork.ID(),
// ResourceGroupName: primary.Name,
// VirtualNetworkName: primaryVirtualNetwork.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnet(ctx, "default", &network.SubnetArgs{
// Name: pulumi.String("default"),
// ResourceGroupName: failover.Name,
// VirtualNetworkName: failoverVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewVirtualNetworkPeering(ctx, "failover_to_primary", &network.VirtualNetworkPeeringArgs{
// Name: pulumi.String("failover-to-primary"),
// RemoteVirtualNetworkId: primaryVirtualNetwork.ID(),
// ResourceGroupName: failover.Name,
// VirtualNetworkName: failoverVirtualNetwork.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// > **Note:** There are many prerequisites that must be in place before creating the failover group. To see them all, refer to [Configure a failover group for Azure SQL Managed Instance](https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/failover-group-configure-sql-mi).
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Instance Failover Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/locations/Location/instanceFailoverGroups/failoverGroup1
// ```
type ManagedInstanceFailoverGroup struct {
pulumi.CustomResourceState
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
PartnerManagedInstanceId pulumi.StringOutput `pulumi:"partnerManagedInstanceId"`
// A `partnerRegion` block as defined below.
PartnerRegions ManagedInstanceFailoverGroupPartnerRegionArrayOutput `pulumi:"partnerRegions"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyOutput `pulumi:"readWriteEndpointFailoverPolicy"`
// Failover policy for the read-only endpoint. Defaults to `true`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolPtrOutput `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The partner replication role of the Managed Instance Failover Group.
Role pulumi.StringOutput `pulumi:"role"`
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
SecondaryType pulumi.StringPtrOutput `pulumi:"secondaryType"`
}
// NewManagedInstanceFailoverGroup registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceFailoverGroup(ctx *pulumi.Context,
name string, args *ManagedInstanceFailoverGroupArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceFailoverGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
if args.PartnerManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'PartnerManagedInstanceId'")
}
if args.ReadWriteEndpointFailoverPolicy == nil {
return nil, errors.New("invalid value for required argument 'ReadWriteEndpointFailoverPolicy'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceFailoverGroup
err := ctx.RegisterResource("azure:mssql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceFailoverGroup gets an existing ManagedInstanceFailoverGroup 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 GetManagedInstanceFailoverGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceFailoverGroupState, opts ...pulumi.ResourceOption) (*ManagedInstanceFailoverGroup, error) {
var resource ManagedInstanceFailoverGroup
err := ctx.ReadResource("azure:mssql/managedInstanceFailoverGroup:ManagedInstanceFailoverGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceFailoverGroup resources.
type managedInstanceFailoverGroupState struct {
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
PartnerManagedInstanceId *string `pulumi:"partnerManagedInstanceId"`
// A `partnerRegion` block as defined below.
PartnerRegions []ManagedInstanceFailoverGroupPartnerRegion `pulumi:"partnerRegions"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy *ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy `pulumi:"readWriteEndpointFailoverPolicy"`
// Failover policy for the read-only endpoint. Defaults to `true`.
ReadonlyEndpointFailoverPolicyEnabled *bool `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The partner replication role of the Managed Instance Failover Group.
Role *string `pulumi:"role"`
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
SecondaryType *string `pulumi:"secondaryType"`
}
type ManagedInstanceFailoverGroupState struct {
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
PartnerManagedInstanceId pulumi.StringPtrInput
// A `partnerRegion` block as defined below.
PartnerRegions ManagedInstanceFailoverGroupPartnerRegionArrayInput
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyPtrInput
// Failover policy for the read-only endpoint. Defaults to `true`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolPtrInput
// The partner replication role of the Managed Instance Failover Group.
Role pulumi.StringPtrInput
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
SecondaryType pulumi.StringPtrInput
}
func (ManagedInstanceFailoverGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceFailoverGroupState)(nil)).Elem()
}
type managedInstanceFailoverGroupArgs struct {
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
PartnerManagedInstanceId string `pulumi:"partnerManagedInstanceId"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicy `pulumi:"readWriteEndpointFailoverPolicy"`
// Failover policy for the read-only endpoint. Defaults to `true`.
ReadonlyEndpointFailoverPolicyEnabled *bool `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
SecondaryType *string `pulumi:"secondaryType"`
}
// The set of arguments for constructing a ManagedInstanceFailoverGroup resource.
type ManagedInstanceFailoverGroupArgs struct {
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
PartnerManagedInstanceId pulumi.StringInput
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyInput
// Failover policy for the read-only endpoint. Defaults to `true`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolPtrInput
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
SecondaryType pulumi.StringPtrInput
}
func (ManagedInstanceFailoverGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceFailoverGroupArgs)(nil)).Elem()
}
type ManagedInstanceFailoverGroupInput interface {
pulumi.Input
ToManagedInstanceFailoverGroupOutput() ManagedInstanceFailoverGroupOutput
ToManagedInstanceFailoverGroupOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupOutput
}
func (*ManagedInstanceFailoverGroup) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (i *ManagedInstanceFailoverGroup) ToManagedInstanceFailoverGroupOutput() ManagedInstanceFailoverGroupOutput {
return i.ToManagedInstanceFailoverGroupOutputWithContext(context.Background())
}
func (i *ManagedInstanceFailoverGroup) ToManagedInstanceFailoverGroupOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceFailoverGroupOutput)
}
// ManagedInstanceFailoverGroupArrayInput is an input type that accepts ManagedInstanceFailoverGroupArray and ManagedInstanceFailoverGroupArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceFailoverGroupArrayInput` via:
//
// ManagedInstanceFailoverGroupArray{ ManagedInstanceFailoverGroupArgs{...} }
type ManagedInstanceFailoverGroupArrayInput interface {
pulumi.Input
ToManagedInstanceFailoverGroupArrayOutput() ManagedInstanceFailoverGroupArrayOutput
ToManagedInstanceFailoverGroupArrayOutputWithContext(context.Context) ManagedInstanceFailoverGroupArrayOutput
}
type ManagedInstanceFailoverGroupArray []ManagedInstanceFailoverGroupInput
func (ManagedInstanceFailoverGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (i ManagedInstanceFailoverGroupArray) ToManagedInstanceFailoverGroupArrayOutput() ManagedInstanceFailoverGroupArrayOutput {
return i.ToManagedInstanceFailoverGroupArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceFailoverGroupArray) ToManagedInstanceFailoverGroupArrayOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceFailoverGroupArrayOutput)
}
// ManagedInstanceFailoverGroupMapInput is an input type that accepts ManagedInstanceFailoverGroupMap and ManagedInstanceFailoverGroupMapOutput values.
// You can construct a concrete instance of `ManagedInstanceFailoverGroupMapInput` via:
//
// ManagedInstanceFailoverGroupMap{ "key": ManagedInstanceFailoverGroupArgs{...} }
type ManagedInstanceFailoverGroupMapInput interface {
pulumi.Input
ToManagedInstanceFailoverGroupMapOutput() ManagedInstanceFailoverGroupMapOutput
ToManagedInstanceFailoverGroupMapOutputWithContext(context.Context) ManagedInstanceFailoverGroupMapOutput
}
type ManagedInstanceFailoverGroupMap map[string]ManagedInstanceFailoverGroupInput
func (ManagedInstanceFailoverGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (i ManagedInstanceFailoverGroupMap) ToManagedInstanceFailoverGroupMapOutput() ManagedInstanceFailoverGroupMapOutput {
return i.ToManagedInstanceFailoverGroupMapOutputWithContext(context.Background())
}
func (i ManagedInstanceFailoverGroupMap) ToManagedInstanceFailoverGroupMapOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceFailoverGroupMapOutput)
}
type ManagedInstanceFailoverGroupOutput struct{ *pulumi.OutputState }
func (ManagedInstanceFailoverGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (o ManagedInstanceFailoverGroupOutput) ToManagedInstanceFailoverGroupOutput() ManagedInstanceFailoverGroupOutput {
return o
}
func (o ManagedInstanceFailoverGroupOutput) ToManagedInstanceFailoverGroupOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupOutput {
return o
}
// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
func (o ManagedInstanceFailoverGroupOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created.
func (o ManagedInstanceFailoverGroupOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
func (o ManagedInstanceFailoverGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
func (o ManagedInstanceFailoverGroupOutput) PartnerManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringOutput { return v.PartnerManagedInstanceId }).(pulumi.StringOutput)
}
// A `partnerRegion` block as defined below.
func (o ManagedInstanceFailoverGroupOutput) PartnerRegions() ManagedInstanceFailoverGroupPartnerRegionArrayOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) ManagedInstanceFailoverGroupPartnerRegionArrayOutput {
return v.PartnerRegions
}).(ManagedInstanceFailoverGroupPartnerRegionArrayOutput)
}
// A `readWriteEndpointFailoverPolicy` block as defined below.
func (o ManagedInstanceFailoverGroupOutput) ReadWriteEndpointFailoverPolicy() ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyOutput {
return v.ReadWriteEndpointFailoverPolicy
}).(ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyOutput)
}
// Failover policy for the read-only endpoint. Defaults to `true`.
func (o ManagedInstanceFailoverGroupOutput) ReadonlyEndpointFailoverPolicyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.BoolPtrOutput {
return v.ReadonlyEndpointFailoverPolicyEnabled
}).(pulumi.BoolPtrOutput)
}
// The partner replication role of the Managed Instance Failover Group.
func (o ManagedInstanceFailoverGroupOutput) Role() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
}
// The type of the secondary Managed Instance. Possible values are `Geo`, `Standby`. Defaults to `Geo`.
func (o ManagedInstanceFailoverGroupOutput) SecondaryType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceFailoverGroup) pulumi.StringPtrOutput { return v.SecondaryType }).(pulumi.StringPtrOutput)
}
type ManagedInstanceFailoverGroupArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceFailoverGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (o ManagedInstanceFailoverGroupArrayOutput) ToManagedInstanceFailoverGroupArrayOutput() ManagedInstanceFailoverGroupArrayOutput {
return o
}
func (o ManagedInstanceFailoverGroupArrayOutput) ToManagedInstanceFailoverGroupArrayOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupArrayOutput {
return o
}
func (o ManagedInstanceFailoverGroupArrayOutput) Index(i pulumi.IntInput) ManagedInstanceFailoverGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceFailoverGroup {
return vs[0].([]*ManagedInstanceFailoverGroup)[vs[1].(int)]
}).(ManagedInstanceFailoverGroupOutput)
}
type ManagedInstanceFailoverGroupMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceFailoverGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceFailoverGroup)(nil)).Elem()
}
func (o ManagedInstanceFailoverGroupMapOutput) ToManagedInstanceFailoverGroupMapOutput() ManagedInstanceFailoverGroupMapOutput {
return o
}
func (o ManagedInstanceFailoverGroupMapOutput) ToManagedInstanceFailoverGroupMapOutputWithContext(ctx context.Context) ManagedInstanceFailoverGroupMapOutput {
return o
}
func (o ManagedInstanceFailoverGroupMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceFailoverGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceFailoverGroup {
return vs[0].(map[string]*ManagedInstanceFailoverGroup)[vs[1].(string)]
}).(ManagedInstanceFailoverGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceFailoverGroupInput)(nil)).Elem(), &ManagedInstanceFailoverGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceFailoverGroupArrayInput)(nil)).Elem(), ManagedInstanceFailoverGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceFailoverGroupMapInput)(nil)).Elem(), ManagedInstanceFailoverGroupMap{})
pulumi.RegisterOutputType(ManagedInstanceFailoverGroupOutput{})
pulumi.RegisterOutputType(ManagedInstanceFailoverGroupArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceFailoverGroupMapOutput{})
}
| 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/mssql/virtualMachine.go | sdk/go/azure/mssql/virtualMachine.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft SQL Virtual Machine
//
// ## Example Usage
//
// This example provisions a brief Managed Microsoft SQL Virtual Machine.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := compute.LookupVirtualMachine(ctx, &compute.LookupVirtualMachineArgs{
// Name: "example-vm",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// _, err = mssql.NewVirtualMachine(ctx, "example", &mssql.VirtualMachineArgs{
// VirtualMachineId: pulumi.String(example.Id),
// SqlLicenseType: pulumi.String("PAYG"),
// RServicesEnabled: pulumi.Bool(true),
// SqlConnectivityPort: pulumi.Int(1433),
// SqlConnectivityType: pulumi.String("PRIVATE"),
// SqlConnectivityUpdatePassword: pulumi.String("Password1234!"),
// SqlConnectivityUpdateUsername: pulumi.String("sqllogin"),
// AutoPatching: &mssql.VirtualMachineAutoPatchingArgs{
// DayOfWeek: pulumi.String("Sunday"),
// MaintenanceWindowDurationInMinutes: pulumi.Int(60),
// MaintenanceWindowStartingHour: pulumi.Int(2),
// },
// })
// 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
//
// * `Microsoft.SqlVirtualMachine` - 2023-10-01
//
// ## Import
//
// Microsoft SQL Virtual Machines can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/example1
// ```
type VirtualMachine struct {
pulumi.CustomResourceState
// An `assessment` block as defined below.
Assessment VirtualMachineAssessmentPtrOutput `pulumi:"assessment"`
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
AutoBackup VirtualMachineAutoBackupPtrOutput `pulumi:"autoBackup"`
// An `autoPatching` block as defined below.
AutoPatching VirtualMachineAutoPatchingPtrOutput `pulumi:"autoPatching"`
// An `keyVaultCredential` block as defined below.
KeyVaultCredential VirtualMachineKeyVaultCredentialPtrOutput `pulumi:"keyVaultCredential"`
// Should R Services be enabled?
RServicesEnabled pulumi.BoolPtrOutput `pulumi:"rServicesEnabled"`
// The SQL Server port. Defaults to `1433`.
SqlConnectivityPort pulumi.IntPtrOutput `pulumi:"sqlConnectivityPort"`
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
SqlConnectivityType pulumi.StringPtrOutput `pulumi:"sqlConnectivityType"`
// The SQL Server sysadmin login password.
SqlConnectivityUpdatePassword pulumi.StringPtrOutput `pulumi:"sqlConnectivityUpdatePassword"`
// The SQL Server sysadmin login to create.
SqlConnectivityUpdateUsername pulumi.StringPtrOutput `pulumi:"sqlConnectivityUpdateUsername"`
// A `sqlInstance` block as defined below.
SqlInstance VirtualMachineSqlInstancePtrOutput `pulumi:"sqlInstance"`
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
SqlLicenseType pulumi.StringPtrOutput `pulumi:"sqlLicenseType"`
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
SqlVirtualMachineGroupId pulumi.StringPtrOutput `pulumi:"sqlVirtualMachineGroupId"`
// An `storageConfiguration` block as defined below.
StorageConfiguration VirtualMachineStorageConfigurationPtrOutput `pulumi:"storageConfiguration"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"`
// A `wsfcDomainCredential` block as defined below
WsfcDomainCredential VirtualMachineWsfcDomainCredentialPtrOutput `pulumi:"wsfcDomainCredential"`
}
// NewVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewVirtualMachine(ctx *pulumi.Context,
name string, args *VirtualMachineArgs, opts ...pulumi.ResourceOption) (*VirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.VirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
}
if args.SqlConnectivityUpdatePassword != nil {
args.SqlConnectivityUpdatePassword = pulumi.ToSecret(args.SqlConnectivityUpdatePassword).(pulumi.StringPtrInput)
}
if args.SqlConnectivityUpdateUsername != nil {
args.SqlConnectivityUpdateUsername = pulumi.ToSecret(args.SqlConnectivityUpdateUsername).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"sqlConnectivityUpdatePassword",
"sqlConnectivityUpdateUsername",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualMachine
err := ctx.RegisterResource("azure:mssql/virtualMachine:VirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualMachine gets an existing VirtualMachine 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 GetVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualMachineState, opts ...pulumi.ResourceOption) (*VirtualMachine, error) {
var resource VirtualMachine
err := ctx.ReadResource("azure:mssql/virtualMachine:VirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualMachine resources.
type virtualMachineState struct {
// An `assessment` block as defined below.
Assessment *VirtualMachineAssessment `pulumi:"assessment"`
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
AutoBackup *VirtualMachineAutoBackup `pulumi:"autoBackup"`
// An `autoPatching` block as defined below.
AutoPatching *VirtualMachineAutoPatching `pulumi:"autoPatching"`
// An `keyVaultCredential` block as defined below.
KeyVaultCredential *VirtualMachineKeyVaultCredential `pulumi:"keyVaultCredential"`
// Should R Services be enabled?
RServicesEnabled *bool `pulumi:"rServicesEnabled"`
// The SQL Server port. Defaults to `1433`.
SqlConnectivityPort *int `pulumi:"sqlConnectivityPort"`
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
SqlConnectivityType *string `pulumi:"sqlConnectivityType"`
// The SQL Server sysadmin login password.
SqlConnectivityUpdatePassword *string `pulumi:"sqlConnectivityUpdatePassword"`
// The SQL Server sysadmin login to create.
SqlConnectivityUpdateUsername *string `pulumi:"sqlConnectivityUpdateUsername"`
// A `sqlInstance` block as defined below.
SqlInstance *VirtualMachineSqlInstance `pulumi:"sqlInstance"`
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
SqlLicenseType *string `pulumi:"sqlLicenseType"`
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
SqlVirtualMachineGroupId *string `pulumi:"sqlVirtualMachineGroupId"`
// An `storageConfiguration` block as defined below.
StorageConfiguration *VirtualMachineStorageConfiguration `pulumi:"storageConfiguration"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId *string `pulumi:"virtualMachineId"`
// A `wsfcDomainCredential` block as defined below
WsfcDomainCredential *VirtualMachineWsfcDomainCredential `pulumi:"wsfcDomainCredential"`
}
type VirtualMachineState struct {
// An `assessment` block as defined below.
Assessment VirtualMachineAssessmentPtrInput
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
AutoBackup VirtualMachineAutoBackupPtrInput
// An `autoPatching` block as defined below.
AutoPatching VirtualMachineAutoPatchingPtrInput
// An `keyVaultCredential` block as defined below.
KeyVaultCredential VirtualMachineKeyVaultCredentialPtrInput
// Should R Services be enabled?
RServicesEnabled pulumi.BoolPtrInput
// The SQL Server port. Defaults to `1433`.
SqlConnectivityPort pulumi.IntPtrInput
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
SqlConnectivityType pulumi.StringPtrInput
// The SQL Server sysadmin login password.
SqlConnectivityUpdatePassword pulumi.StringPtrInput
// The SQL Server sysadmin login to create.
SqlConnectivityUpdateUsername pulumi.StringPtrInput
// A `sqlInstance` block as defined below.
SqlInstance VirtualMachineSqlInstancePtrInput
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
SqlLicenseType pulumi.StringPtrInput
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
SqlVirtualMachineGroupId pulumi.StringPtrInput
// An `storageConfiguration` block as defined below.
StorageConfiguration VirtualMachineStorageConfigurationPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringPtrInput
// A `wsfcDomainCredential` block as defined below
WsfcDomainCredential VirtualMachineWsfcDomainCredentialPtrInput
}
func (VirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineState)(nil)).Elem()
}
type virtualMachineArgs struct {
// An `assessment` block as defined below.
Assessment *VirtualMachineAssessment `pulumi:"assessment"`
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
AutoBackup *VirtualMachineAutoBackup `pulumi:"autoBackup"`
// An `autoPatching` block as defined below.
AutoPatching *VirtualMachineAutoPatching `pulumi:"autoPatching"`
// An `keyVaultCredential` block as defined below.
KeyVaultCredential *VirtualMachineKeyVaultCredential `pulumi:"keyVaultCredential"`
// Should R Services be enabled?
RServicesEnabled *bool `pulumi:"rServicesEnabled"`
// The SQL Server port. Defaults to `1433`.
SqlConnectivityPort *int `pulumi:"sqlConnectivityPort"`
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
SqlConnectivityType *string `pulumi:"sqlConnectivityType"`
// The SQL Server sysadmin login password.
SqlConnectivityUpdatePassword *string `pulumi:"sqlConnectivityUpdatePassword"`
// The SQL Server sysadmin login to create.
SqlConnectivityUpdateUsername *string `pulumi:"sqlConnectivityUpdateUsername"`
// A `sqlInstance` block as defined below.
SqlInstance *VirtualMachineSqlInstance `pulumi:"sqlInstance"`
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
SqlLicenseType *string `pulumi:"sqlLicenseType"`
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
SqlVirtualMachineGroupId *string `pulumi:"sqlVirtualMachineGroupId"`
// An `storageConfiguration` block as defined below.
StorageConfiguration *VirtualMachineStorageConfiguration `pulumi:"storageConfiguration"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId string `pulumi:"virtualMachineId"`
// A `wsfcDomainCredential` block as defined below
WsfcDomainCredential *VirtualMachineWsfcDomainCredential `pulumi:"wsfcDomainCredential"`
}
// The set of arguments for constructing a VirtualMachine resource.
type VirtualMachineArgs struct {
// An `assessment` block as defined below.
Assessment VirtualMachineAssessmentPtrInput
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
AutoBackup VirtualMachineAutoBackupPtrInput
// An `autoPatching` block as defined below.
AutoPatching VirtualMachineAutoPatchingPtrInput
// An `keyVaultCredential` block as defined below.
KeyVaultCredential VirtualMachineKeyVaultCredentialPtrInput
// Should R Services be enabled?
RServicesEnabled pulumi.BoolPtrInput
// The SQL Server port. Defaults to `1433`.
SqlConnectivityPort pulumi.IntPtrInput
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
SqlConnectivityType pulumi.StringPtrInput
// The SQL Server sysadmin login password.
SqlConnectivityUpdatePassword pulumi.StringPtrInput
// The SQL Server sysadmin login to create.
SqlConnectivityUpdateUsername pulumi.StringPtrInput
// A `sqlInstance` block as defined below.
SqlInstance VirtualMachineSqlInstancePtrInput
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
SqlLicenseType pulumi.StringPtrInput
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
SqlVirtualMachineGroupId pulumi.StringPtrInput
// An `storageConfiguration` block as defined below.
StorageConfiguration VirtualMachineStorageConfigurationPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringInput
// A `wsfcDomainCredential` block as defined below
WsfcDomainCredential VirtualMachineWsfcDomainCredentialPtrInput
}
func (VirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineArgs)(nil)).Elem()
}
type VirtualMachineInput interface {
pulumi.Input
ToVirtualMachineOutput() VirtualMachineOutput
ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput
}
func (*VirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachine)(nil)).Elem()
}
func (i *VirtualMachine) ToVirtualMachineOutput() VirtualMachineOutput {
return i.ToVirtualMachineOutputWithContext(context.Background())
}
func (i *VirtualMachine) ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineOutput)
}
// VirtualMachineArrayInput is an input type that accepts VirtualMachineArray and VirtualMachineArrayOutput values.
// You can construct a concrete instance of `VirtualMachineArrayInput` via:
//
// VirtualMachineArray{ VirtualMachineArgs{...} }
type VirtualMachineArrayInput interface {
pulumi.Input
ToVirtualMachineArrayOutput() VirtualMachineArrayOutput
ToVirtualMachineArrayOutputWithContext(context.Context) VirtualMachineArrayOutput
}
type VirtualMachineArray []VirtualMachineInput
func (VirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachine)(nil)).Elem()
}
func (i VirtualMachineArray) ToVirtualMachineArrayOutput() VirtualMachineArrayOutput {
return i.ToVirtualMachineArrayOutputWithContext(context.Background())
}
func (i VirtualMachineArray) ToVirtualMachineArrayOutputWithContext(ctx context.Context) VirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineArrayOutput)
}
// VirtualMachineMapInput is an input type that accepts VirtualMachineMap and VirtualMachineMapOutput values.
// You can construct a concrete instance of `VirtualMachineMapInput` via:
//
// VirtualMachineMap{ "key": VirtualMachineArgs{...} }
type VirtualMachineMapInput interface {
pulumi.Input
ToVirtualMachineMapOutput() VirtualMachineMapOutput
ToVirtualMachineMapOutputWithContext(context.Context) VirtualMachineMapOutput
}
type VirtualMachineMap map[string]VirtualMachineInput
func (VirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachine)(nil)).Elem()
}
func (i VirtualMachineMap) ToVirtualMachineMapOutput() VirtualMachineMapOutput {
return i.ToVirtualMachineMapOutputWithContext(context.Background())
}
func (i VirtualMachineMap) ToVirtualMachineMapOutputWithContext(ctx context.Context) VirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineMapOutput)
}
type VirtualMachineOutput struct{ *pulumi.OutputState }
func (VirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineOutput) ToVirtualMachineOutput() VirtualMachineOutput {
return o
}
func (o VirtualMachineOutput) ToVirtualMachineOutputWithContext(ctx context.Context) VirtualMachineOutput {
return o
}
// An `assessment` block as defined below.
func (o VirtualMachineOutput) Assessment() VirtualMachineAssessmentPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineAssessmentPtrOutput { return v.Assessment }).(VirtualMachineAssessmentPtrOutput)
}
// An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
func (o VirtualMachineOutput) AutoBackup() VirtualMachineAutoBackupPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineAutoBackupPtrOutput { return v.AutoBackup }).(VirtualMachineAutoBackupPtrOutput)
}
// An `autoPatching` block as defined below.
func (o VirtualMachineOutput) AutoPatching() VirtualMachineAutoPatchingPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineAutoPatchingPtrOutput { return v.AutoPatching }).(VirtualMachineAutoPatchingPtrOutput)
}
// An `keyVaultCredential` block as defined below.
func (o VirtualMachineOutput) KeyVaultCredential() VirtualMachineKeyVaultCredentialPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineKeyVaultCredentialPtrOutput { return v.KeyVaultCredential }).(VirtualMachineKeyVaultCredentialPtrOutput)
}
// Should R Services be enabled?
func (o VirtualMachineOutput) RServicesEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.BoolPtrOutput { return v.RServicesEnabled }).(pulumi.BoolPtrOutput)
}
// The SQL Server port. Defaults to `1433`.
func (o VirtualMachineOutput) SqlConnectivityPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.IntPtrOutput { return v.SqlConnectivityPort }).(pulumi.IntPtrOutput)
}
// The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
func (o VirtualMachineOutput) SqlConnectivityType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.SqlConnectivityType }).(pulumi.StringPtrOutput)
}
// The SQL Server sysadmin login password.
func (o VirtualMachineOutput) SqlConnectivityUpdatePassword() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.SqlConnectivityUpdatePassword }).(pulumi.StringPtrOutput)
}
// The SQL Server sysadmin login to create.
func (o VirtualMachineOutput) SqlConnectivityUpdateUsername() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.SqlConnectivityUpdateUsername }).(pulumi.StringPtrOutput)
}
// A `sqlInstance` block as defined below.
func (o VirtualMachineOutput) SqlInstance() VirtualMachineSqlInstancePtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineSqlInstancePtrOutput { return v.SqlInstance }).(VirtualMachineSqlInstancePtrOutput)
}
// The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
func (o VirtualMachineOutput) SqlLicenseType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.SqlLicenseType }).(pulumi.StringPtrOutput)
}
// The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
func (o VirtualMachineOutput) SqlVirtualMachineGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringPtrOutput { return v.SqlVirtualMachineGroupId }).(pulumi.StringPtrOutput)
}
// An `storageConfiguration` block as defined below.
func (o VirtualMachineOutput) StorageConfiguration() VirtualMachineStorageConfigurationPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineStorageConfigurationPtrOutput { return v.StorageConfiguration }).(VirtualMachineStorageConfigurationPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o VirtualMachineOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Virtual Machine. Changing this forces a new resource to be created.
func (o VirtualMachineOutput) VirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachine) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput)
}
// A `wsfcDomainCredential` block as defined below
func (o VirtualMachineOutput) WsfcDomainCredential() VirtualMachineWsfcDomainCredentialPtrOutput {
return o.ApplyT(func(v *VirtualMachine) VirtualMachineWsfcDomainCredentialPtrOutput { return v.WsfcDomainCredential }).(VirtualMachineWsfcDomainCredentialPtrOutput)
}
type VirtualMachineArrayOutput struct{ *pulumi.OutputState }
func (VirtualMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineArrayOutput) ToVirtualMachineArrayOutput() VirtualMachineArrayOutput {
return o
}
func (o VirtualMachineArrayOutput) ToVirtualMachineArrayOutputWithContext(ctx context.Context) VirtualMachineArrayOutput {
return o
}
func (o VirtualMachineArrayOutput) Index(i pulumi.IntInput) VirtualMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachine {
return vs[0].([]*VirtualMachine)[vs[1].(int)]
}).(VirtualMachineOutput)
}
type VirtualMachineMapOutput struct{ *pulumi.OutputState }
func (VirtualMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachine)(nil)).Elem()
}
func (o VirtualMachineMapOutput) ToVirtualMachineMapOutput() VirtualMachineMapOutput {
return o
}
func (o VirtualMachineMapOutput) ToVirtualMachineMapOutputWithContext(ctx context.Context) VirtualMachineMapOutput {
return o
}
func (o VirtualMachineMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachine {
return vs[0].(map[string]*VirtualMachine)[vs[1].(string)]
}).(VirtualMachineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineInput)(nil)).Elem(), &VirtualMachine{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineArrayInput)(nil)).Elem(), VirtualMachineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineMapInput)(nil)).Elem(), VirtualMachineMap{})
pulumi.RegisterOutputType(VirtualMachineOutput{})
pulumi.RegisterOutputType(VirtualMachineArrayOutput{})
pulumi.RegisterOutputType(VirtualMachineMapOutput{})
}
| 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/mssql/database.go | sdk/go/azure/mssql/database.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// LicenseType: pulumi.String("LicenseIncluded"),
// MaxSizeGb: pulumi.Float64(2),
// SkuName: pulumi.String("S0"),
// EnclaveType: pulumi.String("VBS"),
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Transparent Data Encryption(TDE) With A Customer Managed Key(CMK) During Create
// ```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/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// Name: pulumi.String("example-admin"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, 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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-sqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// // Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("mssqltdeexample"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: exampleUserAssignedIdentity.TenantId,
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(true),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.Any(current.TenantId),
// ObjectId: pulumi.Any(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("Update"),
// pulumi.String("Recover"),
// pulumi.String("Purge"),
// pulumi.String("GetRotationPolicy"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleUserAssignedIdentity.TenantId,
// ObjectId: exampleUserAssignedIdentity.PrincipalId,
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("WrapKey"),
// pulumi.String("UnwrapKey"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("example-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("unwrapKey"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// LicenseType: pulumi.String("LicenseIncluded"),
// MaxSizeGb: pulumi.Float64(4),
// ReadScale: pulumi.Bool(true),
// SkuName: pulumi.String("S0"),
// ZoneRedundant: pulumi.Bool(true),
// EnclaveType: pulumi.String("VBS"),
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// Identity: &mssql.DatabaseIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// TransparentDataEncryptionKeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Database can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/database:Database example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/example1
// ```
type Database struct {
pulumi.CustomResourceState
// Time in minutes after which database is automatically paused. A value of `-1` means that automatic pause is disabled. This property is only settable for Serverless databases.
AutoPauseDelayInMinutes pulumi.IntOutput `pulumi:"autoPauseDelayInMinutes"`
// Specifies the collation of the database. Changing this forces a new resource to be created.
Collation pulumi.StringOutput `pulumi:"collation"`
// The create mode of the database. Possible values are `Copy`, `Default`, `OnlineSecondary`, `PointInTimeRestore`, `Recovery`, `Restore`, `RestoreExternalBackup`, `RestoreExternalBackupSecondary`, `RestoreLongTermRetentionBackup` and `Secondary`. Mutually exclusive with `import`. Changing this forces a new resource to be created. Defaults to `Default`.
CreateMode pulumi.StringPtrOutput `pulumi:"createMode"`
// The ID of the source database from which to create the new database. This should only be used for databases with `createMode` values that use another database as reference. Changing this forces a new resource to be created.
//
// > **Note:** When configuring a secondary database, please be aware of the constraints for the `skuName` property, as noted below, for both the primary and secondary databases. The `skuName` of the secondary database may be inadvertently changed to match that of the primary when an incompatible combination of SKUs is detected by the provider.
CreationSourceDatabaseId pulumi.StringOutput `pulumi:"creationSourceDatabaseId"`
// Specifies the ID of the elastic pool containing this database.
ElasticPoolId pulumi.StringPtrOutput `pulumi:"elasticPoolId"`
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the database. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** `enclaveType` is currently not supported for DW (e.g, DataWarehouse) and DC-series SKUs.
//
// > **Note:** Geo Replicated and Failover databases must have the same `enclaveType`.
//
// > **Note:** The default value for the `enclaveType` field is unset not `Default`.
EnclaveType pulumi.StringOutput `pulumi:"enclaveType"`
// A boolean that specifies if the Geo Backup Policy is enabled. Defaults to `true`.
//
// > **Note:** `geoBackupEnabled` is only applicable for DataWarehouse SKUs (DW*). This setting is ignored for all other SKUs.
GeoBackupEnabled pulumi.BoolPtrOutput `pulumi:"geoBackupEnabled"`
// An `identity` block as defined below.
Identity DatabaseIdentityPtrOutput `pulumi:"identity"`
// A `import` block as documented below. Mutually exclusive with `createMode`.
Import DatabaseImportPtrOutput `pulumi:"import"`
// A boolean that specifies if this is a ledger database. Defaults to `false`. Changing this forces a new resource to be created.
LedgerEnabled pulumi.BoolOutput `pulumi:"ledgerEnabled"`
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
LicenseType pulumi.StringOutput `pulumi:"licenseType"`
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy DatabaseLongTermRetentionPolicyOutput `pulumi:"longTermRetentionPolicy"`
// The name of the Public Maintenance Configuration window to apply to the database. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
//
// > **Note:** `maintenanceConfigurationName` is only applicable if `elasticPoolId` is not set.
MaintenanceConfigurationName pulumi.StringOutput `pulumi:"maintenanceConfigurationName"`
// The max size of the database in gigabytes.
//
// > **Note:** This value should not be configured when the `createMode` is `Secondary` or `OnlineSecondary`, as the sizing of the primary is then used as per [Azure documentation](https://docs.microsoft.com/azure/azure-sql/database/single-database-scale#geo-replicated-database). The value of `maxSizeGb` accepts `0.1`, `0.5` and positive integers greater than or equal to 1. `0.1` means `100MB`, and `0.5` means `500MB`.
MaxSizeGb pulumi.Float64Output `pulumi:"maxSizeGb"`
// Minimal capacity that database will always have allocated, if not paused. This property is only settable for Serverless databases.
MinCapacity pulumi.Float64Output `pulumi:"minCapacity"`
// The name of the MS SQL Database. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
ReadReplicaCount pulumi.IntOutput `pulumi:"readReplicaCount"`
// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
ReadScale pulumi.BoolOutput `pulumi:"readScale"`
// The ID of the database to be recovered. This property is only applicable when the `createMode` is `Recovery`.
RecoverDatabaseId pulumi.StringPtrOutput `pulumi:"recoverDatabaseId"`
// The ID of the Recovery Services Recovery Point Id to be restored. This property is only applicable when the `createMode` is `Recovery`.
RecoveryPointId pulumi.StringPtrOutput `pulumi:"recoveryPointId"`
// The ID of the database to be restored. This property is only applicable when the `createMode` is `Restore`.
RestoreDroppedDatabaseId pulumi.StringPtrOutput `pulumi:"restoreDroppedDatabaseId"`
// The ID of the long term retention backup to be restored. This property is only applicable when the `createMode` is `RestoreLongTermRetentionBackup`.
RestoreLongTermRetentionBackupId pulumi.StringPtrOutput `pulumi:"restoreLongTermRetentionBackupId"`
// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for `createMode`= `PointInTimeRestore` databases.
RestorePointInTime pulumi.StringOutput `pulumi:"restorePointInTime"`
// Specifies the name of the sample schema to apply when creating this database. Possible value is `AdventureWorksLT`.
SampleName pulumi.StringOutput `pulumi:"sampleName"`
// How do you want your replica to be made? Valid values include `Geo`, `Named` and `Standby`. Defaults to `Geo`. Changing this forces a new resource to be created.
SecondaryType pulumi.StringOutput `pulumi:"secondaryType"`
// The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
//
// > **Note:** This setting is still required for "Serverless" SKUs
ServerId pulumi.StringOutput `pulumi:"serverId"`
// A `shortTermRetentionPolicy` block as defined below.
ShortTermRetentionPolicy DatabaseShortTermRetentionPolicyOutput `pulumi:"shortTermRetentionPolicy"`
// Specifies the name of the SKU used by the database. For example, `GP_S_Gen5_2`,`HS_Gen4_1`,`BC_Gen5_2`, `ElasticPool`, `Basic`,`S0`, `P2` ,`DW100c`, `DS100`. Changing this from the HyperScale service tier to another service tier will create a new resource.
//
// > **Note:** A full list of supported SKU names by region can be retrieved using the Azure CLI: `az sql db list-editions -l <region> -o table`
//
// > **Note:** The default `skuName` value may differ between Azure locations depending on local availability of Gen4/Gen5 capacity. When databases are replicated using the `creationSourceDatabaseId` property, the source (primary) database cannot have a higher SKU service tier than any secondary databases. When changing the `skuName` of a database having one or more secondary databases, this resource will first update any secondary databases as necessary. In such cases it's recommended to use the same `skuName` in your configuration for all related databases, as not doing so may cause an unresolvable diff during subsequent plans.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// Specifies the storage account type used to store backups for this database. Possible values are `Geo`, `GeoZone`, `Local` and `Zone`. Defaults to `Geo`.
StorageAccountType pulumi.StringPtrOutput `pulumi:"storageAccountType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Threat detection policy configuration. The `threatDetectionPolicy` block supports fields documented below.
ThreatDetectionPolicy DatabaseThreatDetectionPolicyOutput `pulumi:"threatDetectionPolicy"`
// If set to true, Transparent Data Encryption will be enabled on the database. Defaults to `true`.
//
// > **Note:** `transparentDataEncryptionEnabled` can only be set to `false` on DW (e.g, DataWarehouse) server SKUs.
TransparentDataEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"transparentDataEncryptionEnabled"`
// Boolean flag to specify whether TDE automatically rotates the encryption Key to latest version or not. Possible values are `true` or `false`. Defaults to `false`.
//
// > **Note:** When the `skuName` is `DW100c`, the `transparentDataEncryptionKeyAutomaticRotationEnabled` and the `transparentDataEncryptionKeyVaultKeyId` properties should not be specified, as database-level CMK is not supported for Data Warehouse SKUs.
TransparentDataEncryptionKeyAutomaticRotationEnabled pulumi.BoolPtrOutput `pulumi:"transparentDataEncryptionKeyAutomaticRotationEnabled"`
// The fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Database` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
TransparentDataEncryptionKeyVaultKeyId pulumi.StringPtrOutput `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
ZoneRedundant pulumi.BoolOutput `pulumi:"zoneRedundant"`
}
// NewDatabase registers a new resource with the given unique name, arguments, and options.
func NewDatabase(ctx *pulumi.Context,
name string, args *DatabaseArgs, opts ...pulumi.ResourceOption) (*Database, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/database:Database"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Database
err := ctx.RegisterResource("azure:mssql/database:Database", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatabase gets an existing Database 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 GetDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatabaseState, opts ...pulumi.ResourceOption) (*Database, error) {
var resource Database
err := ctx.ReadResource("azure:mssql/database:Database", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Database resources.
type databaseState struct {
// Time in minutes after which database is automatically paused. A value of `-1` means that automatic pause is disabled. This property is only settable for Serverless databases.
AutoPauseDelayInMinutes *int `pulumi:"autoPauseDelayInMinutes"`
// Specifies the collation of the database. Changing this forces a new resource to be created.
Collation *string `pulumi:"collation"`
// The create mode of the database. Possible values are `Copy`, `Default`, `OnlineSecondary`, `PointInTimeRestore`, `Recovery`, `Restore`, `RestoreExternalBackup`, `RestoreExternalBackupSecondary`, `RestoreLongTermRetentionBackup` and `Secondary`. Mutually exclusive with `import`. Changing this forces a new resource to be created. Defaults to `Default`.
CreateMode *string `pulumi:"createMode"`
// The ID of the source database from which to create the new database. This should only be used for databases with `createMode` values that use another database as reference. Changing this forces a new resource to be created.
//
// > **Note:** When configuring a secondary database, please be aware of the constraints for the `skuName` property, as noted below, for both the primary and secondary databases. The `skuName` of the secondary database may be inadvertently changed to match that of the primary when an incompatible combination of SKUs is detected by the provider.
CreationSourceDatabaseId *string `pulumi:"creationSourceDatabaseId"`
// Specifies the ID of the elastic pool containing this database.
ElasticPoolId *string `pulumi:"elasticPoolId"`
// Specifies the type of enclave to be used by the elastic pool. When `enclaveType` is not specified (e.g., the default) enclaves are not enabled on the database. Once enabled (e.g., by specifying `Default` or `VBS`) removing the `enclaveType` field from the configuration file will force the creation of a new resource. Possible values are `Default` or `VBS`.
//
// > **Note:** `enclaveType` is currently not supported for DW (e.g, DataWarehouse) and DC-series SKUs.
//
// > **Note:** Geo Replicated and Failover databases must have the same `enclaveType`.
//
// > **Note:** The default value for the `enclaveType` field is unset not `Default`.
EnclaveType *string `pulumi:"enclaveType"`
// A boolean that specifies if the Geo Backup Policy is enabled. Defaults to `true`.
//
// > **Note:** `geoBackupEnabled` is only applicable for DataWarehouse SKUs (DW*). This setting is ignored for all other SKUs.
GeoBackupEnabled *bool `pulumi:"geoBackupEnabled"`
// An `identity` block as defined below.
Identity *DatabaseIdentity `pulumi:"identity"`
// A `import` block as documented below. Mutually exclusive with `createMode`.
Import *DatabaseImport `pulumi:"import"`
// A boolean that specifies if this is a ledger database. Defaults to `false`. Changing this forces a new resource to be created.
LedgerEnabled *bool `pulumi:"ledgerEnabled"`
// Specifies the license type applied to this database. Possible values are `LicenseIncluded` and `BasePrice`.
LicenseType *string `pulumi:"licenseType"`
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy *DatabaseLongTermRetentionPolicy `pulumi:"longTermRetentionPolicy"`
// The name of the Public Maintenance Configuration window to apply to the database. Valid values include `SQL_Default`, `SQL_EastUS_DB_1`, `SQL_EastUS2_DB_1`, `SQL_SoutheastAsia_DB_1`, `SQL_AustraliaEast_DB_1`, `SQL_NorthEurope_DB_1`, `SQL_SouthCentralUS_DB_1`, `SQL_WestUS2_DB_1`, `SQL_UKSouth_DB_1`, `SQL_WestEurope_DB_1`, `SQL_EastUS_DB_2`, `SQL_EastUS2_DB_2`, `SQL_WestUS2_DB_2`, `SQL_SoutheastAsia_DB_2`, `SQL_AustraliaEast_DB_2`, `SQL_NorthEurope_DB_2`, `SQL_SouthCentralUS_DB_2`, `SQL_UKSouth_DB_2`, `SQL_WestEurope_DB_2`, `SQL_AustraliaSoutheast_DB_1`, `SQL_BrazilSouth_DB_1`, `SQL_CanadaCentral_DB_1`, `SQL_CanadaEast_DB_1`, `SQL_CentralUS_DB_1`, `SQL_EastAsia_DB_1`, `SQL_FranceCentral_DB_1`, `SQL_GermanyWestCentral_DB_1`, `SQL_CentralIndia_DB_1`, `SQL_SouthIndia_DB_1`, `SQL_JapanEast_DB_1`, `SQL_JapanWest_DB_1`, `SQL_NorthCentralUS_DB_1`, `SQL_UKWest_DB_1`, `SQL_WestUS_DB_1`, `SQL_AustraliaSoutheast_DB_2`, `SQL_BrazilSouth_DB_2`, `SQL_CanadaCentral_DB_2`, `SQL_CanadaEast_DB_2`, `SQL_CentralUS_DB_2`, `SQL_EastAsia_DB_2`, `SQL_FranceCentral_DB_2`, `SQL_GermanyWestCentral_DB_2`, `SQL_CentralIndia_DB_2`, `SQL_SouthIndia_DB_2`, `SQL_JapanEast_DB_2`, `SQL_JapanWest_DB_2`, `SQL_NorthCentralUS_DB_2`, `SQL_UKWest_DB_2`, `SQL_WestUS_DB_2`, `SQL_WestCentralUS_DB_1`, `SQL_FranceSouth_DB_1`, `SQL_WestCentralUS_DB_2`, `SQL_FranceSouth_DB_2`, `SQL_SwitzerlandNorth_DB_1`, `SQL_SwitzerlandNorth_DB_2`, `SQL_BrazilSoutheast_DB_1`, `SQL_UAENorth_DB_1`, `SQL_BrazilSoutheast_DB_2`, `SQL_UAENorth_DB_2`, `SQL_SouthAfricaNorth_DB_1`, `SQL_SouthAfricaNorth_DB_2`, `SQL_WestUS3_DB_1`, `SQL_WestUS3_DB_2`, `SQL_SwedenCentral_DB_1`, `SQL_SwedenCentral_DB_2`. Defaults to `SQL_Default`.
//
// > **Note:** `maintenanceConfigurationName` is only applicable if `elasticPoolId` is not set.
MaintenanceConfigurationName *string `pulumi:"maintenanceConfigurationName"`
// The max size of the database in gigabytes.
//
// > **Note:** This value should not be configured when the `createMode` is `Secondary` or `OnlineSecondary`, as the sizing of the primary is then used as per [Azure documentation](https://docs.microsoft.com/azure/azure-sql/database/single-database-scale#geo-replicated-database). The value of `maxSizeGb` accepts `0.1`, `0.5` and positive integers greater than or equal to 1. `0.1` means `100MB`, and `0.5` means `500MB`.
MaxSizeGb *float64 `pulumi:"maxSizeGb"`
// Minimal capacity that database will always have allocated, if not paused. This property is only settable for Serverless databases.
MinCapacity *float64 `pulumi:"minCapacity"`
// The name of the MS SQL Database. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
ReadReplicaCount *int `pulumi:"readReplicaCount"`
// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
ReadScale *bool `pulumi:"readScale"`
// The ID of the database to be recovered. This property is only applicable when the `createMode` is `Recovery`.
RecoverDatabaseId *string `pulumi:"recoverDatabaseId"`
// The ID of the Recovery Services Recovery Point Id to be restored. This property is only applicable when the `createMode` is `Recovery`.
RecoveryPointId *string `pulumi:"recoveryPointId"`
// The ID of the database to be restored. This property is only applicable when the `createMode` is `Restore`.
RestoreDroppedDatabaseId *string `pulumi:"restoreDroppedDatabaseId"`
// The ID of the long term retention backup to be restored. This property is only applicable when the `createMode` is `RestoreLongTermRetentionBackup`.
RestoreLongTermRetentionBackupId *string `pulumi:"restoreLongTermRetentionBackupId"`
// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for `createMode`= `PointInTimeRestore` databases.
RestorePointInTime *string `pulumi:"restorePointInTime"`
// Specifies the name of the sample schema to apply when creating this database. Possible value is `AdventureWorksLT`.
SampleName *string `pulumi:"sampleName"`
// How do you want your replica to be made? Valid values include `Geo`, `Named` and `Standby`. Defaults to `Geo`. Changing this forces a new resource to be created.
SecondaryType *string `pulumi:"secondaryType"`
// The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
//
// > **Note:** This setting is still required for "Serverless" SKUs
ServerId *string `pulumi:"serverId"`
// A `shortTermRetentionPolicy` block as defined below.
ShortTermRetentionPolicy *DatabaseShortTermRetentionPolicy `pulumi:"shortTermRetentionPolicy"`
// Specifies the name of the SKU used by the database. For example, `GP_S_Gen5_2`,`HS_Gen4_1`,`BC_Gen5_2`, `ElasticPool`, `Basic`,`S0`, `P2` ,`DW100c`, `DS100`. Changing this from the HyperScale service tier to another service tier will create a new resource.
//
// > **Note:** A full list of supported SKU names by region can be retrieved using the Azure CLI: `az sql db list-editions -l <region> -o table`
//
// > **Note:** The default `skuName` value may differ between Azure locations depending on local availability of Gen4/Gen5 capacity. When databases are replicated using the `creationSourceDatabaseId` property, the source (primary) database cannot have a higher SKU service tier than any secondary databases. When changing the `skuName` of a database having one or more secondary databases, this resource will first update any secondary databases as necessary. In such cases it's recommended to use the same `skuName` in your configuration for all related databases, as not doing so may cause an unresolvable diff during subsequent plans.
SkuName *string `pulumi:"skuName"`
// Specifies the storage account type used to store backups for this database. Possible values are `Geo`, `GeoZone`, `Local` and `Zone`. Defaults to `Geo`.
StorageAccountType *string `pulumi:"storageAccountType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Threat detection policy configuration. The `threatDetectionPolicy` block supports fields documented below.
ThreatDetectionPolicy *DatabaseThreatDetectionPolicy `pulumi:"threatDetectionPolicy"`
// If set to true, Transparent Data Encryption will be enabled on the database. Defaults to `true`.
//
// > **Note:** `transparentDataEncryptionEnabled` can only be set to `false` on DW (e.g, DataWarehouse) server SKUs.
TransparentDataEncryptionEnabled *bool `pulumi:"transparentDataEncryptionEnabled"`
// Boolean flag to specify whether TDE automatically rotates the encryption Key to latest version or not. Possible values are `true` or `false`. Defaults to `false`.
//
// > **Note:** When the `skuName` is `DW100c`, the `transparentDataEncryptionKeyAutomaticRotationEnabled` and the `transparentDataEncryptionKeyVaultKeyId` properties should not be specified, as database-level CMK is not supported for Data Warehouse SKUs.
TransparentDataEncryptionKeyAutomaticRotationEnabled *bool `pulumi:"transparentDataEncryptionKeyAutomaticRotationEnabled"`
// The fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Database` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
TransparentDataEncryptionKeyVaultKeyId *string `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
ZoneRedundant *bool `pulumi:"zoneRedundant"`
}
type DatabaseState struct {
| 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/mssql/managedInstanceTransparentDataEncryption.go | sdk/go/azure/mssql/managedInstanceTransparentDataEncryption.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the transparent data encryption configuration for a MSSQL Managed Instance
//
// > **Note:** Once transparent data encryption(TDE) is enabled on a MS SQL instance, it is not possible to remove TDE. You will be able to switch between 'ServiceManaged' and 'CustomerManaged' keys, but will not be able to remove encryption. For safety when this resource is deleted, the TDE mode will automatically be set to 'ServiceManaged'. See `keyVaultUri` for more information on how to specify the key types. As SQL Managed Instance only supports a single configuration for encryption settings, this resource will replace the current encryption settings on the server.
//
// > **Note:** See [documentation](https://docs.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview) for important information on how handle lifecycle management of the keys to prevent data lockout.
//
// ## Example Usage
//
// ### With Service Managed Key
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("acctest-vnet1-mssql"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: pulumi.Any(test.Location),
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnet1-mssql"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("mssqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
// Identity: &mssql.ManagedInstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceTransparentDataEncryption(ctx, "example", &mssql.ManagedInstanceTransparentDataEncryptionArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Customer Managed Key
//
// ```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/mssql"
// "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 {
// 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("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("acctest-vnet1-mssql"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: pulumi.Any(test.Location),
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnet1-mssql"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("mssqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
// Identity: &mssql.ManagedInstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// // Create a key vault with policies for the deployer to create a key & SQL Managed Instance to wrap/unwrap/get key
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: pulumi.String(current.TenantId),
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(false),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// 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("Update"),
// pulumi.String("Recover"),
// pulumi.String("Purge"),
// pulumi.String("GetRotationPolicy"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("WrapKey"),
// pulumi.String("UnwrapKey"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("byok"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("unwrapKey"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceTransparentDataEncryption(ctx, "example", &mssql.ManagedInstanceTransparentDataEncryptionArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Managed Instance Transparent Data Encryption can be imported using the resource id, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/instance1/encryptionProtector/current
// ```
type ManagedInstanceTransparentDataEncryption struct {
pulumi.CustomResourceState
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrOutput `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrOutput `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
}
// NewManagedInstanceTransparentDataEncryption registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceTransparentDataEncryption(ctx *pulumi.Context,
name string, args *ManagedInstanceTransparentDataEncryptionArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceTransparentDataEncryption, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceTransparentDataEncryption
err := ctx.RegisterResource("azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceTransparentDataEncryption gets an existing ManagedInstanceTransparentDataEncryption 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 GetManagedInstanceTransparentDataEncryption(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceTransparentDataEncryptionState, opts ...pulumi.ResourceOption) (*ManagedInstanceTransparentDataEncryption, error) {
var resource ManagedInstanceTransparentDataEncryption
err := ctx.ReadResource("azure:mssql/managedInstanceTransparentDataEncryption:ManagedInstanceTransparentDataEncryption", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceTransparentDataEncryption resources.
type managedInstanceTransparentDataEncryptionState struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
}
type ManagedInstanceTransparentDataEncryptionState struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
}
func (ManagedInstanceTransparentDataEncryptionState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceTransparentDataEncryptionState)(nil)).Elem()
}
type managedInstanceTransparentDataEncryptionArgs struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
}
// The set of arguments for constructing a ManagedInstanceTransparentDataEncryption resource.
type ManagedInstanceTransparentDataEncryptionArgs struct {
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
}
func (ManagedInstanceTransparentDataEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceTransparentDataEncryptionArgs)(nil)).Elem()
}
type ManagedInstanceTransparentDataEncryptionInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput
ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput
}
func (*ManagedInstanceTransparentDataEncryption) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i *ManagedInstanceTransparentDataEncryption) ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput {
return i.ToManagedInstanceTransparentDataEncryptionOutputWithContext(context.Background())
}
func (i *ManagedInstanceTransparentDataEncryption) ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionOutput)
}
// ManagedInstanceTransparentDataEncryptionArrayInput is an input type that accepts ManagedInstanceTransparentDataEncryptionArray and ManagedInstanceTransparentDataEncryptionArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceTransparentDataEncryptionArrayInput` via:
//
// ManagedInstanceTransparentDataEncryptionArray{ ManagedInstanceTransparentDataEncryptionArgs{...} }
type ManagedInstanceTransparentDataEncryptionArrayInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput
ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput
}
type ManagedInstanceTransparentDataEncryptionArray []ManagedInstanceTransparentDataEncryptionInput
func (ManagedInstanceTransparentDataEncryptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i ManagedInstanceTransparentDataEncryptionArray) ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput {
return i.ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceTransparentDataEncryptionArray) ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionArrayOutput)
}
// ManagedInstanceTransparentDataEncryptionMapInput is an input type that accepts ManagedInstanceTransparentDataEncryptionMap and ManagedInstanceTransparentDataEncryptionMapOutput values.
// You can construct a concrete instance of `ManagedInstanceTransparentDataEncryptionMapInput` via:
//
// ManagedInstanceTransparentDataEncryptionMap{ "key": ManagedInstanceTransparentDataEncryptionArgs{...} }
type ManagedInstanceTransparentDataEncryptionMapInput interface {
pulumi.Input
ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput
ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(context.Context) ManagedInstanceTransparentDataEncryptionMapOutput
}
type ManagedInstanceTransparentDataEncryptionMap map[string]ManagedInstanceTransparentDataEncryptionInput
func (ManagedInstanceTransparentDataEncryptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (i ManagedInstanceTransparentDataEncryptionMap) ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput {
return i.ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(context.Background())
}
func (i ManagedInstanceTransparentDataEncryptionMap) ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceTransparentDataEncryptionMapOutput)
}
type ManagedInstanceTransparentDataEncryptionOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionOutput) ToManagedInstanceTransparentDataEncryptionOutput() ManagedInstanceTransparentDataEncryptionOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionOutput) ToManagedInstanceTransparentDataEncryptionOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionOutput {
return o
}
// When enabled, the SQL Managed Instance will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the SQL Managed Instance will be automatically rotated to the latest key version within 60 minutes.
func (o ManagedInstanceTransparentDataEncryptionOutput) AutoRotationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.BoolPtrOutput { return v.AutoRotationEnabled }).(pulumi.BoolPtrOutput)
}
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
func (o ManagedInstanceTransparentDataEncryptionOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL Managed Instance must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `managedInstanceId` denotes a secondary instance deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary instance's transparent data encryption. Both primary and secondary instances should be encrypted with same key material.
func (o ManagedInstanceTransparentDataEncryptionOutput) ManagedHsmKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.StringPtrOutput { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
func (o ManagedInstanceTransparentDataEncryptionOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceTransparentDataEncryption) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
type ManagedInstanceTransparentDataEncryptionArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) ToManagedInstanceTransparentDataEncryptionArrayOutput() ManagedInstanceTransparentDataEncryptionArrayOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) ToManagedInstanceTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionArrayOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionArrayOutput) Index(i pulumi.IntInput) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceTransparentDataEncryption {
return vs[0].([]*ManagedInstanceTransparentDataEncryption)[vs[1].(int)]
}).(ManagedInstanceTransparentDataEncryptionOutput)
}
type ManagedInstanceTransparentDataEncryptionMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceTransparentDataEncryptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceTransparentDataEncryption)(nil)).Elem()
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) ToManagedInstanceTransparentDataEncryptionMapOutput() ManagedInstanceTransparentDataEncryptionMapOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) ToManagedInstanceTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ManagedInstanceTransparentDataEncryptionMapOutput {
return o
}
func (o ManagedInstanceTransparentDataEncryptionMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceTransparentDataEncryptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceTransparentDataEncryption {
return vs[0].(map[string]*ManagedInstanceTransparentDataEncryption)[vs[1].(string)]
}).(ManagedInstanceTransparentDataEncryptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionInput)(nil)).Elem(), &ManagedInstanceTransparentDataEncryption{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionArrayInput)(nil)).Elem(), ManagedInstanceTransparentDataEncryptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceTransparentDataEncryptionMapInput)(nil)).Elem(), ManagedInstanceTransparentDataEncryptionMap{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionOutput{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceTransparentDataEncryptionMapOutput{})
}
| 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/mssql/jobCredential.go | sdk/go/azure/mssql/jobCredential.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Elastic Job Credential.
//
// ## 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/mssql"
// "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("northeurope"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// exampleJobAgent, err := mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.ID(),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobCredential(ctx, "example", &mssql.JobCredentialArgs{
// Name: pulumi.String("example-credential"),
// JobAgentId: exampleJobAgent.ID(),
// Username: pulumi.String("my-username"),
// Password: pulumi.String("MyP4ssw0rd!!!"),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Elastic Job Credentials can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/jobCredential:JobCredential example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/credentials/credential1
// ```
type JobCredential struct {
pulumi.CustomResourceState
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
JobAgentId pulumi.StringOutput `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The password to use for this Elastic Job credential.
Password pulumi.StringPtrOutput `pulumi:"password"`
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
PasswordWoVersion pulumi.IntPtrOutput `pulumi:"passwordWoVersion"`
// The username to use for this Elastic Job credential.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewJobCredential registers a new resource with the given unique name, arguments, and options.
func NewJobCredential(ctx *pulumi.Context,
name string, args *JobCredentialArgs, opts ...pulumi.ResourceOption) (*JobCredential, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.JobAgentId == nil {
return nil, errors.New("invalid value for required argument 'JobAgentId'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobCredential
err := ctx.RegisterResource("azure:mssql/jobCredential:JobCredential", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobCredential gets an existing JobCredential 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 GetJobCredential(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobCredentialState, opts ...pulumi.ResourceOption) (*JobCredential, error) {
var resource JobCredential
err := ctx.ReadResource("azure:mssql/jobCredential:JobCredential", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobCredential resources.
type jobCredentialState struct {
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
JobAgentId *string `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Name *string `pulumi:"name"`
// The password to use for this Elastic Job credential.
Password *string `pulumi:"password"`
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
PasswordWoVersion *int `pulumi:"passwordWoVersion"`
// The username to use for this Elastic Job credential.
Username *string `pulumi:"username"`
}
type JobCredentialState struct {
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
JobAgentId pulumi.StringPtrInput
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Name pulumi.StringPtrInput
// The password to use for this Elastic Job credential.
Password pulumi.StringPtrInput
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
PasswordWoVersion pulumi.IntPtrInput
// The username to use for this Elastic Job credential.
Username pulumi.StringPtrInput
}
func (JobCredentialState) ElementType() reflect.Type {
return reflect.TypeOf((*jobCredentialState)(nil)).Elem()
}
type jobCredentialArgs struct {
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
JobAgentId string `pulumi:"jobAgentId"`
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Name *string `pulumi:"name"`
// The password to use for this Elastic Job credential.
Password *string `pulumi:"password"`
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
PasswordWoVersion *int `pulumi:"passwordWoVersion"`
// The username to use for this Elastic Job credential.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a JobCredential resource.
type JobCredentialArgs struct {
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
JobAgentId pulumi.StringInput
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Name pulumi.StringPtrInput
// The password to use for this Elastic Job credential.
Password pulumi.StringPtrInput
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
PasswordWoVersion pulumi.IntPtrInput
// The username to use for this Elastic Job credential.
Username pulumi.StringInput
}
func (JobCredentialArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobCredentialArgs)(nil)).Elem()
}
type JobCredentialInput interface {
pulumi.Input
ToJobCredentialOutput() JobCredentialOutput
ToJobCredentialOutputWithContext(ctx context.Context) JobCredentialOutput
}
func (*JobCredential) ElementType() reflect.Type {
return reflect.TypeOf((**JobCredential)(nil)).Elem()
}
func (i *JobCredential) ToJobCredentialOutput() JobCredentialOutput {
return i.ToJobCredentialOutputWithContext(context.Background())
}
func (i *JobCredential) ToJobCredentialOutputWithContext(ctx context.Context) JobCredentialOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobCredentialOutput)
}
// JobCredentialArrayInput is an input type that accepts JobCredentialArray and JobCredentialArrayOutput values.
// You can construct a concrete instance of `JobCredentialArrayInput` via:
//
// JobCredentialArray{ JobCredentialArgs{...} }
type JobCredentialArrayInput interface {
pulumi.Input
ToJobCredentialArrayOutput() JobCredentialArrayOutput
ToJobCredentialArrayOutputWithContext(context.Context) JobCredentialArrayOutput
}
type JobCredentialArray []JobCredentialInput
func (JobCredentialArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobCredential)(nil)).Elem()
}
func (i JobCredentialArray) ToJobCredentialArrayOutput() JobCredentialArrayOutput {
return i.ToJobCredentialArrayOutputWithContext(context.Background())
}
func (i JobCredentialArray) ToJobCredentialArrayOutputWithContext(ctx context.Context) JobCredentialArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobCredentialArrayOutput)
}
// JobCredentialMapInput is an input type that accepts JobCredentialMap and JobCredentialMapOutput values.
// You can construct a concrete instance of `JobCredentialMapInput` via:
//
// JobCredentialMap{ "key": JobCredentialArgs{...} }
type JobCredentialMapInput interface {
pulumi.Input
ToJobCredentialMapOutput() JobCredentialMapOutput
ToJobCredentialMapOutputWithContext(context.Context) JobCredentialMapOutput
}
type JobCredentialMap map[string]JobCredentialInput
func (JobCredentialMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobCredential)(nil)).Elem()
}
func (i JobCredentialMap) ToJobCredentialMapOutput() JobCredentialMapOutput {
return i.ToJobCredentialMapOutputWithContext(context.Background())
}
func (i JobCredentialMap) ToJobCredentialMapOutputWithContext(ctx context.Context) JobCredentialMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobCredentialMapOutput)
}
type JobCredentialOutput struct{ *pulumi.OutputState }
func (JobCredentialOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobCredential)(nil)).Elem()
}
func (o JobCredentialOutput) ToJobCredentialOutput() JobCredentialOutput {
return o
}
func (o JobCredentialOutput) ToJobCredentialOutputWithContext(ctx context.Context) JobCredentialOutput {
return o
}
// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
func (o JobCredentialOutput) JobAgentId() pulumi.StringOutput {
return o.ApplyT(func(v *JobCredential) pulumi.StringOutput { return v.JobAgentId }).(pulumi.StringOutput)
}
// The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
func (o JobCredentialOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *JobCredential) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The password to use for this Elastic Job credential.
func (o JobCredentialOutput) Password() pulumi.StringPtrOutput {
return o.ApplyT(func(v *JobCredential) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput)
}
// An integer value used to trigger an update for `passwordWo`. This property should be incremented when updating `passwordWo`.
func (o JobCredentialOutput) PasswordWoVersion() pulumi.IntPtrOutput {
return o.ApplyT(func(v *JobCredential) pulumi.IntPtrOutput { return v.PasswordWoVersion }).(pulumi.IntPtrOutput)
}
// The username to use for this Elastic Job credential.
func (o JobCredentialOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *JobCredential) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type JobCredentialArrayOutput struct{ *pulumi.OutputState }
func (JobCredentialArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobCredential)(nil)).Elem()
}
func (o JobCredentialArrayOutput) ToJobCredentialArrayOutput() JobCredentialArrayOutput {
return o
}
func (o JobCredentialArrayOutput) ToJobCredentialArrayOutputWithContext(ctx context.Context) JobCredentialArrayOutput {
return o
}
func (o JobCredentialArrayOutput) Index(i pulumi.IntInput) JobCredentialOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobCredential {
return vs[0].([]*JobCredential)[vs[1].(int)]
}).(JobCredentialOutput)
}
type JobCredentialMapOutput struct{ *pulumi.OutputState }
func (JobCredentialMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobCredential)(nil)).Elem()
}
func (o JobCredentialMapOutput) ToJobCredentialMapOutput() JobCredentialMapOutput {
return o
}
func (o JobCredentialMapOutput) ToJobCredentialMapOutputWithContext(ctx context.Context) JobCredentialMapOutput {
return o
}
func (o JobCredentialMapOutput) MapIndex(k pulumi.StringInput) JobCredentialOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobCredential {
return vs[0].(map[string]*JobCredential)[vs[1].(string)]
}).(JobCredentialOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobCredentialInput)(nil)).Elem(), &JobCredential{})
pulumi.RegisterInputType(reflect.TypeOf((*JobCredentialArrayInput)(nil)).Elem(), JobCredentialArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobCredentialMapInput)(nil)).Elem(), JobCredentialMap{})
pulumi.RegisterOutputType(JobCredentialOutput{})
pulumi.RegisterOutputType(JobCredentialArrayOutput{})
pulumi.RegisterOutputType(JobCredentialMapOutput{})
}
| 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/mssql/managedInstanceActiveDirectoryAdministrator.go | sdk/go/azure/mssql/managedInstanceActiveDirectoryAdministrator.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows you to set a user, group or service principal as the AAD Administrator for an Azure SQL Managed Instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
// "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("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example"),
// 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"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("managedsqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("msadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// Identity: &mssql.ManagedInstanceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// reader, err := azuread.NewDirectoryRole(ctx, "reader", &azuread.DirectoryRoleArgs{
// DisplayName: pulumi.String("Directory Readers"),
// })
// if err != nil {
// return err
// }
// _, err = azuread.NewDirectoryRoleMember(ctx, "example", &azuread.DirectoryRoleMemberArgs{
// RoleObjectId: reader.ObjectId,
// MemberObjectId: pulumi.String(exampleManagedInstance.Identity.ApplyT(func(identity mssql.ManagedInstanceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// })
// if err != nil {
// return err
// }
// admin, err := azuread.NewUser(ctx, "admin", &azuread.UserArgs{
// UserPrincipalName: pulumi.String("ms.admin@example.com"),
// DisplayName: pulumi.String("Ms Admin"),
// MailNickname: pulumi.String("ms.admin"),
// Password: pulumi.String("SecretP@sswd99!"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceActiveDirectoryAdministrator(ctx, "example", &mssql.ManagedInstanceActiveDirectoryAdministratorArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// LoginUsername: pulumi.String("msadmin"),
// ObjectId: admin.ObjectId,
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// An Azure SQL Active Directory Administrator can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/mymanagedinstance/administrators/activeDirectory
// ```
type ManagedInstanceActiveDirectoryAdministrator struct {
pulumi.CustomResourceState
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
AzureadAuthenticationOnly pulumi.BoolPtrOutput `pulumi:"azureadAuthenticationOnly"`
// The login name of the principal to set as the Managed Instance Administrator.
LoginUsername pulumi.StringOutput `pulumi:"loginUsername"`
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
// The Object ID of the principal to set as the Managed Instance Administrator.
ObjectId pulumi.StringOutput `pulumi:"objectId"`
// The Azure Active Directory Tenant ID.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewManagedInstanceActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceActiveDirectoryAdministrator(ctx *pulumi.Context,
name string, args *ManagedInstanceActiveDirectoryAdministratorArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LoginUsername == nil {
return nil, errors.New("invalid value for required argument 'LoginUsername'")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
if args.ObjectId == nil {
return nil, errors.New("invalid value for required argument 'ObjectId'")
}
if args.TenantId == nil {
return nil, errors.New("invalid value for required argument 'TenantId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceActiveDirectoryAdministrator
err := ctx.RegisterResource("azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceActiveDirectoryAdministrator gets an existing ManagedInstanceActiveDirectoryAdministrator 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 GetManagedInstanceActiveDirectoryAdministrator(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceActiveDirectoryAdministratorState, opts ...pulumi.ResourceOption) (*ManagedInstanceActiveDirectoryAdministrator, error) {
var resource ManagedInstanceActiveDirectoryAdministrator
err := ctx.ReadResource("azure:mssql/managedInstanceActiveDirectoryAdministrator:ManagedInstanceActiveDirectoryAdministrator", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceActiveDirectoryAdministrator resources.
type managedInstanceActiveDirectoryAdministratorState struct {
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
AzureadAuthenticationOnly *bool `pulumi:"azureadAuthenticationOnly"`
// The login name of the principal to set as the Managed Instance Administrator.
LoginUsername *string `pulumi:"loginUsername"`
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
// The Object ID of the principal to set as the Managed Instance Administrator.
ObjectId *string `pulumi:"objectId"`
// The Azure Active Directory Tenant ID.
TenantId *string `pulumi:"tenantId"`
}
type ManagedInstanceActiveDirectoryAdministratorState struct {
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
AzureadAuthenticationOnly pulumi.BoolPtrInput
// The login name of the principal to set as the Managed Instance Administrator.
LoginUsername pulumi.StringPtrInput
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
// The Object ID of the principal to set as the Managed Instance Administrator.
ObjectId pulumi.StringPtrInput
// The Azure Active Directory Tenant ID.
TenantId pulumi.StringPtrInput
}
func (ManagedInstanceActiveDirectoryAdministratorState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceActiveDirectoryAdministratorState)(nil)).Elem()
}
type managedInstanceActiveDirectoryAdministratorArgs struct {
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
AzureadAuthenticationOnly *bool `pulumi:"azureadAuthenticationOnly"`
// The login name of the principal to set as the Managed Instance Administrator.
LoginUsername string `pulumi:"loginUsername"`
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The Object ID of the principal to set as the Managed Instance Administrator.
ObjectId string `pulumi:"objectId"`
// The Azure Active Directory Tenant ID.
TenantId string `pulumi:"tenantId"`
}
// The set of arguments for constructing a ManagedInstanceActiveDirectoryAdministrator resource.
type ManagedInstanceActiveDirectoryAdministratorArgs struct {
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
AzureadAuthenticationOnly pulumi.BoolPtrInput
// The login name of the principal to set as the Managed Instance Administrator.
LoginUsername pulumi.StringInput
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
// The Object ID of the principal to set as the Managed Instance Administrator.
ObjectId pulumi.StringInput
// The Azure Active Directory Tenant ID.
TenantId pulumi.StringInput
}
func (ManagedInstanceActiveDirectoryAdministratorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceActiveDirectoryAdministratorArgs)(nil)).Elem()
}
type ManagedInstanceActiveDirectoryAdministratorInput interface {
pulumi.Input
ToManagedInstanceActiveDirectoryAdministratorOutput() ManagedInstanceActiveDirectoryAdministratorOutput
ToManagedInstanceActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorOutput
}
func (*ManagedInstanceActiveDirectoryAdministrator) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (i *ManagedInstanceActiveDirectoryAdministrator) ToManagedInstanceActiveDirectoryAdministratorOutput() ManagedInstanceActiveDirectoryAdministratorOutput {
return i.ToManagedInstanceActiveDirectoryAdministratorOutputWithContext(context.Background())
}
func (i *ManagedInstanceActiveDirectoryAdministrator) ToManagedInstanceActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceActiveDirectoryAdministratorOutput)
}
// ManagedInstanceActiveDirectoryAdministratorArrayInput is an input type that accepts ManagedInstanceActiveDirectoryAdministratorArray and ManagedInstanceActiveDirectoryAdministratorArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceActiveDirectoryAdministratorArrayInput` via:
//
// ManagedInstanceActiveDirectoryAdministratorArray{ ManagedInstanceActiveDirectoryAdministratorArgs{...} }
type ManagedInstanceActiveDirectoryAdministratorArrayInput interface {
pulumi.Input
ToManagedInstanceActiveDirectoryAdministratorArrayOutput() ManagedInstanceActiveDirectoryAdministratorArrayOutput
ToManagedInstanceActiveDirectoryAdministratorArrayOutputWithContext(context.Context) ManagedInstanceActiveDirectoryAdministratorArrayOutput
}
type ManagedInstanceActiveDirectoryAdministratorArray []ManagedInstanceActiveDirectoryAdministratorInput
func (ManagedInstanceActiveDirectoryAdministratorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (i ManagedInstanceActiveDirectoryAdministratorArray) ToManagedInstanceActiveDirectoryAdministratorArrayOutput() ManagedInstanceActiveDirectoryAdministratorArrayOutput {
return i.ToManagedInstanceActiveDirectoryAdministratorArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceActiveDirectoryAdministratorArray) ToManagedInstanceActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceActiveDirectoryAdministratorArrayOutput)
}
// ManagedInstanceActiveDirectoryAdministratorMapInput is an input type that accepts ManagedInstanceActiveDirectoryAdministratorMap and ManagedInstanceActiveDirectoryAdministratorMapOutput values.
// You can construct a concrete instance of `ManagedInstanceActiveDirectoryAdministratorMapInput` via:
//
// ManagedInstanceActiveDirectoryAdministratorMap{ "key": ManagedInstanceActiveDirectoryAdministratorArgs{...} }
type ManagedInstanceActiveDirectoryAdministratorMapInput interface {
pulumi.Input
ToManagedInstanceActiveDirectoryAdministratorMapOutput() ManagedInstanceActiveDirectoryAdministratorMapOutput
ToManagedInstanceActiveDirectoryAdministratorMapOutputWithContext(context.Context) ManagedInstanceActiveDirectoryAdministratorMapOutput
}
type ManagedInstanceActiveDirectoryAdministratorMap map[string]ManagedInstanceActiveDirectoryAdministratorInput
func (ManagedInstanceActiveDirectoryAdministratorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (i ManagedInstanceActiveDirectoryAdministratorMap) ToManagedInstanceActiveDirectoryAdministratorMapOutput() ManagedInstanceActiveDirectoryAdministratorMapOutput {
return i.ToManagedInstanceActiveDirectoryAdministratorMapOutputWithContext(context.Background())
}
func (i ManagedInstanceActiveDirectoryAdministratorMap) ToManagedInstanceActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceActiveDirectoryAdministratorMapOutput)
}
type ManagedInstanceActiveDirectoryAdministratorOutput struct{ *pulumi.OutputState }
func (ManagedInstanceActiveDirectoryAdministratorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (o ManagedInstanceActiveDirectoryAdministratorOutput) ToManagedInstanceActiveDirectoryAdministratorOutput() ManagedInstanceActiveDirectoryAdministratorOutput {
return o
}
func (o ManagedInstanceActiveDirectoryAdministratorOutput) ToManagedInstanceActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorOutput {
return o
}
// When `true`, only permit logins from AAD users and administrators. When `false`, also allow local database users.
func (o ManagedInstanceActiveDirectoryAdministratorOutput) AzureadAuthenticationOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceActiveDirectoryAdministrator) pulumi.BoolPtrOutput {
return v.AzureadAuthenticationOnly
}).(pulumi.BoolPtrOutput)
}
// The login name of the principal to set as the Managed Instance Administrator.
func (o ManagedInstanceActiveDirectoryAdministratorOutput) LoginUsername() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceActiveDirectoryAdministrator) pulumi.StringOutput { return v.LoginUsername }).(pulumi.StringOutput)
}
// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created.
func (o ManagedInstanceActiveDirectoryAdministratorOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceActiveDirectoryAdministrator) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// The Object ID of the principal to set as the Managed Instance Administrator.
func (o ManagedInstanceActiveDirectoryAdministratorOutput) ObjectId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceActiveDirectoryAdministrator) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput)
}
// The Azure Active Directory Tenant ID.
func (o ManagedInstanceActiveDirectoryAdministratorOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceActiveDirectoryAdministrator) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
type ManagedInstanceActiveDirectoryAdministratorArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceActiveDirectoryAdministratorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (o ManagedInstanceActiveDirectoryAdministratorArrayOutput) ToManagedInstanceActiveDirectoryAdministratorArrayOutput() ManagedInstanceActiveDirectoryAdministratorArrayOutput {
return o
}
func (o ManagedInstanceActiveDirectoryAdministratorArrayOutput) ToManagedInstanceActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorArrayOutput {
return o
}
func (o ManagedInstanceActiveDirectoryAdministratorArrayOutput) Index(i pulumi.IntInput) ManagedInstanceActiveDirectoryAdministratorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceActiveDirectoryAdministrator {
return vs[0].([]*ManagedInstanceActiveDirectoryAdministrator)[vs[1].(int)]
}).(ManagedInstanceActiveDirectoryAdministratorOutput)
}
type ManagedInstanceActiveDirectoryAdministratorMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceActiveDirectoryAdministratorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceActiveDirectoryAdministrator)(nil)).Elem()
}
func (o ManagedInstanceActiveDirectoryAdministratorMapOutput) ToManagedInstanceActiveDirectoryAdministratorMapOutput() ManagedInstanceActiveDirectoryAdministratorMapOutput {
return o
}
func (o ManagedInstanceActiveDirectoryAdministratorMapOutput) ToManagedInstanceActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) ManagedInstanceActiveDirectoryAdministratorMapOutput {
return o
}
func (o ManagedInstanceActiveDirectoryAdministratorMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceActiveDirectoryAdministratorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceActiveDirectoryAdministrator {
return vs[0].(map[string]*ManagedInstanceActiveDirectoryAdministrator)[vs[1].(string)]
}).(ManagedInstanceActiveDirectoryAdministratorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceActiveDirectoryAdministratorInput)(nil)).Elem(), &ManagedInstanceActiveDirectoryAdministrator{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceActiveDirectoryAdministratorArrayInput)(nil)).Elem(), ManagedInstanceActiveDirectoryAdministratorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceActiveDirectoryAdministratorMapInput)(nil)).Elem(), ManagedInstanceActiveDirectoryAdministratorMap{})
pulumi.RegisterOutputType(ManagedInstanceActiveDirectoryAdministratorOutput{})
pulumi.RegisterOutputType(ManagedInstanceActiveDirectoryAdministratorArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceActiveDirectoryAdministratorMapOutput{})
}
| 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/mssql/managedInstanceSecurityAlertPolicy.go | sdk/go/azure/mssql/managedInstanceSecurityAlertPolicy.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Security Alert Policy for an MS SQL Managed Instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("database-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("mi-security-group"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_inbound"),
// Priority: pulumi.Int(106),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("9000"),
// pulumi.String("9003"),
// pulumi.String("1438"),
// pulumi.String("1440"),
// pulumi.String("1452"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_inbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_health_probe_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_health_probe_inbound"),
// Priority: pulumi.Int(300),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("AzureLoadBalancer"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_tds_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_tds_inbound"),
// Priority: pulumi.Int(1000),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("1433"),
// SourceAddressPrefix: pulumi.String("VirtualNetwork"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_inbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_outbound"),
// Priority: pulumi.Int(102),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("80"),
// pulumi.String("443"),
// pulumi.String("12000"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_outbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_outbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("vnet-mi"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnet-mi"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// exampleRouteTable, err := network.NewRouteTable(ctx, "example", &network.RouteTableArgs{
// Name: pulumi.String("routetable-mi"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// DisableBgpRoutePropagation: false,
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnet,
// }))
// if err != nil {
// return err
// }
// exampleSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "example", &network.SubnetRouteTableAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// RouteTableId: exampleRouteTable.ID(),
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("managedsqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("mradministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnetNetworkSecurityGroupAssociation,
// exampleSubnetRouteTableAssociation,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceSecurityAlertPolicy(ctx, "example", &mssql.ManagedInstanceSecurityAlertPolicyArgs{
// ResourceGroupName: example.Name,
// ManagedInstanceName: exampleManagedInstance.Name,
// Enabled: pulumi.Bool(true),
// StorageEndpoint: pulumi.Any(exampleAzurermStorageAccount.PrimaryBlobEndpoint),
// StorageAccountAccessKey: pulumi.Any(exampleAzurermStorageAccount.PrimaryAccessKey),
// DisabledAlerts: pulumi.StringArray{
// pulumi.String("Sql_Injection"),
// pulumi.String("Data_Exfiltration"),
// },
// RetentionDays: pulumi.Int(20),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Managed Instance Security Alert Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceSecurityAlertPolicy:ManagedInstanceSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/managedInstances/instance1/securityAlertPolicies/Default
// ```
type ManagedInstanceSecurityAlertPolicy struct {
pulumi.CustomResourceState
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
DisabledAlerts pulumi.StringArrayOutput `pulumi:"disabledAlerts"`
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
EmailAccountAdminsEnabled pulumi.BoolPtrOutput `pulumi:"emailAccountAdminsEnabled"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"`
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceName pulumi.StringOutput `pulumi:"managedInstanceName"`
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrOutput `pulumi:"retentionDays"`
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"`
}
// NewManagedInstanceSecurityAlertPolicy registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceSecurityAlertPolicy(ctx *pulumi.Context,
name string, args *ManagedInstanceSecurityAlertPolicyArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceSecurityAlertPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceName == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceSecurityAlertPolicy
err := ctx.RegisterResource("azure:mssql/managedInstanceSecurityAlertPolicy:ManagedInstanceSecurityAlertPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceSecurityAlertPolicy gets an existing ManagedInstanceSecurityAlertPolicy 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 GetManagedInstanceSecurityAlertPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceSecurityAlertPolicyState, opts ...pulumi.ResourceOption) (*ManagedInstanceSecurityAlertPolicy, error) {
var resource ManagedInstanceSecurityAlertPolicy
err := ctx.ReadResource("azure:mssql/managedInstanceSecurityAlertPolicy:ManagedInstanceSecurityAlertPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceSecurityAlertPolicy resources.
type managedInstanceSecurityAlertPolicyState struct {
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
DisabledAlerts []string `pulumi:"disabledAlerts"`
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses []string `pulumi:"emailAddresses"`
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
Enabled *bool `pulumi:"enabled"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceName *string `pulumi:"managedInstanceName"`
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
RetentionDays *int `pulumi:"retentionDays"`
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
type ManagedInstanceSecurityAlertPolicyState struct {
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
DisabledAlerts pulumi.StringArrayInput
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
EmailAccountAdminsEnabled pulumi.BoolPtrInput
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayInput
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
Enabled pulumi.BoolPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceName pulumi.StringPtrInput
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrInput
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
StorageEndpoint pulumi.StringPtrInput
}
func (ManagedInstanceSecurityAlertPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceSecurityAlertPolicyState)(nil)).Elem()
}
type managedInstanceSecurityAlertPolicyArgs struct {
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
DisabledAlerts []string `pulumi:"disabledAlerts"`
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
EmailAccountAdminsEnabled *bool `pulumi:"emailAccountAdminsEnabled"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses []string `pulumi:"emailAddresses"`
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
Enabled *bool `pulumi:"enabled"`
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceName string `pulumi:"managedInstanceName"`
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
RetentionDays *int `pulumi:"retentionDays"`
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
// The set of arguments for constructing a ManagedInstanceSecurityAlertPolicy resource.
type ManagedInstanceSecurityAlertPolicyArgs struct {
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
DisabledAlerts pulumi.StringArrayInput
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
EmailAccountAdminsEnabled pulumi.BoolPtrInput
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayInput
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
Enabled pulumi.BoolPtrInput
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceName pulumi.StringInput
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrInput
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
StorageEndpoint pulumi.StringPtrInput
}
func (ManagedInstanceSecurityAlertPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceSecurityAlertPolicyArgs)(nil)).Elem()
}
type ManagedInstanceSecurityAlertPolicyInput interface {
pulumi.Input
ToManagedInstanceSecurityAlertPolicyOutput() ManagedInstanceSecurityAlertPolicyOutput
ToManagedInstanceSecurityAlertPolicyOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyOutput
}
func (*ManagedInstanceSecurityAlertPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceSecurityAlertPolicy)(nil)).Elem()
}
func (i *ManagedInstanceSecurityAlertPolicy) ToManagedInstanceSecurityAlertPolicyOutput() ManagedInstanceSecurityAlertPolicyOutput {
return i.ToManagedInstanceSecurityAlertPolicyOutputWithContext(context.Background())
}
func (i *ManagedInstanceSecurityAlertPolicy) ToManagedInstanceSecurityAlertPolicyOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceSecurityAlertPolicyOutput)
}
// ManagedInstanceSecurityAlertPolicyArrayInput is an input type that accepts ManagedInstanceSecurityAlertPolicyArray and ManagedInstanceSecurityAlertPolicyArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceSecurityAlertPolicyArrayInput` via:
//
// ManagedInstanceSecurityAlertPolicyArray{ ManagedInstanceSecurityAlertPolicyArgs{...} }
type ManagedInstanceSecurityAlertPolicyArrayInput interface {
pulumi.Input
ToManagedInstanceSecurityAlertPolicyArrayOutput() ManagedInstanceSecurityAlertPolicyArrayOutput
ToManagedInstanceSecurityAlertPolicyArrayOutputWithContext(context.Context) ManagedInstanceSecurityAlertPolicyArrayOutput
}
type ManagedInstanceSecurityAlertPolicyArray []ManagedInstanceSecurityAlertPolicyInput
func (ManagedInstanceSecurityAlertPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceSecurityAlertPolicy)(nil)).Elem()
}
func (i ManagedInstanceSecurityAlertPolicyArray) ToManagedInstanceSecurityAlertPolicyArrayOutput() ManagedInstanceSecurityAlertPolicyArrayOutput {
return i.ToManagedInstanceSecurityAlertPolicyArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceSecurityAlertPolicyArray) ToManagedInstanceSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceSecurityAlertPolicyArrayOutput)
}
// ManagedInstanceSecurityAlertPolicyMapInput is an input type that accepts ManagedInstanceSecurityAlertPolicyMap and ManagedInstanceSecurityAlertPolicyMapOutput values.
// You can construct a concrete instance of `ManagedInstanceSecurityAlertPolicyMapInput` via:
//
// ManagedInstanceSecurityAlertPolicyMap{ "key": ManagedInstanceSecurityAlertPolicyArgs{...} }
type ManagedInstanceSecurityAlertPolicyMapInput interface {
pulumi.Input
ToManagedInstanceSecurityAlertPolicyMapOutput() ManagedInstanceSecurityAlertPolicyMapOutput
ToManagedInstanceSecurityAlertPolicyMapOutputWithContext(context.Context) ManagedInstanceSecurityAlertPolicyMapOutput
}
type ManagedInstanceSecurityAlertPolicyMap map[string]ManagedInstanceSecurityAlertPolicyInput
func (ManagedInstanceSecurityAlertPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceSecurityAlertPolicy)(nil)).Elem()
}
func (i ManagedInstanceSecurityAlertPolicyMap) ToManagedInstanceSecurityAlertPolicyMapOutput() ManagedInstanceSecurityAlertPolicyMapOutput {
return i.ToManagedInstanceSecurityAlertPolicyMapOutputWithContext(context.Background())
}
func (i ManagedInstanceSecurityAlertPolicyMap) ToManagedInstanceSecurityAlertPolicyMapOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceSecurityAlertPolicyMapOutput)
}
type ManagedInstanceSecurityAlertPolicyOutput struct{ *pulumi.OutputState }
func (ManagedInstanceSecurityAlertPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceSecurityAlertPolicy)(nil)).Elem()
}
func (o ManagedInstanceSecurityAlertPolicyOutput) ToManagedInstanceSecurityAlertPolicyOutput() ManagedInstanceSecurityAlertPolicyOutput {
return o
}
func (o ManagedInstanceSecurityAlertPolicyOutput) ToManagedInstanceSecurityAlertPolicyOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyOutput {
return o
}
// Specifies an array of alerts that are disabled. Possible values are `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action` and `Brute_Force`.
func (o ManagedInstanceSecurityAlertPolicyOutput) DisabledAlerts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringArrayOutput { return v.DisabledAlerts }).(pulumi.StringArrayOutput)
}
// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to `false`.
func (o ManagedInstanceSecurityAlertPolicyOutput) EmailAccountAdminsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.BoolPtrOutput { return v.EmailAccountAdminsEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies an array of email addresses to which the alert is sent.
func (o ManagedInstanceSecurityAlertPolicyOutput) EmailAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput)
}
// Specifies the state of the Security Alert Policy, whether it is enabled or disabled. Possible values are `true`, `false`.
func (o ManagedInstanceSecurityAlertPolicyOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the MS SQL Managed Instance. Changing this forces a new resource to be created.
func (o ManagedInstanceSecurityAlertPolicyOutput) ManagedInstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringOutput { return v.ManagedInstanceName }).(pulumi.StringOutput)
}
// The name of the resource group that contains the MS SQL Managed Instance. Changing this forces a new resource to be created.
func (o ManagedInstanceSecurityAlertPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to `0`.
func (o ManagedInstanceSecurityAlertPolicyOutput) RetentionDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.IntPtrOutput { return v.RetentionDays }).(pulumi.IntPtrOutput)
}
// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use `storageEndpoint` to specify a storage account blob endpoint.
//
// > **Note:** Please note that storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used to configure `mssql.ManagedInstanceSecurityAlertPolicy` with `storageEndpoint` for now.
func (o ManagedInstanceSecurityAlertPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
func (o ManagedInstanceSecurityAlertPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput)
}
type ManagedInstanceSecurityAlertPolicyArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceSecurityAlertPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceSecurityAlertPolicy)(nil)).Elem()
}
func (o ManagedInstanceSecurityAlertPolicyArrayOutput) ToManagedInstanceSecurityAlertPolicyArrayOutput() ManagedInstanceSecurityAlertPolicyArrayOutput {
return o
}
func (o ManagedInstanceSecurityAlertPolicyArrayOutput) ToManagedInstanceSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) ManagedInstanceSecurityAlertPolicyArrayOutput {
return o
}
func (o ManagedInstanceSecurityAlertPolicyArrayOutput) Index(i pulumi.IntInput) ManagedInstanceSecurityAlertPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceSecurityAlertPolicy {
| 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/mssql/virtualNetworkRule.go | sdk/go/azure/mssql/virtualNetworkRule.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows you to manage rules for allowing traffic between an Azure SQL server and a subnet of a virtual network.
//
// ## 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/mssql"
// "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-sql-server-vnet-rule"),
// 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.7.29.0/29"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.7.29.0/29"),
// },
// ServiceEndpoints: pulumi.StringArray{
// pulumi.String("Microsoft.Sql"),
// },
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("uniqueazuresqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewVirtualNetworkRule(ctx, "example", &mssql.VirtualNetworkRuleArgs{
// Name: pulumi.String("sql-vnet-rule"),
// ServerId: exampleServer.ID(),
// SubnetId: exampleSubnet.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Virtual Network Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/virtualNetworkRule:VirtualNetworkRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/virtualNetworkRules/vnetrulename
// ```
type VirtualNetworkRule struct {
pulumi.CustomResourceState
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrOutput `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The ID of the subnet from which the SQL server will accept communications.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
}
// NewVirtualNetworkRule registers a new resource with the given unique name, arguments, and options.
func NewVirtualNetworkRule(ctx *pulumi.Context,
name string, args *VirtualNetworkRuleArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/virtualNetworkRule:VirtualNetworkRule"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualNetworkRule
err := ctx.RegisterResource("azure:mssql/virtualNetworkRule:VirtualNetworkRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualNetworkRule gets an existing VirtualNetworkRule 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 GetVirtualNetworkRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualNetworkRuleState, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error) {
var resource VirtualNetworkRule
err := ctx.ReadResource("azure:mssql/virtualNetworkRule:VirtualNetworkRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualNetworkRule resources.
type virtualNetworkRuleState struct {
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The ID of the subnet from which the SQL server will accept communications.
SubnetId *string `pulumi:"subnetId"`
}
type VirtualNetworkRuleState struct {
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The ID of the subnet from which the SQL server will accept communications.
SubnetId pulumi.StringPtrInput
}
func (VirtualNetworkRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkRuleState)(nil)).Elem()
}
type virtualNetworkRuleArgs struct {
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The ID of the subnet from which the SQL server will accept communications.
SubnetId string `pulumi:"subnetId"`
}
// The set of arguments for constructing a VirtualNetworkRule resource.
type VirtualNetworkRuleArgs struct {
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The ID of the subnet from which the SQL server will accept communications.
SubnetId pulumi.StringInput
}
func (VirtualNetworkRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkRuleArgs)(nil)).Elem()
}
type VirtualNetworkRuleInput interface {
pulumi.Input
ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput
ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput
}
func (*VirtualNetworkRule) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetworkRule)(nil)).Elem()
}
func (i *VirtualNetworkRule) ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput {
return i.ToVirtualNetworkRuleOutputWithContext(context.Background())
}
func (i *VirtualNetworkRule) ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleOutput)
}
// VirtualNetworkRuleArrayInput is an input type that accepts VirtualNetworkRuleArray and VirtualNetworkRuleArrayOutput values.
// You can construct a concrete instance of `VirtualNetworkRuleArrayInput` via:
//
// VirtualNetworkRuleArray{ VirtualNetworkRuleArgs{...} }
type VirtualNetworkRuleArrayInput interface {
pulumi.Input
ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput
ToVirtualNetworkRuleArrayOutputWithContext(context.Context) VirtualNetworkRuleArrayOutput
}
type VirtualNetworkRuleArray []VirtualNetworkRuleInput
func (VirtualNetworkRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetworkRule)(nil)).Elem()
}
func (i VirtualNetworkRuleArray) ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput {
return i.ToVirtualNetworkRuleArrayOutputWithContext(context.Background())
}
func (i VirtualNetworkRuleArray) ToVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleArrayOutput)
}
// VirtualNetworkRuleMapInput is an input type that accepts VirtualNetworkRuleMap and VirtualNetworkRuleMapOutput values.
// You can construct a concrete instance of `VirtualNetworkRuleMapInput` via:
//
// VirtualNetworkRuleMap{ "key": VirtualNetworkRuleArgs{...} }
type VirtualNetworkRuleMapInput interface {
pulumi.Input
ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput
ToVirtualNetworkRuleMapOutputWithContext(context.Context) VirtualNetworkRuleMapOutput
}
type VirtualNetworkRuleMap map[string]VirtualNetworkRuleInput
func (VirtualNetworkRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetworkRule)(nil)).Elem()
}
func (i VirtualNetworkRuleMap) ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput {
return i.ToVirtualNetworkRuleMapOutputWithContext(context.Background())
}
func (i VirtualNetworkRuleMap) ToVirtualNetworkRuleMapOutputWithContext(ctx context.Context) VirtualNetworkRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleMapOutput)
}
type VirtualNetworkRuleOutput struct{ *pulumi.OutputState }
func (VirtualNetworkRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetworkRule)(nil)).Elem()
}
func (o VirtualNetworkRuleOutput) ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput {
return o
}
func (o VirtualNetworkRuleOutput) ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput {
return o
}
// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to `false`.
//
// > **Note:** If `ignoreMissingVnetServiceEndpoint` is false, and the target subnet does not contain the `Microsoft.SQL` endpoint in the `serviceEndpoints` array, the deployment will fail when it tries to create the SQL virtual network rule.
func (o VirtualNetworkRuleOutput) IgnoreMissingVnetServiceEndpoint() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VirtualNetworkRule) pulumi.BoolPtrOutput { return v.IgnoreMissingVnetServiceEndpoint }).(pulumi.BoolPtrOutput)
}
// The name of the SQL virtual network rule. Changing this forces a new resource to be created.
func (o VirtualNetworkRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created.
func (o VirtualNetworkRuleOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The ID of the subnet from which the SQL server will accept communications.
func (o VirtualNetworkRuleOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
type VirtualNetworkRuleArrayOutput struct{ *pulumi.OutputState }
func (VirtualNetworkRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetworkRule)(nil)).Elem()
}
func (o VirtualNetworkRuleArrayOutput) ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput {
return o
}
func (o VirtualNetworkRuleArrayOutput) ToVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkRuleArrayOutput {
return o
}
func (o VirtualNetworkRuleArrayOutput) Index(i pulumi.IntInput) VirtualNetworkRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkRule {
return vs[0].([]*VirtualNetworkRule)[vs[1].(int)]
}).(VirtualNetworkRuleOutput)
}
type VirtualNetworkRuleMapOutput struct{ *pulumi.OutputState }
func (VirtualNetworkRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetworkRule)(nil)).Elem()
}
func (o VirtualNetworkRuleMapOutput) ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput {
return o
}
func (o VirtualNetworkRuleMapOutput) ToVirtualNetworkRuleMapOutputWithContext(ctx context.Context) VirtualNetworkRuleMapOutput {
return o
}
func (o VirtualNetworkRuleMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkRule {
return vs[0].(map[string]*VirtualNetworkRule)[vs[1].(string)]
}).(VirtualNetworkRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleInput)(nil)).Elem(), &VirtualNetworkRule{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleArrayInput)(nil)).Elem(), VirtualNetworkRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleMapInput)(nil)).Elem(), VirtualNetworkRuleMap{})
pulumi.RegisterOutputType(VirtualNetworkRuleOutput{})
pulumi.RegisterOutputType(VirtualNetworkRuleArrayOutput{})
pulumi.RegisterOutputType(VirtualNetworkRuleMapOutput{})
}
| 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/mssql/virtualMachineGroup.go | sdk/go/azure/mssql/virtualMachineGroup.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft SQL Virtual Machine Group.
//
// ## 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/mssql"
// "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 = mssql.NewVirtualMachineGroup(ctx, "example", &mssql.VirtualMachineGroupArgs{
// Name: pulumi.String("examplegroup"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SqlImageOffer: pulumi.String("SQL2017-WS2016"),
// SqlImageSku: pulumi.String("Developer"),
// WsfcDomainProfile: &mssql.VirtualMachineGroupWsfcDomainProfileArgs{
// Fqdn: pulumi.String("testdomain.com"),
// ClusterSubnetType: pulumi.String("SingleSubnet"),
// },
// })
// 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.SqlVirtualMachine` - 2023-10-01
//
// ## Import
//
// Microsoft SQL Virtual Machine Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/virtualMachineGroup:VirtualMachineGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/vmgroup1
// ```
type VirtualMachineGroup struct {
pulumi.CustomResourceState
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
SqlImageOffer pulumi.StringOutput `pulumi:"sqlImageOffer"`
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
SqlImageSku pulumi.StringOutput `pulumi:"sqlImageSku"`
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `wsfcDomainProfile` block as defined below.
WsfcDomainProfile VirtualMachineGroupWsfcDomainProfileOutput `pulumi:"wsfcDomainProfile"`
}
// NewVirtualMachineGroup registers a new resource with the given unique name, arguments, and options.
func NewVirtualMachineGroup(ctx *pulumi.Context,
name string, args *VirtualMachineGroupArgs, opts ...pulumi.ResourceOption) (*VirtualMachineGroup, 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.SqlImageOffer == nil {
return nil, errors.New("invalid value for required argument 'SqlImageOffer'")
}
if args.SqlImageSku == nil {
return nil, errors.New("invalid value for required argument 'SqlImageSku'")
}
if args.WsfcDomainProfile == nil {
return nil, errors.New("invalid value for required argument 'WsfcDomainProfile'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualMachineGroup
err := ctx.RegisterResource("azure:mssql/virtualMachineGroup:VirtualMachineGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualMachineGroup gets an existing VirtualMachineGroup 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 GetVirtualMachineGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualMachineGroupState, opts ...pulumi.ResourceOption) (*VirtualMachineGroup, error) {
var resource VirtualMachineGroup
err := ctx.ReadResource("azure:mssql/virtualMachineGroup:VirtualMachineGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualMachineGroup resources.
type virtualMachineGroupState struct {
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
SqlImageOffer *string `pulumi:"sqlImageOffer"`
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
SqlImageSku *string `pulumi:"sqlImageSku"`
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
Tags map[string]string `pulumi:"tags"`
// A `wsfcDomainProfile` block as defined below.
WsfcDomainProfile *VirtualMachineGroupWsfcDomainProfile `pulumi:"wsfcDomainProfile"`
}
type VirtualMachineGroupState struct {
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
SqlImageOffer pulumi.StringPtrInput
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
SqlImageSku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
Tags pulumi.StringMapInput
// A `wsfcDomainProfile` block as defined below.
WsfcDomainProfile VirtualMachineGroupWsfcDomainProfilePtrInput
}
func (VirtualMachineGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineGroupState)(nil)).Elem()
}
type virtualMachineGroupArgs struct {
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
SqlImageOffer string `pulumi:"sqlImageOffer"`
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
SqlImageSku string `pulumi:"sqlImageSku"`
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
Tags map[string]string `pulumi:"tags"`
// A `wsfcDomainProfile` block as defined below.
WsfcDomainProfile VirtualMachineGroupWsfcDomainProfile `pulumi:"wsfcDomainProfile"`
}
// The set of arguments for constructing a VirtualMachineGroup resource.
type VirtualMachineGroupArgs struct {
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
SqlImageOffer pulumi.StringInput
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
SqlImageSku pulumi.StringInput
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
Tags pulumi.StringMapInput
// A `wsfcDomainProfile` block as defined below.
WsfcDomainProfile VirtualMachineGroupWsfcDomainProfileInput
}
func (VirtualMachineGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineGroupArgs)(nil)).Elem()
}
type VirtualMachineGroupInput interface {
pulumi.Input
ToVirtualMachineGroupOutput() VirtualMachineGroupOutput
ToVirtualMachineGroupOutputWithContext(ctx context.Context) VirtualMachineGroupOutput
}
func (*VirtualMachineGroup) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachineGroup)(nil)).Elem()
}
func (i *VirtualMachineGroup) ToVirtualMachineGroupOutput() VirtualMachineGroupOutput {
return i.ToVirtualMachineGroupOutputWithContext(context.Background())
}
func (i *VirtualMachineGroup) ToVirtualMachineGroupOutputWithContext(ctx context.Context) VirtualMachineGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineGroupOutput)
}
// VirtualMachineGroupArrayInput is an input type that accepts VirtualMachineGroupArray and VirtualMachineGroupArrayOutput values.
// You can construct a concrete instance of `VirtualMachineGroupArrayInput` via:
//
// VirtualMachineGroupArray{ VirtualMachineGroupArgs{...} }
type VirtualMachineGroupArrayInput interface {
pulumi.Input
ToVirtualMachineGroupArrayOutput() VirtualMachineGroupArrayOutput
ToVirtualMachineGroupArrayOutputWithContext(context.Context) VirtualMachineGroupArrayOutput
}
type VirtualMachineGroupArray []VirtualMachineGroupInput
func (VirtualMachineGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachineGroup)(nil)).Elem()
}
func (i VirtualMachineGroupArray) ToVirtualMachineGroupArrayOutput() VirtualMachineGroupArrayOutput {
return i.ToVirtualMachineGroupArrayOutputWithContext(context.Background())
}
func (i VirtualMachineGroupArray) ToVirtualMachineGroupArrayOutputWithContext(ctx context.Context) VirtualMachineGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineGroupArrayOutput)
}
// VirtualMachineGroupMapInput is an input type that accepts VirtualMachineGroupMap and VirtualMachineGroupMapOutput values.
// You can construct a concrete instance of `VirtualMachineGroupMapInput` via:
//
// VirtualMachineGroupMap{ "key": VirtualMachineGroupArgs{...} }
type VirtualMachineGroupMapInput interface {
pulumi.Input
ToVirtualMachineGroupMapOutput() VirtualMachineGroupMapOutput
ToVirtualMachineGroupMapOutputWithContext(context.Context) VirtualMachineGroupMapOutput
}
type VirtualMachineGroupMap map[string]VirtualMachineGroupInput
func (VirtualMachineGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachineGroup)(nil)).Elem()
}
func (i VirtualMachineGroupMap) ToVirtualMachineGroupMapOutput() VirtualMachineGroupMapOutput {
return i.ToVirtualMachineGroupMapOutputWithContext(context.Background())
}
func (i VirtualMachineGroupMap) ToVirtualMachineGroupMapOutputWithContext(ctx context.Context) VirtualMachineGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineGroupMapOutput)
}
type VirtualMachineGroupOutput struct{ *pulumi.OutputState }
func (VirtualMachineGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachineGroup)(nil)).Elem()
}
func (o VirtualMachineGroupOutput) ToVirtualMachineGroupOutput() VirtualMachineGroupOutput {
return o
}
func (o VirtualMachineGroupOutput) ToVirtualMachineGroupOutputWithContext(ctx context.Context) VirtualMachineGroupOutput {
return o
}
// The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
func (o VirtualMachineGroupOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
func (o VirtualMachineGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
func (o VirtualMachineGroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
func (o VirtualMachineGroupOutput) SqlImageOffer() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringOutput { return v.SqlImageOffer }).(pulumi.StringOutput)
}
// The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
func (o VirtualMachineGroupOutput) SqlImageSku() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringOutput { return v.SqlImageSku }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
func (o VirtualMachineGroupOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *VirtualMachineGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `wsfcDomainProfile` block as defined below.
func (o VirtualMachineGroupOutput) WsfcDomainProfile() VirtualMachineGroupWsfcDomainProfileOutput {
return o.ApplyT(func(v *VirtualMachineGroup) VirtualMachineGroupWsfcDomainProfileOutput { return v.WsfcDomainProfile }).(VirtualMachineGroupWsfcDomainProfileOutput)
}
type VirtualMachineGroupArrayOutput struct{ *pulumi.OutputState }
func (VirtualMachineGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachineGroup)(nil)).Elem()
}
func (o VirtualMachineGroupArrayOutput) ToVirtualMachineGroupArrayOutput() VirtualMachineGroupArrayOutput {
return o
}
func (o VirtualMachineGroupArrayOutput) ToVirtualMachineGroupArrayOutputWithContext(ctx context.Context) VirtualMachineGroupArrayOutput {
return o
}
func (o VirtualMachineGroupArrayOutput) Index(i pulumi.IntInput) VirtualMachineGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineGroup {
return vs[0].([]*VirtualMachineGroup)[vs[1].(int)]
}).(VirtualMachineGroupOutput)
}
type VirtualMachineGroupMapOutput struct{ *pulumi.OutputState }
func (VirtualMachineGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachineGroup)(nil)).Elem()
}
func (o VirtualMachineGroupMapOutput) ToVirtualMachineGroupMapOutput() VirtualMachineGroupMapOutput {
return o
}
func (o VirtualMachineGroupMapOutput) ToVirtualMachineGroupMapOutputWithContext(ctx context.Context) VirtualMachineGroupMapOutput {
return o
}
func (o VirtualMachineGroupMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineGroup {
return vs[0].(map[string]*VirtualMachineGroup)[vs[1].(string)]
}).(VirtualMachineGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineGroupInput)(nil)).Elem(), &VirtualMachineGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineGroupArrayInput)(nil)).Elem(), VirtualMachineGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineGroupMapInput)(nil)).Elem(), VirtualMachineGroupMap{})
pulumi.RegisterOutputType(VirtualMachineGroupOutput{})
pulumi.RegisterOutputType(VirtualMachineGroupArrayOutput{})
pulumi.RegisterOutputType(VirtualMachineGroupMapOutput{})
}
| 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/mssql/getElasticPool.go | sdk/go/azure/mssql/getElasticPool.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 mssql
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 SQL elastic pool.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := mssql.LookupElasticPool(ctx, &mssql.LookupElasticPoolArgs{
// Name: "mssqlelasticpoolname",
// ResourceGroupName: "example-resources",
// ServerName: "example-sql-server",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("elasticpoolId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
func LookupElasticPool(ctx *pulumi.Context, args *LookupElasticPoolArgs, opts ...pulumi.InvokeOption) (*LookupElasticPoolResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupElasticPoolResult
err := ctx.Invoke("azure:mssql/getElasticPool:getElasticPool", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getElasticPool.
type LookupElasticPoolArgs struct {
// The name of the elastic pool.
Name string `pulumi:"name"`
// The name of the resource group which contains the elastic pool.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the SQL Server which contains the elastic pool.
ServerName string `pulumi:"serverName"`
}
// A collection of values returned by getElasticPool.
type LookupElasticPoolResult struct {
// The type of enclave being used by the elastic pool.
EnclaveType string `pulumi:"enclaveType"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The license type to apply for this elastic pool.
LicenseType string `pulumi:"licenseType"`
// Specifies the supported Azure location where the resource exists.
Location string `pulumi:"location"`
// The max data size of the elastic pool in bytes.
MaxSizeBytes int `pulumi:"maxSizeBytes"`
// The max data size of the elastic pool in gigabytes.
MaxSizeGb float64 `pulumi:"maxSizeGb"`
// Specifies the SKU Name for this Elasticpool.
Name string `pulumi:"name"`
// The maximum capacity any one database can consume.
PerDbMaxCapacity int `pulumi:"perDbMaxCapacity"`
// The minimum capacity all databases are guaranteed.
PerDbMinCapacity int `pulumi:"perDbMinCapacity"`
ResourceGroupName string `pulumi:"resourceGroupName"`
ServerName string `pulumi:"serverName"`
// A `sku` block as defined below.
Skus []GetElasticPoolSkus `pulumi:"skus"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether or not this elastic pool is zone redundant.
ZoneRedundant bool `pulumi:"zoneRedundant"`
}
func LookupElasticPoolOutput(ctx *pulumi.Context, args LookupElasticPoolOutputArgs, opts ...pulumi.InvokeOption) LookupElasticPoolResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupElasticPoolResultOutput, error) {
args := v.(LookupElasticPoolArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getElasticPool:getElasticPool", args, LookupElasticPoolResultOutput{}, options).(LookupElasticPoolResultOutput), nil
}).(LookupElasticPoolResultOutput)
}
// A collection of arguments for invoking getElasticPool.
type LookupElasticPoolOutputArgs struct {
// The name of the elastic pool.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group which contains the elastic pool.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The name of the SQL Server which contains the elastic pool.
ServerName pulumi.StringInput `pulumi:"serverName"`
}
func (LookupElasticPoolOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupElasticPoolArgs)(nil)).Elem()
}
// A collection of values returned by getElasticPool.
type LookupElasticPoolResultOutput struct{ *pulumi.OutputState }
func (LookupElasticPoolResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupElasticPoolResult)(nil)).Elem()
}
func (o LookupElasticPoolResultOutput) ToLookupElasticPoolResultOutput() LookupElasticPoolResultOutput {
return o
}
func (o LookupElasticPoolResultOutput) ToLookupElasticPoolResultOutputWithContext(ctx context.Context) LookupElasticPoolResultOutput {
return o
}
// The type of enclave being used by the elastic pool.
func (o LookupElasticPoolResultOutput) EnclaveType() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.EnclaveType }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupElasticPoolResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.Id }).(pulumi.StringOutput)
}
// The license type to apply for this elastic pool.
func (o LookupElasticPoolResultOutput) LicenseType() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.LicenseType }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists.
func (o LookupElasticPoolResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.Location }).(pulumi.StringOutput)
}
// The max data size of the elastic pool in bytes.
func (o LookupElasticPoolResultOutput) MaxSizeBytes() pulumi.IntOutput {
return o.ApplyT(func(v LookupElasticPoolResult) int { return v.MaxSizeBytes }).(pulumi.IntOutput)
}
// The max data size of the elastic pool in gigabytes.
func (o LookupElasticPoolResultOutput) MaxSizeGb() pulumi.Float64Output {
return o.ApplyT(func(v LookupElasticPoolResult) float64 { return v.MaxSizeGb }).(pulumi.Float64Output)
}
// Specifies the SKU Name for this Elasticpool.
func (o LookupElasticPoolResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.Name }).(pulumi.StringOutput)
}
// The maximum capacity any one database can consume.
func (o LookupElasticPoolResultOutput) PerDbMaxCapacity() pulumi.IntOutput {
return o.ApplyT(func(v LookupElasticPoolResult) int { return v.PerDbMaxCapacity }).(pulumi.IntOutput)
}
// The minimum capacity all databases are guaranteed.
func (o LookupElasticPoolResultOutput) PerDbMinCapacity() pulumi.IntOutput {
return o.ApplyT(func(v LookupElasticPoolResult) int { return v.PerDbMinCapacity }).(pulumi.IntOutput)
}
func (o LookupElasticPoolResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o LookupElasticPoolResultOutput) ServerName() pulumi.StringOutput {
return o.ApplyT(func(v LookupElasticPoolResult) string { return v.ServerName }).(pulumi.StringOutput)
}
// A `sku` block as defined below.
func (o LookupElasticPoolResultOutput) Skus() GetElasticPoolSkusArrayOutput {
return o.ApplyT(func(v LookupElasticPoolResult) []GetElasticPoolSkus { return v.Skus }).(GetElasticPoolSkusArrayOutput)
}
// A mapping of tags to assign to the resource.
func (o LookupElasticPoolResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupElasticPoolResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Whether or not this elastic pool is zone redundant.
func (o LookupElasticPoolResultOutput) ZoneRedundant() pulumi.BoolOutput {
return o.ApplyT(func(v LookupElasticPoolResult) bool { return v.ZoneRedundant }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupElasticPoolResultOutput{})
}
| 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/mssql/server.go | sdk/go/azure/mssql/server.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft SQL Azure Database 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/mssql"
// "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("database-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mssqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsKat11"),
// MinimumTlsVersion: pulumi.String("1.2"),
// AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
// LoginUsername: pulumi.String("AzureAD Admin"),
// ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("production"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Transparent Data Encryption (TDE) With A Customer Managed Key (CMK) During Create
//
// ```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/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("example-admin"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// // Create a key vault with access policies which allow for the current user to get, list, create, delete, update, recover, purge and getRotationPolicy for the key vault key and also add a key vault access policy for the Microsoft Sql Server instance User Managed Identity to get, wrap, and unwrap key(s)
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("mssqltdeexample"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: exampleUserAssignedIdentity.TenantId,
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(true),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// 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("Update"),
// pulumi.String("Recover"),
// pulumi.String("Purge"),
// pulumi.String("GetRotationPolicy"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleUserAssignedIdentity.TenantId,
// ObjectId: exampleUserAssignedIdentity.PrincipalId,
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("WrapKey"),
// pulumi.String("UnwrapKey"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("example-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("unwrapKey"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-resource"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("Example-Administrator"),
// AdministratorLoginPassword: pulumi.String("Example_Password!"),
// MinimumTlsVersion: pulumi.String("1.2"),
// AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
// LoginUsername: exampleUserAssignedIdentity.Name,
// ObjectId: exampleUserAssignedIdentity.PrincipalId,
// },
// Identity: &mssql.ServerIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// PrimaryUserAssignedIdentityId: exampleUserAssignedIdentity.ID(),
// TransparentDataEncryptionKeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Servers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/server:Server example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver
// ```
type Server struct {
pulumi.CustomResourceState
// The administrator login name for the new server. Required unless `azureadAuthenticationOnly` in the `azureadAdministrator` block is `true`. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx).
AdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"administratorLoginPassword"`
// An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`.
AdministratorLoginPasswordWoVersion pulumi.IntPtrOutput `pulumi:"administratorLoginPasswordWoVersion"`
// An `azureadAdministrator` block as defined below.
AzureadAdministrator ServerAzureadAdministratorPtrOutput `pulumi:"azureadAdministrator"`
// The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`.
ConnectionPolicy pulumi.StringPtrOutput `pulumi:"connectionPolicy"`
// Whether to enable the Express Vulnerability Assessment Configuration. Defaults to `false`.
//
// > **Note:** If you have enabled the Classic SQL Vulnerability Assessment configuration using the `mssql.ServerVulnerabilityAssessment` resource, you must first delete it before enabling `expressVulnerabilityAssessmentEnabled`. If you wish to revert back to using the Classic SQL Vulnerability Assessment configuration you must first disable this setting.
ExpressVulnerabilityAssessmentEnabled pulumi.BoolPtrOutput `pulumi:"expressVulnerabilityAssessmentEnabled"`
// The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
FullyQualifiedDomainName pulumi.StringOutput `pulumi:"fullyQualifiedDomainName"`
// An `identity` block as defined below.
Identity ServerIdentityPtrOutput `pulumi:"identity"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: `1.0`, `1.1` , `1.2` and `Disabled`. Defaults to `1.2`.
//
// > **Note:** The `minimumTlsVersion` is set to `Disabled` means all TLS versions are allowed. After you enforce a version of `minimumTlsVersion`, it's not possible to revert to `Disabled`.
//
// > **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 Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether outbound network traffic is restricted for this server. Defaults to `false`.
OutboundNetworkRestrictionEnabled pulumi.BoolPtrOutput `pulumi:"outboundNetworkRestrictionEnabled"`
// Specifies the primary user managed identity id. Required if `type` within the `identity` block is set to either `SystemAssigned, UserAssigned` or `UserAssigned` and should be set at same time as setting `identityIds`.
PrimaryUserAssignedIdentityId pulumi.StringOutput `pulumi:"primaryUserAssignedIdentityId"`
// Whether public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A list of dropped restorable database IDs on the server.
RestorableDroppedDatabaseIds pulumi.StringArrayOutput `pulumi:"restorableDroppedDatabaseIds"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Server` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
//
// > **Note:** Cross-tenant `Key Vault` and `Microsoft SQL Server` interactions are not supported. Please see the [product documentation](https://learn.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql#requirements-for-configuring-customer-managed-tde) for more information.
//
// > **Note:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`.
TransparentDataEncryptionKeyVaultKeyId pulumi.StringPtrOutput `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
Version pulumi.StringOutput `pulumi:"version"`
}
// NewServer registers a new resource with the given unique name, arguments, and options.
func NewServer(ctx *pulumi.Context,
name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, 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.Version == nil {
return nil, errors.New("invalid value for required argument 'Version'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/sqlServer:SqlServer"),
},
})
opts = append(opts, aliases)
if args.AdministratorLoginPassword != nil {
args.AdministratorLoginPassword = pulumi.ToSecret(args.AdministratorLoginPassword).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"administratorLoginPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Server
err := ctx.RegisterResource("azure:mssql/server:Server", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServer gets an existing Server 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 GetServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) {
var resource Server
err := ctx.ReadResource("azure:mssql/server:Server", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Server resources.
type serverState struct {
// The administrator login name for the new server. Required unless `azureadAuthenticationOnly` in the `azureadAdministrator` block is `true`. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx).
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`.
AdministratorLoginPasswordWoVersion *int `pulumi:"administratorLoginPasswordWoVersion"`
// An `azureadAdministrator` block as defined below.
AzureadAdministrator *ServerAzureadAdministrator `pulumi:"azureadAdministrator"`
// The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`.
ConnectionPolicy *string `pulumi:"connectionPolicy"`
// Whether to enable the Express Vulnerability Assessment Configuration. Defaults to `false`.
//
// > **Note:** If you have enabled the Classic SQL Vulnerability Assessment configuration using the `mssql.ServerVulnerabilityAssessment` resource, you must first delete it before enabling `expressVulnerabilityAssessmentEnabled`. If you wish to revert back to using the Classic SQL Vulnerability Assessment configuration you must first disable this setting.
ExpressVulnerabilityAssessmentEnabled *bool `pulumi:"expressVulnerabilityAssessmentEnabled"`
// The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
FullyQualifiedDomainName *string `pulumi:"fullyQualifiedDomainName"`
// An `identity` block as defined below.
Identity *ServerIdentity `pulumi:"identity"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: `1.0`, `1.1` , `1.2` and `Disabled`. Defaults to `1.2`.
//
// > **Note:** The `minimumTlsVersion` is set to `Disabled` means all TLS versions are allowed. After you enforce a version of `minimumTlsVersion`, it's not possible to revert to `Disabled`.
//
// > **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 Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether outbound network traffic is restricted for this server. Defaults to `false`.
OutboundNetworkRestrictionEnabled *bool `pulumi:"outboundNetworkRestrictionEnabled"`
// Specifies the primary user managed identity id. Required if `type` within the `identity` block is set to either `SystemAssigned, UserAssigned` or `UserAssigned` and should be set at same time as setting `identityIds`.
PrimaryUserAssignedIdentityId *string `pulumi:"primaryUserAssignedIdentityId"`
// Whether public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A list of dropped restorable database IDs on the server.
RestorableDroppedDatabaseIds []string `pulumi:"restorableDroppedDatabaseIds"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Server` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
//
// > **Note:** Cross-tenant `Key Vault` and `Microsoft SQL Server` interactions are not supported. Please see the [product documentation](https://learn.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql#requirements-for-configuring-customer-managed-tde) for more information.
//
// > **Note:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`.
TransparentDataEncryptionKeyVaultKeyId *string `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
Version *string `pulumi:"version"`
}
type ServerState struct {
// The administrator login name for the new server. Required unless `azureadAuthenticationOnly` in the `azureadAdministrator` block is `true`. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringPtrInput
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx).
AdministratorLoginPassword pulumi.StringPtrInput
// An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`.
AdministratorLoginPasswordWoVersion pulumi.IntPtrInput
// An `azureadAdministrator` block as defined below.
AzureadAdministrator ServerAzureadAdministratorPtrInput
// The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`.
ConnectionPolicy pulumi.StringPtrInput
// Whether to enable the Express Vulnerability Assessment Configuration. Defaults to `false`.
//
// > **Note:** If you have enabled the Classic SQL Vulnerability Assessment configuration using the `mssql.ServerVulnerabilityAssessment` resource, you must first delete it before enabling `expressVulnerabilityAssessmentEnabled`. If you wish to revert back to using the Classic SQL Vulnerability Assessment configuration you must first disable this setting.
ExpressVulnerabilityAssessmentEnabled pulumi.BoolPtrInput
// The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
FullyQualifiedDomainName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ServerIdentityPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: `1.0`, `1.1` , `1.2` and `Disabled`. Defaults to `1.2`.
//
// > **Note:** The `minimumTlsVersion` is set to `Disabled` means all TLS versions are allowed. After you enforce a version of `minimumTlsVersion`, it's not possible to revert to `Disabled`.
//
// > **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 Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether outbound network traffic is restricted for this server. Defaults to `false`.
OutboundNetworkRestrictionEnabled pulumi.BoolPtrInput
// Specifies the primary user managed identity id. Required if `type` within the `identity` block is set to either `SystemAssigned, UserAssigned` or `UserAssigned` and should be set at same time as setting `identityIds`.
PrimaryUserAssignedIdentityId pulumi.StringPtrInput
// Whether public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A list of dropped restorable database IDs on the server.
RestorableDroppedDatabaseIds pulumi.StringArrayInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Server` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
//
// > **Note:** Cross-tenant `Key Vault` and `Microsoft SQL Server` interactions are not supported. Please see the [product documentation](https://learn.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql#requirements-for-configuring-customer-managed-tde) for more information.
//
// > **Note:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`.
TransparentDataEncryptionKeyVaultKeyId pulumi.StringPtrInput
// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
Version pulumi.StringPtrInput
}
func (ServerState) ElementType() reflect.Type {
return reflect.TypeOf((*serverState)(nil)).Elem()
}
type serverArgs struct {
// The administrator login name for the new server. Required unless `azureadAuthenticationOnly` in the `azureadAdministrator` block is `true`. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
AdministratorLogin *string `pulumi:"administratorLogin"`
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx).
AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"`
// An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`.
AdministratorLoginPasswordWoVersion *int `pulumi:"administratorLoginPasswordWoVersion"`
// An `azureadAdministrator` block as defined below.
AzureadAdministrator *ServerAzureadAdministrator `pulumi:"azureadAdministrator"`
// The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`.
ConnectionPolicy *string `pulumi:"connectionPolicy"`
// Whether to enable the Express Vulnerability Assessment Configuration. Defaults to `false`.
//
// > **Note:** If you have enabled the Classic SQL Vulnerability Assessment configuration using the `mssql.ServerVulnerabilityAssessment` resource, you must first delete it before enabling `expressVulnerabilityAssessmentEnabled`. If you wish to revert back to using the Classic SQL Vulnerability Assessment configuration you must first disable this setting.
ExpressVulnerabilityAssessmentEnabled *bool `pulumi:"expressVulnerabilityAssessmentEnabled"`
// An `identity` block as defined below.
Identity *ServerIdentity `pulumi:"identity"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: `1.0`, `1.1` , `1.2` and `Disabled`. Defaults to `1.2`.
//
// > **Note:** The `minimumTlsVersion` is set to `Disabled` means all TLS versions are allowed. After you enforce a version of `minimumTlsVersion`, it's not possible to revert to `Disabled`.
//
// > **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 Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether outbound network traffic is restricted for this server. Defaults to `false`.
OutboundNetworkRestrictionEnabled *bool `pulumi:"outboundNetworkRestrictionEnabled"`
// Specifies the primary user managed identity id. Required if `type` within the `identity` block is set to either `SystemAssigned, UserAssigned` or `UserAssigned` and should be set at same time as setting `identityIds`.
PrimaryUserAssignedIdentityId *string `pulumi:"primaryUserAssignedIdentityId"`
// Whether public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Microsoft SQL Server. 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 fully versioned `Key Vault` `Key` URL (e.g. `'https://<YourVaultName>.vault.azure.net/keys/<YourKeyName>/<YourKeyVersion>`) to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
//
// > **Note:** To successfully deploy a `Microsoft SQL Server` in CMK/BYOK TDE the `Key Vault` must have `Soft-delete` and `purge protection` enabled to protect from data loss due to accidental key and/or key vault deletion. The `Key Vault` and the `Microsoft SQL Server` `User Managed Identity Instance` must belong to the same `Azure Active Directory` `tenant`.
//
// > **Note:** Cross-tenant `Key Vault` and `Microsoft SQL Server` interactions are not supported. Please see the [product documentation](https://learn.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview?view=azuresql#requirements-for-configuring-customer-managed-tde) for more information.
//
// > **Note:** When using a firewall with a `Key Vault`, you must enable the option `Allow trusted Microsoft services to bypass the firewall`.
TransparentDataEncryptionKeyVaultKeyId *string `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created.
Version string `pulumi:"version"`
}
// The set of arguments for constructing a Server resource.
type ServerArgs struct {
// The administrator login name for the new server. Required unless `azureadAuthenticationOnly` in the `azureadAdministrator` block is `true`. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created.
AdministratorLogin pulumi.StringPtrInput
// The password associated with the `administratorLogin` user. Needs to comply with Azure's [Password Policy](https://msdn.microsoft.com/library/ms161959.aspx).
AdministratorLoginPassword pulumi.StringPtrInput
// An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`.
AdministratorLoginPasswordWoVersion pulumi.IntPtrInput
// An `azureadAdministrator` block as defined below.
AzureadAdministrator ServerAzureadAdministratorPtrInput
// The connection policy the server will use. Possible values are `Default`, `Proxy`, and `Redirect`. Defaults to `Default`.
ConnectionPolicy pulumi.StringPtrInput
// Whether to enable the Express Vulnerability Assessment Configuration. Defaults to `false`.
//
// > **Note:** If you have enabled the Classic SQL Vulnerability Assessment configuration using the `mssql.ServerVulnerabilityAssessment` resource, you must first delete it before enabling `expressVulnerabilityAssessmentEnabled`. If you wish to revert back to using the Classic SQL Vulnerability Assessment configuration you must first disable this setting.
ExpressVulnerabilityAssessmentEnabled pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity ServerIdentityPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: `1.0`, `1.1` , `1.2` and `Disabled`. Defaults to `1.2`.
//
// > **Note:** The `minimumTlsVersion` is set to `Disabled` means all TLS versions are allowed. After you enforce a version of `minimumTlsVersion`, it's not possible to revert to `Disabled`.
//
// > **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 Microsoft SQL Server. This needs to be globally unique within Azure. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether outbound network traffic is restricted for this server. Defaults to `false`.
OutboundNetworkRestrictionEnabled pulumi.BoolPtrInput
// Specifies the primary user managed identity id. Required if `type` within the `identity` block is set to either `SystemAssigned, UserAssigned` or `UserAssigned` and should be set at same time as setting `identityIds`.
| 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/mssql/managedInstanceVulnerabilityAssessment.go | sdk/go/azure/mssql/managedInstanceVulnerabilityAssessment.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Vulnerability Assessment for an MS Managed Instance.
//
// ## 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/mssql"
// "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 {
// 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"),
// 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"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("exampleinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("NCC-1701-D"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("accteststorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("accteststoragecontainer"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleManagedInstanceSecurityAlertPolicy, err := mssql.NewManagedInstanceSecurityAlertPolicy(ctx, "example", &mssql.ManagedInstanceSecurityAlertPolicyArgs{
// ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
// ManagedInstanceName: pulumi.Any(test.Name),
// Enabled: pulumi.Bool(true),
// StorageEndpoint: pulumi.Any(testAzurermStorageAccount.PrimaryBlobEndpoint),
// StorageAccountAccessKey: pulumi.Any(testAzurermStorageAccount.PrimaryAccessKey),
// RetentionDays: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceVulnerabilityAssessment(ctx, "example", &mssql.ManagedInstanceVulnerabilityAssessmentArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// StorageContainerPath: 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),
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// RecurringScans: &mssql.ManagedInstanceVulnerabilityAssessmentRecurringScansArgs{
// Enabled: pulumi.Bool(true),
// EmailSubscriptionAdmins: pulumi.Bool(true),
// Emails: pulumi.StringArray{
// pulumi.String("email@example1.com"),
// pulumi.String("email@example2.com"),
// },
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleManagedInstanceSecurityAlertPolicy,
// }))
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// The Vulnerability Assessment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/managedInstances/instance1/vulnerabilityAssessments/Default
// ```
type ManagedInstanceVulnerabilityAssessment struct {
pulumi.CustomResourceState
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
// The recurring scans settings. The `recurringScans` block supports fields documented below.
RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScansOutput `pulumi:"recurringScans"`
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
StorageContainerPath pulumi.StringOutput `pulumi:"storageContainerPath"`
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageContainerSasKey pulumi.StringPtrOutput `pulumi:"storageContainerSasKey"`
}
// NewManagedInstanceVulnerabilityAssessment registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceVulnerabilityAssessment(ctx *pulumi.Context,
name string, args *ManagedInstanceVulnerabilityAssessmentArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceVulnerabilityAssessment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
if args.StorageContainerPath == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerPath'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
if args.StorageContainerSasKey != nil {
args.StorageContainerSasKey = pulumi.ToSecret(args.StorageContainerSasKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
"storageContainerSasKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceVulnerabilityAssessment
err := ctx.RegisterResource("azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceVulnerabilityAssessment gets an existing ManagedInstanceVulnerabilityAssessment 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 GetManagedInstanceVulnerabilityAssessment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceVulnerabilityAssessmentState, opts ...pulumi.ResourceOption) (*ManagedInstanceVulnerabilityAssessment, error) {
var resource ManagedInstanceVulnerabilityAssessment
err := ctx.ReadResource("azure:mssql/managedInstanceVulnerabilityAssessment:ManagedInstanceVulnerabilityAssessment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceVulnerabilityAssessment resources.
type managedInstanceVulnerabilityAssessmentState struct {
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
// The recurring scans settings. The `recurringScans` block supports fields documented below.
RecurringScans *ManagedInstanceVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"`
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
StorageContainerPath *string `pulumi:"storageContainerPath"`
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageContainerSasKey *string `pulumi:"storageContainerSasKey"`
}
type ManagedInstanceVulnerabilityAssessmentState struct {
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
// The recurring scans settings. The `recurringScans` block supports fields documented below.
RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScansPtrInput
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrInput
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
StorageContainerPath pulumi.StringPtrInput
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageContainerSasKey pulumi.StringPtrInput
}
func (ManagedInstanceVulnerabilityAssessmentState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceVulnerabilityAssessmentState)(nil)).Elem()
}
type managedInstanceVulnerabilityAssessmentArgs struct {
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The recurring scans settings. The `recurringScans` block supports fields documented below.
RecurringScans *ManagedInstanceVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"`
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
StorageContainerPath string `pulumi:"storageContainerPath"`
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageContainerSasKey *string `pulumi:"storageContainerSasKey"`
}
// The set of arguments for constructing a ManagedInstanceVulnerabilityAssessment resource.
type ManagedInstanceVulnerabilityAssessmentArgs struct {
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
// The recurring scans settings. The `recurringScans` block supports fields documented below.
RecurringScans ManagedInstanceVulnerabilityAssessmentRecurringScansPtrInput
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrInput
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
StorageContainerPath pulumi.StringInput
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageContainerSasKey pulumi.StringPtrInput
}
func (ManagedInstanceVulnerabilityAssessmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceVulnerabilityAssessmentArgs)(nil)).Elem()
}
type ManagedInstanceVulnerabilityAssessmentInput interface {
pulumi.Input
ToManagedInstanceVulnerabilityAssessmentOutput() ManagedInstanceVulnerabilityAssessmentOutput
ToManagedInstanceVulnerabilityAssessmentOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentOutput
}
func (*ManagedInstanceVulnerabilityAssessment) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (i *ManagedInstanceVulnerabilityAssessment) ToManagedInstanceVulnerabilityAssessmentOutput() ManagedInstanceVulnerabilityAssessmentOutput {
return i.ToManagedInstanceVulnerabilityAssessmentOutputWithContext(context.Background())
}
func (i *ManagedInstanceVulnerabilityAssessment) ToManagedInstanceVulnerabilityAssessmentOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceVulnerabilityAssessmentOutput)
}
// ManagedInstanceVulnerabilityAssessmentArrayInput is an input type that accepts ManagedInstanceVulnerabilityAssessmentArray and ManagedInstanceVulnerabilityAssessmentArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceVulnerabilityAssessmentArrayInput` via:
//
// ManagedInstanceVulnerabilityAssessmentArray{ ManagedInstanceVulnerabilityAssessmentArgs{...} }
type ManagedInstanceVulnerabilityAssessmentArrayInput interface {
pulumi.Input
ToManagedInstanceVulnerabilityAssessmentArrayOutput() ManagedInstanceVulnerabilityAssessmentArrayOutput
ToManagedInstanceVulnerabilityAssessmentArrayOutputWithContext(context.Context) ManagedInstanceVulnerabilityAssessmentArrayOutput
}
type ManagedInstanceVulnerabilityAssessmentArray []ManagedInstanceVulnerabilityAssessmentInput
func (ManagedInstanceVulnerabilityAssessmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (i ManagedInstanceVulnerabilityAssessmentArray) ToManagedInstanceVulnerabilityAssessmentArrayOutput() ManagedInstanceVulnerabilityAssessmentArrayOutput {
return i.ToManagedInstanceVulnerabilityAssessmentArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceVulnerabilityAssessmentArray) ToManagedInstanceVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceVulnerabilityAssessmentArrayOutput)
}
// ManagedInstanceVulnerabilityAssessmentMapInput is an input type that accepts ManagedInstanceVulnerabilityAssessmentMap and ManagedInstanceVulnerabilityAssessmentMapOutput values.
// You can construct a concrete instance of `ManagedInstanceVulnerabilityAssessmentMapInput` via:
//
// ManagedInstanceVulnerabilityAssessmentMap{ "key": ManagedInstanceVulnerabilityAssessmentArgs{...} }
type ManagedInstanceVulnerabilityAssessmentMapInput interface {
pulumi.Input
ToManagedInstanceVulnerabilityAssessmentMapOutput() ManagedInstanceVulnerabilityAssessmentMapOutput
ToManagedInstanceVulnerabilityAssessmentMapOutputWithContext(context.Context) ManagedInstanceVulnerabilityAssessmentMapOutput
}
type ManagedInstanceVulnerabilityAssessmentMap map[string]ManagedInstanceVulnerabilityAssessmentInput
func (ManagedInstanceVulnerabilityAssessmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (i ManagedInstanceVulnerabilityAssessmentMap) ToManagedInstanceVulnerabilityAssessmentMapOutput() ManagedInstanceVulnerabilityAssessmentMapOutput {
return i.ToManagedInstanceVulnerabilityAssessmentMapOutputWithContext(context.Background())
}
func (i ManagedInstanceVulnerabilityAssessmentMap) ToManagedInstanceVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceVulnerabilityAssessmentMapOutput)
}
type ManagedInstanceVulnerabilityAssessmentOutput struct{ *pulumi.OutputState }
func (ManagedInstanceVulnerabilityAssessmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (o ManagedInstanceVulnerabilityAssessmentOutput) ToManagedInstanceVulnerabilityAssessmentOutput() ManagedInstanceVulnerabilityAssessmentOutput {
return o
}
func (o ManagedInstanceVulnerabilityAssessmentOutput) ToManagedInstanceVulnerabilityAssessmentOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentOutput {
return o
}
// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created.
func (o ManagedInstanceVulnerabilityAssessmentOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceVulnerabilityAssessment) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// The recurring scans settings. The `recurringScans` block supports fields documented below.
func (o ManagedInstanceVulnerabilityAssessmentOutput) RecurringScans() ManagedInstanceVulnerabilityAssessmentRecurringScansOutput {
return o.ApplyT(func(v *ManagedInstanceVulnerabilityAssessment) ManagedInstanceVulnerabilityAssessmentRecurringScansOutput {
return v.RecurringScans
}).(ManagedInstanceVulnerabilityAssessmentRecurringScansOutput)
}
// Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storageContainerSasKey` isn't specified, `storageAccountAccessKey` is required.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
func (o ManagedInstanceVulnerabilityAssessmentOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceVulnerabilityAssessment) pulumi.StringPtrOutput {
return v.StorageAccountAccessKey
}).(pulumi.StringPtrOutput)
}
// A blob storage container path to hold the scan results (e.g. <https://myStorage.blob.core.windows.net/VaScans/>).
func (o ManagedInstanceVulnerabilityAssessmentOutput) StorageContainerPath() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceVulnerabilityAssessment) pulumi.StringOutput { return v.StorageContainerPath }).(pulumi.StringOutput)
}
// A shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` parameter. If `storageAccountAccessKey` isn't specified, `storageContainerSasKey` is required.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
func (o ManagedInstanceVulnerabilityAssessmentOutput) StorageContainerSasKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceVulnerabilityAssessment) pulumi.StringPtrOutput {
return v.StorageContainerSasKey
}).(pulumi.StringPtrOutput)
}
type ManagedInstanceVulnerabilityAssessmentArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceVulnerabilityAssessmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (o ManagedInstanceVulnerabilityAssessmentArrayOutput) ToManagedInstanceVulnerabilityAssessmentArrayOutput() ManagedInstanceVulnerabilityAssessmentArrayOutput {
return o
}
func (o ManagedInstanceVulnerabilityAssessmentArrayOutput) ToManagedInstanceVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentArrayOutput {
return o
}
func (o ManagedInstanceVulnerabilityAssessmentArrayOutput) Index(i pulumi.IntInput) ManagedInstanceVulnerabilityAssessmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceVulnerabilityAssessment {
return vs[0].([]*ManagedInstanceVulnerabilityAssessment)[vs[1].(int)]
}).(ManagedInstanceVulnerabilityAssessmentOutput)
}
type ManagedInstanceVulnerabilityAssessmentMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceVulnerabilityAssessmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceVulnerabilityAssessment)(nil)).Elem()
}
func (o ManagedInstanceVulnerabilityAssessmentMapOutput) ToManagedInstanceVulnerabilityAssessmentMapOutput() ManagedInstanceVulnerabilityAssessmentMapOutput {
return o
}
func (o ManagedInstanceVulnerabilityAssessmentMapOutput) ToManagedInstanceVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) ManagedInstanceVulnerabilityAssessmentMapOutput {
return o
}
func (o ManagedInstanceVulnerabilityAssessmentMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceVulnerabilityAssessmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceVulnerabilityAssessment {
return vs[0].(map[string]*ManagedInstanceVulnerabilityAssessment)[vs[1].(string)]
}).(ManagedInstanceVulnerabilityAssessmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceVulnerabilityAssessmentInput)(nil)).Elem(), &ManagedInstanceVulnerabilityAssessment{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceVulnerabilityAssessmentArrayInput)(nil)).Elem(), ManagedInstanceVulnerabilityAssessmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceVulnerabilityAssessmentMapInput)(nil)).Elem(), ManagedInstanceVulnerabilityAssessmentMap{})
pulumi.RegisterOutputType(ManagedInstanceVulnerabilityAssessmentOutput{})
pulumi.RegisterOutputType(ManagedInstanceVulnerabilityAssessmentArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceVulnerabilityAssessmentMapOutput{})
}
| 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/mssql/jobSchedule.go | sdk/go/azure/mssql/jobSchedule.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Elastic Job Schedule.
//
// ## 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/mssql"
// "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-resource-group"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// exampleJobAgent, err := mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.ID(),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobCredential(ctx, "example", &mssql.JobCredentialArgs{
// Name: pulumi.String("example-job-credential"),
// JobAgentId: exampleJobAgent.ID(),
// Username: pulumi.String("my-username"),
// Password: pulumi.String("MyP4ssw0rd!!!"),
// })
// if err != nil {
// return err
// }
// exampleJob, err := mssql.NewJob(ctx, "example", &mssql.JobArgs{
// Name: pulumi.String("example-job"),
// JobAgentId: exampleJobAgent.ID(),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobSchedule(ctx, "example", &mssql.JobScheduleArgs{
// JobId: exampleJob.ID(),
// Type: pulumi.String("Recurring"),
// Enabled: pulumi.Bool(true),
// EndTime: pulumi.String("2025-12-01T00:00:00Z"),
// Interval: pulumi.String("PT5M"),
// StartTime: pulumi.String("2025-01-01T00:00:00Z"),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Elastic Job Schedules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/jobSchedule:JobSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/jobs/myjob1
// ```
type JobSchedule struct {
pulumi.CustomResourceState
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The end time of the schedule. Must be in RFC3339 format.
EndTime pulumi.StringOutput `pulumi:"endTime"`
// The interval between job executions. Must be in ISO8601 duration format.
Interval pulumi.StringPtrOutput `pulumi:"interval"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
JobId pulumi.StringOutput `pulumi:"jobId"`
// The start time of the schedule. Must be in RFC3339 format.
StartTime pulumi.StringOutput `pulumi:"startTime"`
// The type of schedule. Possible values are `Once` and `Recurring`.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewJobSchedule registers a new resource with the given unique name, arguments, and options.
func NewJobSchedule(ctx *pulumi.Context,
name string, args *JobScheduleArgs, opts ...pulumi.ResourceOption) (*JobSchedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.JobId == nil {
return nil, errors.New("invalid value for required argument 'JobId'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobSchedule
err := ctx.RegisterResource("azure:mssql/jobSchedule:JobSchedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobSchedule gets an existing JobSchedule 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 GetJobSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobScheduleState, opts ...pulumi.ResourceOption) (*JobSchedule, error) {
var resource JobSchedule
err := ctx.ReadResource("azure:mssql/jobSchedule:JobSchedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobSchedule resources.
type jobScheduleState struct {
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
Enabled *bool `pulumi:"enabled"`
// The end time of the schedule. Must be in RFC3339 format.
EndTime *string `pulumi:"endTime"`
// The interval between job executions. Must be in ISO8601 duration format.
Interval *string `pulumi:"interval"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
JobId *string `pulumi:"jobId"`
// The start time of the schedule. Must be in RFC3339 format.
StartTime *string `pulumi:"startTime"`
// The type of schedule. Possible values are `Once` and `Recurring`.
Type *string `pulumi:"type"`
}
type JobScheduleState struct {
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
Enabled pulumi.BoolPtrInput
// The end time of the schedule. Must be in RFC3339 format.
EndTime pulumi.StringPtrInput
// The interval between job executions. Must be in ISO8601 duration format.
Interval pulumi.StringPtrInput
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
JobId pulumi.StringPtrInput
// The start time of the schedule. Must be in RFC3339 format.
StartTime pulumi.StringPtrInput
// The type of schedule. Possible values are `Once` and `Recurring`.
Type pulumi.StringPtrInput
}
func (JobScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*jobScheduleState)(nil)).Elem()
}
type jobScheduleArgs struct {
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
Enabled *bool `pulumi:"enabled"`
// The end time of the schedule. Must be in RFC3339 format.
EndTime *string `pulumi:"endTime"`
// The interval between job executions. Must be in ISO8601 duration format.
Interval *string `pulumi:"interval"`
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
JobId string `pulumi:"jobId"`
// The start time of the schedule. Must be in RFC3339 format.
StartTime *string `pulumi:"startTime"`
// The type of schedule. Possible values are `Once` and `Recurring`.
Type string `pulumi:"type"`
}
// The set of arguments for constructing a JobSchedule resource.
type JobScheduleArgs struct {
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
Enabled pulumi.BoolPtrInput
// The end time of the schedule. Must be in RFC3339 format.
EndTime pulumi.StringPtrInput
// The interval between job executions. Must be in ISO8601 duration format.
Interval pulumi.StringPtrInput
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
JobId pulumi.StringInput
// The start time of the schedule. Must be in RFC3339 format.
StartTime pulumi.StringPtrInput
// The type of schedule. Possible values are `Once` and `Recurring`.
Type pulumi.StringInput
}
func (JobScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobScheduleArgs)(nil)).Elem()
}
type JobScheduleInput interface {
pulumi.Input
ToJobScheduleOutput() JobScheduleOutput
ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput
}
func (*JobSchedule) ElementType() reflect.Type {
return reflect.TypeOf((**JobSchedule)(nil)).Elem()
}
func (i *JobSchedule) ToJobScheduleOutput() JobScheduleOutput {
return i.ToJobScheduleOutputWithContext(context.Background())
}
func (i *JobSchedule) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleOutput)
}
// JobScheduleArrayInput is an input type that accepts JobScheduleArray and JobScheduleArrayOutput values.
// You can construct a concrete instance of `JobScheduleArrayInput` via:
//
// JobScheduleArray{ JobScheduleArgs{...} }
type JobScheduleArrayInput interface {
pulumi.Input
ToJobScheduleArrayOutput() JobScheduleArrayOutput
ToJobScheduleArrayOutputWithContext(context.Context) JobScheduleArrayOutput
}
type JobScheduleArray []JobScheduleInput
func (JobScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem()
}
func (i JobScheduleArray) ToJobScheduleArrayOutput() JobScheduleArrayOutput {
return i.ToJobScheduleArrayOutputWithContext(context.Background())
}
func (i JobScheduleArray) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleArrayOutput)
}
// JobScheduleMapInput is an input type that accepts JobScheduleMap and JobScheduleMapOutput values.
// You can construct a concrete instance of `JobScheduleMapInput` via:
//
// JobScheduleMap{ "key": JobScheduleArgs{...} }
type JobScheduleMapInput interface {
pulumi.Input
ToJobScheduleMapOutput() JobScheduleMapOutput
ToJobScheduleMapOutputWithContext(context.Context) JobScheduleMapOutput
}
type JobScheduleMap map[string]JobScheduleInput
func (JobScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem()
}
func (i JobScheduleMap) ToJobScheduleMapOutput() JobScheduleMapOutput {
return i.ToJobScheduleMapOutputWithContext(context.Background())
}
func (i JobScheduleMap) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleMapOutput)
}
type JobScheduleOutput struct{ *pulumi.OutputState }
func (JobScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobSchedule)(nil)).Elem()
}
func (o JobScheduleOutput) ToJobScheduleOutput() JobScheduleOutput {
return o
}
func (o JobScheduleOutput) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput {
return o
}
// Should the Elastic Job Schedule be enabled? Defaults to `false`.
//
// > **Note:** When `type` is set to `Once` and `enabled` is set to `true`, it's recommended to add `enabled` to `ignoreChanges`. This is because Azure will set `enabled` to `false` once the job has executed.
func (o JobScheduleOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The end time of the schedule. Must be in RFC3339 format.
func (o JobScheduleOutput) EndTime() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.EndTime }).(pulumi.StringOutput)
}
// The interval between job executions. Must be in ISO8601 duration format.
func (o JobScheduleOutput) Interval() pulumi.StringPtrOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringPtrOutput { return v.Interval }).(pulumi.StringPtrOutput)
}
// The ID of the Elastic Job. Changing this forces a new Elastic Job Schedule to be created.
func (o JobScheduleOutput) JobId() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.JobId }).(pulumi.StringOutput)
}
// The start time of the schedule. Must be in RFC3339 format.
func (o JobScheduleOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput)
}
// The type of schedule. Possible values are `Once` and `Recurring`.
func (o JobScheduleOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type JobScheduleArrayOutput struct{ *pulumi.OutputState }
func (JobScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem()
}
func (o JobScheduleArrayOutput) ToJobScheduleArrayOutput() JobScheduleArrayOutput {
return o
}
func (o JobScheduleArrayOutput) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput {
return o
}
func (o JobScheduleArrayOutput) Index(i pulumi.IntInput) JobScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobSchedule {
return vs[0].([]*JobSchedule)[vs[1].(int)]
}).(JobScheduleOutput)
}
type JobScheduleMapOutput struct{ *pulumi.OutputState }
func (JobScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem()
}
func (o JobScheduleMapOutput) ToJobScheduleMapOutput() JobScheduleMapOutput {
return o
}
func (o JobScheduleMapOutput) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput {
return o
}
func (o JobScheduleMapOutput) MapIndex(k pulumi.StringInput) JobScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobSchedule {
return vs[0].(map[string]*JobSchedule)[vs[1].(string)]
}).(JobScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleInput)(nil)).Elem(), &JobSchedule{})
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleArrayInput)(nil)).Elem(), JobScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleMapInput)(nil)).Elem(), JobScheduleMap{})
pulumi.RegisterOutputType(JobScheduleOutput{})
pulumi.RegisterOutputType(JobScheduleArrayOutput{})
pulumi.RegisterOutputType(JobScheduleMapOutput{})
}
| 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/mssql/getDatabase.go | sdk/go/azure/mssql/getDatabase.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 mssql
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 SQL database.
//
// ## 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/mssql"
// "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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// example := mssql.LookupDatabaseOutput(ctx, mssql.GetDatabaseOutputArgs{
// Name: pulumi.String("example-mssql-db"),
// ServerId: exampleServer.ID(),
// }, nil)
// ctx.Export("databaseId", example.ApplyT(func(example mssql.GetDatabaseResult) (*string, error) {
// return &example.Id, nil
// }).(pulumi.StringPtrOutput))
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
func LookupDatabase(ctx *pulumi.Context, args *LookupDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatabaseResult
err := ctx.Invoke("azure:mssql/getDatabase:getDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatabase.
type LookupDatabaseArgs struct {
// The name of the MS SQL Database.
Name string `pulumi:"name"`
// The id of the MS SQL Server on which to read the database.
ServerId string `pulumi:"serverId"`
}
// A collection of values returned by getDatabase.
type LookupDatabaseResult struct {
// The collation of the database.
Collation string `pulumi:"collation"`
// The id of the elastic pool containing this database.
ElasticPoolId string `pulumi:"elasticPoolId"`
// The type of enclave being used by the database.
EnclaveType string `pulumi:"enclaveType"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetDatabaseIdentity `pulumi:"identities"`
// The license type to apply for this database.
LicenseType string `pulumi:"licenseType"`
// The max size of the database in gigabytes.
MaxSizeGb int `pulumi:"maxSizeGb"`
Name string `pulumi:"name"`
// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed.
ReadReplicaCount int `pulumi:"readReplicaCount"`
// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica.
ReadScale bool `pulumi:"readScale"`
ServerId string `pulumi:"serverId"`
// The name of the SKU of the database.
SkuName string `pulumi:"skuName"`
// The storage account type used to store backups for this database.
StorageAccountType string `pulumi:"storageAccountType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether or not Transparent Data Encryption is enabled.
TransparentDataEncryptionEnabled bool `pulumi:"transparentDataEncryptionEnabled"`
// Whether or not TDE automatically rotates the encryption Key to latest version.
TransparentDataEncryptionKeyAutomaticRotationEnabled bool `pulumi:"transparentDataEncryptionKeyAutomaticRotationEnabled"`
// The Key Vault key URI to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
TransparentDataEncryptionKeyVaultKeyId string `pulumi:"transparentDataEncryptionKeyVaultKeyId"`
// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
ZoneRedundant bool `pulumi:"zoneRedundant"`
}
func LookupDatabaseOutput(ctx *pulumi.Context, args LookupDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatabaseResultOutput, error) {
args := v.(LookupDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getDatabase:getDatabase", args, LookupDatabaseResultOutput{}, options).(LookupDatabaseResultOutput), nil
}).(LookupDatabaseResultOutput)
}
// A collection of arguments for invoking getDatabase.
type LookupDatabaseOutputArgs struct {
// The name of the MS SQL Database.
Name pulumi.StringInput `pulumi:"name"`
// The id of the MS SQL Server on which to read the database.
ServerId pulumi.StringInput `pulumi:"serverId"`
}
func (LookupDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getDatabase.
type LookupDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatabaseResult)(nil)).Elem()
}
func (o LookupDatabaseResultOutput) ToLookupDatabaseResultOutput() LookupDatabaseResultOutput {
return o
}
func (o LookupDatabaseResultOutput) ToLookupDatabaseResultOutputWithContext(ctx context.Context) LookupDatabaseResultOutput {
return o
}
// The collation of the database.
func (o LookupDatabaseResultOutput) Collation() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Collation }).(pulumi.StringOutput)
}
// The id of the elastic pool containing this database.
func (o LookupDatabaseResultOutput) ElasticPoolId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.ElasticPoolId }).(pulumi.StringOutput)
}
// The type of enclave being used by the database.
func (o LookupDatabaseResultOutput) EnclaveType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.EnclaveType }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o LookupDatabaseResultOutput) Identities() GetDatabaseIdentityArrayOutput {
return o.ApplyT(func(v LookupDatabaseResult) []GetDatabaseIdentity { return v.Identities }).(GetDatabaseIdentityArrayOutput)
}
// The license type to apply for this database.
func (o LookupDatabaseResultOutput) LicenseType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.LicenseType }).(pulumi.StringOutput)
}
// The max size of the database in gigabytes.
func (o LookupDatabaseResultOutput) MaxSizeGb() pulumi.IntOutput {
return o.ApplyT(func(v LookupDatabaseResult) int { return v.MaxSizeGb }).(pulumi.IntOutput)
}
func (o LookupDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed.
func (o LookupDatabaseResultOutput) ReadReplicaCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupDatabaseResult) int { return v.ReadReplicaCount }).(pulumi.IntOutput)
}
// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica.
func (o LookupDatabaseResultOutput) ReadScale() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDatabaseResult) bool { return v.ReadScale }).(pulumi.BoolOutput)
}
func (o LookupDatabaseResultOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.ServerId }).(pulumi.StringOutput)
}
// The name of the SKU of the database.
func (o LookupDatabaseResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.SkuName }).(pulumi.StringOutput)
}
// The storage account type used to store backups for this database.
func (o LookupDatabaseResultOutput) StorageAccountType() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.StorageAccountType }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o LookupDatabaseResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDatabaseResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Whether or not Transparent Data Encryption is enabled.
func (o LookupDatabaseResultOutput) TransparentDataEncryptionEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDatabaseResult) bool { return v.TransparentDataEncryptionEnabled }).(pulumi.BoolOutput)
}
// Whether or not TDE automatically rotates the encryption Key to latest version.
func (o LookupDatabaseResultOutput) TransparentDataEncryptionKeyAutomaticRotationEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDatabaseResult) bool { return v.TransparentDataEncryptionKeyAutomaticRotationEnabled }).(pulumi.BoolOutput)
}
// The Key Vault key URI to be used as the `Customer Managed Key`(CMK/BYOK) for the `Transparent Data Encryption`(TDE) layer.
func (o LookupDatabaseResultOutput) TransparentDataEncryptionKeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.TransparentDataEncryptionKeyVaultKeyId }).(pulumi.StringOutput)
}
// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
func (o LookupDatabaseResultOutput) ZoneRedundant() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDatabaseResult) bool { return v.ZoneRedundant }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatabaseResultOutput{})
}
| 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/mssql/getFailoverGroup.go | sdk/go/azure/mssql/getFailoverGroup.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 mssql
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 Microsoft Azure SQL Failover Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := mssql.LookupFailoverGroup(ctx, &mssql.LookupFailoverGroupArgs{
// Name: "example",
// ServerId: "example-sql-server",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("mssqlFailoverGroupId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
func LookupFailoverGroup(ctx *pulumi.Context, args *LookupFailoverGroupArgs, opts ...pulumi.InvokeOption) (*LookupFailoverGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupFailoverGroupResult
err := ctx.Invoke("azure:mssql/getFailoverGroup:getFailoverGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getFailoverGroup.
type LookupFailoverGroupArgs struct {
// The name of the Failover Group.
Name string `pulumi:"name"`
// The ID of the primary SQL Server where the Failover Group exists.
ServerId string `pulumi:"serverId"`
}
// A collection of values returned by getFailoverGroup.
type LookupFailoverGroupResult struct {
// A set of database names in the Failover Group.
Databases []string `pulumi:"databases"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// A `partnerServer` block as defined below.
PartnerServers []GetFailoverGroupPartnerServer `pulumi:"partnerServers"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicies []GetFailoverGroupReadWriteEndpointFailoverPolicy `pulumi:"readWriteEndpointFailoverPolicies"`
// Whether failover is enabled for the readonly endpoint.
ReadonlyEndpointFailoverPolicyEnabled bool `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
ServerId string `pulumi:"serverId"`
// A mapping of tags which are assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func LookupFailoverGroupOutput(ctx *pulumi.Context, args LookupFailoverGroupOutputArgs, opts ...pulumi.InvokeOption) LookupFailoverGroupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupFailoverGroupResultOutput, error) {
args := v.(LookupFailoverGroupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getFailoverGroup:getFailoverGroup", args, LookupFailoverGroupResultOutput{}, options).(LookupFailoverGroupResultOutput), nil
}).(LookupFailoverGroupResultOutput)
}
// A collection of arguments for invoking getFailoverGroup.
type LookupFailoverGroupOutputArgs struct {
// The name of the Failover Group.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the primary SQL Server where the Failover Group exists.
ServerId pulumi.StringInput `pulumi:"serverId"`
}
func (LookupFailoverGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFailoverGroupArgs)(nil)).Elem()
}
// A collection of values returned by getFailoverGroup.
type LookupFailoverGroupResultOutput struct{ *pulumi.OutputState }
func (LookupFailoverGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFailoverGroupResult)(nil)).Elem()
}
func (o LookupFailoverGroupResultOutput) ToLookupFailoverGroupResultOutput() LookupFailoverGroupResultOutput {
return o
}
func (o LookupFailoverGroupResultOutput) ToLookupFailoverGroupResultOutputWithContext(ctx context.Context) LookupFailoverGroupResultOutput {
return o
}
// A set of database names in the Failover Group.
func (o LookupFailoverGroupResultOutput) Databases() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) []string { return v.Databases }).(pulumi.StringArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupFailoverGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupFailoverGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `partnerServer` block as defined below.
func (o LookupFailoverGroupResultOutput) PartnerServers() GetFailoverGroupPartnerServerArrayOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) []GetFailoverGroupPartnerServer { return v.PartnerServers }).(GetFailoverGroupPartnerServerArrayOutput)
}
// A `readWriteEndpointFailoverPolicy` block as defined below.
func (o LookupFailoverGroupResultOutput) ReadWriteEndpointFailoverPolicies() GetFailoverGroupReadWriteEndpointFailoverPolicyArrayOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) []GetFailoverGroupReadWriteEndpointFailoverPolicy {
return v.ReadWriteEndpointFailoverPolicies
}).(GetFailoverGroupReadWriteEndpointFailoverPolicyArrayOutput)
}
// Whether failover is enabled for the readonly endpoint.
func (o LookupFailoverGroupResultOutput) ReadonlyEndpointFailoverPolicyEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) bool { return v.ReadonlyEndpointFailoverPolicyEnabled }).(pulumi.BoolOutput)
}
func (o LookupFailoverGroupResultOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) string { return v.ServerId }).(pulumi.StringOutput)
}
// A mapping of tags which are assigned to the resource.
func (o LookupFailoverGroupResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupFailoverGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupFailoverGroupResultOutput{})
}
| 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/mssql/databaseVulnerabilityAssessmentRuleBaseline.go | sdk/go/azure/mssql/databaseVulnerabilityAssessmentRuleBaseline.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Database Vulnerability Assessment Rule Baseline.
//
// > **Note:** Database Vulnerability Assessment is currently only available for MS SQL databases.
//
// ## 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mysqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("accteststorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("accteststoragecontainer"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleServerSecurityAlertPolicy, err := mssql.NewServerSecurityAlertPolicy(ctx, "example", &mssql.ServerSecurityAlertPolicyArgs{
// ResourceGroupName: example.Name,
// ServerName: exampleServer.Name,
// State: pulumi.String("Enabled"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("mysqldatabase"),
// ServerId: pulumi.Any(test.Id),
// })
// if err != nil {
// return err
// }
// exampleServerVulnerabilityAssessment, err := mssql.NewServerVulnerabilityAssessment(ctx, "example", &mssql.ServerVulnerabilityAssessmentArgs{
// ServerSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.ID(),
// StorageContainerPath: 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),
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewDatabaseVulnerabilityAssessmentRuleBaseline(ctx, "example", &mssql.DatabaseVulnerabilityAssessmentRuleBaselineArgs{
// ServerVulnerabilityAssessmentId: exampleServerVulnerabilityAssessment.ID(),
// DatabaseName: exampleDatabase.Name,
// RuleId: pulumi.String("VA2065"),
// BaselineName: pulumi.String("master"),
// BaselineResults: mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArray{
// &mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs{
// Results: pulumi.StringArray{
// pulumi.String("allowedip1"),
// pulumi.String("123.123.123.123"),
// pulumi.String("123.123.123.123"),
// },
// },
// &mssql.DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArgs{
// Results: pulumi.StringArray{
// pulumi.String("allowedip2"),
// pulumi.String("255.255.255.255"),
// pulumi.String("255.255.255.255"),
// },
// },
// },
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Database Vulnerability Assessment Rule Baseline can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/databaseVulnerabilityAssessmentRuleBaseline:DatabaseVulnerabilityAssessmentRuleBaseline example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/servers/mssqlserver/databases/mysqldatabase/vulnerabilityAssessments/Default/rules/VA2065/baselines/master
// ```
type DatabaseVulnerabilityAssessmentRuleBaseline struct {
pulumi.CustomResourceState
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
BaselineName pulumi.StringPtrOutput `pulumi:"baselineName"`
// A `baselineResult` block as documented below. Multiple blocks can be defined.
BaselineResults DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayOutput `pulumi:"baselineResults"`
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
RuleId pulumi.StringOutput `pulumi:"ruleId"`
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
ServerVulnerabilityAssessmentId pulumi.StringOutput `pulumi:"serverVulnerabilityAssessmentId"`
}
// NewDatabaseVulnerabilityAssessmentRuleBaseline registers a new resource with the given unique name, arguments, and options.
func NewDatabaseVulnerabilityAssessmentRuleBaseline(ctx *pulumi.Context,
name string, args *DatabaseVulnerabilityAssessmentRuleBaselineArgs, opts ...pulumi.ResourceOption) (*DatabaseVulnerabilityAssessmentRuleBaseline, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.BaselineResults == nil {
return nil, errors.New("invalid value for required argument 'BaselineResults'")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.RuleId == nil {
return nil, errors.New("invalid value for required argument 'RuleId'")
}
if args.ServerVulnerabilityAssessmentId == nil {
return nil, errors.New("invalid value for required argument 'ServerVulnerabilityAssessmentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DatabaseVulnerabilityAssessmentRuleBaseline
err := ctx.RegisterResource("azure:mssql/databaseVulnerabilityAssessmentRuleBaseline:DatabaseVulnerabilityAssessmentRuleBaseline", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatabaseVulnerabilityAssessmentRuleBaseline gets an existing DatabaseVulnerabilityAssessmentRuleBaseline 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 GetDatabaseVulnerabilityAssessmentRuleBaseline(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatabaseVulnerabilityAssessmentRuleBaselineState, opts ...pulumi.ResourceOption) (*DatabaseVulnerabilityAssessmentRuleBaseline, error) {
var resource DatabaseVulnerabilityAssessmentRuleBaseline
err := ctx.ReadResource("azure:mssql/databaseVulnerabilityAssessmentRuleBaseline:DatabaseVulnerabilityAssessmentRuleBaseline", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DatabaseVulnerabilityAssessmentRuleBaseline resources.
type databaseVulnerabilityAssessmentRuleBaselineState struct {
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
BaselineName *string `pulumi:"baselineName"`
// A `baselineResult` block as documented below. Multiple blocks can be defined.
BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult `pulumi:"baselineResults"`
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
DatabaseName *string `pulumi:"databaseName"`
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
RuleId *string `pulumi:"ruleId"`
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
ServerVulnerabilityAssessmentId *string `pulumi:"serverVulnerabilityAssessmentId"`
}
type DatabaseVulnerabilityAssessmentRuleBaselineState struct {
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
BaselineName pulumi.StringPtrInput
// A `baselineResult` block as documented below. Multiple blocks can be defined.
BaselineResults DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayInput
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
DatabaseName pulumi.StringPtrInput
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
RuleId pulumi.StringPtrInput
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
ServerVulnerabilityAssessmentId pulumi.StringPtrInput
}
func (DatabaseVulnerabilityAssessmentRuleBaselineState) ElementType() reflect.Type {
return reflect.TypeOf((*databaseVulnerabilityAssessmentRuleBaselineState)(nil)).Elem()
}
type databaseVulnerabilityAssessmentRuleBaselineArgs struct {
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
BaselineName *string `pulumi:"baselineName"`
// A `baselineResult` block as documented below. Multiple blocks can be defined.
BaselineResults []DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult `pulumi:"baselineResults"`
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
DatabaseName string `pulumi:"databaseName"`
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
RuleId string `pulumi:"ruleId"`
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
ServerVulnerabilityAssessmentId string `pulumi:"serverVulnerabilityAssessmentId"`
}
// The set of arguments for constructing a DatabaseVulnerabilityAssessmentRuleBaseline resource.
type DatabaseVulnerabilityAssessmentRuleBaselineArgs struct {
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
BaselineName pulumi.StringPtrInput
// A `baselineResult` block as documented below. Multiple blocks can be defined.
BaselineResults DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayInput
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
DatabaseName pulumi.StringInput
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
RuleId pulumi.StringInput
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
ServerVulnerabilityAssessmentId pulumi.StringInput
}
func (DatabaseVulnerabilityAssessmentRuleBaselineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*databaseVulnerabilityAssessmentRuleBaselineArgs)(nil)).Elem()
}
type DatabaseVulnerabilityAssessmentRuleBaselineInput interface {
pulumi.Input
ToDatabaseVulnerabilityAssessmentRuleBaselineOutput() DatabaseVulnerabilityAssessmentRuleBaselineOutput
ToDatabaseVulnerabilityAssessmentRuleBaselineOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineOutput
}
func (*DatabaseVulnerabilityAssessmentRuleBaseline) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (i *DatabaseVulnerabilityAssessmentRuleBaseline) ToDatabaseVulnerabilityAssessmentRuleBaselineOutput() DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return i.ToDatabaseVulnerabilityAssessmentRuleBaselineOutputWithContext(context.Background())
}
func (i *DatabaseVulnerabilityAssessmentRuleBaseline) ToDatabaseVulnerabilityAssessmentRuleBaselineOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseVulnerabilityAssessmentRuleBaselineOutput)
}
// DatabaseVulnerabilityAssessmentRuleBaselineArrayInput is an input type that accepts DatabaseVulnerabilityAssessmentRuleBaselineArray and DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput values.
// You can construct a concrete instance of `DatabaseVulnerabilityAssessmentRuleBaselineArrayInput` via:
//
// DatabaseVulnerabilityAssessmentRuleBaselineArray{ DatabaseVulnerabilityAssessmentRuleBaselineArgs{...} }
type DatabaseVulnerabilityAssessmentRuleBaselineArrayInput interface {
pulumi.Input
ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutput() DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput
ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutputWithContext(context.Context) DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput
}
type DatabaseVulnerabilityAssessmentRuleBaselineArray []DatabaseVulnerabilityAssessmentRuleBaselineInput
func (DatabaseVulnerabilityAssessmentRuleBaselineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (i DatabaseVulnerabilityAssessmentRuleBaselineArray) ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutput() DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput {
return i.ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutputWithContext(context.Background())
}
func (i DatabaseVulnerabilityAssessmentRuleBaselineArray) ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput)
}
// DatabaseVulnerabilityAssessmentRuleBaselineMapInput is an input type that accepts DatabaseVulnerabilityAssessmentRuleBaselineMap and DatabaseVulnerabilityAssessmentRuleBaselineMapOutput values.
// You can construct a concrete instance of `DatabaseVulnerabilityAssessmentRuleBaselineMapInput` via:
//
// DatabaseVulnerabilityAssessmentRuleBaselineMap{ "key": DatabaseVulnerabilityAssessmentRuleBaselineArgs{...} }
type DatabaseVulnerabilityAssessmentRuleBaselineMapInput interface {
pulumi.Input
ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutput() DatabaseVulnerabilityAssessmentRuleBaselineMapOutput
ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutputWithContext(context.Context) DatabaseVulnerabilityAssessmentRuleBaselineMapOutput
}
type DatabaseVulnerabilityAssessmentRuleBaselineMap map[string]DatabaseVulnerabilityAssessmentRuleBaselineInput
func (DatabaseVulnerabilityAssessmentRuleBaselineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (i DatabaseVulnerabilityAssessmentRuleBaselineMap) ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutput() DatabaseVulnerabilityAssessmentRuleBaselineMapOutput {
return i.ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutputWithContext(context.Background())
}
func (i DatabaseVulnerabilityAssessmentRuleBaselineMap) ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseVulnerabilityAssessmentRuleBaselineMapOutput)
}
type DatabaseVulnerabilityAssessmentRuleBaselineOutput struct{ *pulumi.OutputState }
func (DatabaseVulnerabilityAssessmentRuleBaselineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineOutput() DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return o
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return o
}
// The name of the vulnerability assessment rule baseline. Valid options are `default` and `master`. `default` implies a baseline on a database level rule and `master` for server level rule. Defaults to `default`. Changing this forces a new resource to be created.
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) BaselineName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DatabaseVulnerabilityAssessmentRuleBaseline) pulumi.StringPtrOutput { return v.BaselineName }).(pulumi.StringPtrOutput)
}
// A `baselineResult` block as documented below. Multiple blocks can be defined.
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) BaselineResults() DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayOutput {
return o.ApplyT(func(v *DatabaseVulnerabilityAssessmentRuleBaseline) DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayOutput {
return v.BaselineResults
}).(DatabaseVulnerabilityAssessmentRuleBaselineBaselineResultArrayOutput)
}
// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *DatabaseVulnerabilityAssessmentRuleBaseline) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// The vulnerability assessment rule ID. Changing this forces a new resource to be created.
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) RuleId() pulumi.StringOutput {
return o.ApplyT(func(v *DatabaseVulnerabilityAssessmentRuleBaseline) pulumi.StringOutput { return v.RuleId }).(pulumi.StringOutput)
}
// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
func (o DatabaseVulnerabilityAssessmentRuleBaselineOutput) ServerVulnerabilityAssessmentId() pulumi.StringOutput {
return o.ApplyT(func(v *DatabaseVulnerabilityAssessmentRuleBaseline) pulumi.StringOutput {
return v.ServerVulnerabilityAssessmentId
}).(pulumi.StringOutput)
}
type DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput struct{ *pulumi.OutputState }
func (DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutput() DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput {
return o
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineArrayOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput {
return o
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput) Index(i pulumi.IntInput) DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DatabaseVulnerabilityAssessmentRuleBaseline {
return vs[0].([]*DatabaseVulnerabilityAssessmentRuleBaseline)[vs[1].(int)]
}).(DatabaseVulnerabilityAssessmentRuleBaselineOutput)
}
type DatabaseVulnerabilityAssessmentRuleBaselineMapOutput struct{ *pulumi.OutputState }
func (DatabaseVulnerabilityAssessmentRuleBaselineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DatabaseVulnerabilityAssessmentRuleBaseline)(nil)).Elem()
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineMapOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutput() DatabaseVulnerabilityAssessmentRuleBaselineMapOutput {
return o
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineMapOutput) ToDatabaseVulnerabilityAssessmentRuleBaselineMapOutputWithContext(ctx context.Context) DatabaseVulnerabilityAssessmentRuleBaselineMapOutput {
return o
}
func (o DatabaseVulnerabilityAssessmentRuleBaselineMapOutput) MapIndex(k pulumi.StringInput) DatabaseVulnerabilityAssessmentRuleBaselineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DatabaseVulnerabilityAssessmentRuleBaseline {
return vs[0].(map[string]*DatabaseVulnerabilityAssessmentRuleBaseline)[vs[1].(string)]
}).(DatabaseVulnerabilityAssessmentRuleBaselineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseVulnerabilityAssessmentRuleBaselineInput)(nil)).Elem(), &DatabaseVulnerabilityAssessmentRuleBaseline{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseVulnerabilityAssessmentRuleBaselineArrayInput)(nil)).Elem(), DatabaseVulnerabilityAssessmentRuleBaselineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseVulnerabilityAssessmentRuleBaselineMapInput)(nil)).Elem(), DatabaseVulnerabilityAssessmentRuleBaselineMap{})
pulumi.RegisterOutputType(DatabaseVulnerabilityAssessmentRuleBaselineOutput{})
pulumi.RegisterOutputType(DatabaseVulnerabilityAssessmentRuleBaselineArrayOutput{})
pulumi.RegisterOutputType(DatabaseVulnerabilityAssessmentRuleBaselineMapOutput{})
}
| 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/mssql/serverSecurityAlertPolicy.go | sdk/go/azure/mssql/serverSecurityAlertPolicy.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Security Alert Policy for a MSSQL Server.
//
// > **Note:** Security Alert Policy is currently only available for MS SQL databases.
//
// ## 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi-azurerm/sdk/go/azurerm"
// "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
// }
// exampleSqlServer, err := azurerm.NewSqlServer(ctx, "example", &azurerm.SqlServerArgs{
// Name: "mysqlserver",
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: "12.0",
// AdministratorLogin: "4dm1n157r470r",
// AdministratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("accteststorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerSecurityAlertPolicy(ctx, "example", &mssql.ServerSecurityAlertPolicyArgs{
// ResourceGroupName: example.Name,
// ServerName: exampleSqlServer.Name,
// State: pulumi.String("Enabled"),
// StorageEndpoint: exampleAccount.PrimaryBlobEndpoint,
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// RetentionDays: pulumi.Int(20),
// DisabledAlerts: pulumi.StringArray{
// pulumi.String("Sql_Injection"),
// pulumi.String("Data_Exfiltration"),
// },
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Server Security Alert Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverSecurityAlertPolicy:ServerSecurityAlertPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/servers/mssqlserver/securityAlertPolicies/Default
// ```
type ServerSecurityAlertPolicy struct {
pulumi.CustomResourceState
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
DisabledAlerts pulumi.StringArrayOutput `pulumi:"disabledAlerts"`
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
EmailAccountAdmins pulumi.BoolPtrOutput `pulumi:"emailAccountAdmins"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"`
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrOutput `pulumi:"retentionDays"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerName pulumi.StringOutput `pulumi:"serverName"`
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
State pulumi.StringOutput `pulumi:"state"`
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
StorageEndpoint pulumi.StringPtrOutput `pulumi:"storageEndpoint"`
}
// NewServerSecurityAlertPolicy registers a new resource with the given unique name, arguments, and options.
func NewServerSecurityAlertPolicy(ctx *pulumi.Context,
name string, args *ServerSecurityAlertPolicyArgs, opts ...pulumi.ResourceOption) (*ServerSecurityAlertPolicy, 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.State == nil {
return nil, errors.New("invalid value for required argument 'State'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerSecurityAlertPolicy
err := ctx.RegisterResource("azure:mssql/serverSecurityAlertPolicy:ServerSecurityAlertPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerSecurityAlertPolicy gets an existing ServerSecurityAlertPolicy 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 GetServerSecurityAlertPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerSecurityAlertPolicyState, opts ...pulumi.ResourceOption) (*ServerSecurityAlertPolicy, error) {
var resource ServerSecurityAlertPolicy
err := ctx.ReadResource("azure:mssql/serverSecurityAlertPolicy:ServerSecurityAlertPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerSecurityAlertPolicy resources.
type serverSecurityAlertPolicyState struct {
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
DisabledAlerts []string `pulumi:"disabledAlerts"`
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
EmailAccountAdmins *bool `pulumi:"emailAccountAdmins"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses []string `pulumi:"emailAddresses"`
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
RetentionDays *int `pulumi:"retentionDays"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerName *string `pulumi:"serverName"`
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
State *string `pulumi:"state"`
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
type ServerSecurityAlertPolicyState struct {
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
DisabledAlerts pulumi.StringArrayInput
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
EmailAccountAdmins pulumi.BoolPtrInput
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayInput
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrInput
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerName pulumi.StringPtrInput
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
State pulumi.StringPtrInput
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
StorageEndpoint pulumi.StringPtrInput
}
func (ServerSecurityAlertPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*serverSecurityAlertPolicyState)(nil)).Elem()
}
type serverSecurityAlertPolicyArgs struct {
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
DisabledAlerts []string `pulumi:"disabledAlerts"`
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
EmailAccountAdmins *bool `pulumi:"emailAccountAdmins"`
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses []string `pulumi:"emailAddresses"`
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
RetentionDays *int `pulumi:"retentionDays"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerName string `pulumi:"serverName"`
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
State string `pulumi:"state"`
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
StorageEndpoint *string `pulumi:"storageEndpoint"`
}
// The set of arguments for constructing a ServerSecurityAlertPolicy resource.
type ServerSecurityAlertPolicyArgs struct {
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
DisabledAlerts pulumi.StringArrayInput
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
EmailAccountAdmins pulumi.BoolPtrInput
// Specifies an array of email addresses to which the alert is sent.
EmailAddresses pulumi.StringArrayInput
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
RetentionDays pulumi.IntPtrInput
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerName pulumi.StringInput
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
State pulumi.StringInput
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
StorageEndpoint pulumi.StringPtrInput
}
func (ServerSecurityAlertPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverSecurityAlertPolicyArgs)(nil)).Elem()
}
type ServerSecurityAlertPolicyInput interface {
pulumi.Input
ToServerSecurityAlertPolicyOutput() ServerSecurityAlertPolicyOutput
ToServerSecurityAlertPolicyOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyOutput
}
func (*ServerSecurityAlertPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ServerSecurityAlertPolicy)(nil)).Elem()
}
func (i *ServerSecurityAlertPolicy) ToServerSecurityAlertPolicyOutput() ServerSecurityAlertPolicyOutput {
return i.ToServerSecurityAlertPolicyOutputWithContext(context.Background())
}
func (i *ServerSecurityAlertPolicy) ToServerSecurityAlertPolicyOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerSecurityAlertPolicyOutput)
}
// ServerSecurityAlertPolicyArrayInput is an input type that accepts ServerSecurityAlertPolicyArray and ServerSecurityAlertPolicyArrayOutput values.
// You can construct a concrete instance of `ServerSecurityAlertPolicyArrayInput` via:
//
// ServerSecurityAlertPolicyArray{ ServerSecurityAlertPolicyArgs{...} }
type ServerSecurityAlertPolicyArrayInput interface {
pulumi.Input
ToServerSecurityAlertPolicyArrayOutput() ServerSecurityAlertPolicyArrayOutput
ToServerSecurityAlertPolicyArrayOutputWithContext(context.Context) ServerSecurityAlertPolicyArrayOutput
}
type ServerSecurityAlertPolicyArray []ServerSecurityAlertPolicyInput
func (ServerSecurityAlertPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerSecurityAlertPolicy)(nil)).Elem()
}
func (i ServerSecurityAlertPolicyArray) ToServerSecurityAlertPolicyArrayOutput() ServerSecurityAlertPolicyArrayOutput {
return i.ToServerSecurityAlertPolicyArrayOutputWithContext(context.Background())
}
func (i ServerSecurityAlertPolicyArray) ToServerSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerSecurityAlertPolicyArrayOutput)
}
// ServerSecurityAlertPolicyMapInput is an input type that accepts ServerSecurityAlertPolicyMap and ServerSecurityAlertPolicyMapOutput values.
// You can construct a concrete instance of `ServerSecurityAlertPolicyMapInput` via:
//
// ServerSecurityAlertPolicyMap{ "key": ServerSecurityAlertPolicyArgs{...} }
type ServerSecurityAlertPolicyMapInput interface {
pulumi.Input
ToServerSecurityAlertPolicyMapOutput() ServerSecurityAlertPolicyMapOutput
ToServerSecurityAlertPolicyMapOutputWithContext(context.Context) ServerSecurityAlertPolicyMapOutput
}
type ServerSecurityAlertPolicyMap map[string]ServerSecurityAlertPolicyInput
func (ServerSecurityAlertPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerSecurityAlertPolicy)(nil)).Elem()
}
func (i ServerSecurityAlertPolicyMap) ToServerSecurityAlertPolicyMapOutput() ServerSecurityAlertPolicyMapOutput {
return i.ToServerSecurityAlertPolicyMapOutputWithContext(context.Background())
}
func (i ServerSecurityAlertPolicyMap) ToServerSecurityAlertPolicyMapOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerSecurityAlertPolicyMapOutput)
}
type ServerSecurityAlertPolicyOutput struct{ *pulumi.OutputState }
func (ServerSecurityAlertPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerSecurityAlertPolicy)(nil)).Elem()
}
func (o ServerSecurityAlertPolicyOutput) ToServerSecurityAlertPolicyOutput() ServerSecurityAlertPolicyOutput {
return o
}
func (o ServerSecurityAlertPolicyOutput) ToServerSecurityAlertPolicyOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyOutput {
return o
}
// Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`.
func (o ServerSecurityAlertPolicyOutput) DisabledAlerts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringArrayOutput { return v.DisabledAlerts }).(pulumi.StringArrayOutput)
}
// Are the alerts sent to the account administrators? Possible values are `true` or `false`. Defaults to `false`.
func (o ServerSecurityAlertPolicyOutput) EmailAccountAdmins() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.BoolPtrOutput { return v.EmailAccountAdmins }).(pulumi.BoolPtrOutput)
}
// Specifies an array of email addresses to which the alert is sent.
func (o ServerSecurityAlertPolicyOutput) EmailAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput)
}
// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
func (o ServerSecurityAlertPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the number of days to keep the Threat Detection audit logs. Defaults to `0`.
func (o ServerSecurityAlertPolicyOutput) RetentionDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.IntPtrOutput { return v.RetentionDays }).(pulumi.IntPtrOutput)
}
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
func (o ServerSecurityAlertPolicyOutput) ServerName() pulumi.StringOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput)
}
// Specifies the state of the policy. Possible values are `Disabled` or `Enabled`.
func (o ServerSecurityAlertPolicyOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// Specifies the primary access key of the Threat Detection audit logs blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
func (o ServerSecurityAlertPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// Specifies the blob storage endpoint that will hold all Threat Detection audit logs (e.g., `https://example.blob.core.windows.net`).
//
// > **Note:** The `storageAccountAccessKey` field is required when the `storageEndpoint` field has been set.
//
// > **Note:** Storage accounts configured with `sharedAccessKeyEnabled = false` cannot be used for the `storageEndpoint` field.
func (o ServerSecurityAlertPolicyOutput) StorageEndpoint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerSecurityAlertPolicy) pulumi.StringPtrOutput { return v.StorageEndpoint }).(pulumi.StringPtrOutput)
}
type ServerSecurityAlertPolicyArrayOutput struct{ *pulumi.OutputState }
func (ServerSecurityAlertPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerSecurityAlertPolicy)(nil)).Elem()
}
func (o ServerSecurityAlertPolicyArrayOutput) ToServerSecurityAlertPolicyArrayOutput() ServerSecurityAlertPolicyArrayOutput {
return o
}
func (o ServerSecurityAlertPolicyArrayOutput) ToServerSecurityAlertPolicyArrayOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyArrayOutput {
return o
}
func (o ServerSecurityAlertPolicyArrayOutput) Index(i pulumi.IntInput) ServerSecurityAlertPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerSecurityAlertPolicy {
return vs[0].([]*ServerSecurityAlertPolicy)[vs[1].(int)]
}).(ServerSecurityAlertPolicyOutput)
}
type ServerSecurityAlertPolicyMapOutput struct{ *pulumi.OutputState }
func (ServerSecurityAlertPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerSecurityAlertPolicy)(nil)).Elem()
}
func (o ServerSecurityAlertPolicyMapOutput) ToServerSecurityAlertPolicyMapOutput() ServerSecurityAlertPolicyMapOutput {
return o
}
func (o ServerSecurityAlertPolicyMapOutput) ToServerSecurityAlertPolicyMapOutputWithContext(ctx context.Context) ServerSecurityAlertPolicyMapOutput {
return o
}
func (o ServerSecurityAlertPolicyMapOutput) MapIndex(k pulumi.StringInput) ServerSecurityAlertPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerSecurityAlertPolicy {
return vs[0].(map[string]*ServerSecurityAlertPolicy)[vs[1].(string)]
}).(ServerSecurityAlertPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerSecurityAlertPolicyInput)(nil)).Elem(), &ServerSecurityAlertPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerSecurityAlertPolicyArrayInput)(nil)).Elem(), ServerSecurityAlertPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerSecurityAlertPolicyMapInput)(nil)).Elem(), ServerSecurityAlertPolicyMap{})
pulumi.RegisterOutputType(ServerSecurityAlertPolicyOutput{})
pulumi.RegisterOutputType(ServerSecurityAlertPolicyArrayOutput{})
pulumi.RegisterOutputType(ServerSecurityAlertPolicyMapOutput{})
}
| 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/mssql/serverVulnerabilityAssessment.go | sdk/go/azure/mssql/serverVulnerabilityAssessment.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Vulnerability Assessment for an MS SQL Server.
//
// > **Note:** Vulnerability Assessment is currently only available for MS SQL databases.
//
// > **Note:** This resource cannot be used to enable the Express SQL Vulnerability Assessment configuration, to enable the express configuration, use `expressVulnerabilityAssessmentEnabled` in the `mssql.Server` resource.
//
// ## 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/mssql"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mysqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleServerSecurityAlertPolicy, err := mssql.NewServerSecurityAlertPolicy(ctx, "example", &mssql.ServerSecurityAlertPolicyArgs{
// ResourceGroupName: example.Name,
// ServerName: exampleServer.Name,
// State: pulumi.String("Enabled"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerVulnerabilityAssessment(ctx, "example", &mssql.ServerVulnerabilityAssessmentArgs{
// ServerSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.ID(),
// StorageContainerPath: 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),
// StorageAccountAccessKey: exampleAccount.PrimaryAccessKey,
// RecurringScans: &mssql.ServerVulnerabilityAssessmentRecurringScansArgs{
// Enabled: pulumi.Bool(true),
// EmailSubscriptionAdmins: pulumi.Bool(true),
// Emails: pulumi.StringArray{
// pulumi.String("email@example1.com"),
// pulumi.String("email@example2.com"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Server Vulnerability Assessment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverVulnerabilityAssessment:ServerVulnerabilityAssessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acceptanceTestResourceGroup1/providers/Microsoft.Sql/servers/mssqlserver/vulnerabilityAssessments/Default
// ```
type ServerVulnerabilityAssessment struct {
pulumi.CustomResourceState
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
RecurringScans ServerVulnerabilityAssessmentRecurringScansOutput `pulumi:"recurringScans"`
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
ServerSecurityAlertPolicyId pulumi.StringOutput `pulumi:"serverSecurityAlertPolicyId"`
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
StorageContainerPath pulumi.StringOutput `pulumi:"storageContainerPath"`
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
StorageContainerSasKey pulumi.StringPtrOutput `pulumi:"storageContainerSasKey"`
}
// NewServerVulnerabilityAssessment registers a new resource with the given unique name, arguments, and options.
func NewServerVulnerabilityAssessment(ctx *pulumi.Context,
name string, args *ServerVulnerabilityAssessmentArgs, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerSecurityAlertPolicyId == nil {
return nil, errors.New("invalid value for required argument 'ServerSecurityAlertPolicyId'")
}
if args.StorageContainerPath == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerPath'")
}
if args.StorageAccountAccessKey != nil {
args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput)
}
if args.StorageContainerSasKey != nil {
args.StorageContainerSasKey = pulumi.ToSecret(args.StorageContainerSasKey).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"storageAccountAccessKey",
"storageContainerSasKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerVulnerabilityAssessment
err := ctx.RegisterResource("azure:mssql/serverVulnerabilityAssessment:ServerVulnerabilityAssessment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerVulnerabilityAssessment gets an existing ServerVulnerabilityAssessment 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 GetServerVulnerabilityAssessment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerVulnerabilityAssessmentState, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessment, error) {
var resource ServerVulnerabilityAssessment
err := ctx.ReadResource("azure:mssql/serverVulnerabilityAssessment:ServerVulnerabilityAssessment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerVulnerabilityAssessment resources.
type serverVulnerabilityAssessmentState struct {
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
RecurringScans *ServerVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"`
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
ServerSecurityAlertPolicyId *string `pulumi:"serverSecurityAlertPolicyId"`
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
StorageContainerPath *string `pulumi:"storageContainerPath"`
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
StorageContainerSasKey *string `pulumi:"storageContainerSasKey"`
}
type ServerVulnerabilityAssessmentState struct {
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
RecurringScans ServerVulnerabilityAssessmentRecurringScansPtrInput
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
ServerSecurityAlertPolicyId pulumi.StringPtrInput
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
StorageContainerPath pulumi.StringPtrInput
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
StorageContainerSasKey pulumi.StringPtrInput
}
func (ServerVulnerabilityAssessmentState) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentState)(nil)).Elem()
}
type serverVulnerabilityAssessmentArgs struct {
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
RecurringScans *ServerVulnerabilityAssessmentRecurringScans `pulumi:"recurringScans"`
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
ServerSecurityAlertPolicyId string `pulumi:"serverSecurityAlertPolicyId"`
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
StorageContainerPath string `pulumi:"storageContainerPath"`
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
StorageContainerSasKey *string `pulumi:"storageContainerSasKey"`
}
// The set of arguments for constructing a ServerVulnerabilityAssessment resource.
type ServerVulnerabilityAssessmentArgs struct {
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
RecurringScans ServerVulnerabilityAssessmentRecurringScansPtrInput
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
ServerSecurityAlertPolicyId pulumi.StringInput
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
StorageAccountAccessKey pulumi.StringPtrInput
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
StorageContainerPath pulumi.StringInput
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
StorageContainerSasKey pulumi.StringPtrInput
}
func (ServerVulnerabilityAssessmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentArgs)(nil)).Elem()
}
type ServerVulnerabilityAssessmentInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentOutput() ServerVulnerabilityAssessmentOutput
ToServerVulnerabilityAssessmentOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentOutput
}
func (*ServerVulnerabilityAssessment) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessment)(nil)).Elem()
}
func (i *ServerVulnerabilityAssessment) ToServerVulnerabilityAssessmentOutput() ServerVulnerabilityAssessmentOutput {
return i.ToServerVulnerabilityAssessmentOutputWithContext(context.Background())
}
func (i *ServerVulnerabilityAssessment) ToServerVulnerabilityAssessmentOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentOutput)
}
// ServerVulnerabilityAssessmentArrayInput is an input type that accepts ServerVulnerabilityAssessmentArray and ServerVulnerabilityAssessmentArrayOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentArrayInput` via:
//
// ServerVulnerabilityAssessmentArray{ ServerVulnerabilityAssessmentArgs{...} }
type ServerVulnerabilityAssessmentArrayInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentArrayOutput() ServerVulnerabilityAssessmentArrayOutput
ToServerVulnerabilityAssessmentArrayOutputWithContext(context.Context) ServerVulnerabilityAssessmentArrayOutput
}
type ServerVulnerabilityAssessmentArray []ServerVulnerabilityAssessmentInput
func (ServerVulnerabilityAssessmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessment)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentArray) ToServerVulnerabilityAssessmentArrayOutput() ServerVulnerabilityAssessmentArrayOutput {
return i.ToServerVulnerabilityAssessmentArrayOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentArray) ToServerVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentArrayOutput)
}
// ServerVulnerabilityAssessmentMapInput is an input type that accepts ServerVulnerabilityAssessmentMap and ServerVulnerabilityAssessmentMapOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentMapInput` via:
//
// ServerVulnerabilityAssessmentMap{ "key": ServerVulnerabilityAssessmentArgs{...} }
type ServerVulnerabilityAssessmentMapInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentMapOutput() ServerVulnerabilityAssessmentMapOutput
ToServerVulnerabilityAssessmentMapOutputWithContext(context.Context) ServerVulnerabilityAssessmentMapOutput
}
type ServerVulnerabilityAssessmentMap map[string]ServerVulnerabilityAssessmentInput
func (ServerVulnerabilityAssessmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessment)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentMap) ToServerVulnerabilityAssessmentMapOutput() ServerVulnerabilityAssessmentMapOutput {
return i.ToServerVulnerabilityAssessmentMapOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentMap) ToServerVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentMapOutput)
}
type ServerVulnerabilityAssessmentOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessment)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentOutput) ToServerVulnerabilityAssessmentOutput() ServerVulnerabilityAssessmentOutput {
return o
}
func (o ServerVulnerabilityAssessmentOutput) ToServerVulnerabilityAssessmentOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentOutput {
return o
}
// A `recurringScans` block as defined below.
//
// > **Note:** To reset the `recurringScans` code block to it's default values you must explicitly define an empty `recurringScans` code block (e.g., `recurringScans {}`) in your configuration file.
func (o ServerVulnerabilityAssessmentOutput) RecurringScans() ServerVulnerabilityAssessmentRecurringScansOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessment) ServerVulnerabilityAssessmentRecurringScansOutput {
return v.RecurringScans
}).(ServerVulnerabilityAssessmentRecurringScansOutput)
}
// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
func (o ServerVulnerabilityAssessmentOutput) ServerSecurityAlertPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessment) pulumi.StringOutput { return v.ServerSecurityAlertPolicyId }).(pulumi.StringOutput)
}
// Specifies the primary access key of the blob storage endpoint.
//
// > **Note:** The `storageAccountAccessKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageAccountAccessKey` property is not defined the `storageContainerSasKey` property is required.
func (o ServerVulnerabilityAssessmentOutput) StorageAccountAccessKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageAccountAccessKey }).(pulumi.StringPtrOutput)
}
// Specifies the blob storage container path that will hold the scan results (e.g., <https://example.blob.core.windows.net/example/>).
func (o ServerVulnerabilityAssessmentOutput) StorageContainerPath() pulumi.StringOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessment) pulumi.StringOutput { return v.StorageContainerPath }).(pulumi.StringOutput)
}
// Specifies the shared access signature (SAS Key) that has write access to the blob container specified in `storageContainerPath` property.
//
// > **Note:** The `storageContainerSasKey` only applies if the storage account is not behind a virtual network or a firewall.
//
// > **Note:** If the `storageContainerSasKey` property is not defined the `storageAccountAccessKey` property is required.
func (o ServerVulnerabilityAssessmentOutput) StorageContainerSasKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessment) pulumi.StringPtrOutput { return v.StorageContainerSasKey }).(pulumi.StringPtrOutput)
}
type ServerVulnerabilityAssessmentArrayOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessment)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentArrayOutput) ToServerVulnerabilityAssessmentArrayOutput() ServerVulnerabilityAssessmentArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentArrayOutput) ToServerVulnerabilityAssessmentArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentArrayOutput) Index(i pulumi.IntInput) ServerVulnerabilityAssessmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessment {
return vs[0].([]*ServerVulnerabilityAssessment)[vs[1].(int)]
}).(ServerVulnerabilityAssessmentOutput)
}
type ServerVulnerabilityAssessmentMapOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessment)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentMapOutput) ToServerVulnerabilityAssessmentMapOutput() ServerVulnerabilityAssessmentMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentMapOutput) ToServerVulnerabilityAssessmentMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentMapOutput) MapIndex(k pulumi.StringInput) ServerVulnerabilityAssessmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessment {
return vs[0].(map[string]*ServerVulnerabilityAssessment)[vs[1].(string)]
}).(ServerVulnerabilityAssessmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentInput)(nil)).Elem(), &ServerVulnerabilityAssessment{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentArrayInput)(nil)).Elem(), ServerVulnerabilityAssessmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentMapInput)(nil)).Elem(), ServerVulnerabilityAssessmentMap{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentArrayOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentMapOutput{})
}
| 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/mssql/jobAgent.go | sdk/go/azure/mssql/jobAgent.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Elastic Job Agent.
//
// ## 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/mssql"
// "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("northeurope"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("example-server"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("example-db"),
// ServerId: exampleServer.ID(),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// SkuName: pulumi.String("S1"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewJobAgent(ctx, "example", &mssql.JobAgentArgs{
// Name: pulumi.String("example-job-agent"),
// Location: example.Location,
// DatabaseId: exampleDatabase.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// Elastic Job Agents can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/jobAgent:JobAgent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1
// ```
type JobAgent struct {
pulumi.CustomResourceState
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
DatabaseId pulumi.StringOutput `pulumi:"databaseId"`
// An `identity` block as defined below.
Identity JobAgentIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
Sku pulumi.StringPtrOutput `pulumi:"sku"`
// A mapping of tags which should be assigned to this Elastic Job Agent.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewJobAgent registers a new resource with the given unique name, arguments, and options.
func NewJobAgent(ctx *pulumi.Context,
name string, args *JobAgentArgs, opts ...pulumi.ResourceOption) (*JobAgent, 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'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobAgent
err := ctx.RegisterResource("azure:mssql/jobAgent:JobAgent", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobAgent gets an existing JobAgent 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 GetJobAgent(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobAgentState, opts ...pulumi.ResourceOption) (*JobAgent, error) {
var resource JobAgent
err := ctx.ReadResource("azure:mssql/jobAgent:JobAgent", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobAgent resources.
type jobAgentState struct {
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
DatabaseId *string `pulumi:"databaseId"`
// An `identity` block as defined below.
Identity *JobAgentIdentity `pulumi:"identity"`
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
Name *string `pulumi:"name"`
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
Sku *string `pulumi:"sku"`
// A mapping of tags which should be assigned to this Elastic Job Agent.
Tags map[string]string `pulumi:"tags"`
}
type JobAgentState struct {
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
DatabaseId pulumi.StringPtrInput
// An `identity` block as defined below.
Identity JobAgentIdentityPtrInput
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
Name pulumi.StringPtrInput
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
Sku pulumi.StringPtrInput
// A mapping of tags which should be assigned to this Elastic Job Agent.
Tags pulumi.StringMapInput
}
func (JobAgentState) ElementType() reflect.Type {
return reflect.TypeOf((*jobAgentState)(nil)).Elem()
}
type jobAgentArgs struct {
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
DatabaseId string `pulumi:"databaseId"`
// An `identity` block as defined below.
Identity *JobAgentIdentity `pulumi:"identity"`
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
Name *string `pulumi:"name"`
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
Sku *string `pulumi:"sku"`
// A mapping of tags which should be assigned to this Elastic Job Agent.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a JobAgent resource.
type JobAgentArgs struct {
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
DatabaseId pulumi.StringInput
// An `identity` block as defined below.
Identity JobAgentIdentityPtrInput
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
Name pulumi.StringPtrInput
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
Sku pulumi.StringPtrInput
// A mapping of tags which should be assigned to this Elastic Job Agent.
Tags pulumi.StringMapInput
}
func (JobAgentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobAgentArgs)(nil)).Elem()
}
type JobAgentInput interface {
pulumi.Input
ToJobAgentOutput() JobAgentOutput
ToJobAgentOutputWithContext(ctx context.Context) JobAgentOutput
}
func (*JobAgent) ElementType() reflect.Type {
return reflect.TypeOf((**JobAgent)(nil)).Elem()
}
func (i *JobAgent) ToJobAgentOutput() JobAgentOutput {
return i.ToJobAgentOutputWithContext(context.Background())
}
func (i *JobAgent) ToJobAgentOutputWithContext(ctx context.Context) JobAgentOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobAgentOutput)
}
// JobAgentArrayInput is an input type that accepts JobAgentArray and JobAgentArrayOutput values.
// You can construct a concrete instance of `JobAgentArrayInput` via:
//
// JobAgentArray{ JobAgentArgs{...} }
type JobAgentArrayInput interface {
pulumi.Input
ToJobAgentArrayOutput() JobAgentArrayOutput
ToJobAgentArrayOutputWithContext(context.Context) JobAgentArrayOutput
}
type JobAgentArray []JobAgentInput
func (JobAgentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobAgent)(nil)).Elem()
}
func (i JobAgentArray) ToJobAgentArrayOutput() JobAgentArrayOutput {
return i.ToJobAgentArrayOutputWithContext(context.Background())
}
func (i JobAgentArray) ToJobAgentArrayOutputWithContext(ctx context.Context) JobAgentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobAgentArrayOutput)
}
// JobAgentMapInput is an input type that accepts JobAgentMap and JobAgentMapOutput values.
// You can construct a concrete instance of `JobAgentMapInput` via:
//
// JobAgentMap{ "key": JobAgentArgs{...} }
type JobAgentMapInput interface {
pulumi.Input
ToJobAgentMapOutput() JobAgentMapOutput
ToJobAgentMapOutputWithContext(context.Context) JobAgentMapOutput
}
type JobAgentMap map[string]JobAgentInput
func (JobAgentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobAgent)(nil)).Elem()
}
func (i JobAgentMap) ToJobAgentMapOutput() JobAgentMapOutput {
return i.ToJobAgentMapOutputWithContext(context.Background())
}
func (i JobAgentMap) ToJobAgentMapOutputWithContext(ctx context.Context) JobAgentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobAgentMapOutput)
}
type JobAgentOutput struct{ *pulumi.OutputState }
func (JobAgentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobAgent)(nil)).Elem()
}
func (o JobAgentOutput) ToJobAgentOutput() JobAgentOutput {
return o
}
func (o JobAgentOutput) ToJobAgentOutputWithContext(ctx context.Context) JobAgentOutput {
return o
}
// The ID of the database to store metadata for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
func (o JobAgentOutput) DatabaseId() pulumi.StringOutput {
return o.ApplyT(func(v *JobAgent) pulumi.StringOutput { return v.DatabaseId }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o JobAgentOutput) Identity() JobAgentIdentityPtrOutput {
return o.ApplyT(func(v *JobAgent) JobAgentIdentityPtrOutput { return v.Identity }).(JobAgentIdentityPtrOutput)
}
// The Azure Region where this Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created.
func (o JobAgentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *JobAgent) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created.
func (o JobAgentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *JobAgent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the SKU to use for this Elastic Job Agent. Possible values are `JA100`, `JA200`, `JA400`, and `JA800`. Defaults to `JA100`.
func (o JobAgentOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *JobAgent) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to this Elastic Job Agent.
func (o JobAgentOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *JobAgent) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type JobAgentArrayOutput struct{ *pulumi.OutputState }
func (JobAgentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobAgent)(nil)).Elem()
}
func (o JobAgentArrayOutput) ToJobAgentArrayOutput() JobAgentArrayOutput {
return o
}
func (o JobAgentArrayOutput) ToJobAgentArrayOutputWithContext(ctx context.Context) JobAgentArrayOutput {
return o
}
func (o JobAgentArrayOutput) Index(i pulumi.IntInput) JobAgentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobAgent {
return vs[0].([]*JobAgent)[vs[1].(int)]
}).(JobAgentOutput)
}
type JobAgentMapOutput struct{ *pulumi.OutputState }
func (JobAgentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobAgent)(nil)).Elem()
}
func (o JobAgentMapOutput) ToJobAgentMapOutput() JobAgentMapOutput {
return o
}
func (o JobAgentMapOutput) ToJobAgentMapOutputWithContext(ctx context.Context) JobAgentMapOutput {
return o
}
func (o JobAgentMapOutput) MapIndex(k pulumi.StringInput) JobAgentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobAgent {
return vs[0].(map[string]*JobAgent)[vs[1].(string)]
}).(JobAgentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobAgentInput)(nil)).Elem(), &JobAgent{})
pulumi.RegisterInputType(reflect.TypeOf((*JobAgentArrayInput)(nil)).Elem(), JobAgentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobAgentMapInput)(nil)).Elem(), JobAgentMap{})
pulumi.RegisterOutputType(JobAgentOutput{})
pulumi.RegisterOutputType(JobAgentArrayOutput{})
pulumi.RegisterOutputType(JobAgentMapOutput{})
}
| 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/mssql/getManagedDatabase.go | sdk/go/azure/mssql/getManagedDatabase.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 mssql
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 SQL Azure Managed Database.
//
// ## Example Usage
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
func LookupManagedDatabase(ctx *pulumi.Context, args *LookupManagedDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupManagedDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupManagedDatabaseResult
err := ctx.Invoke("azure:mssql/getManagedDatabase:getManagedDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getManagedDatabase.
type LookupManagedDatabaseArgs struct {
// The SQL Managed Instance ID.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The name of this Azure SQL Azure Managed Database.
Name string `pulumi:"name"`
}
// A collection of values returned by getManagedDatabase.
type LookupManagedDatabaseResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicies []GetManagedDatabaseLongTermRetentionPolicy `pulumi:"longTermRetentionPolicies"`
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The name of the Managed Instance.
ManagedInstanceName string `pulumi:"managedInstanceName"`
Name string `pulumi:"name"`
// A `pointInTimeRestore` block as defined below.
PointInTimeRestores []GetManagedDatabasePointInTimeRestore `pulumi:"pointInTimeRestores"`
// The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays int `pulumi:"shortTermRetentionDays"`
}
func LookupManagedDatabaseOutput(ctx *pulumi.Context, args LookupManagedDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupManagedDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupManagedDatabaseResultOutput, error) {
args := v.(LookupManagedDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:mssql/getManagedDatabase:getManagedDatabase", args, LookupManagedDatabaseResultOutput{}, options).(LookupManagedDatabaseResultOutput), nil
}).(LookupManagedDatabaseResultOutput)
}
// A collection of arguments for invoking getManagedDatabase.
type LookupManagedDatabaseOutputArgs struct {
// The SQL Managed Instance ID.
ManagedInstanceId pulumi.StringInput `pulumi:"managedInstanceId"`
// The name of this Azure SQL Azure Managed Database.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupManagedDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagedDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getManagedDatabase.
type LookupManagedDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupManagedDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupManagedDatabaseResult)(nil)).Elem()
}
func (o LookupManagedDatabaseResultOutput) ToLookupManagedDatabaseResultOutput() LookupManagedDatabaseResultOutput {
return o
}
func (o LookupManagedDatabaseResultOutput) ToLookupManagedDatabaseResultOutputWithContext(ctx context.Context) LookupManagedDatabaseResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupManagedDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `longTermRetentionPolicy` block as defined below.
func (o LookupManagedDatabaseResultOutput) LongTermRetentionPolicies() GetManagedDatabaseLongTermRetentionPolicyArrayOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) []GetManagedDatabaseLongTermRetentionPolicy {
return v.LongTermRetentionPolicies
}).(GetManagedDatabaseLongTermRetentionPolicyArrayOutput)
}
func (o LookupManagedDatabaseResultOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) string { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// The name of the Managed Instance.
func (o LookupManagedDatabaseResultOutput) ManagedInstanceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) string { return v.ManagedInstanceName }).(pulumi.StringOutput)
}
func (o LookupManagedDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
// A `pointInTimeRestore` block as defined below.
func (o LookupManagedDatabaseResultOutput) PointInTimeRestores() GetManagedDatabasePointInTimeRestoreArrayOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) []GetManagedDatabasePointInTimeRestore {
return v.PointInTimeRestores
}).(GetManagedDatabasePointInTimeRestoreArrayOutput)
}
// The name of the Resource Group where the Azure SQL Azure Managed Instance exists.
func (o LookupManagedDatabaseResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
func (o LookupManagedDatabaseResultOutput) ShortTermRetentionDays() pulumi.IntOutput {
return o.ApplyT(func(v LookupManagedDatabaseResult) int { return v.ShortTermRetentionDays }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupManagedDatabaseResultOutput{})
}
| 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/mssql/failoverGroup.go | sdk/go/azure/mssql/failoverGroup.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft Azure SQL Failover Group.
//
// ## 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/mssql"
// "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("database-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// primary, err := mssql.NewServer(ctx, "primary", &mssql.ServerArgs{
// Name: pulumi.String("mssqlserver-primary"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsKat11"),
// })
// if err != nil {
// return err
// }
// secondary, err := mssql.NewServer(ctx, "secondary", &mssql.ServerArgs{
// Name: pulumi.String("mssqlserver-secondary"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("North Europe"),
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsKat12"),
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := mssql.NewDatabase(ctx, "example", &mssql.DatabaseArgs{
// Name: pulumi.String("exampledb"),
// ServerId: primary.ID(),
// SkuName: pulumi.String("S1"),
// Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
// MaxSizeGb: pulumi.Float64(200),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewFailoverGroup(ctx, "example", &mssql.FailoverGroupArgs{
// Name: pulumi.String("example"),
// ServerId: primary.ID(),
// Databases: pulumi.StringArray{
// exampleDatabase.ID(),
// },
// PartnerServers: mssql.FailoverGroupPartnerServerArray{
// &mssql.FailoverGroupPartnerServerArgs{
// Id: secondary.ID(),
// },
// },
// ReadWriteEndpointFailoverPolicy: &mssql.FailoverGroupReadWriteEndpointFailoverPolicyArgs{
// Mode: pulumi.String("Automatic"),
// GraceMinutes: pulumi.Int(80),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("prod"),
// "database": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// Failover Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/failoverGroup:FailoverGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Sql/servers/server1/failoverGroups/failoverGroup1
// ```
type FailoverGroup struct {
pulumi.CustomResourceState
// A set of database names to include in the failover group.
Databases pulumi.StringArrayOutput `pulumi:"databases"`
// The name of the Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `partnerServer` block as defined below.
PartnerServers FailoverGroupPartnerServerArrayOutput `pulumi:"partnerServers"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicyOutput `pulumi:"readWriteEndpointFailoverPolicy"`
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolOutput `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewFailoverGroup registers a new resource with the given unique name, arguments, and options.
func NewFailoverGroup(ctx *pulumi.Context,
name string, args *FailoverGroupArgs, opts ...pulumi.ResourceOption) (*FailoverGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PartnerServers == nil {
return nil, errors.New("invalid value for required argument 'PartnerServers'")
}
if args.ReadWriteEndpointFailoverPolicy == nil {
return nil, errors.New("invalid value for required argument 'ReadWriteEndpointFailoverPolicy'")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/failoverGroup:FailoverGroup"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource FailoverGroup
err := ctx.RegisterResource("azure:mssql/failoverGroup:FailoverGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFailoverGroup gets an existing FailoverGroup 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 GetFailoverGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FailoverGroupState, opts ...pulumi.ResourceOption) (*FailoverGroup, error) {
var resource FailoverGroup
err := ctx.ReadResource("azure:mssql/failoverGroup:FailoverGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FailoverGroup resources.
type failoverGroupState struct {
// A set of database names to include in the failover group.
Databases []string `pulumi:"databases"`
// The name of the Failover Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `partnerServer` block as defined below.
PartnerServers []FailoverGroupPartnerServer `pulumi:"partnerServers"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy *FailoverGroupReadWriteEndpointFailoverPolicy `pulumi:"readWriteEndpointFailoverPolicy"`
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
ReadonlyEndpointFailoverPolicyEnabled *bool `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type FailoverGroupState struct {
// A set of database names to include in the failover group.
Databases pulumi.StringArrayInput
// The name of the Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `partnerServer` block as defined below.
PartnerServers FailoverGroupPartnerServerArrayInput
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicyPtrInput
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolPtrInput
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (FailoverGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*failoverGroupState)(nil)).Elem()
}
type failoverGroupArgs struct {
// A set of database names to include in the failover group.
Databases []string `pulumi:"databases"`
// The name of the Failover Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `partnerServer` block as defined below.
PartnerServers []FailoverGroupPartnerServer `pulumi:"partnerServers"`
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicy `pulumi:"readWriteEndpointFailoverPolicy"`
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
ReadonlyEndpointFailoverPolicyEnabled *bool `pulumi:"readonlyEndpointFailoverPolicyEnabled"`
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a FailoverGroup resource.
type FailoverGroupArgs struct {
// A set of database names to include in the failover group.
Databases pulumi.StringArrayInput
// The name of the Failover Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `partnerServer` block as defined below.
PartnerServers FailoverGroupPartnerServerArrayInput
// A `readWriteEndpointFailoverPolicy` block as defined below.
ReadWriteEndpointFailoverPolicy FailoverGroupReadWriteEndpointFailoverPolicyInput
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
ReadonlyEndpointFailoverPolicyEnabled pulumi.BoolPtrInput
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (FailoverGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*failoverGroupArgs)(nil)).Elem()
}
type FailoverGroupInput interface {
pulumi.Input
ToFailoverGroupOutput() FailoverGroupOutput
ToFailoverGroupOutputWithContext(ctx context.Context) FailoverGroupOutput
}
func (*FailoverGroup) ElementType() reflect.Type {
return reflect.TypeOf((**FailoverGroup)(nil)).Elem()
}
func (i *FailoverGroup) ToFailoverGroupOutput() FailoverGroupOutput {
return i.ToFailoverGroupOutputWithContext(context.Background())
}
func (i *FailoverGroup) ToFailoverGroupOutputWithContext(ctx context.Context) FailoverGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(FailoverGroupOutput)
}
// FailoverGroupArrayInput is an input type that accepts FailoverGroupArray and FailoverGroupArrayOutput values.
// You can construct a concrete instance of `FailoverGroupArrayInput` via:
//
// FailoverGroupArray{ FailoverGroupArgs{...} }
type FailoverGroupArrayInput interface {
pulumi.Input
ToFailoverGroupArrayOutput() FailoverGroupArrayOutput
ToFailoverGroupArrayOutputWithContext(context.Context) FailoverGroupArrayOutput
}
type FailoverGroupArray []FailoverGroupInput
func (FailoverGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FailoverGroup)(nil)).Elem()
}
func (i FailoverGroupArray) ToFailoverGroupArrayOutput() FailoverGroupArrayOutput {
return i.ToFailoverGroupArrayOutputWithContext(context.Background())
}
func (i FailoverGroupArray) ToFailoverGroupArrayOutputWithContext(ctx context.Context) FailoverGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FailoverGroupArrayOutput)
}
// FailoverGroupMapInput is an input type that accepts FailoverGroupMap and FailoverGroupMapOutput values.
// You can construct a concrete instance of `FailoverGroupMapInput` via:
//
// FailoverGroupMap{ "key": FailoverGroupArgs{...} }
type FailoverGroupMapInput interface {
pulumi.Input
ToFailoverGroupMapOutput() FailoverGroupMapOutput
ToFailoverGroupMapOutputWithContext(context.Context) FailoverGroupMapOutput
}
type FailoverGroupMap map[string]FailoverGroupInput
func (FailoverGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FailoverGroup)(nil)).Elem()
}
func (i FailoverGroupMap) ToFailoverGroupMapOutput() FailoverGroupMapOutput {
return i.ToFailoverGroupMapOutputWithContext(context.Background())
}
func (i FailoverGroupMap) ToFailoverGroupMapOutputWithContext(ctx context.Context) FailoverGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FailoverGroupMapOutput)
}
type FailoverGroupOutput struct{ *pulumi.OutputState }
func (FailoverGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FailoverGroup)(nil)).Elem()
}
func (o FailoverGroupOutput) ToFailoverGroupOutput() FailoverGroupOutput {
return o
}
func (o FailoverGroupOutput) ToFailoverGroupOutputWithContext(ctx context.Context) FailoverGroupOutput {
return o
}
// A set of database names to include in the failover group.
func (o FailoverGroupOutput) Databases() pulumi.StringArrayOutput {
return o.ApplyT(func(v *FailoverGroup) pulumi.StringArrayOutput { return v.Databases }).(pulumi.StringArrayOutput)
}
// The name of the Failover Group. Changing this forces a new resource to be created.
func (o FailoverGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *FailoverGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `partnerServer` block as defined below.
func (o FailoverGroupOutput) PartnerServers() FailoverGroupPartnerServerArrayOutput {
return o.ApplyT(func(v *FailoverGroup) FailoverGroupPartnerServerArrayOutput { return v.PartnerServers }).(FailoverGroupPartnerServerArrayOutput)
}
// A `readWriteEndpointFailoverPolicy` block as defined below.
func (o FailoverGroupOutput) ReadWriteEndpointFailoverPolicy() FailoverGroupReadWriteEndpointFailoverPolicyOutput {
return o.ApplyT(func(v *FailoverGroup) FailoverGroupReadWriteEndpointFailoverPolicyOutput {
return v.ReadWriteEndpointFailoverPolicy
}).(FailoverGroupReadWriteEndpointFailoverPolicyOutput)
}
// Whether failover is enabled for the readonly endpoint. Defaults to `false`.
func (o FailoverGroupOutput) ReadonlyEndpointFailoverPolicyEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *FailoverGroup) pulumi.BoolOutput { return v.ReadonlyEndpointFailoverPolicyEnabled }).(pulumi.BoolOutput)
}
// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created.
func (o FailoverGroupOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *FailoverGroup) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o FailoverGroupOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *FailoverGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type FailoverGroupArrayOutput struct{ *pulumi.OutputState }
func (FailoverGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FailoverGroup)(nil)).Elem()
}
func (o FailoverGroupArrayOutput) ToFailoverGroupArrayOutput() FailoverGroupArrayOutput {
return o
}
func (o FailoverGroupArrayOutput) ToFailoverGroupArrayOutputWithContext(ctx context.Context) FailoverGroupArrayOutput {
return o
}
func (o FailoverGroupArrayOutput) Index(i pulumi.IntInput) FailoverGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FailoverGroup {
return vs[0].([]*FailoverGroup)[vs[1].(int)]
}).(FailoverGroupOutput)
}
type FailoverGroupMapOutput struct{ *pulumi.OutputState }
func (FailoverGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FailoverGroup)(nil)).Elem()
}
func (o FailoverGroupMapOutput) ToFailoverGroupMapOutput() FailoverGroupMapOutput {
return o
}
func (o FailoverGroupMapOutput) ToFailoverGroupMapOutputWithContext(ctx context.Context) FailoverGroupMapOutput {
return o
}
func (o FailoverGroupMapOutput) MapIndex(k pulumi.StringInput) FailoverGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FailoverGroup {
return vs[0].(map[string]*FailoverGroup)[vs[1].(string)]
}).(FailoverGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FailoverGroupInput)(nil)).Elem(), &FailoverGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*FailoverGroupArrayInput)(nil)).Elem(), FailoverGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*FailoverGroupMapInput)(nil)).Elem(), FailoverGroupMap{})
pulumi.RegisterOutputType(FailoverGroupOutput{})
pulumi.RegisterOutputType(FailoverGroupArrayOutput{})
pulumi.RegisterOutputType(FailoverGroupMapOutput{})
}
| 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/mssql/managedInstanceStartStopSchedule.go | sdk/go/azure/mssql/managedInstanceStartStopSchedule.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages Start Stop Schedules for an MS SQL Managed Instance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("database-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("mi-security-group"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_inbound"),
// Priority: pulumi.Int(106),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("9000"),
// pulumi.String("9003"),
// pulumi.String("1438"),
// pulumi.String("1440"),
// pulumi.String("1452"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_inbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_health_probe_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_health_probe_inbound"),
// Priority: pulumi.Int(300),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("AzureLoadBalancer"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_tds_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_tds_inbound"),
// Priority: pulumi.Int(1000),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("1433"),
// SourceAddressPrefix: pulumi.String("VirtualNetwork"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_inbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_inbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Inbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_management_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_management_outbound"),
// Priority: pulumi.Int(102),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("Tcp"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRanges: pulumi.StringArray{
// pulumi.String("80"),
// pulumi.String("443"),
// pulumi.String("12000"),
// },
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "allow_misubnet_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("allow_misubnet_outbound"),
// Priority: pulumi.Int(200),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Allow"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("10.0.0.0/24"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// _, err = network.NewNetworkSecurityRule(ctx, "deny_all_outbound", &network.NetworkSecurityRuleArgs{
// Name: pulumi.String("deny_all_outbound"),
// Priority: pulumi.Int(4096),
// Direction: pulumi.String("Outbound"),
// Access: pulumi.String("Deny"),
// Protocol: pulumi.String("*"),
// SourcePortRange: pulumi.String("*"),
// DestinationPortRange: pulumi.String("*"),
// SourceAddressPrefix: pulumi.String("*"),
// DestinationAddressPrefix: pulumi.String("*"),
// ResourceGroupName: example.Name,
// NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("vnet-mi"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnet-mi"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("managedinstancedelegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("Microsoft.Sql/managedInstances"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// exampleRouteTable, err := network.NewRouteTable(ctx, "example", &network.RouteTableArgs{
// Name: pulumi.String("routetable-mi"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// DisableBgpRoutePropagation: false,
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnet,
// }))
// if err != nil {
// return err
// }
// exampleSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "example", &network.SubnetRouteTableAssociationArgs{
// SubnetId: exampleSubnet.ID(),
// RouteTableId: exampleRouteTable.ID(),
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("managedsqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("mradministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSubnetNetworkSecurityGroupAssociation,
// exampleSubnetRouteTableAssociation,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedInstanceStartStopSchedule(ctx, "example", &mssql.ManagedInstanceStartStopScheduleArgs{
// ManagedInstanceId: exampleManagedInstance.ID(),
// TimezoneId: pulumi.String("Central European Standard Time"),
// Schedules: mssql.ManagedInstanceStartStopScheduleScheduleArray{
// &mssql.ManagedInstanceStartStopScheduleScheduleArgs{
// StartDay: pulumi.String("Monday"),
// StartTime: pulumi.String("08:00"),
// StopDay: pulumi.String("Monday"),
// StopTime: pulumi.String("11:00"),
// },
// &mssql.ManagedInstanceStartStopScheduleScheduleArgs{
// StartDay: pulumi.String("Tuesday"),
// StartTime: pulumi.String("12:00"),
// StopDay: pulumi.String("Tuesday"),
// StopTime: pulumi.String("18:00"),
// },
// },
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// MS SQL Managed Instance Start Stop Schedule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedInstanceStartStopSchedule:ManagedInstanceStartStopSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Sql/managedInstances/managedInstance1/startStopSchedules/default
// ```
type ManagedInstanceStartStopSchedule struct {
pulumi.CustomResourceState
// Specifies the description of the schedule.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
// Timestamp when the next action will be executed in the corresponding schedule time zone.
NextExecutionTime pulumi.StringOutput `pulumi:"nextExecutionTime"`
// Next action to be executed (Start or Stop).
NextRunAction pulumi.StringOutput `pulumi:"nextRunAction"`
// A `schedule` block as defined below.
Schedules ManagedInstanceStartStopScheduleScheduleArrayOutput `pulumi:"schedules"`
// Specifies the time zone of the schedule. Defaults to `UTC`.
TimezoneId pulumi.StringPtrOutput `pulumi:"timezoneId"`
}
// NewManagedInstanceStartStopSchedule registers a new resource with the given unique name, arguments, and options.
func NewManagedInstanceStartStopSchedule(ctx *pulumi.Context,
name string, args *ManagedInstanceStartStopScheduleArgs, opts ...pulumi.ResourceOption) (*ManagedInstanceStartStopSchedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
if args.Schedules == nil {
return nil, errors.New("invalid value for required argument 'Schedules'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedInstanceStartStopSchedule
err := ctx.RegisterResource("azure:mssql/managedInstanceStartStopSchedule:ManagedInstanceStartStopSchedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedInstanceStartStopSchedule gets an existing ManagedInstanceStartStopSchedule 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 GetManagedInstanceStartStopSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedInstanceStartStopScheduleState, opts ...pulumi.ResourceOption) (*ManagedInstanceStartStopSchedule, error) {
var resource ManagedInstanceStartStopSchedule
err := ctx.ReadResource("azure:mssql/managedInstanceStartStopSchedule:ManagedInstanceStartStopSchedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedInstanceStartStopSchedule resources.
type managedInstanceStartStopScheduleState struct {
// Specifies the description of the schedule.
Description *string `pulumi:"description"`
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
// Timestamp when the next action will be executed in the corresponding schedule time zone.
NextExecutionTime *string `pulumi:"nextExecutionTime"`
// Next action to be executed (Start or Stop).
NextRunAction *string `pulumi:"nextRunAction"`
// A `schedule` block as defined below.
Schedules []ManagedInstanceStartStopScheduleSchedule `pulumi:"schedules"`
// Specifies the time zone of the schedule. Defaults to `UTC`.
TimezoneId *string `pulumi:"timezoneId"`
}
type ManagedInstanceStartStopScheduleState struct {
// Specifies the description of the schedule.
Description pulumi.StringPtrInput
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
ManagedInstanceId pulumi.StringPtrInput
// Timestamp when the next action will be executed in the corresponding schedule time zone.
NextExecutionTime pulumi.StringPtrInput
// Next action to be executed (Start or Stop).
NextRunAction pulumi.StringPtrInput
// A `schedule` block as defined below.
Schedules ManagedInstanceStartStopScheduleScheduleArrayInput
// Specifies the time zone of the schedule. Defaults to `UTC`.
TimezoneId pulumi.StringPtrInput
}
func (ManagedInstanceStartStopScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceStartStopScheduleState)(nil)).Elem()
}
type managedInstanceStartStopScheduleArgs struct {
// Specifies the description of the schedule.
Description *string `pulumi:"description"`
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// A `schedule` block as defined below.
Schedules []ManagedInstanceStartStopScheduleSchedule `pulumi:"schedules"`
// Specifies the time zone of the schedule. Defaults to `UTC`.
TimezoneId *string `pulumi:"timezoneId"`
}
// The set of arguments for constructing a ManagedInstanceStartStopSchedule resource.
type ManagedInstanceStartStopScheduleArgs struct {
// Specifies the description of the schedule.
Description pulumi.StringPtrInput
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
ManagedInstanceId pulumi.StringInput
// A `schedule` block as defined below.
Schedules ManagedInstanceStartStopScheduleScheduleArrayInput
// Specifies the time zone of the schedule. Defaults to `UTC`.
TimezoneId pulumi.StringPtrInput
}
func (ManagedInstanceStartStopScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedInstanceStartStopScheduleArgs)(nil)).Elem()
}
type ManagedInstanceStartStopScheduleInput interface {
pulumi.Input
ToManagedInstanceStartStopScheduleOutput() ManagedInstanceStartStopScheduleOutput
ToManagedInstanceStartStopScheduleOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleOutput
}
func (*ManagedInstanceStartStopSchedule) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (i *ManagedInstanceStartStopSchedule) ToManagedInstanceStartStopScheduleOutput() ManagedInstanceStartStopScheduleOutput {
return i.ToManagedInstanceStartStopScheduleOutputWithContext(context.Background())
}
func (i *ManagedInstanceStartStopSchedule) ToManagedInstanceStartStopScheduleOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceStartStopScheduleOutput)
}
// ManagedInstanceStartStopScheduleArrayInput is an input type that accepts ManagedInstanceStartStopScheduleArray and ManagedInstanceStartStopScheduleArrayOutput values.
// You can construct a concrete instance of `ManagedInstanceStartStopScheduleArrayInput` via:
//
// ManagedInstanceStartStopScheduleArray{ ManagedInstanceStartStopScheduleArgs{...} }
type ManagedInstanceStartStopScheduleArrayInput interface {
pulumi.Input
ToManagedInstanceStartStopScheduleArrayOutput() ManagedInstanceStartStopScheduleArrayOutput
ToManagedInstanceStartStopScheduleArrayOutputWithContext(context.Context) ManagedInstanceStartStopScheduleArrayOutput
}
type ManagedInstanceStartStopScheduleArray []ManagedInstanceStartStopScheduleInput
func (ManagedInstanceStartStopScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (i ManagedInstanceStartStopScheduleArray) ToManagedInstanceStartStopScheduleArrayOutput() ManagedInstanceStartStopScheduleArrayOutput {
return i.ToManagedInstanceStartStopScheduleArrayOutputWithContext(context.Background())
}
func (i ManagedInstanceStartStopScheduleArray) ToManagedInstanceStartStopScheduleArrayOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceStartStopScheduleArrayOutput)
}
// ManagedInstanceStartStopScheduleMapInput is an input type that accepts ManagedInstanceStartStopScheduleMap and ManagedInstanceStartStopScheduleMapOutput values.
// You can construct a concrete instance of `ManagedInstanceStartStopScheduleMapInput` via:
//
// ManagedInstanceStartStopScheduleMap{ "key": ManagedInstanceStartStopScheduleArgs{...} }
type ManagedInstanceStartStopScheduleMapInput interface {
pulumi.Input
ToManagedInstanceStartStopScheduleMapOutput() ManagedInstanceStartStopScheduleMapOutput
ToManagedInstanceStartStopScheduleMapOutputWithContext(context.Context) ManagedInstanceStartStopScheduleMapOutput
}
type ManagedInstanceStartStopScheduleMap map[string]ManagedInstanceStartStopScheduleInput
func (ManagedInstanceStartStopScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (i ManagedInstanceStartStopScheduleMap) ToManagedInstanceStartStopScheduleMapOutput() ManagedInstanceStartStopScheduleMapOutput {
return i.ToManagedInstanceStartStopScheduleMapOutputWithContext(context.Background())
}
func (i ManagedInstanceStartStopScheduleMap) ToManagedInstanceStartStopScheduleMapOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedInstanceStartStopScheduleMapOutput)
}
type ManagedInstanceStartStopScheduleOutput struct{ *pulumi.OutputState }
func (ManagedInstanceStartStopScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (o ManagedInstanceStartStopScheduleOutput) ToManagedInstanceStartStopScheduleOutput() ManagedInstanceStartStopScheduleOutput {
return o
}
func (o ManagedInstanceStartStopScheduleOutput) ToManagedInstanceStartStopScheduleOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleOutput {
return o
}
// Specifies the description of the schedule.
func (o ManagedInstanceStartStopScheduleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the ID of the Managed Instance. Changing this forces a new Sql Start Stop Managed Instance Schedule to be created.
func (o ManagedInstanceStartStopScheduleOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// Timestamp when the next action will be executed in the corresponding schedule time zone.
func (o ManagedInstanceStartStopScheduleOutput) NextExecutionTime() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) pulumi.StringOutput { return v.NextExecutionTime }).(pulumi.StringOutput)
}
// Next action to be executed (Start or Stop).
func (o ManagedInstanceStartStopScheduleOutput) NextRunAction() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) pulumi.StringOutput { return v.NextRunAction }).(pulumi.StringOutput)
}
// A `schedule` block as defined below.
func (o ManagedInstanceStartStopScheduleOutput) Schedules() ManagedInstanceStartStopScheduleScheduleArrayOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) ManagedInstanceStartStopScheduleScheduleArrayOutput {
return v.Schedules
}).(ManagedInstanceStartStopScheduleScheduleArrayOutput)
}
// Specifies the time zone of the schedule. Defaults to `UTC`.
func (o ManagedInstanceStartStopScheduleOutput) TimezoneId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ManagedInstanceStartStopSchedule) pulumi.StringPtrOutput { return v.TimezoneId }).(pulumi.StringPtrOutput)
}
type ManagedInstanceStartStopScheduleArrayOutput struct{ *pulumi.OutputState }
func (ManagedInstanceStartStopScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (o ManagedInstanceStartStopScheduleArrayOutput) ToManagedInstanceStartStopScheduleArrayOutput() ManagedInstanceStartStopScheduleArrayOutput {
return o
}
func (o ManagedInstanceStartStopScheduleArrayOutput) ToManagedInstanceStartStopScheduleArrayOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleArrayOutput {
return o
}
func (o ManagedInstanceStartStopScheduleArrayOutput) Index(i pulumi.IntInput) ManagedInstanceStartStopScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedInstanceStartStopSchedule {
return vs[0].([]*ManagedInstanceStartStopSchedule)[vs[1].(int)]
}).(ManagedInstanceStartStopScheduleOutput)
}
type ManagedInstanceStartStopScheduleMapOutput struct{ *pulumi.OutputState }
func (ManagedInstanceStartStopScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedInstanceStartStopSchedule)(nil)).Elem()
}
func (o ManagedInstanceStartStopScheduleMapOutput) ToManagedInstanceStartStopScheduleMapOutput() ManagedInstanceStartStopScheduleMapOutput {
return o
}
func (o ManagedInstanceStartStopScheduleMapOutput) ToManagedInstanceStartStopScheduleMapOutputWithContext(ctx context.Context) ManagedInstanceStartStopScheduleMapOutput {
return o
}
func (o ManagedInstanceStartStopScheduleMapOutput) MapIndex(k pulumi.StringInput) ManagedInstanceStartStopScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedInstanceStartStopSchedule {
return vs[0].(map[string]*ManagedInstanceStartStopSchedule)[vs[1].(string)]
}).(ManagedInstanceStartStopScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceStartStopScheduleInput)(nil)).Elem(), &ManagedInstanceStartStopSchedule{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceStartStopScheduleArrayInput)(nil)).Elem(), ManagedInstanceStartStopScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedInstanceStartStopScheduleMapInput)(nil)).Elem(), ManagedInstanceStartStopScheduleMap{})
pulumi.RegisterOutputType(ManagedInstanceStartStopScheduleOutput{})
pulumi.RegisterOutputType(ManagedInstanceStartStopScheduleArrayOutput{})
pulumi.RegisterOutputType(ManagedInstanceStartStopScheduleMapOutput{})
}
| 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/mssql/managedDatabase.go | sdk/go/azure/mssql/managedDatabase.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example"),
// 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"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
// Name: pulumi.String("managedsqlinstance"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LicenseType: pulumi.String("BasePrice"),
// SkuName: pulumi.String("GP_Gen5"),
// StorageSizeInGb: pulumi.Int(32),
// SubnetId: exampleSubnet.ID(),
// Vcores: pulumi.Int(4),
// AdministratorLogin: pulumi.String("msadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsDog11"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewManagedDatabase(ctx, "example", &mssql.ManagedDatabaseArgs{
// Name: pulumi.String("example"),
// ManagedInstanceId: exampleManagedInstance.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.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Managed Databases can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/managedDatabase:ManagedDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver/databases/mydatabase
// ```
type ManagedDatabase struct {
pulumi.CustomResourceState
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy ManagedDatabaseLongTermRetentionPolicyOutput `pulumi:"longTermRetentionPolicy"`
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringOutput `pulumi:"managedInstanceId"`
// The name of the Managed Database to create. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
PointInTimeRestore ManagedDatabasePointInTimeRestorePtrOutput `pulumi:"pointInTimeRestore"`
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays pulumi.IntPtrOutput `pulumi:"shortTermRetentionDays"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewManagedDatabase registers a new resource with the given unique name, arguments, and options.
func NewManagedDatabase(ctx *pulumi.Context,
name string, args *ManagedDatabaseArgs, opts ...pulumi.ResourceOption) (*ManagedDatabase, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagedInstanceId == nil {
return nil, errors.New("invalid value for required argument 'ManagedInstanceId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/managedDatabase:ManagedDatabase"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ManagedDatabase
err := ctx.RegisterResource("azure:mssql/managedDatabase:ManagedDatabase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedDatabase gets an existing ManagedDatabase 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 GetManagedDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedDatabaseState, opts ...pulumi.ResourceOption) (*ManagedDatabase, error) {
var resource ManagedDatabase
err := ctx.ReadResource("azure:mssql/managedDatabase:ManagedDatabase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedDatabase resources.
type managedDatabaseState struct {
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy *ManagedDatabaseLongTermRetentionPolicy `pulumi:"longTermRetentionPolicy"`
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
ManagedInstanceId *string `pulumi:"managedInstanceId"`
// The name of the Managed Database to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
PointInTimeRestore *ManagedDatabasePointInTimeRestore `pulumi:"pointInTimeRestore"`
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays *int `pulumi:"shortTermRetentionDays"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ManagedDatabaseState struct {
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy ManagedDatabaseLongTermRetentionPolicyPtrInput
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringPtrInput
// The name of the Managed Database to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
PointInTimeRestore ManagedDatabasePointInTimeRestorePtrInput
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays pulumi.IntPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ManagedDatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*managedDatabaseState)(nil)).Elem()
}
type managedDatabaseArgs struct {
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy *ManagedDatabaseLongTermRetentionPolicy `pulumi:"longTermRetentionPolicy"`
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
ManagedInstanceId string `pulumi:"managedInstanceId"`
// The name of the Managed Database to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
PointInTimeRestore *ManagedDatabasePointInTimeRestore `pulumi:"pointInTimeRestore"`
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays *int `pulumi:"shortTermRetentionDays"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ManagedDatabase resource.
type ManagedDatabaseArgs struct {
// A `longTermRetentionPolicy` block as defined below.
LongTermRetentionPolicy ManagedDatabaseLongTermRetentionPolicyPtrInput
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
ManagedInstanceId pulumi.StringInput
// The name of the Managed Database to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
PointInTimeRestore ManagedDatabasePointInTimeRestorePtrInput
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
ShortTermRetentionDays pulumi.IntPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ManagedDatabaseArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedDatabaseArgs)(nil)).Elem()
}
type ManagedDatabaseInput interface {
pulumi.Input
ToManagedDatabaseOutput() ManagedDatabaseOutput
ToManagedDatabaseOutputWithContext(ctx context.Context) ManagedDatabaseOutput
}
func (*ManagedDatabase) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedDatabase)(nil)).Elem()
}
func (i *ManagedDatabase) ToManagedDatabaseOutput() ManagedDatabaseOutput {
return i.ToManagedDatabaseOutputWithContext(context.Background())
}
func (i *ManagedDatabase) ToManagedDatabaseOutputWithContext(ctx context.Context) ManagedDatabaseOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedDatabaseOutput)
}
// ManagedDatabaseArrayInput is an input type that accepts ManagedDatabaseArray and ManagedDatabaseArrayOutput values.
// You can construct a concrete instance of `ManagedDatabaseArrayInput` via:
//
// ManagedDatabaseArray{ ManagedDatabaseArgs{...} }
type ManagedDatabaseArrayInput interface {
pulumi.Input
ToManagedDatabaseArrayOutput() ManagedDatabaseArrayOutput
ToManagedDatabaseArrayOutputWithContext(context.Context) ManagedDatabaseArrayOutput
}
type ManagedDatabaseArray []ManagedDatabaseInput
func (ManagedDatabaseArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedDatabase)(nil)).Elem()
}
func (i ManagedDatabaseArray) ToManagedDatabaseArrayOutput() ManagedDatabaseArrayOutput {
return i.ToManagedDatabaseArrayOutputWithContext(context.Background())
}
func (i ManagedDatabaseArray) ToManagedDatabaseArrayOutputWithContext(ctx context.Context) ManagedDatabaseArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedDatabaseArrayOutput)
}
// ManagedDatabaseMapInput is an input type that accepts ManagedDatabaseMap and ManagedDatabaseMapOutput values.
// You can construct a concrete instance of `ManagedDatabaseMapInput` via:
//
// ManagedDatabaseMap{ "key": ManagedDatabaseArgs{...} }
type ManagedDatabaseMapInput interface {
pulumi.Input
ToManagedDatabaseMapOutput() ManagedDatabaseMapOutput
ToManagedDatabaseMapOutputWithContext(context.Context) ManagedDatabaseMapOutput
}
type ManagedDatabaseMap map[string]ManagedDatabaseInput
func (ManagedDatabaseMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedDatabase)(nil)).Elem()
}
func (i ManagedDatabaseMap) ToManagedDatabaseMapOutput() ManagedDatabaseMapOutput {
return i.ToManagedDatabaseMapOutputWithContext(context.Background())
}
func (i ManagedDatabaseMap) ToManagedDatabaseMapOutputWithContext(ctx context.Context) ManagedDatabaseMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedDatabaseMapOutput)
}
type ManagedDatabaseOutput struct{ *pulumi.OutputState }
func (ManagedDatabaseOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedDatabase)(nil)).Elem()
}
func (o ManagedDatabaseOutput) ToManagedDatabaseOutput() ManagedDatabaseOutput {
return o
}
func (o ManagedDatabaseOutput) ToManagedDatabaseOutputWithContext(ctx context.Context) ManagedDatabaseOutput {
return o
}
// A `longTermRetentionPolicy` block as defined below.
func (o ManagedDatabaseOutput) LongTermRetentionPolicy() ManagedDatabaseLongTermRetentionPolicyOutput {
return o.ApplyT(func(v *ManagedDatabase) ManagedDatabaseLongTermRetentionPolicyOutput {
return v.LongTermRetentionPolicy
}).(ManagedDatabaseLongTermRetentionPolicyOutput)
}
// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
func (o ManagedDatabaseOutput) ManagedInstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedDatabase) pulumi.StringOutput { return v.ManagedInstanceId }).(pulumi.StringOutput)
}
// The name of the Managed Database to create. Changing this forces a new resource to be created.
func (o ManagedDatabaseOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ManagedDatabase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `pointInTimeRestore` block as defined below. Changing this forces a new resource to be created.
func (o ManagedDatabaseOutput) PointInTimeRestore() ManagedDatabasePointInTimeRestorePtrOutput {
return o.ApplyT(func(v *ManagedDatabase) ManagedDatabasePointInTimeRestorePtrOutput { return v.PointInTimeRestore }).(ManagedDatabasePointInTimeRestorePtrOutput)
}
// The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
func (o ManagedDatabaseOutput) ShortTermRetentionDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ManagedDatabase) pulumi.IntPtrOutput { return v.ShortTermRetentionDays }).(pulumi.IntPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o ManagedDatabaseOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ManagedDatabase) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ManagedDatabaseArrayOutput struct{ *pulumi.OutputState }
func (ManagedDatabaseArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedDatabase)(nil)).Elem()
}
func (o ManagedDatabaseArrayOutput) ToManagedDatabaseArrayOutput() ManagedDatabaseArrayOutput {
return o
}
func (o ManagedDatabaseArrayOutput) ToManagedDatabaseArrayOutputWithContext(ctx context.Context) ManagedDatabaseArrayOutput {
return o
}
func (o ManagedDatabaseArrayOutput) Index(i pulumi.IntInput) ManagedDatabaseOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagedDatabase {
return vs[0].([]*ManagedDatabase)[vs[1].(int)]
}).(ManagedDatabaseOutput)
}
type ManagedDatabaseMapOutput struct{ *pulumi.OutputState }
func (ManagedDatabaseMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedDatabase)(nil)).Elem()
}
func (o ManagedDatabaseMapOutput) ToManagedDatabaseMapOutput() ManagedDatabaseMapOutput {
return o
}
func (o ManagedDatabaseMapOutput) ToManagedDatabaseMapOutputWithContext(ctx context.Context) ManagedDatabaseMapOutput {
return o
}
func (o ManagedDatabaseMapOutput) MapIndex(k pulumi.StringInput) ManagedDatabaseOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagedDatabase {
return vs[0].(map[string]*ManagedDatabase)[vs[1].(string)]
}).(ManagedDatabaseOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagedDatabaseInput)(nil)).Elem(), &ManagedDatabase{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedDatabaseArrayInput)(nil)).Elem(), ManagedDatabaseArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagedDatabaseMapInput)(nil)).Elem(), ManagedDatabaseMap{})
pulumi.RegisterOutputType(ManagedDatabaseOutput{})
pulumi.RegisterOutputType(ManagedDatabaseArrayOutput{})
pulumi.RegisterOutputType(ManagedDatabaseMapOutput{})
}
| 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/mssql/serverTransparentDataEncryption.go | sdk/go/azure/mssql/serverTransparentDataEncryption.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the transparent data encryption configuration for a MSSQL Server
//
// !> **Note:** This resource can be used to configure Transparent Data Encryption for MS SQL instances with Customer Managed Keys. For MS SQL instances that are System Managed, it should only be used with pre-existing MS SQL Instances that are over 3 years old. For new System Managed MS SQL Instances that will be created through the use of the `mssql.Server` resource, please enable Transparent Data Encryption through `mssql.Server` resource itself by configuring an identity block. By default, all new MS SQL Instances are deployed with System Managed Transparent Data Encryption enabled.
//
// > **Note:** Once transparent data encryption is enabled on a MS SQL instance, it is not possible to remove TDE. You will be able to switch between 'ServiceManaged' and 'CustomerManaged' keys, but will not be able to remove encryption. For safety when this resource is deleted, the TDE mode will automatically be set to 'ServiceManaged'. See `keyVaultUri` for more information on how to specify the key types. As SQL Server only supports a single configuration for encryption settings, this resource will replace the current encryption settings on the server.
//
// > **Note:** See [documentation](https://docs.microsoft.com/azure/azure-sql/database/transparent-data-encryption-byok-overview) for important information on how handle lifecycle management of the keys to prevent data lockout.
//
// ## Example Usage
//
// ### With Service Managed Key
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mssqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsKat11"),
// MinimumTlsVersion: pulumi.String("1.2"),
// AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
// LoginUsername: pulumi.String("AzureAD Admin"),
// ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("production"),
// },
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewServerTransparentDataEncryption(ctx, "example", &mssql.ServerTransparentDataEncryptionArgs{
// ServerId: exampleServer.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Customer Managed Key
//
// ```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/mssql"
// "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("EastUs"),
// })
// if err != nil {
// return err
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mssqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("missadministrator"),
// AdministratorLoginPassword: pulumi.String("thisIsKat11"),
// MinimumTlsVersion: pulumi.String("1.2"),
// AzureadAdministrator: &mssql.ServerAzureadAdministratorArgs{
// LoginUsername: pulumi.String("AzureAD Admin"),
// ObjectId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("production"),
// },
// Identity: &mssql.ServerIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// // Create a key vault with policies for the deployer to create a key & SQL Server to wrap/unwrap/get key
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// EnabledForDiskEncryption: pulumi.Bool(true),
// TenantId: pulumi.String(current.TenantId),
// SoftDeleteRetentionDays: pulumi.Int(7),
// PurgeProtectionEnabled: pulumi.Bool(false),
// SkuName: pulumi.String("standard"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// 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("Update"),
// pulumi.String("Recover"),
// pulumi.String("Purge"),
// pulumi.String("GetRotationPolicy"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleServer.Identity.ApplyT(func(identity mssql.ServerIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("WrapKey"),
// pulumi.String("UnwrapKey"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("byok"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("unwrapKey"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleKeyVault,
// }))
// if err != nil {
// return err
// }
// _, err = mssql.NewServerTransparentDataEncryption(ctx, "example", &mssql.ServerTransparentDataEncryptionArgs{
// ServerId: exampleServer.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Server Transparent Data Encryption can be imported using the resource id, e.g.
//
// ```sh
// $ pulumi import azure:mssql/serverTransparentDataEncryption:ServerTransparentDataEncryption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/encryptionProtector/current
// ```
type ServerTransparentDataEncryption struct {
pulumi.CustomResourceState
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrOutput `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrOutput `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
}
// NewServerTransparentDataEncryption registers a new resource with the given unique name, arguments, and options.
func NewServerTransparentDataEncryption(ctx *pulumi.Context,
name string, args *ServerTransparentDataEncryptionArgs, opts ...pulumi.ResourceOption) (*ServerTransparentDataEncryption, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerTransparentDataEncryption
err := ctx.RegisterResource("azure:mssql/serverTransparentDataEncryption:ServerTransparentDataEncryption", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerTransparentDataEncryption gets an existing ServerTransparentDataEncryption 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 GetServerTransparentDataEncryption(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerTransparentDataEncryptionState, opts ...pulumi.ResourceOption) (*ServerTransparentDataEncryption, error) {
var resource ServerTransparentDataEncryption
err := ctx.ReadResource("azure:mssql/serverTransparentDataEncryption:ServerTransparentDataEncryption", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerTransparentDataEncryption resources.
type serverTransparentDataEncryptionState struct {
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
}
type ServerTransparentDataEncryptionState struct {
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
}
func (ServerTransparentDataEncryptionState) ElementType() reflect.Type {
return reflect.TypeOf((*serverTransparentDataEncryptionState)(nil)).Elem()
}
type serverTransparentDataEncryptionArgs struct {
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled *bool `pulumi:"autoRotationEnabled"`
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
}
// The set of arguments for constructing a ServerTransparentDataEncryption resource.
type ServerTransparentDataEncryptionArgs struct {
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
AutoRotationEnabled pulumi.BoolPtrInput
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
KeyVaultKeyId pulumi.StringPtrInput
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
ManagedHsmKeyId pulumi.StringPtrInput
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
}
func (ServerTransparentDataEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverTransparentDataEncryptionArgs)(nil)).Elem()
}
type ServerTransparentDataEncryptionInput interface {
pulumi.Input
ToServerTransparentDataEncryptionOutput() ServerTransparentDataEncryptionOutput
ToServerTransparentDataEncryptionOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionOutput
}
func (*ServerTransparentDataEncryption) ElementType() reflect.Type {
return reflect.TypeOf((**ServerTransparentDataEncryption)(nil)).Elem()
}
func (i *ServerTransparentDataEncryption) ToServerTransparentDataEncryptionOutput() ServerTransparentDataEncryptionOutput {
return i.ToServerTransparentDataEncryptionOutputWithContext(context.Background())
}
func (i *ServerTransparentDataEncryption) ToServerTransparentDataEncryptionOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerTransparentDataEncryptionOutput)
}
// ServerTransparentDataEncryptionArrayInput is an input type that accepts ServerTransparentDataEncryptionArray and ServerTransparentDataEncryptionArrayOutput values.
// You can construct a concrete instance of `ServerTransparentDataEncryptionArrayInput` via:
//
// ServerTransparentDataEncryptionArray{ ServerTransparentDataEncryptionArgs{...} }
type ServerTransparentDataEncryptionArrayInput interface {
pulumi.Input
ToServerTransparentDataEncryptionArrayOutput() ServerTransparentDataEncryptionArrayOutput
ToServerTransparentDataEncryptionArrayOutputWithContext(context.Context) ServerTransparentDataEncryptionArrayOutput
}
type ServerTransparentDataEncryptionArray []ServerTransparentDataEncryptionInput
func (ServerTransparentDataEncryptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerTransparentDataEncryption)(nil)).Elem()
}
func (i ServerTransparentDataEncryptionArray) ToServerTransparentDataEncryptionArrayOutput() ServerTransparentDataEncryptionArrayOutput {
return i.ToServerTransparentDataEncryptionArrayOutputWithContext(context.Background())
}
func (i ServerTransparentDataEncryptionArray) ToServerTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerTransparentDataEncryptionArrayOutput)
}
// ServerTransparentDataEncryptionMapInput is an input type that accepts ServerTransparentDataEncryptionMap and ServerTransparentDataEncryptionMapOutput values.
// You can construct a concrete instance of `ServerTransparentDataEncryptionMapInput` via:
//
// ServerTransparentDataEncryptionMap{ "key": ServerTransparentDataEncryptionArgs{...} }
type ServerTransparentDataEncryptionMapInput interface {
pulumi.Input
ToServerTransparentDataEncryptionMapOutput() ServerTransparentDataEncryptionMapOutput
ToServerTransparentDataEncryptionMapOutputWithContext(context.Context) ServerTransparentDataEncryptionMapOutput
}
type ServerTransparentDataEncryptionMap map[string]ServerTransparentDataEncryptionInput
func (ServerTransparentDataEncryptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerTransparentDataEncryption)(nil)).Elem()
}
func (i ServerTransparentDataEncryptionMap) ToServerTransparentDataEncryptionMapOutput() ServerTransparentDataEncryptionMapOutput {
return i.ToServerTransparentDataEncryptionMapOutputWithContext(context.Background())
}
func (i ServerTransparentDataEncryptionMap) ToServerTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerTransparentDataEncryptionMapOutput)
}
type ServerTransparentDataEncryptionOutput struct{ *pulumi.OutputState }
func (ServerTransparentDataEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerTransparentDataEncryption)(nil)).Elem()
}
func (o ServerTransparentDataEncryptionOutput) ToServerTransparentDataEncryptionOutput() ServerTransparentDataEncryptionOutput {
return o
}
func (o ServerTransparentDataEncryptionOutput) ToServerTransparentDataEncryptionOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionOutput {
return o
}
// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes.
func (o ServerTransparentDataEncryptionOutput) AutoRotationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServerTransparentDataEncryption) pulumi.BoolPtrOutput { return v.AutoRotationEnabled }).(pulumi.BoolPtrOutput)
}
// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field.
func (o ServerTransparentDataEncryptionOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerTransparentDataEncryption) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// To use customer managed keys from a managed HSM, provide the Managed HSM Key ID. To use service managed keys, omit this field.
//
// > **Note:** In order to use customer managed keys, the identity of the MSSQL server must have the following permissions on the key vault: 'get', 'wrapKey' and 'unwrapKey'
//
// > **Note:** If `serverId` denotes a secondary server deployed for disaster recovery purposes, then the `keyVaultKeyId` should be the same key used for the primary server's transparent data encryption. Both primary and secondary servers should be encrypted with same key material.
func (o ServerTransparentDataEncryptionOutput) ManagedHsmKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServerTransparentDataEncryption) pulumi.StringPtrOutput { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
func (o ServerTransparentDataEncryptionOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerTransparentDataEncryption) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
type ServerTransparentDataEncryptionArrayOutput struct{ *pulumi.OutputState }
func (ServerTransparentDataEncryptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerTransparentDataEncryption)(nil)).Elem()
}
func (o ServerTransparentDataEncryptionArrayOutput) ToServerTransparentDataEncryptionArrayOutput() ServerTransparentDataEncryptionArrayOutput {
return o
}
func (o ServerTransparentDataEncryptionArrayOutput) ToServerTransparentDataEncryptionArrayOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionArrayOutput {
return o
}
func (o ServerTransparentDataEncryptionArrayOutput) Index(i pulumi.IntInput) ServerTransparentDataEncryptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerTransparentDataEncryption {
return vs[0].([]*ServerTransparentDataEncryption)[vs[1].(int)]
}).(ServerTransparentDataEncryptionOutput)
}
type ServerTransparentDataEncryptionMapOutput struct{ *pulumi.OutputState }
func (ServerTransparentDataEncryptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerTransparentDataEncryption)(nil)).Elem()
}
func (o ServerTransparentDataEncryptionMapOutput) ToServerTransparentDataEncryptionMapOutput() ServerTransparentDataEncryptionMapOutput {
return o
}
func (o ServerTransparentDataEncryptionMapOutput) ToServerTransparentDataEncryptionMapOutputWithContext(ctx context.Context) ServerTransparentDataEncryptionMapOutput {
return o
}
func (o ServerTransparentDataEncryptionMapOutput) MapIndex(k pulumi.StringInput) ServerTransparentDataEncryptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerTransparentDataEncryption {
return vs[0].(map[string]*ServerTransparentDataEncryption)[vs[1].(string)]
}).(ServerTransparentDataEncryptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerTransparentDataEncryptionInput)(nil)).Elem(), &ServerTransparentDataEncryption{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerTransparentDataEncryptionArrayInput)(nil)).Elem(), ServerTransparentDataEncryptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerTransparentDataEncryptionMapInput)(nil)).Elem(), ServerTransparentDataEncryptionMap{})
pulumi.RegisterOutputType(ServerTransparentDataEncryptionOutput{})
pulumi.RegisterOutputType(ServerTransparentDataEncryptionArrayOutput{})
pulumi.RegisterOutputType(ServerTransparentDataEncryptionMapOutput{})
}
| 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/mssql/firewallRule.go | sdk/go/azure/mssql/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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows you to manage an Azure SQL Firewall Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
// "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
// }
// exampleServer, err := mssql.NewServer(ctx, "example", &mssql.ServerArgs{
// Name: pulumi.String("mysqlserver"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Version: pulumi.String("12.0"),
// AdministratorLogin: pulumi.String("4dm1n157r470r"),
// AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
// })
// if err != nil {
// return err
// }
// _, err = mssql.NewFirewallRule(ctx, "example", &mssql.FirewallRuleArgs{
// Name: pulumi.String("FirewallRule1"),
// ServerId: exampleServer.ID(),
// StartIpAddress: pulumi.String("10.0.17.62"),
// EndIpAddress: pulumi.String("10.0.17.62"),
// })
// 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.Sql` - 2023-08-01-preview
//
// ## Import
//
// SQL Firewall Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/firewallRules/rule1
// ```
type FirewallRule struct {
pulumi.CustomResourceState
// The ending IP address to allow through the firewall for this 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"`
// The name of the firewall rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringOutput `pulumi:"serverId"`
// The starting IP address to allow through the firewall for this rule.
StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"`
}
// 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.EndIpAddress == nil {
return nil, errors.New("invalid value for required argument 'EndIpAddress'")
}
if args.ServerId == nil {
return nil, errors.New("invalid value for required argument 'ServerId'")
}
if args.StartIpAddress == nil {
return nil, errors.New("invalid value for required argument 'StartIpAddress'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:sql/firewallRule:FirewallRule"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource FirewallRule
err := ctx.RegisterResource("azure:mssql/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:mssql/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 ending IP address to allow through the firewall for this 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"`
// The name of the firewall rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
ServerId *string `pulumi:"serverId"`
// The starting IP address to allow through the firewall for this rule.
StartIpAddress *string `pulumi:"startIpAddress"`
}
type FirewallRuleState struct {
// The ending IP address to allow through the firewall for this 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
// The name of the firewall rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringPtrInput
// The starting IP address to allow through the firewall for this rule.
StartIpAddress pulumi.StringPtrInput
}
func (FirewallRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*firewallRuleState)(nil)).Elem()
}
type firewallRuleArgs struct {
// The ending IP address to allow through the firewall for this 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"`
// The name of the firewall rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
ServerId string `pulumi:"serverId"`
// The starting IP address to allow through the firewall for this rule.
StartIpAddress string `pulumi:"startIpAddress"`
}
// The set of arguments for constructing a FirewallRule resource.
type FirewallRuleArgs struct {
// The ending IP address to allow through the firewall for this 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
// The name of the firewall rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
ServerId pulumi.StringInput
// The starting IP address to allow through the firewall for this rule.
StartIpAddress 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 ending IP address to allow through the firewall for this 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 FirewallRuleOutput) EndIpAddress() pulumi.StringOutput {
return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(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 resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created.
func (o FirewallRuleOutput) ServerId() pulumi.StringOutput {
return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput)
}
// The starting IP address to allow through the firewall for this rule.
func (o FirewallRuleOutput) StartIpAddress() pulumi.StringOutput {
return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(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/mssql/virtualMachineAvailabilityGroupListener.go | sdk/go/azure/mssql/virtualMachineAvailabilityGroupListener.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 mssql
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Microsoft SQL Virtual Machine Availability Group Listener.
//
// ## Example Usage
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.SqlVirtualMachine` - 2023-10-01
//
// ## Import
//
// Microsoft SQL Virtual Machine Availability Group Listeners can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:mssql/virtualMachineAvailabilityGroupListener:VirtualMachineAvailabilityGroupListener example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/vmgroup1/availabilityGroupListeners/listener1
// ```
type VirtualMachineAvailabilityGroupListener struct {
pulumi.CustomResourceState
// The name of the Availability Group. Changing this forces a new resource to be created.
AvailabilityGroupName pulumi.StringPtrOutput `pulumi:"availabilityGroupName"`
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
LoadBalancerConfiguration VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrOutput `pulumi:"loadBalancerConfiguration"`
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
MultiSubnetIpConfigurations VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayOutput `pulumi:"multiSubnetIpConfigurations"`
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The port of the listener. Changing this forces a new resource to be created.
Port pulumi.IntPtrOutput `pulumi:"port"`
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
Replicas VirtualMachineAvailabilityGroupListenerReplicaArrayOutput `pulumi:"replicas"`
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
SqlVirtualMachineGroupId pulumi.StringOutput `pulumi:"sqlVirtualMachineGroupId"`
}
// NewVirtualMachineAvailabilityGroupListener registers a new resource with the given unique name, arguments, and options.
func NewVirtualMachineAvailabilityGroupListener(ctx *pulumi.Context,
name string, args *VirtualMachineAvailabilityGroupListenerArgs, opts ...pulumi.ResourceOption) (*VirtualMachineAvailabilityGroupListener, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Replicas == nil {
return nil, errors.New("invalid value for required argument 'Replicas'")
}
if args.SqlVirtualMachineGroupId == nil {
return nil, errors.New("invalid value for required argument 'SqlVirtualMachineGroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualMachineAvailabilityGroupListener
err := ctx.RegisterResource("azure:mssql/virtualMachineAvailabilityGroupListener:VirtualMachineAvailabilityGroupListener", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualMachineAvailabilityGroupListener gets an existing VirtualMachineAvailabilityGroupListener 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 GetVirtualMachineAvailabilityGroupListener(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualMachineAvailabilityGroupListenerState, opts ...pulumi.ResourceOption) (*VirtualMachineAvailabilityGroupListener, error) {
var resource VirtualMachineAvailabilityGroupListener
err := ctx.ReadResource("azure:mssql/virtualMachineAvailabilityGroupListener:VirtualMachineAvailabilityGroupListener", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualMachineAvailabilityGroupListener resources.
type virtualMachineAvailabilityGroupListenerState struct {
// The name of the Availability Group. Changing this forces a new resource to be created.
AvailabilityGroupName *string `pulumi:"availabilityGroupName"`
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
LoadBalancerConfiguration *VirtualMachineAvailabilityGroupListenerLoadBalancerConfiguration `pulumi:"loadBalancerConfiguration"`
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
MultiSubnetIpConfigurations []VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfiguration `pulumi:"multiSubnetIpConfigurations"`
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The port of the listener. Changing this forces a new resource to be created.
Port *int `pulumi:"port"`
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
Replicas []VirtualMachineAvailabilityGroupListenerReplica `pulumi:"replicas"`
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
SqlVirtualMachineGroupId *string `pulumi:"sqlVirtualMachineGroupId"`
}
type VirtualMachineAvailabilityGroupListenerState struct {
// The name of the Availability Group. Changing this forces a new resource to be created.
AvailabilityGroupName pulumi.StringPtrInput
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
LoadBalancerConfiguration VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrInput
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
MultiSubnetIpConfigurations VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayInput
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The port of the listener. Changing this forces a new resource to be created.
Port pulumi.IntPtrInput
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
Replicas VirtualMachineAvailabilityGroupListenerReplicaArrayInput
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
SqlVirtualMachineGroupId pulumi.StringPtrInput
}
func (VirtualMachineAvailabilityGroupListenerState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineAvailabilityGroupListenerState)(nil)).Elem()
}
type virtualMachineAvailabilityGroupListenerArgs struct {
// The name of the Availability Group. Changing this forces a new resource to be created.
AvailabilityGroupName *string `pulumi:"availabilityGroupName"`
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
LoadBalancerConfiguration *VirtualMachineAvailabilityGroupListenerLoadBalancerConfiguration `pulumi:"loadBalancerConfiguration"`
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
MultiSubnetIpConfigurations []VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfiguration `pulumi:"multiSubnetIpConfigurations"`
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The port of the listener. Changing this forces a new resource to be created.
Port *int `pulumi:"port"`
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
Replicas []VirtualMachineAvailabilityGroupListenerReplica `pulumi:"replicas"`
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
SqlVirtualMachineGroupId string `pulumi:"sqlVirtualMachineGroupId"`
}
// The set of arguments for constructing a VirtualMachineAvailabilityGroupListener resource.
type VirtualMachineAvailabilityGroupListenerArgs struct {
// The name of the Availability Group. Changing this forces a new resource to be created.
AvailabilityGroupName pulumi.StringPtrInput
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
LoadBalancerConfiguration VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrInput
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
MultiSubnetIpConfigurations VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayInput
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The port of the listener. Changing this forces a new resource to be created.
Port pulumi.IntPtrInput
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
Replicas VirtualMachineAvailabilityGroupListenerReplicaArrayInput
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
SqlVirtualMachineGroupId pulumi.StringInput
}
func (VirtualMachineAvailabilityGroupListenerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualMachineAvailabilityGroupListenerArgs)(nil)).Elem()
}
type VirtualMachineAvailabilityGroupListenerInput interface {
pulumi.Input
ToVirtualMachineAvailabilityGroupListenerOutput() VirtualMachineAvailabilityGroupListenerOutput
ToVirtualMachineAvailabilityGroupListenerOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerOutput
}
func (*VirtualMachineAvailabilityGroupListener) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (i *VirtualMachineAvailabilityGroupListener) ToVirtualMachineAvailabilityGroupListenerOutput() VirtualMachineAvailabilityGroupListenerOutput {
return i.ToVirtualMachineAvailabilityGroupListenerOutputWithContext(context.Background())
}
func (i *VirtualMachineAvailabilityGroupListener) ToVirtualMachineAvailabilityGroupListenerOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineAvailabilityGroupListenerOutput)
}
// VirtualMachineAvailabilityGroupListenerArrayInput is an input type that accepts VirtualMachineAvailabilityGroupListenerArray and VirtualMachineAvailabilityGroupListenerArrayOutput values.
// You can construct a concrete instance of `VirtualMachineAvailabilityGroupListenerArrayInput` via:
//
// VirtualMachineAvailabilityGroupListenerArray{ VirtualMachineAvailabilityGroupListenerArgs{...} }
type VirtualMachineAvailabilityGroupListenerArrayInput interface {
pulumi.Input
ToVirtualMachineAvailabilityGroupListenerArrayOutput() VirtualMachineAvailabilityGroupListenerArrayOutput
ToVirtualMachineAvailabilityGroupListenerArrayOutputWithContext(context.Context) VirtualMachineAvailabilityGroupListenerArrayOutput
}
type VirtualMachineAvailabilityGroupListenerArray []VirtualMachineAvailabilityGroupListenerInput
func (VirtualMachineAvailabilityGroupListenerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (i VirtualMachineAvailabilityGroupListenerArray) ToVirtualMachineAvailabilityGroupListenerArrayOutput() VirtualMachineAvailabilityGroupListenerArrayOutput {
return i.ToVirtualMachineAvailabilityGroupListenerArrayOutputWithContext(context.Background())
}
func (i VirtualMachineAvailabilityGroupListenerArray) ToVirtualMachineAvailabilityGroupListenerArrayOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineAvailabilityGroupListenerArrayOutput)
}
// VirtualMachineAvailabilityGroupListenerMapInput is an input type that accepts VirtualMachineAvailabilityGroupListenerMap and VirtualMachineAvailabilityGroupListenerMapOutput values.
// You can construct a concrete instance of `VirtualMachineAvailabilityGroupListenerMapInput` via:
//
// VirtualMachineAvailabilityGroupListenerMap{ "key": VirtualMachineAvailabilityGroupListenerArgs{...} }
type VirtualMachineAvailabilityGroupListenerMapInput interface {
pulumi.Input
ToVirtualMachineAvailabilityGroupListenerMapOutput() VirtualMachineAvailabilityGroupListenerMapOutput
ToVirtualMachineAvailabilityGroupListenerMapOutputWithContext(context.Context) VirtualMachineAvailabilityGroupListenerMapOutput
}
type VirtualMachineAvailabilityGroupListenerMap map[string]VirtualMachineAvailabilityGroupListenerInput
func (VirtualMachineAvailabilityGroupListenerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (i VirtualMachineAvailabilityGroupListenerMap) ToVirtualMachineAvailabilityGroupListenerMapOutput() VirtualMachineAvailabilityGroupListenerMapOutput {
return i.ToVirtualMachineAvailabilityGroupListenerMapOutputWithContext(context.Background())
}
func (i VirtualMachineAvailabilityGroupListenerMap) ToVirtualMachineAvailabilityGroupListenerMapOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineAvailabilityGroupListenerMapOutput)
}
type VirtualMachineAvailabilityGroupListenerOutput struct{ *pulumi.OutputState }
func (VirtualMachineAvailabilityGroupListenerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (o VirtualMachineAvailabilityGroupListenerOutput) ToVirtualMachineAvailabilityGroupListenerOutput() VirtualMachineAvailabilityGroupListenerOutput {
return o
}
func (o VirtualMachineAvailabilityGroupListenerOutput) ToVirtualMachineAvailabilityGroupListenerOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerOutput {
return o
}
// The name of the Availability Group. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) AvailabilityGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) pulumi.StringPtrOutput {
return v.AvailabilityGroupName
}).(pulumi.StringPtrOutput)
}
// A `loadBalancerConfiguration` block as defined below. Changing this forces a new resource to be created.
//
// > **Note:** Either one of `loadBalancerConfiguration` or `multiSubnetIpConfiguration` must be specified.
func (o VirtualMachineAvailabilityGroupListenerOutput) LoadBalancerConfiguration() VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrOutput {
return v.LoadBalancerConfiguration
}).(VirtualMachineAvailabilityGroupListenerLoadBalancerConfigurationPtrOutput)
}
// One or more `multiSubnetIpConfiguration` blocks as defined below. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) MultiSubnetIpConfigurations() VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayOutput {
return v.MultiSubnetIpConfigurations
}).(VirtualMachineAvailabilityGroupListenerMultiSubnetIpConfigurationArrayOutput)
}
// The name which should be used for the Microsoft SQL Virtual Machine Availability Group Listener. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The port of the listener. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput)
}
// One or more `replica` blocks as defined below. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) Replicas() VirtualMachineAvailabilityGroupListenerReplicaArrayOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) VirtualMachineAvailabilityGroupListenerReplicaArrayOutput {
return v.Replicas
}).(VirtualMachineAvailabilityGroupListenerReplicaArrayOutput)
}
// The ID of the SQL Virtual Machine Group to create the listener. Changing this forces a new resource to be created.
func (o VirtualMachineAvailabilityGroupListenerOutput) SqlVirtualMachineGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualMachineAvailabilityGroupListener) pulumi.StringOutput {
return v.SqlVirtualMachineGroupId
}).(pulumi.StringOutput)
}
type VirtualMachineAvailabilityGroupListenerArrayOutput struct{ *pulumi.OutputState }
func (VirtualMachineAvailabilityGroupListenerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (o VirtualMachineAvailabilityGroupListenerArrayOutput) ToVirtualMachineAvailabilityGroupListenerArrayOutput() VirtualMachineAvailabilityGroupListenerArrayOutput {
return o
}
func (o VirtualMachineAvailabilityGroupListenerArrayOutput) ToVirtualMachineAvailabilityGroupListenerArrayOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerArrayOutput {
return o
}
func (o VirtualMachineAvailabilityGroupListenerArrayOutput) Index(i pulumi.IntInput) VirtualMachineAvailabilityGroupListenerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineAvailabilityGroupListener {
return vs[0].([]*VirtualMachineAvailabilityGroupListener)[vs[1].(int)]
}).(VirtualMachineAvailabilityGroupListenerOutput)
}
type VirtualMachineAvailabilityGroupListenerMapOutput struct{ *pulumi.OutputState }
func (VirtualMachineAvailabilityGroupListenerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualMachineAvailabilityGroupListener)(nil)).Elem()
}
func (o VirtualMachineAvailabilityGroupListenerMapOutput) ToVirtualMachineAvailabilityGroupListenerMapOutput() VirtualMachineAvailabilityGroupListenerMapOutput {
return o
}
func (o VirtualMachineAvailabilityGroupListenerMapOutput) ToVirtualMachineAvailabilityGroupListenerMapOutputWithContext(ctx context.Context) VirtualMachineAvailabilityGroupListenerMapOutput {
return o
}
func (o VirtualMachineAvailabilityGroupListenerMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineAvailabilityGroupListenerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineAvailabilityGroupListener {
return vs[0].(map[string]*VirtualMachineAvailabilityGroupListener)[vs[1].(string)]
}).(VirtualMachineAvailabilityGroupListenerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineAvailabilityGroupListenerInput)(nil)).Elem(), &VirtualMachineAvailabilityGroupListener{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineAvailabilityGroupListenerArrayInput)(nil)).Elem(), VirtualMachineAvailabilityGroupListenerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineAvailabilityGroupListenerMapInput)(nil)).Elem(), VirtualMachineAvailabilityGroupListenerMap{})
pulumi.RegisterOutputType(VirtualMachineAvailabilityGroupListenerOutput{})
pulumi.RegisterOutputType(VirtualMachineAvailabilityGroupListenerArrayOutput{})
pulumi.RegisterOutputType(VirtualMachineAvailabilityGroupListenerMapOutput{})
}
| 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/eventgrid/domain.go | sdk/go/azure/eventgrid/domain.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 eventgrid
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventGrid Domain
//
// ## 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/eventgrid"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = eventgrid.NewDomain(ctx, "example", &eventgrid.DomainArgs{
// Name: pulumi.String("my-eventgrid-domain"),
// 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.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Domains can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/domain:Domain domain1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/domains/domain1
// ```
type Domain struct {
pulumi.CustomResourceState
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrOutput `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrOutput `pulumi:"autoDeleteTopicWithLastSubscription"`
// The Endpoint associated with the EventGrid Domain.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity DomainIdentityPtrOutput `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrOutput `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrOutput `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrOutput `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewDomain registers a new resource with the given unique name, arguments, and options.
func NewDomain(ctx *pulumi.Context,
name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, 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'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/domain:Domain"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Domain
err := ctx.RegisterResource("azure:eventgrid/domain:Domain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDomain gets an existing Domain 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 GetDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) {
var resource Domain
err := ctx.ReadResource("azure:eventgrid/domain:Domain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Domain resources.
type domainState struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription *bool `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription *bool `pulumi:"autoDeleteTopicWithLastSubscription"`
// The Endpoint associated with the EventGrid Domain.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *DomainIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []DomainInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *DomainInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *DomainInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type DomainState struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrInput
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrInput
// The Endpoint associated with the EventGrid Domain.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity DomainIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (DomainState) ElementType() reflect.Type {
return reflect.TypeOf((*domainState)(nil)).Elem()
}
type domainArgs struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription *bool `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription *bool `pulumi:"autoDeleteTopicWithLastSubscription"`
// An `identity` block as defined below.
Identity *DomainIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []DomainInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *DomainInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *DomainInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. 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 Domain resource.
type DomainArgs struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrInput
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity DomainIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Domain exists. 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 (DomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*domainArgs)(nil)).Elem()
}
type DomainInput interface {
pulumi.Input
ToDomainOutput() DomainOutput
ToDomainOutputWithContext(ctx context.Context) DomainOutput
}
func (*Domain) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (i *Domain) ToDomainOutput() DomainOutput {
return i.ToDomainOutputWithContext(context.Background())
}
func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainOutput)
}
// DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values.
// You can construct a concrete instance of `DomainArrayInput` via:
//
// DomainArray{ DomainArgs{...} }
type DomainArrayInput interface {
pulumi.Input
ToDomainArrayOutput() DomainArrayOutput
ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput
}
type DomainArray []DomainInput
func (DomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput {
return i.ToDomainArrayOutputWithContext(context.Background())
}
func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput)
}
// DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values.
// You can construct a concrete instance of `DomainMapInput` via:
//
// DomainMap{ "key": DomainArgs{...} }
type DomainMapInput interface {
pulumi.Input
ToDomainMapOutput() DomainMapOutput
ToDomainMapOutputWithContext(context.Context) DomainMapOutput
}
type DomainMap map[string]DomainInput
func (DomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (i DomainMap) ToDomainMapOutput() DomainMapOutput {
return i.ToDomainMapOutputWithContext(context.Background())
}
func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput)
}
type DomainOutput struct{ *pulumi.OutputState }
func (DomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (o DomainOutput) ToDomainOutput() DomainOutput {
return o
}
func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return o
}
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
func (o DomainOutput) AutoCreateTopicWithFirstSubscription() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.AutoCreateTopicWithFirstSubscription }).(pulumi.BoolPtrOutput)
}
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
func (o DomainOutput) AutoDeleteTopicWithLastSubscription() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.AutoDeleteTopicWithLastSubscription }).(pulumi.BoolPtrOutput)
}
// The Endpoint associated with the EventGrid Domain.
func (o DomainOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o DomainOutput) Identity() DomainIdentityPtrOutput {
return o.ApplyT(func(v *Domain) DomainIdentityPtrOutput { return v.Identity }).(DomainIdentityPtrOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o DomainOutput) InboundIpRules() DomainInboundIpRuleArrayOutput {
return o.ApplyT(func(v *Domain) DomainInboundIpRuleArrayOutput { return v.InboundIpRules }).(DomainInboundIpRuleArrayOutput)
}
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
func (o DomainOutput) InputMappingDefaultValues() DomainInputMappingDefaultValuesPtrOutput {
return o.ApplyT(func(v *Domain) DomainInputMappingDefaultValuesPtrOutput { return v.InputMappingDefaultValues }).(DomainInputMappingDefaultValuesPtrOutput)
}
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
func (o DomainOutput) InputMappingFields() DomainInputMappingFieldsPtrOutput {
return o.ApplyT(func(v *Domain) DomainInputMappingFieldsPtrOutput { return v.InputMappingFields }).(DomainInputMappingFieldsPtrOutput)
}
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
func (o DomainOutput) InputSchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.InputSchema }).(pulumi.StringPtrOutput)
}
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
func (o DomainOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o DomainOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
func (o DomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Shared Access Key associated with the EventGrid Domain.
func (o DomainOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server. Defaults to `true`.
func (o DomainOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
func (o DomainOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Shared Access Key associated with the EventGrid Domain.
func (o DomainOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o DomainOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type DomainArrayOutput struct{ *pulumi.OutputState }
func (DomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput {
return o
}
func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return o
}
func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain {
return vs[0].([]*Domain)[vs[1].(int)]
}).(DomainOutput)
}
type DomainMapOutput struct{ *pulumi.OutputState }
func (DomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput {
return o
}
func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return o
}
func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain {
return vs[0].(map[string]*Domain)[vs[1].(string)]
}).(DomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{})
pulumi.RegisterOutputType(DomainOutput{})
pulumi.RegisterOutputType(DomainArrayOutput{})
pulumi.RegisterOutputType(DomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.