Class: Google::Apis::SqlV1beta4::Settings

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sql_v1beta4/classes.rb,
generated/google/apis/sql_v1beta4/representations.rb,
generated/google/apis/sql_v1beta4/representations.rb

Overview

Database instance settings.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Settings

Returns a new instance of Settings.



2364
2365
2366
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2364

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

Instance Attribute Details

#activation_policyString

The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values:
ALWAYS: The instance is on, and remains so even in the absence of connection requests.
NEVER: The instance is off; it is not activated, even if a connection request arrives.
ON_DEMAND: First Generation instances only. The instance responds to incoming requests, and turns itself off when not in use. Instances with PER_USE pricing turn off after 15 minutes of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours of inactivity. Corresponds to the JSON property activationPolicy

Returns:

  • (String)


2231
2232
2233
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2231

def activation_policy
  @activation_policy
end

#authorized_gae_applicationsArray<String>

The App Engine app IDs that can access this instance. First Generation instances only. Corresponds to the JSON property authorizedGaeApplications

Returns:

  • (Array<String>)


2237
2238
2239
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2237

def authorized_gae_applications
  @authorized_gae_applications
end

#availability_typeString

Availability type (PostgreSQL instances only). Potential values:
ZONAL: The instance serves data from only one zone. Outages in that zone affect data accessibility.
REGIONAL: The instance can serve data from more than one zone in a region (it is highly available).
For more information, see Overview of the High Availability Configuration. Corresponds to the JSON property availabilityType

Returns:

  • (String)


2248
2249
2250
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2248

def availability_type
  @availability_type
end

#backup_configurationGoogle::Apis::SqlV1beta4::BackupConfiguration

Database instance backup configuration. Corresponds to the JSON property backupConfiguration



2253
2254
2255
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2253

def backup_configuration
  @backup_configuration
end

#crash_safe_replication_enabledBoolean Also known as: crash_safe_replication_enabled?

Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property is only applicable to First Generation instances. Corresponds to the JSON property crashSafeReplicationEnabled

Returns:

  • (Boolean)


2260
2261
2262
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2260

def crash_safe_replication_enabled
  @crash_safe_replication_enabled
end

#data_disk_size_gbFixnum

The size of data disk, in GB. The data disk size minimum is 10GB. Not used for First Generation instances. Corresponds to the JSON property dataDiskSizeGb

Returns:

  • (Fixnum)


2267
2268
2269
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2267

def data_disk_size_gb
  @data_disk_size_gb
end

#data_disk_typeString

The type of data disk: PD_SSD (default) or PD_HDD. Not used for First Generation instances. Corresponds to the JSON property dataDiskType

Returns:

  • (String)


2273
2274
2275
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2273

def data_disk_type
  @data_disk_type
end

#database_flagsArray<Google::Apis::SqlV1beta4::DatabaseFlags>

The database flags passed to the instance at startup. Corresponds to the JSON property databaseFlags



2278
2279
2280
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2278

def database_flags
  @database_flags
end

#database_replication_enabledBoolean Also known as: database_replication_enabled?

Configuration specific to read replica instances. Indicates whether replication is enabled or not. Corresponds to the JSON property databaseReplicationEnabled

Returns:

  • (Boolean)


2284
2285
2286
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2284

def database_replication_enabled
  @database_replication_enabled
end

#ip_configurationGoogle::Apis::SqlV1beta4::IpConfiguration

IP Management configuration. Corresponds to the JSON property ipConfiguration



2290
2291
2292
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2290

def ip_configuration
  @ip_configuration
end

#kindString

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

Returns:

  • (String)


2295
2296
2297
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2295

def kind
  @kind
end

#location_preferenceGoogle::Apis::SqlV1beta4::LocationPreference

Preferred location. This specifies where a Cloud SQL instance should preferably be located, either in a specific Compute Engine zone, or co-located with an App Engine application. 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. Corresponds to the JSON property locationPreference



2304
2305
2306
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2304

def location_preference
  @location_preference
end

#maintenance_windowGoogle::Apis::SqlV1beta4::MaintenanceWindow

Maintenance window. This specifies when a v2 Cloud SQL instance should preferably be restarted for system maintenance purposes. Corresponds to the JSON property maintenanceWindow



2310
2311
2312
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2310

def maintenance_window
  @maintenance_window
end

#pricing_planString

The pricing plan for this instance. This can be either PER_USE or PACKAGE. Only PER_USE is supported for Second Generation instances. Corresponds to the JSON property pricingPlan

Returns:

  • (String)


2317
2318
2319
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2317

def pricing_plan
  @pricing_plan
end

#replication_typeString

The type of replication this instance uses. This can be either ASYNCHRONOUS or SYNCHRONOUS. This property is only applicable to First Generation instances. Corresponds to the JSON property replicationType

Returns:

  • (String)


2324
2325
2326
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2324

def replication_type
  @replication_type
end

#settings_versionFixnum

The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. Corresponds to the JSON property settingsVersion

Returns:

  • (Fixnum)


2332
2333
2334
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2332

def settings_version
  @settings_version
end

#storage_auto_resizeBoolean Also known as: storage_auto_resize?

Configuration to increase storage size automatically. The default value is true. Not used for First Generation instances. Corresponds to the JSON property storageAutoResize

Returns:

  • (Boolean)


2338
2339
2340
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2338

def storage_auto_resize
  @storage_auto_resize
end

#storage_auto_resize_limitFixnum

The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. Not used for First Generation instances. Corresponds to the JSON property storageAutoResizeLimit

Returns:

  • (Fixnum)


2346
2347
2348
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2346

def storage_auto_resize_limit
  @storage_auto_resize_limit
end

#tierString

The tier (or machine type) for this instance, for example db-n1-standard-1 (MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For MySQL instances, this property determines whether the instance is First or Second Generation. For more information, see Instance Settings. Corresponds to the JSON property tier

Returns:

  • (String)


2356
2357
2358
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2356

def tier
  @tier
end

#user_labelsHash<String,String>

User-provided labels, represented as a dictionary where each label is a single key value pair. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


2362
2363
2364
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2362

def user_labels
  @user_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
# File 'generated/google/apis/sql_v1beta4/classes.rb', line 2369

def update!(**args)
  @activation_policy = args[:activation_policy] if args.key?(:activation_policy)
  @authorized_gae_applications = args[:authorized_gae_applications] if args.key?(:authorized_gae_applications)
  @availability_type = args[:availability_type] if args.key?(:availability_type)
  @backup_configuration = args[:backup_configuration] if args.key?(:backup_configuration)
  @crash_safe_replication_enabled = args[:crash_safe_replication_enabled] if args.key?(:crash_safe_replication_enabled)
  @data_disk_size_gb = args[:data_disk_size_gb] if args.key?(:data_disk_size_gb)
  @data_disk_type = args[:data_disk_type] if args.key?(:data_disk_type)
  @database_flags = args[:database_flags] if args.key?(:database_flags)
  @database_replication_enabled = args[:database_replication_enabled] if args.key?(:database_replication_enabled)
  @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration)
  @kind = args[:kind] if args.key?(:kind)
  @location_preference = args[:location_preference] if args.key?(:location_preference)
  @maintenance_window = args[:maintenance_window] if args.key?(:maintenance_window)
  @pricing_plan = args[:pricing_plan] if args.key?(:pricing_plan)
  @replication_type = args[:replication_type] if args.key?(:replication_type)
  @settings_version = args[:settings_version] if args.key?(:settings_version)
  @storage_auto_resize = args[:storage_auto_resize] if args.key?(:storage_auto_resize)
  @storage_auto_resize_limit = args[:storage_auto_resize_limit] if args.key?(:storage_auto_resize_limit)
  @tier = args[:tier] if args.key?(:tier)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
end