Upravit

Sdílet prostřednictvím


New-AzNetworkWatcherConnectionMonitorTestConfigurationObject

Create a connection monitor test configuration.

Syntax

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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the connection monitor test configuration.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProtocolConfiguration

The parameters used to perform test evaluation over some protocol.

Type:PSNetworkWatcherConnectionMonitorProtocolConfiguration
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SuccessThresholdChecksFailedPercent

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

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SuccessThresholdRoundTripTimeMs

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

Type:Nullable<T>[Double]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TestFrequencySec

The frequency of test evaluation, in seconds.

Type:Int32
Aliases:TestFrequency
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSNetworkWatcherConnectionMonitorTestConfigurationObject