From e36daf45935e5156a74be8e891b3af3b1dcb65b8 Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Tue, 12 Apr 2022 12:28:15 -0700 Subject: [PATCH 1/5] initial changes --- .../preview/2022-02-15-preview/cosmos-db.json | 427 ++++++++++++++++++ ...ngoDBCollectionRedistributeThroughput.json | 65 +++ ...lectionRetrieveThroughputDistribution.json | 45 ++ ...sDBSqlContainerRedistributeThroughput.json | 65 +++ ...ntainerRetrieveThroughputDistribution.json | 45 ++ 5 files changed, 647 insertions(+) create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json index dd36d4efd897..f8b3974e31a7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json @@ -2474,6 +2474,128 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution": { + "post": { + "operationId": "SqlResources_SqlContainerRetrieveThroughputDistribution", + "x-ms-examples": { + "CosmosDBSqlContainerRetrieveThroughputDistribution": { + "$ref": "./examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json" + } + }, + "description": "Retrieve throughput distribution for an Azure Cosmos DB SQL container", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseNameParameter" + }, + { + "$ref": "#/parameters/containerNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "retrieveThroughputParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RetrieveThroughputParameters" + }, + "description": "The parameters to provide for retrieving throughput distribution for the current SQL container." + } + ], + "responses": { + "202": { + "description": "The retrieve throughput distribution for SQL container operation will complete asynchronously." + }, + "200": { + "description": "The retrieve throughput distribution for SQL container operation was completed successfully.", + "schema": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput": { + "post": { + "operationId": "SqlResources_SqlContainerRedistributeThroughput", + "x-ms-examples": { + "CosmosDBSqlContainerRedistributeThroughput": { + "$ref": "./examples/CosmosDBSqlContainerRedistributeThroughput.json" + } + }, + "description": "Redistribute throughput for an Azure Cosmos DB SQL container", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseNameParameter" + }, + { + "$ref": "#/parameters/containerNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "redistributeThroughputParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedistributeThroughputParameters" + }, + "description": "The parameters to provide for redistributing throughput for the current SQL container." + } + ], + "responses": { + "202": { + "description": "The redistribution throughput for SQL container operation will complete asynchronously." + }, + "200": { + "description": "The redistribution throughput for SQL container operation was completed successfully.", + "schema": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures": { "get": { "operationId": "SqlResources_ListSqlStoredProcedures", @@ -3349,6 +3471,128 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution": { + "post": { + "operationId": "MongoDBResources_SqlContainerRetrieveThroughputDistribution", + "x-ms-examples": { + "CosmosDBMongoDBCollectionRetrieveThroughputDistribution": { + "$ref": "./examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json" + } + }, + "description": "Retrieve throughput distribution for an Azure Cosmos DB MongoDB container", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseNameParameter" + }, + { + "$ref": "#/parameters/collectionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "retrieveThroughputParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RetrieveThroughputParameters" + }, + "description": "The parameters to provide for retrieving throughput distribution for the current MongoDB container." + } + ], + "responses": { + "202": { + "description": "The retrieve throughput distribution for MongoDB container operation will complete asynchronously." + }, + "200": { + "description": "The retrieve throughput distribution for MongoDB container operation was completed successfully.", + "schema": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput": { + "post": { + "operationId": "MongoDBResources_MongoDBContainerRedistributeThroughput", + "x-ms-examples": { + "CosmosDBMongoDBCollectionRedistributeThroughput": { + "$ref": "./examples/CosmosDBMongoDBCollectionRedistributeThroughput.json" + } + }, + "description": "Redistribute throughput for an Azure Cosmos DB MongoDB container", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/accountNameParameter" + }, + { + "$ref": "#/parameters/databaseNameParameter" + }, + { + "$ref": "#/parameters/collectionNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "redistributeThroughputParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RedistributeThroughputParameters" + }, + "description": "The parameters to provide for redistributing throughput for the current MongoDB container." + } + ], + "responses": { + "202": { + "description": "The redistribution throughput for MongoDB container operation will complete asynchronously." + }, + "200": { + "description": "The redistribution throughput for MongoDB container operation was completed successfully.", + "schema": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections": { "get": { "operationId": "MongoDBResources_ListMongoDBCollections", @@ -8263,6 +8507,189 @@ } } }, + "RedistributeThroughputParameters": { + "description": "Cosmos DB redistribute throughput parameters object", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to redistribute throughput parameters object", + "$ref": "#/definitions/RedistributeThroughputProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ], + "required": [ + "properties" + ] + }, + "RedistributeThroughputProperties": { + "description": "Properties to redistribute throughput for Azure Cosmos DB resource.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a resource throughput", + "$ref": "#/definitions/RedistributeThroughputPropertiesResource" + } + }, + "required": [ + "resource" + ] + }, + "RedistributeThroughputPropertiesResource": { + "type": "object", + "description": "Resource to redistribute throughput for Azure Cosmos DB resource", + "properties": { + "throughputPolicy": { + "type": "string", + "description": "ThroughputPolicy to apply for throughput redistribution" + }, + "targetPartitionInfo": { + "type": "array", + "description": "Array of PhysicalPartitionThroughputInfoResource objects.", + "items": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResource" + } + }, + "sourcePartitionInfo": { + "type": "array", + "description": "Array of PhysicalPartitionThroughputInfoResource objects.", + "items": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResource" + } + } + }, + "required": [ + "throughputPolicy", + "targetPartitionInfo", + "sourcePartitionInfo" + ] + }, + "RetrieveThroughputParameters": { + "description": "Cosmos DB retrieve throughput parameters object", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties to retrieve throughput parameters object", + "$ref": "#/definitions/RetrieveThroughputProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ], + "required": [ + "properties" + ] + }, + "RetrieveThroughputProperties": { + "description": "Properties to retrieve throughput for Azure Cosmos DB resource.", + "type": "object", + "properties": { + "resource": { + "description": "The standard JSON format of a resource throughput", + "$ref": "#/definitions/RetrieveThroughputPropertiesResource" + } + }, + "required": [ + "resource" + ] + }, + "RetrieveThroughputPropertiesResource": { + "type": "object", + "description": "Resource to retrieve throughput information for Cosmos DB resource", + "properties": { + "physicalPartitionIds": { + "type": "array", + "description": "Array of PhysicalPartitionId objects.", + "items": { + "$ref": "#/definitions/PhysicalPartitionId" + } + } + }, + "required": [ + "physicalPartitionIds" + ] + }, + "PhysicalPartitionId": { + "type": "object", + "description": "PhysicalPartitionId object", + "properties": { + "id": { + "type": "string", + "description": "Id of a physical partition" + } + }, + "required": [ + "id" + ] + }, + "PhysicalPartitionThroughputInfoResult": { + "description": "An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object.", + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object", + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResultProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ] + }, + "PhysicalPartitionThroughputInfoResultProperties": { + "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object", + "type": "object", + "properties": { + "resource": { + "description": "properties of physical partition throughput info", + "allOf": [ + { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoProperties" + } + ] + } + } + }, + "PhysicalPartitionThroughputInfoProperties": { + "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object", + "type": "object", + "properties": { + "physicalPartitionThroughputInfo": { + "type": "array", + "description": "Array of physical partition throughput info objects", + "items": { + "$ref": "#/definitions/PhysicalPartitionThroughputInfoResource" + } + } + } + }, + "PhysicalPartitionThroughputInfoResource": { + "type": "object", + "description": "PhysicalPartitionThroughputInfo object", + "properties": { + "id": { + "type": "string", + "description": "Id of a physical partition" + }, + "throughput": { + "type": "number", + "format": "double", + "description": "Throughput of a physical partition" + } + }, + "required": [ + "id" + ] + }, "ClientEncryptionKeyResource": { "type": "object", "description": "Cosmos DB client encryption key resource object.", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json new file mode 100644 index 000000000000..145a4b8e61ad --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2022-03-15-preview", + "subscriptionId": "subid", + "databaseName": "databaseName", + "collectionName": "collectionName", + "redistributeThroughputParameters": { + "properties": { + "resource": { + "throughputPolicy": "Custom", + "targetPartitionInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + } + ], + "sourcePartitionInfo": [ + { + "id": "2", + "throughput": 5000 + }, + { + "id": "3" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resource": { + "physicalPartitionThroughputInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + }, + { + "id": "2", + "throughput": 5000 + }, + { + "id": "3", + "throughput": 3000 + } + ] + } + } + } + }, + "202": {} + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json new file mode 100644 index 000000000000..5d68a77455f5 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2022-03-15-preview", + "subscriptionId": "subid", + "databaseName": "databaseName", + "collectionName": "collectionName", + "retrieveThroughputParameters": { + "properties": { + "resource": { + "physicalPartitionIds": [ + { + "id": "0" + }, + { + "id": "1" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resource": { + "physicalPartitionThroughputInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + } + ] + } + } + } + }, + "202": {} + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json new file mode 100644 index 000000000000..2e24e16745a6 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2022-03-15-preview", + "subscriptionId": "subid", + "databaseName": "databaseName", + "containerName": "containerName", + "redistributeThroughputParameters": { + "properties": { + "resource": { + "throughputPolicy": "Custom", + "targetPartitionInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + } + ], + "sourcePartitionInfo": [ + { + "id": "2", + "throughput": 5000 + }, + { + "id": "3" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resource": { + "physicalPartitionThroughputInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + }, + { + "id": "2", + "throughput": 5000 + }, + { + "id": "3", + "throughput": 3000 + } + ] + } + } + } + }, + "202": {} + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json new file mode 100644 index 000000000000..eb804f35dd23 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "ddb1", + "resourceGroupName": "rg1", + "api-version": "2022-03-15-preview", + "subscriptionId": "subid", + "databaseName": "databaseName", + "containerName": "containerName", + "retrieveThroughputParameters": { + "properties": { + "resource": { + "physicalPartitionIds": [ + { + "id": "0" + }, + { + "id": "1" + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "resource": { + "physicalPartitionThroughputInfo": [ + { + "id": "0", + "throughput": 5000 + }, + { + "id": "1", + "throughput": 5000 + } + ] + } + } + } + }, + "202": {} + } +} From ea321c2fbffa6fa82a335a575b0f45b2367bf329 Mon Sep 17 00:00:00 2001 From: amar-sagare <45947937+amar-sagare@users.noreply.github.com> Date: Thu, 14 Apr 2022 13:45:26 -0700 Subject: [PATCH 2/5] Fix IsDryRun parameter --- .../preview/2022-02-15-preview/cosmos-db.json | 2 +- .../examples/CosmosDBMongoDBCollectionPartitionMerge.json | 2 +- .../examples/CosmosDBSqlContainerPartitionMerge.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json index f8b3974e31a7..f3f7f66fd89a 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json @@ -10404,7 +10404,7 @@ "description": "The properties of an Azure Cosmos DB merge operations", "type": "object", "properties": { - "isDryRun": { + "IsDryRun": { "type": "boolean", "description": "Specifies whether the operation is a real merge operation or a simulation." } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json index dd3cb166c8ee..d34d682d33e0 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json @@ -7,7 +7,7 @@ "databaseName": "databaseName", "collectionName": "collectionName", "mergeParameters": { - "isDryRun": false + "IsDryRun": false } }, "responses": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json index 38a1c3bd368f..d4353419add3 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json @@ -7,7 +7,7 @@ "databaseName": "databaseName", "containerName": "containerName", "mergeParameters": { - "isDryRun": false + "IsDryRun": false } }, "responses": { From b35859d5787b51e6f48cd9074f04cd4f3b37f493 Mon Sep 17 00:00:00 2001 From: amar-sagare <45947937+amar-sagare@users.noreply.github.com> Date: Sun, 17 Apr 2022 12:59:34 -0700 Subject: [PATCH 3/5] Revert IsDryRun change, fix spec for RedistributeThroughput --- .../preview/2022-02-15-preview/cosmos-db.json | 10 +++++----- .../CosmosDBMongoDBCollectionPartitionMerge.json | 2 +- ...osmosDBMongoDBCollectionRedistributeThroughput.json | 4 ++-- .../examples/CosmosDBSqlContainerPartitionMerge.json | 2 +- .../CosmosDBSqlContainerRedistributeThroughput.json | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json index f3f7f66fd89a..318ef03d5c1a 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json @@ -8547,14 +8547,14 @@ "type": "string", "description": "ThroughputPolicy to apply for throughput redistribution" }, - "targetPartitionInfo": { + "targetPhysicalPartitionThroughputInfo": { "type": "array", "description": "Array of PhysicalPartitionThroughputInfoResource objects.", "items": { "$ref": "#/definitions/PhysicalPartitionThroughputInfoResource" } }, - "sourcePartitionInfo": { + "sourcePhysicalPartitionThroughputInfo": { "type": "array", "description": "Array of PhysicalPartitionThroughputInfoResource objects.", "items": { @@ -8564,8 +8564,8 @@ }, "required": [ "throughputPolicy", - "targetPartitionInfo", - "sourcePartitionInfo" + "targetPhysicalPartitionThroughputInfo", + "sourcePhysicalPartitionThroughputInfo" ] }, "RetrieveThroughputParameters": { @@ -10404,7 +10404,7 @@ "description": "The properties of an Azure Cosmos DB merge operations", "type": "object", "properties": { - "IsDryRun": { + "isDryRun": { "type": "boolean", "description": "Specifies whether the operation is a real merge operation or a simulation." } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json index d34d682d33e0..dd3cb166c8ee 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionPartitionMerge.json @@ -7,7 +7,7 @@ "databaseName": "databaseName", "collectionName": "collectionName", "mergeParameters": { - "IsDryRun": false + "isDryRun": false } }, "responses": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json index 145a4b8e61ad..d752b08ec5e2 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json @@ -10,7 +10,7 @@ "properties": { "resource": { "throughputPolicy": "Custom", - "targetPartitionInfo": [ + "targetPhysicalPartitionThroughputInfo": [ { "id": "0", "throughput": 5000 @@ -20,7 +20,7 @@ "throughput": 5000 } ], - "sourcePartitionInfo": [ + "sourcePhysicalPartitionThroughputInfo": [ { "id": "2", "throughput": 5000 diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json index d4353419add3..38a1c3bd368f 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerPartitionMerge.json @@ -7,7 +7,7 @@ "databaseName": "databaseName", "containerName": "containerName", "mergeParameters": { - "IsDryRun": false + "isDryRun": false } }, "responses": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json index 2e24e16745a6..e4d6cbf4e9e0 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json @@ -10,7 +10,7 @@ "properties": { "resource": { "throughputPolicy": "Custom", - "targetPartitionInfo": [ + "targetPhysicalPartitionThroughputInfo": [ { "id": "0", "throughput": 5000 @@ -20,7 +20,7 @@ "throughput": 5000 } ], - "sourcePartitionInfo": [ + "sourcePhysicalPartitionThroughputInfo": [ { "id": "2", "throughput": 5000 From 29ce0677fe5479fcaef0c3ef92d3a81f8a5b73fa Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Tue, 19 Apr 2022 12:48:15 -0700 Subject: [PATCH 4/5] model throughputpolicy as an enum --- .../preview/2022-02-15-preview/cosmos-db.json | 11 ++++++++++- ...smosDBMongoDBCollectionRedistributeThroughput.json | 4 ++-- ...ngoDBCollectionRetrieveThroughputDistribution.json | 2 +- .../CosmosDBSqlContainerRedistributeThroughput.json | 4 ++-- ...sDBSqlContainerRetrieveThroughputDistribution.json | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json index 318ef03d5c1a..0afe90d09e8b 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json @@ -8544,8 +8544,17 @@ "description": "Resource to redistribute throughput for Azure Cosmos DB resource", "properties": { "throughputPolicy": { + "description": "ThroughputPolicy to apply for throughput redistribution", "type": "string", - "description": "ThroughputPolicy to apply for throughput redistribution" + "enum": [ + "none", + "equal", + "custom" + ], + "x-ms-enum": { + "name": "ThroughputPolicyType", + "modelAsString": true + } }, "targetPhysicalPartitionThroughputInfo": { "type": "array", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json index d752b08ec5e2..dec9a94f9f9e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json @@ -2,14 +2,14 @@ "parameters": { "accountName": "ddb1", "resourceGroupName": "rg1", - "api-version": "2022-03-15-preview", + "api-version": "2022-02-15-preview", "subscriptionId": "subid", "databaseName": "databaseName", "collectionName": "collectionName", "redistributeThroughputParameters": { "properties": { "resource": { - "throughputPolicy": "Custom", + "throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": [ { "id": "0", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json index 5d68a77455f5..1dd6957f6666 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json @@ -2,7 +2,7 @@ "parameters": { "accountName": "ddb1", "resourceGroupName": "rg1", - "api-version": "2022-03-15-preview", + "api-version": "2022-02-15-preview", "subscriptionId": "subid", "databaseName": "databaseName", "collectionName": "collectionName", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json index e4d6cbf4e9e0..cd370aa6013e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json @@ -2,14 +2,14 @@ "parameters": { "accountName": "ddb1", "resourceGroupName": "rg1", - "api-version": "2022-03-15-preview", + "api-version": "2022-02-15-preview", "subscriptionId": "subid", "databaseName": "databaseName", "containerName": "containerName", "redistributeThroughputParameters": { "properties": { "resource": { - "throughputPolicy": "Custom", + "throughputPolicy": "custom", "targetPhysicalPartitionThroughputInfo": [ { "id": "0", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json index eb804f35dd23..39a8784c914d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json @@ -2,7 +2,7 @@ "parameters": { "accountName": "ddb1", "resourceGroupName": "rg1", - "api-version": "2022-03-15-preview", + "api-version": "2022-02-15-preview", "subscriptionId": "subid", "databaseName": "databaseName", "containerName": "containerName", From 1fe9585f163211381fc2c01a172a4f850148c9e5 Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Thu, 21 Apr 2022 11:39:24 -0700 Subject: [PATCH 5/5] remove 200 from specs --- .../preview/2022-02-15-preview/cosmos-db.json | 67 ------------------- ...ngoDBCollectionRedistributeThroughput.json | 26 ------- ...lectionRetrieveThroughputDistribution.json | 18 ----- ...sDBSqlContainerRedistributeThroughput.json | 26 ------- ...ntainerRetrieveThroughputDistribution.json | 18 ----- 5 files changed, 155 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json index 0afe90d09e8b..990a2e4cc3a1 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/cosmos-db.json @@ -2520,12 +2520,6 @@ "202": { "description": "The retrieve throughput distribution for SQL container operation will complete asynchronously." }, - "200": { - "description": "The retrieve throughput distribution for SQL container operation was completed successfully.", - "schema": { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -2581,12 +2575,6 @@ "202": { "description": "The redistribution throughput for SQL container operation will complete asynchronously." }, - "200": { - "description": "The redistribution throughput for SQL container operation was completed successfully.", - "schema": { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -3517,12 +3505,6 @@ "202": { "description": "The retrieve throughput distribution for MongoDB container operation will complete asynchronously." }, - "200": { - "description": "The retrieve throughput distribution for MongoDB container operation was completed successfully.", - "schema": { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -3578,12 +3560,6 @@ "202": { "description": "The redistribution throughput for MongoDB container operation will complete asynchronously." }, - "200": { - "description": "The redistribution throughput for MongoDB container operation was completed successfully.", - "schema": { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResult" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -8638,49 +8614,6 @@ "id" ] }, - "PhysicalPartitionThroughputInfoResult": { - "description": "An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object.", - "type": "object", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object", - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResultProperties" - } - }, - "allOf": [ - { - "$ref": "#/definitions/ARMResourceProperties" - } - ] - }, - "PhysicalPartitionThroughputInfoResultProperties": { - "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoResult object", - "type": "object", - "properties": { - "resource": { - "description": "properties of physical partition throughput info", - "allOf": [ - { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoProperties" - } - ] - } - } - }, - "PhysicalPartitionThroughputInfoProperties": { - "description": "The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object", - "type": "object", - "properties": { - "physicalPartitionThroughputInfo": { - "type": "array", - "description": "Array of physical partition throughput info objects", - "items": { - "$ref": "#/definitions/PhysicalPartitionThroughputInfoResource" - } - } - } - }, "PhysicalPartitionThroughputInfoResource": { "type": "object", "description": "PhysicalPartitionThroughputInfo object", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json index dec9a94f9f9e..7775ab2a14a3 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRedistributeThroughput.json @@ -34,32 +34,6 @@ } }, "responses": { - "200": { - "body": { - "properties": { - "resource": { - "physicalPartitionThroughputInfo": [ - { - "id": "0", - "throughput": 5000 - }, - { - "id": "1", - "throughput": 5000 - }, - { - "id": "2", - "throughput": 5000 - }, - { - "id": "3", - "throughput": 3000 - } - ] - } - } - } - }, "202": {} } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json index 1dd6957f6666..95c4e18b8322 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBMongoDBCollectionRetrieveThroughputDistribution.json @@ -22,24 +22,6 @@ } }, "responses": { - "200": { - "body": { - "properties": { - "resource": { - "physicalPartitionThroughputInfo": [ - { - "id": "0", - "throughput": 5000 - }, - { - "id": "1", - "throughput": 5000 - } - ] - } - } - } - }, "202": {} } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json index cd370aa6013e..1a04b6b205f7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRedistributeThroughput.json @@ -34,32 +34,6 @@ } }, "responses": { - "200": { - "body": { - "properties": { - "resource": { - "physicalPartitionThroughputInfo": [ - { - "id": "0", - "throughput": 5000 - }, - { - "id": "1", - "throughput": 5000 - }, - { - "id": "2", - "throughput": 5000 - }, - { - "id": "3", - "throughput": 3000 - } - ] - } - } - } - }, "202": {} } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json index 39a8784c914d..e0935f975615 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2022-02-15-preview/examples/CosmosDBSqlContainerRetrieveThroughputDistribution.json @@ -22,24 +22,6 @@ } }, "responses": { - "200": { - "body": { - "properties": { - "resource": { - "physicalPartitionThroughputInfo": [ - { - "id": "0", - "throughput": 5000 - }, - { - "id": "1", - "throughput": 5000 - } - ] - } - } - } - }, "202": {} } }