< Back
Set-AzureRmApiManagementHostnames
Post
NAME Set-AzureRmApiManagementHostnames
SYNOPSIS
Sets a custom hostname configuration for an API Management service proxy or portal.
SYNTAX
Set-AzureRmApiManagementHostnames -ApiManagement <PsApiManagement> [-DefaultProfile <IAzureContextContainer>] [-PassThru] [<CommonParameters>]
Set-AzureRmApiManagementHostnames [-DefaultProfile <IAzureContextContainer>] -Name <String> [-PassThru] [-PortalHostnameConfiguration
<PsApiManagementHostnameConfiguration>] [-ProxyHostnameConfiguration <PsApiManagementHostnameConfiguration>] -ResourceGroupName <String>
[<CommonParameters>]
DESCRIPTION
The Set-AzureRmApiManagementHostnames cmdlet applies a custom hostname configuration for an API Management service proxy or portal.
PARAMETERS
-ApiManagement <PsApiManagement>
Specifies the PsApiManagement instance that this cmdlet gets the PortalHostnameConfiguration and ProxyHostnameConfiguration parameters from.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-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
-Name <String>
Specifies the name of the API Management instance.
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
-PortalHostnameConfiguration <PsApiManagementHostnameConfiguration>
Specifies the custom portal hostname configuration. Passing $null to the cmdlet sets the default hostname.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyHostnameConfiguration <PsApiManagementHostnameConfiguration>
Specifies the custom proxy hostname configuration. Passing $null sets the default hostname.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group under which the API Management instance 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
PsApiManagement
Parameter 'ApiManagement' accepts value of type 'PsApiManagement' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
NOTES
Example 1: Set the custom hostname configuration for a proxy and portal
PS C:\\>Set-AzureRmApiManagementHostnames -Name ContosoApi -ResourceGroupName Contoso -PortalHostnameConfiguration $portalHostnameConf
-ProxyHostnameConfiguration $proxyHostnameConf
This command sets the custom hostname configuration for proxy and portal.
Example 2: Configure a custom hostname for a proxy and portal
PS C:\\>Import-AzureRmApiManagementHostnameCertificate -Name ContosoApi -ResourceGroupName "Contoso" -HostnameType "Proxy" -PfxPath
"C:\\proxycert.pfx" -PfxPassword "CertSecret"
PS C:\\> Import-AzureRmApiManagementHostnameCertificate -Name "ContosoApi" -ResourceGroupName "Contoso" -HostnameType "Portal" -PfxPath
"C:\\portalcert.pfx" -PfxPassword "CertSecret"
PS C:\\> $PortalHostnameConf = New-AzureRmApiManagementHostnameConfiguration -Hostname "portal.contoso.com" -CertificateThumbprint
"33CC47C6FCA848DC9B14A6F071C1EF7C"
PS C:\\> $ProxyHostnameConf = New-AzureRmApiManagementHostnameConfiguration -Hostname "proxy.contoso.com" -CertificateThumbprint
"5DD7CCF6A1E74E0987DD2873406B7264"
PS C:\\> Set-AzureRmApiManagementHostnames -Name "ContosoApi" -ResourceGroupName "Contoso" -PortalHostnameConfiguration $PortalHostnameConf
-ProxyHostnameConfiguration $ProxyHostnameConf
This example configures a custom hostname for proxy and portal. You need to import corresponding certificates and then apply the custom hostnames.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... thostnames
Import-AzureRmApiManagementHostnameCertificate
New-AzureRmApiManagementHostnameConfiguration
SYNOPSIS
Sets a custom hostname configuration for an API Management service proxy or portal.
SYNTAX
Set-AzureRmApiManagementHostnames -ApiManagement <PsApiManagement> [-DefaultProfile <IAzureContextContainer>] [-PassThru] [<CommonParameters>]
Set-AzureRmApiManagementHostnames [-DefaultProfile <IAzureContextContainer>] -Name <String> [-PassThru] [-PortalHostnameConfiguration
<PsApiManagementHostnameConfiguration>] [-ProxyHostnameConfiguration <PsApiManagementHostnameConfiguration>] -ResourceGroupName <String>
[<CommonParameters>]
DESCRIPTION
The Set-AzureRmApiManagementHostnames cmdlet applies a custom hostname configuration for an API Management service proxy or portal.
PARAMETERS
-ApiManagement <PsApiManagement>
Specifies the PsApiManagement instance that this cmdlet gets the PortalHostnameConfiguration and ProxyHostnameConfiguration parameters from.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-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
-Name <String>
Specifies the name of the API Management instance.
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
-PortalHostnameConfiguration <PsApiManagementHostnameConfiguration>
Specifies the custom portal hostname configuration. Passing $null to the cmdlet sets the default hostname.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ProxyHostnameConfiguration <PsApiManagementHostnameConfiguration>
Specifies the custom proxy hostname configuration. Passing $null sets the default hostname.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group under which the API Management instance 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
PsApiManagement
Parameter 'ApiManagement' accepts value of type 'PsApiManagement' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement
NOTES
Example 1: Set the custom hostname configuration for a proxy and portal
PS C:\\>Set-AzureRmApiManagementHostnames -Name ContosoApi -ResourceGroupName Contoso -PortalHostnameConfiguration $portalHostnameConf
-ProxyHostnameConfiguration $proxyHostnameConf
This command sets the custom hostname configuration for proxy and portal.
Example 2: Configure a custom hostname for a proxy and portal
PS C:\\>Import-AzureRmApiManagementHostnameCertificate -Name ContosoApi -ResourceGroupName "Contoso" -HostnameType "Proxy" -PfxPath
"C:\\proxycert.pfx" -PfxPassword "CertSecret"
PS C:\\> Import-AzureRmApiManagementHostnameCertificate -Name "ContosoApi" -ResourceGroupName "Contoso" -HostnameType "Portal" -PfxPath
"C:\\portalcert.pfx" -PfxPassword "CertSecret"
PS C:\\> $PortalHostnameConf = New-AzureRmApiManagementHostnameConfiguration -Hostname "portal.contoso.com" -CertificateThumbprint
"33CC47C6FCA848DC9B14A6F071C1EF7C"
PS C:\\> $ProxyHostnameConf = New-AzureRmApiManagementHostnameConfiguration -Hostname "proxy.contoso.com" -CertificateThumbprint
"5DD7CCF6A1E74E0987DD2873406B7264"
PS C:\\> Set-AzureRmApiManagementHostnames -Name "ContosoApi" -ResourceGroupName "Contoso" -PortalHostnameConfiguration $PortalHostnameConf
-ProxyHostnameConfiguration $ProxyHostnameConf
This example configures a custom hostname for proxy and portal. You need to import corresponding certificates and then apply the custom hostnames.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... thostnames
Import-AzureRmApiManagementHostnameCertificate
New-AzureRmApiManagementHostnameConfiguration