We recommend using Azure Native.
azure.cosmosdb.SqlContainer
Explore with Pulumi AI
Manages a SQL Container within a Cosmos DB Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.cosmosdb.getAccount({
    name: "tfex-cosmosdb-account",
    resourceGroupName: "tfex-cosmosdb-account-rg",
});
const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("example", {
    name: "example-acsd",
    resourceGroupName: example.then(example => example.resourceGroupName),
    accountName: example.then(example => example.name),
});
const exampleSqlContainer = new azure.cosmosdb.SqlContainer("example", {
    name: "example-container",
    resourceGroupName: example.then(example => example.resourceGroupName),
    accountName: example.then(example => example.name),
    databaseName: exampleSqlDatabase.name,
    partitionKeyPaths: ["/definition/id"],
    partitionKeyVersion: 1,
    throughput: 400,
    indexingPolicy: {
        indexingMode: "consistent",
        includedPaths: [
            {
                path: "/*",
            },
            {
                path: "/included/?",
            },
        ],
        excludedPaths: [{
            path: "/excluded/?",
        }],
    },
    uniqueKeys: [{
        paths: [
            "/definition/idlong",
            "/definition/idshort",
        ],
    }],
});
import pulumi
import pulumi_azure as azure
example = azure.cosmosdb.get_account(name="tfex-cosmosdb-account",
    resource_group_name="tfex-cosmosdb-account-rg")
example_sql_database = azure.cosmosdb.SqlDatabase("example",
    name="example-acsd",
    resource_group_name=example.resource_group_name,
    account_name=example.name)
example_sql_container = azure.cosmosdb.SqlContainer("example",
    name="example-container",
    resource_group_name=example.resource_group_name,
    account_name=example.name,
    database_name=example_sql_database.name,
    partition_key_paths=["/definition/id"],
    partition_key_version=1,
    throughput=400,
    indexing_policy={
        "indexing_mode": "consistent",
        "included_paths": [
            {
                "path": "/*",
            },
            {
                "path": "/included/?",
            },
        ],
        "excluded_paths": [{
            "path": "/excluded/?",
        }],
    },
    unique_keys=[{
        "paths": [
            "/definition/idlong",
            "/definition/idshort",
        ],
    }])
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cosmosdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := cosmosdb.LookupAccount(ctx, &cosmosdb.LookupAccountArgs{
			Name:              "tfex-cosmosdb-account",
			ResourceGroupName: "tfex-cosmosdb-account-rg",
		}, nil)
		if err != nil {
			return err
		}
		exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{
			Name:              pulumi.String("example-acsd"),
			ResourceGroupName: pulumi.String(example.ResourceGroupName),
			AccountName:       pulumi.String(example.Name),
		})
		if err != nil {
			return err
		}
		_, err = cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{
			Name:              pulumi.String("example-container"),
			ResourceGroupName: pulumi.String(example.ResourceGroupName),
			AccountName:       pulumi.String(example.Name),
			DatabaseName:      exampleSqlDatabase.Name,
			PartitionKeyPaths: pulumi.StringArray{
				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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.CosmosDB.GetAccount.Invoke(new()
    {
        Name = "tfex-cosmosdb-account",
        ResourceGroupName = "tfex-cosmosdb-account-rg",
    });
    var exampleSqlDatabase = new Azure.CosmosDB.SqlDatabase("example", new()
    {
        Name = "example-acsd",
        ResourceGroupName = example.Apply(getAccountResult => getAccountResult.ResourceGroupName),
        AccountName = example.Apply(getAccountResult => getAccountResult.Name),
    });
    var exampleSqlContainer = new Azure.CosmosDB.SqlContainer("example", new()
    {
        Name = "example-container",
        ResourceGroupName = example.Apply(getAccountResult => getAccountResult.ResourceGroupName),
        AccountName = example.Apply(getAccountResult => getAccountResult.Name),
        DatabaseName = exampleSqlDatabase.Name,
        PartitionKeyPaths = new[]
        {
            "/definition/id",
        },
        PartitionKeyVersion = 1,
        Throughput = 400,
        IndexingPolicy = new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyArgs
        {
            IndexingMode = "consistent",
            IncludedPaths = new[]
            {
                new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyIncludedPathArgs
                {
                    Path = "/*",
                },
                new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyIncludedPathArgs
                {
                    Path = "/included/?",
                },
            },
            ExcludedPaths = new[]
            {
                new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyExcludedPathArgs
                {
                    Path = "/excluded/?",
                },
            },
        },
        UniqueKeys = new[]
        {
            new Azure.CosmosDB.Inputs.SqlContainerUniqueKeyArgs
            {
                Paths = new[]
                {
                    "/definition/idlong",
                    "/definition/idshort",
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.cosmosdb.CosmosdbFunctions;
import com.pulumi.azure.cosmosdb.inputs.GetAccountArgs;
import com.pulumi.azure.cosmosdb.SqlDatabase;
import com.pulumi.azure.cosmosdb.SqlDatabaseArgs;
import com.pulumi.azure.cosmosdb.SqlContainer;
import com.pulumi.azure.cosmosdb.SqlContainerArgs;
import com.pulumi.azure.cosmosdb.inputs.SqlContainerIndexingPolicyArgs;
import com.pulumi.azure.cosmosdb.inputs.SqlContainerUniqueKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = CosmosdbFunctions.getAccount(GetAccountArgs.builder()
            .name("tfex-cosmosdb-account")
            .resourceGroupName("tfex-cosmosdb-account-rg")
            .build());
        var exampleSqlDatabase = new SqlDatabase("exampleSqlDatabase", SqlDatabaseArgs.builder()
            .name("example-acsd")
            .resourceGroupName(example.applyValue(getAccountResult -> getAccountResult.resourceGroupName()))
            .accountName(example.applyValue(getAccountResult -> getAccountResult.name()))
            .build());
        var exampleSqlContainer = new SqlContainer("exampleSqlContainer", SqlContainerArgs.builder()
            .name("example-container")
            .resourceGroupName(example.applyValue(getAccountResult -> getAccountResult.resourceGroupName()))
            .accountName(example.applyValue(getAccountResult -> getAccountResult.name()))
            .databaseName(exampleSqlDatabase.name())
            .partitionKeyPaths("/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());
    }
}
resources:
  exampleSqlDatabase:
    type: azure:cosmosdb:SqlDatabase
    name: example
    properties:
      name: example-acsd
      resourceGroupName: ${example.resourceGroupName}
      accountName: ${example.name}
  exampleSqlContainer:
    type: azure:cosmosdb:SqlContainer
    name: example
    properties:
      name: example-container
      resourceGroupName: ${example.resourceGroupName}
      accountName: ${example.name}
      databaseName: ${exampleSqlDatabase.name}
      partitionKeyPaths:
        - /definition/id
      partitionKeyVersion: 1
      throughput: 400
      indexingPolicy:
        indexingMode: consistent
        includedPaths:
          - path: /*
          - path: /included/?
        excludedPaths:
          - path: /excluded/?
      uniqueKeys:
        - paths:
            - /definition/idlong
            - /definition/idshort
variables:
  example:
    fn::invoke:
      function: azure:cosmosdb:getAccount
      arguments:
        name: tfex-cosmosdb-account
        resourceGroupName: tfex-cosmosdb-account-rg
Create SqlContainer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlContainer(name: string, args: SqlContainerArgs, opts?: CustomResourceOptions);@overload
def SqlContainer(resource_name: str,
                 args: SqlContainerArgs,
                 opts: Optional[ResourceOptions] = None)
@overload
def SqlContainer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 database_name: Optional[str] = None,
                 resource_group_name: Optional[str] = None,
                 partition_key_paths: Optional[Sequence[str]] = None,
                 account_name: Optional[str] = None,
                 conflict_resolution_policy: Optional[SqlContainerConflictResolutionPolicyArgs] = None,
                 default_ttl: Optional[int] = None,
                 indexing_policy: Optional[SqlContainerIndexingPolicyArgs] = None,
                 name: Optional[str] = None,
                 partition_key_kind: Optional[str] = None,
                 autoscale_settings: Optional[SqlContainerAutoscaleSettingsArgs] = None,
                 partition_key_version: Optional[int] = None,
                 analytical_storage_ttl: Optional[int] = None,
                 throughput: Optional[int] = None,
                 unique_keys: Optional[Sequence[SqlContainerUniqueKeyArgs]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var sqlContainerResource = new Azure.CosmosDB.SqlContainer("sqlContainerResource", new()
{
    DatabaseName = "string",
    ResourceGroupName = "string",
    PartitionKeyPaths = new[]
    {
        "string",
    },
    AccountName = "string",
    ConflictResolutionPolicy = new Azure.CosmosDB.Inputs.SqlContainerConflictResolutionPolicyArgs
    {
        Mode = "string",
        ConflictResolutionPath = "string",
        ConflictResolutionProcedure = "string",
    },
    DefaultTtl = 0,
    IndexingPolicy = new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyArgs
    {
        CompositeIndices = new[]
        {
            new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyCompositeIndexArgs
            {
                Indices = new[]
                {
                    new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyCompositeIndexIndexArgs
                    {
                        Order = "string",
                        Path = "string",
                    },
                },
            },
        },
        ExcludedPaths = new[]
        {
            new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyExcludedPathArgs
            {
                Path = "string",
            },
        },
        IncludedPaths = new[]
        {
            new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicyIncludedPathArgs
            {
                Path = "string",
            },
        },
        IndexingMode = "string",
        SpatialIndices = new[]
        {
            new Azure.CosmosDB.Inputs.SqlContainerIndexingPolicySpatialIndexArgs
            {
                Path = "string",
                Types = new[]
                {
                    "string",
                },
            },
        },
    },
    Name = "string",
    PartitionKeyKind = "string",
    AutoscaleSettings = new Azure.CosmosDB.Inputs.SqlContainerAutoscaleSettingsArgs
    {
        MaxThroughput = 0,
    },
    PartitionKeyVersion = 0,
    AnalyticalStorageTtl = 0,
    Throughput = 0,
    UniqueKeys = new[]
    {
        new Azure.CosmosDB.Inputs.SqlContainerUniqueKeyArgs
        {
            Paths = new[]
            {
                "string",
            },
        },
    },
});
example, err := cosmosdb.NewSqlContainer(ctx, "sqlContainerResource", &cosmosdb.SqlContainerArgs{
	DatabaseName:      pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	PartitionKeyPaths: pulumi.StringArray{
		pulumi.String("string"),
	},
	AccountName: pulumi.String("string"),
	ConflictResolutionPolicy: &cosmosdb.SqlContainerConflictResolutionPolicyArgs{
		Mode:                        pulumi.String("string"),
		ConflictResolutionPath:      pulumi.String("string"),
		ConflictResolutionProcedure: pulumi.String("string"),
	},
	DefaultTtl: pulumi.Int(0),
	IndexingPolicy: &cosmosdb.SqlContainerIndexingPolicyArgs{
		CompositeIndices: cosmosdb.SqlContainerIndexingPolicyCompositeIndexArray{
			&cosmosdb.SqlContainerIndexingPolicyCompositeIndexArgs{
				Indices: cosmosdb.SqlContainerIndexingPolicyCompositeIndexIndexArray{
					&cosmosdb.SqlContainerIndexingPolicyCompositeIndexIndexArgs{
						Order: pulumi.String("string"),
						Path:  pulumi.String("string"),
					},
				},
			},
		},
		ExcludedPaths: cosmosdb.SqlContainerIndexingPolicyExcludedPathArray{
			&cosmosdb.SqlContainerIndexingPolicyExcludedPathArgs{
				Path: pulumi.String("string"),
			},
		},
		IncludedPaths: cosmosdb.SqlContainerIndexingPolicyIncludedPathArray{
			&cosmosdb.SqlContainerIndexingPolicyIncludedPathArgs{
				Path: pulumi.String("string"),
			},
		},
		IndexingMode: pulumi.String("string"),
		SpatialIndices: cosmosdb.SqlContainerIndexingPolicySpatialIndexArray{
			&cosmosdb.SqlContainerIndexingPolicySpatialIndexArgs{
				Path: pulumi.String("string"),
				Types: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	Name:             pulumi.String("string"),
	PartitionKeyKind: pulumi.String("string"),
	AutoscaleSettings: &cosmosdb.SqlContainerAutoscaleSettingsArgs{
		MaxThroughput: pulumi.Int(0),
	},
	PartitionKeyVersion:  pulumi.Int(0),
	AnalyticalStorageTtl: pulumi.Int(0),
	Throughput:           pulumi.Int(0),
	UniqueKeys: cosmosdb.SqlContainerUniqueKeyArray{
		&cosmosdb.SqlContainerUniqueKeyArgs{
			Paths: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
})
var sqlContainerResource = new SqlContainer("sqlContainerResource", SqlContainerArgs.builder()
    .databaseName("string")
    .resourceGroupName("string")
    .partitionKeyPaths("string")
    .accountName("string")
    .conflictResolutionPolicy(SqlContainerConflictResolutionPolicyArgs.builder()
        .mode("string")
        .conflictResolutionPath("string")
        .conflictResolutionProcedure("string")
        .build())
    .defaultTtl(0)
    .indexingPolicy(SqlContainerIndexingPolicyArgs.builder()
        .compositeIndices(SqlContainerIndexingPolicyCompositeIndexArgs.builder()
            .indices(SqlContainerIndexingPolicyCompositeIndexIndexArgs.builder()
                .order("string")
                .path("string")
                .build())
            .build())
        .excludedPaths(SqlContainerIndexingPolicyExcludedPathArgs.builder()
            .path("string")
            .build())
        .includedPaths(SqlContainerIndexingPolicyIncludedPathArgs.builder()
            .path("string")
            .build())
        .indexingMode("string")
        .spatialIndices(SqlContainerIndexingPolicySpatialIndexArgs.builder()
            .path("string")
            .types("string")
            .build())
        .build())
    .name("string")
    .partitionKeyKind("string")
    .autoscaleSettings(SqlContainerAutoscaleSettingsArgs.builder()
        .maxThroughput(0)
        .build())
    .partitionKeyVersion(0)
    .analyticalStorageTtl(0)
    .throughput(0)
    .uniqueKeys(SqlContainerUniqueKeyArgs.builder()
        .paths("string")
        .build())
    .build());
sql_container_resource = azure.cosmosdb.SqlContainer("sqlContainerResource",
    database_name="string",
    resource_group_name="string",
    partition_key_paths=["string"],
    account_name="string",
    conflict_resolution_policy={
        "mode": "string",
        "conflict_resolution_path": "string",
        "conflict_resolution_procedure": "string",
    },
    default_ttl=0,
    indexing_policy={
        "composite_indices": [{
            "indices": [{
                "order": "string",
                "path": "string",
            }],
        }],
        "excluded_paths": [{
            "path": "string",
        }],
        "included_paths": [{
            "path": "string",
        }],
        "indexing_mode": "string",
        "spatial_indices": [{
            "path": "string",
            "types": ["string"],
        }],
    },
    name="string",
    partition_key_kind="string",
    autoscale_settings={
        "max_throughput": 0,
    },
    partition_key_version=0,
    analytical_storage_ttl=0,
    throughput=0,
    unique_keys=[{
        "paths": ["string"],
    }])
const sqlContainerResource = new azure.cosmosdb.SqlContainer("sqlContainerResource", {
    databaseName: "string",
    resourceGroupName: "string",
    partitionKeyPaths: ["string"],
    accountName: "string",
    conflictResolutionPolicy: {
        mode: "string",
        conflictResolutionPath: "string",
        conflictResolutionProcedure: "string",
    },
    defaultTtl: 0,
    indexingPolicy: {
        compositeIndices: [{
            indices: [{
                order: "string",
                path: "string",
            }],
        }],
        excludedPaths: [{
            path: "string",
        }],
        includedPaths: [{
            path: "string",
        }],
        indexingMode: "string",
        spatialIndices: [{
            path: "string",
            types: ["string"],
        }],
    },
    name: "string",
    partitionKeyKind: "string",
    autoscaleSettings: {
        maxThroughput: 0,
    },
    partitionKeyVersion: 0,
    analyticalStorageTtl: 0,
    throughput: 0,
    uniqueKeys: [{
        paths: ["string"],
    }],
});
type: azure:cosmosdb:SqlContainer
properties:
    accountName: string
    analyticalStorageTtl: 0
    autoscaleSettings:
        maxThroughput: 0
    conflictResolutionPolicy:
        conflictResolutionPath: string
        conflictResolutionProcedure: string
        mode: string
    databaseName: string
    defaultTtl: 0
    indexingPolicy:
        compositeIndices:
            - indices:
                - order: string
                  path: string
        excludedPaths:
            - path: string
        includedPaths:
            - path: string
        indexingMode: string
        spatialIndices:
            - path: string
              types:
                - string
    name: string
    partitionKeyKind: string
    partitionKeyPaths:
        - string
    partitionKeyVersion: 0
    resourceGroupName: string
    throughput: 0
    uniqueKeys:
        - paths:
            - string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- PartitionKey List<string>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created.
- AnalyticalStorage intTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- AutoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- ConflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- IndexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- Name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- PartitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- PartitionKey intVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- UniqueKeys List<SqlContainer Unique Key> 
- One or more unique_keyblocks 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.
- PartitionKey []stringPaths 
- A list of partition key paths. Changing this forces a new resource to be created.
- ResourceGroup stringName 
- The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created.
- AnalyticalStorage intTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- AutoscaleSettings SqlContainer Autoscale Settings Args 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- ConflictResolution SqlPolicy Container Conflict Resolution Policy Args 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- IndexingPolicy SqlContainer Indexing Policy Args 
- An indexing_policyblock as defined below.
- Name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- PartitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- PartitionKey intVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- UniqueKeys []SqlContainer Unique Key Args 
- One or more unique_keyblocks 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.
- partitionKey List<String>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created.
- analyticalStorage IntegerTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- name String
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey StringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey IntegerVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- uniqueKeys List<SqlContainer Unique Key> 
- One or more unique_keyblocks 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.
- partitionKey string[]Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- resourceGroup stringName 
- The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created.
- analyticalStorage numberTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey numberVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- uniqueKeys SqlContainer Unique Key[] 
- One or more unique_keyblocks 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_ Sequence[str]paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- resource_group_ strname 
- 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_ intttl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscale_settings SqlContainer Autoscale Settings Args 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflict_resolution_ Sqlpolicy Container Conflict Resolution Policy Args 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- indexing_policy SqlContainer Indexing Policy Args 
- An indexing_policyblock 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_ strkind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partition_key_ intversion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- unique_keys Sequence[SqlContainer Unique Key Args] 
- One or more unique_keyblocks 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.
- partitionKey List<String>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- resourceGroup StringName 
- The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created.
- analyticalStorage NumberTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings Property Map
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution Property MapPolicy 
- A conflict_resolution_policyblocks as defined below. 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy Property Map
- An indexing_policyblock as defined below.
- name String
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey StringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey NumberVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces 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 is400. 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_keyblocks 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 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_kind: Optional[str] = None,
        partition_key_paths: Optional[Sequence[str]] = None,
        partition_key_version: Optional[int] = None,
        resource_group_name: Optional[str] = None,
        throughput: Optional[int] = None,
        unique_keys: Optional[Sequence[SqlContainerUniqueKeyArgs]] = None) -> SqlContainerfunc 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)resources:  _:    type: azure:cosmosdb:SqlContainer    get:      id: ${id}- 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.
- AccountName string
- The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- AnalyticalStorage intTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- AutoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- ConflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- IndexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- Name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- PartitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- PartitionKey List<string>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- PartitionKey intVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- ResourceGroup stringName 
- 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- UniqueKeys List<SqlContainer Unique Key> 
- One or more unique_keyblocks 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.
- AnalyticalStorage intTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- AutoscaleSettings SqlContainer Autoscale Settings Args 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- ConflictResolution SqlPolicy Container Conflict Resolution Policy Args 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- IndexingPolicy SqlContainer Indexing Policy Args 
- An indexing_policyblock as defined below.
- Name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- PartitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- PartitionKey []stringPaths 
- A list of partition key paths. Changing this forces a new resource to be created.
- PartitionKey intVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- ResourceGroup stringName 
- 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- UniqueKeys []SqlContainer Unique Key Args 
- One or more unique_keyblocks 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.
- analyticalStorage IntegerTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- name String
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey StringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey List<String>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- partitionKey IntegerVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- resourceGroup StringName 
- 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- uniqueKeys List<SqlContainer Unique Key> 
- One or more unique_keyblocks 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.
- analyticalStorage numberTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings SqlContainer Autoscale Settings 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution SqlPolicy Container Conflict Resolution Policy 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy SqlContainer Indexing Policy 
- An indexing_policyblock as defined below.
- name string
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey stringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey string[]Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- partitionKey numberVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- resourceGroup stringName 
- 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- uniqueKeys SqlContainer Unique Key[] 
- One or more unique_keyblocks 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_ intttl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscale_settings SqlContainer Autoscale Settings Args 
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflict_resolution_ Sqlpolicy Container Conflict Resolution Policy Args 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- indexing_policy SqlContainer Indexing Policy Args 
- An indexing_policyblock 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_ strkind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partition_key_ Sequence[str]paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- partition_key_ intversion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- resource_group_ strname 
- 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 is400. This must be set upon container creation otherwise it cannot be updated without a manual resource destroy-apply.
- unique_keys Sequence[SqlContainer Unique Key Args] 
- One or more unique_keyblocks 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.
- analyticalStorage NumberTtl 
- 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 numbern– items will expirenseconds after their last modified time.
- autoscaleSettings Property Map
- An - autoscale_settingsblock as defined below. This must be set upon database creation otherwise it cannot be updated without a manual destroy-apply.- Note: Switching between autoscale and manual throughput is not supported via this provider and must be completed via the Azure Portal and refreshed. 
- conflictResolution Property MapPolicy 
- A conflict_resolution_policyblocks as defined below. 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.
- 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 numbern– items will expirenseconds after their last modified time.
- indexingPolicy Property Map
- An indexing_policyblock as defined below.
- name String
- Specifies the name of the Cosmos DB SQL Container. Changing this forces a new resource to be created.
- partitionKey StringKind 
- Define a partition key kind. Possible values are HashandMultiHash. Defaults toHash. Changing this forces a new resource to be created.
- partitionKey List<String>Paths 
- A list of partition key paths. Changing this forces a new resource to be created.
- partitionKey NumberVersion 
- Define a partition key version. Possible values are - 1and- 2. This should be set to- 2in order to use large partition keys.- Note: If - partition_key_versionis not specified when creating a new resource, you can update- partition_key_versionto- 1, updating to- 2forces a new resource to be created.
- resourceGroup StringName 
- 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 is400. 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_keyblocks as defined below. Changing this forces a new resource to be created.
Supporting Types
SqlContainerAutoscaleSettings, SqlContainerAutoscaleSettingsArgs        
- MaxThroughput int
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
- MaxThroughput int
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
- maxThroughput Integer
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
- maxThroughput number
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
- max_throughput int
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
- maxThroughput Number
- The maximum throughput of the SQL container (RU/s). Must be between 1,000and1,000,000. Must be set in increments of1,000. Conflicts withthroughput.
SqlContainerConflictResolutionPolicy, SqlContainerConflictResolutionPolicyArgs          
- Mode string
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- ConflictResolution stringPath 
- The conflict resolution path in the case of LastWriterWinsmode.
- ConflictResolution stringProcedure 
- The procedure to resolve conflicts in the case of Custommode.
- Mode string
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- ConflictResolution stringPath 
- The conflict resolution path in the case of LastWriterWinsmode.
- ConflictResolution stringProcedure 
- The procedure to resolve conflicts in the case of Custommode.
- mode String
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- conflictResolution StringPath 
- The conflict resolution path in the case of LastWriterWinsmode.
- conflictResolution StringProcedure 
- The procedure to resolve conflicts in the case of Custommode.
- mode string
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- conflictResolution stringPath 
- The conflict resolution path in the case of LastWriterWinsmode.
- conflictResolution stringProcedure 
- The procedure to resolve conflicts in the case of Custommode.
- mode str
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- conflict_resolution_ strpath 
- The conflict resolution path in the case of LastWriterWinsmode.
- conflict_resolution_ strprocedure 
- The procedure to resolve conflicts in the case of Custommode.
- mode String
- Indicates the conflict resolution mode. Possible values include: LastWriterWins,Custom.
- conflictResolution StringPath 
- The conflict resolution path in the case of LastWriterWinsmode.
- conflictResolution StringProcedure 
- The procedure to resolve conflicts in the case of Custommode.
SqlContainerIndexingPolicy, SqlContainerIndexingPolicyArgs        
- CompositeIndices List<SqlContainer Indexing Policy Composite Index> 
- One or more composite_indexblocks as defined below.
- ExcludedPaths List<SqlContainer Indexing Policy Excluded Path> 
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- IncludedPaths List<SqlContainer Indexing Policy Included Path> 
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- IndexingMode string
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- SpatialIndices List<SqlContainer Indexing Policy Spatial Index> 
- One or more spatial_indexblocks as defined below.
- CompositeIndices []SqlContainer Indexing Policy Composite Index 
- One or more composite_indexblocks as defined below.
- ExcludedPaths []SqlContainer Indexing Policy Excluded Path 
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- IncludedPaths []SqlContainer Indexing Policy Included Path 
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- IndexingMode string
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- SpatialIndices []SqlContainer Indexing Policy Spatial Index 
- One or more spatial_indexblocks as defined below.
- compositeIndices List<SqlContainer Indexing Policy Composite Index> 
- One or more composite_indexblocks as defined below.
- excludedPaths List<SqlContainer Indexing Policy Excluded Path> 
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- includedPaths List<SqlContainer Indexing Policy Included Path> 
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- indexingMode String
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- spatialIndices List<SqlContainer Indexing Policy Spatial Index> 
- One or more spatial_indexblocks as defined below.
- compositeIndices SqlContainer Indexing Policy Composite Index[] 
- One or more composite_indexblocks as defined below.
- excludedPaths SqlContainer Indexing Policy Excluded Path[] 
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- includedPaths SqlContainer Indexing Policy Included Path[] 
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- indexingMode string
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- spatialIndices SqlContainer Indexing Policy Spatial Index[] 
- One or more spatial_indexblocks as defined below.
- composite_indices Sequence[SqlContainer Indexing Policy Composite Index] 
- One or more composite_indexblocks as defined below.
- excluded_paths Sequence[SqlContainer Indexing Policy Excluded Path] 
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- included_paths Sequence[SqlContainer Indexing Policy Included Path] 
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- indexing_mode str
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- spatial_indices Sequence[SqlContainer Indexing Policy Spatial Index] 
- One or more spatial_indexblocks as defined below.
- compositeIndices List<Property Map>
- One or more composite_indexblocks as defined below.
- excludedPaths List<Property Map>
- One or more excluded_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- includedPaths List<Property Map>
- One or more included_pathblocks as defined below. Eitherincluded_pathorexcluded_pathmust contain thepath/*
- indexingMode String
- Indicates the indexing mode. Possible values include: consistentandnone. Defaults toconsistent.
- spatialIndices List<Property Map>
- One or more spatial_indexblocks as defined below.
SqlContainerIndexingPolicyCompositeIndex, SqlContainerIndexingPolicyCompositeIndexArgs            
- Indices
List<SqlContainer Indexing Policy Composite Index Index> 
- One or more indexblocks as defined below.
- Indices
[]SqlContainer Indexing Policy Composite Index Index 
- One or more indexblocks as defined below.
- indices
List<SqlContainer Indexing Policy Composite Index Index> 
- One or more indexblocks as defined below.
- indices
SqlContainer Indexing Policy Composite Index Index[] 
- One or more indexblocks as defined below.
- indices
Sequence[SqlContainer Indexing Policy Composite Index Index] 
- One or more indexblocks as defined below.
- indices List<Property Map>
- One or more indexblocks as defined below.
SqlContainerIndexingPolicyCompositeIndexIndex, SqlContainerIndexingPolicyCompositeIndexIndexArgs              
SqlContainerIndexingPolicyExcludedPath, SqlContainerIndexingPolicyExcludedPathArgs            
- 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, SqlContainerIndexingPolicyIncludedPathArgs            
- 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, SqlContainerIndexingPolicySpatialIndexArgs            
SqlContainerUniqueKey, SqlContainerUniqueKeyArgs        
- Paths List<string>
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
- Paths []string
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
- paths List<String>
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
- paths string[]
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
- paths Sequence[str]
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
- paths List<String>
- A list of paths to use for this unique key. Changing this forces a new resource to be created.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.