Add-AzureTrafficManagerEndpointConfig
Add-AzureTrafficManagerEndpointConfig
Adds an endpoint to an Azure Traffic Manager profile.
Syntax
Parameter Set: Default
Add-AzureTrafficManagerEndpointConfig -EndpointName <String> -EndpointStatus <String> {Enabled | Disabled} -Target <String> -TrafficManagerProfile <TrafficManagerProfile> -Type <String> {AzureEndpoints | ExternalEndpoints | NestedEndpoints} [-EndpointLocation <String> ] [-Priority <UInt32> ] [-Profile <AzureProfile> ] [-Weight <UInt32> ] [ <CommonParameters>]
Detailed Description
The Add-AzureTrafficManagerEndpointConfig cmdlet adds an endpoint to a local Azure Traffic Manager profile object. You can get a profile by using the New-AzureTrafficManagerProfile or Get-AzureTrafficManagerProfile cmdlets.
This cmdlet operates on the local profile object. Commit your changes to the profile for Traffic Manager by using the Set-AzureTrafficManagerProfile cmdlet.
Parameters
-EndpointLocation<String>
Specifies the location of the external endpoint. Specify this parameter for profiles that have a value of Performance for the TrafficRoutingMethod parameter.
You must specify for endpoints of the type ExternalEndpoints in a profile that has the load balancing method of Performance.
You can find a list of possible values for this parameter by using the List Locations operation. For more information, see List Locations (https://msdn.microsoft.com/en-us/library/gg441293.aspx) at the Microsoft Developer Network.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EndpointName<String>
Specifies the name of the Traffic Manager endpoint that this cmdlet adds.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EndpointStatus<String>
Specifies the status of the endpoint. If the status is Enabled, the endpoint is probed for endpoint health and is included in the traffic routing method. Valid values are:
-- Enabled
-- Disabled
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Priority<UInt32>
Specifies the priority that Traffic Manager assigns to the endpoint. Specify this parameter only if the Traffic Manager profile is configured for priority traffic routing. 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, and no two endpoints can share the same priority value. If you do not specify priorities, Traffic Manager assigns endpoints with default priority values, starting with one (1), in the order the profile lists the endpoints.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Profile<AzureProfile>
Specifies an Azure profile.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Target<String>
Specifies the fully qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses when it directs traffic to this endpoint.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-TrafficManagerProfile<TrafficManagerProfile>
Specifies a local TrafficManagerProfile object. This cmdlet modifies this local object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
-Type<String>
Specifies the type of endpoint that this cmdlet adds to the Azure Traffic Manager profile. Valid values are:
-- AzureEndpoints
-- ExternalEndpoints
-- NestedEndpoints
Azure Resource Manager is currently in Preview. The only supported type is ExternalEndpoints.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Weight<UInt32>
Specifies the weight that Traffic Manager assigns to the endpoint. Valid values are integers from 1 through 1000. The default value is one (1). Specify this parameter only if the Traffic Manager profile has a value of Weighted for the TrafficRoutingMethod parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Microsoft.Azure.Commands.Network.TrafficManagerProfile
You can pipe a TrafficManagerProfile object to this cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Azure.Commands.Network.TrafficManagerProfile
This cmdlet returns a modified TrafficManagerProfile object.
Examples
Example 1: Add an endpoint to a profile
The first command gets an Azure Traffic Manager profile by using the Get-AzureTrafficManagerProfile 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 named ContosoProfile to match the local value in $TrafficManagerProfile.
PS C:\> $TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
PS C:\> Add-AzureTrafficManagerEndpointConfig -EndpointName "contoso" -EndpointStatus Enabled -Target "www.contoso.com" -TrafficManagerProfile $TrafficManagerProfile -Type ExternalEndpoints -EndpointLocation "North Europe" -Priority 1 -Weight 10
PS C:\> Set-AzureTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile
Related topics
Remove-AzureTrafficManagerEndpointConfig