Class: Google::Apis::RunV2::GoogleCloudRunV2CloudSqlInstance

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

Overview

Represents a set of Cloud SQL instances. Each one will be available under / cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2CloudSqlInstance

Returns a new instance of GoogleCloudRunV2CloudSqlInstance.



278
279
280
# File 'lib/google/apis/run_v2/classes.rb', line 278

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

Instance Attribute Details

#instancesArray<String>

A list of Cloud SQL instance connection names. Cloud Run uses these to establish connections to the specified Cloud SQL instances. While the SQL instance name itself is unique within a project, the full connection name requires the location for proper routing. Format: project`:`location`:` instance Example: my-project:us-central1:my-instance You can find this value on the instance's Overview page in the Google Cloud console or by using the following gcloud command: sh gcloud sql instances describe INSTANCE_NAME \ --format='value(connectionName)' Visit https://cloud. google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Corresponds to the JSON property instances

Returns:

  • (Array<String>)


276
277
278
# File 'lib/google/apis/run_v2/classes.rb', line 276

def instances
  @instances
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



283
284
285
# File 'lib/google/apis/run_v2/classes.rb', line 283

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