Class: Google::Apis::RunV2::GoogleCloudRunV2RevisionTemplate

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

RevisionTemplate describes the data a revision should have when created from a template.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2RevisionTemplate

Returns a new instance of GoogleCloudRunV2RevisionTemplate.



1233
1234
1235
# File 'lib/google/apis/run_v2/classes.rb', line 1233

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

Instance Attribute Details

#annotationsHash<String,String>

KRM-style annotations for the resource. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


1166
1167
1168
# File 'lib/google/apis/run_v2/classes.rb', line 1166

def annotations
  @annotations
end

#containersArray<Google::Apis::RunV2::GoogleCloudRunV2Container>

Holds the single container that defines the unit of execution for this Revision. Corresponds to the JSON property containers



1172
1173
1174
# File 'lib/google/apis/run_v2/classes.rb', line 1172

def containers
  @containers
end

#encryption_keyString

A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/ securing/using-cmek Corresponds to the JSON property encryptionKey

Returns:

  • (String)


1179
1180
1181
# File 'lib/google/apis/run_v2/classes.rb', line 1179

def encryption_key
  @encryption_key
end

#execution_environmentString

The sandbox environment to host this Revision. Corresponds to the JSON property executionEnvironment

Returns:

  • (String)


1184
1185
1186
# File 'lib/google/apis/run_v2/classes.rb', line 1184

def execution_environment
  @execution_environment
end

#labelsHash<String,String>

KRM-style labels for the resource. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1189
1190
1191
# File 'lib/google/apis/run_v2/classes.rb', line 1189

def labels
  @labels
end

#max_instance_request_concurrencyFixnum

Sets the maximum number of requests that each serving instance can receive. Corresponds to the JSON property maxInstanceRequestConcurrency

Returns:

  • (Fixnum)


1194
1195
1196
# File 'lib/google/apis/run_v2/classes.rb', line 1194

def max_instance_request_concurrency
  @max_instance_request_concurrency
end

#revisionString

The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name. Corresponds to the JSON property revision

Returns:

  • (String)


1200
1201
1202
# File 'lib/google/apis/run_v2/classes.rb', line 1200

def revision
  @revision
end

#scalingGoogle::Apis::RunV2::GoogleCloudRunV2RevisionScaling

Settings for revision-level scaling settings. Corresponds to the JSON property scaling



1205
1206
1207
# File 'lib/google/apis/run_v2/classes.rb', line 1205

def scaling
  @scaling
end

#service_accountString

Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


1213
1214
1215
# File 'lib/google/apis/run_v2/classes.rb', line 1213

def 
  @service_account
end

#timeoutString

Max allowed time for an instance to respond to a request. Corresponds to the JSON property timeout

Returns:

  • (String)


1218
1219
1220
# File 'lib/google/apis/run_v2/classes.rb', line 1218

def timeout
  @timeout
end

#volumesArray<Google::Apis::RunV2::GoogleCloudRunV2Volume>

A list of Volumes to make available to containers. Corresponds to the JSON property volumes



1223
1224
1225
# File 'lib/google/apis/run_v2/classes.rb', line 1223

def volumes
  @volumes
end

#vpc_accessGoogle::Apis::RunV2::GoogleCloudRunV2VpcAccess

VPC Access settings. For more information on creating a VPC Connector, visit https://cloud.google.com/vpc/docs/configure-serverless-vpc-access For information on how to configure Cloud Run with an existing VPC Connector, visit https://cloud.google.com/run/docs/configuring/connecting-vpc Corresponds to the JSON property vpcAccess



1231
1232
1233
# File 'lib/google/apis/run_v2/classes.rb', line 1231

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/google/apis/run_v2/classes.rb', line 1238

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @containers = args[:containers] if args.key?(:containers)
  @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
  @execution_environment = args[:execution_environment] if args.key?(:execution_environment)
  @labels = args[:labels] if args.key?(:labels)
  @max_instance_request_concurrency = args[:max_instance_request_concurrency] if args.key?(:max_instance_request_concurrency)
  @revision = args[:revision] if args.key?(:revision)
  @scaling = args[:scaling] if args.key?(:scaling)
  @service_account = args[:service_account] if args.key?(:service_account)
  @timeout = args[:timeout] if args.key?(:timeout)
  @volumes = args[:volumes] if args.key?(:volumes)
  @vpc_access = args[:vpc_access] if args.key?(:vpc_access)
end