{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "The Managed Service Identity Client.",
    "title": "ManagedServiceIdentityClient",
    "version": "2015-08-31-preview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2015-08-31-preview/ManagedIdentity.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "msi-ManagedIdentity",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersionParameter": {
      "description": "Version of API to invoke.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "ResourceGroupNameParameter": {
      "description": "The name of the Resource Group to which the identity belongs.",
      "in": "path",
      "name": "resourceGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "ResourceNameParameter": {
      "description": "The name of the identity resource.",
      "in": "path",
      "name": "resourceName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionIdParameter": {
      "description": "The Id of the Subscription to which the identity belongs.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/providers/Microsoft.ManagedIdentity/operations": {
      "get": {
        "description": "Lists available operations for the Microsoft.ManagedIdentity provider",
        "operationId": "Operations_List",
        "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-examples": {
          "MsiOperationsList": {
            "parameters": {
              "api-version": "2015-08-31-preview"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "https://serviceRoot/providers/Microsoft.ManagedIdentity/operations?api-version=2015-08-31-preview&$skiptoken=X'12345'",
                  "value": [
                    {
                      "display": {
                        "description": "Gets an existing user assigned identity",
                        "operation": "Get User Assigned Identity",
                        "provider": "Managed Service Identity",
                        "resource": "User Assigned Identities"
                      },
                      "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",
                        "provider": "Managed Service Identity",
                        "resource": "User Assigned Identities"
                      },
                      "name": "Microsoft.ManagedIdentity/userAssignedIdentities/write"
                    },
                    {
                      "display": {
                        "description": "Deletes an existing user assigned identity",
                        "operation": "Delete User Assigned Identity",
                        "provider": "Managed Service Identity",
                        "resource": "User Assigned Identities"
                      },
                      "name": "Microsoft.ManagedIdentity/userAssignedIdentities/delete"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities": {
      "get": {
        "description": "Lists all the userAssignedIdentities available under the specified subscription.",
        "operationId": "UserAssignedIdentities_ListBySubscription",
        "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-examples": {
          "IdentityListBySubscription": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "https://serviceRoot/subscriptions/subId/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'",
                  "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"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities": {
      "get": {
        "description": "Lists all the userAssignedIdentities available under the specified ResourceGroup.",
        "operationId": "UserAssignedIdentities_ListByResourceGroup",
        "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-examples": {
          "IdentityListByResourceGroup": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "resourceGroupName": "rgName",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "nextLink": "https://serviceRoot/subscriptions/subId/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2015-08-31-preview&$skiptoken=X'12345'",
                  "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"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}": {
      "delete": {
        "description": "Deletes the identity.",
        "operationId": "UserAssignedIdentities_Delete",
        "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"
            }
          }
        },
        "x-ms-examples": {
          "IdentityDelete": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "resourceGroupName": "rgName",
              "resourceName": "resourceName",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {},
              "204": {}
            }
          }
        }
      },
      "get": {
        "description": "Gets the identity.",
        "operationId": "UserAssignedIdentities_Get",
        "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"
            }
          }
        },
        "x-ms-examples": {
          "IdentityGet": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "resourceGroupName": "rgName",
              "resourceName": "resourceName",
              "subscriptionId": "subid"
            },
            "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"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update an identity in the specified subscription and resource group.",
        "operationId": "UserAssignedIdentities_Update",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/ResourceNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Parameters to update the identity",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Identity"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated identity",
            "schema": {
              "$ref": "#/definitions/Identity"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "x-ms-examples": {
          "IdentityUpdate": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "parameters": {
                "location": "cus",
                "tags": {
                  "key1": "value1",
                  "key2": "value2"
                }
              },
              "resourceGroupName": "rgName",
              "resourceName": "resourceName",
              "subscriptionId": "subid"
            },
            "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"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Create or update an identity in the specified subscription and resource group.",
        "operationId": "UserAssignedIdentities_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/parameters/ResourceNameParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Parameters to create or update the identity",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/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"
            }
          }
        },
        "x-ms-examples": {
          "IdentityCreate": {
            "parameters": {
              "api-version": "2015-08-31-preview",
              "parameters": {
                "location": "cus",
                "tags": {
                  "key1": "value1",
                  "key2": "value2"
                }
              },
              "resourceGroupName": "rgName",
              "resourceName": "resourceName",
              "subscriptionId": "subid"
            },
            "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"
                }
              },
              "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "CloudError": {
      "description": "An error response from the ManagedServiceIdentity service.",
      "properties": {
        "error": {
          "$ref": "#/definitions/CloudErrorBody",
          "description": "A list of additional details about the error."
        }
      },
      "x-ms-external": true
    },
    "CloudErrorBody": {
      "description": "An error response from the ManagedServiceIdentity service.",
      "properties": {
        "code": {
          "description": "An identifier for the error.",
          "type": "string"
        },
        "details": {
          "description": "A list of additional details about the error.",
          "items": {
            "$ref": "#/definitions/CloudErrorBody"
          },
          "type": "array"
        },
        "message": {
          "description": "A message describing the error, intended to be suitable for display in a user interface.",
          "type": "string"
        },
        "target": {
          "description": "The target of the particular error. For example, the name of the property in error.",
          "type": "string"
        }
      },
      "x-ms-external": true
    },
    "Identity": {
      "description": "Describes an identity resource.",
      "properties": {
        "id": {
          "description": "The id of the created identity.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The Azure region where the identity lives.",
          "type": "string"
        },
        "name": {
          "description": "The name of the created identity.",
          "readOnly": true,
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/IdentityProperties",
          "description": "The properties associated with the identity.",
          "x-ms-client-flatten": true
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resource tags",
          "type": "object"
        },
        "type": {
          "description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities",
          "enum": [
            "Microsoft.ManagedIdentity/userAssignedIdentities"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "UserAssignedIdentities"
          }
        }
      },
      "x-ms-azure-resource": true
    },
    "IdentityProperties": {
      "description": "The properties associated with the identity.",
      "properties": {
        "clientId": {
          "description": "The id of the app associated with the identity. This is a random generated UUID by MSI.",
          "format": "uuid",
          "readOnly": true,
          "type": "string"
        },
        "clientSecretUrl": {
          "description": " The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials.",
          "readOnly": true,
          "type": "string"
        },
        "principalId": {
          "description": "The id of the service principal object associated with the created identity.",
          "format": "uuid",
          "readOnly": true,
          "type": "string"
        },
        "tenantId": {
          "description": "The id of the tenant which the identity belongs to.",
          "format": "uuid",
          "readOnly": true,
          "type": "string"
        }
      },
      "title": "Identity properties.",
      "type": "object"
    },
    "Operation": {
      "description": "Operation supported by the Microsoft.ManagedIdentity REST API.",
      "properties": {
        "display": {
          "$ref": "#/definitions/OperationDisplay",
          "description": "The object that describes the operation.",
          "title": "Operation Display."
        },
        "name": {
          "description": "The name of the REST Operation. This is of the format {provider}/{resource}/{operation}.",
          "title": "Operation Name.",
          "type": "string"
        }
      },
      "title": "Microsoft.ManagedIdentity Operation.",
      "type": "object"
    },
    "OperationDisplay": {
      "description": "The object that describes the operation.",
      "properties": {
        "description": {
          "description": "A description of the operation.",
          "title": "Operation description",
          "type": "string"
        },
        "operation": {
          "description": "The type of operation. For example: read, write, delete.",
          "title": "Operation Type.",
          "type": "string"
        },
        "provider": {
          "description": "Friendly name of the resource provider.",
          "title": "Resource Provider Name.",
          "type": "string"
        },
        "resource": {
          "description": "The resource type on which the operation is performed.",
          "title": "Resource Type.",
          "type": "string"
        }
      },
      "title": "Operation Display."
    },
    "OperationListResult": {
      "description": "A list of operations supported by Microsoft.ManagedIdentity Resource Provider.",
      "properties": {
        "nextLink": {
          "description": "The url to get the next page of results, if any.",
          "title": "Next Link",
          "type": "string"
        },
        "value": {
          "description": "A list of operations supported by Microsoft.ManagedIdentity Resource Provider.",
          "items": {
            "$ref": "#/definitions/Operation"
          },
          "title": "Operations List.",
          "type": "array"
        }
      },
      "title": "Operations List."
    },
    "UserAssignedIdentitiesListResult": {
      "description": "Values returned by the List operation.",
      "properties": {
        "nextLink": {
          "description": "The url to get the next page of results, if any.",
          "type": "string"
        },
        "value": {
          "description": "The collection of userAssignedIdentities returned by the listing operation.",
          "items": {
            "$ref": "#/definitions/Identity"
          },
          "type": "array"
        }
      }
    }
  }
}