Edit

Get-AzDdosCustomPolicy

Gets a DDoS custom policy.

Syntax

Default (Default)

Get-AzDdosCustomPolicy
    -ResourceGroupName <String>
    -Name <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzDdosCustomPolicy cmdlet retrieves a DDoS custom policy by its resource group name and policy name.

Examples

Example 1: Get a DDoS custom policy

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

This example gets the DDoS custom policy named "myPolicy" from the resource group "myRG".

Example 2: Get a DDoS custom policy and display its detection rules

$policy = Get-AzDdosCustomPolicy -ResourceGroupName "myRG" -Name "myPolicy"
$policy.DetectionRules | Format-Table TrafficType, PacketsPerSecond

This example gets the DDoS custom policy and displays its detection rules in a table format.

Example 3: Get a DDoS custom policy and display all properties

Get-AzDdosCustomPolicy -ResourceGroupName "myRG" -Name "myPolicy" | Format-List

This example gets the DDoS custom policy and displays all its properties.

Parameters

-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 DDoS custom policy to retrieve.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

Specifies the resource group name of the DDoS custom policy.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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.

Outputs

Microsoft.Azure.Commands.Network.Models.PSDdosCustomPolicy