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:
- Account
Name string - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- Database
Name string - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- Partition
Key List<string>Paths - A list of partition key paths. Changing this forces a new resource to be created.
- Resource
Group 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.
- 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 expiren
seconds after their last modified time. - Autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks 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 expiren
seconds after their last modified time. - Indexing
Policy SqlContainer Indexing Policy - 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.
- Partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - Partition
Key intVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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 List<SqlContainer Unique Key> - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- Account
Name string - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- Database
Name string - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- Partition
Key []stringPaths - A list of partition key paths. Changing this forces a new resource to be created.
- Resource
Group 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.
- 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 expiren
seconds after their last modified time. - Autoscale
Settings SqlContainer Autoscale Settings Args An
autoscale_settings
block 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_policy
blocks 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 expiren
seconds after their last modified time. - Indexing
Policy SqlContainer Indexing Policy Args - 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.
- Partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - Partition
Key intVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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 []SqlContainer Unique Key Args - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name String - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- database
Name String - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- partition
Key List<String>Paths - A list of partition key paths. Changing this forces a new resource to be created.
- resource
Group 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.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy SqlContainer Indexing Policy - 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.
- partition
Key StringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key IntegerVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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. - unique
Keys List<SqlContainer Unique Key> - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name string - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- database
Name string - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- partition
Key string[]Paths - A list of partition key paths. Changing this forces a new resource to be created.
- resource
Group 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.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy SqlContainer Indexing Policy - 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.
- partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key numberVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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. - unique
Keys SqlContainer Unique Key[] - 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_ 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 expiren
seconds after their last modified time. - autoscale_
settings SqlContainer Autoscale Settings Args An
autoscale_settings
block 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_policy
blocks 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 expiren
seconds after their last modified time. - indexing_
policy SqlContainer Indexing Policy Args - 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_ strkind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition_
key_ intversion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name String - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- database
Name String - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- partition
Key List<String>Paths - A list of partition key paths. Changing this forces a new resource to be created.
- resource
Group 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.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings 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.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 Property MapPolicy - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy 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.
- partition
Key StringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key NumberVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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. - unique
Keys 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 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) -> 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.
- Account
Name string - 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 expiren
seconds after their last modified time. - Autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - Database
Name string - 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 expiren
seconds after their last modified time. - Indexing
Policy SqlContainer Indexing Policy - 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.
- Partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - Partition
Key List<string>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
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
forces a new resource to be created.- Resource
Group 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. - Unique
Keys List<SqlContainer Unique Key> - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- Account
Name string - 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 expiren
seconds after their last modified time. - Autoscale
Settings SqlContainer Autoscale Settings Args An
autoscale_settings
block 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_policy
blocks as defined below. Changing this forces a new resource to be created. - Database
Name string - 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 expiren
seconds after their last modified time. - Indexing
Policy SqlContainer Indexing Policy Args - 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.
- Partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - Partition
Key []stringPaths - 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
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
forces a new resource to be created.- Resource
Group 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. - Unique
Keys []SqlContainer Unique Key Args - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name String - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - database
Name String - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy SqlContainer Indexing Policy - 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.
- partition
Key StringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key List<String>Paths - A list of partition key paths. Changing this forces a new resource to be created.
- partition
Key IntegerVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
forces a new resource to be created.- resource
Group 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. - unique
Keys List<SqlContainer Unique Key> - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name string - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings SqlContainer Autoscale Settings An
autoscale_settings
block 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 - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - database
Name string - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy SqlContainer Indexing Policy - 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.
- partition
Key stringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key string[]Paths - A list of partition key paths. Changing this forces a new resource to be created.
- partition
Key numberVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
forces a new resource to be created.- resource
Group 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. - unique
Keys SqlContainer Unique Key[] - 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_ 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 expiren
seconds after their last modified time. - autoscale_
settings SqlContainer Autoscale Settings Args An
autoscale_settings
block 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_policy
blocks 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 expiren
seconds after their last modified time. - indexing_
policy SqlContainer Indexing Policy Args - 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_ strkind - Define a partition key kind. Possible values are
Hash
andMultiHash
. 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
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
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.
- 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_key
blocks as defined below. Changing this forces a new resource to be created.
- account
Name String - The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created.
- analytical
Storage 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 expiren
seconds after their last modified time. - autoscale
Settings 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.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 Property MapPolicy - A
conflict_resolution_policy
blocks as defined below. Changing this forces a new resource to be created. - database
Name String - The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created.
- default
Ttl 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 expiren
seconds after their last modified time. - indexing
Policy 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.
- partition
Key StringKind - Define a partition key kind. Possible values are
Hash
andMultiHash
. Defaults toHash
. Changing this forces a new resource to be created. - partition
Key List<String>Paths - A list of partition key paths. Changing this forces a new resource to be created.
- partition
Key NumberVersion Define a partition key version. Possible values are
1
and2
. This should be set to2
in order to use large partition keys.Note: If
partition_key_version
is not specified when creating a new resource, you can updatepartition_key_version
to1
, updating to2
forces a new resource to be created.- resource
Group 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. - unique
Keys List<Property Map> - One or more
unique_key
blocks as defined below. Changing this forces a new resource to be created.
Supporting Types
SqlContainerAutoscaleSettings, SqlContainerAutoscaleSettingsArgs
- Max
Throughput int - The maximum throughput of the SQL container (RU/s). Must be between
1,000
and1,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,000
and1,000,000
. Must be set in increments of1,000
. Conflicts withthroughput
.
- max
Throughput Integer - The maximum throughput of the SQL container (RU/s). Must be between
1,000
and1,000,000
. Must be set in increments of1,000
. Conflicts withthroughput
.
- max
Throughput number - The maximum throughput of the SQL container (RU/s). Must be between
1,000
and1,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,000
and1,000,000
. Must be set in increments of1,000
. Conflicts withthroughput
.
- max
Throughput Number - The maximum throughput of the SQL container (RU/s). Must be between
1,000
and1,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
. - Conflict
Resolution stringPath - The conflict resolution path in the case of
LastWriterWins
mode. - Conflict
Resolution stringProcedure - The procedure to resolve conflicts in the case of
Custom
mode.
- Mode string
- Indicates the conflict resolution mode. Possible values include:
LastWriterWins
,Custom
. - Conflict
Resolution stringPath - The conflict resolution path in the case of
LastWriterWins
mode. - Conflict
Resolution stringProcedure - The procedure to resolve conflicts in the case of
Custom
mode.
- mode String
- Indicates the conflict resolution mode. Possible values include:
LastWriterWins
,Custom
. - conflict
Resolution StringPath - The conflict resolution path in the case of
LastWriterWins
mode. - conflict
Resolution StringProcedure - The procedure to resolve conflicts in the case of
Custom
mode.
- mode string
- Indicates the conflict resolution mode. Possible values include:
LastWriterWins
,Custom
. - conflict
Resolution stringPath - The conflict resolution path in the case of
LastWriterWins
mode. - conflict
Resolution stringProcedure - 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_ strpath - The conflict resolution path in the case of
LastWriterWins
mode. - conflict_
resolution_ strprocedure - The procedure to resolve conflicts in the case of
Custom
mode.
- mode String
- Indicates the conflict resolution mode. Possible values include:
LastWriterWins
,Custom
. - conflict
Resolution StringPath - The conflict resolution path in the case of
LastWriterWins
mode. - conflict
Resolution StringProcedure - The procedure to resolve conflicts in the case of
Custom
mode.
SqlContainerIndexingPolicy, SqlContainerIndexingPolicyArgs
- Composite
Indices List<SqlContainer Indexing Policy Composite Index> - One or more
composite_index
blocks as defined below. - Excluded
Paths List<SqlContainer Indexing Policy Excluded Path> - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- Included
Paths List<SqlContainer Indexing Policy Included Path> - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- Indexing
Mode string - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - Spatial
Indices List<SqlContainer Indexing Policy Spatial Index> - One or more
spatial_index
blocks as defined below.
- Composite
Indices []SqlContainer Indexing Policy Composite Index - One or more
composite_index
blocks as defined below. - Excluded
Paths []SqlContainer Indexing Policy Excluded Path - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- Included
Paths []SqlContainer Indexing Policy Included Path - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- Indexing
Mode string - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - Spatial
Indices []SqlContainer Indexing Policy Spatial Index - One or more
spatial_index
blocks as defined below.
- composite
Indices List<SqlContainer Indexing Policy Composite Index> - One or more
composite_index
blocks as defined below. - excluded
Paths List<SqlContainer Indexing Policy Excluded Path> - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- included
Paths List<SqlContainer Indexing Policy Included Path> - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- indexing
Mode String - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - spatial
Indices List<SqlContainer Indexing Policy Spatial Index> - One or more
spatial_index
blocks as defined below.
- composite
Indices SqlContainer Indexing Policy Composite Index[] - One or more
composite_index
blocks as defined below. - excluded
Paths SqlContainer Indexing Policy Excluded Path[] - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- included
Paths SqlContainer Indexing Policy Included Path[] - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- indexing
Mode string - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - spatial
Indices SqlContainer Indexing Policy Spatial Index[] - One or more
spatial_index
blocks as defined below.
- composite_
indices Sequence[SqlContainer Indexing Policy Composite Index] - One or more
composite_index
blocks as defined below. - excluded_
paths Sequence[SqlContainer Indexing Policy Excluded Path] - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- included_
paths Sequence[SqlContainer Indexing Policy Included Path] - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- indexing_
mode str - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - spatial_
indices Sequence[SqlContainer Indexing Policy Spatial Index] - One or more
spatial_index
blocks as defined below.
- composite
Indices List<Property Map> - One or more
composite_index
blocks as defined below. - excluded
Paths List<Property Map> - One or more
excluded_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- included
Paths List<Property Map> - One or more
included_path
blocks as defined below. Eitherincluded_path
orexcluded_path
must contain thepath
/*
- indexing
Mode String - Indicates the indexing mode. Possible values include:
consistent
andnone
. Defaults toconsistent
. - spatial
Indices List<Property Map> - One or more
spatial_index
blocks as defined below.
SqlContainerIndexingPolicyCompositeIndex, SqlContainerIndexingPolicyCompositeIndexArgs
- Indices
List<Sql
Container Indexing Policy Composite Index Index> - One or more
index
blocks as defined below.
- Indices
[]Sql
Container Indexing Policy Composite Index Index - One or more
index
blocks as defined below.
- indices
List<Sql
Container Indexing Policy Composite Index Index> - One or more
index
blocks as defined below.
- indices
Sql
Container Indexing Policy Composite Index Index[] - One or more
index
blocks as defined below.
- indices
Sequence[Sql
Container Indexing Policy Composite Index Index] - One or more
index
blocks as defined below.
- indices List<Property Map>
- One or more
index
blocks 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
azurerm
Terraform Provider.