{ "swagger": "2.0", "info": { "version": "2018-02-14-preview", "title": "KeyVaultManagementClient", "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." }, "host": "management.azure.com", "schemes": [ "https" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}": { "put": { "tags": [ "Secrets" ], "operationId": "Secrets_CreateOrUpdate", "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.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the Resource Group to which the vault belongs." }, { "name": "vaultName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9-]{3,24}$", "description": "Name of the vault" }, { "name": "secretName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9-]{1,127}$", "description": "Name of the secret" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SecretCreateOrUpdateParameters" }, "description": "Parameters to create or update the secret" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Created or updated vault", "schema": { "$ref": "#/definitions/Secret" } }, "200": { "description": "Created or updated secret", "schema": { "$ref": "#/definitions/Secret" } } }, "x-ms-examples": { "Create a secret": { "$ref": "./examples/createSecret.json" } }, "produces": [ "application/json" ], "consumes": [ "application/json" ] }, "patch": { "tags": [ "Secrets" ], "operationId": "Secrets_Update", "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.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the Resource Group to which the vault belongs." }, { "name": "vaultName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9-]{3,24}$", "description": "Name of the vault" }, { "name": "secretName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9-]{1,127}$", "description": "Name of the secret" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SecretPatchParameters" }, "description": "Parameters to patch the secret" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Patched secret", "schema": { "$ref": "#/definitions/Secret" } }, "200": { "description": "Patched secret", "schema": { "$ref": "#/definitions/Secret" } } }, "x-ms-examples": { "Update a secret": { "$ref": "./examples/updateSecret.json" } }, "produces": [ "application/json" ], "consumes": [ "application/json" ] }, "get": { "tags": [ "Secrets" ], "operationId": "Secrets_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.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the Resource Group to which the vault belongs." }, { "name": "vaultName", "in": "path", "required": true, "type": "string", "description": "The name of the vault." }, { "name": "secretName", "in": "path", "required": true, "type": "string", "description": "The name of the secret." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Retrieved secret", "schema": { "$ref": "#/definitions/Secret" } } }, "x-ms-examples": { "Get a secret": { "$ref": "./examples/getSecret.json" } }, "produces": [ "application/json" ], "consumes": [ "application/json" ] } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets": { "get": { "tags": [ "Secrets" ], "operationId": "Secrets_List", "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.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The name of the Resource Group to which the vault belongs." }, { "name": "vaultName", "in": "path", "required": true, "type": "string", "description": "The name of the vault." }, { "name": "$top", "in": "query", "type": "integer", "format": "int32", "description": "Maximum number of results to return." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Get information about secrets in the specified vault.", "schema": { "$ref": "#/definitions/SecretListResult" } } }, "x-ms-examples": { "List secrets in the vault": { "$ref": "./examples/listSecrets.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "produces": [ "application/json" ], "consumes": [ "application/json" ] } } }, "definitions": { "Attributes": { "properties": { "enabled": { "type": "boolean", "description": "Determines whether the object is enabled." }, "nbf": { "x-ms-client-name": "NotBefore", "type": "integer", "format": "unixtime", "description": "Not before date in seconds since 1970-01-01T00:00:00Z." }, "exp": { "x-ms-client-name": "Expires", "type": "integer", "format": "unixtime", "description": "Expiry date in seconds since 1970-01-01T00:00:00Z." }, "created": { "type": "integer", "format": "unixtime", "readOnly": true, "description": "Creation time in seconds since 1970-01-01T00:00:00Z." }, "updated": { "type": "integer", "format": "unixtime", "readOnly": true, "description": "Last updated time in seconds since 1970-01-01T00:00:00Z." } }, "description": "The object attributes managed by the KeyVault service." }, "SecretProperties": { "properties": { "value": { "type": "string", "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." }, "contentType": { "type": "string", "description": "The content type of the secret." }, "attributes": { "$ref": "#/definitions/SecretAttributes", "description": "The attributes of the secret." }, "secretUri": { "type": "string", "description": "The URI to retrieve the current version of the secret.", "readOnly": true }, "secretUriWithVersion": { "type": "string", "description": "The URI to retrieve the specific version of the secret.", "readOnly": true } }, "description": "Properties of the secret" }, "SecretPatchProperties": { "properties": { "value": { "type": "string", "description": "The value of the secret." }, "contentType": { "type": "string", "description": "The content type of the secret." }, "attributes": { "$ref": "#/definitions/SecretAttributes", "description": "The attributes of the secret." } }, "description": "Properties of the secret" }, "SecretAttributes": { "allOf": [ { "$ref": "#/definitions/Attributes" } ], "description": "The secret management attributes." }, "SecretCreateOrUpdateParameters": { "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The tags that will be assigned to the secret. " }, "properties": { "$ref": "#/definitions/SecretProperties", "description": "Properties of the secret" } }, "description": "Parameters for creating or updating a secret", "required": [ "properties" ], "x-ms-azure-resource": true }, "SecretPatchParameters": { "properties": { "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The tags that will be assigned to the secret. " }, "properties": { "$ref": "#/definitions/SecretPatchProperties", "description": "Properties of the secret" } }, "description": "Parameters for patching a secret", "x-ms-azure-resource": true }, "Secret": { "properties": { "properties": { "$ref": "#/definitions/SecretProperties", "description": "Properties of the secret" } }, "required": [ "properties" ], "allOf": [ { "$ref": "./keyvault.json#/definitions/Resource" } ], "description": "Resource information with extended details." }, "SecretListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Secret" }, "description": "The list of secrets." }, "nextLink": { "type": "string", "description": "The URL to get the next set of secrets." } }, "description": "List of secrets" } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "required": true, "type": "string", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "Client Api Version." } }, "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" } } } }