Bearbeiten

Freigeben über


Add-AzTrafficManagerEndpointConfig

Adds an endpoint to a local Traffic Manager profile object.

Syntax

Add-AzTrafficManagerEndpointConfig
   -EndpointName <String>
   -TrafficManagerProfile <TrafficManagerProfile>
   -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 Add-AzTrafficManagerEndpointConfig cmdlet adds an endpoint to a local Azure Traffic Manager profile object. You can get a profile by using the New-AzTrafficManagerProfile or Get-AzTrafficManagerProfile cmdlets.

This cmdlet operates on the local profile object. Commit your changes to the profile for Traffic Manager by using the Set-AzTrafficManagerProfile cmdlet. To create an endpoint and commit the change in a single operation, use the New-AzTrafficManagerEndpoint cmdlet.

Examples

Example 1: Add an endpoint to a profile

$TrafficManagerProfile = Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
Add-AzTrafficManagerEndpointConfig -EndpointName "contoso" -EndpointStatus Enabled -Target "www.contoso.com" -TrafficManagerProfile $TrafficManagerProfile -Type ExternalEndpoints -EndpointLocation "North Europe" -Priority 1 -Weight 10
Set-AzTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile

The first command gets an Azure Traffic Manager profile by using the Get-AzTrafficManagerProfile cmdlet. The command stores the local profile in the $TrafficManagerProfile variable.

The second command adds an endpoint named contoso to the profile stored in $TrafficManagerProfile. The command includes configuration data for the endpoint. This command changes only the local object.

The final command updates the Traffic Manager profile in Azure to match the local value in $TrafficManagerProfile.

Parameters

-AlwaysServe

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

Type:String
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-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 the 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/).

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

-EndpointName

Specifies the name of the Traffic Manager endpoint that this cmdlet adds.

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

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

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

-MinChildEndpoints

The minimum number of 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'.

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

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

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

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

-SubnetMapping

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

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

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

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

-TrafficManagerProfile

Specifies a local TrafficManagerProfile object. This cmdlet modifies this local object. To obtain a TrafficManagerProfile object, use the Get-AzTrafficManagerProfile cmdlet.

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

-Type

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

  • AzureEndpoints
  • ExternalEndpoints
  • NestedEndpoints
Type:String
Accepted values:AzureEndpoints, ExternalEndpoints, NestedEndpoints
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

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

Inputs

TrafficManagerProfile

Outputs

TrafficManagerProfile