Set-AzureRmApiManagementOperation
Sets API operation details.
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
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 |
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 updated in the currently active api revision.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Context
Specifies an instance of PsApiManagementContext.
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: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Specifies the description of the new operation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Method
Specifies the HTTP method of the new operation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the display name of the new operation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OperationId
Specifies the identifier of the existing operation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
passthru
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Request
Specifies the operation request details.
Type: | PsApiManagementRequest |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Responses
Specifies an array of possible operation responses.
Type: | PsApiManagementResponse[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | False |
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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |