sql_containers
Creates, updates, deletes, gets or lists a sql_containers
resource.
Overview
Name | sql_containers |
Type | Resource |
Id | azure.cosmos_db.sql_containers |
Fields
- vw_sql_containers
- sql_containers
Name | Datatype | Description |
---|---|---|
id | text | The unique resource identifier of the ARM resource. |
name | text | The name of the ARM resource. |
accountName | text | field from the properties object |
containerName | text | field from the properties object |
databaseName | text | field from the properties object |
identity | text | Identity for the resource. |
location | text | The location of the resource group to which the resource belongs. |
options | text | field from the properties object |
resource | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". |
type | text | The type of Azure resource. |
Name | Datatype | Description |
---|---|---|
id | string | The unique resource identifier of the ARM resource. |
name | string | The name of the ARM resource. |
identity | object | Identity for the resource. |
location | string | The location of the resource group to which the resource belongs. |
properties | object | The properties of an Azure Cosmos DB container |
tags | object | Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". |
type | string | The type of Azure resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, containerName, databaseName, resourceGroupName, subscriptionId | Gets the SQL container under an existing Azure Cosmos DB database account. |
list | SELECT | accountName, databaseName, resourceGroupName, subscriptionId | Lists the SQL container under an existing Azure Cosmos DB database account. |
create_update | INSERT | accountName, containerName, databaseName, resourceGroupName, subscriptionId, data__properties | Create or update an Azure Cosmos DB SQL container |
delete | DELETE | accountName, containerName, databaseName, resourceGroupName, subscriptionId | Deletes an existing Azure Cosmos DB SQL container. |
SELECT
examples
Lists the SQL container under an existing Azure Cosmos DB database account.
- vw_sql_containers
- sql_containers
SELECT
id,
name,
accountName,
containerName,
databaseName,
identity,
location,
options,
resource,
resourceGroupName,
subscriptionId,
tags,
type
FROM azure.cosmos_db.vw_sql_containers
WHERE accountName = '{{ accountName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
identity,
location,
properties,
tags,
type
FROM azure.cosmos_db.sql_containers
WHERE accountName = '{{ accountName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sql_containers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.cosmos_db.sql_containers (
accountName,
containerName,
databaseName,
resourceGroupName,
subscriptionId,
data__properties,
properties,
location,
tags,
identity
)
SELECT
'{{ accountName }}',
'{{ containerName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: resource
value:
- name: id
value: string
- name: indexingPolicy
value:
- name: automatic
value: boolean
- name: indexingMode
value: string
- name: includedPaths
value:
- - name: path
value: string
- name: indexes
value:
- - name: dataType
value: string
- name: precision
value: integer
- name: kind
value: string
- name: excludedPaths
value:
- - name: path
value: string
- name: compositeIndexes
value:
- []
- name: spatialIndexes
value:
- - name: path
value: string
- name: types
value:
- []
- name: partitionKey
value:
- name: paths
value:
- []
- name: kind
value: string
- name: version
value: integer
- name: systemKey
value: boolean
- name: defaultTtl
value: integer
- name: uniqueKeyPolicy
value:
- name: uniqueKeys
value:
- - name: paths
value:
- []
- name: conflictResolutionPolicy
value:
- name: mode
value: string
- name: conflictResolutionPath
value: string
- name: conflictResolutionProcedure
value: string
- name: clientEncryptionPolicy
value:
- name: includedPaths
value:
- - name: path
value: string
- name: clientEncryptionKeyId
value: string
- name: encryptionType
value: string
- name: encryptionAlgorithm
value: string
- name: policyFormatVersion
value: integer
- name: analyticalStorageTtl
value: integer
- name: restoreParameters
value:
- name: restoreSource
value: string
- name: restoreTimestampInUtc
value: string
- name: restoreWithTtlDisabled
value: boolean
- name: createMode
value: []
- name: materializedViewDefinition
value:
- name: sourceCollectionRid
value: string
- name: sourceCollectionId
value: string
- name: definition
value: string
- name: computedProperties
value:
- - name: name
value: string
- name: query
value: string
- name: options
value:
- name: throughput
value: integer
- name: autoscaleSettings
value:
- name: maxThroughput
value: integer
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: []
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- name: userAssignedIdentities
value: object
DELETE
example
Deletes the specified sql_containers
resource.
/*+ delete */
DELETE FROM azure.cosmos_db.sql_containers
WHERE accountName = '{{ accountName }}'
AND containerName = '{{ containerName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';