Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Friday, Jun 10, 2022 by Pulumi

SqlContainer

Manages a SQL Container within a Cosmos DB Account.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Azure.CosmosDB.SqlContainer("example", new Azure.CosmosDB.SqlContainerArgs
        {
            ResourceGroupName = azurerm_cosmosdb_account.Example.Resource_group_name,
            AccountName = azurerm_cosmosdb_account.Example.Name,
            DatabaseName = azurerm_cosmosdb_sql_database.Example.Name,
            PartitionKeyPath = "/definition/id",
            PartitionKeyVersion = 1,
            Throughput = 400,
            IndexingPolicy = new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyArgs
            {
                IndexingMode = "Consistent",
                IncludedPaths = 
                {
                    new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyIncludedPathArgs
                    {
                        Path = "/*",
                    },
                    new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyIncludedPathArgs
                    {
                        Path = "/included/?",
                    },
                },
                ExcludedPaths = 
                {
                    new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyExcludedPathArgs
                    {
                        Path = "/excluded/?",
                    },
                },
            },
            UniqueKeys = 
            {
                new Azure.CosmosDB.Inputs.SqlContainerUniqueKeyArgs
                {
                    Paths = 
                    {
                        "/definition/idlong",
                        "/definition/idshort",
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{
			ResourceGroupName:   pulumi.Any(azurerm_cosmosdb_account.Example.Resource_group_name),
			AccountName:         pulumi.Any(azurerm_cosmosdb_account.Example.Name),
			DatabaseName:        pulumi.Any(azurerm_cosmosdb_sql_database.Example.Name),
			PartitionKeyPath:    pulumi.String("/definition/id"),
			PartitionKeyVersion: pulumi.Int(1),
			Throughput:          pulumi.Int(400),
			IndexingPolicy: &cosmosdb.SqlContainerIndexingPolicyArgs{
				IndexingMode: pulumi.String("Consistent"),
				IncludedPaths: cosmosdb.SqlContainerIndexingPolicyIncludedPathArray{
					&cosmosdb.SqlContainerIndexingPolicyIncludedPathArgs{
						Path: pulumi.String("/*"),
					},
					&cosmosdb.SqlContainerIndexingPolicyIncludedPathArgs{
						Path: pulumi.String("/included/?"),
					},
				},
				ExcludedPaths: cosmosdb.SqlContainerIndexingPolicyExcludedPathArray{
					&cosmosdb.SqlContainerIndexingPolicyExcludedPathArgs{
						Path: pulumi.String("/excluded/?"),
					},
				},
			},
			UniqueKeys: cosmosdb.SqlContainerUniqueKeyArray{
				&cosmosdb.SqlContainerUniqueKeyArgs{
					Paths: pulumi.StringArray{
						pulumi.String("/definition/idlong"),
						pulumi.String("/definition/idshort"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new SqlContainer("example", SqlContainerArgs.builder()        
            .resourceGroupName(azurerm_cosmosdb_account.example().resource_group_name())
            .accountName(azurerm_cosmosdb_account.example().name())
            .databaseName(azurerm_cosmosdb_sql_database.example().name())
            .partitionKeyPath("/definition/id")
            .partitionKeyVersion(1)
            .throughput(400)
            .indexingPolicy(SqlContainerIndexingPolicyArgs.builder()
                .indexingMode("Consistent")
                .includedPaths(                
                    SqlContainerIndexingPolicyIncludedPathArgs.builder()
                        .path("/*")
                        .build(),
                    SqlContainerIndexingPolicyIncludedPathArgs.builder()
                        .path("/included/?")
                        .build())
                .excludedPaths(SqlContainerIndexingPolicyExcludedPathArgs.builder()
                    .path("/excluded/?")
                    .build())
                .build())
            .uniqueKeys(SqlContainerUniqueKeyArgs.builder()
                .paths(                
                    "/definition/idlong",
                    "/definition/idshort")
                .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.cosmosdb.SqlContainer("example",
    resource_group_name=azurerm_cosmosdb_account["example"]["resource_group_name"],
    account_name=azurerm_cosmosdb_account["example"]["name"],
    database_name=azurerm_cosmosdb_sql_database["example"]["name"],
    partition_key_path="/definition/id",
    partition_key_version=1,
    throughput=400,
    indexing_policy=azure.cosmosdb.SqlContainerIndexingPolicyArgs(
        indexing_mode="Consistent",
        included_paths=[
            azure.cosmosdb.SqlContainerIndexingPolicyIncludedPathArgs(
                path="/*",
            ),
            azure.cosmosdb.SqlContainerIndexingPolicyIncludedPathArgs(
                path="/included/?",
            ),
        ],
        excluded_paths=[azure.cosmosdb.SqlContainerIndexingPolicyExcludedPathArgs(
            path="/excluded/?",
        )],
    ),
    unique_keys=[azure.cosmosdb.SqlContainerUniqueKeyArgs(
        paths=[
            "/definition/idlong",
            "/definition/idshort",
        ],
    )])
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",
    partitionKeyVersion: 1,
    throughput: 400,
    indexingPolicy: {
        indexingMode: "Consistent",
        includedPaths: [
            {
                path: "/*",
            },
            {
                path: "/included/?",
            },
        ],
        excludedPaths: [{
            path: "/excluded/?",
        }],
    },
    uniqueKeys: [{
        paths: [
            "/definition/idlong",
            "/definition/idshort",
        ],
    }],
});
resources:
  example:
    type: azure:cosmosdb:SqlContainer
    properties:
      resourceGroupName: ${azurerm_cosmosdb_account.example.resource_group_name}
      accountName: ${azurerm_cosmosdb_account.example.name}
      databaseName: ${azurerm_cosmosdb_sql_database.example.name}
      partitionKeyPath: /definition/id
      partitionKeyVersion: 1
      throughput: 400
      indexingPolicy:
        indexingMode: Consistent
        includedPaths:
          - path: /*
          - path: /included/?
        excludedPaths:
          - path: /excluded/?
      uniqueKeys:
        - paths:
            - /definition/idlong
            - /definition/idshort

Create a SqlContainer Resource

new SqlContainer(name: string, args: SqlContainerArgs, opts?: CustomResourceOptions);
@overload
def SqlContainer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 account_name: Optional[str] = None,
                 analytical_storage_ttl: Optional[int] = None,
                 autoscale_settings: Optional[SqlContainerAutoscaleSettingsArgs] = None,
                 conflict_resolution_policy: Optional[SqlContainerConflictResolutionPolicyArgs] = None,
                 database_name: Optional[str] = None,
                 default_ttl: Optional[int] = None,
                 indexing_policy: Optional[SqlContainerIndexingPolicyArgs] = None,
                 name: Optional[str] = None,
                 partition_key_path: Optional[str] = None,
                 partition_key_version: Optional[int] = None,
                 resource_group_name: Optional[str] = None,
                 throughput: Optional[int] = None,
                 unique_keys: Optional[Sequence[SqlContainerUniqueKeyArgs]] = None)
@overload
def SqlContainer(resource_name: str,
                 args: SqlContainerArgs,
                 opts: Optional[ResourceOptions] = None)
func NewSqlContainer(ctx *Context, name string, args SqlContainerArgs, opts ...ResourceOption) (*SqlContainer, error)
public SqlContainer(string name, SqlContainerArgs args, CustomResourceOptions? opts = null)
public SqlContainer(String name, SqlContainerArgs args)
public SqlContainer(String name, SqlContainerArgs args, CustomResourceOptions options)
type: azure:cosmosdb:SqlContainer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SqlContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args SqlContainerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SqlContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SqlContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SqlContainerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SqlContainer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The SqlContainer resource accepts the following input properties:

AccountName string

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

DatabaseName string

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

PartitionKeyPath string

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

ResourceGroupName string

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

AnalyticalStorageTtl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

AutoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

ConflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

DefaultTtl int

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.

IndexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

Name string

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

PartitionKeyVersion int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

Throughput int

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.

UniqueKeys List<SqlContainerUniqueKeyArgs>

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

AccountName string

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

DatabaseName string

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

PartitionKeyPath string

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

ResourceGroupName string

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

AnalyticalStorageTtl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

AutoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

ConflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

DefaultTtl int

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.

IndexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

Name string

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

PartitionKeyVersion int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

Throughput int

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.

UniqueKeys []SqlContainerUniqueKeyArgs

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

accountName String

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

databaseName String

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

partitionKeyPath String

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

resourceGroupName String

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

analyticalStorageTtl Integer

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

defaultTtl Integer

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.

indexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name String

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

partitionKeyVersion Integer

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

throughput Integer

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.

uniqueKeys List<SqlContainerUniqueKeyArgs>

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

accountName string

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

databaseName string

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

partitionKeyPath string

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

resourceGroupName string

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

analyticalStorageTtl number

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

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

indexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name string

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

partitionKeyVersion number

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

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

uniqueKeys SqlContainerUniqueKeyArgs[]

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

account_name str

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

database_name str

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

partition_key_path str

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

resource_group_name str

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

analytical_storage_ttl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscale_settings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflict_resolution_policy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

default_ttl int

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.

indexing_policy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name str

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

partition_key_version int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

throughput int

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

unique_keys Sequence[SqlContainerUniqueKeyArgs]

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

accountName String

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

databaseName String

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

partitionKeyPath String

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

resourceGroupName String

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

analyticalStorageTtl Number

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings Property Map

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy Property Map

A conflict_resolution_policy blocks as defined below.

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

indexingPolicy Property Map

An indexing_policy block as defined below.

name String

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

partitionKeyVersion Number

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

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

uniqueKeys List<Property Map>

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

Outputs

All input properties are implicitly available as output properties. Additionally, the SqlContainer resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing SqlContainer Resource

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

public static get(name: string, id: Input<ID>, state?: SqlContainerState, opts?: CustomResourceOptions): SqlContainer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_name: Optional[str] = None,
        analytical_storage_ttl: Optional[int] = None,
        autoscale_settings: Optional[SqlContainerAutoscaleSettingsArgs] = None,
        conflict_resolution_policy: Optional[SqlContainerConflictResolutionPolicyArgs] = None,
        database_name: Optional[str] = None,
        default_ttl: Optional[int] = None,
        indexing_policy: Optional[SqlContainerIndexingPolicyArgs] = None,
        name: Optional[str] = None,
        partition_key_path: Optional[str] = None,
        partition_key_version: Optional[int] = None,
        resource_group_name: Optional[str] = None,
        throughput: Optional[int] = None,
        unique_keys: Optional[Sequence[SqlContainerUniqueKeyArgs]] = None) -> SqlContainer
func GetSqlContainer(ctx *Context, name string, id IDInput, state *SqlContainerState, opts ...ResourceOption) (*SqlContainer, error)
public static SqlContainer Get(string name, Input<string> id, SqlContainerState? state, CustomResourceOptions? opts = null)
public static SqlContainer get(String name, Output<String> id, SqlContainerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountName string

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

AnalyticalStorageTtl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

AutoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

ConflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

DatabaseName string

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

DefaultTtl int

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.

IndexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

Name string

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

PartitionKeyPath string

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

PartitionKeyVersion int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

ResourceGroupName string

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

Throughput int

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.

UniqueKeys List<SqlContainerUniqueKeyArgs>

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

AccountName string

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

AnalyticalStorageTtl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

AutoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

ConflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

DatabaseName string

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

DefaultTtl int

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.

IndexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

Name string

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

PartitionKeyPath string

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

PartitionKeyVersion int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

ResourceGroupName string

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

Throughput int

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.

UniqueKeys []SqlContainerUniqueKeyArgs

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

accountName String

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

analyticalStorageTtl Integer

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

databaseName String

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

defaultTtl Integer

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.

indexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name String

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

partitionKeyPath String

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

partitionKeyVersion Integer

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

resourceGroupName String

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

throughput Integer

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.

uniqueKeys List<SqlContainerUniqueKeyArgs>

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

accountName string

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

analyticalStorageTtl number

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

databaseName string

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

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

indexingPolicy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name string

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

partitionKeyPath string

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

partitionKeyVersion number

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

resourceGroupName string

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

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

uniqueKeys SqlContainerUniqueKeyArgs[]

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

account_name str

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

analytical_storage_ttl int

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscale_settings SqlContainerAutoscaleSettingsArgs

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflict_resolution_policy SqlContainerConflictResolutionPolicyArgs

A conflict_resolution_policy blocks as defined below.

database_name str

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

default_ttl int

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.

indexing_policy SqlContainerIndexingPolicyArgs

An indexing_policy block as defined below.

name str

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

partition_key_path str

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

partition_key_version int

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

resource_group_name str

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

throughput int

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

unique_keys Sequence[SqlContainerUniqueKeyArgs]

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

accountName String

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

analyticalStorageTtl Number

The default time to live of Analytical Storage for this SQL container. 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. Changing this forces a new Cosmos DB SQL Container to be created when removing analytical_storage_ttl on an existing Cosmos DB SQL Container.

autoscaleSettings Property Map

An autoscale_settings block as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply. Requires partition_key_path to be set.

conflictResolutionPolicy Property Map

A conflict_resolution_policy blocks as defined below.

databaseName String

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

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

indexingPolicy Property Map

An indexing_policy block as defined below.

name String

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

partitionKeyPath String

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

partitionKeyVersion Number

Define a partition key version. Changing this forces a new resource to be created. Possible values are 1 and 2. This should be set to 2 in order to use large partition keys.

resourceGroupName String

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

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

uniqueKeys List<Property Map>

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

Supporting Types

SqlContainerAutoscaleSettings

MaxThroughput int

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

MaxThroughput int

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput Integer

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput number

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

max_throughput int

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

maxThroughput Number

The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput.

SqlContainerConflictResolutionPolicy

Mode string

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

ConflictResolutionPath string

The conflict resolution path in the case of LastWriterWins mode.

ConflictResolutionProcedure string

The procedure to resolve conflicts in the case of Custom mode.

Mode string

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

ConflictResolutionPath string

The conflict resolution path in the case of LastWriterWins mode.

ConflictResolutionProcedure string

The procedure to resolve conflicts in the case of Custom mode.

mode String

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

conflictResolutionPath String

The conflict resolution path in the case of LastWriterWins mode.

conflictResolutionProcedure String

The procedure to resolve conflicts in the case of Custom mode.

mode string

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

conflictResolutionPath string

The conflict resolution path in the case of LastWriterWins mode.

conflictResolutionProcedure string

The procedure to resolve conflicts in the case of Custom mode.

mode str

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

conflict_resolution_path str

The conflict resolution path in the case of LastWriterWins mode.

conflict_resolution_procedure str

The procedure to resolve conflicts in the case of Custom mode.

mode String

Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom.

conflictResolutionPath String

The conflict resolution path in the case of LastWriterWins mode.

conflictResolutionProcedure String

The procedure to resolve conflicts in the case of Custom mode.

SqlContainerIndexingPolicy

CompositeIndices List<SqlContainerIndexingPolicyCompositeIndex>

One or more composite_index blocks as defined below.

ExcludedPaths List<SqlContainerIndexingPolicyExcludedPath>

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

IncludedPaths List<SqlContainerIndexingPolicyIncludedPath>

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

IndexingMode string

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

SpatialIndices List<SqlContainerIndexingPolicySpatialIndex>

One or more spatial_index blocks as defined below.

CompositeIndices []SqlContainerIndexingPolicyCompositeIndex

One or more composite_index blocks as defined below.

ExcludedPaths []SqlContainerIndexingPolicyExcludedPath

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

IncludedPaths []SqlContainerIndexingPolicyIncludedPath

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

IndexingMode string

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

SpatialIndices []SqlContainerIndexingPolicySpatialIndex

One or more spatial_index blocks as defined below.

compositeIndices List<SqlContainerIndexingPolicyCompositeIndex>

One or more composite_index blocks as defined below.

excludedPaths List<SqlContainerIndexingPolicyExcludedPath>

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

includedPaths List<SqlContainerIndexingPolicyIncludedPath>

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

indexingMode String

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

spatialIndices List<SqlContainerIndexingPolicySpatialIndex>

One or more spatial_index blocks as defined below.

compositeIndices SqlContainerIndexingPolicyCompositeIndex[]

One or more composite_index blocks as defined below.

excludedPaths SqlContainerIndexingPolicyExcludedPath[]

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

includedPaths SqlContainerIndexingPolicyIncludedPath[]

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

indexingMode string

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

spatialIndices SqlContainerIndexingPolicySpatialIndex[]

One or more spatial_index blocks as defined below.

composite_indices Sequence[SqlContainerIndexingPolicyCompositeIndex]

One or more composite_index blocks as defined below.

excluded_paths Sequence[SqlContainerIndexingPolicyExcludedPath]

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

included_paths Sequence[SqlContainerIndexingPolicyIncludedPath]

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

indexing_mode str

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

spatial_indices Sequence[SqlContainerIndexingPolicySpatialIndex]

One or more spatial_index blocks as defined below.

compositeIndices List<Property Map>

One or more composite_index blocks as defined below.

excludedPaths List<Property Map>

One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /*

includedPaths List<Property Map>

One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /*

indexingMode String

Indicates the indexing mode. Possible values include: Consistent and None. Defaults to Consistent.

spatialIndices List<Property Map>

One or more spatial_index blocks as defined below.

SqlContainerIndexingPolicyCompositeIndex

Indices List<SqlContainerIndexingPolicyCompositeIndexIndex>

One or more index blocks as defined below.

Indices []SqlContainerIndexingPolicyCompositeIndexIndex

One or more index blocks as defined below.

indices List<SqlContainerIndexingPolicyCompositeIndexIndex>

One or more index blocks as defined below.

indices SqlContainerIndexingPolicyCompositeIndexIndex[]

One or more index blocks as defined below.

indices Sequence[SqlContainerIndexingPolicyCompositeIndexIndex]

One or more index blocks as defined below.

indices List<Property Map>

One or more index blocks as defined below.

SqlContainerIndexingPolicyCompositeIndexIndex

Order string

Order of the index. Possible values are Ascending or Descending.

Path string

Path for which the indexing behaviour applies to.

Order string

Order of the index. Possible values are Ascending or Descending.

Path string

Path for which the indexing behaviour applies to.

order String

Order of the index. Possible values are Ascending or Descending.

path String

Path for which the indexing behaviour applies to.

order string

Order of the index. Possible values are Ascending or Descending.

path string

Path for which the indexing behaviour applies to.

order str

Order of the index. Possible values are Ascending or Descending.

path str

Path for which the indexing behaviour applies to.

order String

Order of the index. Possible values are Ascending or Descending.

path String

Path for which the indexing behaviour applies to.

SqlContainerIndexingPolicyExcludedPath

Path string

Path that is excluded from indexing.

Path string

Path that is excluded from indexing.

path String

Path that is excluded from indexing.

path string

Path that is excluded from indexing.

path str

Path that is excluded from indexing.

path String

Path that is excluded from indexing.

SqlContainerIndexingPolicyIncludedPath

Path string

Path for which the indexing behaviour applies to.

Path string

Path for which the indexing behaviour applies to.

path String

Path for which the indexing behaviour applies to.

path string

Path for which the indexing behaviour applies to.

path str

Path for which the indexing behaviour applies to.

path String

Path for which the indexing behaviour applies to.

SqlContainerIndexingPolicySpatialIndex

Path string

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

Types List<string>

A set of spatial types of the path.

Path string

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

Types []string

A set of spatial types of the path.

path String

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

types List<String>

A set of spatial types of the path.

path string

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

types string[]

A set of spatial types of the path.

path str

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

types Sequence[str]

A set of spatial types of the path.

path String

Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path.

types List<String>

A set of spatial types of the path.

SqlContainerUniqueKey

Paths List<string>

A list of paths to use for this unique key.

Paths []string

A list of paths to use for this unique key.

paths List<String>

A list of paths to use for this unique key.

paths string[]

A list of paths to use for this unique key.

paths Sequence[str]

A list of paths to use for this unique key.

paths List<String>

A list of paths to use for this unique key.

Import

Cosmos SQL Containers can be imported using the resource id, e.g.

 $ pulumi import azure:cosmosdb/sqlContainer:SqlContainer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/sqlDatabases/database1/containers/container1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.