Set-AzApiManagementCertificate
Modifies an API Management certificate which is configured for mutual authentication with backend.
Syntax
LoadFromFile (Default)
Set-AzApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
[-PfxFilePath <String>]
[-PfxPassword <String>]
[-PassThru]
[-KeyVault <PsApiManagementKeyVaultEntity>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Raw
Set-AzApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
[-PfxBytes <Byte[]>]
[-PfxPassword <String>]
[-PassThru]
[-KeyVault <PsApiManagementKeyVaultEntity>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzApiManagementCertificate cmdlet modifies an Azure API Management certificate.
Examples
Example 1: Modify a certificate
$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Set-AzApiManagementCertificate -Context $ApiMgmtContext -CertificateId "0123456789" -PfxFilePath "C:\contoso\certificates\apimanagementnew.pfx" -PfxPassword "2222"
This command modifies the specified API Management certificate.
Parameters
-CertificateId
Specifies the ID of the certificate to modify.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Context
Specifies a PsApiManagementContext object.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KeyVault
KeyVault used to fetch certificate data.This parameter is required if -PfxFilePath not specified.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PassThru
passthru
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PfxBytes
Specifies an array of bytes of the certificate file in .pfx format.
This parameter is required if you do not specify the PfxFilePath parameter.
Parameter properties
Type: Byte [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Raw
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PfxFilePath
Specifies the path to the certificate file in .pfx format to create and upload.
This parameter is required if you do not specify the PfxBytes parameter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
LoadFromFile
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-PfxPassword
Specifies the password for the certificate.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs