Edit

Share via


Get-AzApiManagementGateway

Gets all or specific API management Gateway.

Syntax

GetAllGateways (Default)

Get-AzApiManagementGateway
    -Context <PsApiManagementContext>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetByGatewayId

Get-AzApiManagementGateway
    -Context <PsApiManagementContext>
    -GatewayId <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzApiManagementGateway cmdlet gets all or specific API management Gateway.

Examples

Example 1: Get all gateways

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGateway -Context $apimContext

This command gets all gateways.

Example 2: Get a gateway by ID

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGateway -Context $apimContext -GatewayId "0123456789"

This command gets the gateway 0123456789.

Parameters

-Context

Instance of PsApiManagementContext. This parameter is required.

Parameter properties

Type:PsApiManagementContext
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-GatewayId

Identifier of a gateway. If specified will try to find gateway by the identifier.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetByGatewayId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PsApiManagementContext

String

Outputs

PsApiManagementGateway