Editar

Compartir a través de


New-AzTrafficManagerProfile

Creates a Traffic Manager profile.

Syntax

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.

Type:List<T>[TrafficManagerCustomHeader]
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

-ExpectedStatusCodeRange

List of expected HTTP status code ranges for probe requests.

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

-MaxReturn

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

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

-MonitorIntervalInSeconds

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

Type:Nullable<T>[Int32]
Aliases:IntervalInSecondsForMonitor
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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 (/).

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

-MonitorPort

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

Type:UInt32
Aliases:PortForMonitor
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MonitorProtocol

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

  • HTTP
  • HTTPS
Type:String
Aliases:ProtocolForMonitor
Accepted values:HTTP, HTTPS, TCP
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MonitorTimeoutInSeconds

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

Type:Nullable<T>[Int32]
Aliases:TimeoutInSecondsForMonitor
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-Name

Specifies a name for the Traffic Manager profile that this cmdlet creates.

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

-ProfileStatus

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

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

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

-ResourceGroupName

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

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

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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
Type:String
Accepted values:Performance, Weighted, Priority, Geographic, Subnet, MultiValue
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Ttl

Specifies the DNS Time to Live (TTL) value.

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

Inputs

None

Outputs

TrafficManagerProfile