diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/operations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/operations.json new file mode 100644 index 000000000000..25d1a6bb523d --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-03-01-preview/operations.json @@ -0,0 +1,136 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-03-01-preview", + "title": "SubscriptionClient", + "description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically." + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Subscription/operations": { + "get": { + "description": "Lists all of the available Microsoft.Subscription API operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "getOperations": { + "$ref": "./examples/getOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "OperationListResult": { + "description": "Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + }, + "Operation": { + "description": "REST API operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Subscription", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + } + } + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. Current version is 2015-06-01" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} 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 85cba1b8d908..a62e75833824 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 @@ -16,36 +16,6 @@ "application/json" ], "paths": { - "/providers/Microsoft.Subscription/operations": { - "get": { - "description": "Lists all of the available Microsoft.Subscription API operations.", - "operationId": "Operations_List", - "x-ms-examples": { - "getOperations": { - "$ref": "./examples/getOperations.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, "/providers/Microsoft.Subscription/subscriptionOperations": { "get": { "description": "Lists all of the available pending Microsoft.Subscription API operations.", @@ -142,7 +112,7 @@ "description": "The created subscription object.", "properties": { "subscriptionLink": { - "description": "The link to the new subscription.", + "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", "type": "string" } } @@ -197,7 +167,7 @@ } }, "AdPrincipal": { - "description": "Active Directory Principal for subscription creation delegated permission", + "description": "Active Directory Principal who’ll get owner access on the new subscription.", "properties": { "objectId": { "description": "Object id of the Principal", @@ -237,49 +207,6 @@ "type": "string" } } - }, - "OperationListResult": { - "description": "Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of operations." - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results if there are any." - } - } - }, - "Operation": { - "description": "REST API operation", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}", - "type": "string" - }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft.Subscription", - "type": "string" - }, - "resource": { - "description": "Resource on which the operation is performed: Profile, endpoint, etc.", - "type": "string" - }, - "operation": { - "description": "Operation type: Read, write, delete, etc.", - "type": "string" - } - } - } - } } }, "parameters": { diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/getOperations.json deleted file mode 100644 index 2a0983a73798..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/examples/getOperations.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "parameters": { - "api-version": "2018-11-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.Subscription/createSubscription/action", - "display": { - "provider": "Microsoft Subscription", - "resource": "Resources", - "operation": "The operation to create a new Azure subscription" - } - } - ] - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json index ca46e6f1c464..cc487360b8bf 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2018-11-01-preview/subscriptions.json @@ -16,36 +16,6 @@ "application/json" ], "paths": { - "/providers/Microsoft.Subscription/operations": { - "get": { - "description": "Lists all of the available Microsoft.Subscription API operations.", - "operationId": "Operations_List", - "x-ms-examples": { - "getOperations": { - "$ref": "./examples/getOperations.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, "/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": { "get": { "description": "Get the status of the pending Microsoft.Subscription API operations.", @@ -151,7 +121,7 @@ "description": "The subscription creation parameters.", "required": true, "schema": { - "$ref": "#/definitions/SubscriptionCreationParameters" + "$ref": "#/definitions/ModernSubscriptionCreationParameters" } } ] @@ -168,7 +138,7 @@ } } }, - "SubscriptionCreationParameters": { + "ModernSubscriptionCreationParameters": { "description": "The parameters required to create a new subscription.", "required": ["displayName","billingProfileId","skuId"], "properties": { @@ -214,7 +184,7 @@ "type": "string" }, "message": { - "description": "Describes the error if the operation is not successful.", + "description": "Error message indicating why the operation failed.", "type": "string" } } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/examples/getOperations.json deleted file mode 100644 index 5a218ac9c563..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/examples/getOperations.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.Subscription/cancel/action", - "display": { - "provider": "Microsoft Subscription", - "resource": "Resources", - "operation": "The operation to cancel a subscription" - } - }, - { - "name": "Microsoft.Subscription/rename/action", - "display": { - "provider": "Microsoft Subscription", - "resource": "Resources", - "operation": "The operation to rename a subscription" - } - }, - { - "name": "Microsoft.Subscription/enable/action", - "display": { - "provider": "Microsoft Subscription", - "resource": "Resources", - "operation": "Enables the subscription" - } - } - ] - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json index 6ebbc4049865..b765cce499f0 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-03-01-preview/subscriptions.json @@ -16,36 +16,6 @@ "application/json" ], "paths": { - "/providers/Microsoft.Subscription/operations": { - "get": { - "description": "Lists all of the available Microsoft.Subscription API operations.", - "operationId": "Operations_List", - "x-ms-examples": { - "getOperations": { - "$ref": "./examples/getOperations.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Describes the error if the operation is not successful.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { "post": { "operationId": "Subscriptions_Cancel", @@ -151,7 +121,7 @@ }, "definitions": { "ErrorResponse": { - "description": "Describes the error if the operation is not successful.", + "description": "Describes the format of Error response.", "type": "object", "properties": { "code": { diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index eb564637e3df..91fb2a5a4ea8 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -40,6 +40,9 @@ These settings apply only when `--tag=package-2019-03-preview` is specified on t ``` yaml $(tag) == 'package-2019-03-preview' 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 description: The subscription client