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.



2812
2813
2814
# File 'lib/google/apis/run_v2/classes.rb', line 2812

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 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules. Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


2688
2689
2690
# File 'lib/google/apis/run_v2/classes.rb', line 2688

def annotations
  @annotations
end

#clientString

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

Returns:

  • (String)


2693
2694
2695
# File 'lib/google/apis/run_v2/classes.rb', line 2693

def client
  @client
end

#client_versionString

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

Returns:

  • (String)


2698
2699
2700
# File 'lib/google/apis/run_v2/classes.rb', line 2698

def client_version
  @client_version
end

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

Holds the list which define the units of execution for this Revision. Corresponds to the JSON property containers



2703
2704
2705
# File 'lib/google/apis/run_v2/classes.rb', line 2703

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)


2710
2711
2712
# File 'lib/google/apis/run_v2/classes.rb', line 2710

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)


2715
2716
2717
# File 'lib/google/apis/run_v2/classes.rb', line 2715

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)


2721
2722
2723
# File 'lib/google/apis/run_v2/classes.rb', line 2721

def encryption_key_shutdown_duration
  @encryption_key_shutdown_duration
end

#execution_environmentString

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

Returns:

  • (String)


2726
2727
2728
# File 'lib/google/apis/run_v2/classes.rb', line 2726

def execution_environment
  @execution_environment
end

#gpu_zonal_redundancy_disabledBoolean Also known as: gpu_zonal_redundancy_disabled?

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

Returns:

  • (Boolean)


2731
2732
2733
# File 'lib/google/apis/run_v2/classes.rb', line 2731

def gpu_zonal_redundancy_disabled
  @gpu_zonal_redundancy_disabled
end

#health_check_disabledBoolean Also known as: health_check_disabled?

Optional. Disables health checking containers during deployment. Corresponds to the JSON property healthCheckDisabled

Returns:

  • (Boolean)


2737
2738
2739
# File 'lib/google/apis/run_v2/classes.rb', line 2737

def health_check_disabled
  @health_check_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 RevisionTemplate. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2751
2752
2753
# File 'lib/google/apis/run_v2/classes.rb', line 2751

def labels
  @labels
end

#max_instance_request_concurrencyFixnum

Optional. Sets the maximum number of requests that each serving instance can receive. If not specified or 0, concurrency defaults to 80 when requested `CPU

= 1and defaults to 1 when requestedCPU < 1. Corresponds to the JSON propertymaxInstanceRequestConcurrency`

Returns:

  • (Fixnum)


2758
2759
2760
# File 'lib/google/apis/run_v2/classes.rb', line 2758

def max_instance_request_concurrency
  @max_instance_request_concurrency
end

#node_selectorGoogle::Apis::RunV2::GoogleCloudRunV2NodeSelector

Hardware constraints configuration. Corresponds to the JSON property nodeSelector



2763
2764
2765
# File 'lib/google/apis/run_v2/classes.rb', line 2763

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 Service name. Corresponds to the JSON property revision

Returns:

  • (String)


2769
2770
2771
# File 'lib/google/apis/run_v2/classes.rb', line 2769

def revision
  @revision
end

#scalingGoogle::Apis::RunV2::GoogleCloudRunV2RevisionScaling

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



2774
2775
2776
# File 'lib/google/apis/run_v2/classes.rb', line 2774

def scaling
  @scaling
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)


2782
2783
2784
# File 'lib/google/apis/run_v2/classes.rb', line 2782

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



2788
2789
2790
# File 'lib/google/apis/run_v2/classes.rb', line 2788

def service_mesh
  @service_mesh
end

#session_affinityBoolean Also known as: session_affinity?

Optional. Enable session affinity. Corresponds to the JSON property sessionAffinity

Returns:

  • (Boolean)


2793
2794
2795
# File 'lib/google/apis/run_v2/classes.rb', line 2793

def session_affinity
  @session_affinity
end

#timeoutString

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

Returns:

  • (String)


2799
2800
2801
# File 'lib/google/apis/run_v2/classes.rb', line 2799

def timeout
  @timeout
end

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

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



2804
2805
2806
# File 'lib/google/apis/run_v2/classes.rb', line 2804

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



2810
2811
2812
# File 'lib/google/apis/run_v2/classes.rb', line 2810

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
# File 'lib/google/apis/run_v2/classes.rb', line 2817

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)
  @execution_environment = args[:execution_environment] if args.key?(:execution_environment)
  @gpu_zonal_redundancy_disabled = args[:gpu_zonal_redundancy_disabled] if args.key?(:gpu_zonal_redundancy_disabled)
  @health_check_disabled = args[:health_check_disabled] if args.key?(:health_check_disabled)
  @labels = args[:labels] if args.key?(:labels)
  @max_instance_request_concurrency = args[:max_instance_request_concurrency] if args.key?(:max_instance_request_concurrency)
  @node_selector = args[:node_selector] if args.key?(:node_selector)
  @revision = args[:revision] if args.key?(:revision)
  @scaling = args[:scaling] if args.key?(:scaling)
  @service_account = args[:service_account] if args.key?(:service_account)
  @service_mesh = args[:service_mesh] if args.key?(:service_mesh)
  @session_affinity = args[:session_affinity] if args.key?(:session_affinity)
  @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