Module cosmosdb

@pulumi/azure > cosmosdb

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,
    name: var_resource_group_name,
});
const ri = new random.RandomInteger("ri", {
    max: 99999,
    min: 10000,
});
const db = new azure.cosmosdb.Account("db", {
    consistencyPolicy: {
        consistencyLevel: "BoundedStaleness",
        maxIntervalInSeconds: 10,
        maxStalenessPrefix: 200,
    },
    enableAutomaticFailover: true,
    geoLocations: [
        {
            failoverPriority: 1,
            location: var_failover_location,
        },
        {
            failoverPriority: 0,
            location: rg.location,
            prefix: pulumi.interpolate`tfex-cosmos-db-${ri.result}-customid`,
        },
    ],
    kind: "GlobalDocumentDB",
    location: rg.location,
    name: pulumi.interpolate`tfex-cosmos-db-${ri.result}`,
    offerType: "Standard",
    resourceGroupName: rg.name,
});

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 getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

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

property capabilities

public capabilities: pulumi.Output<{
    name: string;
}[] | 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. If the kind is GlobalDocumentDB, this will be empty.

property consistencyPolicy

public consistencyPolicy: pulumi.Output<{
    consistencyLevel: string;
    maxIntervalInSeconds: undefined | number;
    maxStalenessPrefix: undefined | number;
}>;

Specifies a consistency_policy 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 failoverPolicies

public failoverPolicies: pulumi.Output<{
    id: string;
    location: string;
    priority: number;
}[] | undefined>;

property geoLocations

public geoLocations: pulumi.Output<{
    failoverPriority: number;
    id: string;
    location: string;
    prefix: undefined | string;
}[]>;

Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 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>;

The name of the Azure region to host replicated data.

property name

public name: pulumi.Output<string>;

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

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]: any}>;

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<{
    id: string;
}[] | undefined>;

Specifies a virtual_network_rules 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.

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 exampleAccount = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));
const exampleCassandraKeyspace = new azure.cosmosdb.CassandraKeyspace("example", {
    accountName: exampleAccount.name,
    name: "tfex-cosmos-cassandra-keyspace",
    resourceGroupName: exampleAccount.resourceGroupName,
});

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

static isInstance(obj: any): boolean

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.

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 urn

urn: Output<URN>;

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

class CosmosChangeFeedSubscription

extends EventSubscription<CosmosChangeFeedContext, any[], void>

constructor

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

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

property account

account: Account;

property functionApp

property urn

urn: Output<URN>;

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

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 = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));
const exampleMongoCollection = new azure.cosmosdb.MongoCollection("example", {
    accountName: exampleAccount.name,
    databaseName: exampleAccount.name,
    defaultTtlSeconds: 777,
    indexes: [
        {
            key: "aKey",
            unique: false,
        },
        {
            key: "uniqueKey",
            unique: true,
        },
    ],
    name: "tfex-cosmos-mongo-db",
    resourceGroupName: exampleAccount.resourceGroupName,
    shardKey: "uniqueKey",
});
const exampleMongoDatabase = new azure.cosmosdb.MongoDatabase("example", {
    accountName: exampleAccount.name,
    name: "tfex-cosmos-mongo-db",
    resourceGroupName: exampleAccount.resourceGroupName,
});

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

static isInstance(obj: any): boolean

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.

property accountName

public accountName: pulumi.Output<string>;

property databaseName

public databaseName: pulumi.Output<string>;

property defaultTtlSeconds

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

The default Time To Live in seconds. If the value is -1 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 indexes

public indexes: pulumi.Output<{
    key: string;
    unique: undefined | false | true;
}[] | undefined>;

One or more indexes 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 Cosmos DB Mongo Database 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 urn

urn: Output<URN>;

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

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 = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));
const exampleMongoDatabase = new azure.cosmosdb.MongoDatabase("example", {
    accountName: exampleAccount.name,
    name: "tfex-cosmos-mongo-db",
    resourceGroupName: exampleAccount.resourceGroupName,
});

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

static isInstance(obj: any): boolean

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.

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 urn

urn: Output<URN>;

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

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 = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));
const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("example", {
    accountName: exampleAccount.name,
    name: "tfex-cosmos-mongo-db",
    resourceGroupName: exampleAccount.resourceGroupName,
});

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

static isInstance(obj: any): boolean

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.

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 urn

urn: Output<URN>;

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

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 = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));
const exampleTable = new azure.cosmosdb.Table("example", {
    accountName: exampleAccount.name,
    name: "tfex-cosmos-table",
    resourceGroupName: exampleAccount.resourceGroupName,
});

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

static isInstance(obj: any): boolean

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.

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 urn

urn: Output<URN>;

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

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 test = pulumi.output(azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
}));

export const cosmosdbAccountEndpoint = azurerm_cosmosdb_account_jobs.endpoint;

interface AccountArgs

The set of arguments for constructing a Account resource.

property capabilities

capabilities?: pulumi.Input<pulumi.Input<{
    name: pulumi.Input<string>;
}>[]>;

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<{
    consistencyLevel: pulumi.Input<string>;
    maxIntervalInSeconds: pulumi.Input<number>;
    maxStalenessPrefix: pulumi.Input<number>;
}>;

Specifies a consistency_policy 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 failoverPolicies

failoverPolicies?: pulumi.Input<pulumi.Input<{
    id: pulumi.Input<string>;
    location: pulumi.Input<string>;
    priority: pulumi.Input<number>;
}>[]>;

property geoLocations

geoLocations?: pulumi.Input<pulumi.Input<{
    failoverPriority: pulumi.Input<number>;
    id: pulumi.Input<string>;
    location: pulumi.Input<string>;
    prefix: pulumi.Input<string>;
}>[]>;

Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 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>;

The name of the Azure region to host replicated data.

property name

name?: pulumi.Input<string>;

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

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]: any}>;

A mapping of tags to assign to the resource.

property virtualNetworkRules

virtualNetworkRules?: pulumi.Input<pulumi.Input<{
    id: pulumi.Input<string>;
}>[]>;

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

interface AccountState

Input properties used for looking up and filtering Account resources.

property capabilities

capabilities?: pulumi.Input<pulumi.Input<{
    name: pulumi.Input<string>;
}>[]>;

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. If the kind is GlobalDocumentDB, this will be empty.

property consistencyPolicy

consistencyPolicy?: pulumi.Input<{
    consistencyLevel: pulumi.Input<string>;
    maxIntervalInSeconds: pulumi.Input<number>;
    maxStalenessPrefix: pulumi.Input<number>;
}>;

Specifies a consistency_policy 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 failoverPolicies

failoverPolicies?: pulumi.Input<pulumi.Input<{
    id: pulumi.Input<string>;
    location: pulumi.Input<string>;
    priority: pulumi.Input<number>;
}>[]>;

property geoLocations

geoLocations?: pulumi.Input<pulumi.Input<{
    failoverPriority: pulumi.Input<number>;
    id: pulumi.Input<string>;
    location: pulumi.Input<string>;
    prefix: pulumi.Input<string>;
}>[]>;

Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 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>;

The name of the Azure region to host replicated data.

property name

name?: pulumi.Input<string>;

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

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]: any}>;

A mapping of tags to assign to the resource.

property virtualNetworkRules

virtualNetworkRules?: pulumi.Input<pulumi.Input<{
    id: pulumi.Input<string>;
}>[]>;

Specifies a virtual_network_rules 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

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.

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.

interface CosmosChangeFeedContext

extends Context<void>

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.

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

A collection of values returned by getAccount.

property capabilities

capabilities: {
    name: string;
}[];

Capabilities enabled on this Cosmos DB account.

property consistencyPolicies

consistencyPolicies: {
    consistencyLevel: string;
    maxIntervalInSeconds: number;
    maxStalenessPrefix: number;
}[];

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: {
    failoverPriority: number;
    id: string;
    location: string;
}[];

property id

id: string;

id is 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]: any};

A mapping of tags assigned to the resource.

property virtualNetworkRules

virtualNetworkRules: {
    id: string;
}[];

Subnets that are allowed to access this CosmosDB account.

property writeEndpoints

writeEndpoints: string[];

A list of write endpoints available for this CosmosDB account.

interface MongoCollectionArgs

The set of arguments for constructing a MongoCollection resource.

property accountName

accountName: pulumi.Input<string>;

property databaseName

databaseName: pulumi.Input<string>;

property defaultTtlSeconds

defaultTtlSeconds?: pulumi.Input<number>;

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

property indexes

indexes?: pulumi.Input<pulumi.Input<{
    key: pulumi.Input<string>;
    unique: pulumi.Input<boolean>;
}>[]>;

One or more indexes 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 Cosmos DB Mongo Database 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.

interface MongoCollectionState

Input properties used for looking up and filtering MongoCollection resources.

property accountName

accountName?: pulumi.Input<string>;

property databaseName

databaseName?: pulumi.Input<string>;

property defaultTtlSeconds

defaultTtlSeconds?: pulumi.Input<number>;

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

property indexes

indexes?: pulumi.Input<pulumi.Input<{
    key: pulumi.Input<string>;
    unique: pulumi.Input<boolean>;
}>[]>;

One or more indexes 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 Cosmos DB Mongo Database 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.

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.

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.

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.

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.

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.

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.

type CosmosChangeFeedCallback

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

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

type CosmosChangeFeedSubscriptionArgs

type CosmosChangeFeedSubscriptionArgs = util.Overwrite<appservice.CallbackFunctionAppArgs<CosmosChangeFeedContext, any[], void>, {
    collectionName: pulumi.Input<string>;
    databaseName: pulumi.Input<string>;
    location: pulumi.Input<string>;
    maxItemsPerInvocation: pulumi.Input<number>;
    resourceGroup: core.ResourceGroup;
    resourceGroupName: pulumi.Input<string>;
    startFromBeginning: pulumi.Input<boolean>;
}>;