Class: Google::Apis::RunV1::VolumeMount
- Inherits:
-
Object
- Object
- Google::Apis::RunV1::VolumeMount
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb
Overview
VolumeMount describes a mounting of a Volume within a container.
Instance Attribute Summary collapse
-
#mount_path ⇒ String
Required.
-
#name ⇒ String
Required.
-
#read_only ⇒ Boolean
(also: #read_only?)
Sets the mount to be read-only or read-write.
-
#sub_path ⇒ String
Path within the volume from which the container's volume should be mounted.
Instance Method Summary collapse
-
#initialize(**args) ⇒ VolumeMount
constructor
A new instance of VolumeMount.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ VolumeMount
Returns a new instance of VolumeMount.
6739 6740 6741 |
# File 'lib/google/apis/run_v1/classes.rb', line 6739 def initialize(**args) update!(**args) end |
Instance Attribute Details
#mount_path ⇒ String
Required. Path within the container at which the volume should be mounted.
Must not contain ':'.
Corresponds to the JSON property mountPath
6718 6719 6720 |
# File 'lib/google/apis/run_v1/classes.rb', line 6718 def mount_path @mount_path end |
#name ⇒ String
Required. The name of the volume. There must be a corresponding Volume with
the same name.
Corresponds to the JSON property name
6724 6725 6726 |
# File 'lib/google/apis/run_v1/classes.rb', line 6724 def name @name end |
#read_only ⇒ Boolean Also known as: read_only?
Sets the mount to be read-only or read-write. Not used by Cloud Run.
Corresponds to the JSON property readOnly
6729 6730 6731 |
# File 'lib/google/apis/run_v1/classes.rb', line 6729 def read_only @read_only end |
#sub_path ⇒ String
Path within the volume from which the container's volume should be mounted.
Defaults to "" (volume's root). This field is currently rejected in Secret
volume mounts.
Corresponds to the JSON property subPath
6737 6738 6739 |
# File 'lib/google/apis/run_v1/classes.rb', line 6737 def sub_path @sub_path end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6744 6745 6746 6747 6748 6749 |
# File 'lib/google/apis/run_v1/classes.rb', line 6744 def update!(**args) @mount_path = args[:mount_path] if args.key?(:mount_path) @name = args[:name] if args.key?(:name) @read_only = args[:read_only] if args.key?(:read_only) @sub_path = args[:sub_path] if args.key?(:sub_path) end |