Import-AzureRmApiManagementHostnameCertificate

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

Syntax

Import-AzureRmApiManagementHostnameCertificate
      -ResourceGroupName <String>
      -Name <String>
      -HostnameType <PsApiManagementHostnameType>
      -PfxPath <String>
      -PfxPassword <String>
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [<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.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HostnameType

Specifies the host name type that this cmdlet loads the certificate for. Valid values are:

  • Proxy
  • Portal
Type:Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementHostnameType
Accepted values:Proxy, Portal, Management, Scm
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
-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
-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

Inputs

String

Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementHostnameType

Outputs

PsApiManagementHostnameCertificate