Edit

Share via


New-AzTrafficManagerProfile

Creates a Traffic Manager profile.

Syntax

Default (Default)

New-AzTrafficManagerProfile
    -Name <String>
    -ResourceGroupName <String>
    [-ProfileStatus <String>]
    -RelativeDnsName <String>
    -Ttl <UInt32>
    -TrafficRoutingMethod <String>
    -MonitorProtocol <String>
    -MonitorPort <UInt32>
    [-MonitorPath <String>]
    [-MonitorIntervalInSeconds <Int32>]
    [-MonitorTimeoutInSeconds <Int32>]
    [-MonitorToleratedNumberOfFailures <Int32>]
    [-MaxReturn <Int64>]
    [-Tag <Hashtable>]
    [-CustomHeader <System.Collections.Generic.List`1[Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerCustomHeader]>]
    [-ExpectedStatusCodeRange <System.Collections.Generic.List`1[Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerExpectedStatusCodeRange]>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzTrafficManagerProfile cmdlet creates an Azure Traffic Manager profile. Specify the Name parameter and required settings. This cmdlet returns a local object that represents the new profile.

This cmdlet does not configure Traffic Manager endpoints. You can update the local profile object by using the Add-AzTrafficManagerEndpointConfig cmdlet. Then upload changes to Traffic Manager by using the Set-AzTrafficManagerProfile cmdlet. Alternatively, you can add endpoints by using the New-AzTrafficManagerEndpoint cmdlet.

Examples

Example 1: Create a profile

New-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11" -ProfileStatus Enabled -TrafficRoutingMethod Performance -RelativeDnsName "contosoapp" -TTL 30 -MonitorProtocol HTTP -MonitorPort 80 -MonitorPath "/default.aspx"

This command creates an Azure Traffic Manager profile named ContosoProfile in resource group ResourceGroup11. The DNS FQDN is contosoapp.trafficmanager.net.

Parameters

-CustomHeader

List of custom header name and value pairs for probe requests.

Parameter properties

Type:

List<T>[TrafficManagerCustomHeader]

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

-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

-ExpectedStatusCodeRange

List of expected HTTP status code ranges for probe requests.

Parameter properties

Type:

List<T>[TrafficManagerExpectedStatusCodeRange]

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

-MaxReturn

The maximum number of answers returned for profiles with a MultiValue routing method.

Parameter properties

Type:

Nullable<T>[Int64]

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

-MonitorIntervalInSeconds

The interval (in seconds) at which Traffic Manager will check the health of each endpoint in this profile. The default is 30.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:IntervalInSecondsForMonitor

Parameter sets

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

-MonitorPath

Specifies the path that is used to monitor endpoint health. Specify a value relative to the endpoint domain name. This value must begin with a slash (/).

Parameter properties

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

Parameter sets

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

-MonitorPort

Specifies the TCP port that is used to monitor endpoint health. Valid values are integers from 1 through 65535.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:PortForMonitor

Parameter sets

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

-MonitorProtocol

Specifies the protocol to use to monitor endpoint health. Valid values are:

  • HTTP
  • HTTPS

Parameter properties

Type:String
Default value:None
Accepted values:HTTP, HTTPS, TCP
Supports wildcards:False
DontShow:False
Aliases:ProtocolForMonitor

Parameter sets

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

-MonitorTimeoutInSeconds

The time (in seconds) that Traffic Manager allows endpoints in this profile to respond to the health check. The default is 10.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:TimeoutInSecondsForMonitor

Parameter sets

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

-MonitorToleratedNumberOfFailures

The number of consecutive failed health checks that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next consecutive failed health check. The default is 3.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:ToleratedNumberOfFailuresForMonitor

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 a name for the Traffic Manager profile that this cmdlet creates.

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

-ProfileStatus

Specifies the status of the profile. Valid values are: Enabled and Disabled.

Parameter properties

Type:String
Default value:None
Accepted values:Enabled, Disabled
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

-RelativeDnsName

Specifies the relative DNS name that this Traffic Manager profile provides. Traffic Manager combines this value and the DNS domain name that Azure Traffic Manager uses to form the fully qualified domain name (FQDN) of the profile.

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

-ResourceGroupName

Specifies the name of a resource group. This cmdlet creates a Traffic Manager profile in the group that this parameter specifies.

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

-Tag

Key-value pairs in the form of a hash table set as tags on the server. For example:

@{key0="value0";key1=$null;key2="value2"}

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Tags

Parameter sets

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

-TrafficRoutingMethod

Specifies the traffic routing method. This method determines which endpoint Traffic Manager returns in response to incoming DNS queries. Valid values are:

  • Performance
  • Weighted
  • Priority
  • Geographic

Parameter properties

Type:String
Default value:None
Accepted values:Performance, Weighted, Priority, Geographic, Subnet, MultiValue
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

-Ttl

Specifies the DNS Time to Live (TTL) value.

Parameter properties

Type:UInt32
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

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

TrafficManagerProfile