This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.

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

import pulumi
import pulumi_azure as azure
import pulumi_random as random

rg = azure.core.ResourceGroup("rg", location=var["resource_group_location"])
ri = random.RandomInteger("ri",
    min=10000,
    max=99999)
db = azure.cosmosdb.Account("db",
    location=rg.location,
    resource_group_name=rg.name,
    offer_type="Standard",
    kind="GlobalDocumentDB",
    enable_automatic_failover=True,
    consistency_policy={
        "consistencyLevel": "BoundedStaleness",
        "maxIntervalInSeconds": 10,
        "maxStalenessPrefix": 200,
    },
    geo_location=[
        {
            "location": var["failover_location"],
            "failoverPriority": 1,
        },
        {
            "prefix": ri.result.apply(lambda result: f"tfex-cosmos-db-{result}-customid"),
            "location": rg.location,
            "failoverPriority": 0,
        },
    ])
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]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

  • 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]) - Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.

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 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: pulumi.Output[list] = 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) - Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.

connection_strings: pulumi.Output[list] = None

A list of connection strings available for this CosmosDB account.

consistency_policy: pulumi.Output[dict] = 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: pulumi.Output[bool] = None

Enable automatic fail over for this Cosmos DB account.

enable_multiple_write_locations: pulumi.Output[bool] = None

Enable multi-master support for this Cosmos DB account.

endpoint: pulumi.Output[str] = None

The endpoint used to connect to the CosmosDB account.

geo_locations: pulumi.Output[list] = 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: pulumi.Output[str] = 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: pulumi.Output[bool] = None

Enables virtual network filtering for this Cosmos DB account.

kind: pulumi.Output[str] = 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: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.

offer_type: pulumi.Output[str] = None

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

primary_master_key: pulumi.Output[str] = None

The Primary master key for the CosmosDB Account.

primary_readonly_master_key: pulumi.Output[str] = None

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

read_endpoints: pulumi.Output[list] = None

A list of read endpoints available for this CosmosDB account.

resource_group_name: pulumi.Output[str] = 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: pulumi.Output[str] = None

The Secondary master key for the CosmosDB Account.

secondary_readonly_master_key: pulumi.Output[str] = None

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

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

virtual_network_rules: pulumi.Output[list] = 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: pulumi.Output[list] = 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, 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.

  • 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]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

  • 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]) - Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created.

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 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, id=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)
class pulumi_azure.cosmosdb.CassandraKeyspace(resource_name, opts=None, account_name=None, name=None, resource_group_name=None, throughput=None, __props__=None, __name__=None, __opts__=None)

Manages a Cassandra KeySpace within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.get_resource_group(name="tflex-cosmosdb-account-rg")
example_account = azure.cosmosdb.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    offer_type="Standard",
    capabilities=[{
        "name": "EnableCassandra",
    }],
    consistency_policy={
        "consistencyLevel": "Strong",
    },
    geo_location=[{
        "location": "West US",
        "failoverPriority": 0,
    }])
example_cassandra_keyspace = azure.cosmosdb.CassandraKeyspace("exampleCassandraKeyspace",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
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.

  • throughput (pulumi.Input[float]) – The throughput of Cassandra keyspace (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

account_name: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = 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.

throughput: pulumi.Output[float] = None

The throughput of Cassandra keyspace (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None, throughput=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.

  • throughput (pulumi.Input[float]) – The throughput of Cassandra keyspace (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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, id=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)

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.

id = None

The provider-assigned unique ID for this managed resource.

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.

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

Manages a Gremlin Database within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_gremlin_database = azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
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 CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Gremlin 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 Gremlin Database is created. Changing this forces a new resource to be created.

  • throughput (pulumi.Input[float]) – The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

account_name: pulumi.Output[str] = None

The name of the CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = None

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

throughput: pulumi.Output[float] = None

The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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

Get an existing GremlinDatabase 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 CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Gremlin 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 Gremlin Database is created. Changing this forces a new resource to be created.

  • throughput (pulumi.Input[float]) – The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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.GremlinGraph(resource_name, opts=None, account_name=None, conflict_resolution_policies=None, database_name=None, index_policies=None, name=None, partition_key_path=None, resource_group_name=None, throughput=None, unique_keys=None, __props__=None, __name__=None, __opts__=None)

Manages a Gremlin Graph within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_gremlin_database = azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name)
example_gremlin_graph = azure.cosmosdb.GremlinGraph("exampleGremlinGraph",
    resource_group_name=azurerm_cosmosdb_account["example"]["resource_group_name"],
    account_name=azurerm_cosmosdb_account["example"]["name"],
    database_name=example_gremlin_database.name,
    partition_key_path="/Example",
    throughput=400,
    index_policy=[{
        "automatic": True,
        "indexingMode": "Consistent",
        "includedPaths": ["/*"],
        "excludedPaths": ["/"_etag"/?"],
    }],
    conflict_resolution_policy=[{
        "mode": "LastWriterWins",
        "conflictResolutionPath": "/_ts",
    }],
    unique_key=[{
        "paths": [
            "/definition/id1",
            "/definition/id2",
        ],
    }])
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 CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.

  • conflict_resolution_policies (pulumi.Input[list]) – The conflict resolution policy for the graph. One or more conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created.

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

  • index_policies (pulumi.Input[list]) – The configuration of the indexing policy. One or more index_policy blocks as defined below. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Gremlin Graph. 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 Gremlin Graph is created. Changing this forces a new resource to be created.

  • throughput (pulumi.Input[float]) – The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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

The conflict_resolution_policies object supports the following:

  • conflictResolutionPath (pulumi.Input[str]) - The conflict resolution path in the case of LastWriterWins mode.

  • conflictResolutionProcedure (pulumi.Input[str]) - The procedure to resolve conflicts in the case of custom mode.

  • mode (pulumi.Input[str]) - Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

The index_policies object supports the following:

  • automatic (pulumi.Input[bool]) - Indicates if the indexing policy is automatic. Defaults to true.

  • excludedPaths (pulumi.Input[list]) - List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy.

  • includedPaths (pulumi.Input[list]) - List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy.

  • indexingMode (pulumi.Input[str]) - Indicates the indexing mode. Possible values include: Consistent, Lazy, None.

The unique_keys object supports the following:

  • paths (pulumi.Input[list]) - A list of paths to use for this unique key.

account_name: pulumi.Output[str] = None

The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.

conflict_resolution_policies: pulumi.Output[list] = None

The conflict resolution policy for the graph. One or more conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created.

  • conflictResolutionPath (str) - The conflict resolution path in the case of LastWriterWins mode.

  • conflictResolutionProcedure (str) - The procedure to resolve conflicts in the case of custom mode.

  • mode (str) - Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

database_name: pulumi.Output[str] = None

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

index_policies: pulumi.Output[list] = None

The configuration of the indexing policy. One or more index_policy blocks as defined below. Changing this forces a new resource to be created.

  • automatic (bool) - Indicates if the indexing policy is automatic. Defaults to true.

  • excludedPaths (list) - List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy.

  • includedPaths (list) - List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy.

  • indexingMode (str) - Indicates the indexing mode. Possible values include: Consistent, Lazy, None.

name: pulumi.Output[str] = None

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

partition_key_path: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = None

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

throughput: pulumi.Output[float] = None

The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

unique_keys: pulumi.Output[list] = None

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

  • paths (list) - A list of paths to use for this unique key.

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

Get an existing GremlinGraph 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 CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created.

  • conflict_resolution_policies (pulumi.Input[list]) – The conflict resolution policy for the graph. One or more conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created.

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

  • index_policies (pulumi.Input[list]) – The configuration of the indexing policy. One or more index_policy blocks as defined below. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – Specifies the name of the Cosmos DB Gremlin Graph. 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 Gremlin Graph is created. Changing this forces a new resource to be created.

  • throughput (pulumi.Input[float]) – The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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

The conflict_resolution_policies object supports the following:

  • conflictResolutionPath (pulumi.Input[str]) - The conflict resolution path in the case of LastWriterWins mode.

  • conflictResolutionProcedure (pulumi.Input[str]) - The procedure to resolve conflicts in the case of custom mode.

  • mode (pulumi.Input[str]) - Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

The index_policies object supports the following:

  • automatic (pulumi.Input[bool]) - Indicates if the indexing policy is automatic. Defaults to true.

  • excludedPaths (pulumi.Input[list]) - List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy.

  • includedPaths (pulumi.Input[list]) - List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy.

  • indexingMode (pulumi.Input[str]) - Indicates the indexing mode. Possible values include: Consistent, Lazy, None.

The unique_keys object supports the following:

  • paths (pulumi.Input[list]) - A list of paths to use for this unique key.

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.MongoCollection(resource_name, opts=None, account_name=None, database_name=None, default_ttl_seconds=None, indices=None, name=None, resource_group_name=None, shard_key=None, throughput=None, __props__=None, __name__=None, __opts__=None)

Manages a Mongo Collection within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_mongo_database = azure.cosmosdb.MongoDatabase("exampleMongoDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name)
example_mongo_collection = azure.cosmosdb.MongoCollection("exampleMongoCollection",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    database_name=example_mongo_database.name,
    default_ttl_seconds="777",
    shard_key="uniqueKey",
    throughput=400)
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 0 items are not automatically expired.

  • indices (pulumi.Input[list]) – One or more index 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.

  • throughput (pulumi.Input[float]) – The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

The indices object supports the following:

  • keys (pulumi.Input[list]) - Specifies the list of user settable keys for each Cosmos DB Mongo Collection.

  • unique (pulumi.Input[bool]) - Is the index unique or not? Defaults to false.

database_name: pulumi.Output[str] = 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: pulumi.Output[float] = None

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

indices: pulumi.Output[list] = None

One or more index blocks as defined below.

  • keys (list) - Specifies the list of user settable keys for each Cosmos DB Mongo Collection.

  • unique (bool) - Is the index unique or not? Defaults to false.

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = 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: pulumi.Output[str] = None

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

system_indexes: pulumi.Output[list] = None

One or more system_indexes blocks as defined below.

  • keys (list) - Specifies the list of user settable keys for each Cosmos DB Mongo Collection.

  • unique (bool) - Is the index unique or not? Defaults to false.

throughput: pulumi.Output[float] = None

The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

static get(resource_name, id, opts=None, account_name=None, database_name=None, default_ttl_seconds=None, indices=None, name=None, resource_group_name=None, shard_key=None, system_indexes=None, throughput=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 0 items are not automatically expired.

  • indices (pulumi.Input[list]) – One or more index 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.

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

  • throughput (pulumi.Input[float]) – The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

The indices object supports the following:

  • keys (pulumi.Input[list]) - Specifies the list of user settable keys for each Cosmos DB Mongo Collection.

  • unique (pulumi.Input[bool]) - Is the index unique or not? Defaults to false.

The system_indexes object supports the following:

  • keys (pulumi.Input[list]) - Specifies the list of user settable keys for each Cosmos DB Mongo Collection.

  • unique (pulumi.Input[bool]) - Is the index unique or not? Defaults to false.

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, throughput=None, __props__=None, __name__=None, __opts__=None)

Manages a Mongo Database within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_mongo_database = azure.cosmosdb.MongoDatabase("exampleMongoDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
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.

  • throughput (pulumi.Input[float]) – The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

account_name: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = 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.

throughput: pulumi.Output[float] = None

The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None, throughput=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.

  • throughput (pulumi.Input[float]) – The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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, default_ttl=None, name=None, partition_key_path=None, resource_group_name=None, throughput=None, unique_keys=None, __props__=None, __name__=None, __opts__=None)

Manages a SQL Container within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example = azure.cosmosdb.SqlContainer("example",
    resource_group_name=azurerm_cosmosdb_account["example"]["resource_group_name"],
    account_name=azurerm_cosmosdb_account["example"]["name"],
    database_name=azurerm_cosmosdb_sql_database["example"]["name"],
    partition_key_path="/definition/id",
    throughput=400,
    unique_key=[{
        "paths": [
            "/definition/idlong",
            "/definition/idshort",
        ],
    }])
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.

  • default_ttl (pulumi.Input[float]) – The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time.

  • 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.

  • throughput (pulumi.Input[float]) – The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.

  • 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]) - A list of paths to use for this unique key.

account_name: pulumi.Output[str] = None

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

database_name: pulumi.Output[str] = None

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

default_ttl: pulumi.Output[float] = None

The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time.

name: pulumi.Output[str] = None

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

partition_key_path: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = 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.

throughput: pulumi.Output[float] = None

The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.

unique_keys: pulumi.Output[list] = None

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

  • paths (list) - A list of paths to use for this unique key.

static get(resource_name, id, opts=None, account_name=None, database_name=None, default_ttl=None, name=None, partition_key_path=None, resource_group_name=None, throughput=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.

  • default_ttl (pulumi.Input[float]) – The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time.

  • 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.

  • throughput (pulumi.Input[float]) – The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.

  • 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]) - A list of paths to use for this unique key.

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, throughput=None, __props__=None, __name__=None, __opts__=None)

Manages a SQL Database within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_sql_database = azure.cosmosdb.SqlDatabase("exampleSqlDatabase",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
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.

  • throughput (pulumi.Input[float]) – The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

account_name: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = 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.

throughput: pulumi.Output[float] = None

The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None, throughput=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.

  • throughput (pulumi.Input[float]) – The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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, throughput=None, __props__=None, __name__=None, __opts__=None)

Manages a Table within a Cosmos DB Account.

import pulumi
import pulumi_azure as azure

example_account = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_table = azure.cosmosdb.Table("exampleTable",
    resource_group_name=example_account.resource_group_name,
    account_name=example_account.name,
    throughput=400)
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.

  • throughput (pulumi.Input[float]) – The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

account_name: pulumi.Output[str] = None

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

name: pulumi.Output[str] = None

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

resource_group_name: pulumi.Output[str] = None

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

throughput: pulumi.Output[float] = None

The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

static get(resource_name, id, opts=None, account_name=None, name=None, resource_group_name=None, throughput=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.

  • throughput (pulumi.Input[float]) – The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual resource destroy-apply.

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.

import pulumi
import pulumi_azure as azure

example = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
pulumi.export("cosmosdbAccountEndpoint", data["azurerm_cosmosdb_account"]["jobs"]["endpoint"])
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.