Class: Google::Apis::SqladminV1::LocationPreference

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

Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LocationPreference

Returns a new instance of LocationPreference.



938
939
940
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 938

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


924
925
926
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 924

def kind
  @kind
end

#secondary_zoneString

The preferred Compute Engine zone for the secondary/failover (for example: us- central1-a, us-central1-b, etc.). Reserved for future use. Corresponds to the JSON property secondaryZone

Returns:

  • (String)


930
931
932
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 930

def secondary_zone
  @secondary_zone
end

#zoneString

The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). Corresponds to the JSON property zone

Returns:

  • (String)


936
937
938
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 936

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



943
944
945
946
947
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 943

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