UNPKG

@pulumi/azure-native

Version:

[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://badge.fury.io/js/%40pulumi%2Fazure-native.svg)](https://npmjs.com/package/@pulumi/azure-native) [![Python version](https://badge.fury.io/py/pu

389 lines (388 loc) 18.6 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as enums from "../types/enums"; /** * An Azure Cosmos DB database account. * * Uses Azure REST API version 2024-11-15. * * Other available API versions: 2015-04-01, 2015-04-08, 2015-11-06, 2016-03-19, 2016-03-31, 2019-08-01, 2019-12-12, 2020-03-01, 2020-04-01, 2020-06-01-preview, 2020-09-01, 2021-01-15, 2021-03-01-preview, 2021-03-15, 2021-04-01-preview, 2021-04-15, 2021-05-15, 2021-06-15, 2021-07-01-preview, 2021-10-15, 2021-10-15-preview, 2021-11-15-preview, 2022-02-15-preview, 2022-05-15, 2022-05-15-preview, 2022-08-15, 2022-08-15-preview, 2022-11-15, 2022-11-15-preview, 2023-03-01-preview, 2023-03-15, 2023-03-15-preview, 2023-04-15, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview, 2024-08-15, 2024-09-01-preview, 2024-12-01-preview, 2025-04-15, 2025-05-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native cosmosdb [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details. */ export declare class DatabaseAccount extends pulumi.CustomResource { /** * Get an existing DatabaseAccount resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): DatabaseAccount; /** * Returns true if the given object is an instance of DatabaseAccount. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is DatabaseAccount; /** * Analytical storage specific properties. */ readonly analyticalStorageConfiguration: pulumi.Output<outputs.cosmosdb.AnalyticalStorageConfigurationResponse | undefined>; /** * API specific properties. */ readonly apiProperties: pulumi.Output<outputs.cosmosdb.ApiPropertiesResponse | undefined>; /** * The Azure API version of the resource. */ readonly azureApiVersion: pulumi.Output<string>; /** * The object representing the policy for taking backups on an account. */ readonly backupPolicy: pulumi.Output<outputs.cosmosdb.ContinuousModeBackupPolicyResponse | outputs.cosmosdb.PeriodicModeBackupPolicyResponse | undefined>; /** * List of Cosmos DB capabilities for the account */ readonly capabilities: pulumi.Output<outputs.cosmosdb.CapabilityResponse[] | undefined>; /** * The object that represents all properties related to capacity enforcement on an account. */ readonly capacity: pulumi.Output<outputs.cosmosdb.CapacityResponse | undefined>; /** * The cassandra connector offer type for the Cosmos DB database C* account. */ readonly connectorOffer: pulumi.Output<string | undefined>; /** * The consistency policy for the Cosmos DB database account. */ readonly consistencyPolicy: pulumi.Output<outputs.cosmosdb.ConsistencyPolicyResponse | undefined>; /** * The CORS policy for the Cosmos DB database account. */ readonly cors: pulumi.Output<outputs.cosmosdb.CorsPolicyResponse[] | undefined>; /** * Enum to indicate the mode of account creation. */ readonly createMode: pulumi.Output<string | undefined>; /** * Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ readonly customerManagedKeyStatus: pulumi.Output<string | undefined>; /** * The offer type for the Cosmos DB database account. Default value: Standard. */ readonly databaseAccountOfferType: pulumi.Output<string>; /** * The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ readonly defaultIdentity: pulumi.Output<string | undefined>; /** * Disable write operations on metadata resources (databases, containers, throughput) via account keys */ readonly disableKeyBasedMetadataWriteAccess: pulumi.Output<boolean | undefined>; /** * Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ readonly disableLocalAuth: pulumi.Output<boolean | undefined>; /** * The connection endpoint for the Cosmos DB database account. */ readonly documentEndpoint: pulumi.Output<string>; /** * Flag to indicate whether to enable storage analytics. */ readonly enableAnalyticalStorage: pulumi.Output<boolean | undefined>; /** * Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ readonly enableAutomaticFailover: pulumi.Output<boolean | undefined>; /** * Flag to indicate enabling/disabling of Burst Capacity feature on the account */ readonly enableBurstCapacity: pulumi.Output<boolean | undefined>; /** * Enables the cassandra connector on the Cosmos DB C* account */ readonly enableCassandraConnector: pulumi.Output<boolean | undefined>; /** * Flag to indicate whether Free Tier is enabled. */ readonly enableFreeTier: pulumi.Output<boolean | undefined>; /** * Enables the account to write in multiple locations */ readonly enableMultipleWriteLocations: pulumi.Output<boolean | undefined>; /** * Flag to indicate enabling/disabling of Partition Merge feature on the account */ readonly enablePartitionMerge: pulumi.Output<boolean | undefined>; /** * Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account */ readonly enablePerRegionPerPartitionAutoscale: pulumi.Output<boolean | undefined>; /** * An array that contains the regions ordered by their failover priorities. */ readonly failoverPolicies: pulumi.Output<outputs.cosmosdb.FailoverPolicyResponse[]>; /** * Identity for the resource. */ readonly identity: pulumi.Output<outputs.cosmosdb.ManagedServiceIdentityResponse | undefined>; /** * A unique identifier assigned to the database account */ readonly instanceId: pulumi.Output<string>; /** * List of IpRules. */ readonly ipRules: pulumi.Output<outputs.cosmosdb.IpAddressOrRangeResponse[] | undefined>; /** * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ readonly isVirtualNetworkFilterEnabled: pulumi.Output<boolean | undefined>; /** * The URI of the key vault */ readonly keyVaultKeyUri: pulumi.Output<string | undefined>; /** * The object that represents the metadata for the Account Keys of the Cosmos DB account. */ readonly keysMetadata: pulumi.Output<outputs.cosmosdb.DatabaseAccountKeysMetadataResponse>; /** * Indicates the type of database account. This can only be set at database account creation. */ readonly kind: pulumi.Output<string | undefined>; /** * The location of the resource group to which the resource belongs. */ readonly location: pulumi.Output<string | undefined>; /** * An array that contains all of the locations enabled for the Cosmos DB account. */ readonly locations: pulumi.Output<outputs.cosmosdb.LocationResponse[]>; /** * Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ readonly minimalTlsVersion: pulumi.Output<string | undefined>; /** * The name of the ARM resource. */ readonly name: pulumi.Output<string>; /** * Indicates what services are allowed to bypass firewall checks. */ readonly networkAclBypass: pulumi.Output<string | undefined>; /** * An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ readonly networkAclBypassResourceIds: pulumi.Output<string[] | undefined>; /** * List of Private Endpoint Connections configured for the Cosmos DB account. */ readonly privateEndpointConnections: pulumi.Output<outputs.cosmosdb.PrivateEndpointConnectionResponse[]>; /** * The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. */ readonly provisioningState: pulumi.Output<string>; /** * Whether requests from Public Network are allowed */ readonly publicNetworkAccess: pulumi.Output<string | undefined>; /** * An array that contains of the read locations enabled for the Cosmos DB account. */ readonly readLocations: pulumi.Output<outputs.cosmosdb.LocationResponse[]>; /** * Parameters to indicate the information about the restore. */ readonly restoreParameters: pulumi.Output<outputs.cosmosdb.RestoreParametersResponse | undefined>; /** * The system meta data relating to this resource. */ readonly systemData: pulumi.Output<outputs.cosmosdb.SystemDataResponse>; /** * Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The type of Azure resource. */ readonly type: pulumi.Output<string>; /** * List of Virtual Network ACL rules configured for the Cosmos DB account. */ readonly virtualNetworkRules: pulumi.Output<outputs.cosmosdb.VirtualNetworkRuleResponse[] | undefined>; /** * An array that contains the write location for the Cosmos DB account. */ readonly writeLocations: pulumi.Output<outputs.cosmosdb.LocationResponse[]>; /** * Create a DatabaseAccount resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DatabaseAccountArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a DatabaseAccount resource. */ export interface DatabaseAccountArgs { /** * Cosmos DB database account name. */ accountName?: pulumi.Input<string>; /** * Analytical storage specific properties. */ analyticalStorageConfiguration?: pulumi.Input<inputs.cosmosdb.AnalyticalStorageConfigurationArgs>; /** * API specific properties. Currently, supported only for MongoDB API. */ apiProperties?: pulumi.Input<inputs.cosmosdb.ApiPropertiesArgs>; /** * The object representing the policy for taking backups on an account. */ backupPolicy?: pulumi.Input<inputs.cosmosdb.ContinuousModeBackupPolicyArgs | inputs.cosmosdb.PeriodicModeBackupPolicyArgs>; /** * List of Cosmos DB capabilities for the account */ capabilities?: pulumi.Input<pulumi.Input<inputs.cosmosdb.CapabilityArgs>[]>; /** * The object that represents all properties related to capacity enforcement on an account. */ capacity?: pulumi.Input<inputs.cosmosdb.CapacityArgs>; /** * The cassandra connector offer type for the Cosmos DB database C* account. */ connectorOffer?: pulumi.Input<string | enums.cosmosdb.ConnectorOffer>; /** * The consistency policy for the Cosmos DB account. */ consistencyPolicy?: pulumi.Input<inputs.cosmosdb.ConsistencyPolicyArgs>; /** * The CORS policy for the Cosmos DB database account. */ cors?: pulumi.Input<pulumi.Input<inputs.cosmosdb.CorsPolicyArgs>[]>; /** * Enum to indicate the mode of account creation. */ createMode?: pulumi.Input<string | enums.cosmosdb.CreateMode>; /** * Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: pulumi.Input<string>; /** * The offer type for the database */ databaseAccountOfferType: pulumi.Input<enums.cosmosdb.DatabaseAccountOfferType>; /** * The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ defaultIdentity?: pulumi.Input<string>; /** * Disable write operations on metadata resources (databases, containers, throughput) via account keys */ disableKeyBasedMetadataWriteAccess?: pulumi.Input<boolean>; /** * Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: pulumi.Input<boolean>; /** * Flag to indicate whether to enable storage analytics. */ enableAnalyticalStorage?: pulumi.Input<boolean>; /** * Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ enableAutomaticFailover?: pulumi.Input<boolean>; /** * Flag to indicate enabling/disabling of Burst Capacity feature on the account */ enableBurstCapacity?: pulumi.Input<boolean>; /** * Enables the cassandra connector on the Cosmos DB C* account */ enableCassandraConnector?: pulumi.Input<boolean>; /** * Flag to indicate whether Free Tier is enabled. */ enableFreeTier?: pulumi.Input<boolean>; /** * Enables the account to write in multiple locations */ enableMultipleWriteLocations?: pulumi.Input<boolean>; /** * Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: pulumi.Input<boolean>; /** * Flag to indicate enabling/disabling of PerRegionPerPartitionAutoscale feature on the account */ enablePerRegionPerPartitionAutoscale?: pulumi.Input<boolean>; /** * Identity for the resource. */ identity?: pulumi.Input<inputs.cosmosdb.ManagedServiceIdentityArgs>; /** * List of IpRules. */ ipRules?: pulumi.Input<pulumi.Input<inputs.cosmosdb.IpAddressOrRangeArgs>[]>; /** * Flag to indicate whether to enable/disable Virtual Network ACL rules. */ isVirtualNetworkFilterEnabled?: pulumi.Input<boolean>; /** * The URI of the key vault */ keyVaultKeyUri?: pulumi.Input<string>; /** * Indicates the type of database account. This can only be set at database account creation. */ kind?: pulumi.Input<string | enums.cosmosdb.DatabaseAccountKind>; /** * The location of the resource group to which the resource belongs. */ location?: pulumi.Input<string>; /** * An array that contains the georeplication locations enabled for the Cosmos DB account. */ locations: pulumi.Input<pulumi.Input<inputs.cosmosdb.LocationArgs>[]>; /** * Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ minimalTlsVersion?: pulumi.Input<string | enums.cosmosdb.MinimalTlsVersion>; /** * Indicates what services are allowed to bypass firewall checks. */ networkAclBypass?: pulumi.Input<enums.cosmosdb.NetworkAclBypass>; /** * An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether requests from Public Network are allowed */ publicNetworkAccess?: pulumi.Input<string | enums.cosmosdb.PublicNetworkAccess>; /** * The name of the resource group. The name is case insensitive. */ resourceGroupName: pulumi.Input<string>; /** * Parameters to indicate the information about the restore. */ restoreParameters?: pulumi.Input<inputs.cosmosdb.RestoreParametersArgs>; /** * Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * List of Virtual Network ACL rules configured for the Cosmos DB account. */ virtualNetworkRules?: pulumi.Input<pulumi.Input<inputs.cosmosdb.VirtualNetworkRuleArgs>[]>; }