Module cosmosdb

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.

Resources

Functions

Others

Resources

Resource Account

class Account extends CustomResource

Manages a CosmosDB (formally DocumentDB) Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as random from "@pulumi/random";

const rg = new azure.core.ResourceGroup("rg", {location: _var.resource_group_location});
const ri = new random.RandomInteger("ri", {
    min: 10000,
    max: 99999,
});
const db = new azure.cosmosdb.Account("db", {
    location: rg.location,
    resourceGroupName: rg.name,
    offerType: "Standard",
    kind: "GlobalDocumentDB",
    enableAutomaticFailover: true,
    consistency_policy: {
        consistencyLevel: "BoundedStaleness",
        maxIntervalInSeconds: 10,
        maxStalenessPrefix: 200,
    },
    geo_location: [
        {
            location: _var.failover_location,
            failoverPriority: 1,
        },
        {
            prefix: pulumi.interpolate`tfex-cosmos-db-${ri.result}-customid`,
            location: rg.location,
            failoverPriority: 0,
        },
    ],
});

constructor

new Account(name: string, args: AccountArgs, opts?: pulumi.CustomResourceOptions)

Create a Account resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccountState, opts?: pulumi.CustomResourceOptions): Account

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

method getChangeFeedFunction

getChangeFeedFunction(name: string, args: GetCosmosDBFunctionArgs): CosmosDBFunction

Creates a new Function triggered by messages in the given queue using the callback provided. [getChangeFeedFunction] creates no Azure resources automatically: the returned Function should be used as part of a [MultiCallbackFunctionApp]. Use [onChange] if you want to create a Function App with a single Function.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Account

Returns true if the given object is an instance of Account. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method onChange

onChange(name: string, args: CosmosChangeFeedSubscriptionArgs, opts?: pulumi.ComponentResourceOptions): CosmosChangeFeedSubscription

Creates a new subscription to events fired from Cosmos DB Change Feed to the handler provided, along with options to control the behavior of the subscription. A dedicated Function App is created behind the scenes with a single Azure Function in it. Use [getChangeFeedFunction] if you want to compose multiple Functions into the same App manually.

property capabilities

public capabilities: pulumi.Output<AccountCapability[] | undefined>;

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

property connectionStrings

public connectionStrings: pulumi.Output<string[]>;

A list of connection strings available for this CosmosDB account.

property consistencyPolicy

public consistencyPolicy: pulumi.Output<AccountConsistencyPolicy>;

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

property enableAutomaticFailover

public enableAutomaticFailover: pulumi.Output<boolean | undefined>;

Enable automatic fail over for this Cosmos DB account.

property enableMultipleWriteLocations

public enableMultipleWriteLocations: pulumi.Output<boolean | undefined>;

Enable multi-master support for this Cosmos DB account.

property endpoint

public endpoint: pulumi.Output<string>;

The endpoint used to connect to the CosmosDB account.

property geoLocations

public geoLocations: pulumi.Output<AccountGeoLocation[]>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipRangeFilter

public ipRangeFilter: pulumi.Output<string | undefined>;

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.

property isVirtualNetworkFilterEnabled

public isVirtualNetworkFilterEnabled: pulumi.Output<boolean | undefined>;

Enables virtual network filtering for this Cosmos DB account.

property kind

public kind: pulumi.Output<string | undefined>;

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.

property location

public location: pulumi.Output<string>;

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

property name

public name: pulumi.Output<string>;

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

property offerType

public offerType: pulumi.Output<string>;

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

property primaryMasterKey

public primaryMasterKey: pulumi.Output<string>;

The Primary master key for the CosmosDB Account.

property primaryReadonlyMasterKey

public primaryReadonlyMasterKey: pulumi.Output<string>;

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

property readEndpoints

public readEndpoints: pulumi.Output<string[]>;

A list of read endpoints available for this CosmosDB account.

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property secondaryMasterKey

public secondaryMasterKey: pulumi.Output<string>;

The Secondary master key for the CosmosDB Account.

property secondaryReadonlyMasterKey

public secondaryReadonlyMasterKey: pulumi.Output<string>;

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

property tags

public tags: pulumi.Output<{[key: string]: string} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property virtualNetworkRules

public virtualNetworkRules: pulumi.Output<AccountVirtualNetworkRule[] | undefined>;

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

property writeEndpoints

public writeEndpoints: pulumi.Output<string[]>;

A list of write endpoints available for this CosmosDB account.

Resource CassandraKeyspace

class CassandraKeyspace extends CustomResource

Manages a Cassandra KeySpace within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = azure.core.getResourceGroup({
    name: "tflex-cosmosdb-account-rg",
});
const exampleAccount = new azure.cosmosdb.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.name),
    location: exampleResourceGroup.then(exampleResourceGroup => exampleResourceGroup.location),
    offerType: "Standard",
    capabilities: [{
        name: "EnableCassandra",
    }],
    consistency_policy: {
        consistencyLevel: "Strong",
    },
    geo_location: [{
        location: "West US",
        failoverPriority: 0,
    }],
});
const exampleCassandraKeyspace = new azure.cosmosdb.CassandraKeyspace("exampleCassandraKeyspace", {
    resourceGroupName: exampleAccount.resourceGroupName,
    accountName: exampleAccount.name,
    throughput: 400,
});

constructor

new CassandraKeyspace(name: string, args: CassandraKeyspaceArgs, opts?: pulumi.CustomResourceOptions)

Create a CassandraKeyspace resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CassandraKeyspaceState, opts?: pulumi.CustomResourceOptions): CassandraKeyspace

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is CassandraKeyspace

Returns true if the given object is an instance of CassandraKeyspace. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GremlinDatabase

class GremlinDatabase extends CustomResource

Manages a Gremlin Database within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleGremlinDatabase = new azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    throughput: 400,
});

constructor

new GremlinDatabase(name: string, args: GremlinDatabaseArgs, opts?: pulumi.CustomResourceOptions)

Create a GremlinDatabase resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GremlinDatabaseState, opts?: pulumi.CustomResourceOptions): GremlinDatabase

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GremlinDatabase

Returns true if the given object is an instance of GremlinDatabase. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource GremlinGraph

class GremlinGraph extends CustomResource

Manages a Gremlin Graph within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleGremlinDatabase = new azure.cosmosdb.GremlinDatabase("exampleGremlinDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
});
const exampleGremlinGraph = new azure.cosmosdb.GremlinGraph("exampleGremlinGraph", {
    resourceGroupName: azurerm_cosmosdb_account.example.resource_group_name,
    accountName: azurerm_cosmosdb_account.example.name,
    databaseName: exampleGremlinDatabase.name,
    partitionKeyPath: "/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",
        ],
    }],
});

constructor

new GremlinGraph(name: string, args: GremlinGraphArgs, opts?: pulumi.CustomResourceOptions)

Create a GremlinGraph resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GremlinGraphState, opts?: pulumi.CustomResourceOptions): GremlinGraph

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is GremlinGraph

Returns true if the given object is an instance of GremlinGraph. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property conflictResolutionPolicies

public conflictResolutionPolicies: pulumi.Output<GremlinGraphConflictResolutionPolicy[]>;

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

property databaseName

public databaseName: pulumi.Output<string>;

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.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property indexPolicies

public indexPolicies: pulumi.Output<GremlinGraphIndexPolicy[]>;

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

property name

public name: pulumi.Output<string>;

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

property partitionKeyPath

public partitionKeyPath: pulumi.Output<string | undefined>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property uniqueKeys

public uniqueKeys: pulumi.Output<GremlinGraphUniqueKey[] | undefined>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource MongoCollection

class MongoCollection extends CustomResource

Manages a Mongo Collection within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleMongoDatabase = new azure.cosmosdb.MongoDatabase("exampleMongoDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
});
const exampleMongoCollection = new azure.cosmosdb.MongoCollection("exampleMongoCollection", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    databaseName: exampleMongoDatabase.name,
    defaultTtlSeconds: "777",
    shardKey: "uniqueKey",
    throughput: 400,
});

constructor

new MongoCollection(name: string, args: MongoCollectionArgs, opts?: pulumi.CustomResourceOptions)

Create a MongoCollection resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MongoCollectionState, opts?: pulumi.CustomResourceOptions): MongoCollection

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is MongoCollection

Returns true if the given object is an instance of MongoCollection. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

property databaseName

public databaseName: pulumi.Output<string>;

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.

property defaultTtlSeconds

public defaultTtlSeconds: pulumi.Output<number | undefined>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property indices

public indices: pulumi.Output<MongoCollectionIndex[] | undefined>;

One or more index blocks as defined below.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property shardKey

public shardKey: pulumi.Output<string | undefined>;

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

property systemIndexes

public systemIndexes: pulumi.Output<MongoCollectionSystemIndex[]>;

One or more systemIndexes blocks as defined below.

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource MongoDatabase

class MongoDatabase extends CustomResource

Manages a Mongo Database within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleMongoDatabase = new azure.cosmosdb.MongoDatabase("exampleMongoDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    throughput: 400,
});

constructor

new MongoDatabase(name: string, args: MongoDatabaseArgs, opts?: pulumi.CustomResourceOptions)

Create a MongoDatabase resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MongoDatabaseState, opts?: pulumi.CustomResourceOptions): MongoDatabase

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is MongoDatabase

Returns true if the given object is an instance of MongoDatabase. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource SqlContainer

class SqlContainer extends CustomResource

Manages a SQL Container within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.cosmosdb.SqlContainer("example", {
    resourceGroupName: azurerm_cosmosdb_account.example.resource_group_name,
    accountName: azurerm_cosmosdb_account.example.name,
    databaseName: azurerm_cosmosdb_sql_database.example.name,
    partitionKeyPath: "/definition/id",
    throughput: 400,
    unique_key: [{
        paths: [
            "/definition/idlong",
            "/definition/idshort",
        ],
    }],
});

constructor

new SqlContainer(name: string, args: SqlContainerArgs, opts?: pulumi.CustomResourceOptions)

Create a SqlContainer resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SqlContainerState, opts?: pulumi.CustomResourceOptions): SqlContainer

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is SqlContainer

Returns true if the given object is an instance of SqlContainer. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property databaseName

public databaseName: pulumi.Output<string>;

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

property defaultTtl

public defaultTtl: pulumi.Output<number>;

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.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property partitionKeyPath

public partitionKeyPath: pulumi.Output<string | undefined>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property uniqueKeys

public uniqueKeys: pulumi.Output<SqlContainerUniqueKey[] | undefined>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource SqlDatabase

class SqlDatabase extends CustomResource

Manages a SQL Database within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("exampleSqlDatabase", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    throughput: 400,
});

constructor

new SqlDatabase(name: string, args: SqlDatabaseArgs, opts?: pulumi.CustomResourceOptions)

Create a SqlDatabase resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SqlDatabaseState, opts?: pulumi.CustomResourceOptions): SqlDatabase

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is SqlDatabase

Returns true if the given object is an instance of SqlDatabase. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Table

class Table extends CustomResource

Manages a Table within a Cosmos DB Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleAccount = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleTable = new azure.cosmosdb.Table("exampleTable", {
    resourceGroupName: exampleAccount.then(exampleAccount => exampleAccount.resourceGroupName),
    accountName: exampleAccount.then(exampleAccount => exampleAccount.name),
    throughput: 400,
});

constructor

new Table(name: string, args: TableArgs, opts?: pulumi.CustomResourceOptions)

Create a Table resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TableState, opts?: pulumi.CustomResourceOptions): Table

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Table

Returns true if the given object is an instance of Table. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountName

public accountName: pulumi.Output<string>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

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

property resourceGroupName

public resourceGroupName: pulumi.Output<string>;

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

property throughput

public throughput: pulumi.Output<number>;

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.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getAccount

getAccount(args: GetAccountArgs, opts?: pulumi.InvokeOptions): Promise<GetAccountResult>

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
export const cosmosdbAccountEndpoint = data.azurerm_cosmosdb_account.jobs.endpoint;

Others

interface AccountArgs

interface AccountArgs

The set of arguments for constructing a Account resource.

property capabilities

capabilities?: pulumi.Input<pulumi.Input<AccountCapability>[]>;

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

property consistencyPolicy

consistencyPolicy: pulumi.Input<AccountConsistencyPolicy>;

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

property enableAutomaticFailover

enableAutomaticFailover?: pulumi.Input<boolean>;

Enable automatic fail over for this Cosmos DB account.

property enableMultipleWriteLocations

enableMultipleWriteLocations?: pulumi.Input<boolean>;

Enable multi-master support for this Cosmos DB account.

property geoLocations

geoLocations: pulumi.Input<pulumi.Input<AccountGeoLocation>[]>;

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

property ipRangeFilter

ipRangeFilter?: pulumi.Input<string>;

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.

property isVirtualNetworkFilterEnabled

isVirtualNetworkFilterEnabled?: pulumi.Input<boolean>;

Enables virtual network filtering for this Cosmos DB account.

property kind

kind?: pulumi.Input<string>;

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.

property location

location?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property offerType

offerType: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property tags

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

A mapping of tags to assign to the resource.

property virtualNetworkRules

virtualNetworkRules?: pulumi.Input<pulumi.Input<AccountVirtualNetworkRule>[]>;

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

interface AccountState

interface AccountState

Input properties used for looking up and filtering Account resources.

property capabilities

capabilities?: pulumi.Input<pulumi.Input<AccountCapability>[]>;

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

property connectionStrings

connectionStrings?: pulumi.Input<pulumi.Input<string>[]>;

A list of connection strings available for this CosmosDB account.

property consistencyPolicy

consistencyPolicy?: pulumi.Input<AccountConsistencyPolicy>;

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

property enableAutomaticFailover

enableAutomaticFailover?: pulumi.Input<boolean>;

Enable automatic fail over for this Cosmos DB account.

property enableMultipleWriteLocations

enableMultipleWriteLocations?: pulumi.Input<boolean>;

Enable multi-master support for this Cosmos DB account.

property endpoint

endpoint?: pulumi.Input<string>;

The endpoint used to connect to the CosmosDB account.

property geoLocations

geoLocations?: pulumi.Input<pulumi.Input<AccountGeoLocation>[]>;

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

property ipRangeFilter

ipRangeFilter?: pulumi.Input<string>;

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.

property isVirtualNetworkFilterEnabled

isVirtualNetworkFilterEnabled?: pulumi.Input<boolean>;

Enables virtual network filtering for this Cosmos DB account.

property kind

kind?: pulumi.Input<string>;

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.

property location

location?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property offerType

offerType?: pulumi.Input<string>;

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

property primaryMasterKey

primaryMasterKey?: pulumi.Input<string>;

The Primary master key for the CosmosDB Account.

property primaryReadonlyMasterKey

primaryReadonlyMasterKey?: pulumi.Input<string>;

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

property readEndpoints

readEndpoints?: pulumi.Input<pulumi.Input<string>[]>;

A list of read endpoints available for this CosmosDB account.

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property secondaryMasterKey

secondaryMasterKey?: pulumi.Input<string>;

The Secondary master key for the CosmosDB Account.

property secondaryReadonlyMasterKey

secondaryReadonlyMasterKey?: pulumi.Input<string>;

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

property tags

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

A mapping of tags to assign to the resource.

property virtualNetworkRules

virtualNetworkRules?: pulumi.Input<pulumi.Input<AccountVirtualNetworkRule>[]>;

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

property writeEndpoints

writeEndpoints?: pulumi.Input<pulumi.Input<string>[]>;

A list of write endpoints available for this CosmosDB account.

interface CassandraKeyspaceArgs

interface CassandraKeyspaceArgs

The set of arguments for constructing a CassandraKeyspace resource.

property accountName

accountName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface CassandraKeyspaceState

interface CassandraKeyspaceState

Input properties used for looking up and filtering CassandraKeyspace resources.

property accountName

accountName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

type CosmosChangeFeedCallback

type CosmosChangeFeedCallback = appservice.Callback<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

Signature of the callback that can receive Cosmos Change Feed notifications.

interface CosmosChangeFeedContext

interface CosmosChangeFeedContext extends Context<appservice.FunctionDefaultResponse>

Data that will be passed along in the context object to the CosmosCallback.

method done

done(err?: Error | string | null, result?: R): void

A callback function that signals to the runtime that your code has completed. If your function is synchronous, you must call context.done at the end of execution. If your function is asynchronous, you should not use this callback.

property bindingData

bindingData: {
    invocationId: string;
    sys: {
        methodName: string;
        utcNow: string;
    };
};

property bindingDefinitions

bindingDefinitions: BindingDefinition[];

Bindings your function uses, as defined in function.json.

property bindings

bindings: {
    items: any[];
};

property executionContext

executionContext: {
    functionDirectory: string;
    functionName: string;
    invocationId: string;
};

property invocationId

invocationId: string;

property log

log: Logger;

Allows you to write streaming function logs. Calling directly allows you to write streaming function logs at the default trace level.

property req

req?: HttpRequest;

HTTP request object. Provided to your function when using HTTP Bindings.

property res

res?: undefined | {[key: string]: any};

HTTP response object. Provided to your function when using HTTP Bindings.

property traceContext

traceContext: TraceContext;

TraceContext information to enable distributed tracing scenarios.

class CosmosChangeFeedSubscription

class CosmosChangeFeedSubscription extends EventSubscription<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>

constructor

new CosmosChangeFeedSubscription(name: string, account: Account, args: CosmosChangeFeedSubscriptionArgs, opts: ComponentResourceOptions)

method getData

protected getData(): Promise<TData>

Retrieves the data produces by [initialize]. The data is immediately available in a derived class’s constructor after the super(...) call to ComponentResource.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method initialize

protected initialize(args: Inputs): Promise<TData>

Can be overridden by a subclass to asynchronously initialize data for this Component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use .getData.

method isInstance

static isInstance(obj: any): obj is ComponentResource

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

registerOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.

ComponentResources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.

property account

account: Account;

property functionApp

public functionApp: CallbackFunctionApp<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface CosmosChangeFeedSubscriptionArgs

interface CosmosChangeFeedSubscriptionArgs extends GetCosmosDBFunctionArgs, CallbackFunctionAppArgs<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>

property account

account?: storageForTypesOnly.Account;

The storage account to use where the zip-file blob for the FunctionApp will be located. If not provided, a new storage account will create. It will be a ‘Standard’, ‘LRS’, ‘StorageV2’ account.

property appSettings

appSettings?: pulumi.Input<{[key: string]: any}>;

A key-value pair of App Settings.

property authSettings

authSettings?: pulumi.Input<FunctionAppAuthSettings>;

A authSettings block as defined below.

property callback

callback?: Callback<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance to use as the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

property callbackFactory

callbackFactory?: CallbackFactory<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance that will be called to produce the function that is the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

This form is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final Azure FunctionApp module is loaded. It can run whatever code it needs, and will end by returning the actual function that the Azure will call into each time the FunctionApp it is is invoked.

property clientAffinityEnabled

clientAffinityEnabled?: pulumi.Input<boolean>;

Should the Function App send session affinity cookies, which route client requests in the same session to the same instance?

property codePathOptions

codePathOptions?: pulumi.runtime.CodePathOptions;

Options to control which files and packages are included with the serialized FunctionApp code.

property collectionName

collectionName: pulumi.Input<string>;

The name of the collection inside the database we are subscribing to.

property connectionStrings

connectionStrings?: pulumi.Input<pulumi.Input<{
    name: pulumi.Input<string>;
    type: pulumi.Input<string>;
    value: pulumi.Input<string>;
}>[]>;

An connection_string block as defined below.

property container

container?: storageForTypesOnly.Container;

The container to use where the zip-file blob for the FunctionApp will be located. If not provided, the root container of the storage account will be used.

property dailyMemoryTimeQuota

dailyMemoryTimeQuota?: pulumi.Input<number>;

The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps under the consumption plan. Defaults to 0.

property databaseName

databaseName: pulumi.Input<string>;

The name of the database we are subscribing to.

property enableBuiltinLogging

enableBuiltinLogging?: pulumi.Input<boolean>;

Should the built-in logging of this Function App be enabled? Defaults to true.

property enabled

enabled?: pulumi.Input<boolean>;

Is the Function App enabled?

property hostSettings

hostSettings?: HostSettings;

Host configuration options.

property httpsOnly

httpsOnly?: pulumi.Input<boolean>;

Can the Function App only be accessed via HTTPS? Defaults to false.

property identity

identity?: pulumi.Input<FunctionAppIdentity>;

An identity block as defined below.

property inputs

inputs?: InputBindingSettings[];

Input bindings.

property location

location?: pulumi.Input<string>;

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

property maxItemsPerInvocation

maxItemsPerInvocation?: pulumi.Input<number>;

When set, it customizes the maximum amount of items received per Function call.

property name

name?: pulumi.Input<string>;

The name of the Function App.

property nodeVersion

nodeVersion?: pulumi.Input<string>;

Controls the value of WEBSITE_NODE_DEFAULT_VERSION in appSettings. If not provided, defaults to ~12.

property osType

osType?: pulumi.Input<string>;

A string indicating the Operating System type for this function app.

property outputs

outputs?: OutputBindingSettings[];

Output bindings.

property plan

plan?: appservice.Plan;

The App Service Plan within which to create this Function App. Changing this forces a new resource to be created.

If not provided, a default “Consumption” plan will be created. See: https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#consumption-plan for more details.

property resourceGroup

resourceGroup?: core.ResourceGroup;

The resource group in which to create the event subscription. [resourceGroup] takes precedence over [resourceGroupName].

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

The name of the resource group in which to create the event subscription. [resourceGroup] takes precedence over [resourceGroupName]. If none of the two is supplied, the resource group of the Cosmos DB Account will be used.

property siteConfig

siteConfig?: pulumi.Input<FunctionAppSiteConfig>;

A site_config object as defined below.

property startFromBeginning

startFromBeginning?: pulumi.Input<boolean>;

When set, it tells the Trigger to start reading changes from the beginning of the history of the collection instead of the current time. This only works the first time the Trigger starts, as in subsequent runs, the checkpoints are already stored. Setting this to true when there are leases already created has no effect.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property version

version?: pulumi.Input<string>;

The runtime version associated with the Function App. Defaults to ~3.

class CosmosDBFunction

class CosmosDBFunction extends Function<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>

Azure Function triggered by a Cosmos DB Change Feed.

constructor

new CosmosDBFunction(name: string, args: CosmosDBFunctionArgs)

property appSettings

public appSettings?: pulumi.Input<{[key: string]: string}>;

Application settings required by the function.

property bindings

public bindings: pulumi.Input<BindingDefinition[]>;

An array of function binding definitions.

property callback

public callback: CallbackArgs<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

Function callback.

property name

public name: string;

Function name.

interface CosmosDBFunctionArgs

interface CosmosDBFunctionArgs extends GetCosmosDBFunctionArgs

property account

account: Account;

CosmosDB Account.

property callback

callback?: Callback<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance to use as the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

property callbackFactory

callbackFactory?: CallbackFactory<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance that will be called to produce the function that is the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

This form is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final Azure FunctionApp module is loaded. It can run whatever code it needs, and will end by returning the actual function that the Azure will call into each time the FunctionApp it is is invoked.

property collectionName

collectionName: pulumi.Input<string>;

The name of the collection inside the database we are subscribing to.

property databaseName

databaseName: pulumi.Input<string>;

The name of the database we are subscribing to.

property inputs

inputs?: InputBindingSettings[];

Input bindings.

property maxItemsPerInvocation

maxItemsPerInvocation?: pulumi.Input<number>;

When set, it customizes the maximum amount of items received per Function call.

property outputs

outputs?: OutputBindingSettings[];

Output bindings.

property startFromBeginning

startFromBeginning?: pulumi.Input<boolean>;

When set, it tells the Trigger to start reading changes from the beginning of the history of the collection instead of the current time. This only works the first time the Trigger starts, as in subsequent runs, the checkpoints are already stored. Setting this to true when there are leases already created has no effect.

interface GetAccountArgs

interface GetAccountArgs

A collection of arguments for invoking getAccount.

property name

name: string;

Specifies the name of the CosmosDB Account.

property resourceGroupName

resourceGroupName: string;

Specifies the name of the resource group in which the CosmosDB Account resides.

interface GetAccountResult

interface GetAccountResult

A collection of values returned by getAccount.

property capabilities

capabilities: GetAccountCapability[];

Capabilities enabled on this Cosmos DB account.

property consistencyPolicies

consistencyPolicies: GetAccountConsistencyPolicy[];

property enableAutomaticFailover

enableAutomaticFailover: boolean;

If automatic failover is enabled for this CosmosDB Account.

property enableMultipleWriteLocations

enableMultipleWriteLocations: boolean;

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

property endpoint

endpoint: string;

The endpoint used to connect to the CosmosDB account.

property geoLocations

geoLocations: GetAccountGeoLocation[];

property id

id: string;

The provider-assigned unique ID for this managed resource.

property ipRangeFilter

ipRangeFilter: string;

The current IP Filter for this CosmosDB account

property isVirtualNetworkFilterEnabled

isVirtualNetworkFilterEnabled: boolean;

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

property kind

kind: string;

The Kind of the CosmosDB account.

property location

location: string;

The name of the Azure region hosting replicated data.

property name

name: string;

property offerType

offerType: string;

The Offer Type to used by this CosmosDB Account.

property primaryMasterKey

primaryMasterKey: string;

The Primary master key for the CosmosDB Account.

property primaryReadonlyMasterKey

primaryReadonlyMasterKey: string;

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

property readEndpoints

readEndpoints: string[];

A list of read endpoints available for this CosmosDB account.

property resourceGroupName

resourceGroupName: string;

property secondaryMasterKey

secondaryMasterKey: string;

The Secondary master key for the CosmosDB Account.

property secondaryReadonlyMasterKey

secondaryReadonlyMasterKey: string;

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

property tags

tags: {[key: string]: string};

A mapping of tags assigned to the resource.

property virtualNetworkRules

virtualNetworkRules: GetAccountVirtualNetworkRule[];

Subnets that are allowed to access this CosmosDB account.

property writeEndpoints

writeEndpoints: string[];

A list of write endpoints available for this CosmosDB account.

interface GetCosmosDBFunctionArgs

interface GetCosmosDBFunctionArgs extends CallbackFunctionArgs<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>

property callback

callback?: Callback<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance to use as the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

property callbackFactory

callbackFactory?: CallbackFactory<CosmosChangeFeedContext, any[], appservice.FunctionDefaultResponse>;

The Javascript function instance that will be called to produce the function that is the entrypoint for the Azure FunctionApp. Either [callback] or [callbackFactory] must be provided.

This form is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final Azure FunctionApp module is loaded. It can run whatever code it needs, and will end by returning the actual function that the Azure will call into each time the FunctionApp it is is invoked.

property collectionName

collectionName: pulumi.Input<string>;

The name of the collection inside the database we are subscribing to.

property databaseName

databaseName: pulumi.Input<string>;

The name of the database we are subscribing to.

property inputs

inputs?: InputBindingSettings[];

Input bindings.

property maxItemsPerInvocation

maxItemsPerInvocation?: pulumi.Input<number>;

When set, it customizes the maximum amount of items received per Function call.

property outputs

outputs?: OutputBindingSettings[];

Output bindings.

property startFromBeginning

startFromBeginning?: pulumi.Input<boolean>;

When set, it tells the Trigger to start reading changes from the beginning of the history of the collection instead of the current time. This only works the first time the Trigger starts, as in subsequent runs, the checkpoints are already stored. Setting this to true when there are leases already created has no effect.

interface GremlinDatabaseArgs

interface GremlinDatabaseArgs

The set of arguments for constructing a GremlinDatabase resource.

property accountName

accountName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface GremlinDatabaseState

interface GremlinDatabaseState

Input properties used for looking up and filtering GremlinDatabase resources.

property accountName

accountName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface GremlinGraphArgs

interface GremlinGraphArgs

The set of arguments for constructing a GremlinGraph resource.

property accountName

accountName: pulumi.Input<string>;

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

property conflictResolutionPolicies

conflictResolutionPolicies: pulumi.Input<pulumi.Input<GremlinGraphConflictResolutionPolicy>[]>;

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

property databaseName

databaseName: pulumi.Input<string>;

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.

property indexPolicies

indexPolicies: pulumi.Input<pulumi.Input<GremlinGraphIndexPolicy>[]>;

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

property name

name?: pulumi.Input<string>;

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

property partitionKeyPath

partitionKeyPath?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

property uniqueKeys

uniqueKeys?: pulumi.Input<pulumi.Input<GremlinGraphUniqueKey>[]>;

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

interface GremlinGraphState

interface GremlinGraphState

Input properties used for looking up and filtering GremlinGraph resources.

property accountName

accountName?: pulumi.Input<string>;

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

property conflictResolutionPolicies

conflictResolutionPolicies?: pulumi.Input<pulumi.Input<GremlinGraphConflictResolutionPolicy>[]>;

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

property databaseName

databaseName?: pulumi.Input<string>;

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.

property indexPolicies

indexPolicies?: pulumi.Input<pulumi.Input<GremlinGraphIndexPolicy>[]>;

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

property name

name?: pulumi.Input<string>;

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

property partitionKeyPath

partitionKeyPath?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

property uniqueKeys

uniqueKeys?: pulumi.Input<pulumi.Input<GremlinGraphUniqueKey>[]>;

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

interface MongoCollectionArgs

interface MongoCollectionArgs

The set of arguments for constructing a MongoCollection resource.

property accountName

accountName: pulumi.Input<string>;

property databaseName

databaseName: pulumi.Input<string>;

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.

property defaultTtlSeconds

defaultTtlSeconds?: pulumi.Input<number>;

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

property indices

indices?: pulumi.Input<pulumi.Input<MongoCollectionIndex>[]>;

One or more index blocks as defined below.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property shardKey

shardKey?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface MongoCollectionState

interface MongoCollectionState

Input properties used for looking up and filtering MongoCollection resources.

property accountName

accountName?: pulumi.Input<string>;

property databaseName

databaseName?: pulumi.Input<string>;

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.

property defaultTtlSeconds

defaultTtlSeconds?: pulumi.Input<number>;

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

property indices

indices?: pulumi.Input<pulumi.Input<MongoCollectionIndex>[]>;

One or more index blocks as defined below.

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property shardKey

shardKey?: pulumi.Input<string>;

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

property systemIndexes

systemIndexes?: pulumi.Input<pulumi.Input<MongoCollectionSystemIndex>[]>;

One or more systemIndexes blocks as defined below.

property throughput

throughput?: pulumi.Input<number>;

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.

interface MongoDatabaseArgs

interface MongoDatabaseArgs

The set of arguments for constructing a MongoDatabase resource.

property accountName

accountName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface MongoDatabaseState

interface MongoDatabaseState

Input properties used for looking up and filtering MongoDatabase resources.

property accountName

accountName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface SqlContainerArgs

interface SqlContainerArgs

The set of arguments for constructing a SqlContainer resource.

property accountName

accountName: pulumi.Input<string>;

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

property databaseName

databaseName: pulumi.Input<string>;

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

property defaultTtl

defaultTtl?: pulumi.Input<number>;

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.

property name

name?: pulumi.Input<string>;

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

property partitionKeyPath

partitionKeyPath?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

property uniqueKeys

uniqueKeys?: pulumi.Input<pulumi.Input<SqlContainerUniqueKey>[]>;

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

interface SqlContainerState

interface SqlContainerState

Input properties used for looking up and filtering SqlContainer resources.

property accountName

accountName?: pulumi.Input<string>;

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

property databaseName

databaseName?: pulumi.Input<string>;

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

property defaultTtl

defaultTtl?: pulumi.Input<number>;

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.

property name

name?: pulumi.Input<string>;

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

property partitionKeyPath

partitionKeyPath?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

property uniqueKeys

uniqueKeys?: pulumi.Input<pulumi.Input<SqlContainerUniqueKey>[]>;

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

interface SqlDatabaseArgs

interface SqlDatabaseArgs

The set of arguments for constructing a SqlDatabase resource.

property accountName

accountName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface SqlDatabaseState

interface SqlDatabaseState

Input properties used for looking up and filtering SqlDatabase resources.

property accountName

accountName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface TableArgs

interface TableArgs

The set of arguments for constructing a Table resource.

property accountName

accountName: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.

interface TableState

interface TableState

Input properties used for looking up and filtering Table resources.

property accountName

accountName?: pulumi.Input<string>;

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

property name

name?: pulumi.Input<string>;

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

property resourceGroupName

resourceGroupName?: pulumi.Input<string>;

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

property throughput

throughput?: pulumi.Input<number>;

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.