Skip to content

Latest commit

 

History

History
92 lines (67 loc) · 3.05 KB

Set-AzTrafficManagerEndpoint.md

File metadata and controls

92 lines (67 loc) · 3.05 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.PowerShell.Cmdlets.TrafficManager.dll-Help.xml
Az.TrafficManager
5287D4DB-2709-4A3C-97D5-DB494CEEFD18
2.0.0

Set-AzTrafficManagerEndpoint

SYNOPSIS

Updates a Traffic Manager endpoint.

SYNTAX

Set-AzTrafficManagerEndpoint -TrafficManagerEndpoint <TrafficManagerEndpoint>
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

DESCRIPTION

The Set-AzTrafficManagerEndpoint cmdlet updates an endpoint in Azure Traffic Manager. This cmdlet updates the settings from a local endpoint object. You can specify the endpoint object either by using the TrafficManagerEndpoint parameter or by using the pipeline.

You can obtain a local object that represents an endpoint by using the Get-AzTrafficManagerEndpoint cmdlet. Modify the object locally and then use Set-AzTrafficManagerEndpoint to commit your changes.

EXAMPLES

Example 1: Update an endpoint

$TrafficManagerEndpoint = Get-AzTrafficManagerEndpoint -Name "endpoint1" -Type AzureEndpoints -ProfileName "ContosoProfile" -ResourceGroupName "ResourceGroup11"
$TrafficManagerEndpoint.Weight = 20
Set-AzTrafficManagerEndpoint -TrafficManagerEndpoint $TrafficManagerEndpoint

The first command gets an Azure Traffic Manager endpoint by using the Get-AzTrafficManagerEndpoint cmdlet. The command stores the endpoint locally in the $TrafficManagerEndpoint variable.

The second command changes that endpoint locally. This command changes the endpoint weight to 20.

The third command updates the endpoint in Traffic Manager to match the local value in $TrafficManagerEndpoint.

PARAMETERS

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

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

-TrafficManagerEndpoint

Specifies a local TrafficManagerEndpoint object. This cmdlet updates Traffic Manager to match this local object.

Type: Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerEndpoint
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerEndpoint

OUTPUTS

Microsoft.Azure.Commands.TrafficManager.Models.TrafficManagerEndpoint

NOTES

RELATED LINKS