cosmosdb

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.cosmosdb.Account(resource_name, opts=None, capabilities=None, consistency_policy=None, enable_automatic_failover=None, enable_multiple_write_locations=None, failover_policies=None, geo_locations=None, ip_range_filter=None, is_virtual_network_filter_enabled=None, kind=None, location=None, name=None, offer_type=None, resource_group_name=None, tags=None, virtual_network_rules=None, __props__=None, __name__=None, __opts__=None)

Manages a CosmosDB (formally DocumentDB) Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • capabilities (pulumi.Input[list]) – The capabilities which should be enabled for this Cosmos DB account. Possible values are EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableTable, MongoDBv3.4, and mongoEnableDocLevelTTL.

  • consistency_policy (pulumi.Input[dict]) – Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account.

  • enable_automatic_failover (pulumi.Input[bool]) – Enable automatic fail over for this Cosmos DB account.

  • enable_multiple_write_locations (pulumi.Input[bool]) – Enable multi-master support for this Cosmos DB account.

  • geo_locations (pulumi.Input[list]) – Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location.

  • ip_range_filter (pulumi.Input[str]) – CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IP’s for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.

  • is_virtual_network_filter_enabled (pulumi.Input[bool]) – Enables virtual network filtering for this Cosmos DB account.

  • kind (pulumi.Input[str]) – Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB and MongoDB. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – The name of the Azure region to host replicated data.

  • name (pulumi.Input[str]) – The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

  • offer_type (pulumi.Input[str]) – Specifies the Offer Type to use for this CosmosDB Account - currently this can only be set to Standard.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • virtual_network_rules (pulumi.Input[list]) – Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account.

The capabilities object supports the following:

  • name (pulumi.Input[str]) - The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

The consistency_policy object supports the following:

  • consistencyLevel (pulumi.Input[str]) - The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix.

  • maxIntervalInSeconds (pulumi.Input[float]) - When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness.

  • maxStalenessPrefix (pulumi.Input[float]) - When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 102147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness.

The failover_policies object supports the following:

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

  • location (pulumi.Input[str]) - The name of the Azure region to host replicated data.

  • priority (pulumi.Input[float])

The geo_locations object supports the following:

  • failoverPriority (pulumi.Input[float]) - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0.

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

  • location (pulumi.Input[str]) - The name of the Azure region to host replicated data.

  • prefix (pulumi.Input[str]) - The string used to generate the document endpoints for this region. If not specified it defaults to ${cosmosdb_account.name}-${location}. Changing this causes the location to be deleted and re-provisioned and cannot be changed for the location with failover priority 0.

The virtual_network_rules object supports the following:

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

capabilities = None

The capabilities which should be enabled for this Cosmos DB account. Possible values are EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableTable, MongoDBv3.4, and mongoEnableDocLevelTTL.

  • name (str) - The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

connection_strings = None

A list of connection strings available for this CosmosDB account. If the kind is GlobalDocumentDB, this will be empty.

consistency_policy = None

Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account.

  • consistencyLevel (str) - The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix.

  • maxIntervalInSeconds (float) - When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness.

  • maxStalenessPrefix (float) - When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 102147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness.

enable_automatic_failover = None

Enable automatic fail over for this Cosmos DB account.

enable_multiple_write_locations = None

Enable multi-master support for this Cosmos DB account.

endpoint = None

The endpoint used to connect to the CosmosDB account.

geo_locations = None

Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location.

  • failoverPriority (float) - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0.

  • id (str) - The ID of the virtual network subnet.

  • location (str) - The name of the Azure region to host replicated data.

  • prefix (str) - The string used to generate the document endpoints for this region. If not specified it defaults to ${cosmosdb_account.name}-${location}. Changing this causes the location to be deleted and re-provisioned and cannot be changed for the location with failover priority 0.

ip_range_filter = None

CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IP’s for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.

is_virtual_network_filter_enabled = None

Enables virtual network filtering for this Cosmos DB account.

kind = None

Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB and MongoDB. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created.

location = None

The name of the Azure region to host replicated data.

name = None

The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

offer_type = None

Specifies the Offer Type to use for this CosmosDB Account - currently this can only be set to Standard.

primary_master_key = None

The Primary master key for the CosmosDB Account.

primary_readonly_master_key = None

The Primary read-only master Key for the CosmosDB Account.

read_endpoints = None

A list of read endpoints available for this CosmosDB account.

resource_group_name = None

The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.

secondary_master_key = None

The Secondary master key for the CosmosDB Account.

secondary_readonly_master_key = None

The Secondary read-only master key for the CosmosDB Account.

tags = None

A mapping of tags to assign to the resource.

virtual_network_rules = None

Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account.

  • id (str) - The ID of the virtual network subnet.

write_endpoints = None

A list of write endpoints available for this CosmosDB account.

static get(resource_name, id, opts=None, capabilities=None, connection_strings=None, consistency_policy=None, enable_automatic_failover=None, enable_multiple_write_locations=None, endpoint=None, failover_policies=None, geo_locations=None, ip_range_filter=None, is_virtual_network_filter_enabled=None, kind=None, location=None, name=None, offer_type=None, primary_master_key=None, primary_readonly_master_key=None, read_endpoints=None, resource_group_name=None, secondary_master_key=None, secondary_readonly_master_key=None, tags=None, virtual_network_rules=None, write_endpoints=None)

Get an existing Account resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • capabilities (pulumi.Input[list]) – The capabilities which should be enabled for this Cosmos DB account. Possible values are EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableTable, MongoDBv3.4, and mongoEnableDocLevelTTL.

  • connection_strings (pulumi.Input[list]) – A list of connection strings available for this CosmosDB account. If the kind is GlobalDocumentDB, this will be empty.

  • consistency_policy (pulumi.Input[dict]) – Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account.

  • enable_automatic_failover (pulumi.Input[bool]) – Enable automatic fail over for this Cosmos DB account.

  • enable_multiple_write_locations (pulumi.Input[bool]) – Enable multi-master support for this Cosmos DB account.

  • endpoint (pulumi.Input[str]) – The endpoint used to connect to the CosmosDB account.

  • geo_locations (pulumi.Input[list]) – Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location.

  • ip_range_filter (pulumi.Input[str]) – CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IP’s for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.

  • is_virtual_network_filter_enabled (pulumi.Input[bool]) – Enables virtual network filtering for this Cosmos DB account.

  • kind (pulumi.Input[str]) – Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB and MongoDB. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – The name of the Azure region to host replicated data.

  • name (pulumi.Input[str]) – The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

  • offer_type (pulumi.Input[str]) – Specifies the Offer Type to use for this CosmosDB Account - currently this can only be set to Standard.

  • primary_master_key (pulumi.Input[str]) – The Primary master key for the CosmosDB Account.

  • primary_readonly_master_key (pulumi.Input[str]) – The Primary read-only master Key for the CosmosDB Account.

  • read_endpoints (pulumi.Input[list]) – A list of read endpoints available for this CosmosDB account.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created.

  • secondary_master_key (pulumi.Input[str]) – The Secondary master key for the CosmosDB Account.

  • secondary_readonly_master_key (pulumi.Input[str]) – The Secondary read-only master key for the CosmosDB Account.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • virtual_network_rules (pulumi.Input[list]) – Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account.

  • write_endpoints (pulumi.Input[list]) – A list of write endpoints available for this CosmosDB account.

The capabilities object supports the following:

  • name (pulumi.Input[str]) - The capability to enable - Possible values are EnableTable, EnableCassandra, and EnableGremlin.

The consistency_policy object supports the following:

  • consistencyLevel (pulumi.Input[str]) - The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix.

  • maxIntervalInSeconds (pulumi.Input[float]) - When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness.

  • maxStalenessPrefix (pulumi.Input[float]) - When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 102147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness.

The failover_policies object supports the following:

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

  • location (pulumi.Input[str]) - The name of the Azure region to host replicated data.

  • priority (pulumi.Input[float])

The geo_locations object supports the following:

  • failoverPriority (pulumi.Input[float]) - The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0.

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

  • location (pulumi.Input[str]) - The name of the Azure region to host replicated data.

  • prefix (pulumi.Input[str]) - The string used to generate the document endpoints for this region. If not specified it defaults to ${cosmosdb_account.name}-${location}. Changing this causes the location to be deleted and re-provisioned and cannot be changed for the location with failover priority 0.

The virtual_network_rules object supports the following:

  • id (pulumi.Input[str]) - The ID of the virtual network subnet.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.AwaitableGetAccountResult(capabilities=None, consistency_policies=None, enable_automatic_failover=None, enable_multiple_write_locations=None, endpoint=None, geo_locations=None, ip_range_filter=None, is_virtual_network_filter_enabled=None, kind=None, location=None, name=None, offer_type=None, primary_master_key=None, primary_readonly_master_key=None, read_endpoints=None, resource_group_name=None, secondary_master_key=None, secondary_readonly_master_key=None, tags=None, virtual_network_rules=None, write_endpoints=None, id=None)
class pulumi_azure.cosmosdb.CassandraKeyspace(resource_name, opts=None, account_name=None, name=None, resource_group_name=None, __props__=None, __name__=None, __opts__=None)

Manages a Cassandra KeySpace within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Cassandra KeySpace. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created.

account_name = None

The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created.

name = None

Specifies the name of the Cosmos DB Cassandra KeySpace. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None)

Get an existing CassandraKeyspace resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Cassandra KeySpace. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.GetAccountResult(capabilities=None, consistency_policies=None, enable_automatic_failover=None, enable_multiple_write_locations=None, endpoint=None, geo_locations=None, ip_range_filter=None, is_virtual_network_filter_enabled=None, kind=None, location=None, name=None, offer_type=None, primary_master_key=None, primary_readonly_master_key=None, read_endpoints=None, resource_group_name=None, secondary_master_key=None, secondary_readonly_master_key=None, tags=None, virtual_network_rules=None, write_endpoints=None, id=None)

A collection of values returned by getAccount.

capabilities = None

Capabilities enabled on this Cosmos DB account.

enable_automatic_failover = None

If automatic failover is enabled for this CosmosDB Account.

enable_multiple_write_locations = None

If multi-master is enabled for this Cosmos DB account.

endpoint = None

The endpoint used to connect to the CosmosDB account.

ip_range_filter = None

The current IP Filter for this CosmosDB account

is_virtual_network_filter_enabled = None

If virtual network filtering is enabled for this Cosmos DB account.

kind = None

The Kind of the CosmosDB account.

location = None

The name of the Azure region hosting replicated data.

offer_type = None

The Offer Type to used by this CosmosDB Account.

primary_master_key = None

The Primary master key for the CosmosDB Account.

primary_readonly_master_key = None

The Primary read-only master Key for the CosmosDB Account.

read_endpoints = None

A list of read endpoints available for this CosmosDB account.

secondary_master_key = None

The Secondary master key for the CosmosDB Account.

secondary_readonly_master_key = None

The Secondary read-only master key for the CosmosDB Account.

tags = None

A mapping of tags assigned to the resource.

virtual_network_rules = None

Subnets that are allowed to access this CosmosDB account.

write_endpoints = None

A list of write endpoints available for this CosmosDB account.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_azure.cosmosdb.MongoCollection(resource_name, opts=None, account_name=None, database_name=None, default_ttl_seconds=None, indexes=None, name=None, resource_group_name=None, shard_key=None, __props__=None, __name__=None, __opts__=None)

Manages a Mongo Collection within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database_name (pulumi.Input[str]) – The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

  • default_ttl_seconds (pulumi.Input[float]) – The default Time To Live in seconds. If the value is -1 items are not automatically expired.

  • indexes (pulumi.Input[list]) – One or more indexes blocks as defined below.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

  • shard_key (pulumi.Input[str]) – The name of the key to partition on for sharding. There must not be any other unique index keys.

The indexes object supports the following:

  • key (pulumi.Input[str])

  • unique (pulumi.Input[bool])

database_name = None

The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

default_ttl_seconds = None

The default Time To Live in seconds. If the value is -1 items are not automatically expired.

indexes = None

One or more indexes blocks as defined below.

  • key (str)

  • unique (bool)

name = None

Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

shard_key = None

The name of the key to partition on for sharding. There must not be any other unique index keys.

static get(resource_name, id, opts=None, account_name=None, database_name=None, default_ttl_seconds=None, indexes=None, name=None, resource_group_name=None, shard_key=None)

Get an existing MongoCollection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database_name (pulumi.Input[str]) – The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

  • default_ttl_seconds (pulumi.Input[float]) – The default Time To Live in seconds. If the value is -1 items are not automatically expired.

  • indexes (pulumi.Input[list]) – One or more indexes blocks as defined below.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Mongo Collection. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created.

  • shard_key (pulumi.Input[str]) – The name of the key to partition on for sharding. There must not be any other unique index keys.

The indexes object supports the following:

  • key (pulumi.Input[str])

  • unique (pulumi.Input[bool])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.MongoDatabase(resource_name, opts=None, account_name=None, name=None, resource_group_name=None, __props__=None, __name__=None, __opts__=None)

Manages a Mongo Database within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Mongo Database. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created.

account_name = None

The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created.

name = None

Specifies the name of the Cosmos DB Mongo Database. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None)

Get an existing MongoDatabase resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Mongo Database. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.SqlContainer(resource_name, opts=None, account_name=None, database_name=None, name=None, partition_key_path=None, resource_group_name=None, unique_keys=None, __props__=None, __name__=None, __opts__=None)

Manages a SQL Container within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.

  • database_name (pulumi.Input[str]) – The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

  • partition_key_path (pulumi.Input[str]) – Define a partition key. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

  • unique_keys (pulumi.Input[list]) – One or more unique_key blocks as defined below. Changing this forces a new resource to be created.

The unique_keys object supports the following:

  • paths (pulumi.Input[list])

account_name = None

The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.

database_name = None

The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.

name = None

Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

partition_key_path = None

Define a partition key. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

unique_keys = None

One or more unique_key blocks as defined below. Changing this forces a new resource to be created.

  • paths (list)

static get(resource_name, id, opts=None, account_name=None, database_name=None, name=None, partition_key_path=None, resource_group_name=None, unique_keys=None)

Get an existing SqlContainer resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.

  • database_name (pulumi.Input[str]) – The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

  • partition_key_path (pulumi.Input[str]) – Define a partition key. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

  • unique_keys (pulumi.Input[list]) – One or more unique_key blocks as defined below. Changing this forces a new resource to be created.

The unique_keys object supports the following:

  • paths (pulumi.Input[list])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.SqlDatabase(resource_name, opts=None, account_name=None, name=None, resource_group_name=None, __props__=None, __name__=None, __opts__=None)

Manages a SQL Database within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

account_name = None

The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created.

name = None

Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None)

Get an existing SqlDatabase resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB SQL Database. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.cosmosdb.Table(resource_name, opts=None, account_name=None, name=None, resource_group_name=None, __props__=None, __name__=None, __opts__=None)

Manages a Table within a Cosmos DB Account.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Table. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created.

account_name = None

The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created.

name = None

Specifies the name of the Cosmos DB Table. Changing this forces a new resource to be created.

resource_group_name = None

The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None)

Get an existing Table resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_name (pulumi.Input[str]) – The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Table. Changing this forces a new resource to be created.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_azure.cosmosdb.get_account(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing CosmosDB (formally DocumentDB) Account.

Parameters
  • name (str) – Specifies the name of the CosmosDB Account.

  • resource_group_name (str) – Specifies the name of the resource group in which the CosmosDB Account resides.