diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/cosmos-db.json index b0d4c3b3298e..0c50a1b0640f 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/cosmos-db.json @@ -1368,494 +1368,2915 @@ "nextLinkName": null } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases": { + "get": { + "operationId": "DatabaseAccounts_ListSqlDatabases", + "x-ms-examples": { + "CosmosDBSqlDatabaseList": { "$ref": "./examples/CosmosDBSqlDatabaseList.json" } + }, + "description": "Lists the SQL databases under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The SQL database properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/SqlDatabaseListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}": { + "get": { + "operationId": "DatabaseAccounts_GetSqlDatabase", + "x-ms-examples": { + "CosmosDBSqlDatabaseGet": { "$ref": "./examples/CosmosDBSqlDatabaseGet.json" } + }, + "description": "Gets the SQL databases under an existing Azure Cosmos DB database account with the provided id.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The SQL database property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/SqlDatabase" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateSqlDatabase", + "x-ms-examples": { + "CosmosDBSqlDatabaseCreateUpdate": { "$ref": "./examples/CosmosDBSqlDatabaseCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB SQL database", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateSqlDatabaseParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SqlDatabaseCreateUpdateParameters" + }, + "description": "The parameters to provide for the current SQL database." + } + ], + "responses": { + "202": { + "description": "The SQL database create or update operation will complete asynchronously." + }, + "200": { + "description": "The SQL database create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/SqlDatabase" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteSqlDatabase", + "x-ms-examples": { + "CosmosDBSqlDatabaseDelete": { "$ref": "./examples/CosmosDBSqlDatabaseDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB SQL database.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The SQL database delete operation will complete asynchronously." + }, + "204": { + "description": "The SQL database delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers": { + "get": { + "operationId": "DatabaseAccounts_ListSqlContainers", + "x-ms-examples": { + "CosmosDBSqlContainerList": { "$ref": "./examples/CosmosDBSqlContainerList.json" } + }, + "description": "Lists the SQL container under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The SQL container properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/ContainerListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers/{containerRid}": { + "get": { + "operationId": "DatabaseAccounts_GetSqlContainer", + "x-ms-examples": { + "CosmosDBSqlContainerGet": { "$ref": "./examples/CosmosDBSqlContainerGet.json" } + }, + "description": "Gets the SQL container under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The SQL container property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/Container" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateSqlContainer", + "x-ms-examples": { + "CosmosDBSqlContainerCreateUpdate": { "$ref": "./examples/CosmosDBSqlContainerCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB SQL container", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateSqlContainerParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerCreateUpdateParameters" + }, + "description": "The parameters to provide for the current SQL container." + } + ], + "responses": { + "202": { + "description": "The SQL container create or update operation will complete asynchronously." + }, + "200": { + "description": "The SQL container create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/Container" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteSqlContainer", + "x-ms-examples": { + "CosmosDBSqlContainerDelete": { "$ref": "./examples/CosmosDBSqlContainerDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB SQL container.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The SQL contianer delete operation will complete asynchronously." + }, + "204": { + "description": "The SQL contianer delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases": { + "get": { + "operationId": "DatabaseAccounts_ListMongoDatabases", + "x-ms-examples": { + "CosmosDBMongoDatabaseList": { "$ref": "./examples/CosmosDBMongoDatabaseList.json" } + }, + "description": "Lists the Mongo databases under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Mongo database properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/MongoDatabaseListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}": { + "get": { + "operationId": "DatabaseAccounts_GetMongoDatabase", + "x-ms-examples": { + "CosmosDBMongoDatabaseGet": { "$ref": "./examples/CosmosDBMongoDatabaseGet.json" } + }, + "description": "Gets the Mongo databases under an existing Azure Cosmos DB database account with the provided id.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Mongo database property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/MongoDatabase" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateMongoDatabase", + "x-ms-examples": { + "CosmosDBMongoDatabaseCreateUpdate": { "$ref": "./examples/CosmosDBMongoDatabaseCreateUpdate.json" } + }, + "description": "Create or updates Azure Cosmos DB Mongo database", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateMongoDatabaseParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MongoDatabaseCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Mongo database." + } + ], + "responses": { + "202": { + "description": "The Mongo database create or update operation will complete asynchronously." + }, + "200": { + "description": "The Mongo database create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/MongoDatabase" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteMongoDatabase", + "x-ms-examples": { + "CosmosDBMongoDatabaseDelete": { "$ref": "./examples/CosmosDBMongoDatabaseDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Mongo database.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Mongo database delete operation will complete asynchronously." + }, + "204": { + "description": "The Mongo database delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections": { + "get": { + "operationId": "DatabaseAccounts_ListMongoCollections", + "x-ms-examples": { + "CosmosDBMongoCollectionList": { "$ref": "./examples/CosmosDBMongoCollectionList.json" } + }, + "description": "Lists the Mongo collection under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Mongo collection properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/MongoCollectionListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections/{collectionRid}": { + "get": { + "operationId": "DatabaseAccounts_GetMongoCollection", + "x-ms-examples": { + "CosmosDBMongoCollectionGet": { "$ref": "./examples/CosmosDBMongoCollectionGet.json" } + }, + "description": "Gets the Mongo collection under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/collectionRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Mongo collection property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/MongoCollection" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateMongoCollection", + "x-ms-examples": { + "CosmosDBMongoCollectionCreateUpdate": { "$ref": "./examples/CosmosDBMongoCollectionCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Mongo Collection", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/collectionRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateMongoCollectionParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/MongoCollectionCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Mongo Collection." + } + ], + "responses": { + "202": { + "description": "The Mongo Collection create or update operation will complete asynchronously." + }, + "200": { + "description": "The Mongo Collection create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/MongoCollection" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteMongoCollection", + "x-ms-examples": { + "CosmosDBMongoCollectionDelete": { "$ref": "./examples/CosmosDBMongoCollectionDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Mongo Collection.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/collectionRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Mongo collection delete operation will complete asynchronously." + }, + "204": { + "description": "The Mongo collection delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables": { + "get": { + "operationId": "DatabaseAccounts_ListTables", + "x-ms-examples": { + "CosmosDBTableList": { "$ref": "./examples/CosmosDBTableList.json" } + }, + "description": "Lists the Tables under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Table properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/TableListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableRid}": { + "get": { + "operationId": "DatabaseAccounts_GetTable", + "x-ms-examples": { + "CosmosDBTableGet": { "$ref": "./examples/CosmosDBTableGet.json" } + }, + "description": "Gets the Tables under an existing Azure Cosmos DB database account with the provided id.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Table property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/Table" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateTable", + "x-ms-examples": { + "CosmosDBTableReplace": { "$ref": "./examples/CosmosDBTableCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Table", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateTableParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TableCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Table." + } + ], + "responses": { + "202": { + "description": "The Table create or update operation will complete asynchronously." + }, + "200": { + "description": "The Table create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/Table" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteTable", + "x-ms-examples": { + "CosmosDBTableDelete": { "$ref": "./examples/CosmosDBTableDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Table.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Table delete operation will complete asynchronously." + }, + "204": { + "description": "The Table delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces": { + "get": { + "operationId": "DatabaseAccounts_ListCassandraKeyspaces", + "x-ms-examples": { + "CosmosDBCassandraKeyspaceList": { "$ref": "./examples/CosmosDBCassandraKeyspaceList.json" } + }, + "description": "Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Cassandra keyspace properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/CassandraKeyspaceListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}": { + "get": { + "operationId": "DatabaseAccounts_GetCassandraKeyspace", + "x-ms-examples": { + "CosmosDBCassandraKeyspaceGet": { "$ref": "./examples/CosmosDBCassandraKeyspaceGet.json" } + }, + "description": "Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided id.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Cassandra keyspace property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/CassandraKeyspace" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateCassandraKeyspace", + "x-ms-examples": { + "CosmosDBCassandraKeyspaceCreateUpdate": { "$ref": "./examples/CosmosDBCassandraKeyspaceCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Cassandra keyspace", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateCassandraKeyspaceParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CassandraKeyspaceCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Cassandra keyspace." + } + ], + "responses": { + "202": { + "description": "The Cassandra keyspace create or update operation will complete asynchronously." + }, + "200": { + "description": "The Cassandra keyspace create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/CassandraKeyspace" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteCassandraKeyspace", + "x-ms-examples": { + "CosmosDBCassandraKeyspaceDelete": { "$ref": "./examples/CosmosDBCassandraKeyspaceDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Cassandra keyspace.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Cassandra keyspace delete operation will complete asynchronously." + }, + "204": { + "description": "The Cassandra keyspace delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables": { + "get": { + "operationId": "DatabaseAccounts_ListCassandraTables", + "x-ms-examples": { + "CosmosDBCassandraTableList": { "$ref": "./examples/CosmosDBCassandraTableList.json" } + }, + "description": "Lists the Cassandra table under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Cassandra table properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/CassandraTableListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables/{tableRid}": { + "get": { + "operationId": "DatabaseAccounts_GetCassandraTable", + "x-ms-examples": { + "CosmosDBCassandraTableGet": { "$ref": "./examples/CosmosDBCassandraTableGet.json" } + }, + "description": "Gets the Cassandra table under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Cassandra table property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/CassandraTable" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateCassandraTable", + "x-ms-examples": { + "CosmosDBCassandraTableCreateUpdate": { "$ref": "./examples/CosmosDBCassandraTableCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Cassandra Table", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateCassandraTableParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CassandraTableCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Cassandra Table." + } + ], + "responses": { + "202": { + "description": "The Cassandra Table create or update operation will complete asynchronously." + }, + "200": { + "description": "The Cassandra Table create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/CassandraTable" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteCassandraTable", + "x-ms-examples": { + "CosmosDBCassandraTableDelete": { "$ref": "./examples/CosmosDBCassandraTableDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Cassandra table.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/keyspaceRidParameter" + }, + { + "$ref": "#/parameters/tableRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Cassandra table delete operation will complete asynchronously." + }, + "204": { + "description": "The Cassandra table delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases": { + "get": { + "operationId": "DatabaseAccounts_ListGremlinDatabases", + "x-ms-examples": { + "CosmosDBGremlinDatabaseList": { "$ref": "./examples/CosmosDBGremlinDatabaseList.json" } + }, + "description": "Lists the Gremlin databases under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Gremlin database properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/GremlinDatabaseListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}": { + "get": { + "operationId": "DatabaseAccounts_GetGremlinDatabase", + "x-ms-examples": { + "CosmosDBGremlinDatabaseGet": { "$ref": "./examples/CosmosDBGremlinDatabaseGet.json" } + }, + "description": "Gets the Gremlin databases under an existing Azure Cosmos DB database account with the provided id.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Gremlin database property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/GremlinDatabase" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateGremlinDatabase", + "x-ms-examples": { + "CosmosDBGremlinDatabaseCreateUpdate": { "$ref": "./examples/CosmosDBGremlinDatabaseCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Gremlin database", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateGremlinDatabaseParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GremlinDatabaseCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Gremlin database." + } + ], + "responses": { + "202": { + "description": "The Gremlin database create or update operation will complete asynchronously." + }, + "200": { + "description": "The Gremlin database create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/GremlinDatabase" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteGremlinDatabase", + "x-ms-examples": { + "CosmosDBGremlinDatabaseDelete": { "$ref": "./examples/CosmosDBGremlinDatabaseDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Gremlin database.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Gremlin database delete operation will complete asynchronously." + }, + "204": { + "description": "The Gremlin database delete operation was completed successfully." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers": { + "get": { + "operationId": "DatabaseAccounts_ListGremlinContainers", + "x-ms-examples": { + "CosmosDBGremlinContainerList": { "$ref": "./examples/CosmosDBGremlinContainerList.json" } + }, + "description": "Lists the Gremlin container under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Gremlin container properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/ContainerListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers/{containerRid}": { + "get": { + "operationId": "DatabaseAccounts_GetGremlinContainer", + "x-ms-examples": { + "CosmosDBGremlinContainerGet": { "$ref": "./examples/CosmosDBGremlinContainerGet.json" } + }, + "description": "Gets the Gremlin container under an existing Azure Cosmos DB database account.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Gremlin container property was retrieved successfully.", + "schema": { + "$ref": "#/definitions/Container" + } + } + } + }, + "put": { + "operationId": "DatabaseAccounts_CreateUpdateGremlinContainer", + "x-ms-examples": { + "CosmosDBGremlinContainerCreateUpdate": { "$ref": "./examples/CosmosDBGremlinContainerCreateUpdate.json" } + }, + "description": "Create or update an Azure Cosmos DB Gremlin container", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "name": "createUpdateGremlinContainerParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerCreateUpdateParameters" + }, + "description": "The parameters to provide for the current Gremlin container." + } + ], + "responses": { + "202": { + "description": "The Gremlin container create or update operation will complete asynchronously." + }, + "200": { + "description": "The Gremlin container create or update operation was completed successfully.", + "schema": { + "$ref": "#/definitions/Container" + } + } + } + }, + "delete": { + "operationId": "DatabaseAccounts_DeleteGremlinContainer", + "x-ms-examples": { + "CosmosDBGremlinContainerDelete": { "$ref": "./examples/CosmosDBGremlinContainerDelete.json" } + }, + "description": "Deletes an existing Azure Cosmos DB Gremlin container.", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseRidParameter" + }, + { + "$ref": "#/parameters/containerRidParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "202": { + "description": "The Gremlin contianer delete operation will complete asynchronously." + }, + "204": { + "description": "The Gremlin contianer delete operation was completed successfully." + } + } + } } }, "definitions": { "DatabaseAccountsListResult": { "properties": { - "value": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseAccount" + }, + "description": "List of database account and their properties." + } + }, + "description": "The List operation response, that contains the database accounts and their properties." + }, + "SqlDatabaseListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/SqlDatabase" + }, + "description": "List of SQL databases and their properties." + } + }, + "description": "The List operation response, that contains the SQL databases and their properties." + }, + "ContainerListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Container" + }, + "description": "List of containers and their properties." + } + }, + "description": "The List operation response, that contains the containers and their properties." + }, + "MongoDatabaseListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/MongoDatabase" + }, + "description": "List of Mongo databases and their properties." + } + }, + "description": "The List operation response, that contains the Mongo databases and their properties." + }, + "MongoCollectionListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/MongoCollection" + }, + "description": "List of Mongo collections and their properties." + } + }, + "description": "The List operation response, that contains the Mongo collections and their properties." + }, + "TableListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Table" + }, + "description": "List of Table and their properties." + } + }, + "description": "The List operation response, that contains the Table and their properties." + }, + "CassandraKeyspaceListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/CassandraKeyspace" + }, + "description": "List of Cassandra keyspaces and their properties." + } + }, + "description": "The List operation response, that contains the Cassandra keyspaces and their properties." + }, + "CassandraTableListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/CassandraTable" + }, + "description": "List of Cassandra tables and their properties." + } + }, + "description": "The List operation response, that contains the Cassandra tables and their properties." + }, + "GremlinDatabaseListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/GremlinDatabase" + }, + "description": "List of Gremlin databases and their properties." + } + }, + "description": "The List operation response, that contains the Gremlin databases and their properties." + }, + "ErrorResponse": { + "properties": { + "code": { + "description": "Error code.", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + }, + "description": "Error Response." + }, + "FailoverPolicies": { + "properties": { + "failoverPolicies": { + "type": "array", + "description": "List of failover policies.", + "items": { + "$ref": "#/definitions/FailoverPolicy" + } + } + }, + "required": [ + "failoverPolicies" + ], + "description": "The list of new failover policies for the failover priority change." + }, + "FailoverPolicy": { + "type": "object", + "description": "The failover policy for a given region of a database account.", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>." + }, + "locationName": { + "type": "string", + "description": "The name of the region in which the database account exists." + }, + "failoverPriority": { + "type": "integer", + "minimum": 0, + "format": "int32", + "description": "The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists." + } + } + }, + "RegionForOnlineOffline": { + "properties": { + "region": { + "type": "string", + "description": "Cosmos DB region, with spaces between words and each word capitalized." + } + }, + "required": [ + "region" + ], + "description": "Cosmos DB region to online or offline." + }, + "Location": { + "description": "A region in which the Azure Cosmos DB database account is deployed.", + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The unique identifier of the region within the database account. Example: <accountName>-<locationName>." + }, + "locationName": { + "type": "string", + "description": "The name of the region." + }, + "documentEndpoint": { + "type": "string", + "readOnly": true, + "description": "The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" + }, + "failoverPriority": { + "description": "The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.", + "format": "int32", + "type": "integer", + "minimum": 0 + } + } + }, + "Resource": { + "type": "object", + "description": "The core properties of ARM resources.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The unique resource identifier of the database account." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the database account." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of Azure resource." + }, + "location": { + "type": "string", + "description": "The location of the resource group to which the resource belongs." + }, + "tags": { + "$ref": "#/definitions/Tags" + } + }, + "x-ms-azure-resource": true + }, + "DatabaseAccount": { + "description": "An Azure Cosmos DB database account.", + "type": "object", + "properties": { + "kind": { + "description": "Indicates the type of database account. This can only be set at database account creation.", + "type": "string", + "default": "GlobalDocumentDB", + "enum": [ + "GlobalDocumentDB", + "MongoDB", + "Parse" + ], + "x-ms-enum": { + "name": "DatabaseAccountKind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseAccountProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ExtendedResourceProperties": { + "description": "The system generated resource properties associated with SQL databases and SQL containers.", + "type": "object", + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier." + }, + "_ts": { + "description": "A system generated property that denotes the last updated timestamp of the resource." + }, + "_etag": { + "type": "string", + "description": "A system generated property representing the resource etag required for optimistic concurrency control." + } + } + }, + "SqlDatabase":{ + "description": "An Azure Cosmos DB SQL database.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB SQL database", + "$ref": "#/definitions/SqlDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "SqlDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB SQL database", + "type": "object", + "properties": { + "_colls": { + "type": "string", + "description": "A system generated property that specified the addressable path of the collections resource." + }, + "_users": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the users resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/SqlDatabaseResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + }, + "GremlinDatabase": { + "description": "An Azure Cosmos DB Gremlin database.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB SQL database", + "$ref": "#/definitions/GremlinDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "GremlinDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB SQL database", + "type": "object", + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier." + }, + "_ts": { + "description": "A system generated property that denotes the last updated timestamp of the resource." + }, + "_etag": { + "type": "string", + "description": "A system generated property representing the resource etag required for optimistic concurrency control." + } + }, + "allOf": [ + { + "$ref": "#/definitions/GremlinDatabaseResource" + } + ] + }, + "Container":{ + "description": "An Azure Cosmos DB container.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB container", + "$ref": "#/definitions/ContainerProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ContainerProperties": { + "description": "The properties of an Azure Cosmos DB container", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ContainerResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + }, + "MongoDatabase": { + "description": "An Azure Cosmos DB Mongo database.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB Mongo database", + "$ref": "#/definitions/MongoDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "MongoDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB Mongo database", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/MongoDatabaseResource" + } + ] + }, + "MongoCollection": { + "description": "An Azure Cosmos DB Mongo collection.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB Mongo collection", + "$ref": "#/definitions/MongoCollectionProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "MongoCollectionProperties": { + "description": "The properties of an Azure Cosmos DB Mongo collection", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/MongoCollectionResource" + } + ] + }, + "Table": { + "description": "An Azure Cosmos DB Table.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB Table", + "$ref": "#/definitions/TableProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TableProperties": { + "description": "The properties of an Azure Cosmos Table", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TableResource" + } + ] + }, + "CassandraKeyspace": { + "description": "An Azure Cosmos DB Cassandra keyspace.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB Cassandra keyspace", + "$ref": "#/definitions/CassandraKeyspaceProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "CassandraKeyspaceProperties": { + "description": "The properties of an Azure Cosmos DB Cassandra keyspace", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CassandraKeyspaceResource" + } + ] + }, + "CassandraTable": { + "description": "An Azure Cosmos DB Cassandra table.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB Cassandra table", + "$ref": "#/definitions/CassandraTableProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "CassandraTableProperties": { + "description": "The properties of an Azure Cosmos DB Cassandra table", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CassandraTableResource" + } + ] + }, + "ConsistencyPolicy": { + "type": "object", + "description": "The consistency policy for the Cosmos DB database account.", + "properties": { + "defaultConsistencyLevel": { + "description": "The default consistency level and configuration settings of the Cosmos DB account.", + "type": "string", + "enum": [ + "Eventual", + "Session", + "BoundedStaleness", + "Strong", + "ConsistentPrefix" + ], + "x-ms-enum": { + "name": "DefaultConsistencyLevel", + "modelAsString": false + } + }, + "maxStalenessPrefix": { + "description": "When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.", + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "format": "int64" + }, + "maxIntervalInSeconds": { + "description": "When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.", + "type": "integer", + "minimum": 5, + "maximum": 86400, + "format": "int32" + } + }, + "required": [ + "defaultConsistencyLevel" + ] + }, + "DatabaseAccountProperties": { + "description": "Properties for the database account.", + "type": "object", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" + }, + "documentEndpoint": { + "description": "The connection endpoint for the Cosmos DB database account.", + "type": "string", + "readOnly": true + }, + "databaseAccountOfferType": { + "description": "The offer type for the Cosmos DB database account. Default value: Standard.", + "readOnly": true, + "$ref": "#/definitions/DatabaseAccountOfferType" + }, + "ipRangeFilter": { + "description": "Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.", + "$ref": "#/definitions/IPRangeFilter" + }, + "isVirtualNetworkFilterEnabled": { + "description": "Flag to indicate whether to enable/disable Virtual Network ACL rules.", + "type": "boolean" + }, + "enableAutomaticFailover": { + "description": "Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.", + "type": "boolean" + }, + "consistencyPolicy": { + "description": "The consistency policy for the Cosmos DB database account.", + "$ref": "#/definitions/ConsistencyPolicy" + }, + "capabilities": { + "type": "array", + "description": "List of Cosmos DB capabilities for the account", + "items": { + "$ref": "#/definitions/Capability" + } + }, + "writeLocations": { + "type": "array", + "readOnly": true, + "description": "An array that contains the write location for the Cosmos DB account.", + "items": { + "$ref": "#/definitions/Location" + } + }, + "readLocations": { + "type": "array", + "readOnly": true, + "description": "An array that contains of the read locations enabled for the Cosmos DB account.", + "items": { + "$ref": "#/definitions/Location" + } + }, + "failoverPolicies": { + "type": "array", + "readOnly": true, + "description": "An array that contains the regions ordered by their failover priorities.", + "items": { + "$ref": "#/definitions/FailoverPolicy" + } + }, + "virtualNetworkRules": { + "type": "array", + "description": "List of Virtual Network ACL rules configured for the Cosmos DB account.", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "enableMultipleWriteLocations": { + "description": "Enables the account to write in multiple locations", + "type": "boolean" + } + } + }, + "DatabaseAccountPatchProperties": { + "description": "Properties to update Azure Cosmos DB database accounts.", + "type": "object", + "properties": { + "capabilities": { + "type": "array", + "description": "List of Cosmos DB capabilities for the account", + "items": { + "$ref": "#/definitions/Capability" + } + } + } + }, + "DatabaseAccountCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB database accounts.", + "type": "object", + "properties": { + "consistencyPolicy": { + "description": "The consistency policy for the Cosmos DB account.", + "$ref": "#/definitions/ConsistencyPolicy" + }, + "locations": { + "type": "array", + "description": "An array that contains the georeplication locations enabled for the Cosmos DB account.", + "items": { + "$ref": "#/definitions/Location" + } + }, + "databaseAccountOfferType": { + "description": "The offer type for the database", + "$ref": "#/definitions/DatabaseAccountOfferType" + }, + "ipRangeFilter": { + "description": "Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.", + "$ref": "#/definitions/IPRangeFilter" + }, + "isVirtualNetworkFilterEnabled": { + "description": "Flag to indicate whether to enable/disable Virtual Network ACL rules.", + "type": "boolean" + }, + "enableAutomaticFailover": { + "description": "Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.", + "type": "boolean" + }, + "capabilities": { + "type": "array", + "description": "List of Cosmos DB capabilities for the account", + "items": { + "$ref": "#/definitions/Capability" + } + }, + "virtualNetworkRules": { + "type": "array", + "description": "List of Virtual Network ACL rules configured for the Cosmos DB account.", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "enableMultipleWriteLocations": { + "description": "Enables the account to write in multiple locations", + "type": "boolean" + } + }, + "required": [ + "locations", + "databaseAccountOfferType" + ] + }, + "DatabaseAccountCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB database accounts.", + "type": "object", + "properties": { + "kind": { + "description": "Indicates the type of database account. This can only be set at database account creation.", + "type": "string", + "default": "GlobalDocumentDB", + "enum": [ + "GlobalDocumentDB", + "MongoDB", + "Parse" + ], + "x-ms-enum": { + "name": "DatabaseAccountKind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseAccountCreateUpdateProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "required": [ + "properties" + ] + }, + "DatabaseAccountPatchParameters": { + "description": "Parameters for patching Azure Cosmos DB database account properties.", + "type": "object", + "properties": { + "tags": { + "$ref": "#/definitions/Tags" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseAccountPatchProperties" + } + } + }, + "DatabaseAccountListReadOnlyKeysResult": { + "description": "The read-only access keys for the given database account.", + "properties": { + "primaryReadonlyMasterKey": { + "readOnly": true, + "type": "string", + "description": "Base 64 encoded value of the primary read-only key." + }, + "secondaryReadonlyMasterKey": { + "readOnly": true, + "type": "string", + "description": "Base 64 encoded value of the secondary read-only key." + } + } + }, + "DatabaseAccountListKeysResult": { + "description": "The access keys for the given database account.", + "properties": { + "primaryMasterKey": { + "readOnly": true, + "type": "string", + "description": "Base 64 encoded value of the primary read-write key." + }, + "secondaryMasterKey": { + "readOnly": true, + "type": "string", + "description": "Base 64 encoded value of the secondary read-write key." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseAccountListReadOnlyKeysResult" + } + } + }, + "DatabaseAccountConnectionString": { + "description": "Connection string for the Cosmos DB account", + "properties": { + "connectionString": { + "readOnly": true, + "type": "string", + "description": "Value of the connection string" + }, + "description": { "readOnly": true, + "type": "string", + "description": "Description of the connection string" + } + } + }, + "DatabaseAccountListConnectionStringsResult": { + "description": "The connection strings for the given database account.", + "properties": { + "connectionStrings": { "type": "array", + "description": "An array that contains the connection strings for the Cosmos DB account.", "items": { - "$ref": "#/definitions/DatabaseAccount" - }, - "description": "List of database account and their properties." + "$ref": "#/definitions/DatabaseAccountConnectionString" + } + } + } + }, + "DatabaseAccountRegenerateKeyParameters": { + "type": "object", + "description": "Parameters to regenerate the keys within the database account.", + "properties": { + "keyKind": { + "type": "string", + "description": "The access key to regenerate.", + "enum": [ + "primary", + "secondary", + "primaryReadonly", + "secondaryReadonly" + ], + "x-ms-enum": { + "name": "KeyKind", + "modelAsString": true + } } }, - "description": "The List operation response, that contains the database accounts and their properties." + "required": [ + "keyKind" + ] }, - "ErrorResponse": { + "DatabaseAccountOfferType": { + "description": "The offer type for the Cosmos DB database account.", + "type": "string", + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "DatabaseAccountOfferType", + "modelAsString": false + } + }, + "SqlDatabaseCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB SQL database.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB SQL database.", + "$ref": "#/definitions/SqlDatabaseCreateUpdateProperties" + } + }, + "required": [ + "properties" + ] + }, + "SqlDatabaseCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB SQL database.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a SQL database", + "$ref": "#/definitions/SqlDatabaseResource" + }, + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" + } + }, + "required": [ + "resource", + "options" + ] + }, + "ContainerCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB container.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB container.", + "$ref": "#/definitions/ContainerCreateUpdateProperties" + } + }, + "required": [ + "properties" + ] + }, + "ContainerCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB container.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a container", + "$ref": "#/definitions/ContainerResource" + }, + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" + } + }, + "required": [ + "resource", + "options" + ] + }, + "MongoDatabaseCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Mongo database.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Mongo database.", + "$ref": "#/definitions/MongoDatabaseCreateUpdateProperties" + } + }, + "required": [ + "properties" + ] + }, + "MongoDatabaseCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Mongo database.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a Mongo database", + "$ref": "#/definitions/MongoDatabaseResource" + }, + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" + } + }, + "required": [ + "resource", + "options" + ] + }, + "MongoCollectionCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Mongo collection.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Mongo collection.", + "$ref": "#/definitions/MongoCollectionCreateUpdateProperties" + } + }, + "required": [ + "properties" + ] + }, + "MongoCollectionCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Mongo collection.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a Mongo collection", + "$ref": "#/definitions/MongoCollectionResource" + }, + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" + } + }, + "required": [ + "resource", + "options" + ] + }, + "TableCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Table.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Table.", + "$ref": "#/definitions/TableCreateUpdateProperties" + } + }, + "required": [ + "properties" + ] + }, + "TableCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Table.", + "type": "object", "properties": { - "code": { - "description": "Error code.", - "type": "string" + "resource": { + "description": "The standard JSON format of a Table", + "$ref": "#/definitions/TableResource" }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" } }, - "description": "Error Response." + "required": [ + "resource", + "options" + ] }, - "FailoverPolicies": { + "CassandraKeyspaceCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Cassandra keyspace.", + "type": "object", "properties": { - "failoverPolicies": { - "type": "array", - "description": "List of failover policies.", - "items": { - "$ref": "#/definitions/FailoverPolicy" - } + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Cassandra keyspace.", + "$ref": "#/definitions/CassandraKeyspaceCreateUpdateProperties" } }, "required": [ - "failoverPolicies" - ], - "description": "The list of new failover policies for the failover priority change." + "properties" + ] }, - "FailoverPolicy": { + "CassandraKeyspaceCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Cassandra keyspace.", "type": "object", - "description": "The failover policy for a given region of a database account.", "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>." - }, - "locationName": { - "type": "string", - "description": "The name of the region in which the database account exists." + "resource": { + "description": "The standard JSON format of a Cassandra keyspace", + "$ref": "#/definitions/CassandraKeyspaceResource" }, - "failoverPriority": { - "type": "integer", - "minimum": 0, - "format": "int32", - "description": "The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists." + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" } - } + }, + "required": [ + "resource", + "options" + ] }, - "RegionForOnlineOffline": { + "CassandraTableCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Cassandra table.", + "type": "object", "properties": { - "region": { - "type": "string", - "description": "Cosmos DB region, with spaces between words and each word capitalized." + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Cassandra table.", + "$ref": "#/definitions/CassandraTableCreateUpdateProperties" } }, "required": [ - "region" - ], - "description": "Cosmos DB region to online or offline." + "properties" + ] }, - "Location": { - "description": "A region in which the Azure Cosmos DB database account is deployed.", + "CassandraTableCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Cassandra table.", "type": "object", "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The unique identifier of the region within the database account. Example: <accountName>-<locationName>." - }, - "locationName": { - "type": "string", - "description": "The name of the region." - }, - "documentEndpoint": { - "type": "string", - "readOnly": true, - "description": "The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/" - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState" + "resource": { + "description": "The standard JSON format of a Cassandra table", + "$ref": "#/definitions/CassandraTableResource" }, - "failoverPriority": { - "description": "The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.", - "format": "int32", - "type": "integer", - "minimum": 0 + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" } - } + }, + "required": [ + "resource", + "options" + ] }, - "Resource": { + "GremlinDatabaseCreateUpdateParameters": { + "description": "Parameters to create and update Cosmos DB Gremlin database.", "type": "object", - "description": "A database account resource.", "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "The unique resource identifier of the database account." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the database account." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of Azure resource." - }, - "location": { - "type": "string", - "description": "The location of the resource group to which the resource belongs." - }, - "tags": { - "$ref": "#/definitions/Tags" + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to create and update Azure Cosmos DB Gremlin database.", + "$ref": "#/definitions/GremlinDatabaseCreateUpdateProperties" } }, "required": [ - "location" - ], - "x-ms-azure-resource": true + "properties" + ] }, - "DatabaseAccount": { - "description": "An Azure Cosmos DB database account.", + "GremlinDatabaseCreateUpdateProperties": { + "description": "Properties to create and update Azure Cosmos DB Gremlin database.", "type": "object", "properties": { - "kind": { - "description": "Indicates the type of database account. This can only be set at database account creation.", - "type": "string", - "default": "GlobalDocumentDB", - "enum": [ - "GlobalDocumentDB", - "MongoDB", - "Parse" - ], - "x-ms-enum": { - "name": "DatabaseAccountKind", - "modelAsString": true - } + "resource": { + "description": "The standard JSON format of a Gremlin database", + "$ref": "#/definitions/GremlinDatabaseResource" }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DatabaseAccountProperties" + "options": { + "description": "A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.", + "$ref": "#/definitions/CreateUpdateOptions" } }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } + "required": [ + "resource", + "options" ] }, - "ConsistencyPolicy": { + "SqlDatabaseResource": { "type": "object", - "description": "The consistency policy for the Cosmos DB database account.", + "description": "Cosmos DB SQL database id object", "properties": { - "defaultConsistencyLevel": { - "description": "The default consistency level and configuration settings of the Cosmos DB account.", + "id": { "type": "string", - "enum": [ - "Eventual", - "Session", - "BoundedStaleness", - "Strong", - "ConsistentPrefix" - ], - "x-ms-enum": { - "name": "DefaultConsistencyLevel", - "modelAsString": false - } - }, - "maxStalenessPrefix": { - "description": "When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.", - "type": "integer", - "minimum": 1, - "maximum": 2147483647, - "format": "int64" - }, - "maxIntervalInSeconds": { - "description": "When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'.", - "type": "integer", - "minimum": 5, - "maximum": 86400, - "format": "int32" + "description": "Name of the Cosmos DB SQL database" } }, "required": [ - "defaultConsistencyLevel" + "id" ] }, - "DatabaseAccountProperties": { - "description": "Properties for the database account.", + "ContainerResource": { "type": "object", + "description": "Cosmos DB container resource object", "properties": { - "provisioningState": { - "$ref": "#/definitions/ProvisioningState" - }, - "documentEndpoint": { - "description": "The connection endpoint for the Cosmos DB database account.", + "id": { "type": "string", - "readOnly": true + "description": "Name of the Cosmos DB container" }, - "databaseAccountOfferType": { - "description": "The offer type for the Cosmos DB database account. Default value: Standard.", - "readOnly": true, - "$ref": "#/definitions/DatabaseAccountOfferType" + "indexingPolicy": { + "$ref": "#/definitions/IndexingPolicy", + "description": "The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container" }, - "ipRangeFilter": { - "description": "Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.", - "$ref": "#/definitions/IPRangeFilter" + "partitionKey": { + "$ref": "#/definitions/ContainerPartitionKey", + "description": "The configuration of the partition key to be used for partitioning data into multiple partitions" }, - "isVirtualNetworkFilterEnabled": { - "description": "Flag to indicate whether to enable/disable Virtual Network ACL rules.", - "type": "boolean" + "defaultTtl": { + "type": "integer", + "description": "Default time to live" }, - "enableAutomaticFailover": { - "description": "Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.", - "type": "boolean" + "uniqueKeyPolicy": { + "$ref": "#/definitions/UniqueKeyPolicy", + "description": "The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service." }, - "consistencyPolicy": { - "description": "The consistency policy for the Cosmos DB database account.", - "$ref": "#/definitions/ConsistencyPolicy" + "conflictResolutionPolicy": { + "$ref": "#/definitions/ConflictResolutionPolicy", + "description": "The conflict resolution policy for the container." + } + }, + "required": [ + "id" + ] + }, + "IndexingPolicy": { + "type": "object", + "description": "Cosmos DB indexing policy", + "properties": { + "automatic": { + "type": "boolean", + "description": "Indicates if the indexing policy is automatic" }, - "capabilities": { - "type": "array", - "description": "List of Cosmos DB capabilities for the account", - "items": { - "$ref": "#/definitions/Capability" + "indexingMode": { + "description": "Indicates the indexing mode.", + "type": "string", + "default": "Consistent", + "enum": [ + "Consistent", + "Lazy", + "None" + ], + "x-ms-enum": { + "name": "IndexingMode", + "modelAsString": true } }, - "writeLocations": { + "includedPaths": { + "description": "List of paths to include in the indexing", "type": "array", - "readOnly": true, - "description": "An array that contains the write location for the Cosmos DB account.", "items": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/IncludedPath" } }, - "readLocations": { + "excludedPaths": { + "description": "List of paths to exclude from indexing", "type": "array", - "readOnly": true, - "description": "An array that contains of the read locations enabled for the Cosmos DB account.", "items": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/ExcludedPath" } + } + } + }, + "ExcludedPath": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)" + } + } + }, + "IncludedPath": { + "type": "object", + "description": "The paths that are included in indexing", + "properties": { + "path": { + "type": "string", + "description": "The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*)" }, - "failoverPolicies": { + "indexes": { + "description": "List of indexes for this path", "type": "array", - "readOnly": true, - "description": "An array that contains the regions ordered by their failover priorities.", "items": { - "$ref": "#/definitions/FailoverPolicy" + "$ref": "#/definitions/Indexes" + } + } + } + }, + "Indexes": { + "type": "object", + "description": "The indexes for the path.", + "properties": { + "dataType": { + "description": "The datatype for which the indexing behavior is applied to.", + "type": "string", + "default": "String", + "enum": [ + "String", + "Number", + "Point", + "Polygon", + "LineString", + "MultiPolygon" + ], + "x-ms-enum": { + "name": "DataType", + "modelAsString": true } }, - "virtualNetworkRules": { + "precision": { + "description": "The precision of the index. -1 is maximum precision.", + "type": "integer" + }, + "kind": { + "description": "Indicates the type of index.", + "type": "string", + "default": "Hash", + "enum": [ + "Hash", + "Range", + "Spatial" + ], + "x-ms-enum": { + "name": "IndexKind", + "modelAsString": true + } + } + } + }, + "ContainerPartitionKey": { + "type": "object", + "description": "The configuration of the partition key to be used for partitioning data into multiple partitions", + "properties": { + "paths": { + "description": "List of paths using which data within the container can be partitioned", "type": "array", - "description": "List of Virtual Network ACL rules configured for the Cosmos DB account.", "items": { - "$ref": "#/definitions/VirtualNetworkRule" + "$ref": "#/definitions/Path" } }, - "enableMultipleWriteLocations": { - "description": "Enables the account to write in multiple locations", - "type": "boolean" + "kind": { + "description": "Indicates the kind of algorithm used for partitioning", + "type": "string", + "default": "Hash", + "enum": [ + "Hash", + "Range" + ], + "x-ms-enum": { + "name": "PartitionKind", + "modelAsString": true + } } } }, - "DatabaseAccountPatchProperties": { - "description": "Properties to update Azure Cosmos DB database accounts.", + "Path": { + "type": "string", + "description": "A path. These typically start with root (/path)" + }, + "UniqueKeyPolicy": { "type": "object", + "description": "The unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service.", "properties": { - "capabilities": { + "uniqueKeys": { + "description": "List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.", "type": "array", - "description": "List of Cosmos DB capabilities for the account", "items": { - "$ref": "#/definitions/Capability" + "$ref": "#/definitions/UniqueKey" } } } }, - "DatabaseAccountCreateUpdateProperties": { - "description": "Properties to create and update Azure Cosmos DB database accounts.", + "UniqueKey": { "type": "object", + "description": "The unique key on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service.", "properties": { - "consistencyPolicy": { - "description": "The consistency policy for the Cosmos DB account.", - "$ref": "#/definitions/ConsistencyPolicy" - }, - "locations": { + "paths": { + "description": "List of paths must be unique for each document in the Azure Cosmos DB service", "type": "array", - "description": "An array that contains the georeplication locations enabled for the Cosmos DB account.", "items": { - "$ref": "#/definitions/Location" + "$ref": "#/definitions/Path" + } + } + } + }, + "ConflictResolutionPolicy": { + "type": "object", + "description": "The conflict resolution policy for the container.", + "properties": { + "mode": { + "description": "Indicates the conflict resolution mode.", + "type": "string", + "default": "LastWriterWins", + "enum": [ + "LastWriterWins", + "Custom" + ], + "x-ms-enum": { + "name": "ConflictResolutionMode", + "modelAsString": true } }, - "databaseAccountOfferType": { - "$ref": "#/definitions/DatabaseAccountOfferType" - }, - "ipRangeFilter": { - "description": "Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.", - "$ref": "#/definitions/IPRangeFilter" + "conflictResolutionPath": { + "type": "string", + "description": "The conflict resolution path in the case of LastWriterWins mode." }, - "isVirtualNetworkFilterEnabled": { - "description": "Flag to indicate whether to enable/disable Virtual Network ACL rules.", - "type": "boolean" + "conflictResolutionProcedure": { + "type": "string", + "description": "The procedure to resolve conflicts in the case of custom mode." + } + } + }, + "MongoDatabaseResource": { + "type": "object", + "description": "Cosmos DB Mongo database id object", + "properties": { + "id": { + "type": "string", + "description": "Name of the Cosmos DB Mongo database" + } + }, + "required": [ + "id" + ] + }, + "MongoCollectionResource": { + "type": "object", + "description": "Cosmos DB Mongo collection resource object", + "properties": { + "id": { + "type": "string", + "description": "Name of the Cosmos DB Mongo collection" }, - "enableAutomaticFailover": { - "description": "Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.", - "type": "boolean" + "shardKey": { + "description": "A key-value pair of shard keys to be applied for the request.", + "$ref": "#/definitions/ShardKeys" }, - "capabilities": { + "indexes": { + "description": "List of index keys", "type": "array", - "description": "List of Cosmos DB capabilities for the account", "items": { - "$ref": "#/definitions/Capability" + "$ref": "#/definitions/MongoIndex" } + } + }, + "required": [ + "id" + ] + }, + "ShardKeys": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The shard key and partition kind pair, only support \"Hash\" partition kind" + }, + "MongoIndex": { + "type": "object", + "description": "Cosmos DB Mongo collection index key", + "properties": { + "key": { + "description": "Cosmos DB Mongo collection index keys", + "$ref": "#/definitions/MongoIndexKeys" }, - "virtualNetworkRules": { + "options": { + "description": "Cosmos DB Mongo collection index key options", + "$ref": "#/definitions/MongoIndexOptions" + } + } + }, + "MongoIndexKeys": { + "type": "object", + "description": "Cosmos DB Mongo collection resource object", + "properties": { + "keys": { + "description": "List of keys for each Mongo collection in the Azure Cosmos DB service", "type": "array", - "description": "List of Virtual Network ACL rules configured for the Cosmos DB account.", "items": { - "$ref": "#/definitions/VirtualNetworkRule" + "$ref": "#/definitions/Key" } + } + } + }, + "Key": { + "type": "string", + "description": "A Key." + }, + "MongoIndexOptions": { + "type": "object", + "description": "Cosmos DB Mongo collection index options", + "properties": { + "expireAfterSeconds": { + "description": "Expire after seconds", + "type": "integer" }, - "enableMultipleWriteLocations": { - "description": "Enables the account to write in multiple locations", + "unique": { + "description": "Is unique or not", "type": "boolean" } + } + }, + "TableResource": { + "type": "object", + "description": "Cosmos DB table id object", + "properties": { + "id": { + "type": "string", + "description": "Name of the Cosmos DB table" + } }, "required": [ - "locations", - "databaseAccountOfferType" + "id" ] }, - "DatabaseAccountCreateUpdateParameters": { - "description": "Parameters to create and update Cosmos DB database accounts.", + "CassandraKeyspaceResource": { "type": "object", + "description": "Cosmos DB Cassandra keyspace id object", "properties": { - "kind": { - "description": "Indicates the type of database account. This can only be set at database account creation.", + "id": { "type": "string", - "default": "GlobalDocumentDB", - "enum": [ - "GlobalDocumentDB", - "MongoDB", - "Parse" - ], - "x-ms-enum": { - "name": "DatabaseAccountKind", - "modelAsString": true - } - }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DatabaseAccountCreateUpdateProperties" + "description": "Name of the Cosmos DB Cassandra keyspace" } }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], "required": [ - "properties" + "id" ] }, - "DatabaseAccountPatchParameters": { - "description": "Parameters for patching Azure Cosmos DB database account properties.", + "CassandraTableResource": { "type": "object", + "description": "Cosmos DB Cassandra table id object", "properties": { - "tags": { - "$ref": "#/definitions/Tags" + "id": { + "type": "string", + "description": "Name of the Cosmos DB Cassandra table" }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DatabaseAccountPatchProperties" + "defaultTtl": { + "type": "integer", + "description": "Time to live of the Cosmos DB Cassandra table" + }, + "schema": { + "description": "Schema of the Cosmos DB Cassandra table", + "$ref": "#/definitions/CassandraSchema" } - } + }, + "required": [ + "id" + ] }, - "DatabaseAccountListReadOnlyKeysResult": { - "description": "The read-only access keys for the given database account.", + "CassandraSchema": { + "type": "object", + "description": "Cosmos DB Cassandra table schema", "properties": { - "primaryReadonlyMasterKey": { - "readOnly": true, - "type": "string", - "description": "Base 64 encoded value of the primary read-only key." + "columns": { + "type": "array", + "items": { + "$ref": "#/definitions/Column" + }, + "description": "List of Cassandra table columns." }, - "secondaryReadonlyMasterKey": { - "readOnly": true, - "type": "string", - "description": "Base 64 encoded value of the secondary read-only key." + "partitionKeys": { + "type": "array", + "items": { + "$ref": "#/definitions/CassandraPartitionKey" + }, + "description": "List of partition key." + }, + "clusterKeys": { + "type": "array", + "items": { + "$ref": "#/definitions/ClusterKey" + }, + "description": "List of cluster key." } } }, - "DatabaseAccountListKeysResult": { - "description": "The access keys for the given database account.", + "Column": { + "type": "object", + "description": "Cosmos DB Cassandra table column", "properties": { - "primaryMasterKey": { - "readOnly": true, + "name": { "type": "string", - "description": "Base 64 encoded value of the primary read-write key." + "description": "Name of the Cosmos DB Cassandra table column" }, - "secondaryMasterKey": { - "readOnly": true, + "type": { "type": "string", - "description": "Base 64 encoded value of the secondary read-write key." - }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DatabaseAccountListReadOnlyKeysResult" + "description": "Type of the Cosmos DB Cassandra table column" } } }, - "DatabaseAccountConnectionString": { - "description": "Connection string for the Cosmos DB account", + "CassandraPartitionKey": { + "type": "object", + "description": "Cosmos DB Cassandra table partition key", "properties": { - "connectionString": { - "readOnly": true, - "type": "string", - "description": "Value of the connection string" - }, - "description": { - "readOnly": true, + "name": { "type": "string", - "description": "Description of the connection string" + "description": "Name of the Cosmos DB Cassandra table partition key" } } }, - "DatabaseAccountListConnectionStringsResult": { - "description": "The connection strings for the given database account.", + "ClusterKey": { + "type": "object", + "description": "Cosmos DB Cassandra table cluster key", "properties": { - "connectionStrings": { - "type": "array", - "description": "An array that contains the connection strings for the Cosmos DB account.", - "items": { - "$ref": "#/definitions/DatabaseAccountConnectionString" - } + "name": { + "type": "string", + "description": "Name of the Cosmos DB Cassandra table cluster key" + }, + "orderBy": { + "type": "string", + "description": "Order of the Cosmos DB Cassandra table cluster key, only support \"Asc\" and \"Desc\"" } } }, - "DatabaseAccountRegenerateKeyParameters": { + "GremlinDatabaseResource": { "type": "object", - "description": "Parameters to regenerate the keys within the database account.", + "description": "Cosmos DB Gremlin database id object", "properties": { - "keyKind": { + "id": { "type": "string", - "description": "The access key to regenerate.", - "enum": [ - "primary", - "secondary", - "primaryReadonly", - "secondaryReadonly" - ], - "x-ms-enum": { - "name": "KeyKind", - "modelAsString": true - } + "description": "Name of the Cosmos DB Gremlin database" } }, "required": [ - "keyKind" + "id" ] }, - "DatabaseAccountOfferType": { - "description": "The offer type for the Cosmos DB database account.", - "type": "string", - "enum": [ - "Standard" - ], - "x-ms-enum": { - "name": "DatabaseAccountOfferType", - "modelAsString": false - } + "CreateUpdateOptions": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are \"If-Match\", \"If-None-Match\", \"Session-Token\" and \"Throughput\"" }, "Capability": { "type": "object", @@ -2423,6 +4844,30 @@ "x-ms-parameter-location": "method", "description": "Cosmos DB collection rid." }, + "containerRidParameter": { + "name": "containerRid", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Cosmos DB container rid." + }, + "tableRidParameter": { + "name": "tableRid", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Cosmos DB table rid." + }, + "keyspaceRidParameter": { + "name": "keyspaceRid", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Cosmos DB keyspace rid." + }, "regionParameter": { "name": "region", "in": "path", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceCreateUpdate.json new file mode 100644 index 000000000000..5bd25a5c9bed --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceCreateUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "keyspaceName", + "createUpdateCassandraKeyspaceParameters": { + "properties": { + "resource": { + "id": "keyspaceName" + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "keyspaceName", + "name": "keyspaceName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces", + "properties": { + "id": "keyspaceName" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceDelete.json new file mode 100644 index 000000000000..32bf55b8f6a0 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "keyspaceName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceGet.json new file mode 100644 index 000000000000..f0c76334d583 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "keyspaceName" + }, + "responses": { + "200": { + "body": { + "id": "keyspaceName", + "name": "keyspaceName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces", + "properties": { + "id": "keyspaceName" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceList.json new file mode 100644 index 000000000000..cdbf3a8d9edb --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraKeyspaceList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "keyspaceName", + "name": "keyspaceName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces", + "properties": { + "id": "keyspaceName" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableCreateUpdate.json new file mode 100644 index 000000000000..7e7549711ee5 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableCreateUpdate.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "tableName", + "tableRid": "tableName", + "createUpdateCassandraTableParameters": { + "properties": { + "resource": { + "id": "tableName", + "defaultTtl": 100, + "schema": { + "columns": [ + { + "name": "columnA", + "type": "Ascii" + } + ], + "partitionKeys": [ + { + "name": "columnA" + } + ], + "clusterKeys": [ + { + "name": "columnA", + "orderBy": "Asc" + } + ] + } + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces/tables", + "properties": { + "id": "tableName", + "defaultTtl": 100, + "schema": { + "columns": [ + { + "name": "columnA", + "type": "Ascii" + } + ], + "partitionKeys": [ + { + "name": "columnA" + } + ], + "clusterKeys": [ + { + "name": "columnA", + "orderBy": "Asc" + } + ] + } + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableDelete.json new file mode 100644 index 000000000000..0a87600d5a10 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "keyspaceName", + "tableRid": "tableName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableGet.json new file mode 100644 index 000000000000..ad4831a11493 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableGet.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "keyspaceRid": "keyspaceName", + "tableRid": "tableName" + }, + "responses": { + "200": { + "body": { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces/tables", + "properties": { + "id": "tableName", + "defaultTtl": 100, + "schema": { + "columns": [ + { + "name": "columnA", + "type": "Ascii" + } + ], + "partitionKeys": [ + { + "name": "columnA" + } + ], + "clusterKeys": [ + { + "name": "columnA", + "orderBy": "Asc" + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableList.json new file mode 100644 index 000000000000..4d3c694d1835 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBCassandraTableList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "keyspaceRid": "keyspaceName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/keyspaces/tables", + "properties": { + "id": "tableName", + "defaultTtl": 100, + "schema": { + "columns": [ + { + "name": "columnA", + "type": "Ascii" + } + ], + "partitionKeys": [ + { + "name": "columnA" + } + ], + "clusterKeys": [ + { + "name": "columnA", + "orderBy": "Asc" + } + ] + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBDatabaseAccountCreateMulti.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBDatabaseAccountCreateMulti.json deleted file mode 100644 index 65db2f69123f..000000000000 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBDatabaseAccountCreateMulti.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "parameters": { - "accountName": "ddb1", - "resourceGroupName": "rg1", - "api-version": "2015-04-08", - "subscriptionId": "subid", - "createUpdateParameters": { - "location": "westus", - "tags": {}, - "kind": "GlobalDocumentDB", - "properties": { - "databaseAccountOfferType": "Standard", - "ipRangeFilter": "10.10.10.10", - "isVirtualNetworkFilterEnabled": true, - "enableMultipleWriteLocations": true, - "virtualNetworkRules": [ - { - "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1", - "ignoreMissingVNetServiceEndpoint": false - } - ], - "locations": [ - { - "failoverPriority": 0, - "locationName": "southcentralus" - }, - { - "failoverPriority": 1, - "locationName": "eastus" - } - ], - "consistencyPolicy": { - "defaultConsistencyLevel": "BoundedStaleness", - "maxIntervalInSeconds": 10, - "maxStalenessPrefix": 200 - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1", - "name": "ddb1", - "location": "West US", - "type": "Microsoft.DocumentDB/databaseAccounts", - "kind": "GlobalDocumentDB", - "tags": {}, - "properties": { - "provisioningState": "Initializing", - "ipRangeFilter": "10.10.10.10", - "isVirtualNetworkFilterEnabled": true, - "enableMultipleWriteLocations": true, - "databaseAccountOfferType": "Standard", - "consistencyPolicy": { - "defaultConsistencyLevel": "BoundedStaleness", - "maxIntervalInSeconds": 10, - "maxStalenessPrefix": 200 - }, - "writeLocations": [ - { - "id": "ddb1-southcentralus", - "locationName": "South Central US", - "provisioningState": "Initializing", - "failoverPriority": 0 - }, - { - "id": "ddb1-eastus", - "locationName": "East US", - "provisioningState": "Initializing", - "failoverPriority": 1 - } - ], - "readLocations": [ - { - "id": "ddb1-southcentralus", - "locationName": "South Central US", - "provisioningState": "Initializing", - "failoverPriority": 0 - }, - { - "id": "ddb1-eastus", - "locationName": "East US", - "provisioningState": "Initializing", - "failoverPriority": 1 - } - ], - "failoverPolicies": [ - { - "id": "ddb1-southcentralus", - "locationName": "South Central US", - "failoverPriority": 0 - }, - { - "id": "ddb1-eastus", - "locationName": "East US", - "failoverPriority": 1 - } - ], - "virtualNetworkRules": [ - { - "id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerCreateUpdate.json new file mode 100644 index 000000000000..163c2fdb0e2c --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerCreateUpdate.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "containerRid": "containerName", + "createUpdateGremlinContainerParameters": { + "properties": { + "resource": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + } + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "containerName", + "name": "containerName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerDelete.json new file mode 100644 index 000000000000..9ca049136749 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "containerRid": "containerName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerGet.json new file mode 100644 index 000000000000..c17ffa2b63d4 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerGet.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName", + "containerRid": "containerName" + }, + "responses": { + "200": { + "body": { + "id": "containerName", + "name": "containerName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerList.json new file mode 100644 index 000000000000..f57256ae9e3f --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinContainerList.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testctn", + "name": "testctn", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "testctn", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseCreateUpdate.json new file mode 100644 index 000000000000..0dc7db32490e --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseCreateUpdate.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "createUpdateGremlinDatabaseParameters": { + "properties": { + "resource": { + "id": "databaseName" + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseDelete.json new file mode 100644 index 000000000000..3e9271928252 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseGet.json new file mode 100644 index 000000000000..bd7010af0f21 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseList.json new file mode 100644 index 000000000000..95776f31a04f --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBGremlinDatabaseList.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionCreateUpdate.json new file mode 100644 index 000000000000..ab92d5ac6c16 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionCreateUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "collectionRid": "collectionName", + "createUpdateMongoCollectionParameters": { + "properties": { + "resource": { + "id": "testcoll", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + } + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "collectionName", + "name": "collectionName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/collection", + "properties": { + "id": "testcoll", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + } + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionDelete.json new file mode 100644 index 000000000000..46aa520680e2 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "collectionRid": "collectionName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionGet.json new file mode 100644 index 000000000000..81a3dac0feed --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionGet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName", + "collectionRid": "collectionName" + }, + "responses": { + "200": { + "body": { + "id": "collectionName", + "name": "collectionName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/collections", + "properties": { + "id": "testcoll", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionList.json new file mode 100644 index 000000000000..bd9e6501001c --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoCollectionList.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testcoll", + "name": "testcoll", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/collections", + "properties": { + "id": "testcoll", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseCreateUpdate.json new file mode 100644 index 000000000000..9befb63ef43b --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseCreateUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "createUpdateMongoDatabaseParameters": { + "properties": { + "resource": { + "id": "updatedDatabaseName" + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "updatedDatabaseName", + "name": "updatedDatabaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "updatedDatabaseName" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseDelete.json new file mode 100644 index 000000000000..3e9271928252 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseGet.json new file mode 100644 index 000000000000..08e48da41cab --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseList.json new file mode 100644 index 000000000000..e90d781caa34 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBMongoDatabaseList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerCreateUpdate.json new file mode 100644 index 000000000000..38a140e3cb65 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerCreateUpdate.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "containerRid": "containerName", + "createUpdateSqlContainerParameters": { + "properties": { + "resource": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + } + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "containerName", + "name": "containerName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerDelete.json new file mode 100644 index 000000000000..9ca049136749 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "containerRid": "containerName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerGet.json new file mode 100644 index 000000000000..c17ffa2b63d4 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerGet.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName", + "containerRid": "containerName" + }, + "responses": { + "200": { + "body": { + "id": "containerName", + "name": "containerName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "containerName", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerList.json new file mode 100644 index 000000000000..f57256ae9e3f --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlContainerList.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "testctn", + "name": "testctn", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases/containers", + "properties": { + "id": "testctn", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*", + "indexes": [ + { + "kind": "Range", + "dataType": "String", + "precision": -1 + }, + { + "kind": "Range", + "dataType": "Number", + "precision": -1 + } + ] + } + ], + "excludedPaths": [] + }, + "partitionKey": { + "paths": [ + "/AccountNumber" + ], + "kind": "Hash" + }, + "defaultTtl": 100, + "uniqueKeyPolicy": { + "uniqueKeys": [ + { + "paths": [ + "/testPath" + ] + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/path" + }, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseCreateUpdate.json new file mode 100644 index 000000000000..416117cc5286 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseCreateUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName", + "createUpdateSqlDatabaseParameters": { + "properties": { + "resource": { + "id": "databaseName" + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"" + } + } + }, + "202": { + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseDelete.json new file mode 100644 index 000000000000..3e9271928252 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseGet.json new file mode 100644 index 000000000000..147f66f113d6 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseGet.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "databaseRid": "databaseName" + }, + "responses": { + "200": { + "body": { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"", + "_colls": "colls\/", + "_users": "users\/" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseList.json new file mode 100644 index 000000000000..37d38967d63f --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBSqlDatabaseList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "databaseName", + "name": "databaseName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/databases", + "properties": { + "id": "databaseName", + "_rid": "CqNBAA==", + "_ts": 1449602962, + "_etag": "\"00000a00-0000-0000-0000-56672f920000\"", + "_colls": "colls\/", + "_users": "users\/" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableCreateUpdate.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableCreateUpdate.json new file mode 100644 index 000000000000..ab9bcdadca52 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableCreateUpdate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "tableRid": "tableName", + "createUpdateTableParameters": { + "properties": { + "resource": { + "id": "tableName" + }, + "options": { + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/tables", + "properties": { + "id": "tableName" + } + } + }, + "202": { + + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableDelete.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableDelete.json new file mode 100644 index 000000000000..cbd616705886 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "tableRid": "tableName" + }, + "responses": { + "204": { }, + "202": { } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableGet.json new file mode 100644 index 000000000000..c9e5897cb265 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2015-04-08", + "subscriptionId": "subid", + "tableRid": "tableName" + }, + "responses": { + "200": { + "body": { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/tables", + "properties": { + "id": "tableName" + } + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableList.json new file mode 100644 index 000000000000..48eea57b0684 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBTableList.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2015-04-08", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "accountName": "ddb1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "tableName", + "name": "tableName", + "type": "Microsoft.DocumentDB/databaseAccounts/apis/tables", + "properties": { + "id": "tableName" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cosmos-db/resource-manager/readme.md b/specification/cosmos-db/resource-manager/readme.md index 740a2d0c111c..efdd18c114bf 100644 --- a/specification/cosmos-db/resource-manager/readme.md +++ b/specification/cosmos-db/resource-manager/readme.md @@ -50,10 +50,78 @@ directive: from: cosmos-db.json where: $.definitions.DatabaseAccountCreateUpdateParameters reason: The DatabaseAccount request and response resources differ so the DatabaseAccountCreateUpdateParameters must only have a PUT operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.SqlDatabase + reason: The SqlDatabase doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.Container + reason: The Container doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.MongoDatabase + reason: The MongoDatabase doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.MongoCollection + reason: The MongoCollection doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.Table + reason: The Table doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.CassandraKeyspace + reason: The CassandraKeyspace doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.CassandraTable + reason: The CassandraTable doesn't support Patch operation + - suppress: TrackedResourcePatchOperation + from: cosmos-db.json + where: $.definitions.GremlinDatabase + reason: The GremlinDatabase doesn't support Patch operation - suppress: DefinitionsPropertiesNamesCamelCase from: cosmos-db.json where: $.definitions.MetricValue.properties._count - reason: The Metrics API has has a property name with a leading underscore character + reason: The Metrics API has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.ExtendedResourceProperties.properties._rid + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.ExtendedResourceProperties.properties._ts + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.ExtendedResourceProperties.properties._self + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.ExtendedResourceProperties.properties._etag + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.SqlDatabaseProperties.properties._colls + reason: The database has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.SqlDatabaseProperties.properties._users + reason: The database has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.GremlinDatabaseProperties.properties._rid + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.GremlinDatabaseProperties.properties._ts + reason: The resource has a property name with a leading underscore character + - suppress: DefinitionsPropertiesNamesCamelCase + from: cosmos-db.json + where: $.definitions.GremlinDatabaseProperties.properties._etag + reason: The resource has a property name with a leading underscore character - suppress: DefinitionsPropertiesNamesCamelCase from: cosmos-db.json where: $.definitions.PercentileMetricValue.properties.P10