Class: Google::Apis::SqladminV1::DatabaseInstance::FailoverReplica

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/sqladmin_v1/classes.rb,
lib/google/apis/sqladmin_v1/representations.rb,
lib/google/apis/sqladmin_v1/representations.rb

Overview

The name and status of the failover replica. This property is applicable only to Second Generation instances.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FailoverReplica

Returns a new instance of FailoverReplica.



569
570
571
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 569

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#availableBoolean Also known as: available?

The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true. Corresponds to the JSON property available

Returns:

  • (Boolean)


554
555
556
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 554

def available
  @available
end

#failover_instanceGoogle::Apis::SqladminV1::InstanceReference

Reference to another Cloud SQL instance. Corresponds to the JSON property failoverInstance



560
561
562
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 560

def failover_instance
  @failover_instance
end

#nameString

The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. Corresponds to the JSON property name

Returns:

  • (String)


567
568
569
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 567

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



574
575
576
577
578
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 574

def update!(**args)
  @available = args[:available] if args.key?(:available)
  @failover_instance = args[:failover_instance] if args.key?(:failover_instance)
  @name = args[:name] if args.key?(:name)
end