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.



1952
1953
1954
# File 'lib/google/apis/run_v2/classes.rb', line 1952

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


1861
1862
1863
# File 'lib/google/apis/run_v2/classes.rb', line 1861

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



1867
1868
1869
# File 'lib/google/apis/run_v2/classes.rb', line 1867

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)


1874
1875
1876
# File 'lib/google/apis/run_v2/classes.rb', line 1874

def encryption_key
  @encryption_key
end

#execution_environmentString

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

Returns:

  • (String)


1879
1880
1881
# File 'lib/google/apis/run_v2/classes.rb', line 1879

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


1884
1885
1886
# File 'lib/google/apis/run_v2/classes.rb', line 1884

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


1898
1899
1900
# File 'lib/google/apis/run_v2/classes.rb', line 1898

def labels
  @labels
end

#max_instance_request_concurrencyFixnum

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

Returns:

  • (Fixnum)


1904
1905
1906
# File 'lib/google/apis/run_v2/classes.rb', line 1904

def max_instance_request_concurrency
  @max_instance_request_concurrency
end

#node_selectorGoogle::Apis::RunV2::GoogleCloudRunV2NodeSelector

Hardware constraints configuration. Corresponds to the JSON property nodeSelector



1909
1910
1911
# File 'lib/google/apis/run_v2/classes.rb', line 1909

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)


1915
1916
1917
# File 'lib/google/apis/run_v2/classes.rb', line 1915

def revision
  @revision
end

#scalingGoogle::Apis::RunV2::GoogleCloudRunV2RevisionScaling

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



1920
1921
1922
# File 'lib/google/apis/run_v2/classes.rb', line 1920

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)


1928
1929
1930
# File 'lib/google/apis/run_v2/classes.rb', line 1928

def 
  @service_account
end

#session_affinityBoolean Also known as: session_affinity?

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

Returns:

  • (Boolean)


1933
1934
1935
# File 'lib/google/apis/run_v2/classes.rb', line 1933

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)


1939
1940
1941
# File 'lib/google/apis/run_v2/classes.rb', line 1939

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



1944
1945
1946
# File 'lib/google/apis/run_v2/classes.rb', line 1944

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



1950
1951
1952
# File 'lib/google/apis/run_v2/classes.rb', line 1950

def vpc_access
  @vpc_access
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
# File 'lib/google/apis/run_v2/classes.rb', line 1957

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