Class: Google::Apis::RunV2::GoogleCloudRunV2RevisionTemplate
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2RevisionTemplate
- 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
-
#annotations ⇒ Hash<String,String>
Optional.
-
#containers ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Container>
Holds the single container that defines the unit of execution for this Revision.
-
#encryption_key ⇒ String
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image.
-
#encryption_key_revocation_action ⇒ String
Optional.
-
#encryption_key_shutdown_duration ⇒ String
Optional.
-
#execution_environment ⇒ String
Optional.
-
#health_check_disabled ⇒ Boolean
(also: #health_check_disabled?)
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#max_instance_request_concurrency ⇒ Fixnum
Optional.
-
#node_selector ⇒ Google::Apis::RunV2::GoogleCloudRunV2NodeSelector
Hardware constraints configuration.
-
#revision ⇒ String
Optional.
-
#scaling ⇒ Google::Apis::RunV2::GoogleCloudRunV2RevisionScaling
Settings for revision-level scaling settings.
-
#service_account ⇒ String
Optional.
-
#service_mesh ⇒ Google::Apis::RunV2::GoogleCloudRunV2ServiceMesh
Settings for Cloud Service Mesh.
-
#session_affinity ⇒ Boolean
(also: #session_affinity?)
Optional.
-
#timeout ⇒ String
Optional.
-
#volumes ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Volume>
Optional.
-
#vpc_access ⇒ Google::Apis::RunV2::GoogleCloudRunV2VpcAccess
VPC Access settings.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2RevisionTemplate
constructor
A new instance of GoogleCloudRunV2RevisionTemplate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2RevisionTemplate
Returns a new instance of GoogleCloudRunV2RevisionTemplate.
2071 2072 2073 |
# File 'lib/google/apis/run_v2/classes.rb', line 2071 def initialize(**args) update!(**args) end |
Instance Attribute Details
#annotations ⇒ Hash<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
1962 1963 1964 |
# File 'lib/google/apis/run_v2/classes.rb', line 1962 def annotations @annotations end |
#containers ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Container>
Holds the single container that defines the unit of execution for this
Revision.
Corresponds to the JSON property containers
1968 1969 1970 |
# File 'lib/google/apis/run_v2/classes.rb', line 1968 def containers @containers end |
#encryption_key ⇒ String
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
1975 1976 1977 |
# File 'lib/google/apis/run_v2/classes.rb', line 1975 def encryption_key @encryption_key end |
#encryption_key_revocation_action ⇒ String
Optional. The action to take if the encryption key is revoked.
Corresponds to the JSON property encryptionKeyRevocationAction
1980 1981 1982 |
# File 'lib/google/apis/run_v2/classes.rb', line 1980 def encryption_key_revocation_action @encryption_key_revocation_action end |
#encryption_key_shutdown_duration ⇒ String
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
1986 1987 1988 |
# File 'lib/google/apis/run_v2/classes.rb', line 1986 def encryption_key_shutdown_duration @encryption_key_shutdown_duration end |
#execution_environment ⇒ String
Optional. The sandbox environment to host this Revision.
Corresponds to the JSON property executionEnvironment
1991 1992 1993 |
# File 'lib/google/apis/run_v2/classes.rb', line 1991 def execution_environment @execution_environment end |
#health_check_disabled ⇒ Boolean Also known as: health_check_disabled?
Optional. Disables health checking containers during deployment.
Corresponds to the JSON property healthCheckDisabled
1996 1997 1998 |
# File 'lib/google/apis/run_v2/classes.rb', line 1996 def health_check_disabled @health_check_disabled end |
#labels ⇒ Hash<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
2010 2011 2012 |
# File 'lib/google/apis/run_v2/classes.rb', line 2010 def labels @labels end |
#max_instance_request_concurrency ⇒ Fixnum
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
= 1
and defaults to 1 when requestedCPU < 1. Corresponds to the JSON propertymaxInstanceRequestConcurrency`
2017 2018 2019 |
# File 'lib/google/apis/run_v2/classes.rb', line 2017 def max_instance_request_concurrency @max_instance_request_concurrency end |
#node_selector ⇒ Google::Apis::RunV2::GoogleCloudRunV2NodeSelector
Hardware constraints configuration.
Corresponds to the JSON property nodeSelector
2022 2023 2024 |
# File 'lib/google/apis/run_v2/classes.rb', line 2022 def node_selector @node_selector end |
#revision ⇒ String
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
2028 2029 2030 |
# File 'lib/google/apis/run_v2/classes.rb', line 2028 def revision @revision end |
#scaling ⇒ Google::Apis::RunV2::GoogleCloudRunV2RevisionScaling
Settings for revision-level scaling settings.
Corresponds to the JSON property scaling
2033 2034 2035 |
# File 'lib/google/apis/run_v2/classes.rb', line 2033 def scaling @scaling end |
#service_account ⇒ String
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
2041 2042 2043 |
# File 'lib/google/apis/run_v2/classes.rb', line 2041 def service_account @service_account end |
#service_mesh ⇒ Google::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
2047 2048 2049 |
# File 'lib/google/apis/run_v2/classes.rb', line 2047 def service_mesh @service_mesh end |
#session_affinity ⇒ Boolean Also known as: session_affinity?
Optional. Enable session affinity.
Corresponds to the JSON property sessionAffinity
2052 2053 2054 |
# File 'lib/google/apis/run_v2/classes.rb', line 2052 def session_affinity @session_affinity end |
#timeout ⇒ String
Optional. Max allowed time for an instance to respond to a request.
Corresponds to the JSON property timeout
2058 2059 2060 |
# File 'lib/google/apis/run_v2/classes.rb', line 2058 def timeout @timeout end |
#volumes ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2Volume>
Optional. A list of Volumes to make available to containers.
Corresponds to the JSON property volumes
2063 2064 2065 |
# File 'lib/google/apis/run_v2/classes.rb', line 2063 def volumes @volumes end |
#vpc_access ⇒ Google::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
2069 2070 2071 |
# File 'lib/google/apis/run_v2/classes.rb', line 2069 def vpc_access @vpc_access end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/google/apis/run_v2/classes.rb', line 2076 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) @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) @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 |