From 23abe8f6ac0c1cbd0baa8fa793675643bd3abe7d Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Tue, 18 Feb 2020 16:18:57 -0800 Subject: [PATCH 1/3] CosmosDB autopilot support --- .../stable/2019-12-12/cosmos-db.json | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json index 018309c5d2ad..4735d6959973 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json @@ -5875,6 +5875,10 @@ "type": "integer", "description": "Value of the Cosmos DB resource throughput" }, + "autopilotSettings": { + "description": "Cosmos DB resource for Autopilot settings", + "$ref": "#/definitions/AutopilotSettingsResource" + }, "minimumThroughput": { "type": "string", "description": "The minimum throughput of the resource", @@ -5885,11 +5889,54 @@ "description": "The throughput replace is pending", "readOnly": true } + } + }, + "AutopilotSettingsResource": { + "type": "object", + "description": "Cosmos DB autopilot settings object", + "properties": { + "maxThroughput": { + "type": "integer", + "description": "Represents max throughput an autopilot container can operate at." + }, + "autoUpgradePolicy": { + "description": "", + "$ref": "#/definitions/AutoUpgradePolicyResource" + }, + "targetMaxThroughput": { + "type": "integer", + "description": "Represents target max throughput an autopilot container should operate at once offer is no longer in pending state.", + "readOnly": true + } }, "required": [ - "throughput" + "maxThroughput" ] }, + "AutoUpgradePolicyResource": { + "type": "object", + "description": "Cosmos DB resource auto-upgrade policy", + "properties": { + "throughputPolicy": { + "description": "Represents throughput policy which service must adhere to for auto-upgrade", + "$ref": "#/definitions/ThroughputPolicyResource" + } + } + }, + "ThroughputPolicyResource": { + "type": "object", + "description": "Cosmos DB resource throughput policy", + "properties": { + "isEnabled": { + "type": "boolean", + "description": "Determines whether the ThroughputPolicy is active or not" + }, + "incrementPercent": { + "type": "integer", + "description": "Represents the percentage by which throughput can increase every time throughput policy kicks in." + } + } + }, "SqlDatabaseResource": { "type": "object", "description": "Cosmos DB SQL database resource object", From c44b38f35cc67f889a9813cdbe277fcac6bf5381 Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Wed, 19 Feb 2020 13:22:49 -0800 Subject: [PATCH 2/3] add readme.csharp.md --- .../stable/2019-12-12/cosmos-db.json | 2 +- .../resource-manager/readme.csharp.md | 18 ++++++++++++++++++ .../cosmos-db/resource-manager/readme.md | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 specification/cosmos-db/resource-manager/readme.csharp.md diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json index 4735d6959973..4e9fefa6ca4c 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json @@ -5900,7 +5900,7 @@ "description": "Represents max throughput an autopilot container can operate at." }, "autoUpgradePolicy": { - "description": "", + "description": "Cosmos DB resource auto-upgrade policy", "$ref": "#/definitions/AutoUpgradePolicyResource" }, "targetMaxThroughput": { diff --git a/specification/cosmos-db/resource-manager/readme.csharp.md b/specification/cosmos-db/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..0952b6948046 --- /dev/null +++ b/specification/cosmos-db/resource-manager/readme.csharp.md @@ -0,0 +1,18 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.CosmosDB + output-folder: $(csharp-sdks-folder)/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated + clear-output-folder: true +``` + +``` yaml $(csharp) && !$(multiapi) && !$(csharp-profile) +namespace: Microsoft.Azure.Management.CosmosDB +output-folder: $(csharp-sdks-folder)/cosmosdb/Microsoft.Azure.Management.CosmosDB/src/Generated +``` \ 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 c6b3020e2a6b..dc2d5714759e 100644 --- a/specification/cosmos-db/resource-manager/readme.md +++ b/specification/cosmos-db/resource-manager/readme.md @@ -182,6 +182,7 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: + - repo: azure-sdk-for-net - repo: azure-sdk-for-python - repo: azure-sdk-for-java - repo: azure-sdk-for-go From 0f297a542381b151cef020f3741b9588fb7994cc Mon Sep 17 00:00:00 2001 From: Rav Gill Date: Fri, 21 Feb 2020 12:58:37 -0800 Subject: [PATCH 3/3] updated description in ThroughputSettingsResource --- .../Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json index 4e9fefa6ca4c..75ca3edd2100 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/stable/2019-12-12/cosmos-db.json @@ -5869,14 +5869,14 @@ }, "ThroughputSettingsResource": { "type": "object", - "description": "Cosmos DB resource throughput object", + "description": "Cosmos DB resource throughput object. Either throughput is required or autopilotSettings is required, but not both.", "properties": { "throughput": { "type": "integer", - "description": "Value of the Cosmos DB resource throughput" + "description": "Value of the Cosmos DB resource throughput. Either throughput is required or autopilotSettings is required, but not both." }, "autopilotSettings": { - "description": "Cosmos DB resource for Autopilot settings", + "description": "Cosmos DB resource for Autopilot settings. Either throughput is required or autopilotSettings is required, but not both.", "$ref": "#/definitions/AutopilotSettingsResource" }, "minimumThroughput": {