Class: Google::Apis::SqladminV1beta4::DemoteMasterContext
- Inherits:
-
Object
- Object
- Google::Apis::SqladminV1beta4::DemoteMasterContext
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/sqladmin_v1beta4/classes.rb,
lib/google/apis/sqladmin_v1beta4/representations.rb,
lib/google/apis/sqladmin_v1beta4/representations.rb
Overview
Database instance demote primary instance context.
Instance Attribute Summary collapse
-
#kind ⇒ String
This is always
sql#demoteMasterContext
. -
#master_instance_name ⇒ String
The name of the instance which will act as on-premises primary instance in the replication setup.
-
#replica_configuration ⇒ Google::Apis::SqladminV1beta4::DemoteMasterConfiguration
Read-replica configuration for connecting to the on-premises primary instance.
-
#skip_replication_setup ⇒ Boolean
(also: #skip_replication_setup?)
Flag to skip replication setup on the instance.
-
#verify_gtid_consistency ⇒ Boolean
(also: #verify_gtid_consistency?)
Verify the GTID consistency for demote operation.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DemoteMasterContext
constructor
A new instance of DemoteMasterContext.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DemoteMasterContext
Returns a new instance of DemoteMasterContext.
1254 1255 1256 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1254 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kind ⇒ String
This is always sql#demoteMasterContext
.
Corresponds to the JSON property kind
1224 1225 1226 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1224 def kind @kind end |
#master_instance_name ⇒ String
The name of the instance which will act as on-premises primary instance in the
replication setup.
Corresponds to the JSON property masterInstanceName
1230 1231 1232 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1230 def master_instance_name @master_instance_name end |
#replica_configuration ⇒ Google::Apis::SqladminV1beta4::DemoteMasterConfiguration
Read-replica configuration for connecting to the on-premises primary instance.
Corresponds to the JSON property replicaConfiguration
1235 1236 1237 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1235 def replica_configuration @replica_configuration end |
#skip_replication_setup ⇒ Boolean Also known as: skip_replication_setup?
Flag to skip replication setup on the instance.
Corresponds to the JSON property skipReplicationSetup
1240 1241 1242 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1240 def skip_replication_setup @skip_replication_setup end |
#verify_gtid_consistency ⇒ Boolean 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
1251 1252 1253 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1251 def verify_gtid_consistency @verify_gtid_consistency end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1259 1260 1261 1262 1263 1264 1265 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1259 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 |