Class: Google::Apis::SqladminV1::DemoteMasterContext

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

Database instance demote primary instance context.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DemoteMasterContext

Returns a new instance of DemoteMasterContext.



1684
1685
1686
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1684

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

Instance Attribute Details

#kindString

This is always sql#demoteMasterContext. Corresponds to the JSON property kind

Returns:

  • (String)


1654
1655
1656
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1654

def kind
  @kind
end

#master_instance_nameString

The name of the instance which will act as on-premises primary instance in the replication setup. Corresponds to the JSON property masterInstanceName

Returns:

  • (String)


1660
1661
1662
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1660

def master_instance_name
  @master_instance_name
end

#replica_configurationGoogle::Apis::SqladminV1::DemoteMasterConfiguration

Read-replica configuration for connecting to the on-premises primary instance. Corresponds to the JSON property replicaConfiguration



1665
1666
1667
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1665

def replica_configuration
  @replica_configuration
end

#skip_replication_setupBoolean Also known as: skip_replication_setup?

Flag to skip replication setup on the instance. Corresponds to the JSON property skipReplicationSetup

Returns:

  • (Boolean)


1670
1671
1672
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1670

def skip_replication_setup
  @skip_replication_setup
end

#verify_gtid_consistencyBoolean Also known as: verify_gtid_consistency?

Verify the GTID consistency for demote operation. Default value: True. Setting this flag to false enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues. Corresponds to the JSON property verifyGtidConsistency

Returns:

  • (Boolean)


1681
1682
1683
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1681

def verify_gtid_consistency
  @verify_gtid_consistency
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1689
1690
1691
1692
1693
1694
1695
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1689

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name)
  @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration)
  @skip_replication_setup = args[:skip_replication_setup] if args.key?(:skip_replication_setup)
  @verify_gtid_consistency = args[:verify_gtid_consistency] if args.key?(:verify_gtid_consistency)
end