Editar

Compartilhar via


Switch-AzCloudService

Swaps VIPs between two cloud service (extended support) load balancers.

Syntax

Switch-AzCloudService
      -ResourceGroupName <String>
      -CloudServiceName <String>
      [-SubscriptionId <String>]
      [-Async]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Switch-AzCloudService
      [-SubscriptionId <String>]
      -CloudService <CloudService>
      [-Async]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Swaps VIPs between two cloud service (extended support) load balancers.

Examples

Example 1: Switch cloud service using name

Switch-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca

Above command invokes the vipswap operation on the Cloud service with name 'BService' and will perform the operation once the user confirms the action on the confirmation prompt. 'BService' with be swapped with its swappable cloud service.

Example 2: Switch cloud service using cloud service object

$cs = Get-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca
Switch-AzCloudService -CloudService $cs

Above command invokes the vipswap operation on the Cloud service with name 'BService' and will perform the operation once the user confirms the action on the confirmation prompt. 'BService' with be swapped with its swappable cloud service.

Parameters

-AsJob

Run the command as a job

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

-Async

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

-CloudService

To construct, see NOTES section for CLOUDSERVICE properties and create a hash table.

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

-CloudServiceName

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

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

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Boolean