{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.",
    "title": "KeyVaultManagementClient",
    "version": "2016-10-01",
    "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/keyvault/resource-manager/Microsoft.KeyVault/stable/2016-10-01/secrets.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "keyvault-secrets",
    "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"
    }
  },
  "parameters": {
    "ApiVersionParameter": {
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "SubscriptionIdParameter": {
      "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets": {
      "get": {
        "description": "The List operation gets information about the secrets in a vault.  NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.",
        "operationId": "Secrets_List",
        "parameters": [
          {
            "description": "The name of the Resource Group to which the vault belongs.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the vault.",
            "in": "path",
            "name": "vaultName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Maximum number of results to return.",
            "format": "int32",
            "in": "query",
            "name": "$top",
            "type": "integer"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Get information about secrets in the specified vault.",
            "schema": {
              "$ref": "#/definitions/SecretListResult"
            }
          }
        },
        "tags": [
          "Secrets"
        ],
        "x-ms-examples": {
          "List secrets in the vault": {
            "parameters": {
              "api-version": "2016-10-01",
              "resourceGroupName": "sample-group",
              "subscriptionId": "00000000-0000-0000-0000-000000000000",
              "vaultName": "sample-vault"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                      "location": "westus",
                      "name": "secret-name",
                      "properties": {
                        "attributes": {
                          "created": 1514941476,
                          "enabled": true,
                          "updated": 1514941476
                        },
                        "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                        "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/40af42fbc10047f8a756a73211492f56"
                      },
                      "type": "Microsoft.KeyVault/vaults/secrets"
                    },
                    {
                      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name2",
                      "location": "westus",
                      "name": "secret-name2",
                      "properties": {
                        "attributes": {
                          "created": 1514941476,
                          "enabled": true,
                          "updated": 1514941476
                        },
                        "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name2",
                        "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name2/cd7264a6f56c44d1b594423c80609aae"
                      },
                      "type": "Microsoft.KeyVault/vaults/secrets"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}": {
      "get": {
        "description": "Gets the specified secret.  NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.",
        "operationId": "Secrets_Get",
        "parameters": [
          {
            "description": "The name of the Resource Group to which the vault belongs.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the vault.",
            "in": "path",
            "name": "vaultName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the secret.",
            "in": "path",
            "name": "secretName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieved secret",
            "schema": {
              "$ref": "#/definitions/Secret"
            }
          }
        },
        "tags": [
          "Secrets"
        ],
        "x-ms-examples": {
          "Get a secret": {
            "parameters": {
              "api-version": "2016-10-01",
              "resourceGroupName": "sample-group",
              "secretName": "secret-name",
              "subscriptionId": "00000000-0000-0000-0000-000000000000",
              "vaultName": "sample-vault"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                  "location": "westus",
                  "name": "secret-name",
                  "properties": {
                    "attributes": {
                      "created": 1514940950,
                      "enabled": true,
                      "updated": 1514940950
                    },
                    "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                    "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/77445834f7de41bab81d0723bf996860"
                  },
                  "type": "Microsoft.KeyVault/vaults/secrets"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update a secret in the specified subscription.  NOTE: This API is intended for internal use in ARM deployments.  Users should use the data-plane REST service for interaction with vault secrets.",
        "operationId": "Secrets_Update",
        "parameters": [
          {
            "description": "The name of the Resource Group to which the vault belongs.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the vault",
            "in": "path",
            "name": "vaultName",
            "pattern": "^[a-zA-Z0-9-]{3,24}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the secret",
            "in": "path",
            "name": "secretName",
            "pattern": "^[a-zA-Z0-9-]{1,127}$",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Parameters to patch the secret",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SecretPatchParameters"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Patched secret",
            "schema": {
              "$ref": "#/definitions/Secret"
            }
          },
          "201": {
            "description": "Patched secret",
            "schema": {
              "$ref": "#/definitions/Secret"
            }
          }
        },
        "tags": [
          "Secrets"
        ],
        "x-ms-examples": {
          "Update a secret": {
            "parameters": {
              "api-version": "2016-10-01",
              "parameters": {
                "properties": {
                  "value": "secret-value2"
                }
              },
              "resourceGroupName": "sample-group",
              "secretName": "secret-name",
              "subscriptionId": "00000000-0000-0000-0000-000000000000",
              "vaultName": "sample-vault"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                  "location": "westus",
                  "name": "secret-name",
                  "properties": {
                    "attributes": {
                      "created": 1514940684,
                      "enabled": true,
                      "updated": 1514940698
                    },
                    "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                    "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d"
                  },
                  "type": "Microsoft.KeyVault/vaults/secrets"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                  "location": "westus",
                  "name": "secret-name",
                  "properties": {
                    "attributes": {
                      "created": 1514940684,
                      "enabled": true,
                      "updated": 1514940698
                    },
                    "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                    "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d"
                  },
                  "type": "Microsoft.KeyVault/vaults/secrets"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Create or update a secret in a key vault in the specified subscription.  NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.",
        "operationId": "Secrets_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the Resource Group to which the vault belongs.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the vault",
            "in": "path",
            "name": "vaultName",
            "pattern": "^[a-zA-Z0-9-]{3,24}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "Name of the secret",
            "in": "path",
            "name": "secretName",
            "pattern": "^[a-zA-Z0-9-]{1,127}$",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          },
          {
            "description": "Parameters to create or update the secret",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SecretCreateOrUpdateParameters"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Created or updated secret",
            "schema": {
              "$ref": "#/definitions/Secret"
            }
          },
          "201": {
            "description": "Created or updated vault",
            "schema": {
              "$ref": "#/definitions/Secret"
            }
          }
        },
        "tags": [
          "Secrets"
        ],
        "x-ms-examples": {
          "Create a secret": {
            "parameters": {
              "api-version": "2016-10-01",
              "parameters": {
                "properties": {
                  "value": "secret-value"
                }
              },
              "resourceGroupName": "sample-group",
              "secretName": "secret-name",
              "subscriptionId": "00000000-0000-0000-0000-000000000000",
              "vaultName": "sample-vault"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                  "location": "westus",
                  "name": "secret-name",
                  "properties": {
                    "attributes": {
                      "created": 1514938738,
                      "enabled": true,
                      "updated": 1514938738
                    },
                    "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                    "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4"
                  },
                  "type": "Microsoft.KeyVault/vaults/secrets"
                }
              },
              "201": {
                "body": {
                  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name",
                  "location": "westus",
                  "name": "secret-name",
                  "properties": {
                    "attributes": {
                      "created": 1514938738,
                      "enabled": true,
                      "updated": 1514938738
                    },
                    "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name",
                    "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4"
                  },
                  "type": "Microsoft.KeyVault/vaults/secrets"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Attributes": {
      "description": "The object attributes managed by the KeyVault service.",
      "properties": {
        "created": {
          "description": "Creation time in seconds since 1970-01-01T00:00:00Z.",
          "format": "unixtime",
          "readOnly": true,
          "type": "integer"
        },
        "enabled": {
          "description": "Determines whether the object is enabled.",
          "type": "boolean"
        },
        "exp": {
          "description": "Expiry date in seconds since 1970-01-01T00:00:00Z.",
          "format": "unixtime",
          "type": "integer",
          "x-ms-client-name": "Expires"
        },
        "nbf": {
          "description": "Not before date in seconds since 1970-01-01T00:00:00Z.",
          "format": "unixtime",
          "type": "integer",
          "x-ms-client-name": "NotBefore"
        },
        "updated": {
          "description": "Last updated time in seconds since 1970-01-01T00:00:00Z.",
          "format": "unixtime",
          "readOnly": true,
          "type": "integer"
        }
      }
    },
    "Secret": {
      "allOf": [
        {
          "description": "Key Vault resource",
          "properties": {
            "id": {
              "description": "The Azure Resource Manager resource ID for the key vault.",
              "readOnly": true,
              "type": "string"
            },
            "location": {
              "description": "The supported Azure location where the key vault should be created.",
              "type": "string"
            },
            "name": {
              "description": "The name of the key vault.",
              "readOnly": true,
              "type": "string"
            },
            "tags": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "The tags that will be assigned to the key vault. ",
              "type": "object"
            },
            "type": {
              "description": "The resource type of the key vault.",
              "readOnly": true,
              "type": "string"
            }
          },
          "required": [
            "location"
          ],
          "x-ms-azure-resource": true
        }
      ],
      "description": "Resource information with extended details.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SecretProperties",
          "description": "Properties of the secret"
        }
      },
      "required": [
        "properties"
      ]
    },
    "SecretAttributes": {
      "allOf": [
        {
          "$ref": "#/definitions/Attributes"
        }
      ],
      "description": "The secret management attributes."
    },
    "SecretCreateOrUpdateParameters": {
      "description": "Parameters for creating or updating a secret",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SecretProperties",
          "description": "Properties of the secret"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags that will be assigned to the secret. ",
          "type": "object"
        }
      },
      "required": [
        "properties"
      ],
      "x-ms-azure-resource": true
    },
    "SecretListResult": {
      "description": "List of secrets",
      "properties": {
        "nextLink": {
          "description": "The URL to get the next set of secrets.",
          "type": "string"
        },
        "value": {
          "description": "The list of secrets.",
          "items": {
            "$ref": "#/definitions/Secret"
          },
          "type": "array"
        }
      }
    },
    "SecretPatchParameters": {
      "description": "Parameters for patching a secret",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SecretPatchProperties",
          "description": "Properties of the secret"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags that will be assigned to the secret. ",
          "type": "object"
        }
      },
      "x-ms-azure-resource": true
    },
    "SecretPatchProperties": {
      "description": "Properties of the secret",
      "properties": {
        "attributes": {
          "$ref": "#/definitions/SecretAttributes",
          "description": "The attributes of the secret."
        },
        "contentType": {
          "description": "The content type of the secret.",
          "type": "string"
        },
        "value": {
          "description": "The value of the secret.",
          "type": "string"
        }
      }
    },
    "SecretProperties": {
      "description": "Properties of the secret",
      "properties": {
        "attributes": {
          "$ref": "#/definitions/SecretAttributes",
          "description": "The attributes of the secret."
        },
        "contentType": {
          "description": "The content type of the secret.",
          "type": "string"
        },
        "secretUri": {
          "description": "The URI to retrieve the current version of the secret.",
          "readOnly": true,
          "type": "string"
        },
        "secretUriWithVersion": {
          "description": "The URI to retrieve the specific version of the secret.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "description": "The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.",
          "type": "string"
        }
      }
    }
  }
}