Class: Google::Apis::RunV2::GoogleCloudRunV2Container
- Inherits:
-
Object
- Object
- Google::Apis::RunV2::GoogleCloudRunV2Container
- 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
A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments can be supplied by the system to the container at runtime.
Instance Attribute Summary collapse
-
#args ⇒ Array<String>
Arguments to the entrypoint.
-
#base_image_uri ⇒ String
Base image for this container.
-
#build_info ⇒ Google::Apis::RunV2::GoogleCloudRunV2BuildInfo
Build information of the image.
-
#command ⇒ Array<String>
Entrypoint array.
-
#depends_on ⇒ Array<String>
Names of the containers that must start before this container.
-
#env ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2EnvVar>
List of environment variables to set in the container.
-
#image ⇒ String
Required.
-
#liveness_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
-
#name ⇒ String
Name of the container specified as a DNS_LABEL (RFC 1123).
-
#ports ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2ContainerPort>
List of ports to expose from the container.
-
#readiness_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
-
#resources ⇒ Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements
ResourceRequirements describes the compute resource requirements.
-
#sandbox_launcher ⇒ Boolean
(also: #sandbox_launcher?)
Optional.
-
#source_code ⇒ Google::Apis::RunV2::GoogleCloudRunV2SourceCode
Source type for the container.
-
#startup_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
-
#volume_mounts ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2VolumeMount>
Volume to mount into the container's filesystem.
-
#working_dir ⇒ String
Container's working directory.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRunV2Container
constructor
A new instance of GoogleCloudRunV2Container.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRunV2Container
Returns a new instance of GoogleCloudRunV2Container.
495 496 497 |
# File 'lib/google/apis/run_v2/classes.rb', line 495 def initialize(**args) update!(**args) end |
Instance Attribute Details
#args ⇒ Array<String>
Arguments to the entrypoint. The docker image's CMD is used if this is not
provided.
Corresponds to the JSON property args
399 400 401 |
# File 'lib/google/apis/run_v2/classes.rb', line 399 def args @args end |
#base_image_uri ⇒ String
Base image for this container. Only supported for services. If set, it
indicates that the service is enrolled into automatic base image update.
Corresponds to the JSON property baseImageUri
405 406 407 |
# File 'lib/google/apis/run_v2/classes.rb', line 405 def base_image_uri @base_image_uri end |
#build_info ⇒ Google::Apis::RunV2::GoogleCloudRunV2BuildInfo
Build information of the image.
Corresponds to the JSON property buildInfo
410 411 412 |
# File 'lib/google/apis/run_v2/classes.rb', line 410 def build_info @build_info end |
#command ⇒ Array<String>
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT
is used if this is not provided.
Corresponds to the JSON property command
416 417 418 |
# File 'lib/google/apis/run_v2/classes.rb', line 416 def command @command end |
#depends_on ⇒ Array<String>
Names of the containers that must start before this container.
Corresponds to the JSON property dependsOn
421 422 423 |
# File 'lib/google/apis/run_v2/classes.rb', line 421 def depends_on @depends_on end |
#env ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2EnvVar>
List of environment variables to set in the container.
Corresponds to the JSON property env
426 427 428 |
# File 'lib/google/apis/run_v2/classes.rb', line 426 def env @env end |
#image ⇒ String
Required. Name of the container image in Dockerhub, Google Artifact Registry,
or Google Container Registry. If the host is not provided, Dockerhub is
assumed.
Corresponds to the JSON property image
433 434 435 |
# File 'lib/google/apis/run_v2/classes.rb', line 433 def image @image end |
#liveness_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to
determine whether it is alive or ready to receive traffic.
Corresponds to the JSON property livenessProbe
439 440 441 |
# File 'lib/google/apis/run_v2/classes.rb', line 439 def liveness_probe @liveness_probe end |
#name ⇒ String
Name of the container specified as a DNS_LABEL (RFC 1123).
Corresponds to the JSON property name
444 445 446 |
# File 'lib/google/apis/run_v2/classes.rb', line 444 def name @name end |
#ports ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2ContainerPort>
List of ports to expose from the container. Only a single port can be
specified. The specified ports must be listening on all interfaces (0.0.0.0)
within the container to be accessible. If omitted, a port number will be
chosen and passed to the container through the PORT environment variable for
the container to listen on.
Corresponds to the JSON property ports
453 454 455 |
# File 'lib/google/apis/run_v2/classes.rb', line 453 def ports @ports end |
#readiness_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to
determine whether it is alive or ready to receive traffic.
Corresponds to the JSON property readinessProbe
459 460 461 |
# File 'lib/google/apis/run_v2/classes.rb', line 459 def readiness_probe @readiness_probe end |
#resources ⇒ Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements
ResourceRequirements describes the compute resource requirements.
Corresponds to the JSON property resources
464 465 466 |
# File 'lib/google/apis/run_v2/classes.rb', line 464 def resources @resources end |
#sandbox_launcher ⇒ Boolean Also known as: sandbox_launcher?
Optional. Indicates that this container can act as a sandbox supervisor and
launch sandboxes.
Corresponds to the JSON property sandboxLauncher
470 471 472 |
# File 'lib/google/apis/run_v2/classes.rb', line 470 def sandbox_launcher @sandbox_launcher end |
#source_code ⇒ Google::Apis::RunV2::GoogleCloudRunV2SourceCode
Source type for the container.
Corresponds to the JSON property sourceCode
476 477 478 |
# File 'lib/google/apis/run_v2/classes.rb', line 476 def source_code @source_code end |
#startup_probe ⇒ Google::Apis::RunV2::GoogleCloudRunV2Probe
Probe describes a health check to be performed against a container to
determine whether it is alive or ready to receive traffic.
Corresponds to the JSON property startupProbe
482 483 484 |
# File 'lib/google/apis/run_v2/classes.rb', line 482 def startup_probe @startup_probe end |
#volume_mounts ⇒ Array<Google::Apis::RunV2::GoogleCloudRunV2VolumeMount>
Volume to mount into the container's filesystem.
Corresponds to the JSON property volumeMounts
487 488 489 |
# File 'lib/google/apis/run_v2/classes.rb', line 487 def volume_mounts @volume_mounts end |
#working_dir ⇒ String
Container's working directory. If not specified, the container runtime's
default will be used, which might be configured in the container image.
Corresponds to the JSON property workingDir
493 494 495 |
# File 'lib/google/apis/run_v2/classes.rb', line 493 def working_dir @working_dir end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/google/apis/run_v2/classes.rb', line 500 def update!(**args) @args = args[:args] if args.key?(:args) @base_image_uri = args[:base_image_uri] if args.key?(:base_image_uri) @build_info = args[:build_info] if args.key?(:build_info) @command = args[:command] if args.key?(:command) @depends_on = args[:depends_on] if args.key?(:depends_on) @env = args[:env] if args.key?(:env) @image = args[:image] if args.key?(:image) @liveness_probe = args[:liveness_probe] if args.key?(:liveness_probe) @name = args[:name] if args.key?(:name) @ports = args[:ports] if args.key?(:ports) @readiness_probe = args[:readiness_probe] if args.key?(:readiness_probe) @resources = args[:resources] if args.key?(:resources) @sandbox_launcher = args[:sandbox_launcher] if args.key?(:sandbox_launcher) @source_code = args[:source_code] if args.key?(:source_code) @startup_probe = args[:startup_probe] if args.key?(:startup_probe) @volume_mounts = args[:volume_mounts] if args.key?(:volume_mounts) @working_dir = args[:working_dir] if args.key?(:working_dir) end |