cosmosdb

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, __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.
capabilities = None

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

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.

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.

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.

write_endpoints = None

A list of write endpoints available for this CosmosDB account.

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.CassandraKeyspace(resource_name, opts=None, account_name=None, name=None, resource_group_name=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.

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, __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.
  • 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 Cosmos DB Mongo Database 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.
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.

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 Cosmos DB Mongo Database 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.

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, __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.

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, __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.

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, __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.

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.