class Google::Apis::SqladminV1beta4::DatabaseInstance

A Cloud SQL instance resource.

Attributes

backend_type[RW]

FIRST_GEN: Basic Cloud SQL instance that runs in a Google-managed container. SECOND_GEN: A newer Cloud SQL backend that runs in a Compute Engine VM. EXTERNAL: A MySQL server that is not managed by Google. Corresponds to the JSON property `backendType` @return [String]

current_disk_size[RW]

The current disk usage of the instance in bytes. This property has been deprecated. Users should use the “cloudsql.googleapis.com/database/disk/ bytes_used” metric in Cloud Monitoring API instead. Please see groups. google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ for details. Corresponds to the JSON property `currentDiskSize` @return [String]

database_version[RW]

The database engine type and version. The databaseVersion can not be changed after instance creation. Can be MYSQL_5_5, MYSQL_5_6 or MYSQL_5_7. Defaults to MYSQL_5_6. MYSQL_5_7 is applicable only to Second Generation instances. Corresponds to the JSON property `databaseVersion` @return [String]

etag[RW]

HTTP 1.1 Entity tag for the resource. Corresponds to the JSON property `etag` @return [String]

failover_replica[RW]

The name and status of the failover replica. This property is applicable only to Second Generation instances. Corresponds to the JSON property `failoverReplica` @return [Google::Apis::SqladminV1beta4::DatabaseInstance::FailoverReplica]

instance_type[RW]

The instance type. This can be one of the following. CLOUD_SQL_INSTANCE: A Cloud SQL instance that is not replicating from a master. ON_PREMISES_INSTANCE: An instance running on the customer's premises. READ_REPLICA_INSTANCE: A Cloud SQL instance configured as a read-replica. Corresponds to the JSON property `instanceType` @return [String]

ip_addresses[RW]

The assigned IP addresses for the instance. Corresponds to the JSON property `ipAddresses` @return [Array<Google::Apis::SqladminV1beta4::IpMapping>]

ipv6_address[RW]

The IPv6 address assigned to the instance. This property is applicable only to First Generation instances. Corresponds to the JSON property `ipv6Address` @return [String]

kind[RW]

This is always sql#instance. Corresponds to the JSON property `kind` @return [String]

master_instance_name[RW]

The name of the instance which will act as master in the replication setup. Corresponds to the JSON property `masterInstanceName` @return [String]

max_disk_size[RW]

The maximum disk size of the instance in bytes. Corresponds to the JSON property `maxDiskSize` @return [String]

name[RW]

Name of the Cloud SQL instance. This does not include the project ID. Corresponds to the JSON property `name` @return [String]

on_premises_configuration[RW]

On-premises instance configuration. Corresponds to the JSON property `onPremisesConfiguration` @return [Google::Apis::SqladminV1beta4::OnPremisesConfiguration]

project[RW]

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` @return [String]

region[RW]

The geographical region. Can be us-central (FIRST_GEN instances only), us- central1 (SECOND_GEN instances only), asia-east1 or europe-west1. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation). The region can not be changed after instance creation. Corresponds to the JSON property `region` @return [String]

replica_configuration[RW]

Read-replica configuration for connecting to the master. Corresponds to the JSON property `replicaConfiguration` @return [Google::Apis::SqladminV1beta4::ReplicaConfiguration]

replica_names[RW]

The replicas of the instance. Corresponds to the JSON property `replicaNames` @return [Array<String>]

server_ca_cert[RW]

SslCerts Resource Corresponds to the JSON property `serverCaCert` @return [Google::Apis::SqladminV1beta4::SslCert]

service_account_email_address[RW]

The service account email address assigned to the instance. This property is applicable only to Second Generation instances. Corresponds to the JSON property `serviceAccountEmailAddress` @return [String]

settings[RW]

Database instance settings. Corresponds to the JSON property `settings` @return [Google::Apis::SqladminV1beta4::Settings]

state[RW]

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. FAILED: The instance creation failed. UNKNOWN_STATE: The state of the instance is unknown. Corresponds to the JSON property `state` @return [String]

suspension_reason[RW]

If the instance state is SUSPENDED, the reason for the suspension. Corresponds to the JSON property `suspensionReason` @return [Array<String>]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/sqladmin_v1beta4/classes.rb, line 514
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/sqladmin_v1beta4/classes.rb, line 519
def update!(**args)
  @backend_type = args[:backend_type] if args.key?(:backend_type)
  @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)
  @failover_replica = args[:failover_replica] if args.key?(:failover_replica)
  @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)
  @name = args[:name] if args.key?(:name)
  @on_premises_configuration = args[:on_premises_configuration] if args.key?(:on_premises_configuration)
  @project = args[:project] if args.key?(:project)
  @region = args[:region] if args.key?(:region)
  @replica_configuration = args[:replica_configuration] if args.key?(:replica_configuration)
  @replica_names = args[:replica_names] if args.key?(:replica_names)
  @self_link = args[:self_link] if args.key?(:self_link)
  @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)
  @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason)
end