docker-engine 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +17 -0
  4. data/README.md +230 -0
  5. data/SECURITY.md +27 -0
  6. data/lib/docker_engine/client.rb +77 -0
  7. data/lib/docker_engine/errors.rb +228 -0
  8. data/lib/docker_engine/file_part.rb +58 -0
  9. data/lib/docker_engine/internal/transport/base_client.rb +567 -0
  10. data/lib/docker_engine/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/docker_engine/internal/type/array_of.rb +168 -0
  12. data/lib/docker_engine/internal/type/base_model.rb +529 -0
  13. data/lib/docker_engine/internal/type/base_page.rb +55 -0
  14. data/lib/docker_engine/internal/type/boolean.rb +77 -0
  15. data/lib/docker_engine/internal/type/converter.rb +327 -0
  16. data/lib/docker_engine/internal/type/enum.rb +131 -0
  17. data/lib/docker_engine/internal/type/file_input.rb +111 -0
  18. data/lib/docker_engine/internal/type/hash_of.rb +188 -0
  19. data/lib/docker_engine/internal/type/request_parameters.rb +42 -0
  20. data/lib/docker_engine/internal/type/union.rb +243 -0
  21. data/lib/docker_engine/internal/type/unknown.rb +81 -0
  22. data/lib/docker_engine/internal/util.rb +920 -0
  23. data/lib/docker_engine/internal.rb +20 -0
  24. data/lib/docker_engine/models/auth_login_params.rb +32 -0
  25. data/lib/docker_engine/models/auth_response.rb +27 -0
  26. data/lib/docker_engine/models/config.rb +307 -0
  27. data/lib/docker_engine/models/container.rb +2489 -0
  28. data/lib/docker_engine/models/container_create_params.rb +1716 -0
  29. data/lib/docker_engine/models/container_delete_params.rb +38 -0
  30. data/lib/docker_engine/models/container_inspect_params.rb +22 -0
  31. data/lib/docker_engine/models/container_kill_params.rb +25 -0
  32. data/lib/docker_engine/models/container_list_params.rb +70 -0
  33. data/lib/docker_engine/models/container_list_response.rb +8 -0
  34. data/lib/docker_engine/models/container_logs_params.rb +74 -0
  35. data/lib/docker_engine/models/container_start_params.rb +27 -0
  36. data/lib/docker_engine/models/container_stop_params.rb +33 -0
  37. data/lib/docker_engine/models/create_request.rb +348 -0
  38. data/lib/docker_engine/models/create_response.rb +27 -0
  39. data/lib/docker_engine/models/error.rb +18 -0
  40. data/lib/docker_engine/models/image.rb +1393 -0
  41. data/lib/docker_engine/models/image_delete_params.rb +43 -0
  42. data/lib/docker_engine/models/image_delete_response.rb +28 -0
  43. data/lib/docker_engine/models/image_inspect_params.rb +22 -0
  44. data/lib/docker_engine/models/image_list_params.rb +68 -0
  45. data/lib/docker_engine/models/image_list_response.rb +8 -0
  46. data/lib/docker_engine/models/image_pull_params.rb +115 -0
  47. data/lib/docker_engine/models/network.rb +253 -0
  48. data/lib/docker_engine/models/network_create_params.rb +210 -0
  49. data/lib/docker_engine/models/network_create_response.rb +27 -0
  50. data/lib/docker_engine/models/network_delete_params.rb +14 -0
  51. data/lib/docker_engine/models/network_inspect_params.rb +30 -0
  52. data/lib/docker_engine/models/network_inspect_response.rb +131 -0
  53. data/lib/docker_engine/models/network_list_params.rb +40 -0
  54. data/lib/docker_engine/models/network_list_response.rb +8 -0
  55. data/lib/docker_engine/models/service.rb +520 -0
  56. data/lib/docker_engine/models/service_create_params.rb +34 -0
  57. data/lib/docker_engine/models/service_create_response.rb +32 -0
  58. data/lib/docker_engine/models/service_delete_params.rb +14 -0
  59. data/lib/docker_engine/models/service_inspect_params.rb +22 -0
  60. data/lib/docker_engine/models/service_list_params.rb +41 -0
  61. data/lib/docker_engine/models/service_list_response.rb +8 -0
  62. data/lib/docker_engine/models/spec.rb +2302 -0
  63. data/lib/docker_engine/models/summary.rb +763 -0
  64. data/lib/docker_engine/models/system_info_params.rb +14 -0
  65. data/lib/docker_engine/models/system_info_response.rb +1879 -0
  66. data/lib/docker_engine/models/system_ping_params.rb +14 -0
  67. data/lib/docker_engine/models/system_ping_response.rb +7 -0
  68. data/lib/docker_engine/models/system_version_params.rb +14 -0
  69. data/lib/docker_engine/models/system_version_response.rb +164 -0
  70. data/lib/docker_engine/models/volume.rb +650 -0
  71. data/lib/docker_engine/models/volume_create_params.rb +14 -0
  72. data/lib/docker_engine/models/volume_delete_params.rb +22 -0
  73. data/lib/docker_engine/models/volume_inspect_params.rb +14 -0
  74. data/lib/docker_engine/models/volume_list_params.rb +34 -0
  75. data/lib/docker_engine/models/volume_list_response.rb +34 -0
  76. data/lib/docker_engine/models.rb +121 -0
  77. data/lib/docker_engine/request_options.rb +77 -0
  78. data/lib/docker_engine/resources/auth.rb +38 -0
  79. data/lib/docker_engine/resources/containers.rb +258 -0
  80. data/lib/docker_engine/resources/images.rb +156 -0
  81. data/lib/docker_engine/resources/networks.rb +139 -0
  82. data/lib/docker_engine/resources/services.rb +113 -0
  83. data/lib/docker_engine/resources/system.rb +70 -0
  84. data/lib/docker_engine/resources/volumes.rb +105 -0
  85. data/lib/docker_engine/version.rb +5 -0
  86. data/lib/docker_engine.rb +114 -0
  87. data/manifest.yaml +17 -0
  88. data/rbi/docker_engine/client.rbi +56 -0
  89. data/rbi/docker_engine/errors.rbi +205 -0
  90. data/rbi/docker_engine/file_part.rbi +37 -0
  91. data/rbi/docker_engine/internal/transport/base_client.rbi +300 -0
  92. data/rbi/docker_engine/internal/transport/pooled_net_requester.rbi +84 -0
  93. data/rbi/docker_engine/internal/type/array_of.rbi +104 -0
  94. data/rbi/docker_engine/internal/type/base_model.rbi +314 -0
  95. data/rbi/docker_engine/internal/type/base_page.rbi +43 -0
  96. data/rbi/docker_engine/internal/type/boolean.rbi +58 -0
  97. data/rbi/docker_engine/internal/type/converter.rbi +222 -0
  98. data/rbi/docker_engine/internal/type/enum.rbi +82 -0
  99. data/rbi/docker_engine/internal/type/file_input.rbi +59 -0
  100. data/rbi/docker_engine/internal/type/hash_of.rbi +104 -0
  101. data/rbi/docker_engine/internal/type/request_parameters.rbi +31 -0
  102. data/rbi/docker_engine/internal/type/union.rbi +128 -0
  103. data/rbi/docker_engine/internal/type/unknown.rbi +58 -0
  104. data/rbi/docker_engine/internal/util.rbi +487 -0
  105. data/rbi/docker_engine/internal.rbi +18 -0
  106. data/rbi/docker_engine/models/auth_login_params.rbi +62 -0
  107. data/rbi/docker_engine/models/auth_response.rbi +39 -0
  108. data/rbi/docker_engine/models/config.rbi +442 -0
  109. data/rbi/docker_engine/models/container.rbi +4575 -0
  110. data/rbi/docker_engine/models/container_create_params.rbi +3297 -0
  111. data/rbi/docker_engine/models/container_delete_params.rbi +71 -0
  112. data/rbi/docker_engine/models/container_inspect_params.rbi +46 -0
  113. data/rbi/docker_engine/models/container_kill_params.rbi +46 -0
  114. data/rbi/docker_engine/models/container_list_params.rbi +124 -0
  115. data/rbi/docker_engine/models/container_list_response.rbi +11 -0
  116. data/rbi/docker_engine/models/container_logs_params.rbi +117 -0
  117. data/rbi/docker_engine/models/container_start_params.rbi +50 -0
  118. data/rbi/docker_engine/models/container_stop_params.rbi +60 -0
  119. data/rbi/docker_engine/models/create_request.rbi +702 -0
  120. data/rbi/docker_engine/models/create_response.rbi +36 -0
  121. data/rbi/docker_engine/models/error.rbi +28 -0
  122. data/rbi/docker_engine/models/image.rbi +2323 -0
  123. data/rbi/docker_engine/models/image_delete_params.rbi +75 -0
  124. data/rbi/docker_engine/models/image_delete_response.rbi +52 -0
  125. data/rbi/docker_engine/models/image_inspect_params.rbi +49 -0
  126. data/rbi/docker_engine/models/image_list_params.rbi +112 -0
  127. data/rbi/docker_engine/models/image_list_response.rbi +11 -0
  128. data/rbi/docker_engine/models/image_pull_params.rbi +186 -0
  129. data/rbi/docker_engine/models/network.rbi +419 -0
  130. data/rbi/docker_engine/models/network_create_params.rbi +362 -0
  131. data/rbi/docker_engine/models/network_create_response.rbi +37 -0
  132. data/rbi/docker_engine/models/network_delete_params.rbi +32 -0
  133. data/rbi/docker_engine/models/network_inspect_params.rbi +60 -0
  134. data/rbi/docker_engine/models/network_inspect_response.rbi +329 -0
  135. data/rbi/docker_engine/models/network_list_params.rbi +76 -0
  136. data/rbi/docker_engine/models/network_list_response.rbi +11 -0
  137. data/rbi/docker_engine/models/service.rbi +1076 -0
  138. data/rbi/docker_engine/models/service_create_params.rbi +77 -0
  139. data/rbi/docker_engine/models/service_create_response.rbi +50 -0
  140. data/rbi/docker_engine/models/service_delete_params.rbi +32 -0
  141. data/rbi/docker_engine/models/service_inspect_params.rbi +49 -0
  142. data/rbi/docker_engine/models/service_list_params.rbi +76 -0
  143. data/rbi/docker_engine/models/service_list_response.rbi +11 -0
  144. data/rbi/docker_engine/models/spec.rbi +4587 -0
  145. data/rbi/docker_engine/models/summary.rbi +1298 -0
  146. data/rbi/docker_engine/models/system_info_params.rbi +29 -0
  147. data/rbi/docker_engine/models/system_info_response.rbi +3587 -0
  148. data/rbi/docker_engine/models/system_ping_params.rbi +29 -0
  149. data/rbi/docker_engine/models/system_ping_response.rbi +7 -0
  150. data/rbi/docker_engine/models/system_version_params.rbi +32 -0
  151. data/rbi/docker_engine/models/system_version_response.rbi +282 -0
  152. data/rbi/docker_engine/models/volume.rbi +1218 -0
  153. data/rbi/docker_engine/models/volume_create_params.rbi +32 -0
  154. data/rbi/docker_engine/models/volume_delete_params.rbi +46 -0
  155. data/rbi/docker_engine/models/volume_inspect_params.rbi +32 -0
  156. data/rbi/docker_engine/models/volume_list_params.rbi +61 -0
  157. data/rbi/docker_engine/models/volume_list_response.rbi +55 -0
  158. data/rbi/docker_engine/models.rbi +83 -0
  159. data/rbi/docker_engine/request_options.rbi +59 -0
  160. data/rbi/docker_engine/resources/auth.rbi +30 -0
  161. data/rbi/docker_engine/resources/containers.rbi +231 -0
  162. data/rbi/docker_engine/resources/images.rbi +164 -0
  163. data/rbi/docker_engine/resources/networks.rbi +133 -0
  164. data/rbi/docker_engine/resources/services.rbi +88 -0
  165. data/rbi/docker_engine/resources/system.rbi +40 -0
  166. data/rbi/docker_engine/resources/volumes.rbi +80 -0
  167. data/rbi/docker_engine/version.rbi +5 -0
  168. data/sig/docker_engine/client.rbs +33 -0
  169. data/sig/docker_engine/errors.rbs +117 -0
  170. data/sig/docker_engine/file_part.rbs +21 -0
  171. data/sig/docker_engine/internal/transport/base_client.rbs +131 -0
  172. data/sig/docker_engine/internal/transport/pooled_net_requester.rbs +48 -0
  173. data/sig/docker_engine/internal/type/array_of.rbs +48 -0
  174. data/sig/docker_engine/internal/type/base_model.rbs +104 -0
  175. data/sig/docker_engine/internal/type/base_page.rbs +24 -0
  176. data/sig/docker_engine/internal/type/boolean.rbs +26 -0
  177. data/sig/docker_engine/internal/type/converter.rbs +79 -0
  178. data/sig/docker_engine/internal/type/enum.rbs +32 -0
  179. data/sig/docker_engine/internal/type/file_input.rbs +25 -0
  180. data/sig/docker_engine/internal/type/hash_of.rbs +48 -0
  181. data/sig/docker_engine/internal/type/request_parameters.rbs +19 -0
  182. data/sig/docker_engine/internal/type/union.rbs +52 -0
  183. data/sig/docker_engine/internal/type/unknown.rbs +26 -0
  184. data/sig/docker_engine/internal/util.rbs +185 -0
  185. data/sig/docker_engine/internal.rbs +9 -0
  186. data/sig/docker_engine/models/auth_login_params.rbs +38 -0
  187. data/sig/docker_engine/models/auth_response.rbs +17 -0
  188. data/sig/docker_engine/models/config.rbs +225 -0
  189. data/sig/docker_engine/models/container.rbs +1973 -0
  190. data/sig/docker_engine/models/container_create_params.rbs +1352 -0
  191. data/sig/docker_engine/models/container_delete_params.rbs +38 -0
  192. data/sig/docker_engine/models/container_inspect_params.rbs +25 -0
  193. data/sig/docker_engine/models/container_kill_params.rbs +25 -0
  194. data/sig/docker_engine/models/container_list_params.rbs +44 -0
  195. data/sig/docker_engine/models/container_list_response.rbs +7 -0
  196. data/sig/docker_engine/models/container_logs_params.rbs +70 -0
  197. data/sig/docker_engine/models/container_start_params.rbs +25 -0
  198. data/sig/docker_engine/models/container_stop_params.rbs +32 -0
  199. data/sig/docker_engine/models/create_request.rbs +255 -0
  200. data/sig/docker_engine/models/create_response.rbs +15 -0
  201. data/sig/docker_engine/models/error.rbs +13 -0
  202. data/sig/docker_engine/models/image.rbs +1038 -0
  203. data/sig/docker_engine/models/image_delete_params.rbs +38 -0
  204. data/sig/docker_engine/models/image_delete_response.rbs +24 -0
  205. data/sig/docker_engine/models/image_inspect_params.rbs +25 -0
  206. data/sig/docker_engine/models/image_list_params.rbs +56 -0
  207. data/sig/docker_engine/models/image_list_response.rbs +7 -0
  208. data/sig/docker_engine/models/image_pull_params.rbs +84 -0
  209. data/sig/docker_engine/models/network.rbs +236 -0
  210. data/sig/docker_engine/models/network_create_params.rbs +203 -0
  211. data/sig/docker_engine/models/network_create_response.rbs +15 -0
  212. data/sig/docker_engine/models/network_delete_params.rbs +15 -0
  213. data/sig/docker_engine/models/network_inspect_params.rbs +32 -0
  214. data/sig/docker_engine/models/network_inspect_response.rbs +149 -0
  215. data/sig/docker_engine/models/network_list_params.rbs +25 -0
  216. data/sig/docker_engine/models/network_list_response.rbs +7 -0
  217. data/sig/docker_engine/models/service.rbs +471 -0
  218. data/sig/docker_engine/models/service_create_params.rbs +38 -0
  219. data/sig/docker_engine/models/service_create_response.rbs +17 -0
  220. data/sig/docker_engine/models/service_delete_params.rbs +15 -0
  221. data/sig/docker_engine/models/service_inspect_params.rbs +26 -0
  222. data/sig/docker_engine/models/service_list_params.rbs +32 -0
  223. data/sig/docker_engine/models/service_list_response.rbs +7 -0
  224. data/sig/docker_engine/models/spec.rbs +1984 -0
  225. data/sig/docker_engine/models/summary.rbs +634 -0
  226. data/sig/docker_engine/models/system_info_params.rbs +15 -0
  227. data/sig/docker_engine/models/system_info_response.rbs +1380 -0
  228. data/sig/docker_engine/models/system_ping_params.rbs +15 -0
  229. data/sig/docker_engine/models/system_ping_response.rbs +5 -0
  230. data/sig/docker_engine/models/system_version_params.rbs +15 -0
  231. data/sig/docker_engine/models/system_version_response.rbs +127 -0
  232. data/sig/docker_engine/models/volume.rbs +478 -0
  233. data/sig/docker_engine/models/volume_create_params.rbs +15 -0
  234. data/sig/docker_engine/models/volume_delete_params.rbs +25 -0
  235. data/sig/docker_engine/models/volume_inspect_params.rbs +15 -0
  236. data/sig/docker_engine/models/volume_list_params.rbs +25 -0
  237. data/sig/docker_engine/models/volume_list_response.rbs +28 -0
  238. data/sig/docker_engine/models.rbs +81 -0
  239. data/sig/docker_engine/request_options.rbs +36 -0
  240. data/sig/docker_engine/resources/auth.rbs +14 -0
  241. data/sig/docker_engine/resources/containers.rbs +67 -0
  242. data/sig/docker_engine/resources/images.rbs +43 -0
  243. data/sig/docker_engine/resources/networks.rbs +41 -0
  244. data/sig/docker_engine/resources/services.rbs +30 -0
  245. data/sig/docker_engine/resources/system.rbs +17 -0
  246. data/sig/docker_engine/resources/volumes.rbs +28 -0
  247. data/sig/docker_engine/version.rbs +3 -0
  248. metadata +319 -0
@@ -0,0 +1,2302 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DockerEngine
4
+ module Models
5
+ class Spec < DockerEngine::Internal::Type::BaseModel
6
+ # @!attribute endpoint_spec
7
+ # Properties that can be configured to access and load balance a service.
8
+ #
9
+ # @return [DockerEngine::Models::Spec::EndpointSpec, nil]
10
+ optional :endpoint_spec, -> { DockerEngine::Spec::EndpointSpec }, api_name: :EndpointSpec
11
+
12
+ # @!attribute labels
13
+ # User-defined key/value metadata.
14
+ #
15
+ # @return [Hash{Symbol=>String}, nil]
16
+ optional :labels, DockerEngine::Internal::Type::HashOf[String], api_name: :Labels
17
+
18
+ # @!attribute mode
19
+ # Scheduling mode for the service.
20
+ #
21
+ # @return [DockerEngine::Models::Spec::Mode, nil]
22
+ optional :mode, -> { DockerEngine::Spec::Mode }, api_name: :Mode
23
+
24
+ # @!attribute name
25
+ # Name of the service.
26
+ #
27
+ # @return [String, nil]
28
+ optional :name, String, api_name: :Name
29
+
30
+ # @!attribute networks
31
+ # Specifies which networks the service should attach to.
32
+ #
33
+ # Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec
34
+ # should be used instead.
35
+ #
36
+ # @return [Array<DockerEngine::Models::Spec::Network>, nil]
37
+ optional :networks,
38
+ -> { DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::Network] },
39
+ api_name: :Networks
40
+
41
+ # @!attribute rollback_config
42
+ # Specification for the rollback strategy of the service.
43
+ #
44
+ # @return [DockerEngine::Models::Spec::RollbackConfig, nil]
45
+ optional :rollback_config, -> { DockerEngine::Spec::RollbackConfig }, api_name: :RollbackConfig
46
+
47
+ # @!attribute task_template
48
+ # User modifiable task configuration.
49
+ #
50
+ # @return [DockerEngine::Models::Spec::TaskTemplate, nil]
51
+ optional :task_template, -> { DockerEngine::Spec::TaskTemplate }, api_name: :TaskTemplate
52
+
53
+ # @!attribute update_config
54
+ # Specification for the update strategy of the service.
55
+ #
56
+ # @return [DockerEngine::Models::Spec::UpdateConfig, nil]
57
+ optional :update_config, -> { DockerEngine::Spec::UpdateConfig }, api_name: :UpdateConfig
58
+
59
+ # @!method initialize(endpoint_spec: nil, labels: nil, mode: nil, name: nil, networks: nil, rollback_config: nil, task_template: nil, update_config: nil)
60
+ # Some parameter documentations has been truncated, see
61
+ # {DockerEngine::Models::Spec} for more details.
62
+ #
63
+ # User modifiable configuration for a service.
64
+ #
65
+ # @param endpoint_spec [DockerEngine::Models::Spec::EndpointSpec] Properties that can be configured to access and load balance a service.
66
+ #
67
+ # @param labels [Hash{Symbol=>String}] User-defined key/value metadata.
68
+ #
69
+ # @param mode [DockerEngine::Models::Spec::Mode] Scheduling mode for the service.
70
+ #
71
+ # @param name [String] Name of the service.
72
+ #
73
+ # @param networks [Array<DockerEngine::Models::Spec::Network>] Specifies which networks the service should attach to.
74
+ #
75
+ # @param rollback_config [DockerEngine::Models::Spec::RollbackConfig] Specification for the rollback strategy of the service.
76
+ #
77
+ # @param task_template [DockerEngine::Models::Spec::TaskTemplate] User modifiable task configuration.
78
+ #
79
+ # @param update_config [DockerEngine::Models::Spec::UpdateConfig] Specification for the update strategy of the service.
80
+
81
+ # @see DockerEngine::Models::Spec#endpoint_spec
82
+ class EndpointSpec < DockerEngine::Internal::Type::BaseModel
83
+ # @!attribute mode
84
+ # The mode of resolution to use for internal load balancing between tasks.
85
+ #
86
+ # @return [Symbol, DockerEngine::Models::Spec::EndpointSpec::Mode, nil]
87
+ optional :mode, enum: -> { DockerEngine::Spec::EndpointSpec::Mode }, api_name: :Mode
88
+
89
+ # @!attribute ports
90
+ # List of exposed ports that this service is accessible on from the outside. Ports
91
+ # can only be provided if `vip` resolution mode is used.
92
+ #
93
+ # @return [Array<DockerEngine::Models::Spec::EndpointSpec::Port>, nil]
94
+ optional :ports,
95
+ -> { DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::EndpointSpec::Port] },
96
+ api_name: :Ports
97
+
98
+ # @!method initialize(mode: nil, ports: nil)
99
+ # Some parameter documentations has been truncated, see
100
+ # {DockerEngine::Models::Spec::EndpointSpec} for more details.
101
+ #
102
+ # Properties that can be configured to access and load balance a service.
103
+ #
104
+ # @param mode [Symbol, DockerEngine::Models::Spec::EndpointSpec::Mode] The mode of resolution to use for internal load balancing between tasks.
105
+ #
106
+ # @param ports [Array<DockerEngine::Models::Spec::EndpointSpec::Port>] List of exposed ports that this service is accessible on from the
107
+
108
+ # The mode of resolution to use for internal load balancing between tasks.
109
+ #
110
+ # @see DockerEngine::Models::Spec::EndpointSpec#mode
111
+ module Mode
112
+ extend DockerEngine::Internal::Type::Enum
113
+
114
+ VIP = :vip
115
+ DNSRR = :dnsrr
116
+
117
+ # @!method self.values
118
+ # @return [Array<Symbol>]
119
+ end
120
+
121
+ class Port < DockerEngine::Internal::Type::BaseModel
122
+ # @!attribute name
123
+ #
124
+ # @return [String, nil]
125
+ optional :name, String, api_name: :Name
126
+
127
+ # @!attribute protocol
128
+ #
129
+ # @return [Symbol, DockerEngine::Models::Spec::EndpointSpec::Port::Protocol, nil]
130
+ optional :protocol,
131
+ enum: -> {
132
+ DockerEngine::Spec::EndpointSpec::Port::Protocol
133
+ },
134
+ api_name: :Protocol
135
+
136
+ # @!attribute published_port
137
+ # The port on the swarm hosts.
138
+ #
139
+ # @return [Integer, nil]
140
+ optional :published_port, Integer, api_name: :PublishedPort
141
+
142
+ # @!attribute publish_mode
143
+ # The mode in which port is published.
144
+ #
145
+ # <p><br /></p>
146
+ #
147
+ # - "ingress" makes the target port accessible on every node, regardless of
148
+ # whether there is a task for the service running on that node or not.
149
+ # - "host" bypasses the routing mesh and publish the port directly on the swarm
150
+ # node where that service is running.
151
+ #
152
+ # @return [Symbol, DockerEngine::Models::Spec::EndpointSpec::Port::PublishMode, nil]
153
+ optional :publish_mode,
154
+ enum: -> { DockerEngine::Spec::EndpointSpec::Port::PublishMode },
155
+ api_name: :PublishMode
156
+
157
+ # @!attribute target_port
158
+ # The port inside the container.
159
+ #
160
+ # @return [Integer, nil]
161
+ optional :target_port, Integer, api_name: :TargetPort
162
+
163
+ # @!method initialize(name: nil, protocol: nil, published_port: nil, publish_mode: nil, target_port: nil)
164
+ # Some parameter documentations has been truncated, see
165
+ # {DockerEngine::Models::Spec::EndpointSpec::Port} for more details.
166
+ #
167
+ # @param name [String]
168
+ #
169
+ # @param protocol [Symbol, DockerEngine::Models::Spec::EndpointSpec::Port::Protocol]
170
+ #
171
+ # @param published_port [Integer] The port on the swarm hosts.
172
+ #
173
+ # @param publish_mode [Symbol, DockerEngine::Models::Spec::EndpointSpec::Port::PublishMode] The mode in which port is published.
174
+ #
175
+ # @param target_port [Integer] The port inside the container.
176
+
177
+ # @see DockerEngine::Models::Spec::EndpointSpec::Port#protocol
178
+ module Protocol
179
+ extend DockerEngine::Internal::Type::Enum
180
+
181
+ TCP = :tcp
182
+ UDP = :udp
183
+ SCTP = :sctp
184
+
185
+ # @!method self.values
186
+ # @return [Array<Symbol>]
187
+ end
188
+
189
+ # The mode in which port is published.
190
+ #
191
+ # <p><br /></p>
192
+ #
193
+ # - "ingress" makes the target port accessible on every node, regardless of
194
+ # whether there is a task for the service running on that node or not.
195
+ # - "host" bypasses the routing mesh and publish the port directly on the swarm
196
+ # node where that service is running.
197
+ #
198
+ # @see DockerEngine::Models::Spec::EndpointSpec::Port#publish_mode
199
+ module PublishMode
200
+ extend DockerEngine::Internal::Type::Enum
201
+
202
+ INGRESS = :ingress
203
+ HOST = :host
204
+
205
+ # @!method self.values
206
+ # @return [Array<Symbol>]
207
+ end
208
+ end
209
+ end
210
+
211
+ # @see DockerEngine::Models::Spec#mode
212
+ class Mode < DockerEngine::Internal::Type::BaseModel
213
+ # @!attribute global
214
+ #
215
+ # @return [Object, nil]
216
+ optional :global, DockerEngine::Internal::Type::Unknown, api_name: :Global
217
+
218
+ # @!attribute global_job
219
+ # The mode used for services which run a task to the completed state on each valid
220
+ # node.
221
+ #
222
+ # @return [Object, nil]
223
+ optional :global_job, DockerEngine::Internal::Type::Unknown, api_name: :GlobalJob
224
+
225
+ # @!attribute replicated
226
+ #
227
+ # @return [DockerEngine::Models::Spec::Mode::Replicated, nil]
228
+ optional :replicated, -> { DockerEngine::Spec::Mode::Replicated }, api_name: :Replicated
229
+
230
+ # @!attribute replicated_job
231
+ # The mode used for services with a finite number of tasks that run to a completed
232
+ # state.
233
+ #
234
+ # @return [DockerEngine::Models::Spec::Mode::ReplicatedJob, nil]
235
+ optional :replicated_job, -> { DockerEngine::Spec::Mode::ReplicatedJob }, api_name: :ReplicatedJob
236
+
237
+ # @!method initialize(global: nil, global_job: nil, replicated: nil, replicated_job: nil)
238
+ # Some parameter documentations has been truncated, see
239
+ # {DockerEngine::Models::Spec::Mode} for more details.
240
+ #
241
+ # Scheduling mode for the service.
242
+ #
243
+ # @param global [Object]
244
+ #
245
+ # @param global_job [Object] The mode used for services which run a task to the completed state
246
+ #
247
+ # @param replicated [DockerEngine::Models::Spec::Mode::Replicated]
248
+ #
249
+ # @param replicated_job [DockerEngine::Models::Spec::Mode::ReplicatedJob] The mode used for services with a finite number of tasks that run
250
+
251
+ # @see DockerEngine::Models::Spec::Mode#replicated
252
+ class Replicated < DockerEngine::Internal::Type::BaseModel
253
+ # @!attribute replicas
254
+ #
255
+ # @return [Integer, nil]
256
+ optional :replicas, Integer, api_name: :Replicas
257
+
258
+ # @!method initialize(replicas: nil)
259
+ # @param replicas [Integer]
260
+ end
261
+
262
+ # @see DockerEngine::Models::Spec::Mode#replicated_job
263
+ class ReplicatedJob < DockerEngine::Internal::Type::BaseModel
264
+ # @!attribute max_concurrent
265
+ # The maximum number of replicas to run simultaneously.
266
+ #
267
+ # @return [Integer, nil]
268
+ optional :max_concurrent, Integer, api_name: :MaxConcurrent
269
+
270
+ # @!attribute total_completions
271
+ # The total number of replicas desired to reach the Completed state. If unset,
272
+ # will default to the value of `MaxConcurrent`
273
+ #
274
+ # @return [Integer, nil]
275
+ optional :total_completions, Integer, api_name: :TotalCompletions
276
+
277
+ # @!method initialize(max_concurrent: nil, total_completions: nil)
278
+ # Some parameter documentations has been truncated, see
279
+ # {DockerEngine::Models::Spec::Mode::ReplicatedJob} for more details.
280
+ #
281
+ # The mode used for services with a finite number of tasks that run to a completed
282
+ # state.
283
+ #
284
+ # @param max_concurrent [Integer] The maximum number of replicas to run simultaneously.
285
+ #
286
+ # @param total_completions [Integer] The total number of replicas desired to reach the Completed
287
+ end
288
+ end
289
+
290
+ class Network < DockerEngine::Internal::Type::BaseModel
291
+ # @!attribute aliases
292
+ # Discoverable alternate names for the service on this network.
293
+ #
294
+ # @return [Array<String>, nil]
295
+ optional :aliases, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Aliases
296
+
297
+ # @!attribute driver_opts
298
+ # Driver attachment options for the network target.
299
+ #
300
+ # @return [Hash{Symbol=>String}, nil]
301
+ optional :driver_opts, DockerEngine::Internal::Type::HashOf[String], api_name: :DriverOpts
302
+
303
+ # @!attribute target
304
+ # The target network for attachment. Must be a network name or ID.
305
+ #
306
+ # @return [String, nil]
307
+ optional :target, String, api_name: :Target
308
+
309
+ # @!method initialize(aliases: nil, driver_opts: nil, target: nil)
310
+ # Some parameter documentations has been truncated, see
311
+ # {DockerEngine::Models::Spec::Network} for more details.
312
+ #
313
+ # Specifies how a service should be attached to a particular network.
314
+ #
315
+ # @param aliases [Array<String>] Discoverable alternate names for the service on this network.
316
+ #
317
+ # @param driver_opts [Hash{Symbol=>String}] Driver attachment options for the network target.
318
+ #
319
+ # @param target [String] The target network for attachment. Must be a network name or ID.
320
+ end
321
+
322
+ # @see DockerEngine::Models::Spec#rollback_config
323
+ class RollbackConfig < DockerEngine::Internal::Type::BaseModel
324
+ # @!attribute delay
325
+ # Amount of time between rollback iterations, in nanoseconds.
326
+ #
327
+ # @return [Integer, nil]
328
+ optional :delay, Integer, api_name: :Delay
329
+
330
+ # @!attribute failure_action
331
+ # Action to take if an rolled back task fails to run, or stops running during the
332
+ # rollback.
333
+ #
334
+ # @return [Symbol, DockerEngine::Models::Spec::RollbackConfig::FailureAction, nil]
335
+ optional :failure_action,
336
+ enum: -> { DockerEngine::Spec::RollbackConfig::FailureAction },
337
+ api_name: :FailureAction
338
+
339
+ # @!attribute max_failure_ratio
340
+ # The fraction of tasks that may fail during a rollback before the failure action
341
+ # is invoked, specified as a floating point number between 0 and 1.
342
+ #
343
+ # @return [Float, nil]
344
+ optional :max_failure_ratio, Float, api_name: :MaxFailureRatio
345
+
346
+ # @!attribute monitor
347
+ # Amount of time to monitor each rolled back task for failures, in nanoseconds.
348
+ #
349
+ # @return [Integer, nil]
350
+ optional :monitor, Integer, api_name: :Monitor
351
+
352
+ # @!attribute order
353
+ # The order of operations when rolling back a task. Either the old task is shut
354
+ # down before the new task is started, or the new task is started before the old
355
+ # task is shut down.
356
+ #
357
+ # @return [Symbol, DockerEngine::Models::Spec::RollbackConfig::Order, nil]
358
+ optional :order, enum: -> { DockerEngine::Spec::RollbackConfig::Order }, api_name: :Order
359
+
360
+ # @!attribute parallelism
361
+ # Maximum number of tasks to be rolled back in one iteration (0 means unlimited
362
+ # parallelism).
363
+ #
364
+ # @return [Integer, nil]
365
+ optional :parallelism, Integer, api_name: :Parallelism
366
+
367
+ # @!method initialize(delay: nil, failure_action: nil, max_failure_ratio: nil, monitor: nil, order: nil, parallelism: nil)
368
+ # Some parameter documentations has been truncated, see
369
+ # {DockerEngine::Models::Spec::RollbackConfig} for more details.
370
+ #
371
+ # Specification for the rollback strategy of the service.
372
+ #
373
+ # @param delay [Integer] Amount of time between rollback iterations, in nanoseconds.
374
+ #
375
+ # @param failure_action [Symbol, DockerEngine::Models::Spec::RollbackConfig::FailureAction] Action to take if an rolled back task fails to run, or stops
376
+ #
377
+ # @param max_failure_ratio [Float] The fraction of tasks that may fail during a rollback before the
378
+ #
379
+ # @param monitor [Integer] Amount of time to monitor each rolled back task for failures, in
380
+ #
381
+ # @param order [Symbol, DockerEngine::Models::Spec::RollbackConfig::Order] The order of operations when rolling back a task. Either the old
382
+ #
383
+ # @param parallelism [Integer] Maximum number of tasks to be rolled back in one iteration (0 means
384
+
385
+ # Action to take if an rolled back task fails to run, or stops running during the
386
+ # rollback.
387
+ #
388
+ # @see DockerEngine::Models::Spec::RollbackConfig#failure_action
389
+ module FailureAction
390
+ extend DockerEngine::Internal::Type::Enum
391
+
392
+ CONTINUE = :continue
393
+ PAUSE = :pause
394
+
395
+ # @!method self.values
396
+ # @return [Array<Symbol>]
397
+ end
398
+
399
+ # The order of operations when rolling back a task. Either the old task is shut
400
+ # down before the new task is started, or the new task is started before the old
401
+ # task is shut down.
402
+ #
403
+ # @see DockerEngine::Models::Spec::RollbackConfig#order
404
+ module Order
405
+ extend DockerEngine::Internal::Type::Enum
406
+
407
+ STOP_FIRST = :"stop-first"
408
+ START_FIRST = :"start-first"
409
+
410
+ # @!method self.values
411
+ # @return [Array<Symbol>]
412
+ end
413
+ end
414
+
415
+ # @see DockerEngine::Models::Spec#task_template
416
+ class TaskTemplate < DockerEngine::Internal::Type::BaseModel
417
+ # @!attribute container_spec
418
+ # Container spec for the service.
419
+ #
420
+ # <p><br /></p>
421
+ #
422
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
423
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
424
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
425
+ #
426
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec, nil]
427
+ optional :container_spec,
428
+ -> {
429
+ DockerEngine::Spec::TaskTemplate::ContainerSpec
430
+ },
431
+ api_name: :ContainerSpec
432
+
433
+ # @!attribute force_update
434
+ # A counter that triggers an update even if no relevant parameters have been
435
+ # changed.
436
+ #
437
+ # @return [Integer, nil]
438
+ optional :force_update, Integer, api_name: :ForceUpdate
439
+
440
+ # @!attribute log_driver
441
+ # Specifies the log driver to use for tasks created from this spec. If not
442
+ # present, the default one for the swarm will be used, finally falling back to the
443
+ # engine default if not specified.
444
+ #
445
+ # @return [DockerEngine::Models::Spec::TaskTemplate::LogDriver, nil]
446
+ optional :log_driver, -> { DockerEngine::Spec::TaskTemplate::LogDriver }, api_name: :LogDriver
447
+
448
+ # @!attribute network_attachment_spec
449
+ # Read-only spec type for non-swarm containers attached to swarm overlay networks.
450
+ #
451
+ # <p><br /></p>
452
+ #
453
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
454
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
455
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
456
+ #
457
+ # @return [DockerEngine::Models::Spec::TaskTemplate::NetworkAttachmentSpec, nil]
458
+ optional :network_attachment_spec,
459
+ -> { DockerEngine::Spec::TaskTemplate::NetworkAttachmentSpec },
460
+ api_name: :NetworkAttachmentSpec
461
+
462
+ # @!attribute networks
463
+ # Specifies which networks the service should attach to.
464
+ #
465
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::Network>, nil]
466
+ optional :networks,
467
+ -> { DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::Network] },
468
+ api_name: :Networks
469
+
470
+ # @!attribute placement
471
+ #
472
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Placement, nil]
473
+ optional :placement, -> { DockerEngine::Spec::TaskTemplate::Placement }, api_name: :Placement
474
+
475
+ # @!attribute plugin_spec
476
+ # Plugin spec for the service. _(Experimental release only.)_
477
+ #
478
+ # <p><br /></p>
479
+ #
480
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
481
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
482
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
483
+ #
484
+ # @return [DockerEngine::Models::Spec::TaskTemplate::PluginSpec, nil]
485
+ optional :plugin_spec, -> { DockerEngine::Spec::TaskTemplate::PluginSpec }, api_name: :PluginSpec
486
+
487
+ # @!attribute resources
488
+ # Resource requirements which apply to each individual container created as part
489
+ # of the service.
490
+ #
491
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Resources, nil]
492
+ optional :resources, -> { DockerEngine::Spec::TaskTemplate::Resources }, api_name: :Resources
493
+
494
+ # @!attribute restart_policy
495
+ # Specification for the restart policy which applies to containers created as part
496
+ # of this service.
497
+ #
498
+ # @return [DockerEngine::Models::Spec::TaskTemplate::RestartPolicy, nil]
499
+ optional :restart_policy,
500
+ -> {
501
+ DockerEngine::Spec::TaskTemplate::RestartPolicy
502
+ },
503
+ api_name: :RestartPolicy
504
+
505
+ # @!attribute runtime
506
+ # Runtime is the type of runtime specified for the task executor.
507
+ #
508
+ # @return [String, nil]
509
+ optional :runtime, String, api_name: :Runtime
510
+
511
+ # @!method initialize(container_spec: nil, force_update: nil, log_driver: nil, network_attachment_spec: nil, networks: nil, placement: nil, plugin_spec: nil, resources: nil, restart_policy: nil, runtime: nil)
512
+ # Some parameter documentations has been truncated, see
513
+ # {DockerEngine::Models::Spec::TaskTemplate} for more details.
514
+ #
515
+ # User modifiable task configuration.
516
+ #
517
+ # @param container_spec [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec] Container spec for the service.
518
+ #
519
+ # @param force_update [Integer] A counter that triggers an update even if no relevant parameters have
520
+ #
521
+ # @param log_driver [DockerEngine::Models::Spec::TaskTemplate::LogDriver] Specifies the log driver to use for tasks created from this spec. If
522
+ #
523
+ # @param network_attachment_spec [DockerEngine::Models::Spec::TaskTemplate::NetworkAttachmentSpec] Read-only spec type for non-swarm containers attached to swarm overlay
524
+ #
525
+ # @param networks [Array<DockerEngine::Models::Spec::TaskTemplate::Network>] Specifies which networks the service should attach to.
526
+ #
527
+ # @param placement [DockerEngine::Models::Spec::TaskTemplate::Placement]
528
+ #
529
+ # @param plugin_spec [DockerEngine::Models::Spec::TaskTemplate::PluginSpec] Plugin spec for the service. _(Experimental release only.)_
530
+ #
531
+ # @param resources [DockerEngine::Models::Spec::TaskTemplate::Resources] Resource requirements which apply to each individual container created
532
+ #
533
+ # @param restart_policy [DockerEngine::Models::Spec::TaskTemplate::RestartPolicy] Specification for the restart policy which applies to containers
534
+ #
535
+ # @param runtime [String] Runtime is the type of runtime specified for the task executor.
536
+
537
+ # @see DockerEngine::Models::Spec::TaskTemplate#container_spec
538
+ class ContainerSpec < DockerEngine::Internal::Type::BaseModel
539
+ # @!attribute args
540
+ # Arguments to the command.
541
+ #
542
+ # @return [Array<String>, nil]
543
+ optional :args, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Args
544
+
545
+ # @!attribute capability_add
546
+ # A list of kernel capabilities to add to the default set for the container.
547
+ #
548
+ # @return [Array<String>, nil]
549
+ optional :capability_add, DockerEngine::Internal::Type::ArrayOf[String], api_name: :CapabilityAdd
550
+
551
+ # @!attribute capability_drop
552
+ # A list of kernel capabilities to drop from the default set for the container.
553
+ #
554
+ # @return [Array<String>, nil]
555
+ optional :capability_drop, DockerEngine::Internal::Type::ArrayOf[String], api_name: :CapabilityDrop
556
+
557
+ # @!attribute command
558
+ # The command to be run in the image.
559
+ #
560
+ # @return [Array<String>, nil]
561
+ optional :command, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Command
562
+
563
+ # @!attribute configs
564
+ # Configs contains references to zero or more configs that will be exposed to the
565
+ # service.
566
+ #
567
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config>, nil]
568
+ optional :configs,
569
+ -> {
570
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::ContainerSpec::Config]
571
+ },
572
+ api_name: :Configs
573
+
574
+ # @!attribute dir
575
+ # The working directory for commands to run in.
576
+ #
577
+ # @return [String, nil]
578
+ optional :dir, String, api_name: :Dir
579
+
580
+ # @!attribute dns_config
581
+ # Specification for DNS related configurations in resolver configuration file
582
+ # (`resolv.conf`).
583
+ #
584
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::DNSConfig, nil]
585
+ optional :dns_config,
586
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::DNSConfig },
587
+ api_name: :DNSConfig
588
+
589
+ # @!attribute env
590
+ # A list of environment variables in the form `VAR=value`.
591
+ #
592
+ # @return [Array<String>, nil]
593
+ optional :env, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Env
594
+
595
+ # @!attribute groups
596
+ # A list of additional groups that the container process will run as.
597
+ #
598
+ # @return [Array<String>, nil]
599
+ optional :groups, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Groups
600
+
601
+ # @!attribute health_check
602
+ # A test to perform to check that the container is healthy. Healthcheck commands
603
+ # should be side-effect free.
604
+ #
605
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::HealthCheck, nil]
606
+ optional :health_check,
607
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::HealthCheck },
608
+ api_name: :HealthCheck
609
+
610
+ # @!attribute hostname
611
+ # The hostname to use for the container, as a valid
612
+ # [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
613
+ #
614
+ # @return [String, nil]
615
+ optional :hostname, String, api_name: :Hostname
616
+
617
+ # @!attribute hosts
618
+ # A list of hostname/IP mappings to add to the container's `hosts` file. The
619
+ # format of extra hosts is specified in the
620
+ # [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) man page:
621
+ #
622
+ # IP_address canonical_hostname [aliases...]
623
+ #
624
+ # @return [Array<String>, nil]
625
+ optional :hosts, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Hosts
626
+
627
+ # @!attribute image
628
+ # The image name to use for the container
629
+ #
630
+ # @return [String, nil]
631
+ optional :image, String, api_name: :Image
632
+
633
+ # @!attribute init
634
+ # Run an init inside the container that forwards signals and reaps processes. This
635
+ # field is omitted if empty, and the default (as configured on the daemon) is
636
+ # used.
637
+ #
638
+ # @return [Boolean, nil]
639
+ optional :init, DockerEngine::Internal::Type::Boolean, api_name: :Init, nil?: true
640
+
641
+ # @!attribute isolation
642
+ # Isolation technology of the containers running the service. (Windows only)
643
+ #
644
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Isolation, nil]
645
+ optional :isolation,
646
+ enum: -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Isolation },
647
+ api_name: :Isolation
648
+
649
+ # @!attribute labels
650
+ # User-defined key/value data.
651
+ #
652
+ # @return [Hash{Symbol=>String}, nil]
653
+ optional :labels, DockerEngine::Internal::Type::HashOf[String], api_name: :Labels
654
+
655
+ # @!attribute mounts
656
+ # Specification for mounts to be added to containers created as part of the
657
+ # service.
658
+ #
659
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount>, nil]
660
+ optional :mounts,
661
+ -> {
662
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount]
663
+ },
664
+ api_name: :Mounts
665
+
666
+ # @!attribute oom_score_adj
667
+ # An integer value containing the score given to the container in order to tune
668
+ # OOM killer preferences.
669
+ #
670
+ # @return [Integer, nil]
671
+ optional :oom_score_adj, Integer, api_name: :OomScoreAdj
672
+
673
+ # @!attribute open_stdin
674
+ # Open `stdin`
675
+ #
676
+ # @return [Boolean, nil]
677
+ optional :open_stdin, DockerEngine::Internal::Type::Boolean, api_name: :OpenStdin
678
+
679
+ # @!attribute privileges
680
+ # Security options for the container
681
+ #
682
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges, nil]
683
+ optional :privileges,
684
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges },
685
+ api_name: :Privileges
686
+
687
+ # @!attribute read_only
688
+ # Mount the container's root filesystem as read only.
689
+ #
690
+ # @return [Boolean, nil]
691
+ optional :read_only, DockerEngine::Internal::Type::Boolean, api_name: :ReadOnly
692
+
693
+ # @!attribute secrets
694
+ # Secrets contains references to zero or more secrets that will be exposed to the
695
+ # service.
696
+ #
697
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret>, nil]
698
+ optional :secrets,
699
+ -> {
700
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::ContainerSpec::Secret]
701
+ },
702
+ api_name: :Secrets
703
+
704
+ # @!attribute stop_grace_period
705
+ # Amount of time to wait for the container to terminate before forcefully killing
706
+ # it.
707
+ #
708
+ # @return [Integer, nil]
709
+ optional :stop_grace_period, Integer, api_name: :StopGracePeriod
710
+
711
+ # @!attribute stop_signal
712
+ # Signal to stop the container.
713
+ #
714
+ # @return [String, nil]
715
+ optional :stop_signal, String, api_name: :StopSignal
716
+
717
+ # @!attribute sysctls
718
+ # Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option
719
+ # on services accepts the same sysctls as the are supported on containers. Note
720
+ # that while the same sysctls are supported, no guarantees or checks are made
721
+ # about their suitability for a clustered environment, and it's up to the user to
722
+ # determine whether a given sysctl will work properly in a Service.
723
+ #
724
+ # @return [Hash{Symbol=>String}, nil]
725
+ optional :sysctls, DockerEngine::Internal::Type::HashOf[String], api_name: :Sysctls
726
+
727
+ # @!attribute tty
728
+ # Whether a pseudo-TTY should be allocated.
729
+ #
730
+ # @return [Boolean, nil]
731
+ optional :tty, DockerEngine::Internal::Type::Boolean, api_name: :TTY
732
+
733
+ # @!attribute ulimits
734
+ # A list of resource limits to set in the container. For example:
735
+ # `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
736
+ #
737
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Ulimit>, nil]
738
+ optional :ulimits,
739
+ -> {
740
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::ContainerSpec::Ulimit]
741
+ },
742
+ api_name: :Ulimits
743
+
744
+ # @!attribute user
745
+ # The user inside the container.
746
+ #
747
+ # @return [String, nil]
748
+ optional :user, String, api_name: :User
749
+
750
+ # @!method initialize(args: nil, capability_add: nil, capability_drop: nil, command: nil, configs: nil, dir: nil, dns_config: nil, env: nil, groups: nil, health_check: nil, hostname: nil, hosts: nil, image: nil, init: nil, isolation: nil, labels: nil, mounts: nil, oom_score_adj: nil, open_stdin: nil, privileges: nil, read_only: nil, secrets: nil, stop_grace_period: nil, stop_signal: nil, sysctls: nil, tty: nil, ulimits: nil, user: nil)
751
+ # Some parameter documentations has been truncated, see
752
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec} for more details.
753
+ #
754
+ # Container spec for the service.
755
+ #
756
+ # <p><br /></p>
757
+ #
758
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
759
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
760
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
761
+ #
762
+ # @param args [Array<String>] Arguments to the command.
763
+ #
764
+ # @param capability_add [Array<String>] A list of kernel capabilities to add to the default set
765
+ #
766
+ # @param capability_drop [Array<String>] A list of kernel capabilities to drop from the default set
767
+ #
768
+ # @param command [Array<String>] The command to be run in the image.
769
+ #
770
+ # @param configs [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config>] Configs contains references to zero or more configs that will be
771
+ #
772
+ # @param dir [String] The working directory for commands to run in.
773
+ #
774
+ # @param dns_config [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::DNSConfig] Specification for DNS related configurations in resolver configuration
775
+ #
776
+ # @param env [Array<String>] A list of environment variables in the form `VAR=value`.
777
+ #
778
+ # @param groups [Array<String>] A list of additional groups that the container process will run as.
779
+ #
780
+ # @param health_check [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::HealthCheck] A test to perform to check that the container is healthy.
781
+ #
782
+ # @param hostname [String] The hostname to use for the container, as a valid
783
+ #
784
+ # @param hosts [Array<String>] A list of hostname/IP mappings to add to the container's `hosts`
785
+ #
786
+ # @param image [String] The image name to use for the container
787
+ #
788
+ # @param init [Boolean, nil] Run an init inside the container that forwards signals and reaps
789
+ #
790
+ # @param isolation [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Isolation] Isolation technology of the containers running the service.
791
+ #
792
+ # @param labels [Hash{Symbol=>String}] User-defined key/value data.
793
+ #
794
+ # @param mounts [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount>] Specification for mounts to be added to containers created as part
795
+ #
796
+ # @param oom_score_adj [Integer] An integer value containing the score given to the container in
797
+ #
798
+ # @param open_stdin [Boolean] Open `stdin`
799
+ #
800
+ # @param privileges [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges] Security options for the container
801
+ #
802
+ # @param read_only [Boolean] Mount the container's root filesystem as read only.
803
+ #
804
+ # @param secrets [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret>] Secrets contains references to zero or more secrets that will be
805
+ #
806
+ # @param stop_grace_period [Integer] Amount of time to wait for the container to terminate before
807
+ #
808
+ # @param stop_signal [String] Signal to stop the container.
809
+ #
810
+ # @param sysctls [Hash{Symbol=>String}] Set kernel namedspaced parameters (sysctls) in the container.
811
+ #
812
+ # @param tty [Boolean] Whether a pseudo-TTY should be allocated.
813
+ #
814
+ # @param ulimits [Array<DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Ulimit>] A list of resource limits to set in the container. For example: `{"Name": "nofil
815
+ #
816
+ # @param user [String] The user inside the container.
817
+
818
+ class Config < DockerEngine::Internal::Type::BaseModel
819
+ # @!attribute config_id
820
+ # ConfigID represents the ID of the specific config that we're referencing.
821
+ #
822
+ # @return [String, nil]
823
+ optional :config_id, String, api_name: :ConfigID
824
+
825
+ # @!attribute config_name
826
+ # ConfigName is the name of the config that this references, but this is just
827
+ # provided for lookup/display purposes. The config in the reference will be
828
+ # identified by its ID.
829
+ #
830
+ # @return [String, nil]
831
+ optional :config_name, String, api_name: :ConfigName
832
+
833
+ # @!attribute file
834
+ # File represents a specific target that is backed by a file.
835
+ #
836
+ # <p><br /><p>
837
+ #
838
+ # > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
839
+ #
840
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config::File, nil]
841
+ optional :file,
842
+ -> {
843
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Config::File
844
+ },
845
+ api_name: :File
846
+
847
+ # @!attribute runtime
848
+ # Runtime represents a target that is not mounted into the container but is used
849
+ # by the task
850
+ #
851
+ # <p><br /><p>
852
+ #
853
+ # > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
854
+ #
855
+ # @return [Object, nil]
856
+ optional :runtime, DockerEngine::Internal::Type::Unknown, api_name: :Runtime
857
+
858
+ # @!method initialize(config_id: nil, config_name: nil, file: nil, runtime: nil)
859
+ # Some parameter documentations has been truncated, see
860
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config} for more
861
+ # details.
862
+ #
863
+ # @param config_id [String] ConfigID represents the ID of the specific config that we're
864
+ #
865
+ # @param config_name [String] ConfigName is the name of the config that this references,
866
+ #
867
+ # @param file [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config::File] File represents a specific target that is backed by a file.
868
+ #
869
+ # @param runtime [Object] Runtime represents a target that is not mounted into the
870
+
871
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config#file
872
+ class File < DockerEngine::Internal::Type::BaseModel
873
+ # @!attribute gid
874
+ # GID represents the file GID.
875
+ #
876
+ # @return [String, nil]
877
+ optional :gid, String, api_name: :GID
878
+
879
+ # @!attribute mode
880
+ # Mode represents the FileMode of the file.
881
+ #
882
+ # @return [Integer, nil]
883
+ optional :mode, Integer, api_name: :Mode
884
+
885
+ # @!attribute name
886
+ # Name represents the final filename in the filesystem.
887
+ #
888
+ # @return [String, nil]
889
+ optional :name, String, api_name: :Name
890
+
891
+ # @!attribute uid
892
+ # UID represents the file UID.
893
+ #
894
+ # @return [String, nil]
895
+ optional :uid, String, api_name: :UID
896
+
897
+ # @!method initialize(gid: nil, mode: nil, name: nil, uid: nil)
898
+ # Some parameter documentations has been truncated, see
899
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Config::File} for more
900
+ # details.
901
+ #
902
+ # File represents a specific target that is backed by a file.
903
+ #
904
+ # <p><br /><p>
905
+ #
906
+ # > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
907
+ #
908
+ # @param gid [String] GID represents the file GID.
909
+ #
910
+ # @param mode [Integer] Mode represents the FileMode of the file.
911
+ #
912
+ # @param name [String] Name represents the final filename in the filesystem.
913
+ #
914
+ # @param uid [String] UID represents the file UID.
915
+ end
916
+ end
917
+
918
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec#dns_config
919
+ class DNSConfig < DockerEngine::Internal::Type::BaseModel
920
+ # @!attribute nameservers
921
+ # The IP addresses of the name servers.
922
+ #
923
+ # @return [Array<String>, nil]
924
+ optional :nameservers, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Nameservers
925
+
926
+ # @!attribute options
927
+ # A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`,
928
+ # etc.).
929
+ #
930
+ # @return [Array<String>, nil]
931
+ optional :options, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Options
932
+
933
+ # @!attribute search
934
+ # A search list for host-name lookup.
935
+ #
936
+ # @return [Array<String>, nil]
937
+ optional :search, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Search
938
+
939
+ # @!method initialize(nameservers: nil, options: nil, search: nil)
940
+ # Some parameter documentations has been truncated, see
941
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::DNSConfig} for more
942
+ # details.
943
+ #
944
+ # Specification for DNS related configurations in resolver configuration file
945
+ # (`resolv.conf`).
946
+ #
947
+ # @param nameservers [Array<String>] The IP addresses of the name servers.
948
+ #
949
+ # @param options [Array<String>] A list of internal resolver variables to be modified (e.g.,
950
+ #
951
+ # @param search [Array<String>] A search list for host-name lookup.
952
+ end
953
+
954
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec#health_check
955
+ class HealthCheck < DockerEngine::Internal::Type::BaseModel
956
+ # @!attribute interval
957
+ # The time to wait between checks in nanoseconds. It should be 0 or at least
958
+ # 1000000 (1 ms). 0 means inherit.
959
+ #
960
+ # @return [Integer, nil]
961
+ optional :interval, Integer, api_name: :Interval
962
+
963
+ # @!attribute retries
964
+ # The number of consecutive failures needed to consider a container as unhealthy.
965
+ # 0 means inherit.
966
+ #
967
+ # @return [Integer, nil]
968
+ optional :retries, Integer, api_name: :Retries
969
+
970
+ # @!attribute start_interval
971
+ # The time to wait between checks in nanoseconds during the start period. It
972
+ # should be 0 or at least 1000000 (1 ms). 0 means inherit.
973
+ #
974
+ # @return [Integer, nil]
975
+ optional :start_interval, Integer, api_name: :StartInterval
976
+
977
+ # @!attribute start_period
978
+ # Start period for the container to initialize before starting health-retries
979
+ # countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means
980
+ # inherit.
981
+ #
982
+ # @return [Integer, nil]
983
+ optional :start_period, Integer, api_name: :StartPeriod
984
+
985
+ # @!attribute test_
986
+ # The test to perform. Possible values are:
987
+ #
988
+ # - `[]` inherit healthcheck from image or parent image
989
+ # - `["NONE"]` disable healthcheck
990
+ # - `["CMD", args...]` exec arguments directly
991
+ # - `["CMD-SHELL", command]` run command with system's default shell
992
+ #
993
+ # A non-zero exit code indicates a failed healthcheck:
994
+ #
995
+ # - `0` healthy
996
+ # - `1` unhealthy
997
+ # - `2` reserved (treated as unhealthy)
998
+ # - other values: error running probe
999
+ #
1000
+ # @return [Array<String>, nil]
1001
+ optional :test_, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Test
1002
+
1003
+ # @!attribute timeout
1004
+ # The time to wait before considering the check to have hung. It should be 0 or at
1005
+ # least 1000000 (1 ms). 0 means inherit.
1006
+ #
1007
+ # If the health check command does not complete within this timeout, the check is
1008
+ # considered failed and the health check process is forcibly terminated without a
1009
+ # graceful shutdown.
1010
+ #
1011
+ # @return [Integer, nil]
1012
+ optional :timeout, Integer, api_name: :Timeout
1013
+
1014
+ # @!method initialize(interval: nil, retries: nil, start_interval: nil, start_period: nil, test_: nil, timeout: nil)
1015
+ # Some parameter documentations has been truncated, see
1016
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::HealthCheck} for more
1017
+ # details.
1018
+ #
1019
+ # A test to perform to check that the container is healthy. Healthcheck commands
1020
+ # should be side-effect free.
1021
+ #
1022
+ # @param interval [Integer] The time to wait between checks in nanoseconds. It should be 0 or at
1023
+ #
1024
+ # @param retries [Integer] The number of consecutive failures needed to consider a container as
1025
+ #
1026
+ # @param start_interval [Integer] The time to wait between checks in nanoseconds during the start period.
1027
+ #
1028
+ # @param start_period [Integer] Start period for the container to initialize before starting
1029
+ #
1030
+ # @param test_ [Array<String>] The test to perform. Possible values are:
1031
+ #
1032
+ # @param timeout [Integer] The time to wait before considering the check to have hung. It should
1033
+ end
1034
+
1035
+ # Isolation technology of the containers running the service. (Windows only)
1036
+ #
1037
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec#isolation
1038
+ module Isolation
1039
+ extend DockerEngine::Internal::Type::Enum
1040
+
1041
+ DEFAULT = :default
1042
+ PROCESS = :process
1043
+ HYPERV = :hyperv
1044
+ EMPTY = :""
1045
+
1046
+ # @!method self.values
1047
+ # @return [Array<Symbol>]
1048
+ end
1049
+
1050
+ class Mount < DockerEngine::Internal::Type::BaseModel
1051
+ # @!attribute bind_options
1052
+ # Optional configuration for the `bind` type.
1053
+ #
1054
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions, nil]
1055
+ optional :bind_options,
1056
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions },
1057
+ api_name: :BindOptions
1058
+
1059
+ # @!attribute consistency
1060
+ # The consistency requirement for the mount: `default`, `consistent`, `cached`, or
1061
+ # `delegated`.
1062
+ #
1063
+ # @return [String, nil]
1064
+ optional :consistency, String, api_name: :Consistency
1065
+
1066
+ # @!attribute image_options
1067
+ # Optional configuration for the `image` type.
1068
+ #
1069
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::ImageOptions, nil]
1070
+ optional :image_options,
1071
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::ImageOptions },
1072
+ api_name: :ImageOptions
1073
+
1074
+ # @!attribute read_only
1075
+ # Whether the mount should be read-only.
1076
+ #
1077
+ # @return [Boolean, nil]
1078
+ optional :read_only, DockerEngine::Internal::Type::Boolean, api_name: :ReadOnly
1079
+
1080
+ # @!attribute source
1081
+ # Mount source (e.g. a volume name, a host path). The source cannot be specified
1082
+ # when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
1083
+ # the `CreateMountpoint` must be set to `true` to create the source path on the
1084
+ # host if missing.
1085
+ #
1086
+ # For `Type=npipe`, the pipe must exist prior to creating the container.
1087
+ #
1088
+ # @return [String, nil]
1089
+ optional :source, String, api_name: :Source
1090
+
1091
+ # @!attribute target
1092
+ # Container path.
1093
+ #
1094
+ # @return [String, nil]
1095
+ optional :target, String, api_name: :Target
1096
+
1097
+ # @!attribute tmpfs_options
1098
+ # Optional configuration for the `tmpfs` type.
1099
+ #
1100
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::TmpfsOptions, nil]
1101
+ optional :tmpfs_options,
1102
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::TmpfsOptions },
1103
+ api_name: :TmpfsOptions
1104
+
1105
+ # @!attribute type
1106
+ # The mount type. Available types:
1107
+ #
1108
+ # - `bind` a mount of a file or directory from the host into the container.
1109
+ # - `cluster` a Swarm cluster volume.
1110
+ # - `image` an OCI image.
1111
+ # - `npipe` a named pipe from the host into the container.
1112
+ # - `tmpfs` a `tmpfs`.
1113
+ # - `volume` a docker volume with the given `Name`.
1114
+ #
1115
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::Type, nil]
1116
+ optional :type,
1117
+ enum: -> {
1118
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::Type
1119
+ },
1120
+ api_name: :Type
1121
+
1122
+ # @!attribute volume_options
1123
+ # Optional configuration for the `volume` type.
1124
+ #
1125
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions, nil]
1126
+ optional :volume_options,
1127
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions },
1128
+ api_name: :VolumeOptions
1129
+
1130
+ # @!method initialize(bind_options: nil, consistency: nil, image_options: nil, read_only: nil, source: nil, target: nil, tmpfs_options: nil, type: nil, volume_options: nil)
1131
+ # Some parameter documentations has been truncated, see
1132
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount} for more
1133
+ # details.
1134
+ #
1135
+ # @param bind_options [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions] Optional configuration for the `bind` type.
1136
+ #
1137
+ # @param consistency [String] The consistency requirement for the mount: `default`, `consistent`, `cached`, or
1138
+ #
1139
+ # @param image_options [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::ImageOptions] Optional configuration for the `image` type.
1140
+ #
1141
+ # @param read_only [Boolean] Whether the mount should be read-only.
1142
+ #
1143
+ # @param source [String] Mount source (e.g. a volume name, a host path). The source cannot be
1144
+ #
1145
+ # @param target [String] Container path.
1146
+ #
1147
+ # @param tmpfs_options [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::TmpfsOptions] Optional configuration for the `tmpfs` type.
1148
+ #
1149
+ # @param type [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::Type] The mount type. Available types:
1150
+ #
1151
+ # @param volume_options [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions] Optional configuration for the `volume` type.
1152
+
1153
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount#bind_options
1154
+ class BindOptions < DockerEngine::Internal::Type::BaseModel
1155
+ # @!attribute create_mountpoint
1156
+ # Create mount point on host if missing
1157
+ #
1158
+ # @return [Boolean, nil]
1159
+ optional :create_mountpoint, DockerEngine::Internal::Type::Boolean, api_name: :CreateMountpoint
1160
+
1161
+ # @!attribute non_recursive
1162
+ # Disable recursive bind mount.
1163
+ #
1164
+ # @return [Boolean, nil]
1165
+ optional :non_recursive, DockerEngine::Internal::Type::Boolean, api_name: :NonRecursive
1166
+
1167
+ # @!attribute propagation
1168
+ # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
1169
+ #
1170
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions::Propagation, nil]
1171
+ optional :propagation,
1172
+ enum: -> {
1173
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions::Propagation
1174
+ },
1175
+ api_name: :Propagation
1176
+
1177
+ # @!attribute read_only_force_recursive
1178
+ # Raise an error if the mount cannot be made recursively read-only.
1179
+ #
1180
+ # @return [Boolean, nil]
1181
+ optional :read_only_force_recursive,
1182
+ DockerEngine::Internal::Type::Boolean,
1183
+ api_name: :ReadOnlyForceRecursive
1184
+
1185
+ # @!attribute read_only_non_recursive
1186
+ # Make the mount non-recursively read-only, but still leave the mount recursive
1187
+ # (unless NonRecursive is set to `true` in conjunction).
1188
+ #
1189
+ # Added in v1.44, before that version all read-only mounts were non-recursive by
1190
+ # default. To match the previous behaviour this will default to `true` for clients
1191
+ # on versions prior to v1.44.
1192
+ #
1193
+ # @return [Boolean, nil]
1194
+ optional :read_only_non_recursive,
1195
+ DockerEngine::Internal::Type::Boolean,
1196
+ api_name: :ReadOnlyNonRecursive
1197
+
1198
+ # @!method initialize(create_mountpoint: nil, non_recursive: nil, propagation: nil, read_only_force_recursive: nil, read_only_non_recursive: nil)
1199
+ # Some parameter documentations has been truncated, see
1200
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions}
1201
+ # for more details.
1202
+ #
1203
+ # Optional configuration for the `bind` type.
1204
+ #
1205
+ # @param create_mountpoint [Boolean] Create mount point on host if missing
1206
+ #
1207
+ # @param non_recursive [Boolean] Disable recursive bind mount.
1208
+ #
1209
+ # @param propagation [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions::Propagation] A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
1210
+ #
1211
+ # @param read_only_force_recursive [Boolean] Raise an error if the mount cannot be made recursively read-only.
1212
+ #
1213
+ # @param read_only_non_recursive [Boolean] Make the mount non-recursively read-only, but still leave the mount recursive
1214
+
1215
+ # A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
1216
+ #
1217
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::BindOptions#propagation
1218
+ module Propagation
1219
+ extend DockerEngine::Internal::Type::Enum
1220
+
1221
+ PRIVATE = :private
1222
+ RPRIVATE = :rprivate
1223
+ SHARED = :shared
1224
+ RSHARED = :rshared
1225
+ SLAVE = :slave
1226
+ RSLAVE = :rslave
1227
+
1228
+ # @!method self.values
1229
+ # @return [Array<Symbol>]
1230
+ end
1231
+ end
1232
+
1233
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount#image_options
1234
+ class ImageOptions < DockerEngine::Internal::Type::BaseModel
1235
+ # @!attribute subpath
1236
+ # Source path inside the image. Must be relative without any back traversals.
1237
+ #
1238
+ # @return [String, nil]
1239
+ optional :subpath, String, api_name: :Subpath
1240
+
1241
+ # @!method initialize(subpath: nil)
1242
+ # Optional configuration for the `image` type.
1243
+ #
1244
+ # @param subpath [String] Source path inside the image. Must be relative without any back traversals.
1245
+ end
1246
+
1247
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount#tmpfs_options
1248
+ class TmpfsOptions < DockerEngine::Internal::Type::BaseModel
1249
+ # @!attribute mode
1250
+ # The permission mode for the tmpfs mount in an integer. The value must not be in
1251
+ # octal format (e.g. 755) but rather the decimal representation of the octal value
1252
+ # (e.g. 493).
1253
+ #
1254
+ # @return [Integer, nil]
1255
+ optional :mode, Integer, api_name: :Mode
1256
+
1257
+ # @!attribute options
1258
+ # The options to be passed to the tmpfs mount. An array of arrays. Flag options
1259
+ # should be provided as 1-length arrays. Other types should be provided as as
1260
+ # 2-length arrays, where the first item is the key and the second the value.
1261
+ #
1262
+ # @return [Array<Array<String>>, nil]
1263
+ optional :options,
1264
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Internal::Type::ArrayOf[String]],
1265
+ api_name: :Options
1266
+
1267
+ # @!attribute size_bytes
1268
+ # The size for the tmpfs mount in bytes.
1269
+ #
1270
+ # @return [Integer, nil]
1271
+ optional :size_bytes, Integer, api_name: :SizeBytes
1272
+
1273
+ # @!method initialize(mode: nil, options: nil, size_bytes: nil)
1274
+ # Some parameter documentations has been truncated, see
1275
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::TmpfsOptions}
1276
+ # for more details.
1277
+ #
1278
+ # Optional configuration for the `tmpfs` type.
1279
+ #
1280
+ # @param mode [Integer] The permission mode for the tmpfs mount in an integer.
1281
+ #
1282
+ # @param options [Array<Array<String>>] The options to be passed to the tmpfs mount. An array of arrays.
1283
+ #
1284
+ # @param size_bytes [Integer] The size for the tmpfs mount in bytes.
1285
+ end
1286
+
1287
+ # The mount type. Available types:
1288
+ #
1289
+ # - `bind` a mount of a file or directory from the host into the container.
1290
+ # - `cluster` a Swarm cluster volume.
1291
+ # - `image` an OCI image.
1292
+ # - `npipe` a named pipe from the host into the container.
1293
+ # - `tmpfs` a `tmpfs`.
1294
+ # - `volume` a docker volume with the given `Name`.
1295
+ #
1296
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount#type
1297
+ module Type
1298
+ extend DockerEngine::Internal::Type::Enum
1299
+
1300
+ BIND = :bind
1301
+ CLUSTER = :cluster
1302
+ IMAGE = :image
1303
+ NPIPE = :npipe
1304
+ TMPFS = :tmpfs
1305
+ VOLUME = :volume
1306
+
1307
+ # @!method self.values
1308
+ # @return [Array<Symbol>]
1309
+ end
1310
+
1311
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount#volume_options
1312
+ class VolumeOptions < DockerEngine::Internal::Type::BaseModel
1313
+ # @!attribute driver_config
1314
+ # Map of driver specific options
1315
+ #
1316
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions::DriverConfig, nil]
1317
+ optional :driver_config,
1318
+ -> {
1319
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions::DriverConfig
1320
+ },
1321
+ api_name: :DriverConfig
1322
+
1323
+ # @!attribute labels
1324
+ # User-defined key/value metadata.
1325
+ #
1326
+ # @return [Hash{Symbol=>String}, nil]
1327
+ optional :labels, DockerEngine::Internal::Type::HashOf[String], api_name: :Labels
1328
+
1329
+ # @!attribute no_copy
1330
+ # Populate volume with data from the target.
1331
+ #
1332
+ # @return [Boolean, nil]
1333
+ optional :no_copy, DockerEngine::Internal::Type::Boolean, api_name: :NoCopy
1334
+
1335
+ # @!attribute subpath
1336
+ # Source path inside the volume. Must be relative without any back traversals.
1337
+ #
1338
+ # @return [String, nil]
1339
+ optional :subpath, String, api_name: :Subpath
1340
+
1341
+ # @!method initialize(driver_config: nil, labels: nil, no_copy: nil, subpath: nil)
1342
+ # Optional configuration for the `volume` type.
1343
+ #
1344
+ # @param driver_config [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions::DriverConfig] Map of driver specific options
1345
+ #
1346
+ # @param labels [Hash{Symbol=>String}] User-defined key/value metadata.
1347
+ #
1348
+ # @param no_copy [Boolean] Populate volume with data from the target.
1349
+ #
1350
+ # @param subpath [String] Source path inside the volume. Must be relative without any back traversals.
1351
+
1352
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Mount::VolumeOptions#driver_config
1353
+ class DriverConfig < DockerEngine::Internal::Type::BaseModel
1354
+ # @!attribute name
1355
+ # Name of the driver to use to create the volume.
1356
+ #
1357
+ # @return [String, nil]
1358
+ optional :name, String, api_name: :Name
1359
+
1360
+ # @!attribute options
1361
+ # key/value map of driver specific options.
1362
+ #
1363
+ # @return [Hash{Symbol=>String}, nil]
1364
+ optional :options, DockerEngine::Internal::Type::HashOf[String], api_name: :Options
1365
+
1366
+ # @!method initialize(name: nil, options: nil)
1367
+ # Map of driver specific options
1368
+ #
1369
+ # @param name [String] Name of the driver to use to create the volume.
1370
+ #
1371
+ # @param options [Hash{Symbol=>String}] key/value map of driver specific options.
1372
+ end
1373
+ end
1374
+ end
1375
+
1376
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec#privileges
1377
+ class Privileges < DockerEngine::Internal::Type::BaseModel
1378
+ # @!attribute app_armor
1379
+ # Options for configuring AppArmor on the container
1380
+ #
1381
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor, nil]
1382
+ optional :app_armor,
1383
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor },
1384
+ api_name: :AppArmor
1385
+
1386
+ # @!attribute credential_spec
1387
+ # CredentialSpec for managed service account (Windows only)
1388
+ #
1389
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::CredentialSpec, nil]
1390
+ optional :credential_spec,
1391
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::CredentialSpec },
1392
+ api_name: :CredentialSpec
1393
+
1394
+ # @!attribute no_new_privileges
1395
+ # Configuration of the no_new_privs bit in the container
1396
+ #
1397
+ # @return [Boolean, nil]
1398
+ optional :no_new_privileges, DockerEngine::Internal::Type::Boolean, api_name: :NoNewPrivileges
1399
+
1400
+ # @!attribute seccomp
1401
+ # Options for configuring seccomp on the container
1402
+ #
1403
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp, nil]
1404
+ optional :seccomp,
1405
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp },
1406
+ api_name: :Seccomp
1407
+
1408
+ # @!attribute se_linux_context
1409
+ # SELinux labels of the container
1410
+ #
1411
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::SeLinuxContext, nil]
1412
+ optional :se_linux_context,
1413
+ -> { DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::SeLinuxContext },
1414
+ api_name: :SELinuxContext
1415
+
1416
+ # @!method initialize(app_armor: nil, credential_spec: nil, no_new_privileges: nil, seccomp: nil, se_linux_context: nil)
1417
+ # Security options for the container
1418
+ #
1419
+ # @param app_armor [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor] Options for configuring AppArmor on the container
1420
+ #
1421
+ # @param credential_spec [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::CredentialSpec] CredentialSpec for managed service account (Windows only)
1422
+ #
1423
+ # @param no_new_privileges [Boolean] Configuration of the no_new_privs bit in the container
1424
+ #
1425
+ # @param seccomp [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp] Options for configuring seccomp on the container
1426
+ #
1427
+ # @param se_linux_context [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::SeLinuxContext] SELinux labels of the container
1428
+
1429
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges#app_armor
1430
+ class AppArmor < DockerEngine::Internal::Type::BaseModel
1431
+ # @!attribute mode
1432
+ #
1433
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor::Mode, nil]
1434
+ optional :mode,
1435
+ enum: -> {
1436
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor::Mode
1437
+ },
1438
+ api_name: :Mode
1439
+
1440
+ # @!method initialize(mode: nil)
1441
+ # Options for configuring AppArmor on the container
1442
+ #
1443
+ # @param mode [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor::Mode]
1444
+
1445
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::AppArmor#mode
1446
+ module Mode
1447
+ extend DockerEngine::Internal::Type::Enum
1448
+
1449
+ DEFAULT = :default
1450
+ DISABLED = :disabled
1451
+
1452
+ # @!method self.values
1453
+ # @return [Array<Symbol>]
1454
+ end
1455
+ end
1456
+
1457
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges#credential_spec
1458
+ class CredentialSpec < DockerEngine::Internal::Type::BaseModel
1459
+ # @!attribute config
1460
+ # Load credential spec from a Swarm Config with the given ID. The specified config
1461
+ # must also be present in the Configs field with the Runtime property set.
1462
+ #
1463
+ # <p><br /></p>
1464
+ #
1465
+ # > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and
1466
+ # > `CredentialSpec.Config` are mutually exclusive.
1467
+ #
1468
+ # @return [String, nil]
1469
+ optional :config, String, api_name: :Config
1470
+
1471
+ # @!attribute file
1472
+ # Load credential spec from this file. The file is read by the daemon, and must be
1473
+ # present in the `CredentialSpecs` subdirectory in the docker data directory,
1474
+ # which defaults to `C:\ProgramData\Docker\` on Windows.
1475
+ #
1476
+ # For example, specifying `spec.json` loads
1477
+ # `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
1478
+ #
1479
+ # <p><br /></p>
1480
+ #
1481
+ # > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and
1482
+ # > `CredentialSpec.Config` are mutually exclusive.
1483
+ #
1484
+ # @return [String, nil]
1485
+ optional :file, String, api_name: :File
1486
+
1487
+ # @!attribute registry
1488
+ # Load credential spec from this value in the Windows registry. The specified
1489
+ # registry value must be located in:
1490
+ #
1491
+ # `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
1492
+ #
1493
+ # <p><br /></p>
1494
+ #
1495
+ # > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, and
1496
+ # > `CredentialSpec.Config` are mutually exclusive.
1497
+ #
1498
+ # @return [String, nil]
1499
+ optional :registry, String, api_name: :Registry
1500
+
1501
+ # @!method initialize(config: nil, file: nil, registry: nil)
1502
+ # Some parameter documentations has been truncated, see
1503
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::CredentialSpec}
1504
+ # for more details.
1505
+ #
1506
+ # CredentialSpec for managed service account (Windows only)
1507
+ #
1508
+ # @param config [String] Load credential spec from a Swarm Config with the given ID.
1509
+ #
1510
+ # @param file [String] Load credential spec from this file. The file is read by
1511
+ #
1512
+ # @param registry [String] Load credential spec from this value in the Windows
1513
+ end
1514
+
1515
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges#seccomp
1516
+ class Seccomp < DockerEngine::Internal::Type::BaseModel
1517
+ # @!attribute mode
1518
+ #
1519
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp::Mode, nil]
1520
+ optional :mode,
1521
+ enum: -> {
1522
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp::Mode
1523
+ },
1524
+ api_name: :Mode
1525
+
1526
+ # @!attribute profile
1527
+ # The custom seccomp profile as a json object
1528
+ #
1529
+ # @return [String, nil]
1530
+ optional :profile, String, api_name: :Profile
1531
+
1532
+ # @!method initialize(mode: nil, profile: nil)
1533
+ # Options for configuring seccomp on the container
1534
+ #
1535
+ # @param mode [Symbol, DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp::Mode]
1536
+ #
1537
+ # @param profile [String] The custom seccomp profile as a json object
1538
+
1539
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges::Seccomp#mode
1540
+ module Mode
1541
+ extend DockerEngine::Internal::Type::Enum
1542
+
1543
+ DEFAULT = :default
1544
+ UNCONFINED = :unconfined
1545
+ CUSTOM = :custom
1546
+
1547
+ # @!method self.values
1548
+ # @return [Array<Symbol>]
1549
+ end
1550
+ end
1551
+
1552
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Privileges#se_linux_context
1553
+ class SeLinuxContext < DockerEngine::Internal::Type::BaseModel
1554
+ # @!attribute disable
1555
+ # Disable SELinux
1556
+ #
1557
+ # @return [Boolean, nil]
1558
+ optional :disable, DockerEngine::Internal::Type::Boolean, api_name: :Disable
1559
+
1560
+ # @!attribute level
1561
+ # SELinux level label
1562
+ #
1563
+ # @return [String, nil]
1564
+ optional :level, String, api_name: :Level
1565
+
1566
+ # @!attribute role
1567
+ # SELinux role label
1568
+ #
1569
+ # @return [String, nil]
1570
+ optional :role, String, api_name: :Role
1571
+
1572
+ # @!attribute type
1573
+ # SELinux type label
1574
+ #
1575
+ # @return [String, nil]
1576
+ optional :type, String, api_name: :Type
1577
+
1578
+ # @!attribute user
1579
+ # SELinux user label
1580
+ #
1581
+ # @return [String, nil]
1582
+ optional :user, String, api_name: :User
1583
+
1584
+ # @!method initialize(disable: nil, level: nil, role: nil, type: nil, user: nil)
1585
+ # SELinux labels of the container
1586
+ #
1587
+ # @param disable [Boolean] Disable SELinux
1588
+ #
1589
+ # @param level [String] SELinux level label
1590
+ #
1591
+ # @param role [String] SELinux role label
1592
+ #
1593
+ # @param type [String] SELinux type label
1594
+ #
1595
+ # @param user [String] SELinux user label
1596
+ end
1597
+ end
1598
+
1599
+ class Secret < DockerEngine::Internal::Type::BaseModel
1600
+ # @!attribute file
1601
+ # File represents a specific target that is backed by a file.
1602
+ #
1603
+ # @return [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret::File, nil]
1604
+ optional :file,
1605
+ -> {
1606
+ DockerEngine::Spec::TaskTemplate::ContainerSpec::Secret::File
1607
+ },
1608
+ api_name: :File
1609
+
1610
+ # @!attribute secret_id
1611
+ # SecretID represents the ID of the specific secret that we're referencing.
1612
+ #
1613
+ # @return [String, nil]
1614
+ optional :secret_id, String, api_name: :SecretID
1615
+
1616
+ # @!attribute secret_name
1617
+ # SecretName is the name of the secret that this references, but this is just
1618
+ # provided for lookup/display purposes. The secret in the reference will be
1619
+ # identified by its ID.
1620
+ #
1621
+ # @return [String, nil]
1622
+ optional :secret_name, String, api_name: :SecretName
1623
+
1624
+ # @!method initialize(file: nil, secret_id: nil, secret_name: nil)
1625
+ # Some parameter documentations has been truncated, see
1626
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret} for more
1627
+ # details.
1628
+ #
1629
+ # @param file [DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret::File] File represents a specific target that is backed by a file.
1630
+ #
1631
+ # @param secret_id [String] SecretID represents the ID of the specific secret that we're
1632
+ #
1633
+ # @param secret_name [String] SecretName is the name of the secret that this references,
1634
+
1635
+ # @see DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret#file
1636
+ class File < DockerEngine::Internal::Type::BaseModel
1637
+ # @!attribute gid
1638
+ # GID represents the file GID.
1639
+ #
1640
+ # @return [String, nil]
1641
+ optional :gid, String, api_name: :GID
1642
+
1643
+ # @!attribute mode
1644
+ # Mode represents the FileMode of the file.
1645
+ #
1646
+ # @return [Integer, nil]
1647
+ optional :mode, Integer, api_name: :Mode
1648
+
1649
+ # @!attribute name
1650
+ # Name represents the final filename in the filesystem.
1651
+ #
1652
+ # @return [String, nil]
1653
+ optional :name, String, api_name: :Name
1654
+
1655
+ # @!attribute uid
1656
+ # UID represents the file UID.
1657
+ #
1658
+ # @return [String, nil]
1659
+ optional :uid, String, api_name: :UID
1660
+
1661
+ # @!method initialize(gid: nil, mode: nil, name: nil, uid: nil)
1662
+ # Some parameter documentations has been truncated, see
1663
+ # {DockerEngine::Models::Spec::TaskTemplate::ContainerSpec::Secret::File} for more
1664
+ # details.
1665
+ #
1666
+ # File represents a specific target that is backed by a file.
1667
+ #
1668
+ # @param gid [String] GID represents the file GID.
1669
+ #
1670
+ # @param mode [Integer] Mode represents the FileMode of the file.
1671
+ #
1672
+ # @param name [String] Name represents the final filename in the filesystem.
1673
+ #
1674
+ # @param uid [String] UID represents the file UID.
1675
+ end
1676
+ end
1677
+
1678
+ class Ulimit < DockerEngine::Internal::Type::BaseModel
1679
+ # @!attribute hard
1680
+ # Hard limit
1681
+ #
1682
+ # @return [Integer, nil]
1683
+ optional :hard, Integer, api_name: :Hard
1684
+
1685
+ # @!attribute name
1686
+ # Name of ulimit
1687
+ #
1688
+ # @return [String, nil]
1689
+ optional :name, String, api_name: :Name
1690
+
1691
+ # @!attribute soft
1692
+ # Soft limit
1693
+ #
1694
+ # @return [Integer, nil]
1695
+ optional :soft, Integer, api_name: :Soft
1696
+
1697
+ # @!method initialize(hard: nil, name: nil, soft: nil)
1698
+ # @param hard [Integer] Hard limit
1699
+ #
1700
+ # @param name [String] Name of ulimit
1701
+ #
1702
+ # @param soft [Integer] Soft limit
1703
+ end
1704
+ end
1705
+
1706
+ # @see DockerEngine::Models::Spec::TaskTemplate#log_driver
1707
+ class LogDriver < DockerEngine::Internal::Type::BaseModel
1708
+ # @!attribute name
1709
+ #
1710
+ # @return [String, nil]
1711
+ optional :name, String, api_name: :Name
1712
+
1713
+ # @!attribute options
1714
+ #
1715
+ # @return [Hash{Symbol=>String}, nil]
1716
+ optional :options, DockerEngine::Internal::Type::HashOf[String], api_name: :Options
1717
+
1718
+ # @!method initialize(name: nil, options: nil)
1719
+ # Specifies the log driver to use for tasks created from this spec. If not
1720
+ # present, the default one for the swarm will be used, finally falling back to the
1721
+ # engine default if not specified.
1722
+ #
1723
+ # @param name [String]
1724
+ # @param options [Hash{Symbol=>String}]
1725
+ end
1726
+
1727
+ # @see DockerEngine::Models::Spec::TaskTemplate#network_attachment_spec
1728
+ class NetworkAttachmentSpec < DockerEngine::Internal::Type::BaseModel
1729
+ # @!attribute container_id
1730
+ # ID of the container represented by this task
1731
+ #
1732
+ # @return [String, nil]
1733
+ optional :container_id, String, api_name: :ContainerID
1734
+
1735
+ # @!method initialize(container_id: nil)
1736
+ # Read-only spec type for non-swarm containers attached to swarm overlay networks.
1737
+ #
1738
+ # <p><br /></p>
1739
+ #
1740
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
1741
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
1742
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
1743
+ #
1744
+ # @param container_id [String] ID of the container represented by this task
1745
+ end
1746
+
1747
+ class Network < DockerEngine::Internal::Type::BaseModel
1748
+ # @!attribute aliases
1749
+ # Discoverable alternate names for the service on this network.
1750
+ #
1751
+ # @return [Array<String>, nil]
1752
+ optional :aliases, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Aliases
1753
+
1754
+ # @!attribute driver_opts
1755
+ # Driver attachment options for the network target.
1756
+ #
1757
+ # @return [Hash{Symbol=>String}, nil]
1758
+ optional :driver_opts, DockerEngine::Internal::Type::HashOf[String], api_name: :DriverOpts
1759
+
1760
+ # @!attribute target
1761
+ # The target network for attachment. Must be a network name or ID.
1762
+ #
1763
+ # @return [String, nil]
1764
+ optional :target, String, api_name: :Target
1765
+
1766
+ # @!method initialize(aliases: nil, driver_opts: nil, target: nil)
1767
+ # Some parameter documentations has been truncated, see
1768
+ # {DockerEngine::Models::Spec::TaskTemplate::Network} for more details.
1769
+ #
1770
+ # Specifies how a service should be attached to a particular network.
1771
+ #
1772
+ # @param aliases [Array<String>] Discoverable alternate names for the service on this network.
1773
+ #
1774
+ # @param driver_opts [Hash{Symbol=>String}] Driver attachment options for the network target.
1775
+ #
1776
+ # @param target [String] The target network for attachment. Must be a network name or ID.
1777
+ end
1778
+
1779
+ # @see DockerEngine::Models::Spec::TaskTemplate#placement
1780
+ class Placement < DockerEngine::Internal::Type::BaseModel
1781
+ # @!attribute constraints
1782
+ # An array of constraint expressions to limit the set of nodes where a task can be
1783
+ # scheduled. Constraint expressions can either use a _match_ (`==`) or _exclude_
1784
+ # (`!=`) rule. Multiple constraints find nodes that satisfy every expression (AND
1785
+ # match). Constraints can match node or Docker Engine labels as follows:
1786
+ #
1787
+ # | node attribute | matches | example |
1788
+ # | -------------------- | ------------------------------ | --------------------------------------------- |
1789
+ # | `node.id` | Node ID | `node.id==2ivku8v2gvtg4` |
1790
+ # | `node.hostname` | Node hostname | `node.hostname!=node-2` |
1791
+ # | `node.role` | Node role (`manager`/`worker`) | `node.role==manager` |
1792
+ # | `node.platform.os` | Node operating system | `node.platform.os==windows` |
1793
+ # | `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` |
1794
+ # | `node.labels` | User-defined node labels | `node.labels.security==high` |
1795
+ # | `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` |
1796
+ #
1797
+ # `engine.labels` apply to Docker Engine labels like operating system, drivers,
1798
+ # etc. Swarm administrators add `node.labels` for operational purposes by using
1799
+ # the [`node update endpoint`](#operation/NodeUpdate).
1800
+ #
1801
+ # @return [Array<String>, nil]
1802
+ optional :constraints, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Constraints
1803
+
1804
+ # @!attribute max_replicas
1805
+ # Maximum number of replicas for per node (default value is 0, which is unlimited)
1806
+ #
1807
+ # @return [Integer, nil]
1808
+ optional :max_replicas, Integer, api_name: :MaxReplicas
1809
+
1810
+ # @!attribute platforms
1811
+ # Platforms stores all the platforms that the service's image can run on. This
1812
+ # field is used in the platform filter for scheduling. If empty, then the platform
1813
+ # filter is off, meaning there are no scheduling restrictions.
1814
+ #
1815
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::Placement::Platform>, nil]
1816
+ optional :platforms,
1817
+ -> {
1818
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::Placement::Platform]
1819
+ },
1820
+ api_name: :Platforms
1821
+
1822
+ # @!attribute preferences
1823
+ # Preferences provide a way to make the scheduler aware of factors such as
1824
+ # topology. They are provided in order from highest to lowest precedence.
1825
+ #
1826
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::Placement::Preference>, nil]
1827
+ optional :preferences,
1828
+ -> {
1829
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::Placement::Preference]
1830
+ },
1831
+ api_name: :Preferences
1832
+
1833
+ # @!method initialize(constraints: nil, max_replicas: nil, platforms: nil, preferences: nil)
1834
+ # Some parameter documentations has been truncated, see
1835
+ # {DockerEngine::Models::Spec::TaskTemplate::Placement} for more details.
1836
+ #
1837
+ # @param constraints [Array<String>] An array of constraint expressions to limit the set of nodes where
1838
+ #
1839
+ # @param max_replicas [Integer] Maximum number of replicas for per node (default value is 0, which
1840
+ #
1841
+ # @param platforms [Array<DockerEngine::Models::Spec::TaskTemplate::Placement::Platform>] Platforms stores all the platforms that the service's image can
1842
+ #
1843
+ # @param preferences [Array<DockerEngine::Models::Spec::TaskTemplate::Placement::Preference>] Preferences provide a way to make the scheduler aware of factors
1844
+
1845
+ class Platform < DockerEngine::Internal::Type::BaseModel
1846
+ # @!attribute architecture
1847
+ # Architecture represents the hardware architecture (for example, `x86_64`).
1848
+ #
1849
+ # @return [String, nil]
1850
+ optional :architecture, String, api_name: :Architecture
1851
+
1852
+ # @!attribute os
1853
+ # OS represents the Operating System (for example, `linux` or `windows`).
1854
+ #
1855
+ # @return [String, nil]
1856
+ optional :os, String, api_name: :OS
1857
+
1858
+ # @!method initialize(architecture: nil, os: nil)
1859
+ # Some parameter documentations has been truncated, see
1860
+ # {DockerEngine::Models::Spec::TaskTemplate::Placement::Platform} for more
1861
+ # details.
1862
+ #
1863
+ # Platform represents the platform (Arch/OS).
1864
+ #
1865
+ # @param architecture [String] Architecture represents the hardware architecture (for example,
1866
+ #
1867
+ # @param os [String] OS represents the Operating System (for example, `linux` or `windows`).
1868
+ end
1869
+
1870
+ class Preference < DockerEngine::Internal::Type::BaseModel
1871
+ # @!attribute spread
1872
+ #
1873
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Placement::Preference::Spread, nil]
1874
+ optional :spread,
1875
+ -> { DockerEngine::Spec::TaskTemplate::Placement::Preference::Spread },
1876
+ api_name: :Spread
1877
+
1878
+ # @!method initialize(spread: nil)
1879
+ # @param spread [DockerEngine::Models::Spec::TaskTemplate::Placement::Preference::Spread]
1880
+
1881
+ # @see DockerEngine::Models::Spec::TaskTemplate::Placement::Preference#spread
1882
+ class Spread < DockerEngine::Internal::Type::BaseModel
1883
+ # @!attribute spread_descriptor
1884
+ # label descriptor, such as `engine.labels.az`.
1885
+ #
1886
+ # @return [String, nil]
1887
+ optional :spread_descriptor, String, api_name: :SpreadDescriptor
1888
+
1889
+ # @!method initialize(spread_descriptor: nil)
1890
+ # Some parameter documentations has been truncated, see
1891
+ # {DockerEngine::Models::Spec::TaskTemplate::Placement::Preference::Spread} for
1892
+ # more details.
1893
+ #
1894
+ # @param spread_descriptor [String] label descriptor, such as `engine.labels.az`.
1895
+ end
1896
+ end
1897
+ end
1898
+
1899
+ # @see DockerEngine::Models::Spec::TaskTemplate#plugin_spec
1900
+ class PluginSpec < DockerEngine::Internal::Type::BaseModel
1901
+ # @!attribute disabled
1902
+ # Disable the plugin once scheduled.
1903
+ #
1904
+ # @return [Boolean, nil]
1905
+ optional :disabled, DockerEngine::Internal::Type::Boolean, api_name: :Disabled
1906
+
1907
+ # @!attribute name
1908
+ # The name or 'alias' to use for the plugin.
1909
+ #
1910
+ # @return [String, nil]
1911
+ optional :name, String, api_name: :Name
1912
+
1913
+ # @!attribute plugin_privilege
1914
+ #
1915
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::PluginSpec::PluginPrivilege>, nil]
1916
+ optional :plugin_privilege,
1917
+ -> {
1918
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::PluginSpec::PluginPrivilege]
1919
+ },
1920
+ api_name: :PluginPrivilege
1921
+
1922
+ # @!attribute remote
1923
+ # The plugin image reference to use.
1924
+ #
1925
+ # @return [String, nil]
1926
+ optional :remote, String, api_name: :Remote
1927
+
1928
+ # @!method initialize(disabled: nil, name: nil, plugin_privilege: nil, remote: nil)
1929
+ # Plugin spec for the service. _(Experimental release only.)_
1930
+ #
1931
+ # <p><br /></p>
1932
+ #
1933
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
1934
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
1935
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
1936
+ #
1937
+ # @param disabled [Boolean] Disable the plugin once scheduled.
1938
+ #
1939
+ # @param name [String] The name or 'alias' to use for the plugin.
1940
+ #
1941
+ # @param plugin_privilege [Array<DockerEngine::Models::Spec::TaskTemplate::PluginSpec::PluginPrivilege>]
1942
+ #
1943
+ # @param remote [String] The plugin image reference to use.
1944
+
1945
+ class PluginPrivilege < DockerEngine::Internal::Type::BaseModel
1946
+ # @!attribute description
1947
+ #
1948
+ # @return [String, nil]
1949
+ optional :description, String, api_name: :Description
1950
+
1951
+ # @!attribute name
1952
+ #
1953
+ # @return [String, nil]
1954
+ optional :name, String, api_name: :Name
1955
+
1956
+ # @!attribute value
1957
+ #
1958
+ # @return [Array<String>, nil]
1959
+ optional :value, DockerEngine::Internal::Type::ArrayOf[String], api_name: :Value
1960
+
1961
+ # @!method initialize(description: nil, name: nil, value: nil)
1962
+ # Describes a permission the user has to accept upon installing the plugin.
1963
+ #
1964
+ # @param description [String]
1965
+ # @param name [String]
1966
+ # @param value [Array<String>]
1967
+ end
1968
+ end
1969
+
1970
+ # @see DockerEngine::Models::Spec::TaskTemplate#resources
1971
+ class Resources < DockerEngine::Internal::Type::BaseModel
1972
+ # @!attribute limits
1973
+ # An object describing a limit on resources which can be requested by a task.
1974
+ #
1975
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Resources::Limits, nil]
1976
+ optional :limits, -> { DockerEngine::Spec::TaskTemplate::Resources::Limits }, api_name: :Limits
1977
+
1978
+ # @!attribute memory_swappiness
1979
+ # Tune the service's containers' memory swappiness (0 to 100). If not specified,
1980
+ # defaults to the containers' OS' default, generally 60, or whatever value was
1981
+ # predefined in the image. Set to -1 to unset a previously set value.
1982
+ #
1983
+ # @return [Integer, nil]
1984
+ optional :memory_swappiness, Integer, api_name: :MemorySwappiness, nil?: true
1985
+
1986
+ # @!attribute reservations
1987
+ # An object describing the resources which can be advertised by a node and
1988
+ # requested by a task.
1989
+ #
1990
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations, nil]
1991
+ optional :reservations,
1992
+ -> { DockerEngine::Spec::TaskTemplate::Resources::Reservations },
1993
+ api_name: :Reservations
1994
+
1995
+ # @!attribute swap_bytes
1996
+ # Amount of swap in bytes - can only be used together with a memory limit. If not
1997
+ # specified, the default behaviour is to grant a swap space twice as big as the
1998
+ # memory limit. Set to -1 to enable unlimited swap.
1999
+ #
2000
+ # @return [Integer, nil]
2001
+ optional :swap_bytes, Integer, api_name: :SwapBytes, nil?: true
2002
+
2003
+ # @!method initialize(limits: nil, memory_swappiness: nil, reservations: nil, swap_bytes: nil)
2004
+ # Some parameter documentations has been truncated, see
2005
+ # {DockerEngine::Models::Spec::TaskTemplate::Resources} for more details.
2006
+ #
2007
+ # Resource requirements which apply to each individual container created as part
2008
+ # of the service.
2009
+ #
2010
+ # @param limits [DockerEngine::Models::Spec::TaskTemplate::Resources::Limits] An object describing a limit on resources which can be requested by a task.
2011
+ #
2012
+ # @param memory_swappiness [Integer, nil] Tune the service's containers' memory swappiness (0 to 100).
2013
+ #
2014
+ # @param reservations [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations] An object describing the resources which can be advertised by a node and
2015
+ #
2016
+ # @param swap_bytes [Integer, nil] Amount of swap in bytes - can only be used together with a memory limit.
2017
+
2018
+ # @see DockerEngine::Models::Spec::TaskTemplate::Resources#limits
2019
+ class Limits < DockerEngine::Internal::Type::BaseModel
2020
+ # @!attribute memory_bytes
2021
+ #
2022
+ # @return [Integer, nil]
2023
+ optional :memory_bytes, Integer, api_name: :MemoryBytes
2024
+
2025
+ # @!attribute nano_cpus
2026
+ #
2027
+ # @return [Integer, nil]
2028
+ optional :nano_cpus, Integer, api_name: :NanoCPUs
2029
+
2030
+ # @!attribute pids
2031
+ # Limits the maximum number of PIDs in the container. Set `0` for unlimited.
2032
+ #
2033
+ # @return [Integer, nil]
2034
+ optional :pids, Integer, api_name: :Pids
2035
+
2036
+ # @!method initialize(memory_bytes: nil, nano_cpus: nil, pids: nil)
2037
+ # Some parameter documentations has been truncated, see
2038
+ # {DockerEngine::Models::Spec::TaskTemplate::Resources::Limits} for more details.
2039
+ #
2040
+ # An object describing a limit on resources which can be requested by a task.
2041
+ #
2042
+ # @param memory_bytes [Integer]
2043
+ #
2044
+ # @param nano_cpus [Integer]
2045
+ #
2046
+ # @param pids [Integer] Limits the maximum number of PIDs in the container. Set `0` for unlimited.
2047
+ end
2048
+
2049
+ # @see DockerEngine::Models::Spec::TaskTemplate::Resources#reservations
2050
+ class Reservations < DockerEngine::Internal::Type::BaseModel
2051
+ # @!attribute generic_resources
2052
+ # User-defined resources can be either Integer resources (e.g, `SSD=3`) or String
2053
+ # resources (e.g, `GPU=UUID1`).
2054
+ #
2055
+ # @return [Array<DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource>, nil]
2056
+ optional :generic_resources,
2057
+ -> {
2058
+ DockerEngine::Internal::Type::ArrayOf[DockerEngine::Spec::TaskTemplate::Resources::Reservations::GenericResource]
2059
+ },
2060
+ api_name: :GenericResources
2061
+
2062
+ # @!attribute memory_bytes
2063
+ #
2064
+ # @return [Integer, nil]
2065
+ optional :memory_bytes, Integer, api_name: :MemoryBytes
2066
+
2067
+ # @!attribute nano_cpus
2068
+ #
2069
+ # @return [Integer, nil]
2070
+ optional :nano_cpus, Integer, api_name: :NanoCPUs
2071
+
2072
+ # @!method initialize(generic_resources: nil, memory_bytes: nil, nano_cpus: nil)
2073
+ # Some parameter documentations has been truncated, see
2074
+ # {DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations} for more
2075
+ # details.
2076
+ #
2077
+ # An object describing the resources which can be advertised by a node and
2078
+ # requested by a task.
2079
+ #
2080
+ # @param generic_resources [Array<DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource>] User-defined resources can be either Integer resources (e.g, `SSD=3`) or
2081
+ #
2082
+ # @param memory_bytes [Integer]
2083
+ #
2084
+ # @param nano_cpus [Integer]
2085
+
2086
+ class GenericResource < DockerEngine::Internal::Type::BaseModel
2087
+ # @!attribute discrete_resource_spec
2088
+ #
2089
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource::DiscreteResourceSpec, nil]
2090
+ optional :discrete_resource_spec,
2091
+ -> {
2092
+ DockerEngine::Spec::TaskTemplate::Resources::Reservations::GenericResource::DiscreteResourceSpec
2093
+ },
2094
+ api_name: :DiscreteResourceSpec
2095
+
2096
+ # @!attribute named_resource_spec
2097
+ #
2098
+ # @return [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource::NamedResourceSpec, nil]
2099
+ optional :named_resource_spec,
2100
+ -> {
2101
+ DockerEngine::Spec::TaskTemplate::Resources::Reservations::GenericResource::NamedResourceSpec
2102
+ },
2103
+ api_name: :NamedResourceSpec
2104
+
2105
+ # @!method initialize(discrete_resource_spec: nil, named_resource_spec: nil)
2106
+ # @param discrete_resource_spec [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource::DiscreteResourceSpec]
2107
+ # @param named_resource_spec [DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource::NamedResourceSpec]
2108
+
2109
+ # @see DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource#discrete_resource_spec
2110
+ class DiscreteResourceSpec < DockerEngine::Internal::Type::BaseModel
2111
+ # @!attribute kind
2112
+ #
2113
+ # @return [String, nil]
2114
+ optional :kind, String, api_name: :Kind
2115
+
2116
+ # @!attribute value
2117
+ #
2118
+ # @return [Integer, nil]
2119
+ optional :value, Integer, api_name: :Value
2120
+
2121
+ # @!method initialize(kind: nil, value: nil)
2122
+ # @param kind [String]
2123
+ # @param value [Integer]
2124
+ end
2125
+
2126
+ # @see DockerEngine::Models::Spec::TaskTemplate::Resources::Reservations::GenericResource#named_resource_spec
2127
+ class NamedResourceSpec < DockerEngine::Internal::Type::BaseModel
2128
+ # @!attribute kind
2129
+ #
2130
+ # @return [String, nil]
2131
+ optional :kind, String, api_name: :Kind
2132
+
2133
+ # @!attribute value
2134
+ #
2135
+ # @return [String, nil]
2136
+ optional :value, String, api_name: :Value
2137
+
2138
+ # @!method initialize(kind: nil, value: nil)
2139
+ # @param kind [String]
2140
+ # @param value [String]
2141
+ end
2142
+ end
2143
+ end
2144
+ end
2145
+
2146
+ # @see DockerEngine::Models::Spec::TaskTemplate#restart_policy
2147
+ class RestartPolicy < DockerEngine::Internal::Type::BaseModel
2148
+ # @!attribute condition
2149
+ # Condition for restart.
2150
+ #
2151
+ # @return [Symbol, DockerEngine::Models::Spec::TaskTemplate::RestartPolicy::Condition, nil]
2152
+ optional :condition,
2153
+ enum: -> { DockerEngine::Spec::TaskTemplate::RestartPolicy::Condition },
2154
+ api_name: :Condition
2155
+
2156
+ # @!attribute delay
2157
+ # Delay between restart attempts.
2158
+ #
2159
+ # @return [Integer, nil]
2160
+ optional :delay, Integer, api_name: :Delay
2161
+
2162
+ # @!attribute max_attempts
2163
+ # Maximum attempts to restart a given container before giving up (default value is
2164
+ # 0, which is ignored).
2165
+ #
2166
+ # @return [Integer, nil]
2167
+ optional :max_attempts, Integer, api_name: :MaxAttempts
2168
+
2169
+ # @!attribute window
2170
+ # Windows is the time window used to evaluate the restart policy (default value is
2171
+ # 0, which is unbounded).
2172
+ #
2173
+ # @return [Integer, nil]
2174
+ optional :window, Integer, api_name: :Window
2175
+
2176
+ # @!method initialize(condition: nil, delay: nil, max_attempts: nil, window: nil)
2177
+ # Some parameter documentations has been truncated, see
2178
+ # {DockerEngine::Models::Spec::TaskTemplate::RestartPolicy} for more details.
2179
+ #
2180
+ # Specification for the restart policy which applies to containers created as part
2181
+ # of this service.
2182
+ #
2183
+ # @param condition [Symbol, DockerEngine::Models::Spec::TaskTemplate::RestartPolicy::Condition] Condition for restart.
2184
+ #
2185
+ # @param delay [Integer] Delay between restart attempts.
2186
+ #
2187
+ # @param max_attempts [Integer] Maximum attempts to restart a given container before giving up
2188
+ #
2189
+ # @param window [Integer] Windows is the time window used to evaluate the restart policy
2190
+
2191
+ # Condition for restart.
2192
+ #
2193
+ # @see DockerEngine::Models::Spec::TaskTemplate::RestartPolicy#condition
2194
+ module Condition
2195
+ extend DockerEngine::Internal::Type::Enum
2196
+
2197
+ NONE = :none
2198
+ ON_FAILURE = :"on-failure"
2199
+ ANY = :any
2200
+
2201
+ # @!method self.values
2202
+ # @return [Array<Symbol>]
2203
+ end
2204
+ end
2205
+ end
2206
+
2207
+ # @see DockerEngine::Models::Spec#update_config
2208
+ class UpdateConfig < DockerEngine::Internal::Type::BaseModel
2209
+ # @!attribute delay
2210
+ # Amount of time between updates, in nanoseconds.
2211
+ #
2212
+ # @return [Integer, nil]
2213
+ optional :delay, Integer, api_name: :Delay
2214
+
2215
+ # @!attribute failure_action
2216
+ # Action to take if an updated task fails to run, or stops running during the
2217
+ # update.
2218
+ #
2219
+ # @return [Symbol, DockerEngine::Models::Spec::UpdateConfig::FailureAction, nil]
2220
+ optional :failure_action,
2221
+ enum: -> { DockerEngine::Spec::UpdateConfig::FailureAction },
2222
+ api_name: :FailureAction
2223
+
2224
+ # @!attribute max_failure_ratio
2225
+ # The fraction of tasks that may fail during an update before the failure action
2226
+ # is invoked, specified as a floating point number between 0 and 1.
2227
+ #
2228
+ # @return [Float, nil]
2229
+ optional :max_failure_ratio, Float, api_name: :MaxFailureRatio
2230
+
2231
+ # @!attribute monitor
2232
+ # Amount of time to monitor each updated task for failures, in nanoseconds.
2233
+ #
2234
+ # @return [Integer, nil]
2235
+ optional :monitor, Integer, api_name: :Monitor
2236
+
2237
+ # @!attribute order
2238
+ # The order of operations when rolling out an updated task. Either the old task is
2239
+ # shut down before the new task is started, or the new task is started before the
2240
+ # old task is shut down.
2241
+ #
2242
+ # @return [Symbol, DockerEngine::Models::Spec::UpdateConfig::Order, nil]
2243
+ optional :order, enum: -> { DockerEngine::Spec::UpdateConfig::Order }, api_name: :Order
2244
+
2245
+ # @!attribute parallelism
2246
+ # Maximum number of tasks to be updated in one iteration (0 means unlimited
2247
+ # parallelism).
2248
+ #
2249
+ # @return [Integer, nil]
2250
+ optional :parallelism, Integer, api_name: :Parallelism
2251
+
2252
+ # @!method initialize(delay: nil, failure_action: nil, max_failure_ratio: nil, monitor: nil, order: nil, parallelism: nil)
2253
+ # Some parameter documentations has been truncated, see
2254
+ # {DockerEngine::Models::Spec::UpdateConfig} for more details.
2255
+ #
2256
+ # Specification for the update strategy of the service.
2257
+ #
2258
+ # @param delay [Integer] Amount of time between updates, in nanoseconds.
2259
+ #
2260
+ # @param failure_action [Symbol, DockerEngine::Models::Spec::UpdateConfig::FailureAction] Action to take if an updated task fails to run, or stops running
2261
+ #
2262
+ # @param max_failure_ratio [Float] The fraction of tasks that may fail during an update before the
2263
+ #
2264
+ # @param monitor [Integer] Amount of time to monitor each updated task for failures, in
2265
+ #
2266
+ # @param order [Symbol, DockerEngine::Models::Spec::UpdateConfig::Order] The order of operations when rolling out an updated task. Either
2267
+ #
2268
+ # @param parallelism [Integer] Maximum number of tasks to be updated in one iteration (0 means
2269
+
2270
+ # Action to take if an updated task fails to run, or stops running during the
2271
+ # update.
2272
+ #
2273
+ # @see DockerEngine::Models::Spec::UpdateConfig#failure_action
2274
+ module FailureAction
2275
+ extend DockerEngine::Internal::Type::Enum
2276
+
2277
+ CONTINUE = :continue
2278
+ PAUSE = :pause
2279
+ ROLLBACK = :rollback
2280
+
2281
+ # @!method self.values
2282
+ # @return [Array<Symbol>]
2283
+ end
2284
+
2285
+ # The order of operations when rolling out an updated task. Either the old task is
2286
+ # shut down before the new task is started, or the new task is started before the
2287
+ # old task is shut down.
2288
+ #
2289
+ # @see DockerEngine::Models::Spec::UpdateConfig#order
2290
+ module Order
2291
+ extend DockerEngine::Internal::Type::Enum
2292
+
2293
+ STOP_FIRST = :"stop-first"
2294
+ START_FIRST = :"start-first"
2295
+
2296
+ # @!method self.values
2297
+ # @return [Array<Symbol>]
2298
+ end
2299
+ end
2300
+ end
2301
+ end
2302
+ end