New-AzApiManagementGatewayHostnameConfiguration
Creates a hostname configuratin for the existing Gateway.
Syntax
New-AzApiManagementGatewayHostnameConfiguration
-Context <PsApiManagementContext>
-GatewayId <String>
[-GatewayHostnameConfigurationId <String>]
-Hostname <String>
-CertificateResourceId <String>
[-NegotiateClientCertificate]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzApiManagementGatewayHostnameConfiguration cmdlet creates a hostname configuratin for the existing Gateway.
Examples
Example 1: Create a hostname configuration for the existing gateway
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
$cert = Get-AzApiManagementCertificate -Context $apimContext -CertificateId "333"
New-AzApiManagementGatewayHostnameConfiguration -Context $apimContext -GatewayId "g01" -GatewayHostnameConfigurationId "h01" -Hostname "www.contoso.com" -CertificateResourceId $cert.Id
This command creates a "h01" hostname configuration for a "g01" gateway.
Parameters
-CertificateResourceId
A resource identifier for the existing certificate id. This parameter is required.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Context
Instance of PsApiManagementContext. This parameter is required.
Type: | PsApiManagementContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GatewayHostnameConfigurationId
Identifier of new gateway hostname confiuration. This parameter is optional. If not specified will be generated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GatewayId
Identifier of existing gateway. This parameter is required.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Hostname
Hostname. This parameter is required.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NegotiateClientCertificate
Flag to enforce NegotiateClientCertificate. This parameter is optional.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |