Class: Google::Apis::RunV1alpha1::InstanceSpec
- Inherits:
-
Object
- Object
- Google::Apis::RunV1alpha1::InstanceSpec
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1alpha1/classes.rb,
lib/google/apis/run_v1alpha1/representations.rb,
lib/google/apis/run_v1alpha1/representations.rb
Overview
InstanceSpec is a description of an instance.
Instance Attribute Summary collapse
-
#active_deadline_seconds ⇒ Fixnum
Optional.
-
#containers ⇒ Array<Google::Apis::RunV1alpha1::Container>
Optional.
-
#restart_policy ⇒ String
Optional.
-
#service_account_name ⇒ String
Optional.
-
#termination_grace_period_seconds ⇒ Fixnum
Optional.
-
#volumes ⇒ Array<Google::Apis::RunV1alpha1::Volume>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstanceSpec
constructor
A new instance of InstanceSpec.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstanceSpec
Returns a new instance of InstanceSpec.
2053 2054 2055 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2053 def initialize(**args) update!(**args) end |
Instance Attribute Details
#active_deadline_seconds ⇒ Fixnum
Optional. Optional duration in seconds the instance may be active relative to
StartTime before the system will actively try to mark it failed and kill
associated containers. If set to zero, the system will never attempt to kill
an instance based on time. Otherwise, value must be a positive integer. +
optional
Corresponds to the JSON property activeDeadlineSeconds
2012 2013 2014 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2012 def active_deadline_seconds @active_deadline_seconds end |
#containers ⇒ Array<Google::Apis::RunV1alpha1::Container>
Optional. List of containers belonging to the instance. We disallow a number
of fields on this Container. Only a single container may be provided.
Corresponds to the JSON property containers
2018 2019 2020 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2018 def containers @containers end |
#restart_policy ⇒ String
Optional. Restart policy for all containers within the instance. Allowed
values are: - OnFailure: Instances will always be restarted on failure if the
backoffLimit has not been reached. - Never: Instances are never restarted and
all failures are permanent. Cannot be used if backoffLimit is set. +optional
Corresponds to the JSON property restartPolicy
2026 2027 2028 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2026 def restart_policy @restart_policy end |
#service_account_name ⇒ String
Optional. Email address of the IAM service account associated with the
instance of a Job. The service account represents the identity of the running
instance, and determines what permissions the instance has. If not provided,
the instance will use the project's default service account. +optional
Corresponds to the JSON property serviceAccountName
2034 2035 2036 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2034 def service_account_name @service_account_name end |
#termination_grace_period_seconds ⇒ Fixnum
Optional. Optional duration in seconds the instance needs to terminate
gracefully. Value must be non-negative integer. The value zero indicates
delete immediately. The grace period is the duration in seconds after the
processes running in the instance are sent a termination signal and the time
when the processes are forcibly halted with a kill signal. Set this value
longer than the expected cleanup time for your process. +optional
Corresponds to the JSON property terminationGracePeriodSeconds
2044 2045 2046 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2044 def termination_grace_period_seconds @termination_grace_period_seconds end |
#volumes ⇒ Array<Google::Apis::RunV1alpha1::Volume>
Optional. List of volumes that can be mounted by containers belonging to the
instance. More info: https://kubernetes.io/docs/concepts/storage/volumes +
optional
Corresponds to the JSON property volumes
2051 2052 2053 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2051 def volumes @volumes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2058 2059 2060 2061 2062 2063 2064 2065 |
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 2058 def update!(**args) @active_deadline_seconds = args[:active_deadline_seconds] if args.key?(:active_deadline_seconds) @containers = args[:containers] if args.key?(:containers) @restart_policy = args[:restart_policy] if args.key?(:restart_policy) @service_account_name = args[:service_account_name] if args.key?(:service_account_name) @termination_grace_period_seconds = args[:termination_grace_period_seconds] if args.key?(:termination_grace_period_seconds) @volumes = args[:volumes] if args.key?(:volumes) end |