Remove-​Azure​Rm​Api​Management​Policy

Removes the API Management policy from a specified scope.

Syntax

Remove-AzureRmApiManagementPolicy
      -Context <PsApiManagementContext>
      [-PassThru]
      -ProductId <String>
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzureRmApiManagementPolicy
      -Context <PsApiManagementContext>
      [-PassThru]
      -ApiId <String>
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzureRmApiManagementPolicy
      -Context <PsApiManagementContext>
      [-PassThru]
      -ApiId <String>
      -OperationId <String>
      [-InformationAction <ActionPreference>]
      [-InformationVariable <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzureRmApiManagementPolicy cmdlet removes the API Management policy from specified scope.

Examples

Example 1: Remove the tenant level policy

PS C:\>Remove-AzureRmApiManagementPolicy -Context $APImContext

This command removes tenant level policy from API Management.

Example 2: Remove the product-scope policy

PS C:\>Remove-AzureRmApiManagementPolicy -Context $APImContext -ProductId "0123456789"

This command removes product-scope policy from API Management.

Example 3: Remove the API-scope policy

PS C:\>Remove-AzureRmApiManagementPolicy -Context $APImContext -ApiId "9876543210"

This command removes API-scope policy from API Management.

Example 4: Remove the operation-scope policy

PS C:\>Remove-AzureRmApiManagementPolicy -Context $APImContext -ApiId "9876543210" -OperationId "777"

This command removes operation-scope policy from API Management.

Required Parameters

-ApiId

Specifies the identifier of an existing API. If you specify this parameter, the cmdlet removes the API-scope policy.

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

Specifies the instance of the PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-OperationId

Specifies the identifier of an existing operation. If you specify this parameter with the ApiId parameter, this cmdlet removes the operation-scope policy.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ProductId

Specifies the identifier of the existing product. If you specify this parameter, the cmdlet removes the product-scope policy.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

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

Indicates that this cmdlet returns a value of $True, if it succeeds, or a value of $False, otherwise.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Boolean