New-AzDataBoxKeyEncryptionKeyObject

Create an in-memory object for KeyEncryptionKey.

Syntax

New-AzDataBoxKeyEncryptionKeyObject
   -KekType <KekType>
   [-IdentityProperty <IIdentityProperties>]
   [-KekUrl <String>]
   [-KekVaultResourceId <String>]
   [<CommonParameters>]

Description

Create an in-memory object for KeyEncryptionKey.

Examples

Example 1: Create a in-memory object for KeyEncryptionKey

New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName"} -KekUrl "keyIdentifier" -KekVaultResourceId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"

KekType         KekUrl                                           KekVaultResourceId
-------         ------                                           ------------------
CustomerManaged keyIdentifier /subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName

Create a in-memory object for KeyEncryptionKey

Parameters

-IdentityProperty

Managed identity properties used for key encryption. To construct, see NOTES section for IDENTITYPROPERTY properties and create a hash table.

Type:IIdentityProperties
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KekType

Type of encryption key used for key encryption.

Type:KekType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-KekUrl

Key encryption key. It is required in case of Customer managed KekType.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KekVaultResourceId

Kek vault resource id. It is required in case of Customer managed KekType.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

KeyEncryptionKey

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

IDENTITYPROPERTY <IIdentityProperties>: Managed identity properties used for key encryption.

  • [Type <String>]: Managed service identity type.
  • [UserAssignedResourceId <String>]: Arm resource id for user assigned identity to be used to fetch MSI token.