< Back

Import-AzureRmApiManagementHostnameCertificate

Tue Jan 29, 2019 9:29 pm

NAME Import-AzureRmApiManagementHostnameCertificate



SYNOPSIS

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





SYNTAX

Import-AzureRmApiManagementHostnameCertificate [-DefaultProfile <IAzureContextContainer>] -HostnameType {Proxy | Portal} -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.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HostnameType <PsApiManagementHostnameType>

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



Valid values are:



- Proxy



- Portal



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PfxPassword <String>

Specifies the password for the .pfx certificate file.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PfxPath <String>

Specifies the path to a .pfx certificate file.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementHostnameCertificate







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ertificate

New-AzureRmApiManagementHostnameConfiguration

Set-AzureRmApiManagementHostnames