New-AzureRmApiManagementHostnameConfiguration

Creates an instance of PsApiManagementHostnameConfiguration.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

New-AzureRmApiManagementHostnameConfiguration
   -CertificateThumbprint <String>
   -Hostname <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The New-AzureRmApiManagementHostnameConfiguration cmdlet is a helper command that creates an instance of PsApiManagementHostnameConfiguration. This command is used with the Set-AzureRmApiManagementHostnames cmdlet.

Examples

Example 1: Create and initialize an instance of PsApiManagementHostnameConfiguration

PS C:\>New-AzureRmApiManagementHostnameConfiguration -Hostname "portal.contoso.com" -CertificateThumbprint "33CC47C6FCA848DC9B14A6F071C1EF7C"

This command creates and initializes an instance of PsApiManagementHostnameConfiguration.

Parameters

-CertificateThumbprint

Specifies the certificate thumbprint. The certificate must be first imported with the Import-AzureRmApiManagementHostnameCertificate cmdlet.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Hostname

Specifies the custom host name for which this cmdlet creates the PsApiManagementHostnameConfiguration instance.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PsApiManagementHostnameConfiguration