AzPostgreSqlFailoverGroup

Synopsis

Creates, updates, or removes a PostgreSQL Failover Group within an Azure Database for PostgreSQL server.

Syntax

New-AzPostgreSqlFailoverGroup
    -Name <String>
    -ResourceGroupName <String>
    -ServerName <String>
    [-PartnerServer <String>]
    [-PartnerResourceGroupName <String>]
    [-Location <String>]
    [-Tag <Hashtable>]
    []

Set-AzPostgreSqlFailoverGroup
    -Name <String>
    -ResourceGroupName <String>
    -ServerName <String>
    [-Tag <Hashtable>]
    []

Remove-AzPostgreSqlFailoverGroup
    -Name <String>
    -ResourceGroupName <String>
    -ServerName <String>
    [-Force]
    []

Get-AzPostgreSqlFailoverGroup
    [-ResourceGroupName <String>]
    [-ServerName <String>]
    [-Name <String>]
    []

Restore-AzPostgreSqlFailoverGroup
    -Name <String>
    -ResourceGroupName <String>
    -ServerName <String>
    -TargetServerName <String>
    [-TargetResourceGroupName <String>]
    []

Parameters

ParameterTypeRequiredDescription
-NameStringYesName of the failover group.
-ResourceGroupNameStringYesName of the resource group containing the primary server.
-ServerNameStringYesPrimary PostgreSQL server name.
-PartnerServerStringNoSecondary (partner) server name.
-PartnerResourceGroupNameStringNoResource group of the partner server.
-LocationStringNoAzure region for the failover group.
-TagHashtableNoTags assigned to the failover group.
-ForceSwitchParameterNoSuppress confirmation prompts.
-TargetServerNameStringYes (Restore)Server to which the failover group will be restored.
-TargetResourceGroupNameStringNo (Restore)Resource group of the target server.

Examples

Example 1: Create a new failover group
# Create a failover group named 'myFailoverGroup' between server 'pgprimary' and 'pgsecondary'
New-AzPostgreSqlFailoverGroup `
    -Name "myFailoverGroup" `
    -ResourceGroupName "rg-prod" `
    -ServerName "pgprimary" `
    -PartnerServer "pgsecondary" `
    -PartnerResourceGroupName "rg-prod" `
    -Location "West Europe"
Example 2: Update tags on an existing failover group
Set-AzPostgreSqlFailoverGroup `
    -Name "myFailoverGroup" `
    -ResourceGroupName "rg-prod" `
    -ServerName "pgprimary" `
    -Tag @{Environment="Production";Owner="DBTeam"}
Example 3: Get details of a failover group
Get-AzPostgreSqlFailoverGroup `
    -Name "myFailoverGroup" `
    -ResourceGroupName "rg-prod" `
    -ServerName "pgprimary"
Example 4: Remove a failover group
Remove-AzPostgreSqlFailoverGroup `
    -Name "myFailoverGroup" `
    -ResourceGroupName "rg-prod" `
    -ServerName "pgprimary" `
    -Force

Notes