Edit

Share via


New-AzTrafficManagerEndpoint

Creates an endpoint in a Traffic Manager profile.

Syntax

Default (Default)

New-AzTrafficManagerEndpoint
    -Name <String>
    -ProfileName <String>
    -ResourceGroupName <String>
    -Type <String>
    [-TargetResourceId <String>]
    [-Target <String>]
    -EndpointStatus <String>
    [-Weight <UInt32>]
    [-Priority <UInt32>]
    [-EndpointLocation <String>]
    [-AlwaysServe <String>]
    [-MinChildEndpoints <UInt32>]
    [-MinChildEndpointsIPv4 <UInt32>]
    [-MinChildEndpointsIPv6 <UInt32>]
    [-GeoMapping <System.Collections.Generic.List`1[System.String]>]
    [-SubnetMapping <System.Collections.Generic.List`1[Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerIpAddressRange]>]
    [-CustomHeader <System.Collections.Generic.List`1[Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerCustomHeader]>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzTrafficManagerEndpoint cmdlet creates an endpoint in an Azure Traffic Manager profile.

This cmdlet commits each new endpoint to the Traffic Manager service. To add multiple endpoints to a local Traffic Manager profile object and commit changes in a single operation, use the Add-AzTrafficManagerEndpointConfig cmdlet.

Examples

Example 1: Create an external endpoint for a profile

New-AzTrafficManagerEndpoint -EndpointStatus Enabled -Name "contoso" -ProfileName "ContosoProfile" -ResourceGroupName "ResourceGroup11" -Type ExternalEndpoints -EndpointLocation "North Europe" -Priority 1 -Target "www.contoso.com" -Weight 10

This command creates an external endpoint named contoso in the profile named ContosoProfile in the resource group named ResourceGroup11.

Example 2: Create an Azure endpoint for a profile

New-AzTrafficManagerEndpoint -EndpointStatus Enabled -Name "contoso" -ProfileName "ContosoProfile" -ResourceGroupName "ResourceGroup11" -Type AzureEndpoints -Priority 1 -TargetResourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-CentralUS/providers/Microsoft.Web/sites/contoso-web-app" -Weight 10

This command creates an Azure endpoint named contoso in the profile named ContosoProfile in resource group ResourceGroup11. The Azure endpoint points to the Azure Web App whose Azure Resource Manager ID is given by the URI path in TargetResourceId. The command does not specify the EndpointLocation parameter because the Web App resource supplies the location.

Parameters

-AlwaysServe

If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method.

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

-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

-EndpointLocation

Specifies the location of the endpoint to use in the Performance traffic-routing method. This parameter is only applicable to endpoints of the ExternalEndpoints or NestedEndpoints type. You must specify this parameter when the Performance traffic-routing method is used.

Specify an Azure region name. For a full list of Azure regions, see Azure Regionshttp://azure.microsoft.com/regions/ (http://azure.microsoft.com/regions/).

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

-EndpointStatus

Specifies the status of the endpoint. Valid values are:

  • Enabled
  • Disabled

If the status is Enabled, the endpoint is probed for endpoint health and is included in the traffic-routing method.

Parameter properties

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

-GeoMapping

The list of regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult Traffic Manager documentation for a full list of accepted values.

Parameter properties

Type:

List<T>[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

-MinChildEndpoints

Specify an Azure region name. For a full list of Azure regions, see Azure Regionshttp://azure.microsoft.com/regions/ (http://azure.microsoft.com/regions/).

Parameter properties

Type:

Nullable<T>[UInt32]

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

-MinChildEndpointsIPv4

The minimum number of IPv4 (DNS record type A) endpoints that must be available in the child profile in order for the Nested Endpoint in the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

Parameter properties

Type:

Nullable<T>[UInt32]

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

-MinChildEndpointsIPv6

The minimum number of IPv6 (DNS record type AAAA) endpoints that must be available in the child profile in order for the Nested Endpoint in the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'.

Parameter properties

Type:

Nullable<T>[UInt32]

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

-Name

Specifies the name of the Traffic Manager endpoint 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

-Priority

Specifies the priority that Traffic Manager assigns to the endpoint. This parameter is used only if the Traffic Manager profile is configured with the for Priority traffic-routing method. Valid values are integers from 1 through 1000. Lower values represent higher priority.

If you specify a priority, you must specify priorities on all endpoints in the profile, and no two endpoints can share the same priority value. If you do not specify priorities, Traffic Manager assigns default priority values to the endpoints, starting with one (1), in the order the profile lists the endpoints.

Parameter properties

Type:

Nullable<T>[UInt32]

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

-ProfileName

Specifies the name of a Traffic Manager profile to which this cmdlet adds an endpoint. To obtain a profile, use the New-AzTrafficManagerProfile or Get-AzTrafficManagerProfile cmdlets.

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 endpoint 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

-SubnetMapping

The list of address ranges or subnets mapped to this endpoint when using the 'Subnet' traffic routing method.

Parameter properties

Type:

List<T>[TrafficManagerIpAddressRange]

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

-Target

Specifies the fully qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses when it directs traffic to this endpoint. Specify this parameter only for the ExternalEndpoints endpoint type. For other endpoint types, specify the TargetResourceId parameter instead.

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

-TargetResourceId

Specifies resource ID of the target. Specify this parameter only for the AzureEndpoints and NestedEndpoints endpoint types. For the ExternalEndpoints endpoint type, specify the Target parameter instead.

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

-Type

Specifies the type of endpoint that this cmdlet adds to the Traffic Manager profile. Valid values are:

  • AzureEndpoints
  • ExternalEndpoints
  • NestedEndpoints

Parameter properties

Type:String
Default value:None
Accepted values:AzureEndpoints, ExternalEndpoints, NestedEndpoints
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

-Weight

Specifies the weight that Traffic Manager assigns to the endpoint. Valid values are integers from 1 through 1000. The default value is one (1). This parameter is used only if the Traffic Manager profile is configured with the Weighted traffic-routing method.

Parameter properties

Type:

Nullable<T>[UInt32]

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

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

TrafficManagerEndpoint