Editar

Compartilhar via


Get-AzApiManagementOperation

Gets a list or a specified API Operation.

Syntax

Get-AzApiManagementOperation
   -Context <PsApiManagementContext>
   -ApiId <String>
   [-ApiRevision <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzApiManagementOperation
   -Context <PsApiManagementContext>
   -ApiId <String>
   [-ApiRevision <String>]
   -OperationId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzApiManagementOperation gets a list or a specified API Operation.

Examples

Example 1: Get all API management operations

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementOperation -Context $apimContext -ApiId $APIId

This command gets all API management operations.

Example 2: Get an API Management operation by operation ID

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementOperation -Context $apimContext -ApiId $APIId -OperationId "Operation003"

This command gets an API management operation by operation ID named Operation0003.

Parameters

-ApiId

Specifies the identifier of the API Operation.

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

-ApiRevision

Identifier of API Revision. This parameter is optional. If not specified, the operation will be retrieved from the currently active api revision.

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

-Context

Specifies the instance of the PsApiManagementContext object.

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

-OperationId

Specifies the operation identifier.

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

Inputs

PsApiManagementContext

String

Outputs

PsApiManagementOperation