Bearbeiten

Freigeben über


New-AzServiceBusKeyVaultPropertiesObject

Create an in-memory object for KeyVaultProperties.

Syntax

New-AzServiceBusKeyVaultPropertiesObject
   [-KeyName <String>]
   [-KeyVaultUri <String>]
   [-KeyVersion <String>]
   [-UserAssignedIdentity <String>]
   [<CommonParameters>]

Description

Create an in-memory object for KeyVaultProperties.

Examples

Example 1: Construct an in-memory KeyVaultProperties object

New-AzServiceBusKeyVaultPropertiesObject -KeyName key1 -KeyVaultUri https://testkeyvault.vault.azure.net/

KeyName KeyVaultUri                            KeyVersion UserAssignedIdentity
------- -----------                            ---------- --------------------
key4    https://testkeyvault.vault.azure.net/

Creates an in-memory object of type IKeyVaultProperties. An array of IKeyVaultProperties can be fed as input to KeyVaultProperty parameter of New-AzServiceBusNamespaceV2 and Set-AzServiceBusNamespaceV2 to enable encryption.

Example 2: Construct an in-memory KeyVaultProperties object having UserassignedIdentity

$ec1 = "/subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
New-AzServiceBusKeyVaultPropertiesObject -KeyName key4 -KeyVaultUri https://testkeyvault.vault.azure.net/ -UserAssignedIdentity $ec1

KeyName KeyVaultUri                            KeyVersion UserAssignedIdentity
------- -----------                            ---------- --------------------
key4    https://testkeyvault.vault.azure.net/           /subscriptions/0000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity

Creates an in-memory object of type IKeyVaultProperties. An array of IKeyVaultProperties can be fed as input to KeyVaultProperty parameter of New-AzServiceBusNamespaceV2 and Set-AzServiceBusNamespaceV2 to enable encryption.

Parameters

-KeyName

Name of the Key from KeyVault.

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

-KeyVaultUri

Uri of KeyVault.

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

-KeyVersion

Version of KeyVault.

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

-UserAssignedIdentity

ARM ID of user Identity selected for encryption.

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

Outputs

KeyVaultProperties