Class: Google::Apis::SqladminV1beta4::DemoteContext

Inherits:
Object
  • Object
show all
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

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.



1181
1182
1183
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1181

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


1173
1174
1175
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1173

def kind
  @kind
end

#source_representative_instance_nameString

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

Returns:

  • (String)


1179
1180
1181
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1179

def source_representative_instance_name
  @source_representative_instance_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1186
1187
1188
1189
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 1186

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