< Back

Invoke-GcSqlInstanceFailover

Mon Jan 13, 2020 11:23 pm

NAME Invoke-GcSqlInstanceFailover



SYNOPSIS

Failover a Cloud SQL Instance.





SYNTAX

Invoke-GcSqlInstanceFailover [-Project <string>] [-Instance] <string> [-SettingsVersion] <long>

[<CommonParameters>]



Invoke-GcSqlInstanceFailover [-InstanceObject] <DatabaseInstance> [<CommonParameters>]





DESCRIPTION

Failover the specified Cloud SQL Instance to its failover replica instance.



If a Project is specified, it will failover the specified Instance in that Project. Otherwise, failsover the

Instance in the Cloud SDK config project.





PARAMETERS

-Project <string>

Name of the project in which the Instance resides. Defaults to the Cloud SDK config project if not specified.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Instance <string>

The name/ID of the Instance resource to failover.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InstanceObject <DatabaseInstance>

The DatabaseInstance that describes the Instance we want to failover.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-SettingsVersion <long>

The current settings version of the Instance.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Google.Apis.SQLAdmin.v1beta4.Data.DatabaseInstance

The DatabaseInstance that describes the Instance we want to failover.





OUTPUTS



---------- EXAMPLE 1 ----------



PS C:\\> Invoke-GcSqlInstanceFailover -Project "testing" -Instance "test1"



Failover the SQL Instance "test1" in the Project "testing."

---------- EXAMPLE 2 ----------



PS C:\\> Invoke-GcSqlInstanceFailover -Project "testing" -Instance "test1" - SettingsVersion 3



Failover the SQL Instance "test1" with current settings version 3 in the Project "testing."



RELATED LINKS

[Replica Instances] (https://cloud.google.com/tools/powershe ... ql/replica)