Edit

Get-AzDdosCustomPolicyDetectionRule

Gets one or all detection rules from an in-memory DDoS custom policy.

Syntax

Default (Default)

Get-AzDdosCustomPolicyDetectionRule
    -DdosCustomPolicy <PSDdosCustomPolicy>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-AcquirePolicyToken]
    [-ChangeReference <String>]
    [<CommonParameters>]

Description

The Get-AzDdosCustomPolicyDetectionRule cmdlet gets detection rules from a DDoS custom policy object. Specify Name to retrieve one rule by its case-insensitive name, or omit Name to return all detection rules.

This cmdlet reads the local policy object and does not send a request to Azure. Use Get-AzDdosCustomPolicy first when you need the latest persisted policy.

Examples

Example 1: Get all detection rules

$policy = Get-AzDdosCustomPolicy -ResourceGroupName "myRG" -Name "myPolicy"
$policy | Get-AzDdosCustomPolicyDetectionRule

This example retrieves all detection rules from the policy.

Example 2: Get one detection rule

$policy = Get-AzDdosCustomPolicy -ResourceGroupName "myRG" -Name "myPolicy"
$rule = $policy | Get-AzDdosCustomPolicyDetectionRule -Name "tcpRule1"

This example retrieves the detection rule named tcpRule1. Name matching is case-insensitive.

Parameters

-AcquirePolicyToken

Acquire an Azure Policy token automatically for this resource operation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ChangeReference

The change reference resource ID for this resource operation.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DdosCustomPolicy

Specifies the DDoS custom policy object whose detection rules are returned. The object can be retrieved with Get-AzDdosCustomPolicy.

Parameter properties

Type:PSDdosCustomPolicy
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the detection rule to retrieve. If omitted, the cmdlet returns every detection rule in the policy.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSDdosCustomPolicy

Outputs

PSDdosCustomPolicyDetectionRule