Edit

Share via


New-AzNetworkWatcherConnectionMonitorTestConfigurationObject

Create a connection monitor test configuration.

Syntax

Default (Default)

New-AzNetworkWatcherConnectionMonitorTestConfigurationObject
    -Name <String>
    -TestFrequencySec <Int32>
    -ProtocolConfiguration <PSNetworkWatcherConnectionMonitorProtocolConfiguration>
    [-SuccessThresholdChecksFailedPercent <Int32>]
    [-SuccessThresholdRoundTripTimeMs <Double>]
    [-PreferredIPVersion <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-AzNetworkWatcherConnectionMonitorTestConfigurationObject cmdlet creates a connection monitor test configuration.

Examples

Example 1

$httpProtocolConfiguration = New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject -HttpProtocol -Port 443 -Method GET -RequestHeader @{"Allow" = "GET"} -ValidStatusCodeRange 2xx, 300-308 -PreferHTTPS
$httpTestConfiguration = New-AzNetworkWatcherConnectionMonitorTestConfigurationObject -Name httpTC -TestFrequencySec 120 -ProtocolConfiguration $httpProtocolConfiguration -SuccessThresholdChecksFailedPercent 20 -SuccessThresholdRoundTripTimeMs 30
Name                  : httpTC
TestFrequencySec      : 120
PreferredIPVersion    :
ProtocolConfiguration : {
                          "Port": 443,
                          "Method": "GET",
                          "RequestHeaders": [
                            {
                              "Name": "Allow",
                              "Value": "GET"
                            }
                          ],
                          "ValidStatusCodeRanges": [
                            "2xx",
                            "300-308"
                          ],
                          "PreferHTTPS": true
                        }
SuccessThreshold      : {
                          "ChecksFailedPercent": 20,
                          "RoundTripTimeMs": 30
                        }

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

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

The name of the connection monitor test configuration.

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:False
Value from remaining arguments:False

-PreferredIPVersion

The preferred IP version to use in test evaluation. The connection monitor may choose to use a different version depending on other parameters.

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

-ProtocolConfiguration

The parameters used to perform test evaluation over some protocol.

Parameter properties

Type:PSNetworkWatcherConnectionMonitorProtocolConfiguration
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:False
Value from remaining arguments:False

-SuccessThresholdChecksFailedPercent

The maximum percentage of failed checks permitted for a test to evaluate as successful.

Parameter properties

Type:

Nullable<T>[Int32]

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

-SuccessThresholdRoundTripTimeMs

The maximum round-trip time in milliseconds permitted for a test to evaluate as successful.

Parameter properties

Type:

Nullable<T>[Double]

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

-TestFrequencySec

The frequency of test evaluation, in seconds.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:TestFrequency

Parameter sets

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

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

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

None

Outputs

PSNetworkWatcherConnectionMonitorTestConfigurationObject