New-AzApiManagementKeyVaultObject
Creates an instance of PsApiManagementKeyVaultObject.
Syntax
New-AzApiManagementKeyVaultObject
-SecretIdentifier <String>
[-IdentityClientId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzApiManagementKeyVaultObject cmdlet creates an instance of PsApiManagementKeyVaultObjecte.
Examples
Example 1 : Create a keyVault Namedvalue
$secretIdentifier = 'https://contoso.vault.azure.net/secrets/xxxx'
$keyvault = New-AzApiManagementKeyVaultObject -SecretIdentifier $secretIdentifier
$keyVaultNamedValue = New-AzApiManagementNamedValue -Context $context -NamedValueId $keyVaultNamedValueId -Name $keyVaultNamedValueName -keyVault $keyvault -Secret
The first command creates a keyvault. The second command creates a named value using secret from this keyvault.
Example 2 : Create a keyVault Certificate
$secretIdentifier = 'https://contoso.vault.azure.net/secrets/xxxx'
$keyvault = New-AzApiManagementKeyVaultObject -SecretIdentifier $secretIdentifier
$keyVaultcert = New-AzApiManagementCertificate -Context $context -CertificateId $kvcertId -KeyVault $keyvault
The first command creates a keyvault. The second command creates a certificate using secret from this keyvault.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentityClientId
Identity Client Id of the user-assigned Managed Identity. Will default system-assigned if leave empty.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SecretIdentifier
Secret Identifier of this Key Vault.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None