Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureApiManagementHostnames

Set-AzureApiManagementHostnames

microsoft.azure.commands.apimanagement.dll

Synopsis

Sets custom hostname configuration for an API Management service proxy and/or portal.

Syntax

Set-AzureApiManagementHostnames [-ResourceGroupName] [-Name] [-PortalHostnameConfiguration] [-ProxyHostnameConfiguration] [-PassThru] [-Profile] [<CommonParameters>]

Set-AzureApiManagementHostnames [-ApiManagement] [-PassThru] [-Profile] [<CommonParameters>]

Detailed Description

Set-AzureApiManagementHostnames cmdlet sets (applies) custom hostname configuration for an API Management service proxy and/or portal.

Parameters

-ResourceGroupName <String>

Name of resource group under which API Management exists.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Name <String>

Name of API Management.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PortalHostnameConfiguration <PsApiManagementHostnameConfiguration>

Custom portal hostname configuration. Default value is $null. Passing $null will set the default hostname.

Aliases

None

Required?

false

Position

named

Default value

$null

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ProxyHostnameConfiguration <PsApiManagementHostnameConfiguration>

Custom proxy hostname configuration. Default value is $null. Passing $null will set the default hostname.

Aliases

None

Required?

false

Position

named

Default value

$null

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Sends updated PsApiManagement to pipeline if operation succeeds.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Profile <AzureProfile>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ApiManagement <PsApiManagement>

PsApiManagement instance to get PortalHostnameConfiguration and ProxyHostnameConfiguration from.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1 --------------------------

Set custom hostname configuration for proxy and portal.

PS C:\> Set-AzureApiHostnames -Name ContosoApi -ResourceGroupName Contoso –PortalHostnameConfiguration $portalHostnameConf –ProxyHostnameConfiguration $proxyHostnameConf

-------------------------- Example 2 --------------------------

Script to configure custom hostname for proxy and portal. First import corresponding certificates and then apply custom hostnames.

Import-AzureApiManagementHostnameCertificate -Name ContosoApi -ResourceGroupName Contoso –HostnameType “Proxy” -PfxPath “C:\proxycert.pfx” -PfxPassword “certsecret”
Import-AzureApiManagementHostnameCertificate -Name ContosoApi -ResourceGroupName Contoso –HostnameType “Portal” -PfxPath “C:\portalcert.pfx” -PfxPassword “certsecret”
$portalHostnameConf = New-AzureApiManagementHostnameConfiguration -Hostname “portal.contoso.com” -CertificateThumbprint 33CC47C6FCA848DC9B14A6F071C1EF7C
$proxyHostnameConf = New-AzureApiManagementHostnameConfiguration -Hostname “proxy.contoso.com” -CertificateThumbprint 5DD7CCF6A1E74E0987DD2873406B7264
Set-AzureApiHostnames -Name ContosoApi -ResourceGroupName Contoso –PortalHostnameConfiguration $portalHostnameConf –ProxyHostnameConfiguration $proxyHostnameConf