{ "swagger": "2.0", "info": { "title": "KeyVaultClient", "version": "7.6", "description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "x-ms-parameterized-host": { "hostTemplate": "{vaultBaseUrl}", "useSchemePrefix": false, "parameters": [ { "name": "vaultBaseUrl", "in": "path", "required": true, "type": "string", "format": "uri", "x-ms-skip-url-encoding": true } ] }, "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "OAuth2Auth": [ "https://vault.azure.net/.default" ] } ], "securityDefinitions": { "OAuth2Auth": { "type": "oauth2", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "https://vault.azure.net/.default": "" } } }, "tags": [], "paths": { "/securitydomain/download": { "post": { "operationId": "HSMSecurityDomain_Download", "description": "Retrieves the Security Domain from the managed HSM. Calling this endpoint can be used to activate a provisioned managed HSM resource.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "certificateInfoObject", "in": "body", "description": "The Security Domain download operation requires customer to provide N certificates (minimum 3 and maximum 10) containing a public key in JWK format.", "required": true, "schema": { "$ref": "#/definitions/CertificateInfoObject" } } ], "responses": { "202": { "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/SecurityDomainObject" }, "headers": { "Azure-AsyncOperation": { "type": "string", "description": "The URI to poll for completion status." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Retrieve security domain": { "$ref": "./examples/securitydomaindownloadpost-example.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "x-ms-long-running-operation": true } }, "/securitydomain/download/pending": { "get": { "operationId": "HSMSecurityDomain_DownloadPending", "description": "Retrieves the Security Domain download operation status", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SecurityDomainOperationStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Find Security Domain download operation status": { "$ref": "./examples/securitydomainoperationstatus-example.json" } } } }, "/securitydomain/upload": { "get": { "operationId": "HSMSecurityDomain_TransferKey", "description": "Retrieve Security Domain transfer key", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/TransferKey" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Retrieve Security Domain transfer key": { "$ref": "./examples/securitydomaintransferkey-example.json" } } }, "post": { "operationId": "HSMSecurityDomain_Upload", "description": "Restore the provided Security Domain.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "securityDomain", "in": "body", "description": "The Security Domain to be restored.", "required": true, "schema": { "$ref": "#/definitions/SecurityDomainObject" } } ], "responses": { "202": { "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/SecurityDomainOperationStatus" }, "headers": { "Azure-AsyncOperation": { "type": "string", "description": "The URI to poll for completion status." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation." } } }, "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Security Domain upload operation": { "$ref": "./examples/securitydomainuploadoperation-example.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, "x-ms-long-running-operation": true } }, "/securitydomain/upload/pending": { "get": { "operationId": "HSMSecurityDomain_UploadPending", "description": "Get Security Domain upload operation status", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/SecurityDomainOperationStatus" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/KeyVaultError" } } }, "x-ms-examples": { "Find Security Domain upload operation status": { "$ref": "./examples/securitydomainuploadstatus-example.json" } } } } }, "definitions": { "Attributes": { "type": "object", "description": "The object attributes managed by the KeyVault service.", "properties": { "enabled": { "type": "boolean", "description": "Determines whether the object is enabled." }, "nbf": { "type": "integer", "format": "unixtime", "description": "Not before date in UTC.", "x-ms-client-name": "notBefore" }, "exp": { "type": "integer", "format": "unixtime", "description": "Expiry date in UTC.", "x-ms-client-name": "expires" }, "created": { "type": "integer", "format": "unixtime", "description": "Creation time in UTC.", "readOnly": true }, "updated": { "type": "integer", "format": "unixtime", "description": "Last updated time in UTC.", "readOnly": true } } }, "CertificateInfoObject": { "type": "object", "description": "The Security Domain download operation requires customer to provide N certificates (minimum 3 and maximum 10) containing a public key in JWK format.", "properties": { "certificates": { "type": "array", "description": "Certificates needed from customer.", "minItems": 3, "maxItems": 10, "items": { "$ref": "#/definitions/SecurityDomainJsonWebKey" } }, "required": { "type": "integer", "format": "int32", "description": "Customer to specify the number of certificates (minimum 2 and maximum 10) to restore Security Domain.", "default": 2, "minimum": 2, "maximum": 10 } }, "required": [ "certificates" ] }, "Error": { "type": "object", "properties": { "code": { "type": "string", "description": "The error code.", "readOnly": true }, "message": { "type": "string", "description": "The error message.", "readOnly": true }, "innererror": { "$ref": "#/definitions/Error", "description": "The key vault server error.", "readOnly": true, "x-ms-client-name": "innerError" } }, "x-nullable": true }, "KeyVaultError": { "type": "object", "description": "The key vault error exception.", "properties": { "error": { "$ref": "#/definitions/Error", "description": "The key vault server error.", "readOnly": true } } }, "OperationStatus": { "type": "string", "description": "Operation status.", "enum": [ "Success", "InProgress", "Failed" ], "x-ms-enum": { "name": "OperationStatus", "modelAsString": true, "values": [ { "name": "Success", "value": "Success", "description": "The operation succeeded." }, { "name": "InProgress", "value": "InProgress", "description": "The operation is in progress." }, { "name": "Failed", "value": "Failed", "description": "The operation failed." } ] } }, "SecurityDomainJsonWebKey": { "type": "object", "description": "A JSON Web Key (JWK) for use in a security domain operation.", "properties": { "kid": { "type": "string", "description": "Key identifier." }, "kty": { "type": "string", "description": "JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. For Security Domain this value must be RSA." }, "key_ops": { "type": "array", "description": "Supported key operations.", "items": { "type": "string" } }, "n": { "type": "string", "description": "RSA modulus." }, "e": { "type": "string", "description": "RSA public exponent." }, "x5c": { "type": "array", "description": "X509 certificate chain parameter.", "items": { "type": "string" } }, "use": { "type": "string", "description": "Public Key Use Parameter. This is optional and if present must be enc." }, "x5t": { "type": "string", "description": "X509 certificate SHA1 thumbprint. This is optional." }, "x5t#S256": { "type": "string", "description": "X509 certificate SHA256 thumbprint." }, "alg": { "type": "string", "description": "Algorithm intended for use with the key." } }, "required": [ "kid", "kty", "key_ops", "n", "e", "x5c", "x5t#S256", "alg" ] }, "SecurityDomainObject": { "type": "object", "description": "The Security Domain.", "properties": { "value": { "type": "string", "description": "The Security Domain." } }, "required": [ "value" ] }, "SecurityDomainOperationStatus": { "type": "object", "description": "The Security Domain operation status.", "properties": { "status": { "$ref": "#/definitions/OperationStatus", "description": "Operation status." }, "status_details": { "type": "string", "description": "Details of the operation status." } } }, "TransferKey": { "type": "object", "description": "Security Domain transfer key.", "properties": { "key_format": { "type": "string", "description": "Specifies the format of the transfer key.", "default": "jwk" }, "transfer_key": { "$ref": "#/definitions/SecurityDomainJsonWebKey", "description": "Specifies the transfer key in JWK format." } }, "required": [ "transfer_key" ] } }, "parameters": { "Azure.Core.Foundations.ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for this operation.", "required": true, "type": "string", "minLength": 1, "x-ms-parameter-location": "method", "x-ms-client-name": "apiVersion" } } }