Skip to content

Commit ff63535

Browse files
committed
Add check name availability api and security domain status property to managed hsm specificiation
1 parent ca6a761 commit ff63535

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"api-version": "2022-07-01",
5+
"mhsmName": {
6+
"name": "sample-mhsm"
7+
}
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"nameAvailable": true
13+
}
14+
}
15+
}
16+
}

specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,54 @@
792792
}
793793
}
794794
}
795+
},
796+
"/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability": {
797+
"post": {
798+
"tags": [
799+
"ManagedHsms"
800+
],
801+
"operationId": "ManagedHsms_CheckMhsmNameAvailability",
802+
"description": "Checks that the managed hsm name is valid and is not already in use.",
803+
"parameters": [
804+
{
805+
"name": "mhsmName",
806+
"in": "body",
807+
"required": true,
808+
"schema": {
809+
"$ref": "#/definitions/CheckMhsmNameAvailabilityParameters"
810+
},
811+
"description": "The name of the managed hsm."
812+
},
813+
{
814+
"$ref": "#/parameters/ApiVersionParameter"
815+
},
816+
{
817+
"$ref": "#/parameters/SubscriptionIdParameter"
818+
}
819+
],
820+
"responses": {
821+
"200": {
822+
"description": "OK -- Operation to check the mhsm name availability was successful.",
823+
"schema": {
824+
"$ref": "#/definitions/CheckMhsmNameAvailabilityResult"
825+
}
826+
},
827+
"default": {
828+
"description": "Error response describing why the operation failed.",
829+
"schema": {
830+
"$ref": "common.json#/definitions/CloudError"
831+
}
832+
}
833+
},
834+
"x-ms-examples": {
835+
"Validate a managed hsm name": {
836+
"$ref": "./examples/ManagedHsm_checkMhsmNameAvailability.json"
837+
}
838+
},
839+
"produces": [
840+
"application/json"
841+
]
842+
}
795843
}
796844
},
797845
"definitions": {
@@ -1426,6 +1474,92 @@
14261474
},
14271475
"description": "Properties of a private link resource.",
14281476
"type": "object"
1477+
},
1478+
"CheckMhsmNameAvailabilityParameters": {
1479+
"type": "object",
1480+
"properties": {
1481+
"name": {
1482+
"type": "string",
1483+
"description": "The managed hsm name."
1484+
}
1485+
},
1486+
"required": [
1487+
"name"
1488+
],
1489+
"description": "The parameters used to check the availability of the managed hsm name."
1490+
},
1491+
"CheckMhsmNameAvailabilityResult": {
1492+
"type": "object",
1493+
"properties": {
1494+
"nameAvailable": {
1495+
"readOnly": true,
1496+
"type": "boolean",
1497+
"description": "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."
1498+
},
1499+
"reason": {
1500+
"readOnly": true,
1501+
"type": "string",
1502+
"description": "The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is false.",
1503+
"enum": [
1504+
"AccountNameInvalid",
1505+
"AlreadyExists"
1506+
],
1507+
"x-ms-enum": {
1508+
"name": "Reason",
1509+
"modelAsString": true
1510+
}
1511+
},
1512+
"message": {
1513+
"readOnly": true,
1514+
"type": "string",
1515+
"description": "An error message explaining the Reason value in more detail."
1516+
}
1517+
},
1518+
"description": "The CheckMhsmNameAvailability operation response."
1519+
},
1520+
"ManagedHSMSecurityDomainProperties": {
1521+
"type": "object",
1522+
"properties": {
1523+
"activationStatus": {
1524+
"readOnly": true,
1525+
"type": "string",
1526+
"description": "Activation Status",
1527+
"enum": [
1528+
"Active",
1529+
"NotActivated",
1530+
"Unknown",
1531+
"Failed"
1532+
],
1533+
"x-ms-enum": {
1534+
"name": "ActivationStatus",
1535+
"modelAsString": true,
1536+
"values": [
1537+
{
1538+
"value": "Active",
1539+
"description": "The managed HSM Pool is active."
1540+
},
1541+
{
1542+
"value": "NotActivated",
1543+
"description": "The managed HSM Pool is not yet activated."
1544+
},
1545+
{
1546+
"value": "Unknown",
1547+
"description": "An unknown error occurred while activating managed hsm."
1548+
},
1549+
{
1550+
"value": "Failed",
1551+
"description": "Failed to activate managed hsm."
1552+
}
1553+
]
1554+
}
1555+
},
1556+
"activationStatusMessage": {
1557+
"readOnly": true,
1558+
"type": "string",
1559+
"description": "Activation Status Message."
1560+
}
1561+
},
1562+
"description": "The security domain properties of the managed hsm."
14291563
}
14301564
},
14311565
"parameters": {

0 commit comments

Comments
 (0)