Set-AzureRmApiManagementOperation

Sets API operation details.

Important

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

Set-AzureRmApiManagementOperation
   -Context <PsApiManagementContext>
   -ApiId <String>
   [-ApiRevision <String>]
   -OperationId <String>
   -Name <String>
   -Method <String>
   -UrlTemplate <String>
   [-Description <String>]
   [-TemplateParameters <PsApiManagementParameter[]>]
   [-Request <PsApiManagementRequest>]
   [-Responses <PsApiManagementResponse[]>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzureRmApiManagementOperation cmdlet sets API operation details.

Examples

Example 1: Set the operation details

PS C:\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>New-AzureRmApiManagementOperation -Context $apimContext -ApiId $APIID -OperationId $OperationId -Name "Get Resource" -Method GET -UrlTemplate "/newresource" -Description "Use this operation to get newresource"

This command sets the operation details for API management.

Parameters

-ApiId

Specifies the identifier of the API.

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

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

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

Specifies an instance of PsApiManagementContext.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies the description of the new operation.

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

Specifies the HTTP method of the new operation.

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

Specifies the display name of the new operation.

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

Specifies the identifier of the existing operation.

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

passthru

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Request

Specifies the operation request details.

Type:PsApiManagementRequest
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Responses

Specifies an array of possible operation responses.

Type:PsApiManagementResponse[]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-TemplateParameters

Specifies an array or parameters defined in parameter UrlTemplate. If you do not specify a value, a default value will be generated based on the UrlTemplate. Use the parameter to give more details on parameters such as description, type, and other possible values.

Type:PsApiManagementParameter[]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-UrlTemplate

Specifies the URL template. For instance: customers/{cid}/orders/{oid}/?date={date}.

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

Inputs

PsApiManagementContext

String

PsApiManagementParameter[]

PsApiManagementRequest

PsApiManagementResponse[]

SwitchParameter

Outputs

PsApiManagementOperation