From 35152e9ef58c7f60d3c8b14ef101320ad6a6eb63 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Fri, 11 Oct 2019 15:47:23 -0700 Subject: [PATCH 01/25] Add extension resource operation to swagger --- .../stable/2018-11-30/ManagedIdentity.json | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index ac6419aeafd6..777f583d9f40 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -34,6 +34,42 @@ } }, "paths": { + "{scope}/providers/Microsoft.ManagedIdentity/identities": { + "get": { + "operationId": "SystemAssignedIdentities_ListByScope", + "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", + "x-ms-examples": { + "IdentityListBySubscription": { + "$ref": "./examples/IdentityListBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The list of systemAssignedIdentities was retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/SystemAssignedIdentitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.ManagedIdentity/operations": { "get": { "operationId": "Operations_List", @@ -408,6 +444,22 @@ }, "description": "Values returned by the List operation." }, + "SystemAssignedIdentitiesListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Identity" + }, + "description": "The collection of systemAssignedIdentities returned by the listing operation." + }, + "nextLink": { + "type": "string", + "description": "The url to get the next page of results, if any." + } + }, + "description": "Values returned by the List operation." + }, "CloudError": { "x-ms-external": true, "properties": { @@ -507,6 +559,15 @@ } }, "parameters": { + "ScopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the resource. Parent resource being extended by Managed Identities.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", From efa83015f47fc850d598164188d0c7b836e8569e Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 14 Oct 2019 15:00:15 -0700 Subject: [PATCH 02/25] Add change to preview version --- .../2015-08-31-preview/ManagedIdentity.json | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 5e77b6691d3d..d1b01c8413bc 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -34,6 +34,42 @@ } }, "paths": { + "{scope}/providers/Microsoft.ManagedIdentity/identities": { + "get": { + "operationId": "SystemAssignedIdentities_ListByScope", + "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", + "x-ms-examples": { + "IdentityListBySubscription": { + "$ref": "./examples/IdentityListBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The list of systemAssignedIdentities was retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/SystemAssignedIdentitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.ManagedIdentity/operations": { "get": { "operationId": "Operations_List", @@ -388,7 +424,7 @@ "clientSecretUrl": { "type": "string", "readOnly": true, - "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials." + "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. If identity is user assigned, then the clientSecretUrl will not be present in the response, otherwise it will be present." } } }, @@ -408,6 +444,22 @@ }, "description": "Values returned by the List operation." }, + "SystemAssignedIdentitiesListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Identity" + }, + "description": "The collection of systemAssignedIdentities returned by the listing operation." + }, + "nextLink": { + "type": "string", + "description": "The url to get the next page of results, if any." + } + }, + "description": "Values returned by the List operation." + }, "CloudError": { "x-ms-external": true, "properties": { @@ -507,6 +559,15 @@ } }, "parameters": { + "ScopeParameter": { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the resource. Parent resource being extended by Managed Identities.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", From d7efab71800637e834d8620fdfb4bec64e79b8ed Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 24 Oct 2019 13:57:31 -0700 Subject: [PATCH 03/25] Correct API --- .../preview/2015-08-31-preview/ManagedIdentity.json | 2 +- .../stable/2018-11-30/ManagedIdentity.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index d1b01c8413bc..4927ac96ccd2 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "{scope}/providers/Microsoft.ManagedIdentity/identities": { + "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_ListByScope", "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 777f583d9f40..2167a711993e 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "{scope}/providers/Microsoft.ManagedIdentity/identities": { + "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_ListByScope", "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", From 25701bd99fd2d93cc7f088d1e0b204d9ebcc45c0 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 4 Nov 2019 14:52:26 -0800 Subject: [PATCH 04/25] Remove lists references. --- .../2015-08-31-preview/ManagedIdentity.json | 32 +++++++------------ .../stable/2018-11-30/ManagedIdentity.json | 30 ++++++----------- 2 files changed, 21 insertions(+), 41 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 4927ac96ccd2..a605e0e93a45 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -36,13 +36,8 @@ "paths": { "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { - "operationId": "SystemAssignedIdentities_ListByScope", - "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", - "x-ms-examples": { - "IdentityListBySubscription": { - "$ref": "./examples/IdentityListBySubscription.json" - } - }, + "operationId": "SystemAssignedIdentities_DisplayByScope", + "description": "Displays the systemAssignedIdentity available under the specified RP scope.", "parameters": [ { "$ref": "#/parameters/ScopeParameter" @@ -53,9 +48,9 @@ ], "responses": { "200": { - "description": "OK. The list of systemAssignedIdentities was retrieved and returned successfully.", + "description": "OK. The systemAssignedIdentity was retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/SystemAssignedIdentitiesListResult" + "$ref": "#/definitions/SystemAssignedIdentityResult" } }, "default": { @@ -64,9 +59,6 @@ "$ref": "#/definitions/CloudError" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -368,6 +360,7 @@ }, "location": { "type": "string", + "required": true, "description": "The Azure region where the identity lives." }, "tags": { @@ -379,6 +372,7 @@ }, "properties": { "x-ms-client-flatten": true, + "readOnly": true, "description": "The properties associated with the identity.", "$ref": "#/definitions/IdentityProperties" }, @@ -444,21 +438,17 @@ }, "description": "Values returned by the List operation." }, - "SystemAssignedIdentitiesListResult": { + "SystemAssignedIdentityResult": { "properties": { "value": { - "type": "array", + "type": "string", "items": { "$ref": "#/definitions/Identity" }, - "description": "The collection of systemAssignedIdentities returned by the listing operation." - }, - "nextLink": { - "type": "string", - "description": "The url to get the next page of results, if any." + "description": "The systemAssignedIdentity returned by the operation." } }, - "description": "Values returned by the List operation." + "description": "Values returned by the display operation." }, "CloudError": { "x-ms-external": true, @@ -564,7 +554,7 @@ "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Parent resource being extended by Managed Identities.", + "description": "The scope of the resource. Parent resource being extended by Managed Identities.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 2167a711993e..247e7833e98a 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -36,13 +36,8 @@ "paths": { "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { - "operationId": "SystemAssignedIdentities_ListByScope", - "description": "Lists all the systemAssignedIdentities available under the specified RP scope.", - "x-ms-examples": { - "IdentityListBySubscription": { - "$ref": "./examples/IdentityListBySubscription.json" - } - }, + "operationId": "SystemAssignedIdentities_DisplayByScope", + "description": "Displays the systemAssignedIdentity available under the specified RP scope.", "parameters": [ { "$ref": "#/parameters/ScopeParameter" @@ -53,9 +48,9 @@ ], "responses": { "200": { - "description": "OK. The list of systemAssignedIdentities was retrieved and returned successfully.", + "description": "OK. The systemAssignedIdentity was retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/SystemAssignedIdentitiesListResult" + "$ref": "#/definitions/SystemAssignedIdentityResult" } }, "default": { @@ -64,9 +59,6 @@ "$ref": "#/definitions/CloudError" } } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -368,6 +360,7 @@ }, "location": { "type": "string", + "required": true, "description": "The Azure region where the identity lives." }, "tags": { @@ -379,6 +372,7 @@ }, "properties": { "x-ms-client-flatten": true, + "readOnly": true, "description": "The properties associated with the identity.", "$ref": "#/definitions/IdentityProperties" }, @@ -444,21 +438,17 @@ }, "description": "Values returned by the List operation." }, - "SystemAssignedIdentitiesListResult": { + "SystemAssignedIdentityResult": { "properties": { "value": { - "type": "array", + "type": "string", "items": { "$ref": "#/definitions/Identity" }, - "description": "The collection of systemAssignedIdentities returned by the listing operation." - }, - "nextLink": { - "type": "string", - "description": "The url to get the next page of results, if any." + "description": "The systemAssignedIdentity returned by the operation." } }, - "description": "Values returned by the List operation." + "description": "Values returned by the display operation." }, "CloudError": { "x-ms-external": true, From 4bc59bf919566ccd1538b6b5db0baf94d6640392 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 7 Nov 2019 13:27:26 -0800 Subject: [PATCH 05/25] Clean up errors. --- .../preview/2015-08-31-preview/ManagedIdentity.json | 3 +-- .../stable/2018-11-30/ManagedIdentity.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index a605e0e93a45..b4b07b99a6eb 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_DisplayByScope", "description": "Displays the systemAssignedIdentity available under the specified RP scope.", @@ -360,7 +360,6 @@ }, "location": { "type": "string", - "required": true, "description": "The Azure region where the identity lives." }, "tags": { diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 247e7833e98a..9145971dbfda 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "{scope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_DisplayByScope", "description": "Displays the systemAssignedIdentity available under the specified RP scope.", @@ -360,7 +360,6 @@ }, "location": { "type": "string", - "required": true, "description": "The Azure region where the identity lives." }, "tags": { From aaa8cb746e56cd94e98413a2242be6e101a2448a Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 7 Nov 2019 14:24:01 -0800 Subject: [PATCH 06/25] Clean up linting errors. --- .../preview/2015-08-31-preview/ManagedIdentity.json | 4 ++-- .../stable/2018-11-30/ManagedIdentity.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index b4b07b99a6eb..e6e007bf1aef 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -36,8 +36,8 @@ "paths": { "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { - "operationId": "SystemAssignedIdentities_DisplayByScope", - "description": "Displays the systemAssignedIdentity available under the specified RP scope.", + "operationId": "SystemAssignedIdentities_GetByScope", + "description": "Gets the systemAssignedIdentity available under the specified RP scope.", "parameters": [ { "$ref": "#/parameters/ScopeParameter" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 9145971dbfda..64491356c8b3 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -36,8 +36,8 @@ "paths": { "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { - "operationId": "SystemAssignedIdentities_DisplayByScope", - "description": "Displays the systemAssignedIdentity available under the specified RP scope.", + "operationId": "SystemAssignedIdentities_GetByScope", + "description": "Gets the systemAssignedIdentity available under the specified RP scope.", "parameters": [ { "$ref": "#/parameters/ScopeParameter" From 18ec825a39276127b107627880b3fb041c914962 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 12 Nov 2019 11:39:52 -0800 Subject: [PATCH 07/25] Add examples --- .../2015-08-31-preview/ManagedIdentity.json | 5 ++++ .../examples/SystemAssignedIdentityGet.json | 0 .../stable/2018-11-30/ManagedIdentity.json | 5 ++++ .../examples/SystemAssignedIdentityGet.json | 27 +++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index e6e007bf1aef..6050a13c4e86 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -38,6 +38,11 @@ "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", + "x-ms-examples": { + "MsiOperationsList": { + "$ref": "./examples/SystemAssignedIdentityGet.json" + } + }, "parameters": [ { "$ref": "#/parameters/ScopeParameter" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 64491356c8b3..d5fb7e38a303 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -38,6 +38,11 @@ "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", + "x-ms-examples": { + "MsiOperationsList": { + "$ref": "./examples/SystemAssignedIdentityGet.json" + } + }, "parameters": [ { "$ref": "#/parameters/ScopeParameter" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json new file mode 100644 index 000000000000..a0e6d2c44c58 --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "scope": "resourceScope", + "api-version": "2018-11-30" + }, + "responses": { + "200": { + "body": { + "id": "/resourceScope/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/resourceScope/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/identities/default" + } + } + } + } + \ No newline at end of file From 5377423ed9045cc1c9ba49a24e4e5825afcb926f Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 12 Nov 2019 13:31:43 -0800 Subject: [PATCH 08/25] Add content to files --- .../examples/SystemAssignedIdentityGet.json | 28 +++++++++++++++++++ .../examples/SystemAssignedIdentityGet.json | 3 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index e69de29bb2d1..00dc6c22ffa8 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "scope": "resourceScope", + "api-version": "2015-08-31-preview" + }, + "responses": { + "200": { + "body": { + "id": "/resourceScope/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/resourceScope/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/identities/default" + } + } + } + } + + \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index a0e6d2c44c58..3c3adce96303 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -23,5 +23,4 @@ } } } - } - \ No newline at end of file + } \ No newline at end of file From 7e23fdde2458f63d6cf041e44e49f9e12da7f0e5 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 14 Nov 2019 12:45:06 -0800 Subject: [PATCH 09/25] Fix examples and path --- .../2015-08-31-preview/ManagedIdentity.json | 69 ++++++++++++++----- .../examples/SystemAssignedIdentityGet.json | 55 +++++++-------- .../stable/2018-11-30/ManagedIdentity.json | 69 ++++++++++++++----- .../examples/SystemAssignedIdentityGet.json | 53 +++++++------- 4 files changed, 158 insertions(+), 88 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 6050a13c4e86..6d77f8b04380 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderScope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", @@ -45,7 +45,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ScopeParameter" + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderScope" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -55,7 +61,7 @@ "200": { "description": "OK. The systemAssignedIdentity was retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/SystemAssignedIdentityResult" + "$ref": "#/definitions/SystemAssignedIdentity" } }, "default": { @@ -396,6 +402,45 @@ "x-ms-azure-resource": true, "description": "Describes an identity resource." }, + "SystemAssignedIdentity": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The id of the created identity." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the created identity." + }, + "location": { + "type": "string", + "description": "The Azure region where the identity lives." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "readOnly": true, + "description": "The properties associated with the identity.", + "$ref": "#/definitions/IdentityProperties" + }, + "type": { + "type": "string", + "readOnly": true, + + "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" + } + }, + "x-ms-azure-resource": true, + "description": "Describes an identity resource." + }, "IdentityProperties": { "description": "The properties associated with the identity.", "type": "object", @@ -442,18 +487,6 @@ }, "description": "Values returned by the List operation." }, - "SystemAssignedIdentityResult": { - "properties": { - "value": { - "type": "string", - "items": { - "$ref": "#/definitions/Identity" - }, - "description": "The systemAssignedIdentity returned by the operation." - } - }, - "description": "Values returned by the display operation." - }, "CloudError": { "x-ms-external": true, "properties": { @@ -553,12 +586,12 @@ } }, "parameters": { - "ScopeParameter": { - "name": "scope", + "ResourceProviderScopeParameter": { + "name": "resourceProviderScope", "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Parent resource being extended by Managed Identities.", + "description": "The resource provider scope of the resource. Parent resource being extended by Managed Identities.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index 00dc6c22ffa8..8a658b61348d 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -1,28 +1,29 @@ { - "parameters": { - "scope": "resourceScope", - "api-version": "2015-08-31-preview" - }, - "responses": { - "200": { - "body": { - "id": "/resourceScope/identityName", - "location": "cus", - "name": "identityName", - "properties": { - "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/resourceScope/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", - "principalId": "identityObjectID", - "tenantId": "tenantGUID" - }, - "tags": { - "key1": "value1", - "key2": "value2" - }, - "type": "Microsoft.ManagedIdentity/identities/default" - } - } - } - } - - \ No newline at end of file + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "resourceProviderScope": "resourceProviderScope" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "location": "cus", + "name": "resourceName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "SystemAssignedIdentity" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index d5fb7e38a303..1607960c7a5a 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderScope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", @@ -45,7 +45,13 @@ }, "parameters": [ { - "$ref": "#/parameters/ScopeParameter" + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderScope" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -55,7 +61,7 @@ "200": { "description": "OK. The systemAssignedIdentity was retrieved and returned successfully.", "schema": { - "$ref": "#/definitions/SystemAssignedIdentityResult" + "$ref": "#/definitions/SystemAssignedIdentity" } }, "default": { @@ -396,6 +402,45 @@ "x-ms-azure-resource": true, "description": "Describes an identity resource." }, + "SystemAssignedIdentity": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The id of the created identity." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the created identity." + }, + "location": { + "type": "string", + "description": "The Azure region where the identity lives." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "readOnly": true, + "description": "The properties associated with the identity.", + "$ref": "#/definitions/IdentityProperties" + }, + "type": { + "type": "string", + "readOnly": true, + + "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" + } + }, + "x-ms-azure-resource": true, + "description": "Describes an identity resource." + }, "IdentityProperties": { "description": "The properties associated with the identity.", "type": "object", @@ -442,18 +487,6 @@ }, "description": "Values returned by the List operation." }, - "SystemAssignedIdentityResult": { - "properties": { - "value": { - "type": "string", - "items": { - "$ref": "#/definitions/Identity" - }, - "description": "The systemAssignedIdentity returned by the operation." - } - }, - "description": "Values returned by the display operation." - }, "CloudError": { "x-ms-external": true, "properties": { @@ -553,12 +586,12 @@ } }, "parameters": { - "ScopeParameter": { - "name": "scope", + "ResourceProviderScopeParameter": { + "name": "resourceProviderScope", "in": "path", "required": true, "type": "string", - "description": "The scope of the resource. Parent resource being extended by Managed Identities.", + "description": "The resource provider scope of the resource. Parent resource being extended by Managed Identities.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index 3c3adce96303..57e50b6f90f7 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -1,26 +1,29 @@ { - "parameters": { - "scope": "resourceScope", - "api-version": "2018-11-30" - }, - "responses": { - "200": { - "body": { - "id": "/resourceScope/identityName", - "location": "cus", - "name": "identityName", - "properties": { - "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/resourceScope/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", - "principalId": "identityObjectID", - "tenantId": "tenantGUID" - }, - "tags": { - "key1": "value1", - "key2": "value2" - }, - "type": "Microsoft.ManagedIdentity/identities/default" - } - } - } - } \ No newline at end of file + "parameters": { + "api-version": "2018-11-30", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "resourceProviderScope": "resourceProviderScope" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "location": "cus", + "name": "resourceName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "SystemAssignedIdentity" + } + } + } +} \ No newline at end of file From fdefc3821d46c9e7436129f84db8bd43261c2c04 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 14 Nov 2019 13:01:03 -0800 Subject: [PATCH 10/25] Fix param --- .../preview/2015-08-31-preview/ManagedIdentity.json | 2 +- .../stable/2018-11-30/ManagedIdentity.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 6d77f8b04380..a74f9a12ebe5 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -51,7 +51,7 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ResourceProviderScope" + "$ref": "#/parameters/ResourceProviderScopeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 1607960c7a5a..aef05b189986 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -51,7 +51,7 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ResourceProviderScope" + "$ref": "#/parameters/ResourceProviderScopeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" From 95e5e948f4ca1eab91a3d6722efd9b6be00e88ef Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Fri, 15 Nov 2019 12:38:00 -0800 Subject: [PATCH 11/25] Format examples --- .../examples/SystemAssignedIdentityGet.json | 56 +++++++++---------- .../examples/SystemAssignedIdentityGet.json | 56 +++++++++---------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index 8a658b61348d..841a374dd841 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -1,29 +1,29 @@ { - "parameters": { - "api-version": "2015-08-31-preview", - "subscriptionId": "subid", - "resourceGroupName": "rgName", - "resourceName": "resourceName", - "resourceProviderScope": "resourceProviderScope" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", - "location": "cus", - "name": "resourceName", - "properties": { - "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", - "principalId": "identityObjectID", - "tenantId": "tenantGUID" - }, - "tags": { - "key1": "value1", - "key2": "value2" - }, - "type": "SystemAssignedIdentity" - } - } - } -} \ No newline at end of file + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "resourceProviderScope": "resourceProviderScope" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "location": "cus", + "name": "resourceName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "SystemAssignedIdentity" + } + } + } +} diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index 57e50b6f90f7..c68a5c9c2169 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -1,29 +1,29 @@ { - "parameters": { - "api-version": "2018-11-30", - "subscriptionId": "subid", - "resourceGroupName": "rgName", - "resourceName": "resourceName", - "resourceProviderScope": "resourceProviderScope" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", - "location": "cus", - "name": "resourceName", - "properties": { - "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", - "principalId": "identityObjectID", - "tenantId": "tenantGUID" - }, - "tags": { - "key1": "value1", - "key2": "value2" - }, - "type": "SystemAssignedIdentity" - } - } - } -} \ No newline at end of file + "parameters": { + "api-version": "2018-11-30", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "resourceProviderScope": "resourceProviderScope" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "location": "cus", + "name": "resourceName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "SystemAssignedIdentity" + } + } + } +} From 7027abf0dafdbfc308530ea6f6cd94591d958f73 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Fri, 15 Nov 2019 13:15:23 -0800 Subject: [PATCH 12/25] Run prettier --- .../2015-08-31-preview/ManagedIdentity.json | 20 +++++-------------- .../stable/2018-11-30/ManagedIdentity.json | 20 +++++-------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index a74f9a12ebe5..3b353acbfc35 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -6,20 +6,12 @@ "description": "The Managed Service Identity Client." }, "host": "management.azure.com", - "schemes": [ - "https" - ], - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], + "schemes": ["https"], + "produces": ["application/json"], + "consumes": ["application/json"], "security": [ { - "azure_auth": [ - "user_impersonation" - ] + "azure_auth": ["user_impersonation"] } ], "securityDefinitions": { @@ -389,9 +381,7 @@ "type": { "type": "string", "readOnly": true, - "enum": [ - "Microsoft.ManagedIdentity/userAssignedIdentities" - ], + "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], "x-ms-enum": { "name": "UserAssignedIdentities", "modelAsString": true diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index aef05b189986..d57dc0b99fe3 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -6,20 +6,12 @@ "description": "The Managed Service Identity Client." }, "host": "management.azure.com", - "schemes": [ - "https" - ], - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], + "schemes": ["https"], + "produces": ["application/json"], + "consumes": ["application/json"], "security": [ { - "azure_auth": [ - "user_impersonation" - ] + "azure_auth": ["user_impersonation"] } ], "securityDefinitions": { @@ -389,9 +381,7 @@ "type": { "type": "string", "readOnly": true, - "enum": [ - "Microsoft.ManagedIdentity/userAssignedIdentities" - ], + "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], "x-ms-enum": { "name": "UserAssignedIdentities", "modelAsString": true From 580d7c0b34b06d5712a1d3ead7be52deb4de5f51 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 26 Nov 2019 11:34:16 -0800 Subject: [PATCH 13/25] Address comments. --- .../2015-08-31-preview/ManagedIdentity.json | 16 ++----- .../examples/SystemAssignedIdentityGet.json | 11 ++--- .../stable/2018-11-30/ManagedIdentity.json | 47 +++++++++++++------ .../examples/SystemAssignedIdentityGet.json | 11 ++--- 4 files changed, 46 insertions(+), 39 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 3b353acbfc35..8daa643d644a 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -26,7 +26,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderScope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", @@ -37,13 +37,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceProviderScopeParameter" + "$ref": "#/parameters/ScopeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -457,7 +451,7 @@ "clientSecretUrl": { "type": "string", "readOnly": true, - "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. If identity is user assigned, then the clientSecretUrl will not be present in the response, otherwise it will be present." + "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials." } } }, @@ -576,8 +570,8 @@ } }, "parameters": { - "ResourceProviderScopeParameter": { - "name": "resourceProviderScope", + "ScopeParameter": { + "name": "scope", "in": "path", "required": true, "type": "string", diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index 841a374dd841..e5ada14bf33b 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -1,20 +1,17 @@ { "parameters": { "api-version": "2015-08-31-preview", - "subscriptionId": "subid", - "resourceGroupName": "rgName", - "resourceName": "resourceName", - "resourceProviderScope": "resourceProviderScope" + "scope": "scope" }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "id": "/scope/resourceName", "location": "cus", "name": "resourceName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "clientSecretUrl": "https://serviceRoot/scope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, @@ -22,7 +19,7 @@ "key1": "value1", "key2": "value2" }, - "type": "SystemAssignedIdentity" + "type": "ResourceProvider" } } } diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index d57dc0b99fe3..180fa0d8ac83 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -26,7 +26,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderScope}/providers/Microsoft.ManagedIdentity/identities/default": { + "/{scope}/providers/Microsoft.ManagedIdentity/identities/default": { "get": { "operationId": "SystemAssignedIdentities_GetByScope", "description": "Gets the systemAssignedIdentity available under the specified RP scope.", @@ -37,13 +37,7 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/ResourceProviderScopeParameter" + "$ref": "#/parameters/ScopeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -431,10 +425,10 @@ "x-ms-azure-resource": true, "description": "Describes an identity resource." }, - "IdentityProperties": { - "description": "The properties associated with the identity.", + "SystemAssignedIdentityProperties": { + "description": "The properties associated with the system assigned identity.", "type": "object", - "title": "Identity properties.", + "title": "System Assigned Identity properties.", "properties": { "tenantId": { "type": "string", @@ -457,7 +451,32 @@ "clientSecretUrl": { "type": "string", "readOnly": true, - "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. If identity is user assigned, then the clientSecretUrl will not be present in the response, otherwise it will be present." + "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials." + } + } + }, + "UserAssignedIdentityProperties": { + "description": "The properties associated with the user assigned identity.", + "type": "object", + "title": "User Assigned Identity properties.", + "properties": { + "tenantId": { + "type": "string", + "readOnly": true, + "format": "uuid", + "description": "The id of the tenant which the identity belongs to." + }, + "principalId": { + "type": "string", + "readOnly": true, + "format": "uuid", + "description": "The id of the service principal object associated with the created identity." + }, + "clientId": { + "type": "string", + "readOnly": true, + "format": "uuid", + "description": "The id of the app associated with the identity. This is a random generated UUID by MSI." } } }, @@ -576,8 +595,8 @@ } }, "parameters": { - "ResourceProviderScopeParameter": { - "name": "resourceProviderScope", + "ScopeParameter": { + "name": "scope", "in": "path", "required": true, "type": "string", diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index c68a5c9c2169..54ea00cf5b50 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -1,20 +1,17 @@ { "parameters": { "api-version": "2018-11-30", - "subscriptionId": "subid", - "resourceGroupName": "rgName", - "resourceName": "resourceName", - "resourceProviderScope": "resourceProviderScope" + "scope": "scope" }, "responses": { "200": { "body": { - "id": "/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName", + "id": "/scope/resourceName", "location": "cus", "name": "resourceName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subid/resourcegroups/rgName/providers/resourceProviderScope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "clientSecretUrl": "https://serviceRoot/scope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, @@ -22,7 +19,7 @@ "key1": "value1", "key2": "value2" }, - "type": "SystemAssignedIdentity" + "type": "ResourceProvider" } } } From bb830fd976bfa320fc469af69568d9c8da38e120 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 26 Nov 2019 13:01:17 -0800 Subject: [PATCH 14/25] Fix model. --- .../stable/2018-11-30/ManagedIdentity.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 180fa0d8ac83..82f1a02be4a9 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -370,7 +370,7 @@ "x-ms-client-flatten": true, "readOnly": true, "description": "The properties associated with the identity.", - "$ref": "#/definitions/IdentityProperties" + "$ref": "#/definitions/UserAssignedIdentityProperties" }, "type": { "type": "string", @@ -413,7 +413,7 @@ "x-ms-client-flatten": true, "readOnly": true, "description": "The properties associated with the identity.", - "$ref": "#/definitions/IdentityProperties" + "$ref": "#/definitions/SystemAssignedIdentityProperties" }, "type": { "type": "string", From 2f0a232e01aa66f7b9f67e33f9b7930880edf580 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 26 Nov 2019 14:30:00 -0800 Subject: [PATCH 15/25] Make location a required field --- .../preview/2015-08-31-preview/ManagedIdentity.json | 6 ++++++ .../stable/2018-11-30/ManagedIdentity.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 8daa643d644a..e388807b8e23 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -383,6 +383,9 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, @@ -422,6 +425,9 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 82f1a02be4a9..9bf9e56f2411 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -383,6 +383,9 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, @@ -422,6 +425,9 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, From 0518102c04fa9670e908924d4204a200f717c445 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 26 Nov 2019 15:34:56 -0800 Subject: [PATCH 16/25] Address lint error --- .../stable/2018-11-30/ManagedIdentity.json | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 9bf9e56f2411..b588d3fe7182 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -246,7 +246,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Identity" + "$ref": "#/definitions/IdentityPatch" }, "description": "Parameters to update the identity" } @@ -389,6 +389,49 @@ "x-ms-azure-resource": true, "description": "Describes an identity resource." }, + "IdentityPatch": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The id of the created identity." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the created identity." + }, + "location": { + "type": "string", + "description": "The Azure region where the identity lives." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "readOnly": true, + "description": "The properties associated with the identity.", + "$ref": "#/definitions/UserAssignedIdentityProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], + "x-ms-enum": { + "name": "UserAssignedIdentities", + "modelAsString": true + }, + "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" + } + }, + "x-ms-azure-resource": true, + "description": "Describes an identity resource." + }, "SystemAssignedIdentity": { "properties": { "id": { @@ -429,7 +472,7 @@ "location" ], "x-ms-azure-resource": true, - "description": "Describes an identity resource." + "description": "Describes a system assigned identity resource." }, "SystemAssignedIdentityProperties": { "description": "The properties associated with the system assigned identity.", From 7e6070eaa1bd428e881b5d633eda77e14649ad84 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Wed, 27 Nov 2019 10:39:38 -0800 Subject: [PATCH 17/25] Remove resourceName from scope --- .../examples/SystemAssignedIdentityGet.json | 4 ++-- .../stable/2018-11-30/examples/SystemAssignedIdentityGet.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index e5ada14bf33b..912701ff3863 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -6,12 +6,12 @@ "responses": { "200": { "body": { - "id": "/scope/resourceName", + "id": "/scope", "location": "cus", "name": "resourceName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/scope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "clientSecretUrl": "https://serviceRoot/scope/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index 54ea00cf5b50..85fe1eda4960 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -6,12 +6,12 @@ "responses": { "200": { "body": { - "id": "/scope/resourceName", + "id": "/scope", "location": "cus", "name": "resourceName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/scope/resourceName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "clientSecretUrl": "https://serviceRoot/scope/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, From 9f436ede1a2e2ac0442824d6f82b4f00cca3bb55 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 9 Dec 2019 12:56:40 -0800 Subject: [PATCH 18/25] Use a common resource definition --- .../2015-08-31-preview/ManagedIdentity.json | 45 +++++------- .../stable/2018-11-30/ManagedIdentity.json | 71 +++++++------------ 2 files changed, 43 insertions(+), 73 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index e388807b8e23..58acd7260323 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -343,21 +343,21 @@ } }, "definitions": { - "Identity": { + "Resource": { "properties": { "id": { "type": "string", "readOnly": true, - "description": "The id of the created identity." + "description": "The id of the resource." }, "name": { "type": "string", "readOnly": true, - "description": "The name of the created identity." + "description": "The name of the resource." }, "location": { "type": "string", - "description": "The Azure region where the identity lives." + "description": "The Azure region where the resource lives." }, "tags": { "type": "object", @@ -365,7 +365,11 @@ "type": "string" }, "description": "Resource tags" - }, + } + } + }, + "Identity": { + "properties": { "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -386,32 +390,16 @@ "required": [ "location" ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, "SystemAssignedIdentity": { "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The id of the created identity." - }, - "name": { - "type": "string", - "readOnly": true, - "description": "The name of the created identity." - }, - "location": { - "type": "string", - "description": "The Azure region where the identity lives." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -428,6 +416,11 @@ "required": [ "location" ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index b588d3fe7182..22bd8518b0fc 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -343,21 +343,21 @@ } }, "definitions": { - "Identity": { + "Resource": { "properties": { "id": { "type": "string", "readOnly": true, - "description": "The id of the created identity." + "description": "The id of the resource." }, "name": { "type": "string", "readOnly": true, - "description": "The name of the created identity." + "description": "The name of the resource." }, "location": { "type": "string", - "description": "The Azure region where the identity lives." + "description": "The Azure region where the resource lives." }, "tags": { "type": "object", @@ -365,7 +365,11 @@ "type": "string" }, "description": "Resource tags" - }, + } + } + }, + "Identity": { + "properties": { "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -386,32 +390,16 @@ "required": [ "location" ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, "IdentityPatch": { "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The id of the created identity." - }, - "name": { - "type": "string", - "readOnly": true, - "description": "The name of the created identity." - }, - "location": { - "type": "string", - "description": "The Azure region where the identity lives." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -429,32 +417,16 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "x-ms-azure-resource": true, "description": "Describes an identity resource." }, "SystemAssignedIdentity": { "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "The id of the created identity." - }, - "name": { - "type": "string", - "readOnly": true, - "description": "The name of the created identity." - }, - "location": { - "type": "string", - "description": "The Azure region where the identity lives." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -471,6 +443,11 @@ "required": [ "location" ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], "x-ms-azure-resource": true, "description": "Describes a system assigned identity resource." }, From eebdc5ddc998ccc106cf1ec7c0e163053a5640eb Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 9 Dec 2019 13:03:13 -0800 Subject: [PATCH 19/25] Run prettier --- .../preview/2015-08-31-preview/ManagedIdentity.json | 8 ++------ .../stable/2018-11-30/ManagedIdentity.json | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 58acd7260323..e7c610494672 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -387,9 +387,7 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, - "required": [ - "location" - ], + "required": ["location"], "allOf": [ { "$ref": "#/definitions/Resource" @@ -413,9 +411,7 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, - "required": [ - "location" - ], + "required": ["location"], "allOf": [ { "$ref": "#/definitions/Resource" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 22bd8518b0fc..acaeecaec54a 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -387,9 +387,7 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, - "required": [ - "location" - ], + "required": ["location"], "allOf": [ { "$ref": "#/definitions/Resource" @@ -440,9 +438,7 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, - "required": [ - "location" - ], + "required": ["location"], "allOf": [ { "$ref": "#/definitions/Resource" From a7ae1880349a518271aa02afd8cc2381e7d82ecd Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 9 Dec 2019 13:49:37 -0800 Subject: [PATCH 20/25] Fix errors --- .../preview/2015-08-31-preview/ManagedIdentity.json | 3 ++- .../stable/2018-11-30/ManagedIdentity.json | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index e7c610494672..0658cd27d77e 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -366,7 +366,8 @@ }, "description": "Resource tags" } - } + }, + "x-ms-azure-resource": true }, "Identity": { "properties": { diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index acaeecaec54a..c378611ebfbd 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -366,7 +366,9 @@ }, "description": "Resource tags" } - } + }, + "x-ms-azure-resource": true, + "description": "Describes common properties of a resource." }, "Identity": { "properties": { From 843363b1953bb1c485a80f99107b90200a203696 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Fri, 20 Dec 2019 14:23:32 -0800 Subject: [PATCH 21/25] Remove tags from systemassignedidentity response --- .../2015-08-31-preview/ManagedIdentity.json | 16 +++++++------- .../stable/2018-11-30/ManagedIdentity.json | 22 ++++++++++++------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 0658cd27d77e..31d699b6a6e2 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -358,19 +358,20 @@ "location": { "type": "string", "description": "The Azure region where the resource lives." - }, + } + }, + "x-ms-azure-resource": true, + "description": "Describes common properties of a resource." + }, + "Identity": { + "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" - } - }, - "x-ms-azure-resource": true - }, - "Identity": { - "properties": { + }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -408,7 +409,6 @@ "type": { "type": "string", "readOnly": true, - "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index c378611ebfbd..165fbdd6fd69 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -358,13 +358,6 @@ "location": { "type": "string", "description": "The Azure region where the resource lives." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" } }, "x-ms-azure-resource": true, @@ -372,6 +365,13 @@ }, "Identity": { "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -400,6 +400,13 @@ }, "IdentityPatch": { "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, "properties": { "x-ms-client-flatten": true, "readOnly": true, @@ -436,7 +443,6 @@ "type": { "type": "string", "readOnly": true, - "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, From 4217bc2350d8beb66c75328553a548b88c715e90 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Mon, 6 Jan 2020 15:42:23 -0800 Subject: [PATCH 22/25] Fix description. --- .../preview/2015-08-31-preview/ManagedIdentity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 31d699b6a6e2..4800ed746a04 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -419,7 +419,7 @@ } ], "x-ms-azure-resource": true, - "description": "Describes an identity resource." + "description": "Describes a system assigned identity resource." }, "IdentityProperties": { "description": "The properties associated with the identity.", From 09ebac4fb04e21bcd5dfbfffe136c1fa39b368ed Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 7 Jan 2020 15:08:34 -0800 Subject: [PATCH 23/25] Remove tags from response --- .../examples/SystemAssignedIdentityGet.json | 4 ---- .../stable/2018-11-30/examples/SystemAssignedIdentityGet.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json index 912701ff3863..839c51dba494 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/examples/SystemAssignedIdentityGet.json @@ -15,10 +15,6 @@ "principalId": "identityObjectID", "tenantId": "tenantGUID" }, - "tags": { - "key1": "value1", - "key2": "value2" - }, "type": "ResourceProvider" } } diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json index 85fe1eda4960..f3e08728885f 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/examples/SystemAssignedIdentityGet.json @@ -15,10 +15,6 @@ "principalId": "identityObjectID", "tenantId": "tenantGUID" }, - "tags": { - "key1": "value1", - "key2": "value2" - }, "type": "ResourceProvider" } } From 279b143bbc69403730a77a01d2eb2fe410740709 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Thu, 16 Jan 2020 10:24:07 -0800 Subject: [PATCH 24/25] Add error suppression --- specification/msi/resource-manager/readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/msi/resource-manager/readme.md b/specification/msi/resource-manager/readme.md index 5e1ef6db437e..7af982226cfd 100644 --- a/specification/msi/resource-manager/readme.md +++ b/specification/msi/resource-manager/readme.md @@ -43,6 +43,15 @@ input-file: - Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json ``` +## Suppression +``` yaml +directive: + - suppress: TrackedResourcePatchOperation + from: ManagedIdentity.json + where: $.definitions.SystemAssignedIdentity + reason: The identity type exposed under any scope is not a tracked resource since it is an extension. +``` + --- # Code Generation From c01cc28320073d045c71ea617907d37c1334ca57 Mon Sep 17 00:00:00 2001 From: Antoine Gosselin Date: Tue, 28 Jan 2020 11:05:29 -0800 Subject: [PATCH 25/25] Change array formatting --- .../2015-08-31-preview/ManagedIdentity.json | 28 ++++++++++++---- .../stable/2018-11-30/ManagedIdentity.json | 32 ++++++++++++++----- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json index 4800ed746a04..722c03ad7349 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json @@ -6,12 +6,20 @@ "description": "The Managed Service Identity Client." }, "host": "management.azure.com", - "schemes": ["https"], - "produces": ["application/json"], - "consumes": ["application/json"], + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], "security": [ { - "azure_auth": ["user_impersonation"] + "azure_auth": [ + "user_impersonation" + ] } ], "securityDefinitions": { @@ -381,7 +389,9 @@ "type": { "type": "string", "readOnly": true, - "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], + "enum": [ + "Microsoft.ManagedIdentity/userAssignedIdentities" + ], "x-ms-enum": { "name": "UserAssignedIdentities", "modelAsString": true @@ -389,7 +399,9 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, - "required": ["location"], + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource" @@ -412,7 +424,9 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, - "required": ["location"], + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json index 165fbdd6fd69..1b7501907af1 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2018-11-30/ManagedIdentity.json @@ -6,12 +6,20 @@ "description": "The Managed Service Identity Client." }, "host": "management.azure.com", - "schemes": ["https"], - "produces": ["application/json"], - "consumes": ["application/json"], + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], "security": [ { - "azure_auth": ["user_impersonation"] + "azure_auth": [ + "user_impersonation" + ] } ], "securityDefinitions": { @@ -381,7 +389,9 @@ "type": { "type": "string", "readOnly": true, - "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], + "enum": [ + "Microsoft.ManagedIdentity/userAssignedIdentities" + ], "x-ms-enum": { "name": "UserAssignedIdentities", "modelAsString": true @@ -389,7 +399,9 @@ "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities" } }, - "required": ["location"], + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource" @@ -416,7 +428,9 @@ "type": { "type": "string", "readOnly": true, - "enum": ["Microsoft.ManagedIdentity/userAssignedIdentities"], + "enum": [ + "Microsoft.ManagedIdentity/userAssignedIdentities" + ], "x-ms-enum": { "name": "UserAssignedIdentities", "modelAsString": true @@ -446,7 +460,9 @@ "description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets" } }, - "required": ["location"], + "required": [ + "location" + ], "allOf": [ { "$ref": "#/definitions/Resource"