共用方式為


Set-AzEventHubGeoDRConfigurationFailOver

叫用 GEO DR 故障轉移並重新設定別名以指向次要命名空間

語法

Set-AzEventHubGeoDRConfigurationFailOver
   [-ResourceGroupName] <String>
   [-Namespace] <String>
   [-Name] <String>
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzEventHubGeoDRConfigurationFailOver
   [-InputObject] <PSEventHubDRConfigurationAttributes>
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzEventHubGeoDRConfigurationFailOver
   [-ResourceId] <String>
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzEventHubGeoDRConfigurationFailOver Cmdlet 會叫用 GEO DR 故障轉移,並重新設定別名以指向次要命名空間

範例

範例 1

PS C:\>Set-AzEventHubGeoDRConfigurationFailOver -ResourceGroupName "SampleResourceGroup" -Namespace "SampleNamespace_Secondary" -Name "SampleDRConfigName"

叫用故障轉移至別名 “SampleDRConfigName”,重新設定並指向次要命名空間 “SampleNamespace_Secondary”

參數

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

Eventhub GeoDR 組態物件

類型:PSEventHubDRConfigurationAttributes
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

DR 組態名稱

類型:String
Position:2
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Namespace

Namespace名稱 - 次要Namespace

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-PassThru

會傳回 物件,代表您正在使用的專案。 根據預設,此 Cmdlet 不會產生任何輸出。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組名稱

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceId

GeoDRConfiguration 資源標識符

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

String

PSEventHubDRConfigurationAttributes

輸出

Boolean