Class: Google::Apis::RunV2::GoogleCloudRunV2WorkerPoolRevisionTemplate

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

WorkerPoolRevisionTemplate describes the data a worker pool revision should have when created from a template.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2WorkerPoolRevisionTemplate

Returns a new instance of GoogleCloudRunV2WorkerPoolRevisionTemplate.



4665
4666
4667
# File 'lib/google/apis/run_v2/classes.rb', line 4665

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

Instance Attribute Details

#annotationsHash<String,String>

Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 WorkerPoolRevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


4573
4574
4575
# File 'lib/google/apis/run_v2/classes.rb', line 4573

def annotations
  @annotations
end

#clientString

Optional. Arbitrary identifier for the API client. Corresponds to the JSON property client

Returns:

  • (String)


4578
4579
4580
# File 'lib/google/apis/run_v2/classes.rb', line 4578

def client
  @client
end

#client_versionString

Optional. Arbitrary version identifier for the API client. Corresponds to the JSON property clientVersion

Returns:

  • (String)


4583
4584
4585
# File 'lib/google/apis/run_v2/classes.rb', line 4583

def client_version
  @client_version
end

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

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



4589
4590
4591
# File 'lib/google/apis/run_v2/classes.rb', line 4589

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)


4596
4597
4598
# File 'lib/google/apis/run_v2/classes.rb', line 4596

def encryption_key
  @encryption_key
end

#encryption_key_revocation_actionString

Optional. The action to take if the encryption key is revoked. Corresponds to the JSON property encryptionKeyRevocationAction

Returns:

  • (String)


4601
4602
4603
# File 'lib/google/apis/run_v2/classes.rb', line 4601

def encryption_key_revocation_action
  @encryption_key_revocation_action
end

#encryption_key_shutdown_durationString

Optional. If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour. Corresponds to the JSON property encryptionKeyShutdownDuration

Returns:

  • (String)


4607
4608
4609
# File 'lib/google/apis/run_v2/classes.rb', line 4607

def encryption_key_shutdown_duration
  @encryption_key_shutdown_duration
end

#gpu_zonal_redundancy_disabledBoolean Also known as: gpu_zonal_redundancy_disabled?

Optional. True if GPU zonal redundancy is disabled on this worker pool. Corresponds to the JSON property gpuZonalRedundancyDisabled

Returns:

  • (Boolean)


4612
4613
4614
# File 'lib/google/apis/run_v2/classes.rb', line 4612

def gpu_zonal_redundancy_disabled
  @gpu_zonal_redundancy_disabled
end

#labelsHash<String,String>

Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud. google.com/resource-manager/docs/creating-managing-labels or https://cloud. google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev , or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 WorkerPoolRevisionTemplate. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


4627
4628
4629
# File 'lib/google/apis/run_v2/classes.rb', line 4627

def labels
  @labels
end

#node_selectorGoogle::Apis::RunV2::GoogleCloudRunV2NodeSelector

Hardware constraints configuration. Corresponds to the JSON property nodeSelector



4632
4633
4634
# File 'lib/google/apis/run_v2/classes.rb', line 4632

def node_selector
  @node_selector
end

#revisionString

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

Returns:

  • (String)


4638
4639
4640
# File 'lib/google/apis/run_v2/classes.rb', line 4638

def revision
  @revision
end

#service_accountString

Optional. 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)


4646
4647
4648
# File 'lib/google/apis/run_v2/classes.rb', line 4646

def 
  @service_account
end

#service_meshGoogle::Apis::RunV2::GoogleCloudRunV2ServiceMesh

Settings for Cloud Service Mesh. For more information see https://cloud.google. com/service-mesh/docs/overview. Corresponds to the JSON property serviceMesh



4652
4653
4654
# File 'lib/google/apis/run_v2/classes.rb', line 4652

def service_mesh
  @service_mesh
end

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

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



4657
4658
4659
# File 'lib/google/apis/run_v2/classes.rb', line 4657

def volumes
  @volumes
end

#vpc_accessGoogle::Apis::RunV2::GoogleCloudRunV2VpcAccess

VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc. Corresponds to the JSON property vpcAccess



4663
4664
4665
# File 'lib/google/apis/run_v2/classes.rb', line 4663

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
# File 'lib/google/apis/run_v2/classes.rb', line 4670

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @client = args[:client] if args.key?(:client)
  @client_version = args[:client_version] if args.key?(:client_version)
  @containers = args[:containers] if args.key?(:containers)
  @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
  @encryption_key_revocation_action = args[:encryption_key_revocation_action] if args.key?(:encryption_key_revocation_action)
  @encryption_key_shutdown_duration = args[:encryption_key_shutdown_duration] if args.key?(:encryption_key_shutdown_duration)
  @gpu_zonal_redundancy_disabled = args[:gpu_zonal_redundancy_disabled] if args.key?(:gpu_zonal_redundancy_disabled)
  @labels = args[:labels] if args.key?(:labels)
  @node_selector = args[:node_selector] if args.key?(:node_selector)
  @revision = args[:revision] if args.key?(:revision)
  @service_account = args[:service_account] if args.key?(:service_account)
  @service_mesh = args[:service_mesh] if args.key?(:service_mesh)
  @volumes = args[:volumes] if args.key?(:volumes)
  @vpc_access = args[:vpc_access] if args.key?(:vpc_access)
end