Share via


Accounts - Change Key Vault

Affects existing volumes that are encrypted with Key Vault/Managed HSM, and new volumes. Supports HSM to Key Vault, Key Vault to HSM, HSM to HSM and Key Vault to Key Vault.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/changeKeyVault?api-version=2025-12-01

URI Parameters

Name In Required Type Description
accountName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$

The name of the NetApp account

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
keyName True

string

The name of the key that should be used for encryption.

keyVaultPrivateEndpoints True

KeyVaultPrivateEndpoint[]

Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed keys needs its own key vault private endpoint.

keyVaultUri True

string (uri)

The URI of the key vault/managed HSM that should be used for encryption.

keyVaultResourceId

string (arm-id)

Azure resource ID of the key vault/managed HSM that should be used for encryption.

Responses

Name Type Description
202 Accepted

Resource operation accepted.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Accounts_ChangeKeyVault

Sample request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/changeKeyVault?api-version=2025-12-01

{
  "keyName": "rsakey",
  "keyVaultPrivateEndpoints": [
    {
      "privateEndpointId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1",
      "virtualNetworkId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1"
    }
  ],
  "keyVaultResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.KeyVault/managedHSMs/my-hsm",
  "keyVaultUri": "https://my-key-vault.managedhsm.azure.net"
}

Sample response

Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus/operationResults/a0216c17-f9d6-4b99-9faf-9ebd4883d0e4?api-version=2025-12-01&operationResultResponseType=Location

Definitions

Name Description
ChangeKeyVault

Change key vault request

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

KeyVaultPrivateEndpoint

Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed keys needs its own key vault private endpoint.

ChangeKeyVault

Change key vault request

Name Type Description
keyName

string

The name of the key that should be used for encryption.

keyVaultPrivateEndpoints

KeyVaultPrivateEndpoint[]

Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed keys needs its own key vault private endpoint.

keyVaultResourceId

string (arm-id)

Azure resource ID of the key vault/managed HSM that should be used for encryption.

keyVaultUri

string (uri)

The URI of the key vault/managed HSM that should be used for encryption.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

KeyVaultPrivateEndpoint

Pairs of virtual network ID and private endpoint ID. Every virtual network that has volumes encrypted with customer-managed keys needs its own key vault private endpoint.

Name Type Description
privateEndpointId

string (arm-id)

Identifier of the private endpoint to reach the Azure Key Vault

virtualNetworkId

string (arm-id)

Identifier for the virtual network id