Set-AzureTrafficManagerEndpoint
Updates the properties of an endpoint in a Traffic Manager profile.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
Default (Default)
Set-AzureTrafficManagerEndpoint
-DomainName <String>
[-Location <String>]
[-Type <String>]
[-Status <String>]
[-Weight <Int32>]
[-MinChildEndpoints <Int32>]
-TrafficManagerProfile <IProfileWithDefinition>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The Set-AzureTrafficManagerEndpoint cmdlet updates the properties of an endpoint in a Microsoft Azure Traffic Manager profile. If the endpoint does not exist in the current profile, this cmdlet creates it. After you add an endpoint, pass the result to the Set-AzureTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet connects to Azure to save your changes.
Examples
Example 1: Update an endpoint for a profile
PS C:\>$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile"
PS C:\> Set-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName "ContosoApp02.cloudapp.net" -Status "Enabled" -Type "CloudService" -Weight 2 -Location myLocation | Set-AzureTrafficManagerProfile
The first command uses the Get-AzureTrafficManagerProfile cmdlet to get the profile named ContosoProfile, and then stores it in the $TrafficManagerProfile variable.
The second command updates the endpoint in the Traffic Manager profile that is stored in $TrafficManagerProfile. The endpoint has the ___domain name ContosoApp02.cloudapp.net. The command also specifies the status, type, weight, and ___location of the endpoint. The command passes the modified profile to the Set-AzureTrafficManagerProfile cmdlet to connect to Azure to save your changes.
Parameters
-DomainName
Specifies the ___domain name of the endpoint to modify.
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 |
-Location
Specifies the ___location of the endpoint the cmdlet adds. This must be an Azure ___location.
This parameter must contain a value for endpoints of the type "Any" or of type "TrafficManager" in a profile that has the load balancing method set to "Performance".
The possible values are the Azure region names, as listed at https://azure.microsoft.com/regions/https://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 |
-MinChildEndpoints
Specifies the minimum number of endpoints the nested profile must have online for this endpoint to be considered online.
Parameter properties
| Type: | Int32 |
| 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 |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Parameter properties
| Type: | AzureSMProfile |
| 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 |
-Status
Specifies the status of the monitoring endpoint. Valid values are:
- Enabled
- Disabled
If you specify a value of Enabled, Traffic Manager monitors the endpoint and the load-balancing method considers it when managing traffic.
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 |
-TrafficManagerProfile
Specifies the Traffic Manager profile object for which to modify the endpoint.
Parameter properties
| Type: | IProfileWithDefinition |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Type
Specifies the type of endpoint. Valid values are:
CloudService
AzureWebsite
TrafficManager
Any
If there is more than one AzureWebsite endpoint, the endpoints must be in different datacenters.
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 |
-Weight
Specifies the weight of the endpoint the cmdlet adds. The valid value range for this parameter is [1,1000].
This parameter is only used for RoundRobin load balancing policies.
Parameter properties
| Type: | Int32 |
| 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.
Outputs
Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition
This cmdlet generates a Traffic Manager profile object, which contains information about the updated profile.