Managed Hsms - Check Mhsm Name Availability
Checks that the managed hsm name is valid and is not already in use.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability?api-version=2022-07-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
name | True |
string |
The managed hsm name. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK -- Operation to check the mhsm name availability was successful. |
|
Other Status Codes |
Error response describing why the operation failed. |
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
Validate a managed hsm name
Sample request
Sample response
{
"nameAvailable": true
}
Definitions
Name | Description |
---|---|
Check |
The parameters used to check the availability of the managed hsm name. |
Check |
The CheckMhsmNameAvailability operation response. |
Cloud |
An error response from Key Vault resource provider |
Cloud |
An error response from Key Vault resource provider |
Reason |
The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is false. |
CheckMhsmNameAvailabilityParameters
The parameters used to check the availability of the managed hsm name.
Name | Type | Description |
---|---|---|
name |
string |
The managed hsm name. |
CheckMhsmNameAvailabilityResult
The CheckMhsmNameAvailability operation response.
Name | Type | Description |
---|---|---|
message |
string |
An error message explaining the Reason value in more detail. |
nameAvailable |
boolean |
A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. |
reason |
The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is false. |
CloudError
An error response from Key Vault resource provider
Name | Type | Description |
---|---|---|
error |
An error response from Key Vault resource provider |
CloudErrorBody
An error response from Key Vault resource provider
Name | Type | Description |
---|---|---|
code |
string |
Error code. This is a mnemonic that can be consumed programmatically. |
message |
string |
User friendly error message. The message is typically localized and may vary with service version. |
Reason
The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is false.
Name | Type | Description |
---|---|---|
AccountNameInvalid |
string |
|
AlreadyExists |
string |