Set-AzureRmApiManagementCertificate
Modifies an API Management certificate which is configured for mutual authentication with backend.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
-PfxFilePath <String>
-PfxPassword <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzureRmApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
-PfxBytes <Byte[]>
-PfxPassword <String>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzureRmApiManagementCertificate cmdlet modifies an Azure API Management certificate.
Examples
Example 1: Modify a certificate
PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Set-AzureRmApiManagementCertificate -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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Context
Specifies a PsApiManagementContext object.
Type: | PsApiManagementContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
passthru
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | Byte[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PfxPassword
Specifies the password for the certificate.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Byte[]