Import-​Azure​Rm​Api​Management​Hostname​Certificate

Imports a certificate in a PFX format for an API Management Service.

Syntax

Import-AzureRmApiManagementHostnameCertificate
      -HostnameType <PsApiManagementHostnameType>
      -Name <String>
      [-PassThru]
      -PfxPassword <String>
      -PfxPath <String>
      -ResourceGroupName <String>
      [<CommonParameters>]

Description

The Import-AzureRmApiManagementHostnameCertificate cmdlet imports a certificate in a PFX format for an API Management Service. The certificate is to be used for custom hostnames configuration.

Examples

Example 1: Import a API Management hostname certificate

PS C:\>Import-AzureRmApiManagementHostnameCertificate -Name "ContosoApi" -ResourceGroupName Contoso -HostnameType "Proxy" -PfxPath "C:\proxycert.pfx" -PfxPassword "CertSecret"

This command imports a certificate for a proxy custom hostname.

Required Parameters

-HostnameType

Specifies the host name type that this cmdlet loads the certificate for.

Valid values are:

  • Proxy
  • Portal
Type:PsApiManagementHostnameType
Parameter Sets:Proxy, Portal
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the name of the API Management deployment that this cmdlet imports.

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

Specifies the password for the .pfx certificate file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PfxPath

Specifies the path to a .pfx certificate file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the of resource group under which the API Management deployment exists.

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

Optional Parameters

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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