Skip to content

DenyAction

SYNOPSIS

The denyAction effect: blocks an action on matching resources. Use it instead of Effect.

SYNTAX

DenyAction [[-Action] <String>] [-CascadeBehavior <String>] [-Effect <Object>] [<CommonParameters>]

USED IN

Policy

EXAMPLES

Example 1

DenyAction Delete -CascadeBehavior Deny

PARAMETERS

-Action

The action to block. Delete is the only action Azure supports.

Type: String
Required: false
Position: 1
Accept pipeline input: false

-CascadeBehavior

Whether deleting the resource group is blocked too: Deny (Azure's default) or Allow. Needs Mode = 'Indexed'.

Type: String
Required: false
Position: named
Accept pipeline input: false

-Effect

The effect as a parameter, (Param Effect). Without it, the effect is DenyAction.

Type: Object
Required: false
Position: named
Accept pipeline input: false