New-​Azure​Rm​Api​Management​Certificate

Creates an API Management certificate to be used during Authentication with Backend.

Syntax

New-AzureRmApiManagementCertificate
   [-CertificateId <String>]
   -Context <PsApiManagementContext>
   -PfxBytes <Byte[]>
   -PfxPassword <String>
   [<CommonParameters>]
New-AzureRmApiManagementCertificate
   [-CertificateId <String>]
   -Context <PsApiManagementContext>
   -PfxFilePath <String>
   -PfxPassword <String>
   [<CommonParameters>]

Description

The New-AzureRmApiManagementCertificate cmdlet creates an Azure API Management certificate.

Examples

Example 1: Create and upload a certificate

PS C:\>New-AzureRmApiManagementCertificate -Context $ApiMgmtContext -PfxFilePath "C:\contoso\certificates\apimanagement.pfx" -PfxPassword "1111"

This command creates an API Management certificate and uploads it.

Required Parameters

-Context

Specifies a PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PfxPassword

Specifies the password for the certificate.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-CertificateId

Specifies the ID of the certificate to create. If you do not specify this parameter, an ID is generated for you.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCertificate