Class: Google::Apis::SqladminV1beta3::DatabaseInstance

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

Overview

A Cloud SQL instance resource.

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) ⇒ DatabaseInstance

Returns a new instance of DatabaseInstance



397
398
399
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 397

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

Instance Attribute Details

#connection_nameString

Connection name of the Cloud SQL instance used in connection strings. Corresponds to the JSON property connectionName

Returns:

  • (String)


298
299
300
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 298

def connection_name
  @connection_name
end

#current_disk_sizeFixnum

The current disk usage of the instance in bytes. Corresponds to the JSON property currentDiskSize

Returns:

  • (Fixnum)


303
304
305
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 303

def current_disk_size
  @current_disk_size
end

#database_versionString

The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6. Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance creation. Corresponds to the JSON property databaseVersion

Returns:

  • (String)


309
310
311
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 309

def database_version
  @database_version
end

#etagString

HTTP 1.1 Entity tag for the resource. Corresponds to the JSON property etag

Returns:

  • (String)


314
315
316
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 314

def etag
  @etag
end

#instanceString

Name of the Cloud SQL instance. This does not include the project ID. Corresponds to the JSON property instance

Returns:

  • (String)


319
320
321
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 319

def instance
  @instance
end

#instance_typeString

The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: Regular Cloud SQL instance. READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica. Corresponds to the JSON property instanceType

Returns:

  • (String)


326
327
328
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 326

def instance_type
  @instance_type
end

#ip_addressesArray<Google::Apis::SqladminV1beta3::IpMapping>

The assigned IP addresses for the instance. Corresponds to the JSON property ipAddresses



331
332
333
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 331

def ip_addresses
  @ip_addresses
end

#ipv6_addressString

The IPv6 address assigned to the instance. Corresponds to the JSON property ipv6Address

Returns:

  • (String)


336
337
338
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 336

def ipv6_address
  @ipv6_address
end

#kindString

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

Returns:

  • (String)


341
342
343
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 341

def kind
  @kind
end

#master_instance_nameString

The name of the instance which will act as master in the replication setup. Corresponds to the JSON property masterInstanceName

Returns:

  • (String)


346
347
348
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 346

def master_instance_name
  @master_instance_name
end

#max_disk_sizeFixnum

The maximum disk size of the instance in bytes. Corresponds to the JSON property maxDiskSize

Returns:

  • (Fixnum)


351
352
353
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 351

def max_disk_size
  @max_disk_size
end

#projectString

The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. Corresponds to the JSON property project

Returns:

  • (String)


357
358
359
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 357

def project
  @project
end

#regionString

The geographical region. Can be us-central, asia-east1 or europe-west1. Defaults to us-central. The region can not be changed after instance creation. Corresponds to the JSON property region

Returns:

  • (String)


363
364
365
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 363

def region
  @region
end

#replica_namesArray<String>

The replicas of the instance. Corresponds to the JSON property replicaNames

Returns:

  • (Array<String>)


368
369
370
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 368

def replica_names
  @replica_names
end

#server_ca_certGoogle::Apis::SqladminV1beta3::SslCert

SslCerts Resource Corresponds to the JSON property serverCaCert



373
374
375
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 373

def server_ca_cert
  @server_ca_cert
end

#service_account_email_addressString

The service account email address assigned to the instance. Corresponds to the JSON property serviceAccountEmailAddress

Returns:

  • (String)


378
379
380
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 378

def 
  @service_account_email_address
end

#settingsGoogle::Apis::SqladminV1beta3::Settings

Database instance settings. Corresponds to the JSON property settings



383
384
385
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 383

def settings
  @settings
end

#stateString

The current serving state of the Cloud SQL instance. This can be one of the following. RUNNABLE: The instance is running, or is ready to run when accessed. SUSPENDED: The instance is not available, for example due to problems with billing. PENDING_CREATE: The instance is being created. MAINTENANCE: The instance is down for maintenance. UNKNOWN_STATE: The state of the instance is unknown. Corresponds to the JSON property state

Returns:

  • (String)


395
396
397
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 395

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'generated/google/apis/sqladmin_v1beta3/classes.rb', line 402

def update!(**args)
  @connection_name = args[:connection_name] if args.key?(:connection_name)
  @current_disk_size = args[:current_disk_size] if args.key?(:current_disk_size)
  @database_version = args[:database_version] if args.key?(:database_version)
  @etag = args[:etag] if args.key?(:etag)
  @instance = args[:instance] if args.key?(:instance)
  @instance_type = args[:instance_type] if args.key?(:instance_type)
  @ip_addresses = args[:ip_addresses] if args.key?(:ip_addresses)
  @ipv6_address = args[:ipv6_address] if args.key?(:ipv6_address)
  @kind = args[:kind] if args.key?(:kind)
  @master_instance_name = args[:master_instance_name] if args.key?(:master_instance_name)
  @max_disk_size = args[:max_disk_size] if args.key?(:max_disk_size)
  @project = args[:project] if args.key?(:project)
  @region = args[:region] if args.key?(:region)
  @replica_names = args[:replica_names] if args.key?(:replica_names)
  @server_ca_cert = args[:server_ca_cert] if args.key?(:server_ca_cert)
  @service_account_email_address = args[:service_account_email_address] if args.key?(:service_account_email_address)
  @settings = args[:settings] if args.key?(:settings)
  @state = args[:state] if args.key?(:state)
end