Skip to main content

managed_hsms

Creates, updates, deletes, gets or lists a managed_hsms resource.

Overview

Namemanaged_hsms
TypeResource
Idazure.key_vault.managed_hsms

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
createModestringThe create mode to indicate whether the resource is being created or is being recovered from a deleted resource. Known values are: "recover" and "default". (recover, default)
enablePurgeProtectionbooleanProperty specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true activates protection against purge for this managed HSM pool and its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. Enabling this functionality is irreversible.
enableSoftDeletebooleanProperty to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. Soft delete is enabled by default for all managed HSMs and is immutable.
hsmUristringThe URI of the managed hsm pool for performing operations on keys.
identityobjectManaged service identity.
initialAdminObjectIdsarrayArray of initial administrators object ids for this managed hsm pool.
locationstringThe geo-location where the resource lives.
networkAclsobjectRules governing the accessibility of the key vault from specific network locations.
privateEndpointConnectionsarrayList of private endpoint connections associated with the managed hsm pool.
provisioningStatestringProvisioning state. Known values are: "Succeeded", "Provisioning", "Failed", "Updating", "Deleting", "Activated", "SecurityDomainRestore", and "Restoring". (Succeeded, Provisioning, Failed, Updating, Deleting, Activated, SecurityDomainRestore, Restoring)
publicNetworkAccessstringControl permission to the managed HSM from public networks. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
regionsarrayList of all regions associated with the managed hsm pool.
scheduledPurgeDatestring (date-time)The scheduled purge date in UTC.
securityDomainPropertiesobjectManaged HSM security domain properties.
skuobjectSKU details.
softDeleteRetentionInDaysintegerSoft deleted data retention days. When you delete an HSM or a key, it will remain recoverable for the configured retention period or for a default period of 90 days. It accepts values between 7 and 90.
statusMessagestringResource Status Message.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
tenantIdstringThe Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, name, subscription_idGets the specified managed HSM Pool.
get_deletedselectname, location, subscription_idGets the specified deleted managed HSM.
list_by_resource_groupselectresource_group_name, subscription_id$topThe List operation gets information about the managed HSM Pools associated with the subscription and within the specified resource group.
check_mhsm_name_availabilityselectsubscription_idChecks that the managed hsm name is valid and is not already in use.
list_by_subscriptionselectsubscription_id$topThe List operation gets information about the managed HSM Pools associated with the subscription.
create_or_updateinsertresource_group_name, name, subscription_idCreate or update a managed HSM Pool in the specified subscription.
updateupdateresource_group_name, name, subscription_idUpdate a managed HSM Pool in the specified subscription.
create_or_updatereplaceresource_group_name, name, subscription_idCreate or update a managed HSM Pool in the specified subscription.
deletedeleteresource_group_name, name, subscription_idDeletes the specified managed HSM Pool.
list_deletedexecsubscription_idThe List operation gets information about the deleted managed HSMs associated with the subscription.
purge_deletedexecname, location, subscription_idPermanently deletes the specified managed HSM.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationstringThe name of the Azure region. Required.
namestringThe name of the deleted managed HSM. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$topintegerMaximum number of results to return. Default value is None.

SELECT examples

Gets the specified managed HSM Pool.

SELECT
id,
name,
createMode,
enablePurgeProtection,
enableSoftDelete,
hsmUri,
identity,
initialAdminObjectIds,
location,
networkAcls,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
regions,
scheduledPurgeDate,
securityDomainProperties,
sku,
softDeleteRetentionInDays,
statusMessage,
systemData,
tags,
tenantId,
type
FROM azure.key_vault.managed_hsms
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a managed HSM Pool in the specified subscription.

INSERT INTO azure.key_vault.managed_hsms (
properties,
sku,
identity,
location,
tags,
resource_group_name,
name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ location }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Update a managed HSM Pool in the specified subscription.

UPDATE azure.key_vault.managed_hsms
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create or update a managed HSM Pool in the specified subscription.

REPLACE azure.key_vault.managed_hsms
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes the specified managed HSM Pool.

DELETE FROM azure.key_vault.managed_hsms
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

The List operation gets information about the deleted managed HSMs associated with the subscription.

EXEC azure.key_vault.managed_hsms.list_deleted 
@subscription_id='{{ subscription_id }}' --required
;