From 71ae97af7fa3752cfb674c8724f0558625a88c0f Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Thu, 16 Apr 2020 17:07:29 +0800 Subject: [PATCH 1/7] pricing tier swagger --- .../2019-05-01-preview/appplatform.json | 26 +++++++++++++++++++ .../examples/Services_CreateOrUpdate.json | 12 +++++++++ .../examples/Services_Get.json | 4 +++ .../examples/Services_List.json | 4 +++ .../examples/Services_ListBySubscription.json | 4 +++ .../examples/Services_Update.json | 12 +++++++++ 6 files changed, 62 insertions(+) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index ac38d29130d5..b2b4146d1f50 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2175,6 +2175,10 @@ "$ref": "#/definitions/ClusterResourceProperties", "description": "Properties of the Service resource", "x-ms-client-flatten": false + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "Sku of the Service resource" } } }, @@ -2267,6 +2271,28 @@ } } }, + "Sku": { + "description": "Sku of Azure Spring Cloud", + "type": "object", + "properties": { + "name": { + "description": "Name of the Sku", + "type": "string", + "readOnly": true + }, + "tier": { + "description": "Tier of the Sku", + "type": "string", + "readOnly": true + }, + "capacity": { + "format": "int32", + "description": "Current capacity of the target resource", + "type": "integer", + "readOnly": true + } + } + }, "ConfigServerProperties": { "description": "Config server git properties payload", "type": "object", diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json index f21f1f432b7d..0b9eb4797dc1 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json @@ -18,6 +18,10 @@ "appInsightInstrumentationKey": "00000000-0000-0000-0000-000000000000" } }, + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -53,6 +57,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -85,6 +93,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json index ebe1db60e6d2..0fd464fbf73c 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json @@ -30,6 +30,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json index ce13e8f49f54..60bff7e0b137 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json @@ -31,6 +31,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json index 818367d797a5..1e7ffa74d93f 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json @@ -30,6 +30,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json index 6f71ce79b699..6ff77da01f9b 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json @@ -18,6 +18,10 @@ "appInsightInstrumentationKey": "00000000-0000-0000-0000-000000000000" } }, + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -53,6 +57,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -85,6 +93,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" From 72872d68ccdb1e7a4dcb35a96249ecc10dc31b97 Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Fri, 17 Apr 2020 12:51:14 +0800 Subject: [PATCH 2/7] remove readonly in sku model --- .../preview/2019-05-01-preview/appplatform.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index b2b4146d1f50..5f939b053e60 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2277,13 +2277,11 @@ "properties": { "name": { "description": "Name of the Sku", - "type": "string", - "readOnly": true + "type": "string" }, "tier": { "description": "Tier of the Sku", - "type": "string", - "readOnly": true + "type": "string" }, "capacity": { "format": "int32", From 80b1b672db755a5678007a252a9ff8f7bf8a9db8 Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Mon, 11 May 2020 18:55:20 +0800 Subject: [PATCH 3/7] update appplatform json and example --- .../2019-05-01-preview/appplatform.json | 30 +++++++++++++++++-- .../examples/Services_CreateOrUpdate.json | 12 ++++++++ .../examples/Services_Get.json | 4 +++ .../examples/Services_List.json | 4 +++ .../examples/Services_ListBySubscription.json | 4 +++ .../examples/Services_Update.json | 12 ++++++++ 6 files changed, 64 insertions(+), 2 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index ac38d29130d5..b91e264bf8d1 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2175,6 +2175,10 @@ "$ref": "#/definitions/ClusterResourceProperties", "description": "Properties of the Service resource", "x-ms-client-flatten": false + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "Sku of the Service resource" } } }, @@ -2267,6 +2271,28 @@ } } }, + "Sku": { + "description": "Sku of Azure Spring Cloud", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "Name of the Sku", + "type": "string" + }, + "tier": { + "description": "Tier of the Sku", + "type": "string" + }, + "capacity": { + "format": "int32", + "description": "Current capacity of the target resource", + "type": "integer" + } + } + }, "ConfigServerProperties": { "description": "Config server git properties payload", "type": "object", @@ -3241,7 +3267,7 @@ "description": "Name of the operation", "type": "string" }, - "dataAction": { + "isDataAction": { "description": "Indicates whether the operation is a data action", "type": "boolean" }, @@ -3531,4 +3557,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json index f21f1f432b7d..0b9eb4797dc1 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_CreateOrUpdate.json @@ -18,6 +18,10 @@ "appInsightInstrumentationKey": "00000000-0000-0000-0000-000000000000" } }, + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -53,6 +57,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -85,6 +93,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json index ebe1db60e6d2..0fd464fbf73c 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Get.json @@ -30,6 +30,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json index ce13e8f49f54..60bff7e0b137 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_List.json @@ -31,6 +31,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json index 818367d797a5..1e7ffa74d93f 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_ListBySubscription.json @@ -30,6 +30,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json index 6f71ce79b699..6ff77da01f9b 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Services_Update.json @@ -18,6 +18,10 @@ "appInsightInstrumentationKey": "00000000-0000-0000-0000-000000000000" } }, + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -53,6 +57,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" @@ -85,6 +93,10 @@ "serviceId": "12345678abcd1234abcd12345678abcd" }, "type": "Microsoft.AppPlatform/Spring", + "sku": { + "name": "P0", + "tier": "Premium" + }, "location": "eastus", "tags": { "key1": "value1" From d8c61aac8b5b266ea9a3a4e142783d0067863355 Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Mon, 11 May 2020 19:13:14 +0800 Subject: [PATCH 4/7] update list sku --- .../2019-05-01-preview/appplatform.json | 160 ++++++++++++++++++ .../examples/Deployments_CreateOrUpdate.json | 4 +- .../examples/Operations_List.json | 2 +- 3 files changed, 163 insertions(+), 3 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index b91e264bf8d1..2c3bea6d06d9 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2159,6 +2159,60 @@ } } } + }, + "/skus/Spring": { + "get": { + "tags": [ + "AppPlatform" + ], + "operationId": "Sku_ListServiceSku", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ResourceTypeSkuCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/skus/Spring/apps/deployments": { + "get": { + "tags": [ + "AppPlatform" + ], + "operationId": "Sku_ListDeploymentSku", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ResourceTypeSkuCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } } }, "definitions": { @@ -3429,6 +3483,112 @@ } } }, + "ResourceTypeSkuCollection": { + "description": "Collection of supported Skus of Azure Spring Cloud resources", + "type": "object", + "properties": { + "value": { + "description": "Collection of supported Skus", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/ResourceTypeSku" + } + } + } + }, + "ResourceTypeSku": { + "description": "Supported Skus of Azure Spring Cloud resources", + "type": "object", + "properties": { + "resourceType": { + "description": "Resource type", + "type": "string" + }, + "skus": { + "description": "Supported Skus", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/SkuSetting" + } + } + } + }, + "SkuSetting": { + "description": "Supported Sku settings of Azure Spring Cloud", + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "description": "Name of the Sku", + "type": "string" + }, + "tier": { + "description": "Tier of the Sku", + "type": "string" + }, + "locations": { + "description": "Locations of the Sku", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "requiredFeatures": { + "description": "Required features of the Sku", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "capacity": { + "$ref": "#/definitions/SkuCapacity", + "description": "Capacity of the SKU" + } + } + }, + "SkuCapacity": { + "description": "The SKU capacity", + "required": [ + "minimum" + ], + "type": "object", + "properties": { + "minimum": { + "format": "int32", + "description": "Gets or sets the minimum.", + "type": "integer" + }, + "maximum": { + "format": "int32", + "description": "Gets or sets the maximum.", + "type": "integer" + }, + "default": { + "format": "int32", + "description": "Gets or sets the default.", + "type": "integer" + }, + "scaleType": { + "description": "Gets or sets the type of the scale.", + "enum": [ + "None", + "Manual", + "Automatic" + ], + "type": "string", + "x-ms-enum": { + "name": "SkuScaleType", + "modelAsString": true + } + } + } + }, "CloudError": { "description": "An error response from the service.", "properties": { diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json index d1d902e57925..0204c12e6e2b 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json @@ -49,8 +49,8 @@ }, "runtimeVersion": "Java_8" }, - "provisioningState": "Updating", - "status": "Compiling", + "provisioningState": "Creating", + "status": "Running", "active": false, "instances": [ { diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json index d80cd6b14ce0..bc83e3c0e539 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json @@ -8,7 +8,7 @@ "value": [ { "name": "Microsoft.AppPlatform/Spring/read", - "dataAction": false, + "isDataAction": false, "display": { "provider": "Microsoft Azure Distributed Managed Service for Spring", "resource": "Managed Applications", From f74f359d00f9afd2750705f468cb78003f82f8ab Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Mon, 11 May 2020 19:22:30 +0800 Subject: [PATCH 5/7] revert to data action --- .../preview/2019-05-01-preview/appplatform.json | 2 +- .../examples/Deployments_CreateOrUpdate.json | 4 ++-- .../preview/2019-05-01-preview/examples/Operations_List.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index 2c3bea6d06d9..30937d07c08e 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -3321,7 +3321,7 @@ "description": "Name of the operation", "type": "string" }, - "isDataAction": { + "dataAction": { "description": "Indicates whether the operation is a data action", "type": "boolean" }, diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json index 0204c12e6e2b..d1d902e57925 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Deployments_CreateOrUpdate.json @@ -49,8 +49,8 @@ }, "runtimeVersion": "Java_8" }, - "provisioningState": "Creating", - "status": "Running", + "provisioningState": "Updating", + "status": "Compiling", "active": false, "instances": [ { diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json index bc83e3c0e539..d80cd6b14ce0 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Operations_List.json @@ -8,7 +8,7 @@ "value": [ { "name": "Microsoft.AppPlatform/Spring/read", - "isDataAction": false, + "dataAction": false, "display": { "provider": "Microsoft Azure Distributed Managed Service for Spring", "resource": "Managed Applications", From b354832b23aab4e1f4061982fd29abe61d2879b1 Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Thu, 14 May 2020 12:21:51 +0800 Subject: [PATCH 6/7] update list skus --- .../2019-05-01-preview/appplatform.json | 35 +++++------------- .../2019-05-01-preview/examples/Sku_List.json | 36 +++++++++++++++++++ 2 files changed, 44 insertions(+), 27 deletions(-) create mode 100644 specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index 30937d07c08e..c13849ae8666 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2160,42 +2160,18 @@ } } }, - "/skus/Spring": { + "/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/skus": { "get": { "tags": [ "AppPlatform" ], - "operationId": "Sku_ListServiceSku", + "operationId": "Sku_List", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ResourceTypeSkuCollection" - } }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, - "/skus/Spring/apps/deployments": { - "get": { - "tags": [ - "AppPlatform" - ], - "operationId": "Sku_ListDeploymentSku", - "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -2211,6 +2187,11 @@ "$ref": "#/definitions/CloudError" } } + }, + "x-ms-examples": { + "Sku_List": { + "$ref": "./examples/Sku_List.json" + } } } } diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json new file mode 100644 index 000000000000..cafcff12545c --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2019-05-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "resourceType": "Spring", + "skus": [ + { + "name": "B0", + "tier": "Basic", + "locations": [ + "East US" + ], + "requiredFeatures": [ + "Microsoft.AppPlatform/SkuBasicTier" + ] + }, + { + "name": "S0", + "tier": "Standard", + "locations": [ + "East US" + ] + } + ] + } + ] + } + } + } +} From 061b7ec93df428428b6b36b81d96d711b4b73791 Mon Sep 17 00:00:00 2001 From: Zihong Chen Date: Fri, 15 May 2020 15:45:05 +0800 Subject: [PATCH 7/7] add resource sku definition --- .../2019-05-01-preview/appplatform.json | 188 ++++++++++++++---- .../2019-05-01-preview/examples/Sku_List.json | 34 ++-- 2 files changed, 170 insertions(+), 52 deletions(-) diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json index c13849ae8666..a1f91e73f7cb 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json @@ -2178,7 +2178,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ResourceTypeSkuCollection" + "$ref": "#/definitions/ResourceSkuCollection" } }, "default": { @@ -2188,6 +2188,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "Sku_List": { "$ref": "./examples/Sku_List.json" @@ -3464,72 +3467,66 @@ } } }, - "ResourceTypeSkuCollection": { - "description": "Collection of supported Skus of Azure Spring Cloud resources", + "ResourceSkuCollection": { "type": "object", "properties": { "value": { - "description": "Collection of supported Skus", + "description": "Collection of resource SKU", "uniqueItems": false, "type": "array", "items": { - "$ref": "#/definitions/ResourceTypeSku" + "$ref": "#/definitions/ResourceSku" } + }, + "nextLink": { + "description": "URL client should use to fetch the next page (per server side paging).\r\nIt's null for now, added for future use.", + "type": "string" } } }, - "ResourceTypeSku": { - "description": "Supported Skus of Azure Spring Cloud resources", + "ResourceSku": { + "description": "Describes an available Azure Spring Cloud SKU.", "type": "object", "properties": { "resourceType": { - "description": "Resource type", + "description": "Gets the type of resource the SKU applies to.", "type": "string" }, - "skus": { - "description": "Supported Skus", - "uniqueItems": false, - "type": "array", - "items": { - "$ref": "#/definitions/SkuSetting" - } - } - } - }, - "SkuSetting": { - "description": "Supported Sku settings of Azure Spring Cloud", - "required": [ - "name" - ], - "type": "object", - "properties": { "name": { - "description": "Name of the Sku", + "description": "Gets the name of SKU.", "type": "string" }, "tier": { - "description": "Tier of the Sku", + "description": "Gets the tier of SKU.", "type": "string" }, + "capacity": { + "$ref": "#/definitions/SkuCapacity", + "description": "Gets the capacity of SKU." + }, "locations": { - "description": "Locations of the Sku", + "description": "Gets the set of locations that the SKU is available.", "uniqueItems": false, "type": "array", "items": { "type": "string" } }, - "requiredFeatures": { - "description": "Required features of the Sku", + "locationInfo": { + "description": "Gets a list of locations and availability zones in those locations where the SKU is available.", "uniqueItems": false, "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ResourceSkuLocationInfo" } }, - "capacity": { - "$ref": "#/definitions/SkuCapacity", - "description": "Capacity of the SKU" + "restrictions": { + "description": "Gets the restrictions because of which SKU cannot be used. This is\r\nempty if there are no restrictions.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSkuRestrictions" + } } } }, @@ -3570,6 +3567,127 @@ } } }, + "ResourceSkuLocationInfo": { + "type": "object", + "properties": { + "location": { + "description": "Gets location of the SKU", + "type": "string" + }, + "zones": { + "description": "Gets list of availability zones where the SKU is supported.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "zoneDetails": { + "description": "Gets details of capabilities available to a SKU in specific zones.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSkuZoneDetails" + } + } + } + }, + "ResourceSkuRestrictions": { + "type": "object", + "properties": { + "type": { + "description": "Gets the type of restrictions. Possible values include: 'Location', 'Zone'", + "enum": [ + "Location", + "Zone" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceSkuRestrictionsType", + "modelAsString": true + } + }, + "values": { + "description": "Gets the value of restrictions. If the restriction type is set to\r\nlocation. This would be different locations where the SKU is restricted.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "restrictionInfo": { + "$ref": "#/definitions/ResourceSkuRestrictionInfo", + "description": "Gets the information about the restriction where the SKU cannot be used." + }, + "reasonCode": { + "description": "Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'", + "enum": [ + "QuotaId", + "NotAvailableForSubscription" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceSkuRestrictionsReasonCode", + "modelAsString": true + } + } + } + }, + "ResourceSkuZoneDetails": { + "type": "object", + "properties": { + "name": { + "description": "Gets the set of zones that the SKU is available in with the\r\nspecified capabilities.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "capabilities": { + "description": "Gets a list of capabilities that are available for the SKU in the\r\nspecified list of zones.", + "uniqueItems": false, + "type": "array", + "items": { + "$ref": "#/definitions/ResourceSkuCapabilities" + } + } + } + }, + "ResourceSkuRestrictionInfo": { + "type": "object", + "properties": { + "locations": { + "description": "Gets locations where the SKU is restricted", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + }, + "zones": { + "description": "Gets list of availability zones where the SKU is restricted.", + "uniqueItems": false, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ResourceSkuCapabilities": { + "type": "object", + "properties": { + "name": { + "description": "Gets an invariant to describe the feature.", + "type": "string" + }, + "value": { + "description": "Gets an invariant if the feature is measured by quantity.", + "type": "string" + } + } + }, "CloudError": { "description": "An error response from the service.", "properties": { @@ -3698,4 +3816,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json index cafcff12545c..99c4c8efe8e7 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/examples/Sku_List.json @@ -9,25 +9,25 @@ "value": [ { "resourceType": "Spring", - "skus": [ + "name": "B0", + "tier": "Basic", + "capacity": { + "minimum": 1, + "maximum": 20, + "default": 1, + "scaleType": "Automatic" + }, + "locations": [ + "eastus" + ], + "locationInfo": [ { - "name": "B0", - "tier": "Basic", - "locations": [ - "East US" - ], - "requiredFeatures": [ - "Microsoft.AppPlatform/SkuBasicTier" - ] - }, - { - "name": "S0", - "tier": "Standard", - "locations": [ - "East US" - ] + "location": "eastus", + "zones": [], + "zoneDetails": [] } - ] + ], + "restrictions": [] } ] }