Class: Google::Apis::SqladminV1::DemoteContext

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

This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DemoteContext

Returns a new instance of DemoteContext.



1210
1211
1212
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1210

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


1202
1203
1204
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1202

def kind
  @kind
end

#source_representative_instance_nameString

Required. The name of the instance which acts as the on-premises primary instance in the replication setup. Corresponds to the JSON property sourceRepresentativeInstanceName

Returns:

  • (String)


1208
1209
1210
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1208

def source_representative_instance_name
  @source_representative_instance_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1215
1216
1217
1218
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 1215

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @source_representative_instance_name = args[:source_representative_instance_name] if args.key?(:source_representative_instance_name)
end