Modifier

Partager via


New-AzApiManagementGateway

Creates new Gateway entity.

Syntax

New-AzApiManagementGateway
   -Context <PsApiManagementContext>
   [-GatewayId <String>]
   [-Description <String>]
   -LocationData <PsApiManagementResourceLocation>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzApiManagementGateway cmdlet creates new Gateway entity.

Examples

Example 1: Create a gateway

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
$location = New-AzApiManagementResourceLocationObject -Name "n1" -City "c1" -District "d1" -CountryOrRegion "r1"
New-AzApiManagementGateway -Context $apimContext -GatewayId "123" -Description "desc" -LocationData $location

This command creates a gateway.

Parameters

-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

-Description

Gateway description. This parameter is optional.

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

-GatewayId

Identifier of new gateway. 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

-LocationData

Gateway location. This parameter is required.

Type:PsApiManagementResourceLocation
Position:Named
Default value:None
Required:True
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

Inputs

PsApiManagementContext

String

PsApiManagementResourceLocation

Outputs

PsApiManagementGateway