Class: DockerEngineAPI::Models::VolumeUpdateParams::Spec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- DockerEngineAPI::Models::VolumeUpdateParams::Spec
- Defined in:
- lib/docker_engine_api/models/volume_update_params.rb
Defined Under Namespace
Classes: AccessMode
Instance Attribute Summary collapse
-
#access_mode ⇒ DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode?
Defines how the volume is used by tasks.
-
#group ⇒ String?
Group defines the volume group of this volume.
Instance Method Summary collapse
-
#initialize(access_mode: nil, group: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Spec for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(access_mode: nil, group: nil) ⇒ Object
Some parameter documentations has been truncated, see DockerEngineAPI::Models::VolumeUpdateParams::Spec for more details.
Cluster-specific options used to create the volume.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/docker_engine_api/models/volume_update_params.rb', line 33 class Spec < DockerEngineAPI::Internal::Type::BaseModel # @!attribute access_mode # Defines how the volume is used by tasks. # # @return [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode, nil] optional :access_mode, -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode }, api_name: :AccessMode # @!attribute group # Group defines the volume group of this volume. Volumes belonging to the same # group can be referred to by group name when creating Services. Referring to a # volume by group instructs Swarm to treat volumes in that group interchangeably # for the purpose of scheduling. Volumes with an empty string for a group # technically all belong to the same, emptystring group. # # @return [String, nil] optional :group, String, api_name: :Group # @!method initialize(access_mode: nil, group: nil) # Some parameter documentations has been truncated, see # {DockerEngineAPI::Models::VolumeUpdateParams::Spec} for more details. # # Cluster-specific options used to create the volume. # # @param access_mode [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode] Defines how the volume is used by tasks. # # @param group [String] Group defines the volume group of this volume. Volumes belonging to # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec#access_mode class AccessMode < DockerEngineAPI::Internal::Type::BaseModel # @!attribute accessibility_requirements # Requirements for the accessible topology of the volume. These fields are # optional. For an in-depth description of what these fields mean, see the CSI # specification. # # @return [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::AccessibilityRequirements, nil] optional :accessibility_requirements, -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::AccessibilityRequirements }, api_name: :AccessibilityRequirements # @!attribute availability # The availability of the volume for use in tasks. # # - `active` The volume is fully available for scheduling on the cluster # - `pause` No new workloads should use the volume, but existing workloads are not # stopped. # - `drain` All workloads using this volume should be stopped and rescheduled, and # no new ones should be started. # # @return [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Availability, nil] optional :availability, enum: -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::Availability }, api_name: :Availability # @!attribute capacity_range # The desired capacity that the volume should be created with. If empty, the # plugin will decide the capacity. # # @return [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::CapacityRange, nil] optional :capacity_range, -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::CapacityRange }, api_name: :CapacityRange # @!attribute mount_volume # Options for using this volume as a Mount-type volume. # # Either MountVolume or BlockVolume, but not both, must be # present. # # properties: FsType: type: "string" description: | Specifies the filesystem type # for the mount volume. Optional. MountFlags: type: "array" description: | Flags # to pass when mounting the volume. Optional. items: type: "string" BlockVolume: # type: "object" description: | Options for using this volume as a Block-type # volume. Intentionally empty. # # @return [Object, nil] optional :mount_volume, DockerEngineAPI::Internal::Type::Unknown, api_name: :MountVolume # @!attribute scope # The set of nodes this volume can be used on at one time. # # - `single` The volume may only be scheduled to one node at a time. # - `multi` the volume may be scheduled to any supported number of nodes at a # time. # # @return [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Scope, nil] optional :scope, enum: -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::Scope }, api_name: :Scope # @!attribute secrets # Swarm Secrets that are passed to the CSI storage plugin when operating on this # volume. # # @return [Array<DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Secret>, nil] optional :secrets, -> { DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::Secret] }, api_name: :Secrets # @!attribute sharing # The number and way that different tasks can use this volume at one time. # # - `none` The volume may only be used by one task at a time. # - `readonly` The volume may be used by any number of tasks, but they all must # mount the volume as readonly # - `onewriter` The volume may be used by any number of tasks, but only one may # mount it as read/write. # - `all` The volume may have any number of readers and writers. # # @return [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Sharing, nil] optional :sharing, enum: -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode::Sharing }, api_name: :Sharing # @!method initialize(accessibility_requirements: nil, availability: nil, capacity_range: nil, mount_volume: nil, scope: nil, secrets: nil, sharing: nil) # Some parameter documentations has been truncated, see # {DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode} for more # details. # # Defines how the volume is used by tasks. # # @param accessibility_requirements [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::AccessibilityRequirements] Requirements for the accessible topology of the volume. These # # @param availability [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Availability] The availability of the volume for use in tasks. # # @param capacity_range [DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::CapacityRange] The desired capacity that the volume should be created with. If # # @param mount_volume [Object] Options for using this volume as a Mount-type volume. # # @param scope [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Scope] The set of nodes this volume can be used on at one time. # # @param secrets [Array<DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Secret>] Swarm Secrets that are passed to the CSI storage plugin when # # @param sharing [Symbol, DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Sharing] The number and way that different tasks can use this volume # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode#accessibility_requirements class AccessibilityRequirements < DockerEngineAPI::Internal::Type::BaseModel # @!attribute preferred # A list of topologies that the volume should attempt to be provisioned in. # # @return [Array<Hash{Symbol=>String}>, nil] optional :preferred, DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Internal::Type::HashOf[String]], api_name: :Preferred # @!attribute requisite # A list of required topologies, at least one of which the volume must be # accessible from. # # @return [Array<Hash{Symbol=>String}>, nil] optional :requisite, DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Internal::Type::HashOf[String]], api_name: :Requisite # @!method initialize(preferred: nil, requisite: nil) # Some parameter documentations has been truncated, see # {DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::AccessibilityRequirements} # for more details. # # Requirements for the accessible topology of the volume. These fields are # optional. For an in-depth description of what these fields mean, see the CSI # specification. # # @param preferred [Array<Hash{Symbol=>String}>] A list of topologies that the volume should attempt to be # # @param requisite [Array<Hash{Symbol=>String}>] A list of required topologies, at least one of which the end # The availability of the volume for use in tasks. # # - `active` The volume is fully available for scheduling on the cluster # - `pause` No new workloads should use the volume, but existing workloads are not # stopped. # - `drain` All workloads using this volume should be stopped and rescheduled, and # no new ones should be started. # # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode#availability module Availability extend DockerEngineAPI::Internal::Type::Enum ACTIVE = :active PAUSE = :pause DRAIN = :drain # @!method self.values # @return [Array<Symbol>] end # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode#capacity_range class CapacityRange < DockerEngineAPI::Internal::Type::BaseModel # @!attribute limit_bytes # The volume must not be bigger than this. The value of 0 indicates an unspecified # maximum. # # @return [Integer, nil] optional :limit_bytes, Integer, api_name: :LimitBytes # @!attribute required_bytes # The volume must be at least this big. The value of 0 indicates an unspecified # minimum # # @return [Integer, nil] optional :required_bytes, Integer, api_name: :RequiredBytes # @!method initialize(limit_bytes: nil, required_bytes: nil) # Some parameter documentations has been truncated, see # {DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::CapacityRange} # for more details. # # The desired capacity that the volume should be created with. If empty, the # plugin will decide the capacity. # # @param limit_bytes [Integer] The volume must not be bigger than this. The value of 0 # # @param required_bytes [Integer] The volume must be at least this big. The value of 0 end # The set of nodes this volume can be used on at one time. # # - `single` The volume may only be scheduled to one node at a time. # - `multi` the volume may be scheduled to any supported number of nodes at a # time. # # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode#scope module Scope extend DockerEngineAPI::Internal::Type::Enum SINGLE = :single MULTI = :multi # @!method self.values # @return [Array<Symbol>] end class Secret < DockerEngineAPI::Internal::Type::BaseModel # @!attribute key # Key is the name of the key of the key-value pair passed to the plugin. # # @return [String, nil] optional :key, String, api_name: :Key # @!attribute secret # Secret is the swarm Secret object from which to read data. This can be a Secret # name or ID. The Secret data is retrieved by swarm and used as the value of the # key-value pair passed to the plugin. # # @return [String, nil] optional :secret, String, api_name: :Secret # @!method initialize(key: nil, secret: nil) # Some parameter documentations has been truncated, see # {DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode::Secret} for more # details. # # One cluster volume secret entry. Defines a key-value pair that is passed to the # plugin. # # @param key [String] Key is the name of the key of the key-value pair passed to # # @param secret [String] Secret is the swarm Secret object from which to read data. end # The number and way that different tasks can use this volume at one time. # # - `none` The volume may only be used by one task at a time. # - `readonly` The volume may be used by any number of tasks, but they all must # mount the volume as readonly # - `onewriter` The volume may be used by any number of tasks, but only one may # mount it as read/write. # - `all` The volume may have any number of readers and writers. # # @see DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode#sharing module Sharing extend DockerEngineAPI::Internal::Type::Enum NONE = :none READONLY = :readonly ONEWRITER = :onewriter ALL = :all # @!method self.values # @return [Array<Symbol>] end end end |
Instance Attribute Details
#access_mode ⇒ DockerEngineAPI::Models::VolumeUpdateParams::Spec::AccessMode?
Defines how the volume is used by tasks.
38 39 40 41 42 |
# File 'lib/docker_engine_api/models/volume_update_params.rb', line 38 optional :access_mode, -> { DockerEngineAPI::VolumeUpdateParams::Spec::AccessMode }, api_name: :AccessMode |
#group ⇒ String?
Group defines the volume group of this volume. Volumes belonging to the same group can be referred to by group name when creating Services. Referring to a volume by group instructs Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes with an empty string for a group technically all belong to the same, emptystring group.
52 |
# File 'lib/docker_engine_api/models/volume_update_params.rb', line 52 optional :group, String, api_name: :Group |