diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/cosmos-db.json index 3869245b52d4..06a012220cdd 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/cosmos-db.json @@ -7277,12 +7277,13 @@ } }, "kind": { - "description": "Indicates the kind of algorithm used for partitioning", + "description": "Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create", "type": "string", "default": "Hash", "enum": [ "Hash", - "Range" + "Range", + "MultiHash" ], "x-ms-enum": { "name": "PartitionKind", @@ -7295,6 +7296,11 @@ "minimum": 1, "maximum": 2, "format": "int32" + }, + "systemKey": { + "description": "Indicates if the container is using a system generated partition key", + "type": "boolean", + "readOnly": true } } }, diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/examples/CosmosDBSqlContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/examples/CosmosDBSqlContainerList.json index ee6c02f788fe..a3cbe8031f0d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/examples/CosmosDBSqlContainerList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2021-01-15/examples/CosmosDBSqlContainerList.json @@ -66,6 +66,124 @@ "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" } } + }, + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName1", + "name": "containerName1", + "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers", + "location": "West US", + "tags": {}, + "properties": { + "resource": { + "id": "testctn1", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber", + "/AccountLocation" + ], + "kind": "MultiHash", + "version": 2 + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDiw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + }, + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName2", + "name": "containerName2", + "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/sqlContainers", + "location": "West US", + "tags": {}, + "properties": { + "resource": { + "id": "testctn2", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/_partitionKey" + ], + "kind": "Hash", + "version": 2, + "systemKey": true + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDhw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } } ] }