From 4feffbebe4806f8702995c56a9514ca7fef9e813 Mon Sep 17 00:00:00 2001 From: diqiu Date: Fri, 16 Nov 2018 10:43:14 -0800 Subject: [PATCH 1/3] directly copy swagger folder from old api version --- .../2018-11-30/ManagedIdentity.json | 541 ++++++++++++++++++ .../2018-11-30/examples/IdentityCreate.json | 53 ++ .../2018-11-30/examples/IdentityDelete.json | 16 + .../2018-11-30/examples/IdentityGet.json | 28 + .../examples/IdentityListByResourceGroup.json | 32 ++ .../examples/IdentityListBySubscription.json | 31 + .../2018-11-30/examples/IdentityUpdate.json | 35 ++ .../examples/MsiOperationsList.json | 41 ++ 8 files changed, 777 insertions(+) create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json create mode 100644 specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json new file mode 100644 index 000000000000..3b8753615864 --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json @@ -0,0 +1,541 @@ +{ + "swagger": "2.0", + "info": { + "version": "2015-08-31-preview", + "title": "ManagedServiceIdentityClient", + "description": "The Managed Service Identity Client." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "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" + } + } + }, + "paths": { + "/providers/Microsoft.ManagedIdentity/operations": { + "get": { + "operationId": "Operations_List", + "description": "Lists available operations for the Microsoft.ManagedIdentity provider", + "x-ms-examples": { + "MsiOperationsList": { + "$ref": "./examples/MsiOperationsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful. The response contains the list of available operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities": { + "get": { + "operationId": "UserAssignedIdentities_ListBySubscription", + "description": "Lists all the userAssignedIdentities available under the specified subscription.", + "x-ms-examples": { + "IdentityListBySubscription": { + "$ref": "./examples/IdentityListBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The list of userAssignedIdentities was retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/UserAssignedIdentitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities": { + "get": { + "operationId": "UserAssignedIdentities_ListByResourceGroup", + "description": "Lists all the userAssignedIdentities available under the specified ResourceGroup.", + "x-ms-examples": { + "IdentityListByResourceGroup": { + "$ref": "./examples/IdentityListByResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The list of userAssignedIdentities was retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/UserAssignedIdentitiesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}": { + "put": { + "operationId": "UserAssignedIdentities_CreateOrUpdate", + "description": "Create or update an identity in the specified subscription and resource group.", + "x-ms-examples": { + "IdentityCreate": { + "$ref": "./examples/IdentityCreate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Identity" + }, + "description": "Parameters to create or update the identity" + } + ], + "responses": { + "200": { + "description": "Updated identity", + "schema": { + "$ref": "#/definitions/Identity" + } + }, + "201": { + "description": "Created identity", + "schema": { + "$ref": "#/definitions/Identity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "patch": { + "operationId": "UserAssignedIdentities_Update", + "description": "Update an identity in the specified subscription and resource group.", + "x-ms-examples": { + "IdentityUpdate": { + "$ref": "./examples/IdentityUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Identity" + }, + "description": "Parameters to update the identity" + } + ], + "responses": { + "200": { + "description": "Updated identity", + "schema": { + "$ref": "#/definitions/Identity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "get": { + "operationId": "UserAssignedIdentities_Get", + "description": "Gets the identity.", + "x-ms-examples": { + "IdentityGet": { + "$ref": "./examples/IdentityGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The requested identity.", + "schema": { + "$ref": "#/definitions/Identity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "delete": { + "operationId": "UserAssignedIdentities_Delete", + "description": "Deletes the identity.", + "x-ms-examples": { + "IdentityDelete": { + "$ref": "./examples/IdentityDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Deleted Identity." + }, + "204": { + "description": "The specified identity does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "Identity": { + "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, + "description": "The properties associated with the identity.", + "$ref": "#/definitions/IdentityProperties" + }, + "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." + }, + "IdentityProperties": { + "description": "The properties associated with the identity.", + "type": "object", + "title": "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." + }, + "clientSecretUrl": { + "type": "string", + "readOnly": true, + "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials." + } + } + }, + "UserAssignedIdentitiesListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Identity" + }, + "description": "The collection of userAssignedIdentities 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": { + "error": { + "description": "A list of additional details about the error.", + "$ref": "#/definitions/CloudErrorBody" + } + }, + "description": "An error response from the ManagedServiceIdentity service." + }, + "CloudErrorBody": { + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the ManagedServiceIdentity service." + }, + "Operation": { + "title": "Microsoft.ManagedIdentity Operation.", + "description": "Operation supported by the Microsoft.ManagedIdentity REST API.", + "type": "object", + "properties": { + "name": { + "title": "Operation Name.", + "description": "The name of the REST Operation. This is of the format {provider}/{resource}/{operation}.", + "type": "string" + }, + "display": { + "title": "Operation Display.", + "description": "The object that describes the operation.", + "$ref": "#/definitions/OperationDisplay" + } + } + }, + "OperationDisplay": { + "title": "Operation Display.", + "description": "The object that describes the operation.", + "properties": { + "provider": { + "title": "Resource Provider Name.", + "description": "Friendly name of the resource provider.", + "type": "string" + }, + "operation": { + "title": "Operation Type.", + "description": "The type of operation. For example: read, write, delete.", + "type": "string" + }, + "resource": { + "title": "Resource Type.", + "description": "The resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "title": "Operation description", + "description": "A description of the operation.", + "type": "string" + } + } + }, + "OperationListResult": { + "title": "Operations List.", + "description": "A list of operations supported by Microsoft.ManagedIdentity Resource Provider.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "title": "Operations List.", + "description": "A list of operations supported by Microsoft.ManagedIdentity Resource Provider." + }, + "nextLink": { + "type": "string", + "title": "Next Link", + "description": "The url to get the next page of results, if any." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The Id of the Subscription to which the identity belongs.", + "required": true, + "type": "string" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the Resource Group to which the identity belongs.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "description": "The name of the identity resource.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Version of API to invoke.", + "required": true, + "type": "string" + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json new file mode 100644 index 000000000000..80ef0008b0cb --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "parameters": { + "location": "cus", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json new file mode 100644 index 000000000000..1e277b070ce0 --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName" + }, + "responses": { + "200": { + "body": "" + }, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json new file mode 100644 index 000000000000..032fb859dba0 --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json new file mode 100644 index 000000000000..d5a9eda69529 --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + ], + "nextLink": "https://serviceRoot/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json new file mode 100644 index 000000000000..1ef4f60b868d --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + ], + "nextLink": "https://serviceRoot/subscriptions/subId/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json new file mode 100644 index 000000000000..e086d77e3b7a --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview", + "subscriptionId": "subid", + "resourceGroupName": "rgName", + "resourceName": "resourceName", + "parameters": { + "location": "cus", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + "location": "cus", + "name": "identityName", + "properties": { + "clientId": "clientGUID", + "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", + "principalId": "identityObjectID", + "tenantId": "tenantGUID" + }, + "tags": { + "key1": "value1", + "key2": "value2" + }, + "type": "Microsoft.ManagedIdentity/userAssignedIdentities" + } + } + } +} \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json new file mode 100644 index 000000000000..f2e38fe9232f --- /dev/null +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2015-08-31-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "display": { + "description": "Gets an existing user assigned identity", + "operation": "Get User Assigned Identity", + "resource": "User Assigned Identities", + "provider": "Managed Service Identity" + }, + "name": "Microsoft.ManagedIdentity/userAssignedIdentities/read" + }, + { + "display": { + "description": "Creates a new user assigned identity or updates the tags associated with an existing user assigned identity", + "operation": "Create/Update User Assigned Identity", + "resource": "User Assigned Identities", + "provider": "Managed Service Identity" + }, + "name": "Microsoft.ManagedIdentity/userAssignedIdentities/write" + }, + { + "display": { + "description": "Deletes an existing user assigned identity", + "operation": "Delete User Assigned Identity", + "resource": "User Assigned Identities", + "provider": "Managed Service Identity" + }, + "name": "Microsoft.ManagedIdentity/userAssignedIdentities/delete" + } + ], + "nextLink": "https://serviceRoot/providers/Microsoft.ManagedIdentity/operations?api-version=2015-08-31-preview&$skiptoken=X'12345'" + } + } + } +} \ No newline at end of file From c5e3d7fb237ee96094a2198b3515dc48c03ceded Mon Sep 17 00:00:00 2001 From: diqiu Date: Fri, 16 Nov 2018 11:05:09 -0800 Subject: [PATCH 2/3] update Managed Service Identity api version to 2018-11-30, the differnt from previous api-version is the clientSecretUrl can be null if identity is user assigned --- .../2018-11-30/ManagedIdentity.json | 9 ++++--- .../2018-11-30/examples/IdentityCreate.json | 4 +--- .../2018-11-30/examples/IdentityDelete.json | 2 +- .../2018-11-30/examples/IdentityGet.json | 3 +-- .../examples/IdentityListByResourceGroup.json | 5 ++-- .../examples/IdentityListBySubscription.json | 5 ++-- .../2018-11-30/examples/IdentityUpdate.json | 3 +-- .../examples/MsiOperationsList.json | 4 ++-- .../msi/resource-manager/readme.go.md | 10 ++++++++ specification/msi/resource-manager/readme.md | 24 ++++++++++++++++++- .../msi/resource-manager/readme.ruby.md | 11 +++++++++ 11 files changed, 60 insertions(+), 20 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json index 3b8753615864..99ac4f429347 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2015-08-31-preview", + "version": "2018-11-30", "title": "ManagedServiceIdentityClient", "description": "The Managed Service Identity Client." }, @@ -388,7 +388,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, the clientSecretUrl is null, otherwise the clientSecretUrl is not null" } } }, @@ -535,7 +535,10 @@ "in": "query", "description": "Version of API to invoke.", "required": true, - "type": "string" + "type": "string", + "enum": [ + "2018-11-30" + ] } } } \ No newline at end of file diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json index 80ef0008b0cb..e2ed2f2a6802 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityCreate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid", "resourceGroupName": "rgName", "resourceName": "resourceName", @@ -20,7 +20,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, @@ -38,7 +37,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json index 1e277b070ce0..0c3e88fd300b 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityDelete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid", "resourceGroupName": "rgName", "resourceName": "resourceName" diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json index 032fb859dba0..650525c833eb 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityGet.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid", "resourceGroupName": "rgName", "resourceName": "resourceName" @@ -13,7 +13,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json index d5a9eda69529..7ffbe7111c12 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListByResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid", "resourceGroupName": "rgName" }, @@ -14,7 +14,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, @@ -25,7 +24,7 @@ "type": "Microsoft.ManagedIdentity/userAssignedIdentities" } ], - "nextLink": "https://serviceRoot/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'" + "nextLink": "https://serviceRoot/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2018-11-30&$skiptoken=X'12345'" } } } diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json index 1ef4f60b868d..1411eab353ec 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityListBySubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid" }, "responses": { @@ -13,7 +13,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, @@ -24,7 +23,7 @@ "type": "Microsoft.ManagedIdentity/userAssignedIdentities" } ], - "nextLink": "https://serviceRoot/subscriptions/subId/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'" + "nextLink": "https://serviceRoot/subscriptions/subId/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2018-11-30&$skiptoken=X'12345'" } } } diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json index e086d77e3b7a..041cf354bf8d 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/IdentityUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview", + "api-version": "2018-11-30", "subscriptionId": "subid", "resourceGroupName": "rgName", "resourceName": "resourceName", @@ -20,7 +20,6 @@ "name": "identityName", "properties": { "clientId": "clientGUID", - "clientSecretUrl": "https://serviceRoot/subscriptions/subscriptionId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName/credentials?tid=tenantId&oid=principalId&aid=clientId", "principalId": "identityObjectID", "tenantId": "tenantGUID" }, diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json index f2e38fe9232f..f3cdfff0c98c 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/examples/MsiOperationsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-08-31-preview" + "api-version": "2018-11-30" }, "responses": { "200": { @@ -34,7 +34,7 @@ "name": "Microsoft.ManagedIdentity/userAssignedIdentities/delete" } ], - "nextLink": "https://serviceRoot/providers/Microsoft.ManagedIdentity/operations?api-version=2015-08-31-preview&$skiptoken=X'12345'" + "nextLink": "https://serviceRoot/providers/Microsoft.ManagedIdentity/operations?api-version=2018-11-30&$skiptoken=X'12345'" } } } diff --git a/specification/msi/resource-manager/readme.go.md b/specification/msi/resource-manager/readme.go.md index ed9418e0b291..8117e3fba28b 100644 --- a/specification/msi/resource-manager/readme.go.md +++ b/specification/msi/resource-manager/readme.go.md @@ -13,9 +13,19 @@ go: ``` yaml $(go) && $(multiapi) batch: + - tag: package-2018-11-30 - tag: package-2015-08-31-preview ``` +### Tag: package-2018-11-30 and go + +These settings apply only when `--tag=package-2018-11-30 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-11-30' && $(go) +output-folder: $(go-sdk-folder)/services/$(namespace)/mgmt/2018-11-30/$(namespace) +``` + ### Tag: package-2015-08-31-preview and go These settings apply only when `--tag=package-2015-08-31-preview --go` is specified on the command line. diff --git a/specification/msi/resource-manager/readme.md b/specification/msi/resource-manager/readme.md index e05ba279f00d..7e63c2f6d6c8 100644 --- a/specification/msi/resource-manager/readme.md +++ b/specification/msi/resource-manager/readme.md @@ -22,9 +22,17 @@ These are the global settings for the Managed Service Identity API. ``` yaml openapi-type: arm -tag: package-2015-08-31-preview +tag: package-2018-11-30 ``` +### Tag: package-2018-11-30 + +These settings apply only when `--tag=package-2018-11-30` is specified on the command line. + +``` yaml $(tag) == 'package-2018-11-30' +input-file: +- Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json +``` ### Tag: package-2015-08-31-preview @@ -120,9 +128,23 @@ output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-msi ``` yaml $(java) && $(multiapi) batch: + - tag: package-2018-11-30 - tag: package-2015-08-31-preview ``` +### Tag: package-2018-11-30 and java + +These settings apply only when `--tag=package-2018-11-30 --java` is specified on the command line. +Please also specify `--azure-libraries-for-java=`. + +``` yaml $(tag) == 'package-2018-11-30' && $(java) && $(multiapi) +java: + namespace: com.microsoft.azure.management.managedserviceidentity.v2018-11-30 + output-folder: $(azure-libraries-for-java-folder)/managedserviceidentity/resource-manager/v2018-11-30 +regenerate-manager: true +generate-interface: true +``` + ### Tag: package-2015-08-31-preview and java These settings apply only when `--tag=package-2015-08-31-preview --java` is specified on the command line. diff --git a/specification/msi/resource-manager/readme.ruby.md b/specification/msi/resource-manager/readme.ruby.md index 37dc383b121c..d510835bb63c 100644 --- a/specification/msi/resource-manager/readme.ruby.md +++ b/specification/msi/resource-manager/readme.ruby.md @@ -12,9 +12,20 @@ azure-arm: true ``` yaml $(ruby) && $(multiapi) batch: + - tag: package-2018-11-30 - tag: package-2015-08-31-preview ``` +### Tag: package-2018-11-30 and ruby + +These settings apply only when `--tag=package-2018-11-30 --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +``` yaml $(tag) == 'package-2018-11-30' && $(ruby) +namespace: "Azure::ManagedServiceIdentity::Mgmt::V2018-11-30" +output-folder: $(ruby-sdks-folder)/management/azure_mgmt_msi/lib +``` + ### Tag: package-2015-08-31-preview and ruby These settings apply only when `--tag=package-2015-08-31-preview --ruby` is specified on the command line. From d191254c74aaea1bc9db348a4be70aedbfed96b1 Mon Sep 17 00:00:00 2001 From: diqiu Date: Tue, 27 Nov 2018 15:12:00 -0800 Subject: [PATCH 3/3] feedback --- .../2018-11-30/ManagedIdentity.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json index 99ac4f429347..f6270f362ca6 100644 --- a/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json +++ b/specification/msi/resource-manager/Microsoft.ManagedIdentity/2018-11-30/ManagedIdentity.json @@ -388,7 +388,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, the clientSecretUrl is null, otherwise the clientSecretUrl is not null" + "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." } } }, @@ -535,10 +535,7 @@ "in": "query", "description": "Version of API to invoke.", "required": true, - "type": "string", - "enum": [ - "2018-11-30" - ] + "type": "string" } } } \ No newline at end of file