From 5296bd56232a510b0c3139156778ad97014793e5 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Sun, 11 Jun 2023 23:32:21 -0700 Subject: [PATCH 01/27] Resolving S320 Item - Missing Get SubscriptionOperations for 2021-10-01 version. --- .../examples/getSubscriptionOperation.json | 19 +++++++ .../stable/2021-10-01/subscriptions.json | 53 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json new file mode 100644 index 000000000000..fdbed844fba1 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", + "api-version": "2021-10-01" + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01", + "Retry-After": 8 + } + }, + "200": { + "body": { + "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index 6fd06515f344..9e83fab81ee0 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -118,6 +118,50 @@ } } }, + "/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" + } + } + } + }, + "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.Subscription/operations": { "get": { "description": "Lists all of the available Microsoft.Subscription API operations.", @@ -573,6 +617,15 @@ } } }, + "SubscriptionCreationResult": { + "description": "The created subscription object.", + "properties": { + "subscriptionLink": { + "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", + "type": "string" + } + } + }, "SubscriptionName": { "type": "object", "description": "The new name of the subscription.", From b6b053ee36a5157e3f46b757ed9d3e5aecc84257 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Mon, 12 Jun 2023 00:23:18 -0700 Subject: [PATCH 02/27] Fix pipeline suggestions. --- .../stable/2021-10-01/subscriptions.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index 9e83fab81ee0..71479b5591d2 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -127,6 +127,7 @@ "$ref": "./examples/getSubscriptionOperation.json" } }, + "x-ms-long-running-operation": true, "responses": { "200": { "description": "Successful completion of the asynchronous operation", @@ -143,9 +144,16 @@ }, "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" + "type": "integer", + "format": "int64" } } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } } }, "parameters": [ @@ -619,6 +627,7 @@ }, "SubscriptionCreationResult": { "description": "The created subscription object.", + "type": "object", "properties": { "subscriptionLink": { "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", From 4936e00f30d12f9c8d7f3e490336d47f4df1449b Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Mon, 12 Jun 2023 00:28:26 -0700 Subject: [PATCH 03/27] Minor fix. --- .../Microsoft.Subscription/stable/2021-10-01/subscriptions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index 71479b5591d2..876606b1f4d2 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -152,7 +152,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, From 0d9210140459bf291060394b6dbe24a07e6fd505 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 16 Jun 2023 19:52:33 -0700 Subject: [PATCH 04/27] Make Get Subscription operations sync in this version. --- .../Microsoft.Subscription/stable/2021-10-01/subscriptions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index 876606b1f4d2..08106f640315 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -127,7 +127,6 @@ "$ref": "./examples/getSubscriptionOperation.json" } }, - "x-ms-long-running-operation": true, "responses": { "200": { "description": "Successful completion of the asynchronous operation", From 77ea8065b33a3939a91dc46698bb826b7bfb259c Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 20 Jun 2023 13:59:59 -0700 Subject: [PATCH 05/27] Added suppress rules for failing lint errors. --- specification/subscription/resource-manager/readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index b4f3b2c907d6..c138fb0c1e67 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -42,6 +42,17 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma input-file: - Microsoft.Subscription/stable/2016-06-01/subscriptions.json - Microsoft.Subscription/stable/2021-10-01/subscriptions.json +directive: + - where: + - $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"] + suppress: + - LroExtension + reason: Avoid Lro changes on this api to return 202. + - where: + - $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"] + suppress: + - GetOperation200 + reason: This api will return 200 and 202 response. title: SubscriptionClient description: The subscription client ``` From 792cb8ad895aaa1072263539b98c7e41e2010abe Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 28 Jun 2023 14:24:18 -0700 Subject: [PATCH 06/27] Fix suppression Issues. --- .../subscription/resource-manager/readme.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index c138fb0c1e67..64d374bd12a6 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -23,6 +23,14 @@ To see additional help and options, run: ``` yaml directive: - suppress: R2059 + - suppress: LroExtension + from: subscriptions.json + where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get' + reason: Avoid Lro changes on this api to return 202. + - suppress: GetOperation200 + from: subscriptions.json + where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get' + reason: This api will return 200 and 202 response. ``` @@ -42,17 +50,6 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma input-file: - Microsoft.Subscription/stable/2016-06-01/subscriptions.json - Microsoft.Subscription/stable/2021-10-01/subscriptions.json -directive: - - where: - - $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"] - suppress: - - LroExtension - reason: Avoid Lro changes on this api to return 202. - - where: - - $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"] - suppress: - - GetOperation200 - reason: This api will return 200 and 202 response. title: SubscriptionClient description: The subscription client ``` From 80cf2cf0f0b4d9076bdb339446546ccab03d7597 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 28 Jun 2023 14:48:43 -0700 Subject: [PATCH 07/27] Minor fix suppression GetOperation200. --- specification/subscription/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 64d374bd12a6..5617de2a2507 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -29,7 +29,7 @@ directive: reason: Avoid Lro changes on this api to return 202. - suppress: GetOperation200 from: subscriptions.json - where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get' + where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses' reason: This api will return 200 and 202 response. ``` From 7f286d7abc5ae726531528986fda9e4176ecdc92 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 28 Jun 2023 23:09:28 -0700 Subject: [PATCH 08/27] Address minor fixes. --- .../stable/2021-10-01/subscriptions.json | 2 +- specification/subscription/resource-manager/readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index 08106f640315..f9ff4225fe8a 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -151,7 +151,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponseBody" } } }, diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 5617de2a2507..d686f6c1b476 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -25,11 +25,11 @@ directive: - suppress: R2059 - suppress: LroExtension from: subscriptions.json - where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get' + where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get reason: Avoid Lro changes on this api to return 202. - suppress: GetOperation200 from: subscriptions.json - where: '$.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses' + where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get reason: This api will return 200 and 202 response. ``` From 30be453a97b9a4d64b1a7a6e45d7364bfbf4d8a2 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Thu, 29 Jun 2023 13:02:16 -0700 Subject: [PATCH 09/27] Address GetOperation200 changes. --- specification/subscription/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index d686f6c1b476..c4a643f48a2e 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -29,7 +29,7 @@ directive: reason: Avoid Lro changes on this api to return 202. - suppress: GetOperation200 from: subscriptions.json - where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get + where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses reason: This api will return 200 and 202 response. ``` From 41f8f34937be245a855ff49552ecdeb0213ca525 Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Thu, 29 Jun 2023 23:01:18 -0700 Subject: [PATCH 10/27] Update readme.md: attempt suppression fix by adding ["202"] to "responses" to path --- specification/subscription/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index c4a643f48a2e..0da990acfcbd 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -29,7 +29,7 @@ directive: reason: Avoid Lro changes on this api to return 202. - suppress: GetOperation200 from: subscriptions.json - where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses + where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses["202"] reason: This api will return 200 and 202 response. ``` From 7ed3713f731fa6961ce35ce96ac4ecc043d0af22 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Thu, 18 Jul 2024 16:56:08 -0700 Subject: [PATCH 11/27] Add Initiate, Get and Accept Subscription Change Directory Api with new version. --- .../examples/acceptTargetDirectory.json | 9 + .../examples/getTargetDirectory.json | 22 ++ .../examples/putTargetDirectory.json | 28 ++ .../examples/targetDirectoryStatus.json | 13 + .../2020-03-01-preview/subscriptions.json | 316 ++++++++++++++++++ 5 files changed, 388 insertions(+) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json new file mode 100644 index 000000000000..e41cc1958c73 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "subscriptionId": "6c3c85bc-5366-4eaa-8055-a10529eafd03", + "api-version": "2020-03-01-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json new file mode 100644 index 000000000000..823c6a249d8a --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "id":"subscriptions/ebe4f8fd-d8b3-4867-bcf4-b2407edd196d/providers/Microsoft.Subscription/changeTenantRequest/default", + "name":"default", + "type":"Microsoft.Subscription/changeTenantRequest", + "properties": + { + "destinationTenantId":"45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationEmailId":"abhaypratap@live.com", + "status":"Initiated", + "expiresOn":"2024-07-19T17:57:40.0278346Z" + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json new file mode 100644 index 000000000000..d69f169644f8 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", + "api-version": "2020-03-01-preview", + "body": { + "properties":{ + "destinationEmail":"abhaypratap@live.com", + "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130" + } + } + }, + "responses": { + "200": { + "body": { + "id":"subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", + "name":"default", + "type":"Microsoft.Subscription/changeTenantRequest", + "properties": + { + "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130", + "destinationEmailId":"abhaypratap@live.com", + "status":"Initiated", + "expiresOn":"2024-07-19T17:57:40.0278346Z" + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json new file mode 100644 index 000000000000..3ec6dfa21c4a --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "e1084a54-27ab-4b72-a3ba-89fac9548f49", + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "status": "Completed" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json new file mode 100644 index 000000000000..0bc192297ccc --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json @@ -0,0 +1,316 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default": { + "put": { + "operationId": "Subscriptions_PutTargetDirectory", + "x-ms-examples": { + "cancelSubscription": { + "$ref": "./examples/putTargetDirectory.json" + } + }, + "description": "The operation to initiate Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/targetDirectoryRequestParameters" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + }, + "get": { + "operationId": "Subscriptions_GetTargetDirectory", + "x-ms-examples": { + "renameSubscription": { + "$ref": "./examples/getTargetDirectory.json" + } + }, + "description": "The operation to view Initiator Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptChangeTenant": { + "post": { + "operationId": "Subscriptions_AcceptTargetDirectory", + "x-ms-examples": { + "enableSubscription": { + "$ref": "./examples/acceptTargetDirectory.json" + } + }, + "description": "The operation to accept Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Subscription Accepted properly with No Content." + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/changeTenantStatus": { + "post": { + "operationId": "Subscriptions_TargetDirectoryStatus", + "x-ms-examples": { + "enableSubscription": { + "$ref": "./examples/targetDirectoryStatus.json" + } + }, + "description": "The operation for Acceptor to view the accepted request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryStatusResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + } + }, + "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" + } + } + }, + "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" + }, + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "TargetDirectoryRequest": { + "type": "object", + "description": "Subscription Request for Changed Target Directory.", + "properties": { + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." + } + }, + "TargetDirectoryRequestProperties": { + "type":"object", + "description": "Properties of subscription Request for Changed Target Directory.", + "properties":{ + "destinationEmail": { + "description": "The destination Email id where subscription needs to be accepted", + "type": "string", + "readOnly": true + }, + "destinationTenantId": { + "description": "The destination Tenant id where subscription needs to be accepted", + "type": "string", + "readOnly": true + } + } + }, + "TargetDirectoryStatusResult":{ + "type":"object", + "description":"Subscription Status for accepted request.", + "properties":{ + "status":{ + "description":"Subscription Status", + "type":"string", + "readonly": true + } + } + }, + "TargetDirectoryResult":{ + "type":"object", + "description":"Subscription Response for Changed Target Directory.", + "properties": { + "id": { + "description": "Fully qualified ID for the Subscription Changed Directory resource.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Subscription Name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/TargetDirectoryResultProperties", + "description": "Subscription Changed Target Directory response properties." + } + } + }, + "TargetDirectoryResultProperties":{ + "type":"object", + "description":"Properties of subscription Response for Changed Target Directory.", + "properties":{ + "destinationTenantId": { + "description": "Destination Tenant Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationEmailId": { + "description": "Destination Email Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Subscription Status.", + "readOnly": true, + "type": "string" + }, + "expiresOn": { + "description": "Subscription Initiate Request Expiry time", + "readOnly": true, + "type": "string", + "format": "date-time" + } + } + } + }, + "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 2020-03-01-preview" + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription Id." + }, + "targetDirectoryRequestParameters": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Target Directory Request", + "schema": { + "$ref": "#/definitions/TargetDirectoryRequest" + } + } + }, + "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" + } + } + } +} From 432cd665bc904145f67204181bcc789712840f0a Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Thu, 18 Jul 2024 17:05:02 -0700 Subject: [PATCH 12/27] Cleaning up the changes in the add-ons inside swagger files. --- .../examples/getSubscriptionOperation.json | 19 ------ .../stable/2021-10-01/subscriptions.json | 61 ------------------- .../subscription/resource-manager/readme.md | 8 --- 3 files changed, 88 deletions(-) delete mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json deleted file mode 100644 index fdbed844fba1..000000000000 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/getSubscriptionOperation.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parameters": { - "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", - "api-version": "2021-10-01" - }, - "responses": { - "202": { - "headers": { - "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01", - "Retry-After": 8 - } - }, - "200": { - "body": { - "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" - } - } - } -} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json index f9ff4225fe8a..6fd06515f344 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json @@ -118,57 +118,6 @@ } } }, - "/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.Subscription/operations": { "get": { "description": "Lists all of the available Microsoft.Subscription API operations.", @@ -624,16 +573,6 @@ } } }, - "SubscriptionCreationResult": { - "description": "The created subscription object.", - "type": "object", - "properties": { - "subscriptionLink": { - "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", - "type": "string" - } - } - }, "SubscriptionName": { "type": "object", "description": "The new name of the subscription.", diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 0da990acfcbd..b4f3b2c907d6 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -23,14 +23,6 @@ To see additional help and options, run: ``` yaml directive: - suppress: R2059 - - suppress: LroExtension - from: subscriptions.json - where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get - reason: Avoid Lro changes on this api to return 202. - - suppress: GetOperation200 - from: subscriptions.json - where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses["202"] - reason: This api will return 200 and 202 response. ``` From ba523509d5efa380cb55a98b6129785649a965a3 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Thu, 18 Jul 2024 17:09:21 -0700 Subject: [PATCH 13/27] Add or modified readme file. --- specification/subscription/resource-manager/readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index b4f3b2c907d6..364f5c9377d6 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -69,6 +69,17 @@ title: SubscriptionClient description: The subscription client ``` +### Tag: package-2020-03-preview + +These settings apply only when `--tag=package-2020-03-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2020-03-preview' +input-file: +- Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json +title: Initiate, Get and Accept Subscription Changed Directory +description: Initiate, Get and Accept Subscription Changed Directory +``` + ### Tag: package-2019-10-preview These settings apply only when `--tag=package-2019-10-preview` is specified on the command line. From 1eeeffa42dd860e8f75d4fba11d33ea863a8699b Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 26 Jul 2024 16:19:50 -0700 Subject: [PATCH 14/27] Fix pipeline issues. --- .../examples/getOperations.json | 21 +++++ .../examples/getTargetDirectory.json | 19 ++-- .../2020-03-01-preview/subscriptions.json | 86 +++++++++++++------ 3 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json new file mode 100644 index 000000000000..7fed4dc6edda --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2020-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Subscription/createOperation/action", + "display": { + "provider": "Microsoft Subscription", + "resource": "Resources", + "operation": "Create a subscription" + } + } + ] + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json index 823c6a249d8a..422b35925db9 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json @@ -6,16 +6,15 @@ "responses": { "200": { "body": { - "id":"subscriptions/ebe4f8fd-d8b3-4867-bcf4-b2407edd196d/providers/Microsoft.Subscription/changeTenantRequest/default", - "name":"default", - "type":"Microsoft.Subscription/changeTenantRequest", - "properties": - { - "destinationTenantId":"45ffe2da-b7a4-460f-9e4c-51afd47b94cb", - "destinationEmailId":"abhaypratap@live.com", - "status":"Initiated", - "expiresOn":"2024-07-19T17:57:40.0278346Z" - } + "id": "subscriptions/ebe4f8fd-d8b3-4867-bcf4-b2407edd196d/providers/Microsoft.Subscription/changeTenantRequest/default", + "name": "default", + "type": "Microsoft.Subscription/changeTenantRequest", + "properties": { + "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationEmailId": "abhaypratap@live.com", + "status": "Initiated", + "expiresOn": "2024-07-19T17:57:40.0278346Z" + } } } } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json index 0bc192297ccc..5d2399dfa580 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json @@ -20,7 +20,7 @@ "put": { "operationId": "Subscriptions_PutTargetDirectory", "x-ms-examples": { - "cancelSubscription": { + "putTargetDirectory": { "$ref": "./examples/putTargetDirectory.json" } }, @@ -37,6 +37,12 @@ } ], "responses": { + "201": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryResult" + } + }, "200": { "description": "OK. The request has succeeded.", "schema": { @@ -54,7 +60,7 @@ "get": { "operationId": "Subscriptions_GetTargetDirectory", "x-ms-examples": { - "renameSubscription": { + "getTargetDirectory": { "$ref": "./examples/getTargetDirectory.json" } }, @@ -87,7 +93,7 @@ "post": { "operationId": "Subscriptions_AcceptTargetDirectory", "x-ms-examples": { - "enableSubscription": { + "acceptTargetDirectory": { "$ref": "./examples/acceptTargetDirectory.json" } }, @@ -117,7 +123,7 @@ "post": { "operationId": "Subscriptions_TargetDirectoryStatus", "x-ms-examples": { - "enableSubscription": { + "targetDirectoryStatus": { "$ref": "./examples/targetDirectoryStatus.json" } }, @@ -145,6 +151,36 @@ } } } + }, + "/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": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -184,14 +220,14 @@ "type": "object", "description": "Subscription Request for Changed Target Directory.", "properties": { - "$ref": "#/definitions/TargetDirectoryRequestProperties", - "description": "Target Directory request properties." - } + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." + } }, "TargetDirectoryRequestProperties": { - "type":"object", + "type": "object", "description": "Properties of subscription Request for Changed Target Directory.", - "properties":{ + "properties": { "destinationEmail": { "description": "The destination Email id where subscription needs to be accepted", "type": "string", @@ -204,20 +240,21 @@ } } }, - "TargetDirectoryStatusResult":{ - "type":"object", - "description":"Subscription Status for accepted request.", - "properties":{ - "status":{ - "description":"Subscription Status", - "type":"string", + "TargetDirectoryStatusResult": { + "type": "object", + "description": "Subscription Status for accepted request.", + "properties": { + "status": { + "description": "Subscription Status", + "type": "string", "readonly": true } } }, - "TargetDirectoryResult":{ - "type":"object", - "description":"Subscription Response for Changed Target Directory.", + "TargetDirectoryResult": { + "type": "object", + "x-ms-azure-resource": true, + "description": "Subscription Response for Changed Target Directory.", "properties": { "id": { "description": "Fully qualified ID for the Subscription Changed Directory resource.", @@ -240,10 +277,10 @@ } } }, - "TargetDirectoryResultProperties":{ - "type":"object", - "description":"Properties of subscription Response for Changed Target Directory.", - "properties":{ + "TargetDirectoryResultProperties": { + "type": "object", + "description": "Properties of subscription Response for Changed Target Directory.", + "properties": { "destinationTenantId": { "description": "Destination Tenant Id where Subscription will be accepted.", "readOnly": true, @@ -271,6 +308,7 @@ "parameters": { "apiVersionParameter": { "name": "api-version", + "x-ms-parameter-location": "method", "in": "query", "required": true, "type": "string", @@ -294,7 +332,7 @@ "$ref": "#/definitions/TargetDirectoryRequest" } } - }, + }, "security": [ { "azure_auth": [ From e6decdff81671a65c01d72ba8bd63a7b35b5e05e Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 26 Jul 2024 17:24:45 -0700 Subject: [PATCH 15/27] Fixes on lint errors, model errors. --- .../examples/putTargetDirectory.json | 20 +++---- .../2020-03-01-preview/subscriptions.json | 55 +++++++++++++++++-- 2 files changed, 60 insertions(+), 15 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json index d69f169644f8..1c81d2919172 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json @@ -12,16 +12,16 @@ "responses": { "200": { "body": { - "id":"subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", - "name":"default", - "type":"Microsoft.Subscription/changeTenantRequest", - "properties": - { - "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130", - "destinationEmailId":"abhaypratap@live.com", - "status":"Initiated", - "expiresOn":"2024-07-19T17:57:40.0278346Z" - } + "id":"subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", + "name":"default", + "type":"Microsoft.Subscription/changeTenantRequest", + "properties": + { + "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130", + "destinationEmailId":"abhaypratap@live.com", + "status":"Initiated", + "expiresOn":"2024-07-19T17:57:40.0278346Z" + } } } } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json index 5d2399dfa580..51200b973bfb 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json @@ -152,7 +152,7 @@ } } }, - "/providers/Microsoft.Subscription/operations": { + "/providers/Microsoft.Subscription/operations": { "get": { "description": "Lists all of the available Microsoft.Subscription API operations.", "operationId": "Operations_List", @@ -170,13 +170,13 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + "$ref": "#/definitions/OperationListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" } } } @@ -220,8 +220,10 @@ "type": "object", "description": "Subscription Request for Changed Target Directory.", "properties": { - "$ref": "#/definitions/TargetDirectoryRequestProperties", - "description": "Target Directory request properties." + "properties": { + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." + } } }, "TargetDirectoryRequestProperties": { @@ -303,6 +305,49 @@ "format": "date-time" } } + }, + "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": { From 6a9c122970f69a812c64bd3ddb04ea16d884dc0c Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 26 Jul 2024 17:52:22 -0700 Subject: [PATCH 16/27] Address PR changes. --- .../2020-03-01-preview/subscriptions.json | 65 +++---------------- 1 file changed, 8 insertions(+), 57 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json index 51200b973bfb..707b87a1de93 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json @@ -37,12 +37,6 @@ } ], "responses": { - "201": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/TargetDirectoryResult" - } - }, "200": { "description": "OK. The request has succeeded.", "schema": { @@ -170,15 +164,18 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } } @@ -232,13 +229,11 @@ "properties": { "destinationEmail": { "description": "The destination Email id where subscription needs to be accepted", - "type": "string", - "readOnly": true + "type": "string" }, "destinationTenantId": { "description": "The destination Tenant id where subscription needs to be accepted", - "type": "string", - "readOnly": true + "type": "string" } } }, @@ -248,8 +243,7 @@ "properties": { "status": { "description": "Subscription Status", - "type": "string", - "readonly": true + "type": "string" } } }, @@ -305,49 +299,6 @@ "format": "date-time" } } - }, - "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": { From 1ecb602104c969966f186198e02cf22f90b4ff08 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 6 Aug 2024 10:52:03 -0700 Subject: [PATCH 17/27] Address swagger PR fixes. --- .../examples/acceptTargetDirectory.json | 2 +- .../examples/getOperations.json | 2 +- .../examples/getTargetDirectory.json | 3 +- .../examples/putTargetDirectory.json | 5 +- .../examples/targetDirectoryStatus.json | 2 +- .../subscriptions.json | 115 +++++++++++++++++- 6 files changed, 119 insertions(+), 10 deletions(-) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/examples/acceptTargetDirectory.json (75%) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/examples/getOperations.json (91%) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/examples/getTargetDirectory.json (84%) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/examples/putTargetDirectory.json (81%) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/examples/targetDirectoryStatus.json (82%) rename specification/subscription/resource-manager/Microsoft.Subscription/preview/{2020-03-01-preview => 2024-08-01-preview}/subscriptions.json (75%) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json similarity index 75% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json index e41cc1958c73..57c38e41ba67 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/acceptTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "6c3c85bc-5366-4eaa-8055-a10529eafd03", - "api-version": "2020-03-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "204": {} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json similarity index 91% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json index 7fed4dc6edda..1749863f9a35 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getOperations.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2020-03-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "200": { diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json similarity index 84% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json index 422b35925db9..8a8dae879861 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/getTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", - "api-version": "2020-03-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "200": { @@ -11,6 +11,7 @@ "type": "Microsoft.Subscription/changeTenantRequest", "properties": { "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationObjectId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", "destinationEmailId": "abhaypratap@live.com", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json similarity index 81% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json index 1c81d2919172..049e8128c0fe 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -1,10 +1,10 @@ { "parameters": { "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", - "api-version": "2020-03-01-preview", + "api-version": "2024-08-01-preview", "body": { "properties":{ - "destinationEmail":"abhaypratap@live.com", + "destinationOwnerId":"abhaypratap@live.com", "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130" } } @@ -18,6 +18,7 @@ "properties": { "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130", + "destinationObjectId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", "destinationEmailId":"abhaypratap@live.com", "status":"Initiated", "expiresOn":"2024-07-19T17:57:40.0278346Z" diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json similarity index 82% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json index 3ec6dfa21c4a..de1f6c01ef19 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/examples/targetDirectoryStatus.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "e1084a54-27ab-4b72-a3ba-89fac9548f49", - "api-version": "2020-03-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "200": { diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json similarity index 75% rename from specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json rename to specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index 707b87a1de93..08fd2dff91a1 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2020-03-01-preview", + "version": "2024-08-01-preview", "title": "SubscriptionClient", "description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically." }, @@ -178,6 +178,108 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { + "post": { + "operationId": "Subscription_Cancel", + "x-ms-examples": { + "cancelSubscription": { + "$ref": "./examples/cancelSubscription.json" + } + }, + "description": "The operation to cancel a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CanceledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { + "post": { + "operationId": "Subscription_Rename", + "x-ms-examples": { + "renameSubscription": { + "$ref": "./examples/renameSubscription.json" + } + }, + "description": "The operation to rename a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/subscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/RenamedSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { + "post": { + "operationId": "Subscription_Enable", + "x-ms-examples": { + "enableSubscription": { + "$ref": "./examples/enableSubscription.json" + } + }, + "description": "The operation to enable a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/EnabledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } } }, "definitions": { @@ -227,8 +329,8 @@ "type": "object", "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "destinationEmail": { - "description": "The destination Email id where subscription needs to be accepted", + "destinationOwnerId": { + "description": "The destination OwnerId, can be object id or email address", "type": "string" }, "destinationTenantId": { @@ -282,6 +384,11 @@ "readOnly": true, "type": "string" }, + "destinationObjectId": { + "description": "Destination Object Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, "destinationEmailId": { "description": "Destination Email Id where Subscription will be accepted.", "readOnly": true, @@ -308,7 +415,7 @@ "in": "query", "required": true, "type": "string", - "description": "Version of the API to be used with the client request. Current version is 2020-03-01-preview" + "description": "Version of the API to be used with the client request. Current version is 2024-08-01-preview" }, "subscriptionIdParameter": { "name": "subscriptionId", From 9c7f2737f5e446d6851ea65bb69cc60c97638025 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 6 Aug 2024 18:19:12 -0700 Subject: [PATCH 18/27] Fixing swagger changes. --- .../examples/getOperations.json | 34 +++--- .../examples/putTargetDirectory.json | 23 ++-- .../2024-08-01-preview/subscriptions.json | 104 +----------------- .../subscription/resource-manager/readme.md | 22 ++-- 4 files changed, 40 insertions(+), 143 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json index 1749863f9a35..aa3c6fda7d66 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json @@ -1,21 +1,21 @@ { - "parameters": { - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.Subscription/createOperation/action", - "display": { - "provider": "Microsoft Subscription", - "resource": "Resources", - "operation": "Create a subscription" - } + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Subscription/createOperation/action", + "display": { + "provider": "Microsoft Subscription", + "resource": "Resources", + "operation": "Create a subscription" } - ] - } + } + ] } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json index 049e8128c0fe..bb7e280ad87e 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -3,25 +3,24 @@ "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", "api-version": "2024-08-01-preview", "body": { - "properties":{ - "destinationOwnerId":"abhaypratap@live.com", - "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130" + "properties": { + "destinationOwnerId": "abhaypratap@live.com", + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130" } } }, "responses": { "200": { "body": { - "id":"subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", - "name":"default", - "type":"Microsoft.Subscription/changeTenantRequest", - "properties": - { - "destinationTenantId":"111a82eb-4c7b-48bb-962b-49363c510130", + "id": "subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", + "name": "default", + "type": "Microsoft.Subscription/changeTenantRequest", + "properties": { + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130", "destinationObjectId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", - "destinationEmailId":"abhaypratap@live.com", - "status":"Initiated", - "expiresOn":"2024-07-19T17:57:40.0278346Z" + "destinationEmailId": "abhaypratap@live.com", + "status": "Initiated", + "expiresOn": "2024-07-19T17:57:40.0278346Z" } } } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index 08fd2dff91a1..9aaf4c21d412 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -146,7 +146,7 @@ } } }, - "/providers/Microsoft.Subscription/operations": { + "/providers/Microsoft.Subscription/operations": { "get": { "description": "Lists all of the available Microsoft.Subscription API operations.", "operationId": "Operations_List", @@ -178,108 +178,6 @@ "nextLinkName": "nextLink" } } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { - "post": { - "operationId": "Subscription_Cancel", - "x-ms-examples": { - "cancelSubscription": { - "$ref": "./examples/cancelSubscription.json" - } - }, - "description": "The operation to cancel a subscription", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/CanceledSubscriptionId" - } - }, - "default": { - "description": "Describes the error if the operation is not successful.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { - "post": { - "operationId": "Subscription_Rename", - "x-ms-examples": { - "renameSubscription": { - "$ref": "./examples/renameSubscription.json" - } - }, - "description": "The operation to rename a subscription", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/subscriptionNameParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/RenamedSubscriptionId" - } - }, - "default": { - "description": "Describes the error if the operation is not successful.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { - "post": { - "operationId": "Subscription_Enable", - "x-ms-examples": { - "enableSubscription": { - "$ref": "./examples/enableSubscription.json" - } - }, - "description": "The operation to enable a subscription", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnabledSubscriptionId" - } - }, - "default": { - "description": "Describes the error if the operation is not successful.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } } }, "definitions": { diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 364f5c9377d6..59a558c8568f 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -34,6 +34,17 @@ openapi-type: arm tag: package-2021-10 ``` +### Tag: package-2024-08-preview + +These settings apply only when `--tag=package-2024-08-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2024-08-preview' +input-file: +- Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +title: Initiate, Get and Accept Subscription Changed Directory +description: Initiate, Get and Accept Subscription Changed Directory +``` + ### Tag: package-2021-10 These settings apply only when `--tag=package-2021-10` is specified on the command line. @@ -69,17 +80,6 @@ title: SubscriptionClient description: The subscription client ``` -### Tag: package-2020-03-preview - -These settings apply only when `--tag=package-2020-03-preview` is specified on the command line. - -``` yaml $(tag) == 'package-2020-03-preview' -input-file: -- Microsoft.Subscription/preview/2020-03-01-preview/subscriptions.json -title: Initiate, Get and Accept Subscription Changed Directory -description: Initiate, Get and Accept Subscription Changed Directory -``` - ### Tag: package-2019-10-preview These settings apply only when `--tag=package-2019-10-preview` is specified on the command line. From 4f5f42ba6f3d0a9837abbff9c0194c1bdf626766 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 6 Aug 2024 19:04:45 -0700 Subject: [PATCH 19/27] Fix breaking changes paths to include into this new version. --- .../examples/acceptOwnershipStatus.json | 21 + .../examples/acceptSubscriptionOwnership.json | 25 + .../examples/cancelSubscription.json | 13 + .../examples/changeTenantPolicy.json | 31 + .../examples/createAlias.json | 74 ++ .../examples/deleteAlias.json | 10 + .../examples/enableSubscription.json | 13 + .../2024-08-01-preview/examples/getAlias.json | 32 + .../examples/getBillingAccountPolicy.json | 24 + .../examples/getSubscriptionOperation.json | 19 + .../examples/getTenantPolicy.json | 23 + .../examples/getTenantPolicyList.json | 28 + .../examples/listAlias.json | 58 + .../examples/renameSubscription.json | 16 + .../2024-08-01-preview/subscriptions.json | 1148 ++++++++++++++++- 15 files changed, 1484 insertions(+), 51 deletions(-) create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json create mode 100644 specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json new file mode 100644 index 000000000000..13f52e9b4d78 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "acceptOwnershipState": "Pending", + "provisioningState": "Accepted", + "billingOwner": "abc@test.com", + "subscriptionTenantId": "6c541ca7-1cab-4ea0-adde-6305e1d534e2", + "displayName": "Test Subscription", + "tags": { + "tag1": "TagValue1" + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json new file mode 100644 index 000000000000..3d158ef25a3e --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2021-10-01", + "Retry-After": 8 + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json new file mode 100644 index 000000000000..c81326570087 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json new file mode 100644 index 000000000000..74c83ca6013d --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview", + "body": { + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json new file mode 100644 index 000000000000..a784c3224a9a --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "workload": "Production", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "subscriptionId": null, + "additionalProperties": { + "managementGroupId": null, + "subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8", + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + }, + "201": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json new file mode 100644 index 000000000000..55c7df90ba0e --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json new file mode 100644 index 000000000000..a0a4e4d470de --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d" + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json new file mode 100644 index 000000000000..f60873bb4ef2 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json new file mode 100644 index 000000000000..ab2107e99fac --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "billingAccountId": "testBillingAccountId", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Subscription/Policies/policyForBillingAccount", + "name": "testBillingAccountId", + "type": "Microsoft.Subscription/policies", + "properties": { + "serviceTenants": [ + { + "tenantName": "testServiceTenant", + "tenantId": "b8ed2088-c458-4e77-bd61-9e048d96a1c0" + } + ], + "allowTransfers": true + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json new file mode 100644 index 000000000000..aec7aaffbbe8 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", + "api-version": "2024-08-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01", + "Retry-After": 8 + } + }, + "200": { + "body": { + "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json new file mode 100644 index 000000000000..1ab0fd9bea10 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json new file mode 100644 index 000000000000..980f70edaa02 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + ], + "nextLink": null + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json new file mode 100644 index 000000000000..8674d6d28b3d --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + }, + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "091c6e56-a835-4422-a082-0427308ca9ee", + "displayName": "Test Subscription 2", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/091c6e56-a835-4422-a082-0427308ca9ee/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi2", + "tag2": "Ronaldo2", + "tag3": "Lebron2" + } + } + } + ], + "nextLink": null + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json new file mode 100644 index 000000000000..565f8fdf1dd3 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview", + "body": { + "subscriptionName": "Test Sub" + } + }, + "responses": { + "200": { + "body": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" + } + } + } + } \ No newline at end of file diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index 9aaf4c21d412..f33650c45850 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -178,6 +178,517 @@ "nextLinkName": "nextLink" } } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default": { + "get": { + "operationId": "BillingAccount_GetPolicy", + "x-ms-examples": { + "GetBillingAccountPolicy": { + "$ref": "./examples/getBillingAccountPolicy.json" + } + }, + "description": "Get Billing Account Policy.", + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Normal response for a successful query.", + "schema": { + "$ref": "#/definitions/BillingAccountPoliciesResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/aliases": { + "get": { + "operationId": "Alias_List", + "x-ms-examples": { + "ListAlias": { + "$ref": "./examples/listAlias.json" + } + }, + "description": "List Alias Subscription.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Subscription/aliases/{aliasName}": { + "put": { + "operationId": "Alias_Create", + "x-ms-examples": { + "CreateAlias": { + "$ref": "./examples/createAlias.json" + } + }, + "description": "Create Alias Subscription.", + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutAliasRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "x-ms-long-running-operation": true, + "responses": { + "200": { + "description": "Normal response for a successful query.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "201": { + "description": "Accepted. Subscription creation is in progress.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "operationId": "Alias_Get", + "x-ms-examples": { + "GetAlias": { + "$ref": "./examples/getAlias.json" + } + }, + "description": "Get Alias Subscription.", + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + }, + "delete": { + "operationId": "Alias_Delete", + "x-ms-examples": { + "DeleteAlias": { + "$ref": "./examples/deleteAlias.json" + } + }, + "description": "Delete Alias.", + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Deleted the alias" + }, + "204": { + "description": "Alias does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/policies": { + "get": { + "operationId": "SubscriptionPolicy_ListPolicyForTenant", + "x-ms-examples": { + "getTenantPolicyList": { + "$ref": "./examples/getTenantPolicyList.json" + } + }, + "description": "Get the subscription tenant policy for the user's tenant.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription tenant policy details for user's tenant.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Subscription/policies/default": { + "put": { + "operationId": "SubscriptionPolicy_AddUpdatePolicyForTenant", + "x-ms-examples": { + "TenantPolicy": { + "$ref": "./examples/changeTenantPolicy.json" + } + }, + "description": "Create or Update Subscription tenant policy for user's tenant.", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutTenantPolicyRequestProperties" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription tenant policy has been successfully created/updated.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + }, + "get": { + "operationId": "SubscriptionPolicy_GetPolicyForTenant", + "x-ms-examples": { + "getTenantPolicy": { + "$ref": "./examples/getTenantPolicy.json" + } + }, + "description": "Get the subscription tenant policy for the user's tenant.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription tenant policy details for user's tenant.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": { + "get": { + "operationId": "SubscriptionOperation_Get", + "x-ms-examples": { + "getPendingSubscriptionOperations": { + "$ref": "./examples/getSubscriptionOperation.json" + } + }, + "description": "Get the status of the pending Microsoft.Subscription API operations.", + "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" + } + ], + "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" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership": { + "post": { + "operationId": "Subscription_AcceptOwnership", + "x-ms-examples": { + "AcceptOwnership": { + "$ref": "./examples/acceptSubscriptionOwnership.json" + } + }, + "description": "Accept subscription ownership.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AcceptOwnershipRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "x-ms-long-running-operation": true, + "responses": { + "202": { + "description": "Accept Subscription ownership is in progress", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "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": "int32" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": { + "get": { + "operationId": "Subscription_AcceptOwnershipStatus", + "x-ms-examples": { + "AcceptOwnershipStatus": { + "$ref": "./examples/acceptOwnershipStatus.json" + } + }, + "description": "Accept subscription ownership status.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/AcceptOwnershipStatusResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { + "post": { + "operationId": "Subscription_Cancel", + "x-ms-examples": { + "cancelSubscription": { + "$ref": "./examples/cancelSubscription.json" + } + }, + "description": "The operation to cancel a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CanceledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { + "post": { + "operationId": "Subscription_Enable", + "x-ms-examples": { + "enableSubscription": { + "$ref": "./examples/enableSubscription.json" + } + }, + "description": "The operation to enable a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/EnabledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { + "post": { + "operationId": "Subscription_Rename", + "x-ms-examples": { + "renameSubscription": { + "$ref": "./examples/renameSubscription.json" + } + }, + "description": "The operation to rename a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/subscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/RenamedSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } } }, "definitions": { @@ -185,123 +696,632 @@ "description": "Describes the format of Error response.", "type": "object", "properties": { - "code": { - "description": "Error code", + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "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" + }, + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "TargetDirectoryRequest": { + "type": "object", + "description": "Subscription Request for Changed Target Directory.", + "properties": { + "properties": { + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." + } + } + }, + "TargetDirectoryRequestProperties": { + "type": "object", + "description": "Properties of subscription Request for Changed Target Directory.", + "properties": { + "destinationOwnerId": { + "description": "The destination OwnerId, can be object id or email address", + "type": "string" + }, + "destinationTenantId": { + "description": "The destination Tenant id where subscription needs to be accepted", + "type": "string" + } + } + }, + "TargetDirectoryStatusResult": { + "type": "object", + "description": "Subscription Status for accepted request.", + "properties": { + "status": { + "description": "Subscription Status", + "type": "string" + } + } + }, + "TargetDirectoryResult": { + "type": "object", + "x-ms-azure-resource": true, + "description": "Subscription Response for Changed Target Directory.", + "properties": { + "id": { + "description": "Fully qualified ID for the Subscription Changed Directory resource.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Subscription Name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/TargetDirectoryResultProperties", + "description": "Subscription Changed Target Directory response properties." + } + } + }, + "TargetDirectoryResultProperties": { + "type": "object", + "description": "Properties of subscription Response for Changed Target Directory.", + "properties": { + "destinationTenantId": { + "description": "Destination Tenant Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationObjectId": { + "description": "Destination Object Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationEmailId": { + "description": "Destination Email Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Subscription Status.", + "readOnly": true, + "type": "string" + }, + "expiresOn": { + "description": "Subscription Initiate Request Expiry time", + "readOnly": true, + "type": "string", + "format": "date-time" + } + } + }, + "BillingAccountPoliciesResponse": { + "description": "Billing account policies information.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the policy.", + "readOnly": true, "type": "string" }, - "message": { - "description": "Error message indicating why the operation failed.", + "name": { + "description": "Policy name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type.", + "readOnly": true, "type": "string" + }, + "properties": { + "$ref": "#/definitions/BillingAccountPoliciesResponseProperties", + "description": "Billing account policies response properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "BillingAccountPoliciesResponseProperties": { + "description": "Put billing account policies response properties.", + "type": "object", + "properties": { + "serviceTenants": { + "description": "Service tenant for the billing account.", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ServiceTenantResponse", + "description": "Billing account service tenant." + } + }, + "allowTransfers": { + "description": "Determine if the transfers are allowed for the billing account", + "type": "boolean" } } }, - "ErrorResponseBody": { - "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "ServiceTenantResponse": { + "description": "Billing account service tenant.", "type": "object", "properties": { - "error": { - "description": "The details of the error.", - "$ref": "#/definitions/ErrorResponse" + "tenantId": { + "description": "Service tenant id.", + "type": "string" }, - "code": { - "description": "Error code", + "tenantName": { + "description": "Service tenant name.", "type": "string" + } + } + }, + "SubscriptionAliasListResult": { + "description": "The list of aliases.", + "type": "object", + "properties": { + "value": { + "description": "The list of alias.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } }, - "message": { - "description": "Error message indicating why the operation failed.", + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionAliasResponse": { + "description": "Subscription Information with the alias.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the alias resource.", + "readOnly": true, "type": "string" + }, + "name": { + "description": "Alias ID.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type, Microsoft.Subscription/aliases.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/SubscriptionAliasResponseProperties", + "description": "Subscription Alias response properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "SubscriptionAliasResponseProperties": { + "description": "Put subscription creation result properties.", + "type": "object", + "properties": { + "subscriptionId": { + "description": "Newly created subscription Id.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The display name of the subscription.", + "type": "string" + }, + "provisioningState": { + "type": "string", + "description": "The provisioning state of the resource.", + "readOnly": true, + "enum": [ + "Accepted", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "acceptOwnershipUrl": { + "description": "Url to accept ownership of the subscription.", + "type": "string", + "readOnly": true + }, + "acceptOwnershipState": { + "$ref": "#/definitions/AcceptOwnershipState" + }, + "billingScope": { + "$ref": "#/definitions/BillingScope" + }, + "workload": { + "$ref": "#/definitions/Workload" + }, + "resellerId": { + "description": "Reseller Id", + "type": "string" + }, + "subscriptionOwnerId": { + "description": "Owner Id of the subscription", + "type": "string" + }, + "managementGroupId": { + "description": "The Management Group Id.", + "type": "string" + }, + "createdTime": { + "description": "Created Time", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "TargetDirectoryRequest": { + "Workload": { + "description": "The workload type of the subscription. It can be either Production or DevTest.", + "type": "string", + "x-ms-enum": { + "name": "workload", + "modelAsString": true + }, + "enum": [ + "Production", + "DevTest" + ] + }, + "BillingScope": { + "description": "Billing scope of the subscription.\nFor CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}\nFor PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}\nFor Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", + "type": "string" + }, + "AcceptOwnershipState": { + "readOnly": true, + "type": "string", + "description": "The accept ownership state of the resource.", + "enum": [ + "Pending", + "Completed", + "Expired" + ], + "x-ms-enum": { + "name": "AcceptOwnership", + "modelAsString": true + } + }, + "PutAliasRequest": { + "description": "The parameters required to create a new subscription.", "type": "object", - "description": "Subscription Request for Changed Target Directory.", "properties": { "properties": { - "$ref": "#/definitions/TargetDirectoryRequestProperties", - "description": "Target Directory request properties." + "$ref": "#/definitions/PutAliasRequestProperties", + "description": "Put alias request properties." } } }, - "TargetDirectoryRequestProperties": { + "PutAliasRequestProperties": { + "description": "Put subscription properties.", "type": "object", - "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "destinationOwnerId": { - "description": "The destination OwnerId, can be object id or email address", + "displayName": { + "description": "The friendly name of the subscription.", "type": "string" }, - "destinationTenantId": { - "description": "The destination Tenant id where subscription needs to be accepted", + "workload": { + "$ref": "#/definitions/Workload" + }, + "billingScope": { + "$ref": "#/definitions/BillingScope" + }, + "subscriptionId": { + "description": "This parameter can be used to create alias for existing subscription Id", + "type": "string" + }, + "resellerId": { + "description": "Reseller Id", "type": "string" + }, + "additionalProperties": { + "$ref": "#/definitions/PutAliasRequestAdditionalProperties", + "description": "Put alias request additional properties." } } }, - "TargetDirectoryStatusResult": { + "PutAliasRequestAdditionalProperties": { + "description": "Put subscription additional properties.", "type": "object", - "description": "Subscription Status for accepted request.", "properties": { - "status": { - "description": "Subscription Status", + "managementGroupId": { + "description": "Management group Id for the subscription.", + "type": "string" + }, + "subscriptionTenantId": { + "description": "Tenant Id of the subscription", "type": "string" + }, + "subscriptionOwnerId": { + "description": "Owner Id of the subscription", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "TargetDirectoryResult": { + "GetTenantPolicyListResponse": { + "description": "Tenant policy information list.", + "type": "object", + "properties": { + "value": { + "description": "The list of tenant policies.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "GetTenantPolicyResponse": { + "description": "Tenant policy Information.", "type": "object", - "x-ms-azure-resource": true, - "description": "Subscription Response for Changed Target Directory.", "properties": { "id": { - "description": "Fully qualified ID for the Subscription Changed Directory resource.", + "description": "Policy Id.", "readOnly": true, "type": "string" }, "name": { - "description": "Subscription Name.", + "description": "Policy name.", "readOnly": true, "type": "string" }, "type": { - "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", + "description": "Resource type.", "readOnly": true, "type": "string" }, "properties": { - "$ref": "#/definitions/TargetDirectoryResultProperties", - "description": "Subscription Changed Target Directory response properties." + "$ref": "#/definitions/TenantPolicy", + "description": "Tenant policy properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "TenantPolicy": { + "description": "Tenant policy.", + "type": "object", + "properties": { + "policyId": { + "description": "Policy Id.", + "type": "string", + "readOnly": true + }, + "blockSubscriptionsLeavingTenant": { + "description": "Blocks the leaving of subscriptions from user's tenant.", + "type": "boolean" + }, + "blockSubscriptionsIntoTenant": { + "description": "Blocks the entering of subscriptions into user's tenant.", + "type": "boolean" + }, + "exemptedPrincipals": { + "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + } } } }, - "TargetDirectoryResultProperties": { + "SubscriptionCreationResult": { + "description": "The created subscription object.", "type": "object", - "description": "Properties of subscription Response for Changed Target Directory.", "properties": { - "destinationTenantId": { - "description": "Destination Tenant Id where Subscription will be accepted.", - "readOnly": true, + "subscriptionLink": { + "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", + "type": "string" + } + } + }, + "AcceptOwnershipRequest": { + "description": "The parameters required to accept subscription ownership.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AcceptOwnershipRequestProperties", + "description": "Accept subscription ownership request properties." + } + } + }, + "AcceptOwnershipRequestProperties": { + "description": "Accept subscription ownership request properties.", + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "description": "The friendly name of the subscription.", "type": "string" }, - "destinationObjectId": { - "description": "Destination Object Id where Subscription will be accepted.", - "readOnly": true, + "managementGroupId": { + "description": "Management group Id for the subscription.", "type": "string" }, - "destinationEmailId": { - "description": "Destination Email Id where Subscription will be accepted.", + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "AcceptOwnershipStatusResponse": { + "description": "Subscription Accept Ownership Response", + "type": "object", + "properties": { + "subscriptionId": { + "description": "Newly created subscription Id.", "readOnly": true, "type": "string" }, - "status": { - "description": "Subscription Status.", + "acceptOwnershipState": { + "$ref": "#/definitions/AcceptOwnershipState" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" + }, + "billingOwner": { + "description": "UPN of the billing owner", "readOnly": true, "type": "string" }, - "expiresOn": { - "description": "Subscription Initiate Request Expiry time", - "readOnly": true, + "subscriptionTenantId": { + "description": "Tenant Id of the subscription", + "type": "string" + }, + "displayName": { + "description": "The display name of the subscription.", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ProvisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning state of the resource.", + "enum": [ + "Pending", + "Accepted", + "Succeeded" + ], + "x-ms-enum": { + "name": "Provisioning", + "modelAsString": true + } + }, + "CanceledSubscriptionId": { + "description": "The ID of the canceled subscription", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the canceled subscription", "type": "string", - "format": "date-time" + "readOnly": true + } + } + }, + "RenamedSubscriptionId": { + "description": "The ID of the subscriptions that is being renamed", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the subscriptions that is being renamed", + "type": "string", + "readOnly": true + } + } + }, + "EnabledSubscriptionId": { + "description": "The ID of the subscriptions that is being enabled", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the subscriptions that is being enabled", + "type": "string", + "readOnly": true + } + } + }, + "SubscriptionName": { + "type": "object", + "description": "The new name of the subscription.", + "properties": { + "subscriptionName": { + "type": "string", + "description": "New subscription name" + } + } + }, + "PutTenantPolicyRequestProperties": { + "description": "Put tenant policy request properties.", + "type": "object", + "properties": { + "blockSubscriptionsLeavingTenant": { + "description": "Blocks the leaving of subscriptions from user's tenant.", + "type": "boolean" + }, + "blockSubscriptionsIntoTenant": { + "description": "Blocks the entering of subscriptions into user's tenant.", + "type": "boolean" + }, + "exemptedPrincipals": { + "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + } } } } @@ -332,6 +1352,32 @@ "schema": { "$ref": "#/definitions/TargetDirectoryRequest" } + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Billing Account Id." + }, + "aliasNameParameter": { + "name": "aliasName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation." + }, + "subscriptionNameParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Subscription Name", + "schema": { + "$ref": "#/definitions/SubscriptionName" + } } }, "security": [ From f529b390e737e2f102cff2441701aa64370632c6 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 7 Aug 2024 09:22:14 -0700 Subject: [PATCH 20/27] Fix Prettier Checks. --- .../examples/acceptOwnershipStatus.json | 34 ++--- .../examples/acceptSubscriptionOwnership.json | 40 +++--- .../examples/cancelSubscription.json | 20 +-- .../examples/changeTenantPolicy.json | 52 ++++---- .../examples/createAlias.json | 122 +++++++++--------- .../examples/deleteAlias.json | 18 +-- .../examples/enableSubscription.json | 20 +-- .../2024-08-01-preview/examples/getAlias.json | 54 ++++---- .../examples/getBillingAccountPolicy.json | 40 +++--- .../examples/getSubscriptionOperation.json | 30 ++--- .../examples/getTenantPolicy.json | 38 +++--- .../examples/getTenantPolicyList.json | 48 +++---- .../examples/listAlias.json | 104 +++++++-------- .../examples/renameSubscription.json | 24 ++-- 14 files changed, 322 insertions(+), 322 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json index 13f52e9b4d78..cdfe7b865093 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json @@ -1,21 +1,21 @@ { - "parameters": { - "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "acceptOwnershipState": "Pending", - "provisioningState": "Accepted", - "billingOwner": "abc@test.com", - "subscriptionTenantId": "6c541ca7-1cab-4ea0-adde-6305e1d534e2", - "displayName": "Test Subscription", - "tags": { - "tag1": "TagValue1" - } + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "acceptOwnershipState": "Pending", + "provisioningState": "Accepted", + "billingOwner": "abc@test.com", + "subscriptionTenantId": "6c541ca7-1cab-4ea0-adde-6305e1d534e2", + "displayName": "Test Subscription", + "tags": { + "tag1": "TagValue1" } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json index 3d158ef25a3e..27cf0eb1731d 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json @@ -1,25 +1,25 @@ { - "parameters": { - "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "api-version": "2024-08-01-preview", - "body": { - "properties": { - "displayName": "Test Subscription", - "managementGroupId": null, - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" } } - }, - "responses": { - "202": { - "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2021-10-01", - "Retry-After": 8 - } + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2021-10-01", + "Retry-After": 8 } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json index c81326570087..e8bab156f3e3 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json @@ -1,13 +1,13 @@ { - "parameters": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" - } + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json index 74c83ca6013d..94be325d52dd 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json @@ -1,31 +1,31 @@ { - "parameters": { - "api-version": "2024-08-01-preview", + "parameters": { + "api-version": "2024-08-01-preview", + "body": { + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + }, + "responses": { + "200": { "body": { - "blockSubscriptionsLeavingTenant": true, - "blockSubscriptionsIntoTenant": true, - "exemptedPrincipals": [ - "e879cf0f-2b4d-5431-109a-f72fc9868693", - "9792da87-c97b-410d-a97d-27021ba09ce6" - ] - } - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Subscription/policies/default", - "name": "default", - "type": "providers/Microsoft.Subscription/policies", - "properties": { - "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "blockSubscriptionsLeavingTenant": true, - "blockSubscriptionsIntoTenant": true, - "exemptedPrincipals": [ - "e879cf0f-2b4d-5431-109a-f72fc9868693", - "9792da87-c97b-410d-a97d-27021ba09ce6" - ] - } + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json index a784c3224a9a..8d2366f88cd8 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json @@ -1,74 +1,74 @@ { - "parameters": { - "aliasName": "dummyalias", - "api-version": "2024-08-01-preview", + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "workload": "Production", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "subscriptionId": null, + "additionalProperties": { + "managementGroupId": null, + "subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8", + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + }, + "responses": { + "200": { "body": { + "id": "string", + "name": "string", + "type": "string", "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", "displayName": "Test Subscription", - "workload": "Production", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "subscriptionId": null, - "additionalProperties": { - "managementGroupId": null, - "subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8", - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" } } } }, - "responses": { - "200": { - "body": { - "id": "string", - "name": "string", - "type": "string", - "properties": { - "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", - "displayName": "Test Subscription", - "provisioningState": "Accepted", - "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", - "acceptOwnershipState": "Pending", - "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "workload": "Production", - "resellerId": null, - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "managementGroupId": null, - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } - } - } - }, - "201": { - "body": { - "id": "string", - "name": "string", - "type": "string", - "properties": { - "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", - "displayName": "Test Subscription", - "provisioningState": "Accepted", - "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", - "acceptOwnershipState": "Pending", - "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "workload": "Production", - "resellerId": null, - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "managementGroupId": null, - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } + "201": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" } } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json index 55c7df90ba0e..3fa3f70a91bd 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json @@ -1,10 +1,10 @@ { - "parameters": { - "aliasName": "dummyalias", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": {}, - "204": {} - } - } \ No newline at end of file + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json index a0a4e4d470de..5bc4403336c0 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json @@ -1,13 +1,13 @@ { - "parameters": { - "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d" - } + "parameters": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d" } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json index f60873bb4ef2..14c330cf2f4d 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json @@ -1,32 +1,32 @@ { - "parameters": { - "aliasName": "dummyalias", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "string", - "name": "string", - "type": "string", - "properties": { - "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", - "displayName": "Test Subscription", - "provisioningState": "Accepted", - "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", - "acceptOwnershipState": "Pending", - "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "workload": "Production", - "resellerId": null, - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "managementGroupId": null, - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" } } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json index ab2107e99fac..c48102dc2d82 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json @@ -1,24 +1,24 @@ { - "parameters": { - "billingAccountId": "testBillingAccountId", - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Subscription/Policies/policyForBillingAccount", - "name": "testBillingAccountId", - "type": "Microsoft.Subscription/policies", - "properties": { - "serviceTenants": [ - { - "tenantName": "testServiceTenant", - "tenantId": "b8ed2088-c458-4e77-bd61-9e048d96a1c0" - } - ], - "allowTransfers": true - } + "parameters": { + "billingAccountId": "testBillingAccountId", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Subscription/Policies/policyForBillingAccount", + "name": "testBillingAccountId", + "type": "Microsoft.Subscription/policies", + "properties": { + "serviceTenants": [ + { + "tenantName": "testServiceTenant", + "tenantId": "b8ed2088-c458-4e77-bd61-9e048d96a1c0" + } + ], + "allowTransfers": true } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json index aec7aaffbbe8..2fa777c2e51c 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json @@ -1,19 +1,19 @@ { - "parameters": { - "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", - "api-version": "2024-08-01-preview" + "parameters": { + "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", + "api-version": "2024-08-01-preview" + }, + "responses": { + "202": { + "headers": { + "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01", + "Retry-After": 8 + } }, - "responses": { - "202": { - "headers": { - "Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01", - "Retry-After": 8 - } - }, - "200": { - "body": { - "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" - } + "200": { + "body": { + "subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633" } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json index 1ab0fd9bea10..893a3d9292a8 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json @@ -1,23 +1,23 @@ { - "parameters": { - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "providers/Microsoft.Subscription/policies/default", - "name": "default", - "type": "providers/Microsoft.Subscription/policies", - "properties": { - "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "blockSubscriptionsLeavingTenant": true, - "blockSubscriptionsIntoTenant": true, - "exemptedPrincipals": [ - "e879cf0f-2b4d-5431-109a-f72fc9868693", - "9792da87-c97b-410d-a97d-27021ba09ce6" - ] - } + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] } } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json index 980f70edaa02..98092ff15dbc 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json @@ -1,28 +1,28 @@ { - "parameters": { - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "providers/Microsoft.Subscription/policies/default", - "name": "default", - "type": "providers/Microsoft.Subscription/policies", - "properties": { - "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", - "blockSubscriptionsLeavingTenant": true, - "blockSubscriptionsIntoTenant": true, - "exemptedPrincipals": [ - "e879cf0f-2b4d-5431-109a-f72fc9868693", - "9792da87-c97b-410d-a97d-27021ba09ce6" - ] - } + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] } - ], - "nextLink": null - } + } + ], + "nextLink": null } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json index 8674d6d28b3d..c4c557fdef9c 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json @@ -1,58 +1,58 @@ { - "parameters": { - "api-version": "2024-08-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "string", - "name": "string", - "type": "string", - "properties": { - "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", - "displayName": "Test Subscription", - "provisioningState": "Accepted", - "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", - "acceptOwnershipState": "Pending", - "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "workload": "Production", - "resellerId": null, - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "managementGroupId": null, - "tags": { - "tag1": "Messi", - "tag2": "Ronaldo", - "tag3": "Lebron" - } + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" } - }, - { - "id": "string", - "name": "string", - "type": "string", - "properties": { - "subscriptionId": "091c6e56-a835-4422-a082-0427308ca9ee", - "displayName": "Test Subscription 2", - "provisioningState": "Accepted", - "acceptOwnershipUrl": "/providers/Microsoft.Subscription/091c6e56-a835-4422-a082-0427308ca9ee/acceptOwnership", - "acceptOwnershipState": "Pending", - "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", - "workload": "Production", - "resellerId": null, - "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", - "managementGroupId": null, - "tags": { - "tag1": "Messi2", - "tag2": "Ronaldo2", - "tag3": "Lebron2" - } + } + }, + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "091c6e56-a835-4422-a082-0427308ca9ee", + "displayName": "Test Subscription 2", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/091c6e56-a835-4422-a082-0427308ca9ee/acceptOwnership", + "acceptOwnershipState": "Pending", + "billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi2", + "tag2": "Ronaldo2", + "tag3": "Lebron2" } } - ], - "nextLink": null - } + } + ], + "nextLink": null } } - } \ No newline at end of file + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json index 565f8fdf1dd3..016012b95947 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json @@ -1,16 +1,16 @@ { - "parameters": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", - "api-version": "2024-08-01-preview", + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview", + "body": { + "subscriptionName": "Test Sub" + } + }, + "responses": { + "200": { "body": { - "subscriptionName": "Test Sub" - } - }, - "responses": { - "200": { - "body": { - "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" - } + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" } } - } \ No newline at end of file + } +} From 90fd8d1ca85c282cff1496cd2208183580db6a49 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 7 Aug 2024 11:04:59 -0700 Subject: [PATCH 21/27] Add or Update the parameter location in the swagger. --- .../2024-08-01-preview/subscriptions.json | 254 +++++++++--------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index f33650c45850..bb736b55dd9b 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -181,21 +181,13 @@ }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default": { "get": { + "description": "Get Billing Account Policy.", "operationId": "BillingAccount_GetPolicy", "x-ms-examples": { "GetBillingAccountPolicy": { "$ref": "./examples/getBillingAccountPolicy.json" } }, - "description": "Get Billing Account Policy.", - "parameters": [ - { - "$ref": "#/parameters/billingAccountIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Normal response for a successful query.", @@ -209,23 +201,26 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/providers/Microsoft.Subscription/aliases": { "get": { + "description": "List Alias Subscription.", "operationId": "Alias_List", "x-ms-examples": { "ListAlias": { "$ref": "./examples/listAlias.json" } }, - "description": "List Alias Subscription.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Subscription details.", @@ -240,6 +235,11 @@ } } }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -247,29 +247,13 @@ }, "/providers/Microsoft.Subscription/aliases/{aliasName}": { "put": { + "description": "Create Alias Subscription.", "operationId": "Alias_Create", "x-ms-examples": { "CreateAlias": { "$ref": "./examples/createAlias.json" } }, - "description": "Create Alias Subscription.", - "parameters": [ - { - "$ref": "#/parameters/aliasNameParameter" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PutAliasRequest" - } - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "x-ms-long-running-operation": true, "responses": { "200": { @@ -287,27 +271,35 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponseBody" } } - } - }, - "get": { - "operationId": "Alias_Get", - "x-ms-examples": { - "GetAlias": { - "$ref": "./examples/getAlias.json" - } }, - "description": "Get Alias Subscription.", "parameters": [ { "$ref": "#/parameters/aliasNameParameter" }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutAliasRequest" + } + }, { "$ref": "#/parameters/apiVersionParameter" } - ], + ] + }, + "get": { + "description": "Get Alias Subscription.", + "operationId": "Alias_Get", + "x-ms-examples": { + "GetAlias": { + "$ref": "./examples/getAlias.json" + } + }, "responses": { "200": { "description": "Subscription details.", @@ -321,16 +313,7 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } - }, - "delete": { - "operationId": "Alias_Delete", - "x-ms-examples": { - "DeleteAlias": { - "$ref": "./examples/deleteAlias.json" - } }, - "description": "Delete Alias.", "parameters": [ { "$ref": "#/parameters/aliasNameParameter" @@ -338,7 +321,16 @@ { "$ref": "#/parameters/apiVersionParameter" } - ], + ] + }, + "delete": { + "description": "Delete Alias.", + "operationId": "Alias_Delete", + "x-ms-examples": { + "DeleteAlias": { + "$ref": "./examples/deleteAlias.json" + } + }, "responses": { "200": { "description": "Deleted the alias" @@ -352,23 +344,26 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } + }, + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/providers/Microsoft.Subscription/policies": { "get": { + "description": "Get the subscription tenant policy for the user's tenant.", "operationId": "SubscriptionPolicy_ListPolicyForTenant", "x-ms-examples": { "getTenantPolicyList": { "$ref": "./examples/getTenantPolicyList.json" } }, - "description": "Get the subscription tenant policy for the user's tenant.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Subscription tenant policy details for user's tenant.", @@ -385,31 +380,23 @@ }, "x-ms-pageable": { "nextLinkName": "nextLink" - } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/providers/Microsoft.Subscription/policies/default": { "put": { + "description": "Create or Update Subscription tenant policy for user's tenant.", "operationId": "SubscriptionPolicy_AddUpdatePolicyForTenant", "x-ms-examples": { "TenantPolicy": { "$ref": "./examples/changeTenantPolicy.json" } }, - "description": "Create or Update Subscription tenant policy for user's tenant.", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PutTenantPolicyRequestProperties" - } - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Subscription tenant policy has been successfully created/updated.", @@ -423,21 +410,29 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutTenantPolicyRequestProperties" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] }, "get": { + "description": "Get the subscription tenant policy for the user's tenant.", "operationId": "SubscriptionPolicy_GetPolicyForTenant", "x-ms-examples": { "getTenantPolicy": { "$ref": "./examples/getTenantPolicy.json" } }, - "description": "Get the subscription tenant policy for the user's tenant.", - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Subscription tenant policy details for user's tenant.", @@ -451,30 +446,23 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/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" } }, - "description": "Get the status of the pending Microsoft.Subscription API operations.", - "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" - } - ], "responses": { "200": { "description": "Successful completion of the asynchronous operation", @@ -502,34 +490,30 @@ "$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.Subscription/subscriptions/{subscriptionId}/acceptOwnership": { "post": { + "description": "Accept subscription ownership.", "operationId": "Subscription_AcceptOwnership", "x-ms-examples": { "AcceptOwnership": { "$ref": "./examples/acceptSubscriptionOwnership.json" } }, - "description": "Accept subscription ownership.", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AcceptOwnershipRequest" - } - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "x-ms-long-running-operation": true, "responses": { "202": { @@ -552,26 +536,34 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } - } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AcceptOwnershipRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": { "get": { + "description": "Accept subscription ownership status.", "operationId": "Subscription_AcceptOwnershipStatus", "x-ms-examples": { "AcceptOwnershipStatus": { "$ref": "./examples/acceptOwnershipStatus.json" } }, - "description": "Accept subscription ownership status.", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { "description": "Subscription details.", @@ -585,7 +577,15 @@ "$ref": "#/definitions/ErrorResponseBody" } } - } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { @@ -690,7 +690,7 @@ } } } - }, + }, "definitions": { "ErrorResponse": { "description": "Describes the format of Error response.", From 9206a50cbd92c3849f525f4e71e5afe59ab45490 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 9 Aug 2024 14:52:55 -0700 Subject: [PATCH 22/27] Add suppressions for the lint errors + plus request schema changes. --- .../2024-08-01-preview/examples/getTargetDirectory.json | 3 +-- .../2024-08-01-preview/examples/putTargetDirectory.json | 3 +-- .../preview/2024-08-01-preview/subscriptions.json | 9 ++------- specification/subscription/resource-manager/readme.md | 8 ++++++++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json index 8a8dae879861..69dade87bcbf 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json @@ -11,8 +11,7 @@ "type": "Microsoft.Subscription/changeTenantRequest", "properties": { "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", - "destinationObjectId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", - "destinationEmailId": "abhaypratap@live.com", + "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json index bb7e280ad87e..b04f9962fbcc 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -17,8 +17,7 @@ "type": "Microsoft.Subscription/changeTenantRequest", "properties": { "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130", - "destinationObjectId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", - "destinationEmailId": "abhaypratap@live.com", + "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index bb736b55dd9b..a7ab63d21e5b 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -793,13 +793,8 @@ "readOnly": true, "type": "string" }, - "destinationObjectId": { - "description": "Destination Object Id where Subscription will be accepted.", - "readOnly": true, - "type": "string" - }, - "destinationEmailId": { - "description": "Destination Email Id where Subscription will be accepted.", + "destinationOwnerId": { + "description": "Destination Owner Id where Subscription will be accepted.", "readOnly": true, "type": "string" }, diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 59a558c8568f..7b532daef441 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -41,6 +41,14 @@ These settings apply only when `--tag=package-2024-08-preview` is specified on t ``` yaml $(tag) == 'package-2024-08-preview' input-file: - Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +suppressions: +- code: PutResponseCodes + reason: Not supposed to return 201 as the response code for the below API since existing api with new version change, got exceptions from ARM reviewer. + where: + - $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default"].put +- code: PutRequestResponseSchemeArm + from: Microsoft.Subscription\preview\2024-08-01-preview\subscriptions.json + reason: The models designed in new version of this existing api in which put request, need not be same in response, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29042001", to take this item in future ref for next set of changes. title: Initiate, Get and Accept Subscription Changed Directory description: Initiate, Get and Accept Subscription Changed Directory ``` From 44ccb092f97c24e9be46a59e4e2a6a0c6d971ce4 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Fri, 9 Aug 2024 15:38:02 -0700 Subject: [PATCH 23/27] Suppress lint errors. --- .../2024-08-01-preview/subscriptions.json | 2 +- .../subscription/resource-manager/readme.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index a7ab63d21e5b..ed711cad0452 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -690,7 +690,7 @@ } } } - }, + }, "definitions": { "ErrorResponse": { "description": "Describes the format of Error response.", diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 7b532daef441..c8fb6dccc357 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -23,6 +23,14 @@ To see additional help and options, run: ``` yaml directive: - suppress: R2059 + - suppress: PutResponseCodes + from: subscriptions.json + where: $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default"].put + reason: Not supposed to return 201 as the response code for the below API since existing api with new version change, got exceptions from ARM reviewer. + - suppress: PutRequestResponseSchemeArm + from: subscriptions.json + reason: The models designed in new version of this existing api in which put request, need not be same in response, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29042001", to take this item in future ref for next set of changes. + ``` @@ -41,14 +49,6 @@ These settings apply only when `--tag=package-2024-08-preview` is specified on t ``` yaml $(tag) == 'package-2024-08-preview' input-file: - Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json -suppressions: -- code: PutResponseCodes - reason: Not supposed to return 201 as the response code for the below API since existing api with new version change, got exceptions from ARM reviewer. - where: - - $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default"].put -- code: PutRequestResponseSchemeArm - from: Microsoft.Subscription\preview\2024-08-01-preview\subscriptions.json - reason: The models designed in new version of this existing api in which put request, need not be same in response, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29042001", to take this item in future ref for next set of changes. title: Initiate, Get and Accept Subscription Changed Directory description: Initiate, Get and Accept Subscription Changed Directory ``` From 3664f47ff00941dd3fe6963114a9e62bc38ecfb8 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 13 Aug 2024 23:40:21 -0700 Subject: [PATCH 24/27] Adding changes to revert initiate and accept subscription changed directory existing behavior swagger. --- .../examples/acceptTargetDirectory.json | 2 +- .../examples/getTargetDirectory.json | 5 ++--- .../examples/putTargetDirectory.json | 8 +++----- .../examples/targetDirectoryStatus.json | 2 +- .../2024-08-01-preview/subscriptions.json | 19 +++++-------------- 5 files changed, 12 insertions(+), 24 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json index 57c38e41ba67..61285f7844f7 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "6c3c85bc-5366-4eaa-8055-a10529eafd03", - "api-version": "2024-08-01-preview" + "api-version": "2019-10-01-preview" }, "responses": { "204": {} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json index 69dade87bcbf..6915e5e3b9bf 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", - "api-version": "2024-08-01-preview" + "api-version": "2019-10-01-preview" }, "responses": { "200": { @@ -10,8 +10,7 @@ "name": "default", "type": "Microsoft.Subscription/changeTenantRequest", "properties": { - "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", - "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", + "destinationEmailId": "abhaypratap@live.com", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json index b04f9962fbcc..e2fac1680b43 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -1,11 +1,10 @@ { "parameters": { "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", - "api-version": "2024-08-01-preview", + "api-version": "2019-10-01-preview", "body": { "properties": { - "destinationOwnerId": "abhaypratap@live.com", - "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130" + "destinationEmail": "abhaypratap@live.com" } } }, @@ -16,8 +15,7 @@ "name": "default", "type": "Microsoft.Subscription/changeTenantRequest", "properties": { - "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130", - "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", + "destinationEmailId": "abhaypratap@live.com", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json index de1f6c01ef19..6a59cddaf163 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "e1084a54-27ab-4b72-a3ba-89fac9548f49", - "api-version": "2024-08-01-preview" + "api-version": "2019-10-01-preview" }, "responses": { "200": { diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index ed711cad0452..39a2585413ee 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2024-08-01-preview", + "version": "2019-10-01-preview", "title": "SubscriptionClient", "description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically." }, @@ -738,12 +738,8 @@ "type": "object", "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "destinationOwnerId": { - "description": "The destination OwnerId, can be object id or email address", - "type": "string" - }, - "destinationTenantId": { - "description": "The destination Tenant id where subscription needs to be accepted", + "destinationEmail": { + "description": "The destination Email id where subscription needs to be accepted", "type": "string" } } @@ -788,13 +784,8 @@ "type": "object", "description": "Properties of subscription Response for Changed Target Directory.", "properties": { - "destinationTenantId": { - "description": "Destination Tenant Id where Subscription will be accepted.", - "readOnly": true, - "type": "string" - }, - "destinationOwnerId": { - "description": "Destination Owner Id where Subscription will be accepted.", + "destinationEmailId": { + "description": "Destination Email Id where Subscription will be accepted.", "readOnly": true, "type": "string" }, From d57a6485909736c65ecb7d1abcd29d4b0c3824c0 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Tue, 13 Aug 2024 23:58:16 -0700 Subject: [PATCH 25/27] Add new version, destination tenant and owner id for subscription initiate and accept change directory. --- .../examples/acceptTargetDirectory.json | 2 +- .../examples/getTargetDirectory.json | 5 +++-- .../examples/putTargetDirectory.json | 8 +++++--- .../examples/targetDirectoryStatus.json | 2 +- .../2024-08-01-preview/subscriptions.json | 19 ++++++++++++++----- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json index 61285f7844f7..57c38e41ba67 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "6c3c85bc-5366-4eaa-8055-a10529eafd03", - "api-version": "2019-10-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "204": {} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json index 6915e5e3b9bf..69dade87bcbf 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", - "api-version": "2019-10-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "200": { @@ -10,7 +10,8 @@ "name": "default", "type": "Microsoft.Subscription/changeTenantRequest", "properties": { - "destinationEmailId": "abhaypratap@live.com", + "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json index e2fac1680b43..367bd34aed03 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -1,10 +1,11 @@ { "parameters": { "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", - "api-version": "2019-10-01-preview", + "api-version": "2024-08-01-preview", "body": { "properties": { - "destinationEmail": "abhaypratap@live.com" + "destinationOwnerId": "abhaypratap@live.com", + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130" } } }, @@ -15,7 +16,8 @@ "name": "default", "type": "Microsoft.Subscription/changeTenantRequest", "properties": { - "destinationEmailId": "abhaypratap@live.com", + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130", + "destinationOwnerId": "abhaypratap@live.com", "status": "Initiated", "expiresOn": "2024-07-19T17:57:40.0278346Z" } diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json index 6a59cddaf163..de1f6c01ef19 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "e1084a54-27ab-4b72-a3ba-89fac9548f49", - "api-version": "2019-10-01-preview" + "api-version": "2024-08-01-preview" }, "responses": { "200": { diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index 39a2585413ee..ed711cad0452 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2019-10-01-preview", + "version": "2024-08-01-preview", "title": "SubscriptionClient", "description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically." }, @@ -738,8 +738,12 @@ "type": "object", "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "destinationEmail": { - "description": "The destination Email id where subscription needs to be accepted", + "destinationOwnerId": { + "description": "The destination OwnerId, can be object id or email address", + "type": "string" + }, + "destinationTenantId": { + "description": "The destination Tenant id where subscription needs to be accepted", "type": "string" } } @@ -784,8 +788,13 @@ "type": "object", "description": "Properties of subscription Response for Changed Target Directory.", "properties": { - "destinationEmailId": { - "description": "Destination Email Id where Subscription will be accepted.", + "destinationTenantId": { + "description": "Destination Tenant Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationOwnerId": { + "description": "Destination Owner Id where Subscription will be accepted.", "readOnly": true, "type": "string" }, From 7972c788895318be7de6939f024c7970c875f6e3 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 14 Aug 2024 12:05:46 -0700 Subject: [PATCH 26/27] Reorder new preview version changes with the latest GA version. --- .../2024-08-01-preview/subscriptions.json | 1076 ++++++++--------- 1 file changed, 538 insertions(+), 538 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index ed711cad0452..4a360fe66971 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -16,31 +16,28 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default": { - "put": { - "operationId": "Subscriptions_PutTargetDirectory", + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { + "post": { + "operationId": "Subscription_Cancel", "x-ms-examples": { - "putTargetDirectory": { - "$ref": "./examples/putTargetDirectory.json" + "cancelSubscription": { + "$ref": "./examples/cancelSubscription.json" } }, - "description": "The operation to initiate Subscription Changed Request", + "description": "The operation to cancel a subscription", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" }, { "$ref": "#/parameters/apiVersionParameter" - }, - { - "$ref": "#/parameters/targetDirectoryRequestParameters" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/TargetDirectoryResult" + "$ref": "#/definitions/CanceledSubscriptionId" } }, "default": { @@ -50,19 +47,24 @@ } } } - }, - "get": { - "operationId": "Subscriptions_GetTargetDirectory", + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { + "post": { + "operationId": "Subscription_Rename", "x-ms-examples": { - "getTargetDirectory": { - "$ref": "./examples/getTargetDirectory.json" + "renameSubscription": { + "$ref": "./examples/renameSubscription.json" } }, - "description": "The operation to view Initiator Subscription Changed Request", + "description": "The operation to rename a subscription", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" }, + { + "$ref": "#/parameters/subscriptionNameParameter" + }, { "$ref": "#/parameters/apiVersionParameter" } @@ -71,38 +73,8 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/TargetDirectoryResult" - } - }, - "default": { - "description": "Describes the error if the operation is not successful.", - "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "#/definitions/RenamedSubscriptionId" } - } - } - } - }, - "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptChangeTenant": { - "post": { - "operationId": "Subscriptions_AcceptTargetDirectory", - "x-ms-examples": { - "acceptTargetDirectory": { - "$ref": "./examples/acceptTargetDirectory.json" - } - }, - "description": "The operation to accept Subscription Changed Request", - "parameters": [ - { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/parameters/apiVersionParameter" - } - ], - "responses": { - "204": { - "description": "Subscription Accepted properly with No Content." }, "default": { "description": "Describes the error if the operation is not successful.", @@ -113,15 +85,15 @@ } } }, - "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/changeTenantStatus": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { "post": { - "operationId": "Subscriptions_TargetDirectoryStatus", + "operationId": "Subscription_Enable", "x-ms-examples": { - "targetDirectoryStatus": { - "$ref": "./examples/targetDirectoryStatus.json" + "enableSubscription": { + "$ref": "./examples/enableSubscription.json" } }, - "description": "The operation for Acceptor to view the accepted request", + "description": "The operation to enable a subscription", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -134,7 +106,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/TargetDirectoryStatusResult" + "$ref": "#/definitions/EnabledSubscriptionId" } }, "default": { @@ -146,53 +118,34 @@ } } }, - "/providers/Microsoft.Subscription/operations": { + "/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": { "get": { - "description": "Lists all of the available Microsoft.Subscription API operations.", - "operationId": "Operations_List", + "description": "Get the status of the pending Microsoft.Subscription API operations.", + "operationId": "SubscriptionOperation_Get", "x-ms-examples": { - "getOperations": { - "$ref": "./examples/getOperations.json" + "getPendingSubscriptionOperations": { + "$ref": "./examples/getSubscriptionOperation.json" } }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "Successful completion of the asynchronous operation", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + "$ref": "#/definitions/SubscriptionCreationResult" } }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default": { - "get": { - "description": "Get Billing Account Policy.", - "operationId": "BillingAccount_GetPolicy", - "x-ms-examples": { - "GetBillingAccountPolicy": { - "$ref": "./examples/getBillingAccountPolicy.json" - } - }, - "responses": { - "200": { - "description": "Normal response for a successful query.", - "schema": { - "$ref": "#/definitions/BillingAccountPoliciesResponse" + "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": { @@ -204,7 +157,11 @@ }, "parameters": [ { - "$ref": "#/parameters/billingAccountIdParameter" + "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" @@ -212,34 +169,34 @@ ] } }, - "/providers/Microsoft.Subscription/aliases": { + "/providers/Microsoft.Subscription/operations": { "get": { - "description": "List Alias Subscription.", - "operationId": "Alias_List", + "description": "Lists all of the available Microsoft.Subscription API operations.", + "operationId": "Operations_List", "x-ms-examples": { - "ListAlias": { - "$ref": "./examples/listAlias.json" + "getOperations": { + "$ref": "./examples/getOperations.json" } }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], "responses": { "200": { - "description": "Subscription details.", + "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/SubscriptionAliasListResult" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, - "parameters": [ - { - "$ref": "#/parameters/apiVersionParameter" - } - ], "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -355,20 +312,20 @@ ] } }, - "/providers/Microsoft.Subscription/policies": { + "/providers/Microsoft.Subscription/aliases": { "get": { - "description": "Get the subscription tenant policy for the user's tenant.", - "operationId": "SubscriptionPolicy_ListPolicyForTenant", + "description": "List Alias Subscription.", + "operationId": "Alias_List", "x-ms-examples": { - "getTenantPolicyList": { - "$ref": "./examples/getTenantPolicyList.json" + "ListAlias": { + "$ref": "./examples/listAlias.json" } }, "responses": { "200": { - "description": "Subscription tenant policy details for user's tenant.", + "description": "Subscription details.", "schema": { - "$ref": "#/definitions/GetTenantPolicyListResponse" + "$ref": "#/definitions/SubscriptionAliasListResult" } }, "default": { @@ -378,66 +335,80 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "parameters": [ { "$ref": "#/parameters/apiVersionParameter" } - ] + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + } } }, - "/providers/Microsoft.Subscription/policies/default": { - "put": { - "description": "Create or Update Subscription tenant policy for user's tenant.", - "operationId": "SubscriptionPolicy_AddUpdatePolicyForTenant", + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership": { + "post": { + "description": "Accept subscription ownership.", + "operationId": "Subscription_AcceptOwnership", "x-ms-examples": { - "TenantPolicy": { - "$ref": "./examples/changeTenantPolicy.json" + "AcceptOwnership": { + "$ref": "./examples/acceptSubscriptionOwnership.json" } }, + "x-ms-long-running-operation": true, "responses": { - "200": { - "description": "Subscription tenant policy has been successfully created/updated.", - "schema": { - "$ref": "#/definitions/GetTenantPolicyResponse" + "202": { + "description": "Accept Subscription ownership is in progress", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "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": "int32" + } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PutTenantPolicyRequestProperties" + "$ref": "#/definitions/AcceptOwnershipRequest" } }, { "$ref": "#/parameters/apiVersionParameter" } ] - }, + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": { "get": { - "description": "Get the subscription tenant policy for the user's tenant.", - "operationId": "SubscriptionPolicy_GetPolicyForTenant", + "description": "Accept subscription ownership status.", + "operationId": "Subscription_AcceptOwnershipStatus", "x-ms-examples": { - "getTenantPolicy": { - "$ref": "./examples/getTenantPolicy.json" + "AcceptOwnershipStatus": { + "$ref": "./examples/acceptOwnershipStatus.json" } }, "responses": { "200": { - "description": "Subscription tenant policy details for user's tenant.", + "description": "Subscription details.", "schema": { - "$ref": "#/definitions/GetTenantPolicyResponse" + "$ref": "#/definitions/AcceptOwnershipStatusResponse" } }, "default": { @@ -448,40 +419,29 @@ } }, "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, { "$ref": "#/parameters/apiVersionParameter" } ] } }, - "/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": { - "get": { - "description": "Get the status of the pending Microsoft.Subscription API operations.", - "operationId": "SubscriptionOperation_Get", + "/providers/Microsoft.Subscription/policies/default": { + "put": { + "description": "Create or Update Subscription tenant policy for user's tenant.", + "operationId": "SubscriptionPolicy_AddUpdatePolicyForTenant", "x-ms-examples": { - "getPendingSubscriptionOperations": { - "$ref": "./examples/getSubscriptionOperation.json" + "TenantPolicy": { + "$ref": "./examples/changeTenantPolicy.json" } }, "responses": { "200": { - "description": "Successful completion of the asynchronous operation", + "description": "Subscription tenant policy has been successfully created/updated.", "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" - } + "$ref": "#/definitions/GetTenantPolicyResponse" } }, "default": { @@ -493,82 +453,94 @@ }, "parameters": [ { - "name": "operationId", - "in": "path", - "description": "The operation ID, which can be found from the Location field in the generate recommendation response header.", + "name": "body", + "in": "body", "required": true, - "type": "string" + "schema": { + "$ref": "#/definitions/PutTenantPolicyRequestProperties" + } }, { "$ref": "#/parameters/apiVersionParameter" } ] - } - }, - "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership": { - "post": { - "description": "Accept subscription ownership.", - "operationId": "Subscription_AcceptOwnership", + }, + "get": { + "description": "Get the subscription tenant policy for the user's tenant.", + "operationId": "SubscriptionPolicy_GetPolicyForTenant", "x-ms-examples": { - "AcceptOwnership": { - "$ref": "./examples/acceptSubscriptionOwnership.json" + "getTenantPolicy": { + "$ref": "./examples/getTenantPolicy.json" } }, - "x-ms-long-running-operation": true, "responses": { - "202": { - "description": "Accept Subscription ownership is in progress", - "headers": { - "Location": { - "description": "GET this URL to retrieve the status of the asynchronous operation.", - "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": "int32" - } + "200": { + "description": "Subscription tenant policy details for user's tenant.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyResponse" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponseBody" } } }, "parameters": [ { - "$ref": "#/parameters/subscriptionIdParameter" - }, - { - "name": "body", - "in": "body", - "required": true, + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Subscription/policies": { + "get": { + "description": "Get the subscription tenant policy for the user's tenant.", + "operationId": "SubscriptionPolicy_ListPolicyForTenant", + "x-ms-examples": { + "getTenantPolicyList": { + "$ref": "./examples/getTenantPolicyList.json" + } + }, + "responses": { + "200": { + "description": "Subscription tenant policy details for user's tenant.", "schema": { - "$ref": "#/definitions/AcceptOwnershipRequest" + "$ref": "#/definitions/GetTenantPolicyListResponse" } }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ { "$ref": "#/parameters/apiVersionParameter" } ] } }, - "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default": { "get": { - "description": "Accept subscription ownership status.", - "operationId": "Subscription_AcceptOwnershipStatus", + "description": "Get Billing Account Policy.", + "operationId": "BillingAccount_GetPolicy", "x-ms-examples": { - "AcceptOwnershipStatus": { - "$ref": "./examples/acceptOwnershipStatus.json" + "GetBillingAccountPolicy": { + "$ref": "./examples/getBillingAccountPolicy.json" } }, "responses": { "200": { - "description": "Subscription details.", + "description": "Normal response for a successful query.", "schema": { - "$ref": "#/definitions/AcceptOwnershipStatusResponse" + "$ref": "#/definitions/BillingAccountPoliciesResponse" } }, "default": { @@ -580,7 +552,7 @@ }, "parameters": [ { - "$ref": "#/parameters/subscriptionIdParameter" + "$ref": "#/parameters/billingAccountIdParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -588,28 +560,31 @@ ] } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { - "post": { - "operationId": "Subscription_Cancel", + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default": { + "put": { + "operationId": "Subscriptions_PutTargetDirectory", "x-ms-examples": { - "cancelSubscription": { - "$ref": "./examples/cancelSubscription.json" + "putTargetDirectory": { + "$ref": "./examples/putTargetDirectory.json" } }, - "description": "The operation to cancel a subscription", + "description": "The operation to initiate Subscription Changed Request", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" }, { "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/targetDirectoryRequestParameters" } ], "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/CanceledSubscriptionId" + "$ref": "#/definitions/TargetDirectoryResult" } }, "default": { @@ -619,17 +594,15 @@ } } } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { - "post": { - "operationId": "Subscription_Enable", + }, + "get": { + "operationId": "Subscriptions_GetTargetDirectory", "x-ms-examples": { - "enableSubscription": { - "$ref": "./examples/enableSubscription.json" + "getTargetDirectory": { + "$ref": "./examples/getTargetDirectory.json" } }, - "description": "The operation to enable a subscription", + "description": "The operation to view Initiator Subscription Changed Request", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" @@ -642,7 +615,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/EnabledSubscriptionId" + "$ref": "#/definitions/TargetDirectoryResult" } }, "default": { @@ -654,21 +627,48 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptChangeTenant": { "post": { - "operationId": "Subscription_Rename", + "operationId": "Subscriptions_AcceptTargetDirectory", "x-ms-examples": { - "renameSubscription": { - "$ref": "./examples/renameSubscription.json" + "acceptTargetDirectory": { + "$ref": "./examples/acceptTargetDirectory.json" } }, - "description": "The operation to rename a subscription", + "description": "The operation to accept Subscription Changed Request", "parameters": [ { "$ref": "#/parameters/subscriptionIdParameter" }, { - "$ref": "#/parameters/subscriptionNameParameter" + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Subscription Accepted properly with No Content." + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "#/definitions/ErrorResponseBody" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/changeTenantStatus": { + "post": { + "operationId": "Subscriptions_TargetDirectoryStatus", + "x-ms-examples": { + "targetDirectoryStatus": { + "$ref": "./examples/targetDirectoryStatus.json" + } + }, + "description": "The operation for Acceptor to view the accepted request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" }, { "$ref": "#/parameters/apiVersionParameter" @@ -678,7 +678,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/RenamedSubscriptionId" + "$ref": "#/definitions/TargetDirectoryStatusResult" } }, "default": { @@ -724,172 +724,119 @@ } } }, - "TargetDirectoryRequest": { + "CanceledSubscriptionId": { + "description": "The ID of the canceled subscription", "type": "object", - "description": "Subscription Request for Changed Target Directory.", "properties": { - "properties": { - "$ref": "#/definitions/TargetDirectoryRequestProperties", - "description": "Target Directory request properties." + "subscriptionId": { + "description": "The ID of the canceled subscription", + "type": "string", + "readOnly": true } } }, - "TargetDirectoryRequestProperties": { + "RenamedSubscriptionId": { + "description": "The ID of the subscriptions that is being renamed", "type": "object", - "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "destinationOwnerId": { - "description": "The destination OwnerId, can be object id or email address", - "type": "string" - }, - "destinationTenantId": { - "description": "The destination Tenant id where subscription needs to be accepted", - "type": "string" + "subscriptionId": { + "description": "The ID of the subscriptions that is being renamed", + "type": "string", + "readOnly": true } } }, - "TargetDirectoryStatusResult": { + "EnabledSubscriptionId": { + "description": "The ID of the subscriptions that is being enabled", "type": "object", - "description": "Subscription Status for accepted request.", "properties": { - "status": { - "description": "Subscription Status", - "type": "string" + "subscriptionId": { + "description": "The ID of the subscriptions that is being enabled", + "type": "string", + "readOnly": true } } }, - "TargetDirectoryResult": { + "SubscriptionCreationResult": { + "description": "The created subscription object.", "type": "object", - "x-ms-azure-resource": true, - "description": "Subscription Response for Changed Target Directory.", "properties": { - "id": { - "description": "Fully qualified ID for the Subscription Changed Directory resource.", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Subscription Name.", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", - "readOnly": true, + "subscriptionLink": { + "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", "type": "string" - }, - "properties": { - "$ref": "#/definitions/TargetDirectoryResultProperties", - "description": "Subscription Changed Target Directory response properties." } } }, - "TargetDirectoryResultProperties": { + "SubscriptionName": { "type": "object", - "description": "Properties of subscription Response for Changed Target Directory.", + "description": "The new name of the subscription.", "properties": { - "destinationTenantId": { - "description": "Destination Tenant Id where Subscription will be accepted.", - "readOnly": true, - "type": "string" - }, - "destinationOwnerId": { - "description": "Destination Owner Id where Subscription will be accepted.", - "readOnly": true, - "type": "string" - }, - "status": { - "description": "Subscription Status.", - "readOnly": true, - "type": "string" - }, - "expiresOn": { - "description": "Subscription Initiate Request Expiry time", - "readOnly": true, + "subscriptionName": { "type": "string", - "format": "date-time" + "description": "New subscription name" } } }, - "BillingAccountPoliciesResponse": { - "description": "Billing account policies information.", + "PutAliasRequest": { + "description": "The parameters required to create a new subscription.", "type": "object", "properties": { - "id": { - "description": "Fully qualified ID for the policy.", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Policy name.", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "Resource type.", - "readOnly": true, - "type": "string" - }, "properties": { - "$ref": "#/definitions/BillingAccountPoliciesResponseProperties", - "description": "Billing account policies response properties." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, - "BillingAccountPoliciesResponseProperties": { - "description": "Put billing account policies response properties.", - "type": "object", - "properties": { - "serviceTenants": { - "description": "Service tenant for the billing account.", - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ServiceTenantResponse", - "description": "Billing account service tenant." - } - }, - "allowTransfers": { - "description": "Determine if the transfers are allowed for the billing account", - "type": "boolean" + "$ref": "#/definitions/PutAliasRequestProperties", + "description": "Put alias request properties." } } }, - "ServiceTenantResponse": { - "description": "Billing account service tenant.", + "PutAliasRequestProperties": { + "description": "Put subscription properties.", "type": "object", "properties": { - "tenantId": { - "description": "Service tenant id.", + "displayName": { + "description": "The friendly name of the subscription.", "type": "string" }, - "tenantName": { - "description": "Service tenant name.", + "workload": { + "$ref": "#/definitions/Workload" + }, + "billingScope": { + "$ref": "#/definitions/BillingScope" + }, + "subscriptionId": { + "description": "This parameter can be used to create alias for existing subscription Id", + "type": "string" + }, + "resellerId": { + "description": "Reseller Id", "type": "string" + }, + "additionalProperties": { + "$ref": "#/definitions/PutAliasRequestAdditionalProperties", + "description": "Put alias request additional properties." } } }, - "SubscriptionAliasListResult": { - "description": "The list of aliases.", + "PutAliasRequestAdditionalProperties": { + "description": "Put subscription additional properties.", "type": "object", "properties": { - "value": { - "description": "The list of alias.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/SubscriptionAliasResponse" - } + "managementGroupId": { + "description": "Management group Id for the subscription.", + "type": "string" }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true + "subscriptionTenantId": { + "description": "Tenant Id of the subscription", + "type": "string" + }, + "subscriptionOwnerId": { + "description": "Owner Id of the subscription", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, @@ -989,88 +936,85 @@ } } }, - "Workload": { - "description": "The workload type of the subscription. It can be either Production or DevTest.", - "type": "string", - "x-ms-enum": { - "name": "workload", - "modelAsString": true - }, - "enum": [ - "Production", - "DevTest" - ] - }, - "BillingScope": { - "description": "Billing scope of the subscription.\nFor CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}\nFor PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}\nFor Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", - "type": "string" - }, - "AcceptOwnershipState": { - "readOnly": true, - "type": "string", - "description": "The accept ownership state of the resource.", - "enum": [ - "Pending", - "Completed", - "Expired" - ], - "x-ms-enum": { - "name": "AcceptOwnership", - "modelAsString": true + "SubscriptionAliasListResult": { + "description": "The list of aliases.", + "type": "object", + "properties": { + "value": { + "description": "The list of alias.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } } }, - "PutAliasRequest": { - "description": "The parameters required to create a new subscription.", + "AcceptOwnershipRequest": { + "description": "The parameters required to accept subscription ownership.", "type": "object", "properties": { "properties": { - "$ref": "#/definitions/PutAliasRequestProperties", - "description": "Put alias request properties." + "$ref": "#/definitions/AcceptOwnershipRequestProperties", + "description": "Accept subscription ownership request properties." } } }, - "PutAliasRequestProperties": { - "description": "Put subscription properties.", + "AcceptOwnershipRequestProperties": { + "description": "Accept subscription ownership request properties.", "type": "object", + "required": [ + "displayName" + ], "properties": { "displayName": { "description": "The friendly name of the subscription.", "type": "string" }, - "workload": { - "$ref": "#/definitions/Workload" - }, - "billingScope": { - "$ref": "#/definitions/BillingScope" - }, - "subscriptionId": { - "description": "This parameter can be used to create alias for existing subscription Id", - "type": "string" - }, - "resellerId": { - "description": "Reseller Id", + "managementGroupId": { + "description": "Management group Id for the subscription.", "type": "string" }, - "additionalProperties": { - "$ref": "#/definitions/PutAliasRequestAdditionalProperties", - "description": "Put alias request additional properties." + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "PutAliasRequestAdditionalProperties": { - "description": "Put subscription additional properties.", + "AcceptOwnershipStatusResponse": { + "description": "Subscription Accept Ownership Response", "type": "object", "properties": { - "managementGroupId": { - "description": "Management group Id for the subscription.", + "subscriptionId": { + "description": "Newly created subscription Id.", + "readOnly": true, + "type": "string" + }, + "acceptOwnershipState": { + "$ref": "#/definitions/AcceptOwnershipState" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" + }, + "billingOwner": { + "description": "UPN of the billing owner", + "readOnly": true, "type": "string" }, "subscriptionTenantId": { "description": "Tenant Id of the subscription", "type": "string" }, - "subscriptionOwnerId": { - "description": "Owner Id of the subscription", + "displayName": { + "description": "The display name of the subscription.", "type": "string" }, "tags": { @@ -1082,22 +1026,26 @@ } } }, - "GetTenantPolicyListResponse": { - "description": "Tenant policy information list.", + "PutTenantPolicyRequestProperties": { + "description": "Put tenant policy request properties.", "type": "object", "properties": { - "value": { - "description": "The list of tenant policies.", + "blockSubscriptionsLeavingTenant": { + "description": "Blocks the leaving of subscriptions from user's tenant.", + "type": "boolean" + }, + "blockSubscriptionsIntoTenant": { + "description": "Blocks the entering of subscriptions into user's tenant.", + "type": "boolean" + }, + "exemptedPrincipals": { + "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", "type": "array", - "readOnly": true, "items": { - "$ref": "#/definitions/GetTenantPolicyResponse" + "format": "uuid", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" } - }, - "nextLink": { - "description": "The link (url) to the next page of results.", - "type": "string", - "readOnly": true } } }, @@ -1131,8 +1079,76 @@ }, "x-ms-azure-resource": true }, - "TenantPolicy": { - "description": "Tenant policy.", + "GetTenantPolicyListResponse": { + "description": "Tenant policy information list.", + "type": "object", + "properties": { + "value": { + "description": "The list of tenant policies.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingAccountPoliciesResponse": { + "description": "Billing account policies information.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the policy.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Policy name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/BillingAccountPoliciesResponseProperties", + "description": "Billing account policies response properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "BillingAccountPoliciesResponseProperties": { + "description": "Put billing account policies response properties.", + "type": "object", + "properties": { + "serviceTenants": { + "description": "Service tenant for the billing account.", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ServiceTenantResponse", + "description": "Billing account service tenant." + } + }, + "allowTransfers": { + "description": "Determine if the transfers are allowed for the billing account", + "type": "boolean" + } + } + }, + "TenantPolicy": { + "description": "Tenant policy.", "type": "object", "properties": { "policyId": { @@ -1159,85 +1175,34 @@ } } }, - "SubscriptionCreationResult": { - "description": "The created subscription object.", - "type": "object", - "properties": { - "subscriptionLink": { - "description": "The link to the new subscription. Use this link to check the status of subscription creation operation.", - "type": "string" - } - } + "Workload": { + "description": "The workload type of the subscription. It can be either Production or DevTest.", + "type": "string", + "x-ms-enum": { + "name": "workload", + "modelAsString": true + }, + "enum": [ + "Production", + "DevTest" + ] }, - "AcceptOwnershipRequest": { - "description": "The parameters required to accept subscription ownership.", - "type": "object", - "properties": { - "properties": { - "$ref": "#/definitions/AcceptOwnershipRequestProperties", - "description": "Accept subscription ownership request properties." - } - } + "BillingScope": { + "description": "Billing scope of the subscription.\nFor CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}\nFor PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}\nFor Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", + "type": "string" }, - "AcceptOwnershipRequestProperties": { - "description": "Accept subscription ownership request properties.", - "type": "object", - "required": [ - "displayName" + "AcceptOwnershipState": { + "readOnly": true, + "type": "string", + "description": "The accept ownership state of the resource.", + "enum": [ + "Pending", + "Completed", + "Expired" ], - "properties": { - "displayName": { - "description": "The friendly name of the subscription.", - "type": "string" - }, - "managementGroupId": { - "description": "Management group Id for the subscription.", - "type": "string" - }, - "tags": { - "description": "Tags for the subscription", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "AcceptOwnershipStatusResponse": { - "description": "Subscription Accept Ownership Response", - "type": "object", - "properties": { - "subscriptionId": { - "description": "Newly created subscription Id.", - "readOnly": true, - "type": "string" - }, - "acceptOwnershipState": { - "$ref": "#/definitions/AcceptOwnershipState" - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState" - }, - "billingOwner": { - "description": "UPN of the billing owner", - "readOnly": true, - "type": "string" - }, - "subscriptionTenantId": { - "description": "Tenant Id of the subscription", - "type": "string" - }, - "displayName": { - "description": "The display name of the subscription.", - "type": "string" - }, - "tags": { - "description": "Tags for the subscription", - "type": "object", - "additionalProperties": { - "type": "string" - } - } + "x-ms-enum": { + "name": "AcceptOwnership", + "modelAsString": true } }, "ProvisioningState": { @@ -1254,69 +1219,104 @@ "modelAsString": true } }, - "CanceledSubscriptionId": { - "description": "The ID of the canceled subscription", + "ServiceTenantResponse": { + "description": "Billing account service tenant.", "type": "object", "properties": { - "subscriptionId": { - "description": "The ID of the canceled subscription", - "type": "string", - "readOnly": true + "tenantId": { + "description": "Service tenant id.", + "type": "string" + }, + "tenantName": { + "description": "Service tenant name.", + "type": "string" } } }, - "RenamedSubscriptionId": { - "description": "The ID of the subscriptions that is being renamed", + "TargetDirectoryRequest": { "type": "object", + "description": "Subscription Request for Changed Target Directory.", "properties": { - "subscriptionId": { - "description": "The ID of the subscriptions that is being renamed", - "type": "string", - "readOnly": true + "properties": { + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." } } }, - "EnabledSubscriptionId": { - "description": "The ID of the subscriptions that is being enabled", + "TargetDirectoryRequestProperties": { "type": "object", + "description": "Properties of subscription Request for Changed Target Directory.", "properties": { - "subscriptionId": { - "description": "The ID of the subscriptions that is being enabled", - "type": "string", - "readOnly": true + "destinationOwnerId": { + "description": "The destination OwnerId, can be object id or email address", + "type": "string" + }, + "destinationTenantId": { + "description": "The destination Tenant id where subscription needs to be accepted", + "type": "string" } } }, - "SubscriptionName": { + "TargetDirectoryStatusResult": { "type": "object", - "description": "The new name of the subscription.", + "description": "Subscription Status for accepted request.", "properties": { - "subscriptionName": { - "type": "string", - "description": "New subscription name" + "status": { + "description": "Subscription Status", + "type": "string" } } }, - "PutTenantPolicyRequestProperties": { - "description": "Put tenant policy request properties.", + "TargetDirectoryResult": { "type": "object", + "x-ms-azure-resource": true, + "description": "Subscription Response for Changed Target Directory.", "properties": { - "blockSubscriptionsLeavingTenant": { - "description": "Blocks the leaving of subscriptions from user's tenant.", - "type": "boolean" + "id": { + "description": "Fully qualified ID for the Subscription Changed Directory resource.", + "readOnly": true, + "type": "string" }, - "blockSubscriptionsIntoTenant": { - "description": "Blocks the entering of subscriptions into user's tenant.", - "type": "boolean" + "name": { + "description": "Subscription Name.", + "readOnly": true, + "type": "string" }, - "exemptedPrincipals": { - "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", - "type": "array", - "items": { - "format": "uuid", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000" - } + "type": { + "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/TargetDirectoryResultProperties", + "description": "Subscription Changed Target Directory response properties." + } + } + }, + "TargetDirectoryResultProperties": { + "type": "object", + "description": "Properties of subscription Response for Changed Target Directory.", + "properties": { + "destinationTenantId": { + "description": "Destination Tenant Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationOwnerId": { + "description": "Destination Owner Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Subscription Status.", + "readOnly": true, + "type": "string" + }, + "expiresOn": { + "description": "Subscription Initiate Request Expiry time", + "readOnly": true, + "type": "string", + "format": "date-time" } } } @@ -1338,40 +1338,40 @@ "type": "string", "description": "Subscription Id." }, - "targetDirectoryRequestParameters": { + "subscriptionNameParameter": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, - "description": "Target Directory Request", + "description": "Subscription Name", "schema": { - "$ref": "#/definitions/TargetDirectoryRequest" + "$ref": "#/definitions/SubscriptionName" } }, - "billingAccountIdParameter": { - "name": "billingAccountId", + "aliasNameParameter": { + "name": "aliasName", "x-ms-parameter-location": "method", "in": "path", "required": true, "type": "string", - "description": "Billing Account Id." + "description": "AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation." }, - "aliasNameParameter": { - "name": "aliasName", + "billingAccountIdParameter": { + "name": "billingAccountId", "x-ms-parameter-location": "method", "in": "path", "required": true, "type": "string", - "description": "AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation." + "description": "Billing Account Id." }, - "subscriptionNameParameter": { + "targetDirectoryRequestParameters": { "name": "body", "x-ms-parameter-location": "method", "in": "body", "required": true, - "description": "Subscription Name", + "description": "Target Directory Request", "schema": { - "$ref": "#/definitions/SubscriptionName" + "$ref": "#/definitions/TargetDirectoryRequest" } } }, From 178d6b3b070fd780b4547c2e975ba305b89ec481 Mon Sep 17 00:00:00 2001 From: Abhay Pratap Date: Wed, 14 Aug 2024 16:41:38 -0700 Subject: [PATCH 27/27] Adding v5 type error response body. --- .../2024-08-01-preview/subscriptions.json | 66 +++++-------------- 1 file changed, 17 insertions(+), 49 deletions(-) diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json index 4a360fe66971..f5a54e5dfd76 100644 --- a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -43,7 +43,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -79,7 +79,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -112,7 +112,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -151,7 +151,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -228,7 +228,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -267,7 +267,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -298,7 +298,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -331,7 +331,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -414,7 +414,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -447,7 +447,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -483,7 +483,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -513,7 +513,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -546,7 +546,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -590,7 +590,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -621,7 +621,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -651,7 +651,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -684,7 +684,7 @@ "default": { "description": "Describes the error if the operation is not successful.", "schema": { - "$ref": "#/definitions/ErrorResponseBody" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } @@ -692,38 +692,6 @@ } }, "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" - } - } - }, - "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" - }, - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } - } - }, "CanceledSubscriptionId": { "description": "The ID of the canceled subscription", "type": "object",