From adfab4370eacdbea9ab8eae0594c4b0849df0b4c Mon Sep 17 00:00:00 2001 From: navysingla <47647464+navysingla@users.noreply.github.com> Date: Thu, 17 Dec 2020 01:53:10 -0800 Subject: [PATCH] Linting and Completeness fixes S360 (#11958) * New Version for subscription RP * S360 fixes * Update readme.md * Update subscriptions.json * Update subscriptions.json * Update subscriptions.json --- .../examples/getSubscriptionOperation.json | 19 ++++++ .../2018-03-01-preview/subscriptions.json | 61 +++++++++++++++++++ .../subscription/resource-manager/readme.md | 1 - 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/examples/getSubscriptionOperation.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/examples/getSubscriptionOperation.json new file mode 100644 index 000000000000..d3296400b9cf --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/examples/getSubscriptionOperation.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", + "api-version": "2018-03-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2018-03-01-preview", + "Retry-After": 8 + } + }, + "200": { + "body": { + "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json index a62e75833824..2cfd7b72a0ce 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json @@ -46,6 +46,57 @@ ] } }, + "/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": { + "get": { + "description": "Get the status of the pending Microsoft.Subscription API operations.", + "operationId": "SubscriptionOperation_Get", + "x-ms-examples": { + "getPendingSubscriptionOperations": { + "$ref": "./examples/getSubscriptionOperation.json" + } + }, + "responses": { + "200": { + "description": "Successful completion of the asynchronous operation", + "schema": { + "$ref": "#/definitions/SubscriptionCreationResult" + } + }, + "202": { + "description": "Accepted. Subscription update is in progress.", + "headers": { + "Location": { + "description": "The URL where the status of the asynchronous operation can be checked.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "type": "integer", + "format": "int64" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "parameters": [ + { + "name": "operationId", + "in": "path", + "description": "The operation ID, which can be found from the Location field in the generate recommendation response header.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, "/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountName}/providers/Microsoft.Subscription/createSubscription": { "post": { "description": "Creates an Azure subscription", @@ -166,6 +217,16 @@ } } }, + "ErrorResponseBody": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorResponse" + } + } + }, "AdPrincipal": { "description": "Active Directory Principal who’ll get owner access on the new subscription.", "properties": { diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index af2761560070..60e9657946a6 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -77,7 +77,6 @@ These settings apply only when `--tag=package-2019-03-preview` is specified on t input-file: - Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json - Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json -- Microsoft.Subscription/preview/2018-03-01-preview/subscriptions.json - Microsoft.Subscription/preview/2018-03-01-preview/operations.json - Microsoft.Subscription/stable/2016-06-01/subscriptions.json title: SubscriptionClient