Azure Key Vault Managed Hsm Keys API

The ManagedHsmKeys API from Azure Key Vault — 2 operation(s) for managedhsmkeys.

GitHub OpenAPI

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys List keys in a managed HSM · Managed hsm keys list #
Ask an LLM
“Which keys are stored in my Azure Managed HSM?”
“Can I list all key names in a managed HSM pool?”
Tell an agent
List keys in managed HSM {name} in resource group {resourceGroupName}, subscription {subscriptionId}.
Show every key stored in managed HSM {name}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName} Get a key from a managed HSM · Managed hsm keys get #
Ask an LLM
“What are the current version and attributes of a key in my managed HSM?”
“Can I read a key from a managed HSM by name?”
Tell an agent
Get key {keyName} from managed HSM {name} in resource group {resourceGroupName}, subscription {subscriptionId}.
Show the current version of key {keyName} in managed HSM {name}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName} Create a key in a managed HSM if it does not exist · Managed hsm keys create if not exist #
Ask an LLM
“How do I create a key in a managed HSM only if it doesn't already exist?”
“Does creating a key in a managed HSM overwrite an existing key?”
Tell an agent
Create key {keyName} in managed HSM {name} in resource group {resourceGroupName}, subscription {subscriptionId}, with properties {properties}.
Create key {keyName} in managed HSM {name} if it does not exist yet.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-key-vault:microsoft-azure-key-vault-managedhsmkeys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-key-vault-managedhsmkeys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KeyVaultManagementClient Managed Hsm Keys API
  version: '2026-05-15'
  description: The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: ManagedHsmKeys
paths:
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys:
    get:
      operationId: ManagedHsmKeys_List
      tags:
      - ManagedHsmKeys
      description: Lists the keys in the specified managed HSM.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: name
        in: path
        description: The name of the Managed HSM Pool within the specified resource group.
        required: true
        schema:
          type: string
          maxLength: 24
          minLength: 3
          pattern: ^[A-Za-z]([A-Za-z0-9]|\-[A-Za-z0-9])+$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedHsmKeyListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Managed hsm keys list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/keys/{keyName}
  : get:
      operationId: ManagedHsmKeys_Get
      tags:
      - ManagedHsmKeys
      description: Gets the current version of the specified key from the specified managed HSM.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: name
        in: path
        description: The name of the Managed HSM Pool within the specified resource group.
        required: true
        schema:
          type: string
          maxLength: 24
          minLength: 3
          pattern: ^[A-Za-z]([A-Za-z0-9]|\-[A-Za-z0-9])+$
      - name: keyName
        in: path
        description: The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]{1,127}$
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedHsmKey'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Managed hsm keys get
      x-summary-source: derived
    put:
      operationId: ManagedHsmKeys_CreateIfNotExist
      tags:
      - ManagedHsmKeys
      description: Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create subsequent versions, and does not update existing keys.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: name
        in: path
        description: The name of the Managed HSM Pool within the specified resource group.
        required: true
        schema:
          type: string
          maxLength: 24
          minLength: 3
          pattern: ^[A-Za-z]([A-Za-z0-9]|\-[A-Za-z0-9])+$
      - name: keyName
        in: path
        description: The name of the key to be created. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information.
        required: true
        schema:
          type: string
          pattern: ^[a-zA-Z0-9-]{1,127}$
      responses:
        '200':
          description: Resource 'ManagedHsmKey' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedHsmKey'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedHsmKeyCreateParameters'
        description: The parameters used to create the specified key.
        required: true
      summary: Managed hsm keys create if not exist
      x-summary-source: derived
components:
  schemas:
    ManagedHsmKeyListResult:
      type: object
      description: The response of a ManagedHsmKey list operation.
      properties:
        value:
          type: array
          description: The ManagedHsmKey items on this page
          items:
            $ref: '#/components/schemas/ManagedHsmKey'
        nextLink:
          type: string
          format: uri
          description: The link to the next page of items
      required:
      - value
    CloudError:
      type: object
      description: An error response from Key Vault resource provider
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: An error response from Key Vault resource provider
      x-ms-external: true
    DeletionRecoveryLevel:
      type: string
      description: The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object can be permanently deleted by a privileged user; otherwise, only the system can purge the object at the end of the retention interval.
      enum:
      - Purgeable
      - Recoverable+Purgeable
      - Recoverable
      - Recoverable+ProtectedSubscription
      x-ms-enum:
        name: DeletionRecoveryLevel
        modelAsString: true
        values:
        - name: Purgeable
          value: Purgeable
        - name: Recoverable+Purgeable
          value: Recoverable+Purgeable
        - name: Recoverable
          value: Recoverable
        - name: Recoverable+ProtectedSubscription
          value: Recoverable+ProtectedSubscription
    ManagedHsmTrigger:
      type: object
      properties:
        timeAfterCreate:
          type: string
          description: 'The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. Eg: ''P90D'', ''P1Y''.'
        timeBeforeExpiry:
          type: string
          description: 'The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: ''P90D'', ''P1Y''.'
    JsonWebKeyOperation:
      type: string
      description: The permitted JSON web key operations of the key. For more information, see JsonWebKeyOperation.
      enum:
      - encrypt
      - decrypt
      - sign
      - verify
      - wrapKey
      - unwrapKey
      - import
      - release
      x-ms-enum:
        name: JsonWebKeyOperation
        modelAsString: true
        values:
        - name: encrypt
          value: encrypt
        - name: decrypt
          value: decrypt
        - name: sign
          value: sign
        - name: verify
          value: verify
        - name: wrapKey
          value: wrapKey
        - name: unwrapKey
          value: unwrapKey
        - name: import
          value: import
        - name: release
          value: release
    ManagedHsmKeyReleasePolicy:
      type: object
      properties:
        contentType:
          type: string
          description: Content type and version of key release policy
          default: application/json; charset=utf-8
        data:
          type: string
          format: base64url
          description: Blob encoding the policy rules under which the key can be released.
    ManagedHsmKeyRotationPolicyAttributes:
      type: object
      properties:
        created:
          type: integer
          format: int64
          description: Creation time in seconds since 1970-01-01T00:00:00Z.
          readOnly: true
        updated:
          type: integer
          format: int64
          description: Last updated time in seconds since 1970-01-01T00:00:00Z.
          readOnly: true
        expiryTime:
          type: string
          description: 'The expiration time for the new key version. It should be in ISO8601 format. Eg: ''P90D'', ''P1Y''.'
    ManagedHsmAction:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/KeyRotationPolicyActionType'
          description: The type of action.
    ManagedHsmRotationPolicy:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/ManagedHsmKeyRotationPolicyAttributes'
          description: The attributes of key rotation policy.
        lifetimeActions:
          type: array
          description: The lifetimeActions for key rotation action.
          items:
            $ref: '#/components/schemas/ManagedHsmLifetimeAction'
          x-ms-identifiers: []
    ManagedHsmKeyAttributes:
      type: object
      description: The object attributes managed by the Azure Key Vault service.
      properties:
        enabled:
          type: boolean
          description: Determines whether or not the object is enabled.
        nbf:
          type: integer
          format: int64
          description: Not before date in seconds since 1970-01-01T00:00:00Z.
          x-ms-client-name: NotBefore
        exp:
          type: integer
          format: int64
          description: Expiry date in seconds since 1970-01-01T00:00:00Z.
          x-ms-client-name: Expires
        created:
          type: integer
          format: int64
          description: Creation time in seconds since 1970-01-01T00:00:00Z.
          readOnly: true
        updated:
          type: integer
          format: int64
          description: Last updated time in seconds since 1970-01-01T00:00:00Z.
          readOnly: true
        recoveryLevel:
          $ref: '#/components/schemas/DeletionRecoveryLevel'
          description: The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object can be permanently deleted by a privileged user; otherwise, only the system can purge the object at the end of the retention interval.
          readOnly: true
        exportable:
          type: boolean
          description: Indicates if the private key can be exported.
    KeyRotationPolicyActionType:
      type: string
      description: The type of action.
      enum:
      - rotate
      - notify
      x-ms-enum:
        name: KeyRotationPolicyActionType
        modelAsString: false
    JsonWebKeyType:
      type: string
      description: The type of the key. For valid values, see JsonWebKeyType.
      enum:
      - EC
      - EC-HSM
      - RSA
      - RSA-HSM
      - oct-HSM
      x-ms-enum:
        name: JsonWebKeyType
        modelAsString: true
        values:
        - name: EC
          value: EC
        - name: EC-HSM
          value: EC-HSM
        - name: RSA
          value: RSA
        - name: RSA-HSM
          value: RSA-HSM
        - name: oct-HSM
          value: oct-HSM
    ManagedHsmKeyProperties:
      type: object
      description: The properties of the key.
      properties:
        attributes:
          $ref: '#/components/schemas/ManagedHsmKeyAttributes'
          description: The attributes of the key.
        kty:
          $ref: '#/components/schemas/JsonWebKeyType'
          description: The type of the key. For valid values, see JsonWebKeyType.
          minLength: 1
        keyOps:
          type: array
          items:
            $ref: '#/components/schemas/JsonWebKeyOperation'
        keySize:
          type: integer
          format: int32
          description: 'The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.'
        curveName:
          $ref: '#/components/schemas/JsonWebKeyCurveName'
          description: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys is P-256
        keyUri:
          type: string
          description: The URI to retrieve the current version of the key.
          readOnly: true
        keyUriWithVersion:
          type: string
          description: The URI to retrieve the specific version of the key.
          readOnly: true
        rotationPolicy:
          $ref: '#/components/schemas/ManagedHsmRotationPolicy'
          description: Key rotation policy in response. It will be used for both output and input. Omitted if empty
        release_policy:
          $ref: '#/components/schemas/ManagedHsmKeyReleasePolicy'
          description: Key release policy in response. It will be used for both output and input. Omitted if empty
    JsonWebKeyCurveName:
      type: string
      description: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys is P-256
      enum:
      - P-256
      - P-384
      - P-521
      - P-256K
      x-ms-enum:
        name: JsonWebKeyCurveName
        modelAsString: true
        values:
        - name: P-256
          value: P-256
        - name: P-384
          value: P-384
        - name: P-521
          value: P-521
        - name: P-256K
          value: P-256K
    ProxyResource:
      type: object
      title: Proxy Resource
      description: The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
      allOf:
      - $ref: '#/components/schemas/Resource'
    ManagedHsmKey:
      type: object
      description: The key resource.
      properties:
        properties:
          $ref: '#/components/schemas/ManagedHsmKeyProperties'
          description: The properties of the key.
          x-ms-client-flatten: true
        tags:
          type: object
          description: Resource tags
          additionalProperties:
            type: string
          x-ms-mutability:
          - read
          - update
          - create
      required:
      - properties
      allOf:
      - $ref: '#/components/schemas/ProxyResource'
    ManagedHsmLifetimeAction:
      type: object
      properties:
        trigger:
          $ref: '#/components/schemas/ManagedHsmTrigger'
          description: The trigger of key rotation policy lifetimeAction.
        action:
          $ref: '#/components/schemas/ManagedHsmAction'
          description: The action of key rotation policy lifetimeAction.
    CloudErrorBody:
      type: object
      description: An error response from Key Vault resource provider
      properties:
        code:
          type: string
          description: Error code. This is a mnemonic that can be consumed programmatically.
        message:
          type: string
          description: User friendly error message. The message is typically localized and may vary with service version.
      x-ms-external: true
    ManagedHsmKeyCreateParameters:
      type: object
      description: The parameters used to create a key.
      properties:
        tags:
          type: object
          description: The tags that will be assigned to the key.
          additionalProperties:
            type: string
        properties:
          $ref: '#/components/schemas/ManagedHsmKeyProperties'
          description: The properties of the key to be created.
      required:
      - properties
  parameters:
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription. The value must be an UUID.
      required: true
      schema:
        type: string
        format: uuid
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.