Sync-AzApiManagementKeyVaultSecret

Refreshes NamedValue or Certificate created by KeyVault.

Syntax

Sync-AzApiManagementKeyVaultSecret
    -ResourceId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Sync-AzApiManagementKeyVaultSecret
    [-InputObjectCert <PsApiManagementCertificate>]
    [-InputObjectNamedvalue <PsApiManagementNamedValue>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Refreshes NamedValue or Certificate created by KeyVault.

Examples

Example 1

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementCertificate -ResourceId $kvcert.Id | Sync-AzApiManagementKeyVaultSecret

This command refreshes NamedValue or Certificate created by KeyVault.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-InputObjectCert

Instance of PsApiManagementCert. This parameter or NameValue is required.

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

-InputObjectNamedvalue

Instance of PsApiManagementNamedvalue. This parameter or Certificate is required.

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

-ResourceId

Arm ResourceId of the Keyvault Based object. This parameter is required.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

PsApiManagementCertificate

PsApiManagementNamedValue

Outputs

PsApiManagementKeyVaultEntity