aws-sdk-ecs 1.0.0.rc1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eb0a202214605f71e5d136add6c9280e9992d8b5
4
+ data.tar.gz: c6e5cb9eddac0917849c87037c314594371565e2
5
+ SHA512:
6
+ metadata.gz: f94d058a86d0d2f623bcf68d103f633de800ce5cac25501f4e0aacb035c3353d72f9dda1b94c6bad83b690e1aafd65b96c93a51c8e3180150658f028ba1ef716
7
+ data.tar.gz: 9e569344d5f10a739cac5a4dbbecb0bfd461ba26efb8de7b71ce1999fa13a6ad4e962efc628760bd26eab9e19452ef849502183ecb3d487bab2fb1b97f2f9239
@@ -0,0 +1,48 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-ecs/types'
12
+ require_relative 'aws-sdk-ecs/client_api'
13
+ require_relative 'aws-sdk-ecs/client'
14
+ require_relative 'aws-sdk-ecs/errors'
15
+ require_relative 'aws-sdk-ecs/waiters'
16
+ require_relative 'aws-sdk-ecs/resource'
17
+ require_relative 'aws-sdk-ecs/customizations'
18
+
19
+ # This module provides support for Amazon EC2 Container Service. This module is available in the
20
+ # `aws-sdk-ecs` gem.
21
+ #
22
+ # # Client
23
+ #
24
+ # The {Client} class provides one method for each API operation. Operation
25
+ # methods each accept a hash of request parameters and return a response
26
+ # structure.
27
+ #
28
+ # See {Client} for more information.
29
+ #
30
+ # # Errors
31
+ #
32
+ # Errors returned from Amazon EC2 Container Service all
33
+ # extend {Errors::ServiceError}.
34
+ #
35
+ # begin
36
+ # # do stuff
37
+ # rescue Aws::ECS::Errors::ServiceError
38
+ # # rescues all service API errors
39
+ # end
40
+ #
41
+ # See {Errors} for more information.
42
+ #
43
+ # @service
44
+ module Aws::ECS
45
+
46
+ GEM_VERSION = '1.0.0.rc1'
47
+
48
+ end
@@ -0,0 +1,2459 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing for info on making contributions:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ecs)
25
+
26
+ module Aws
27
+ module ECS
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :ecs
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::SignatureV4)
50
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
+
52
+ # @option options [required, Aws::CredentialProvider] :credentials
53
+ # Your AWS credentials. This can be an instance of any one of the
54
+ # following classes:
55
+ #
56
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
+ # credentials.
58
+ #
59
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
+ # from an EC2 IMDS on an EC2 instance.
61
+ #
62
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
63
+ # shared file, such as `~/.aws/config`.
64
+ #
65
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
+ #
67
+ # When `:credentials` are not configured directly, the following
68
+ # locations will be searched for credentials:
69
+ #
70
+ # * `Aws.config[:credentials]`
71
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
+ # * `~/.aws/credentials`
74
+ # * `~/.aws/config`
75
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
76
+ # very aggressive. Construct and pass an instance of
77
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
78
+ # timeouts.
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ # @option options [String] :access_key_id
91
+ # @option options [Boolean] :convert_params (true)
92
+ # When `true`, an attempt is made to coerce request parameters into
93
+ # the required types.
94
+ # @option options [String] :endpoint
95
+ # The client endpoint is normally constructed from the `:region`
96
+ # option. You should only configure an `:endpoint` when connecting
97
+ # to test endpoints. This should be avalid HTTP(S) URI.
98
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
+ # The log formatter.
100
+ # @option options [Symbol] :log_level (:info)
101
+ # The log level to send messages to the `:logger` at.
102
+ # @option options [Logger] :logger
103
+ # The Logger instance to send log messages to. If this option
104
+ # is not set, logging will be disabled.
105
+ # @option options [String] :profile ("default")
106
+ # Used when loading credentials from the shared credentials file
107
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
108
+ # @option options [Integer] :retry_limit (3)
109
+ # The maximum number of times to retry failed requests. Only
110
+ # ~ 500 level server errors and certain ~ 400 level client errors
111
+ # are retried. Generally, these are throttling errors, data
112
+ # checksum errors, networking errors, timeout errors and auth
113
+ # errors from expired credentials.
114
+ # @option options [String] :secret_access_key
115
+ # @option options [String] :session_token
116
+ # @option options [Boolean] :simple_json (false)
117
+ # Disables request parameter conversion, validation, and formatting.
118
+ # Also disable response data type conversions. This option is useful
119
+ # when you want to ensure the highest level of performance by
120
+ # avoiding overhead of walking request parameters and response data
121
+ # structures.
122
+ #
123
+ # When `:simple_json` is enabled, the request parameters hash must
124
+ # be formatted exactly as the DynamoDB API expects.
125
+ # @option options [Boolean] :stub_responses (false)
126
+ # Causes the client to return stubbed responses. By default
127
+ # fake responses are generated and returned. You can specify
128
+ # the response data to return or errors to raise by calling
129
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
+ #
131
+ # ** Please note ** When response stubbing is enabled, no HTTP
132
+ # requests are made, and retries are disabled.
133
+ # @option options [Boolean] :validate_params (true)
134
+ # When `true`, request parameters are validated before
135
+ # sending the request.
136
+ def initialize(*args)
137
+ super
138
+ end
139
+
140
+ # @!group API Operations
141
+
142
+ # Creates a new Amazon ECS cluster. By default, your account receives a
143
+ # `default` cluster when you launch your first container instance.
144
+ # However, you can create your own cluster with a unique name with the
145
+ # `CreateCluster` action.
146
+ # @option params [String] :cluster_name
147
+ # The name of your cluster. If you do not specify a name for your
148
+ # cluster, you create a cluster named `default`. Up to 255 letters
149
+ # (uppercase and lowercase), numbers, hyphens, and underscores are
150
+ # allowed.
151
+ # @return [Types::CreateClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
152
+ #
153
+ # * {Types::CreateClusterResponse#cluster #cluster} => Types::Cluster
154
+ #
155
+ # @example Request syntax with placeholder values
156
+ # resp = client.create_cluster({
157
+ # cluster_name: "String",
158
+ # })
159
+ #
160
+ # @example Response structure
161
+ # resp.cluster.cluster_arn #=> String
162
+ # resp.cluster.cluster_name #=> String
163
+ # resp.cluster.status #=> String
164
+ # resp.cluster.registered_container_instances_count #=> Integer
165
+ # resp.cluster.running_tasks_count #=> Integer
166
+ # resp.cluster.pending_tasks_count #=> Integer
167
+ # resp.cluster.active_services_count #=> Integer
168
+ # @overload create_cluster(params = {})
169
+ # @param [Hash] params ({})
170
+ def create_cluster(params = {}, options = {})
171
+ req = build_request(:create_cluster, params)
172
+ req.send_request(options)
173
+ end
174
+
175
+ # Runs and maintains a desired number of tasks from a specified task
176
+ # definition. If the number of tasks running in a service drops below
177
+ # `desiredCount`, Amazon ECS spawns another copy of the task in the
178
+ # specified cluster. To update an existing service, see UpdateService.
179
+ #
180
+ # In addition to maintaining the desired count of tasks in your service,
181
+ # you can optionally run your service behind a load balancer. The load
182
+ # balancer distributes traffic across the tasks that are associated with
183
+ # the service. For more information, see [Service Load Balancing][1] in
184
+ # the *Amazon EC2 Container Service Developer Guide*.
185
+ #
186
+ # You can optionally specify a deployment configuration for your
187
+ # service. During a deployment (which is triggered by changing the task
188
+ # definition or the desired count of a service with an UpdateService
189
+ # operation), the service scheduler uses the `minimumHealthyPercent` and
190
+ # `maximumPercent` parameters to determine the deployment strategy.
191
+ #
192
+ # The `minimumHealthyPercent` represents a lower limit on the number of
193
+ # your service's tasks that must remain in the `RUNNING` state during a
194
+ # deployment, as a percentage of the `desiredCount` (rounded up to the
195
+ # nearest integer). This parameter enables you to deploy without using
196
+ # additional cluster capacity. For example, if your service has a
197
+ # `desiredCount` of four tasks and a `minimumHealthyPercent` of 50%, the
198
+ # scheduler may stop two existing tasks to free up cluster capacity
199
+ # before starting two new tasks. Tasks for services that *do not* use a
200
+ # load balancer are considered healthy if they are in the `RUNNING`
201
+ # state; tasks for services that *do* use a load balancer are considered
202
+ # healthy if they are in the `RUNNING` state and the container instance
203
+ # it is hosted on is reported as healthy by the load balancer. The
204
+ # default value for `minimumHealthyPercent` is 50% in the console and
205
+ # 100% for the AWS CLI, the AWS SDKs, and the APIs.
206
+ #
207
+ # The `maximumPercent` parameter represents an upper limit on the number
208
+ # of your service's tasks that are allowed in the `RUNNING` or
209
+ # `PENDING` state during a deployment, as a percentage of the
210
+ # `desiredCount` (rounded down to the nearest integer). This parameter
211
+ # enables you to define the deployment batch size. For example, if your
212
+ # service has a `desiredCount` of four tasks and a `maximumPercent`
213
+ # value of 200%, the scheduler may start four new tasks before stopping
214
+ # the four older tasks (provided that the cluster resources required to
215
+ # do this are available). The default value for `maximumPercent` is
216
+ # 200%.
217
+ #
218
+ # When the service scheduler launches new tasks, it attempts to balance
219
+ # them across the Availability Zones in your cluster with the following
220
+ # logic:
221
+ #
222
+ # * Determine which of the container instances in your cluster can
223
+ # support your service's task definition (for example, they have the
224
+ # required CPU, memory, ports, and container instance attributes).
225
+ #
226
+ # * Sort the valid container instances by the fewest number of running
227
+ # tasks for this service in the same Availability Zone as the
228
+ # instance. For example, if zone A has one running service task and
229
+ # zones B and C each have zero, valid container instances in either
230
+ # zone B or C are considered optimal for placement.
231
+ #
232
+ # * Place the new service task on a valid container instance in an
233
+ # optimal Availability Zone (based on the previous steps), favoring
234
+ # container instances with the fewest number of running tasks for this
235
+ # service.
236
+ #
237
+ #
238
+ #
239
+ # [1]: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html
240
+ # @option params [String] :cluster
241
+ # The short name or full Amazon Resource Name (ARN) of the cluster on
242
+ # which to run your service. If you do not specify a cluster, the
243
+ # default cluster is assumed.
244
+ # @option params [required, String] :service_name
245
+ # The name of your service. Up to 255 letters (uppercase and lowercase),
246
+ # numbers, hyphens, and underscores are allowed. Service names must be
247
+ # unique within a cluster, but you can have similarly named services in
248
+ # multiple clusters within a region or across multiple regions.
249
+ # @option params [required, String] :task_definition
250
+ # The `family` and `revision` (`family:revision`) or full Amazon
251
+ # Resource Name (ARN) of the task definition to run in your service. If
252
+ # a `revision` is not specified, the latest `ACTIVE` revision is used.
253
+ # @option params [Array<Types::LoadBalancer>] :load_balancers
254
+ # A load balancer object representing the load balancer to use with your
255
+ # service. Currently, you are limited to one load balancer per service.
256
+ # After you create a service, the load balancer name, container name,
257
+ # and container port specified in the service definition are immutable.
258
+ #
259
+ # For Elastic Load Balancing Classic load balancers, this object must
260
+ # contain the load balancer name, the container name (as it appears in a
261
+ # container definition), and the container port to access from the load
262
+ # balancer. When a task from this service is placed on a container
263
+ # instance, the container instance is registered with the load balancer
264
+ # specified here.
265
+ #
266
+ # For Elastic Load Balancing Application load balancers, this object
267
+ # must contain the load balancer target group ARN, the container name
268
+ # (as it appears in a container definition), and the container port to
269
+ # access from the load balancer. When a task from this service is placed
270
+ # on a container instance, the container instance and port combination
271
+ # is registered as a target in the target group specified here.
272
+ # @option params [required, Integer] :desired_count
273
+ # The number of instantiations of the specified task definition to place
274
+ # and keep running on your cluster.
275
+ # @option params [String] :client_token
276
+ # Unique, case-sensitive identifier you provide to ensure the
277
+ # idempotency of the request. Up to 32 ASCII characters are allowed.
278
+ # @option params [String] :role
279
+ # The name or full Amazon Resource Name (ARN) of the IAM role that
280
+ # allows Amazon ECS to make calls to your load balancer on your behalf.
281
+ # This parameter is required if you are using a load balancer with your
282
+ # service. If you specify the `role` parameter, you must also specify a
283
+ # load balancer object with the `loadBalancers` parameter.
284
+ #
285
+ # If your specified role has a path other than `/`, then you must either
286
+ # specify the full role ARN (this is recommended) or prefix the role
287
+ # name with the path. For example, if a role with the name `bar` has a
288
+ # path of `/foo/` then you would specify `/foo/bar` as the role name.
289
+ # For more information, see [Friendly Names and Paths][1] in the *IAM
290
+ # User Guide*.
291
+ #
292
+ #
293
+ #
294
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names
295
+ # @option params [Types::DeploymentConfiguration] :deployment_configuration
296
+ # Optional deployment parameters that control how many tasks run during
297
+ # the deployment and the ordering of stopping and starting tasks.
298
+ # @return [Types::CreateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
299
+ #
300
+ # * {Types::CreateServiceResponse#service #service} => Types::Service
301
+ #
302
+ # @example Request syntax with placeholder values
303
+ # resp = client.create_service({
304
+ # cluster: "String",
305
+ # service_name: "String", # required
306
+ # task_definition: "String", # required
307
+ # load_balancers: [
308
+ # {
309
+ # target_group_arn: "String",
310
+ # load_balancer_name: "String",
311
+ # container_name: "String",
312
+ # container_port: 1,
313
+ # },
314
+ # ],
315
+ # desired_count: 1, # required
316
+ # client_token: "String",
317
+ # role: "String",
318
+ # deployment_configuration: {
319
+ # maximum_percent: 1,
320
+ # minimum_healthy_percent: 1,
321
+ # },
322
+ # })
323
+ #
324
+ # @example Response structure
325
+ # resp.service.service_arn #=> String
326
+ # resp.service.service_name #=> String
327
+ # resp.service.cluster_arn #=> String
328
+ # resp.service.load_balancers #=> Array
329
+ # resp.service.load_balancers[0].target_group_arn #=> String
330
+ # resp.service.load_balancers[0].load_balancer_name #=> String
331
+ # resp.service.load_balancers[0].container_name #=> String
332
+ # resp.service.load_balancers[0].container_port #=> Integer
333
+ # resp.service.status #=> String
334
+ # resp.service.desired_count #=> Integer
335
+ # resp.service.running_count #=> Integer
336
+ # resp.service.pending_count #=> Integer
337
+ # resp.service.task_definition #=> String
338
+ # resp.service.deployment_configuration.maximum_percent #=> Integer
339
+ # resp.service.deployment_configuration.minimum_healthy_percent #=> Integer
340
+ # resp.service.deployments #=> Array
341
+ # resp.service.deployments[0].id #=> String
342
+ # resp.service.deployments[0].status #=> String
343
+ # resp.service.deployments[0].task_definition #=> String
344
+ # resp.service.deployments[0].desired_count #=> Integer
345
+ # resp.service.deployments[0].pending_count #=> Integer
346
+ # resp.service.deployments[0].running_count #=> Integer
347
+ # resp.service.deployments[0].created_at #=> Time
348
+ # resp.service.deployments[0].updated_at #=> Time
349
+ # resp.service.role_arn #=> String
350
+ # resp.service.events #=> Array
351
+ # resp.service.events[0].id #=> String
352
+ # resp.service.events[0].created_at #=> Time
353
+ # resp.service.events[0].message #=> String
354
+ # resp.service.created_at #=> Time
355
+ # @overload create_service(params = {})
356
+ # @param [Hash] params ({})
357
+ def create_service(params = {}, options = {})
358
+ req = build_request(:create_service, params)
359
+ req.send_request(options)
360
+ end
361
+
362
+ # Deletes the specified cluster. You must deregister all container
363
+ # instances from this cluster before you may delete it. You can list the
364
+ # container instances in a cluster with ListContainerInstances and
365
+ # deregister them with DeregisterContainerInstance.
366
+ # @option params [required, String] :cluster
367
+ # The short name or full Amazon Resource Name (ARN) of the cluster to
368
+ # delete.
369
+ # @return [Types::DeleteClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
370
+ #
371
+ # * {Types::DeleteClusterResponse#cluster #cluster} => Types::Cluster
372
+ #
373
+ # @example Request syntax with placeholder values
374
+ # resp = client.delete_cluster({
375
+ # cluster: "String", # required
376
+ # })
377
+ #
378
+ # @example Response structure
379
+ # resp.cluster.cluster_arn #=> String
380
+ # resp.cluster.cluster_name #=> String
381
+ # resp.cluster.status #=> String
382
+ # resp.cluster.registered_container_instances_count #=> Integer
383
+ # resp.cluster.running_tasks_count #=> Integer
384
+ # resp.cluster.pending_tasks_count #=> Integer
385
+ # resp.cluster.active_services_count #=> Integer
386
+ # @overload delete_cluster(params = {})
387
+ # @param [Hash] params ({})
388
+ def delete_cluster(params = {}, options = {})
389
+ req = build_request(:delete_cluster, params)
390
+ req.send_request(options)
391
+ end
392
+
393
+ # Deletes a specified service within a cluster. You can delete a service
394
+ # if you have no running tasks in it and the desired task count is zero.
395
+ # If the service is actively maintaining tasks, you cannot delete it,
396
+ # and you must update the service to a desired task count of zero. For
397
+ # more information, see UpdateService.
398
+ #
399
+ # <note markdown="1"> When you delete a service, if there are still running tasks that
400
+ # require cleanup, the service status moves from `ACTIVE` to `DRAINING`,
401
+ # and the service is no longer visible in the console or in ListServices
402
+ # API operations. After the tasks have stopped, then the service status
403
+ # moves from `DRAINING` to `INACTIVE`. Services in the `DRAINING` or
404
+ # `INACTIVE` status can still be viewed with DescribeServices API
405
+ # operations; however, in the future, `INACTIVE` services may be cleaned
406
+ # up and purged from Amazon ECS record keeping, and DescribeServices API
407
+ # operations on those services will return a `ServiceNotFoundException`
408
+ # error.
409
+ #
410
+ # </note>
411
+ # @option params [String] :cluster
412
+ # The name of the cluster that hosts the service to delete. If you do
413
+ # not specify a cluster, the default cluster is assumed.
414
+ # @option params [required, String] :service
415
+ # The name of the service to delete.
416
+ # @return [Types::DeleteServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
417
+ #
418
+ # * {Types::DeleteServiceResponse#service #service} => Types::Service
419
+ #
420
+ # @example Request syntax with placeholder values
421
+ # resp = client.delete_service({
422
+ # cluster: "String",
423
+ # service: "String", # required
424
+ # })
425
+ #
426
+ # @example Response structure
427
+ # resp.service.service_arn #=> String
428
+ # resp.service.service_name #=> String
429
+ # resp.service.cluster_arn #=> String
430
+ # resp.service.load_balancers #=> Array
431
+ # resp.service.load_balancers[0].target_group_arn #=> String
432
+ # resp.service.load_balancers[0].load_balancer_name #=> String
433
+ # resp.service.load_balancers[0].container_name #=> String
434
+ # resp.service.load_balancers[0].container_port #=> Integer
435
+ # resp.service.status #=> String
436
+ # resp.service.desired_count #=> Integer
437
+ # resp.service.running_count #=> Integer
438
+ # resp.service.pending_count #=> Integer
439
+ # resp.service.task_definition #=> String
440
+ # resp.service.deployment_configuration.maximum_percent #=> Integer
441
+ # resp.service.deployment_configuration.minimum_healthy_percent #=> Integer
442
+ # resp.service.deployments #=> Array
443
+ # resp.service.deployments[0].id #=> String
444
+ # resp.service.deployments[0].status #=> String
445
+ # resp.service.deployments[0].task_definition #=> String
446
+ # resp.service.deployments[0].desired_count #=> Integer
447
+ # resp.service.deployments[0].pending_count #=> Integer
448
+ # resp.service.deployments[0].running_count #=> Integer
449
+ # resp.service.deployments[0].created_at #=> Time
450
+ # resp.service.deployments[0].updated_at #=> Time
451
+ # resp.service.role_arn #=> String
452
+ # resp.service.events #=> Array
453
+ # resp.service.events[0].id #=> String
454
+ # resp.service.events[0].created_at #=> Time
455
+ # resp.service.events[0].message #=> String
456
+ # resp.service.created_at #=> Time
457
+ # @overload delete_service(params = {})
458
+ # @param [Hash] params ({})
459
+ def delete_service(params = {}, options = {})
460
+ req = build_request(:delete_service, params)
461
+ req.send_request(options)
462
+ end
463
+
464
+ # Deregisters an Amazon ECS container instance from the specified
465
+ # cluster. This instance is no longer available to run tasks.
466
+ #
467
+ # If you intend to use the container instance for some other purpose
468
+ # after deregistration, you should stop all of the tasks running on the
469
+ # container instance before deregistration to avoid any orphaned tasks
470
+ # from consuming resources.
471
+ #
472
+ # Deregistering a container instance removes the instance from a
473
+ # cluster, but it does not terminate the EC2 instance; if you are
474
+ # finished using the instance, be sure to terminate it in the Amazon EC2
475
+ # console to stop billing.
476
+ #
477
+ # <note markdown="1"> If you terminate a running container instance, Amazon ECS
478
+ # automatically deregisters the instance from your cluster (stopped
479
+ # container instances or instances with disconnected agents are not
480
+ # automatically deregistered when terminated).
481
+ #
482
+ # </note>
483
+ # @option params [String] :cluster
484
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
485
+ # hosts the container instance to deregister. If you do not specify a
486
+ # cluster, the default cluster is assumed.
487
+ # @option params [required, String] :container_instance
488
+ # The container instance ID or full Amazon Resource Name (ARN) of the
489
+ # container instance to deregister. The ARN contains the `arn:aws:ecs`
490
+ # namespace, followed by the region of the container instance, the AWS
491
+ # account ID of the container instance owner, the `container-instance`
492
+ # namespace, and then the container instance ID. For example,
493
+ # `arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
494
+ # `.
495
+ # @option params [Boolean] :force
496
+ # Forces the deregistration of the container instance. If you have tasks
497
+ # running on the container instance when you deregister it with the
498
+ # `force` option, these tasks remain running until you terminate the
499
+ # instance or the tasks stop through some other means, but they are
500
+ # orphaned (no longer monitored or accounted for by Amazon ECS). If an
501
+ # orphaned task on your container instance is part of an Amazon ECS
502
+ # service, then the service scheduler starts another copy of that task,
503
+ # on a different container instance if possible.
504
+ #
505
+ # Any containers in orphaned service tasks that are registered with a
506
+ # Classic load balancer or an Application load balancer target group are
507
+ # deregistered, and they will begin connection draining according to the
508
+ # settings on the load balancer or target group.
509
+ # @return [Types::DeregisterContainerInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
510
+ #
511
+ # * {Types::DeregisterContainerInstanceResponse#container_instance #containerInstance} => Types::ContainerInstance
512
+ #
513
+ # @example Request syntax with placeholder values
514
+ # resp = client.deregister_container_instance({
515
+ # cluster: "String",
516
+ # container_instance: "String", # required
517
+ # force: false,
518
+ # })
519
+ #
520
+ # @example Response structure
521
+ # resp.container_instance.container_instance_arn #=> String
522
+ # resp.container_instance.ec2_instance_id #=> String
523
+ # resp.container_instance.version #=> Integer
524
+ # resp.container_instance.version_info.agent_version #=> String
525
+ # resp.container_instance.version_info.agent_hash #=> String
526
+ # resp.container_instance.version_info.docker_version #=> String
527
+ # resp.container_instance.remaining_resources #=> Array
528
+ # resp.container_instance.remaining_resources[0].name #=> String
529
+ # resp.container_instance.remaining_resources[0].type #=> String
530
+ # resp.container_instance.remaining_resources[0].double_value #=> Float
531
+ # resp.container_instance.remaining_resources[0].long_value #=> Integer
532
+ # resp.container_instance.remaining_resources[0].integer_value #=> Integer
533
+ # resp.container_instance.remaining_resources[0].string_set_value #=> Array
534
+ # resp.container_instance.remaining_resources[0].string_set_value[0] #=> String
535
+ # resp.container_instance.registered_resources #=> Array
536
+ # resp.container_instance.registered_resources[0].name #=> String
537
+ # resp.container_instance.registered_resources[0].type #=> String
538
+ # resp.container_instance.registered_resources[0].double_value #=> Float
539
+ # resp.container_instance.registered_resources[0].long_value #=> Integer
540
+ # resp.container_instance.registered_resources[0].integer_value #=> Integer
541
+ # resp.container_instance.registered_resources[0].string_set_value #=> Array
542
+ # resp.container_instance.registered_resources[0].string_set_value[0] #=> String
543
+ # resp.container_instance.status #=> String
544
+ # resp.container_instance.agent_connected #=> Boolean
545
+ # resp.container_instance.running_tasks_count #=> Integer
546
+ # resp.container_instance.pending_tasks_count #=> Integer
547
+ # resp.container_instance.agent_update_status #=> String, one of "PENDING", "STAGING", "STAGED", "UPDATING", "UPDATED", "FAILED"
548
+ # resp.container_instance.attributes #=> Array
549
+ # resp.container_instance.attributes[0].name #=> String
550
+ # resp.container_instance.attributes[0].value #=> String
551
+ # @overload deregister_container_instance(params = {})
552
+ # @param [Hash] params ({})
553
+ def deregister_container_instance(params = {}, options = {})
554
+ req = build_request(:deregister_container_instance, params)
555
+ req.send_request(options)
556
+ end
557
+
558
+ # Deregisters the specified task definition by family and revision. Upon
559
+ # deregistration, the task definition is marked as `INACTIVE`. Existing
560
+ # tasks and services that reference an `INACTIVE` task definition
561
+ # continue to run without disruption. Existing services that reference
562
+ # an `INACTIVE` task definition can still scale up or down by modifying
563
+ # the service's desired count.
564
+ #
565
+ # You cannot use an `INACTIVE` task definition to run new tasks or
566
+ # create new services, and you cannot update an existing service to
567
+ # reference an `INACTIVE` task definition (although there may be up to a
568
+ # 10 minute window following deregistration where these restrictions
569
+ # have not yet taken effect).
570
+ # @option params [required, String] :task_definition
571
+ # The `family` and `revision` (`family:revision`) or full Amazon
572
+ # Resource Name (ARN) of the task definition to deregister. You must
573
+ # specify a `revision`.
574
+ # @return [Types::DeregisterTaskDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
575
+ #
576
+ # * {Types::DeregisterTaskDefinitionResponse#task_definition #taskDefinition} => Types::TaskDefinition
577
+ #
578
+ # @example Request syntax with placeholder values
579
+ # resp = client.deregister_task_definition({
580
+ # task_definition: "String", # required
581
+ # })
582
+ #
583
+ # @example Response structure
584
+ # resp.task_definition.task_definition_arn #=> String
585
+ # resp.task_definition.container_definitions #=> Array
586
+ # resp.task_definition.container_definitions[0].name #=> String
587
+ # resp.task_definition.container_definitions[0].image #=> String
588
+ # resp.task_definition.container_definitions[0].cpu #=> Integer
589
+ # resp.task_definition.container_definitions[0].memory #=> Integer
590
+ # resp.task_definition.container_definitions[0].memory_reservation #=> Integer
591
+ # resp.task_definition.container_definitions[0].links #=> Array
592
+ # resp.task_definition.container_definitions[0].links[0] #=> String
593
+ # resp.task_definition.container_definitions[0].port_mappings #=> Array
594
+ # resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
595
+ # resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
596
+ # resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
597
+ # resp.task_definition.container_definitions[0].essential #=> Boolean
598
+ # resp.task_definition.container_definitions[0].entry_point #=> Array
599
+ # resp.task_definition.container_definitions[0].entry_point[0] #=> String
600
+ # resp.task_definition.container_definitions[0].command #=> Array
601
+ # resp.task_definition.container_definitions[0].command[0] #=> String
602
+ # resp.task_definition.container_definitions[0].environment #=> Array
603
+ # resp.task_definition.container_definitions[0].environment[0].name #=> String
604
+ # resp.task_definition.container_definitions[0].environment[0].value #=> String
605
+ # resp.task_definition.container_definitions[0].mount_points #=> Array
606
+ # resp.task_definition.container_definitions[0].mount_points[0].source_volume #=> String
607
+ # resp.task_definition.container_definitions[0].mount_points[0].container_path #=> String
608
+ # resp.task_definition.container_definitions[0].mount_points[0].read_only #=> Boolean
609
+ # resp.task_definition.container_definitions[0].volumes_from #=> Array
610
+ # resp.task_definition.container_definitions[0].volumes_from[0].source_container #=> String
611
+ # resp.task_definition.container_definitions[0].volumes_from[0].read_only #=> Boolean
612
+ # resp.task_definition.container_definitions[0].hostname #=> String
613
+ # resp.task_definition.container_definitions[0].user #=> String
614
+ # resp.task_definition.container_definitions[0].working_directory #=> String
615
+ # resp.task_definition.container_definitions[0].disable_networking #=> Boolean
616
+ # resp.task_definition.container_definitions[0].privileged #=> Boolean
617
+ # resp.task_definition.container_definitions[0].readonly_root_filesystem #=> Boolean
618
+ # resp.task_definition.container_definitions[0].dns_servers #=> Array
619
+ # resp.task_definition.container_definitions[0].dns_servers[0] #=> String
620
+ # resp.task_definition.container_definitions[0].dns_search_domains #=> Array
621
+ # resp.task_definition.container_definitions[0].dns_search_domains[0] #=> String
622
+ # resp.task_definition.container_definitions[0].extra_hosts #=> Array
623
+ # resp.task_definition.container_definitions[0].extra_hosts[0].hostname #=> String
624
+ # resp.task_definition.container_definitions[0].extra_hosts[0].ip_address #=> String
625
+ # resp.task_definition.container_definitions[0].docker_security_options #=> Array
626
+ # resp.task_definition.container_definitions[0].docker_security_options[0] #=> String
627
+ # resp.task_definition.container_definitions[0].docker_labels #=> Hash
628
+ # resp.task_definition.container_definitions[0].docker_labels["String"] #=> String
629
+ # resp.task_definition.container_definitions[0].ulimits #=> Array
630
+ # resp.task_definition.container_definitions[0].ulimits[0].name #=> String, one of "core", "cpu", "data", "fsize", "locks", "memlock", "msgqueue", "nice", "nofile", "nproc", "rss", "rtprio", "rttime", "sigpending", "stack"
631
+ # resp.task_definition.container_definitions[0].ulimits[0].soft_limit #=> Integer
632
+ # resp.task_definition.container_definitions[0].ulimits[0].hard_limit #=> Integer
633
+ # resp.task_definition.container_definitions[0].log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk"
634
+ # resp.task_definition.container_definitions[0].log_configuration.options #=> Hash
635
+ # resp.task_definition.container_definitions[0].log_configuration.options["String"] #=> String
636
+ # resp.task_definition.family #=> String
637
+ # resp.task_definition.task_role_arn #=> String
638
+ # resp.task_definition.network_mode #=> String, one of "bridge", "host", "none"
639
+ # resp.task_definition.revision #=> Integer
640
+ # resp.task_definition.volumes #=> Array
641
+ # resp.task_definition.volumes[0].name #=> String
642
+ # resp.task_definition.volumes[0].host.source_path #=> String
643
+ # resp.task_definition.status #=> String, one of "ACTIVE", "INACTIVE"
644
+ # resp.task_definition.requires_attributes #=> Array
645
+ # resp.task_definition.requires_attributes[0].name #=> String
646
+ # resp.task_definition.requires_attributes[0].value #=> String
647
+ # @overload deregister_task_definition(params = {})
648
+ # @param [Hash] params ({})
649
+ def deregister_task_definition(params = {}, options = {})
650
+ req = build_request(:deregister_task_definition, params)
651
+ req.send_request(options)
652
+ end
653
+
654
+ # Describes one or more of your clusters.
655
+ # @option params [Array<String>] :clusters
656
+ # A space-separated list of up to 100 cluster names or full cluster
657
+ # Amazon Resource Name (ARN) entries. If you do not specify a cluster,
658
+ # the default cluster is assumed.
659
+ # @return [Types::DescribeClustersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
660
+ #
661
+ # * {Types::DescribeClustersResponse#clusters #clusters} => Array&lt;Types::Cluster&gt;
662
+ # * {Types::DescribeClustersResponse#failures #failures} => Array&lt;Types::Failure&gt;
663
+ #
664
+ # @example Request syntax with placeholder values
665
+ # resp = client.describe_clusters({
666
+ # clusters: ["String"],
667
+ # })
668
+ #
669
+ # @example Response structure
670
+ # resp.clusters #=> Array
671
+ # resp.clusters[0].cluster_arn #=> String
672
+ # resp.clusters[0].cluster_name #=> String
673
+ # resp.clusters[0].status #=> String
674
+ # resp.clusters[0].registered_container_instances_count #=> Integer
675
+ # resp.clusters[0].running_tasks_count #=> Integer
676
+ # resp.clusters[0].pending_tasks_count #=> Integer
677
+ # resp.clusters[0].active_services_count #=> Integer
678
+ # resp.failures #=> Array
679
+ # resp.failures[0].arn #=> String
680
+ # resp.failures[0].reason #=> String
681
+ # @overload describe_clusters(params = {})
682
+ # @param [Hash] params ({})
683
+ def describe_clusters(params = {}, options = {})
684
+ req = build_request(:describe_clusters, params)
685
+ req.send_request(options)
686
+ end
687
+
688
+ # Describes Amazon EC2 Container Service container instances. Returns
689
+ # metadata about registered and remaining resources on each container
690
+ # instance requested.
691
+ # @option params [String] :cluster
692
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
693
+ # hosts the container instances to describe. If you do not specify a
694
+ # cluster, the default cluster is assumed.
695
+ # @option params [required, Array<String>] :container_instances
696
+ # A space-separated list of container instance IDs or full Amazon
697
+ # Resource Name (ARN) entries.
698
+ # @return [Types::DescribeContainerInstancesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
699
+ #
700
+ # * {Types::DescribeContainerInstancesResponse#container_instances #containerInstances} => Array&lt;Types::ContainerInstance&gt;
701
+ # * {Types::DescribeContainerInstancesResponse#failures #failures} => Array&lt;Types::Failure&gt;
702
+ #
703
+ # @example Request syntax with placeholder values
704
+ # resp = client.describe_container_instances({
705
+ # cluster: "String",
706
+ # container_instances: ["String"], # required
707
+ # })
708
+ #
709
+ # @example Response structure
710
+ # resp.container_instances #=> Array
711
+ # resp.container_instances[0].container_instance_arn #=> String
712
+ # resp.container_instances[0].ec2_instance_id #=> String
713
+ # resp.container_instances[0].version #=> Integer
714
+ # resp.container_instances[0].version_info.agent_version #=> String
715
+ # resp.container_instances[0].version_info.agent_hash #=> String
716
+ # resp.container_instances[0].version_info.docker_version #=> String
717
+ # resp.container_instances[0].remaining_resources #=> Array
718
+ # resp.container_instances[0].remaining_resources[0].name #=> String
719
+ # resp.container_instances[0].remaining_resources[0].type #=> String
720
+ # resp.container_instances[0].remaining_resources[0].double_value #=> Float
721
+ # resp.container_instances[0].remaining_resources[0].long_value #=> Integer
722
+ # resp.container_instances[0].remaining_resources[0].integer_value #=> Integer
723
+ # resp.container_instances[0].remaining_resources[0].string_set_value #=> Array
724
+ # resp.container_instances[0].remaining_resources[0].string_set_value[0] #=> String
725
+ # resp.container_instances[0].registered_resources #=> Array
726
+ # resp.container_instances[0].registered_resources[0].name #=> String
727
+ # resp.container_instances[0].registered_resources[0].type #=> String
728
+ # resp.container_instances[0].registered_resources[0].double_value #=> Float
729
+ # resp.container_instances[0].registered_resources[0].long_value #=> Integer
730
+ # resp.container_instances[0].registered_resources[0].integer_value #=> Integer
731
+ # resp.container_instances[0].registered_resources[0].string_set_value #=> Array
732
+ # resp.container_instances[0].registered_resources[0].string_set_value[0] #=> String
733
+ # resp.container_instances[0].status #=> String
734
+ # resp.container_instances[0].agent_connected #=> Boolean
735
+ # resp.container_instances[0].running_tasks_count #=> Integer
736
+ # resp.container_instances[0].pending_tasks_count #=> Integer
737
+ # resp.container_instances[0].agent_update_status #=> String, one of "PENDING", "STAGING", "STAGED", "UPDATING", "UPDATED", "FAILED"
738
+ # resp.container_instances[0].attributes #=> Array
739
+ # resp.container_instances[0].attributes[0].name #=> String
740
+ # resp.container_instances[0].attributes[0].value #=> String
741
+ # resp.failures #=> Array
742
+ # resp.failures[0].arn #=> String
743
+ # resp.failures[0].reason #=> String
744
+ # @overload describe_container_instances(params = {})
745
+ # @param [Hash] params ({})
746
+ def describe_container_instances(params = {}, options = {})
747
+ req = build_request(:describe_container_instances, params)
748
+ req.send_request(options)
749
+ end
750
+
751
+ # Describes the specified services running in your cluster.
752
+ # @option params [String] :cluster
753
+ # The name of the cluster that hosts the service to describe. If you do
754
+ # not specify a cluster, the default cluster is assumed.
755
+ # @option params [required, Array<String>] :services
756
+ # A list of services to describe. You may specify up to 10 services to
757
+ # describe in a single operation.
758
+ # @return [Types::DescribeServicesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
759
+ #
760
+ # * {Types::DescribeServicesResponse#services #services} => Array&lt;Types::Service&gt;
761
+ # * {Types::DescribeServicesResponse#failures #failures} => Array&lt;Types::Failure&gt;
762
+ #
763
+ # @example Request syntax with placeholder values
764
+ # resp = client.describe_services({
765
+ # cluster: "String",
766
+ # services: ["String"], # required
767
+ # })
768
+ #
769
+ # @example Response structure
770
+ # resp.services #=> Array
771
+ # resp.services[0].service_arn #=> String
772
+ # resp.services[0].service_name #=> String
773
+ # resp.services[0].cluster_arn #=> String
774
+ # resp.services[0].load_balancers #=> Array
775
+ # resp.services[0].load_balancers[0].target_group_arn #=> String
776
+ # resp.services[0].load_balancers[0].load_balancer_name #=> String
777
+ # resp.services[0].load_balancers[0].container_name #=> String
778
+ # resp.services[0].load_balancers[0].container_port #=> Integer
779
+ # resp.services[0].status #=> String
780
+ # resp.services[0].desired_count #=> Integer
781
+ # resp.services[0].running_count #=> Integer
782
+ # resp.services[0].pending_count #=> Integer
783
+ # resp.services[0].task_definition #=> String
784
+ # resp.services[0].deployment_configuration.maximum_percent #=> Integer
785
+ # resp.services[0].deployment_configuration.minimum_healthy_percent #=> Integer
786
+ # resp.services[0].deployments #=> Array
787
+ # resp.services[0].deployments[0].id #=> String
788
+ # resp.services[0].deployments[0].status #=> String
789
+ # resp.services[0].deployments[0].task_definition #=> String
790
+ # resp.services[0].deployments[0].desired_count #=> Integer
791
+ # resp.services[0].deployments[0].pending_count #=> Integer
792
+ # resp.services[0].deployments[0].running_count #=> Integer
793
+ # resp.services[0].deployments[0].created_at #=> Time
794
+ # resp.services[0].deployments[0].updated_at #=> Time
795
+ # resp.services[0].role_arn #=> String
796
+ # resp.services[0].events #=> Array
797
+ # resp.services[0].events[0].id #=> String
798
+ # resp.services[0].events[0].created_at #=> Time
799
+ # resp.services[0].events[0].message #=> String
800
+ # resp.services[0].created_at #=> Time
801
+ # resp.failures #=> Array
802
+ # resp.failures[0].arn #=> String
803
+ # resp.failures[0].reason #=> String
804
+ # @overload describe_services(params = {})
805
+ # @param [Hash] params ({})
806
+ def describe_services(params = {}, options = {})
807
+ req = build_request(:describe_services, params)
808
+ req.send_request(options)
809
+ end
810
+
811
+ # Describes a task definition. You can specify a `family` and `revision`
812
+ # to find information about a specific task definition, or you can
813
+ # simply specify the family to find the latest `ACTIVE` revision in that
814
+ # family.
815
+ #
816
+ # <note markdown="1"> You can only describe `INACTIVE` task definitions while an active task
817
+ # or service references them.
818
+ #
819
+ # </note>
820
+ # @option params [required, String] :task_definition
821
+ # The `family` for the latest `ACTIVE` revision, `family` and `revision`
822
+ # (`family:revision`) for a specific revision in the family, or full
823
+ # Amazon Resource Name (ARN) of the task definition to describe.
824
+ # @return [Types::DescribeTaskDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
825
+ #
826
+ # * {Types::DescribeTaskDefinitionResponse#task_definition #taskDefinition} => Types::TaskDefinition
827
+ #
828
+ # @example Request syntax with placeholder values
829
+ # resp = client.describe_task_definition({
830
+ # task_definition: "String", # required
831
+ # })
832
+ #
833
+ # @example Response structure
834
+ # resp.task_definition.task_definition_arn #=> String
835
+ # resp.task_definition.container_definitions #=> Array
836
+ # resp.task_definition.container_definitions[0].name #=> String
837
+ # resp.task_definition.container_definitions[0].image #=> String
838
+ # resp.task_definition.container_definitions[0].cpu #=> Integer
839
+ # resp.task_definition.container_definitions[0].memory #=> Integer
840
+ # resp.task_definition.container_definitions[0].memory_reservation #=> Integer
841
+ # resp.task_definition.container_definitions[0].links #=> Array
842
+ # resp.task_definition.container_definitions[0].links[0] #=> String
843
+ # resp.task_definition.container_definitions[0].port_mappings #=> Array
844
+ # resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
845
+ # resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
846
+ # resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
847
+ # resp.task_definition.container_definitions[0].essential #=> Boolean
848
+ # resp.task_definition.container_definitions[0].entry_point #=> Array
849
+ # resp.task_definition.container_definitions[0].entry_point[0] #=> String
850
+ # resp.task_definition.container_definitions[0].command #=> Array
851
+ # resp.task_definition.container_definitions[0].command[0] #=> String
852
+ # resp.task_definition.container_definitions[0].environment #=> Array
853
+ # resp.task_definition.container_definitions[0].environment[0].name #=> String
854
+ # resp.task_definition.container_definitions[0].environment[0].value #=> String
855
+ # resp.task_definition.container_definitions[0].mount_points #=> Array
856
+ # resp.task_definition.container_definitions[0].mount_points[0].source_volume #=> String
857
+ # resp.task_definition.container_definitions[0].mount_points[0].container_path #=> String
858
+ # resp.task_definition.container_definitions[0].mount_points[0].read_only #=> Boolean
859
+ # resp.task_definition.container_definitions[0].volumes_from #=> Array
860
+ # resp.task_definition.container_definitions[0].volumes_from[0].source_container #=> String
861
+ # resp.task_definition.container_definitions[0].volumes_from[0].read_only #=> Boolean
862
+ # resp.task_definition.container_definitions[0].hostname #=> String
863
+ # resp.task_definition.container_definitions[0].user #=> String
864
+ # resp.task_definition.container_definitions[0].working_directory #=> String
865
+ # resp.task_definition.container_definitions[0].disable_networking #=> Boolean
866
+ # resp.task_definition.container_definitions[0].privileged #=> Boolean
867
+ # resp.task_definition.container_definitions[0].readonly_root_filesystem #=> Boolean
868
+ # resp.task_definition.container_definitions[0].dns_servers #=> Array
869
+ # resp.task_definition.container_definitions[0].dns_servers[0] #=> String
870
+ # resp.task_definition.container_definitions[0].dns_search_domains #=> Array
871
+ # resp.task_definition.container_definitions[0].dns_search_domains[0] #=> String
872
+ # resp.task_definition.container_definitions[0].extra_hosts #=> Array
873
+ # resp.task_definition.container_definitions[0].extra_hosts[0].hostname #=> String
874
+ # resp.task_definition.container_definitions[0].extra_hosts[0].ip_address #=> String
875
+ # resp.task_definition.container_definitions[0].docker_security_options #=> Array
876
+ # resp.task_definition.container_definitions[0].docker_security_options[0] #=> String
877
+ # resp.task_definition.container_definitions[0].docker_labels #=> Hash
878
+ # resp.task_definition.container_definitions[0].docker_labels["String"] #=> String
879
+ # resp.task_definition.container_definitions[0].ulimits #=> Array
880
+ # resp.task_definition.container_definitions[0].ulimits[0].name #=> String, one of "core", "cpu", "data", "fsize", "locks", "memlock", "msgqueue", "nice", "nofile", "nproc", "rss", "rtprio", "rttime", "sigpending", "stack"
881
+ # resp.task_definition.container_definitions[0].ulimits[0].soft_limit #=> Integer
882
+ # resp.task_definition.container_definitions[0].ulimits[0].hard_limit #=> Integer
883
+ # resp.task_definition.container_definitions[0].log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk"
884
+ # resp.task_definition.container_definitions[0].log_configuration.options #=> Hash
885
+ # resp.task_definition.container_definitions[0].log_configuration.options["String"] #=> String
886
+ # resp.task_definition.family #=> String
887
+ # resp.task_definition.task_role_arn #=> String
888
+ # resp.task_definition.network_mode #=> String, one of "bridge", "host", "none"
889
+ # resp.task_definition.revision #=> Integer
890
+ # resp.task_definition.volumes #=> Array
891
+ # resp.task_definition.volumes[0].name #=> String
892
+ # resp.task_definition.volumes[0].host.source_path #=> String
893
+ # resp.task_definition.status #=> String, one of "ACTIVE", "INACTIVE"
894
+ # resp.task_definition.requires_attributes #=> Array
895
+ # resp.task_definition.requires_attributes[0].name #=> String
896
+ # resp.task_definition.requires_attributes[0].value #=> String
897
+ # @overload describe_task_definition(params = {})
898
+ # @param [Hash] params ({})
899
+ def describe_task_definition(params = {}, options = {})
900
+ req = build_request(:describe_task_definition, params)
901
+ req.send_request(options)
902
+ end
903
+
904
+ # Describes a specified task or tasks.
905
+ # @option params [String] :cluster
906
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
907
+ # hosts the task to describe. If you do not specify a cluster, the
908
+ # default cluster is assumed.
909
+ # @option params [required, Array<String>] :tasks
910
+ # A space-separated list of task IDs or full Amazon Resource Name (ARN)
911
+ # entries.
912
+ # @return [Types::DescribeTasksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
913
+ #
914
+ # * {Types::DescribeTasksResponse#tasks #tasks} => Array&lt;Types::Task&gt;
915
+ # * {Types::DescribeTasksResponse#failures #failures} => Array&lt;Types::Failure&gt;
916
+ #
917
+ # @example Request syntax with placeholder values
918
+ # resp = client.describe_tasks({
919
+ # cluster: "String",
920
+ # tasks: ["String"], # required
921
+ # })
922
+ #
923
+ # @example Response structure
924
+ # resp.tasks #=> Array
925
+ # resp.tasks[0].task_arn #=> String
926
+ # resp.tasks[0].cluster_arn #=> String
927
+ # resp.tasks[0].task_definition_arn #=> String
928
+ # resp.tasks[0].container_instance_arn #=> String
929
+ # resp.tasks[0].overrides.container_overrides #=> Array
930
+ # resp.tasks[0].overrides.container_overrides[0].name #=> String
931
+ # resp.tasks[0].overrides.container_overrides[0].command #=> Array
932
+ # resp.tasks[0].overrides.container_overrides[0].command[0] #=> String
933
+ # resp.tasks[0].overrides.container_overrides[0].environment #=> Array
934
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].name #=> String
935
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].value #=> String
936
+ # resp.tasks[0].overrides.task_role_arn #=> String
937
+ # resp.tasks[0].last_status #=> String
938
+ # resp.tasks[0].desired_status #=> String
939
+ # resp.tasks[0].containers #=> Array
940
+ # resp.tasks[0].containers[0].container_arn #=> String
941
+ # resp.tasks[0].containers[0].task_arn #=> String
942
+ # resp.tasks[0].containers[0].name #=> String
943
+ # resp.tasks[0].containers[0].last_status #=> String
944
+ # resp.tasks[0].containers[0].exit_code #=> Integer
945
+ # resp.tasks[0].containers[0].reason #=> String
946
+ # resp.tasks[0].containers[0].network_bindings #=> Array
947
+ # resp.tasks[0].containers[0].network_bindings[0].bind_ip #=> String
948
+ # resp.tasks[0].containers[0].network_bindings[0].container_port #=> Integer
949
+ # resp.tasks[0].containers[0].network_bindings[0].host_port #=> Integer
950
+ # resp.tasks[0].containers[0].network_bindings[0].protocol #=> String, one of "tcp", "udp"
951
+ # resp.tasks[0].started_by #=> String
952
+ # resp.tasks[0].version #=> Integer
953
+ # resp.tasks[0].stopped_reason #=> String
954
+ # resp.tasks[0].created_at #=> Time
955
+ # resp.tasks[0].started_at #=> Time
956
+ # resp.tasks[0].stopped_at #=> Time
957
+ # resp.failures #=> Array
958
+ # resp.failures[0].arn #=> String
959
+ # resp.failures[0].reason #=> String
960
+ # @overload describe_tasks(params = {})
961
+ # @param [Hash] params ({})
962
+ def describe_tasks(params = {}, options = {})
963
+ req = build_request(:describe_tasks, params)
964
+ req.send_request(options)
965
+ end
966
+
967
+ # <note markdown="1"> This action is only used by the Amazon EC2 Container Service agent,
968
+ # and it is not intended for use outside of the agent.
969
+ #
970
+ # </note>
971
+ #
972
+ # Returns an endpoint for the Amazon EC2 Container Service agent to poll
973
+ # for updates.
974
+ # @option params [String] :container_instance
975
+ # The container instance ID or full Amazon Resource Name (ARN) of the
976
+ # container instance. The ARN contains the `arn:aws:ecs` namespace,
977
+ # followed by the region of the container instance, the AWS account ID
978
+ # of the container instance owner, the `container-instance` namespace,
979
+ # and then the container instance ID. For example,
980
+ # `arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
981
+ # `.
982
+ # @option params [String] :cluster
983
+ # The cluster that the container instance belongs to.
984
+ # @return [Types::DiscoverPollEndpointResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
985
+ #
986
+ # * {Types::DiscoverPollEndpointResponse#endpoint #endpoint} => String
987
+ # * {Types::DiscoverPollEndpointResponse#telemetry_endpoint #telemetryEndpoint} => String
988
+ #
989
+ # @example Request syntax with placeholder values
990
+ # resp = client.discover_poll_endpoint({
991
+ # container_instance: "String",
992
+ # cluster: "String",
993
+ # })
994
+ #
995
+ # @example Response structure
996
+ # resp.endpoint #=> String
997
+ # resp.telemetry_endpoint #=> String
998
+ # @overload discover_poll_endpoint(params = {})
999
+ # @param [Hash] params ({})
1000
+ def discover_poll_endpoint(params = {}, options = {})
1001
+ req = build_request(:discover_poll_endpoint, params)
1002
+ req.send_request(options)
1003
+ end
1004
+
1005
+ # Returns a list of existing clusters.
1006
+ # @option params [String] :next_token
1007
+ # The `nextToken` value returned from a previous paginated
1008
+ # `ListClusters` request where `maxResults` was used and the results
1009
+ # exceeded the value of that parameter. Pagination continues from the
1010
+ # end of the previous results that returned the `nextToken` value. This
1011
+ # value is `null` when there are no more results to return.
1012
+ #
1013
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1014
+ # to retrieve the next items in a list and not for other programmatic
1015
+ # purposes.
1016
+ #
1017
+ # </note>
1018
+ # @option params [Integer] :max_results
1019
+ # The maximum number of cluster results returned by `ListClusters` in
1020
+ # paginated output. When this parameter is used, `ListClusters` only
1021
+ # returns `maxResults` results in a single page along with a `nextToken`
1022
+ # response element. The remaining results of the initial request can be
1023
+ # seen by sending another `ListClusters` request with the returned
1024
+ # `nextToken` value. This value can be between 1 and 100. If this
1025
+ # parameter is not used, then `ListClusters` returns up to 100 results
1026
+ # and a `nextToken` value if applicable.
1027
+ # @return [Types::ListClustersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1028
+ #
1029
+ # * {Types::ListClustersResponse#cluster_arns #clusterArns} => Array&lt;String&gt;
1030
+ # * {Types::ListClustersResponse#next_token #nextToken} => String
1031
+ #
1032
+ # @example Request syntax with placeholder values
1033
+ # resp = client.list_clusters({
1034
+ # next_token: "String",
1035
+ # max_results: 1,
1036
+ # })
1037
+ #
1038
+ # @example Response structure
1039
+ # resp.cluster_arns #=> Array
1040
+ # resp.cluster_arns[0] #=> String
1041
+ # resp.next_token #=> String
1042
+ # @overload list_clusters(params = {})
1043
+ # @param [Hash] params ({})
1044
+ def list_clusters(params = {}, options = {})
1045
+ req = build_request(:list_clusters, params)
1046
+ req.send_request(options)
1047
+ end
1048
+
1049
+ # Returns a list of container instances in a specified cluster.
1050
+ # @option params [String] :cluster
1051
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
1052
+ # hosts the container instances to list. If you do not specify a
1053
+ # cluster, the default cluster is assumed.
1054
+ # @option params [String] :next_token
1055
+ # The `nextToken` value returned from a previous paginated
1056
+ # `ListContainerInstances` request where `maxResults` was used and the
1057
+ # results exceeded the value of that parameter. Pagination continues
1058
+ # from the end of the previous results that returned the `nextToken`
1059
+ # value. This value is `null` when there are no more results to return.
1060
+ #
1061
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1062
+ # to retrieve the next items in a list and not for other programmatic
1063
+ # purposes.
1064
+ #
1065
+ # </note>
1066
+ # @option params [Integer] :max_results
1067
+ # The maximum number of container instance results returned by
1068
+ # `ListContainerInstances` in paginated output. When this parameter is
1069
+ # used, `ListContainerInstances` only returns `maxResults` results in a
1070
+ # single page along with a `nextToken` response element. The remaining
1071
+ # results of the initial request can be seen by sending another
1072
+ # `ListContainerInstances` request with the returned `nextToken` value.
1073
+ # This value can be between 1 and 100. If this parameter is not used,
1074
+ # then `ListContainerInstances` returns up to 100 results and a
1075
+ # `nextToken` value if applicable.
1076
+ # @return [Types::ListContainerInstancesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1077
+ #
1078
+ # * {Types::ListContainerInstancesResponse#container_instance_arns #containerInstanceArns} => Array&lt;String&gt;
1079
+ # * {Types::ListContainerInstancesResponse#next_token #nextToken} => String
1080
+ #
1081
+ # @example Request syntax with placeholder values
1082
+ # resp = client.list_container_instances({
1083
+ # cluster: "String",
1084
+ # next_token: "String",
1085
+ # max_results: 1,
1086
+ # })
1087
+ #
1088
+ # @example Response structure
1089
+ # resp.container_instance_arns #=> Array
1090
+ # resp.container_instance_arns[0] #=> String
1091
+ # resp.next_token #=> String
1092
+ # @overload list_container_instances(params = {})
1093
+ # @param [Hash] params ({})
1094
+ def list_container_instances(params = {}, options = {})
1095
+ req = build_request(:list_container_instances, params)
1096
+ req.send_request(options)
1097
+ end
1098
+
1099
+ # Lists the services that are running in a specified cluster.
1100
+ # @option params [String] :cluster
1101
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
1102
+ # hosts the services to list. If you do not specify a cluster, the
1103
+ # default cluster is assumed.
1104
+ # @option params [String] :next_token
1105
+ # The `nextToken` value returned from a previous paginated
1106
+ # `ListServices` request where `maxResults` was used and the results
1107
+ # exceeded the value of that parameter. Pagination continues from the
1108
+ # end of the previous results that returned the `nextToken` value. This
1109
+ # value is `null` when there are no more results to return.
1110
+ #
1111
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1112
+ # to retrieve the next items in a list and not for other programmatic
1113
+ # purposes.
1114
+ #
1115
+ # </note>
1116
+ # @option params [Integer] :max_results
1117
+ # The maximum number of container instance results returned by
1118
+ # `ListServices` in paginated output. When this parameter is used,
1119
+ # `ListServices` only returns `maxResults` results in a single page
1120
+ # along with a `nextToken` response element. The remaining results of
1121
+ # the initial request can be seen by sending another `ListServices`
1122
+ # request with the returned `nextToken` value. This value can be between
1123
+ # 1 and 10. If this parameter is not used, then `ListServices` returns
1124
+ # up to 10 results and a `nextToken` value if applicable.
1125
+ # @return [Types::ListServicesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1126
+ #
1127
+ # * {Types::ListServicesResponse#service_arns #serviceArns} => Array&lt;String&gt;
1128
+ # * {Types::ListServicesResponse#next_token #nextToken} => String
1129
+ #
1130
+ # @example Request syntax with placeholder values
1131
+ # resp = client.list_services({
1132
+ # cluster: "String",
1133
+ # next_token: "String",
1134
+ # max_results: 1,
1135
+ # })
1136
+ #
1137
+ # @example Response structure
1138
+ # resp.service_arns #=> Array
1139
+ # resp.service_arns[0] #=> String
1140
+ # resp.next_token #=> String
1141
+ # @overload list_services(params = {})
1142
+ # @param [Hash] params ({})
1143
+ def list_services(params = {}, options = {})
1144
+ req = build_request(:list_services, params)
1145
+ req.send_request(options)
1146
+ end
1147
+
1148
+ # Returns a list of task definition families that are registered to your
1149
+ # account (which may include task definition families that no longer
1150
+ # have any `ACTIVE` task definition revisions).
1151
+ #
1152
+ # You can filter out task definition families that do not contain any
1153
+ # `ACTIVE` task definition revisions by setting the `status` parameter
1154
+ # to `ACTIVE`. You can also filter the results with the `familyPrefix`
1155
+ # parameter.
1156
+ # @option params [String] :family_prefix
1157
+ # The `familyPrefix` is a string that is used to filter the results of
1158
+ # `ListTaskDefinitionFamilies`. If you specify a `familyPrefix`, only
1159
+ # task definition family names that begin with the `familyPrefix` string
1160
+ # are returned.
1161
+ # @option params [String] :status
1162
+ # The task definition family status with which to filter the
1163
+ # `ListTaskDefinitionFamilies` results. By default, both `ACTIVE` and
1164
+ # `INACTIVE` task definition families are listed. If this parameter is
1165
+ # set to `ACTIVE`, only task definition families that have an `ACTIVE`
1166
+ # task definition revision are returned. If this parameter is set to
1167
+ # `INACTIVE`, only task definition families that do not have any
1168
+ # `ACTIVE` task definition revisions are returned. If you paginate the
1169
+ # resulting output, be sure to keep the `status` value constant in each
1170
+ # subsequent request.
1171
+ # @option params [String] :next_token
1172
+ # The `nextToken` value returned from a previous paginated
1173
+ # `ListTaskDefinitionFamilies` request where `maxResults` was used and
1174
+ # the results exceeded the value of that parameter. Pagination continues
1175
+ # from the end of the previous results that returned the `nextToken`
1176
+ # value. This value is `null` when there are no more results to return.
1177
+ #
1178
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1179
+ # to retrieve the next items in a list and not for other programmatic
1180
+ # purposes.
1181
+ #
1182
+ # </note>
1183
+ # @option params [Integer] :max_results
1184
+ # The maximum number of task definition family results returned by
1185
+ # `ListTaskDefinitionFamilies` in paginated output. When this parameter
1186
+ # is used, `ListTaskDefinitions` only returns `maxResults` results in a
1187
+ # single page along with a `nextToken` response element. The remaining
1188
+ # results of the initial request can be seen by sending another
1189
+ # `ListTaskDefinitionFamilies` request with the returned `nextToken`
1190
+ # value. This value can be between 1 and 100. If this parameter is not
1191
+ # used, then `ListTaskDefinitionFamilies` returns up to 100 results and
1192
+ # a `nextToken` value if applicable.
1193
+ # @return [Types::ListTaskDefinitionFamiliesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1194
+ #
1195
+ # * {Types::ListTaskDefinitionFamiliesResponse#families #families} => Array&lt;String&gt;
1196
+ # * {Types::ListTaskDefinitionFamiliesResponse#next_token #nextToken} => String
1197
+ #
1198
+ # @example Request syntax with placeholder values
1199
+ # resp = client.list_task_definition_families({
1200
+ # family_prefix: "String",
1201
+ # status: "ACTIVE", # accepts ACTIVE, INACTIVE, ALL
1202
+ # next_token: "String",
1203
+ # max_results: 1,
1204
+ # })
1205
+ #
1206
+ # @example Response structure
1207
+ # resp.families #=> Array
1208
+ # resp.families[0] #=> String
1209
+ # resp.next_token #=> String
1210
+ # @overload list_task_definition_families(params = {})
1211
+ # @param [Hash] params ({})
1212
+ def list_task_definition_families(params = {}, options = {})
1213
+ req = build_request(:list_task_definition_families, params)
1214
+ req.send_request(options)
1215
+ end
1216
+
1217
+ # Returns a list of task definitions that are registered to your
1218
+ # account. You can filter the results by family name with the
1219
+ # `familyPrefix` parameter or by status with the `status` parameter.
1220
+ # @option params [String] :family_prefix
1221
+ # The full family name with which to filter the `ListTaskDefinitions`
1222
+ # results. Specifying a `familyPrefix` limits the listed task
1223
+ # definitions to task definition revisions that belong to that family.
1224
+ # @option params [String] :status
1225
+ # The task definition status with which to filter the
1226
+ # `ListTaskDefinitions` results. By default, only `ACTIVE` task
1227
+ # definitions are listed. By setting this parameter to `INACTIVE`, you
1228
+ # can view task definitions that are `INACTIVE` as long as an active
1229
+ # task or service still references them. If you paginate the resulting
1230
+ # output, be sure to keep the `status` value constant in each subsequent
1231
+ # request.
1232
+ # @option params [String] :sort
1233
+ # The order in which to sort the results. Valid values are `ASC` and
1234
+ # `DESC`. By default (`ASC`), task definitions are listed
1235
+ # lexicographically by family name and in ascending numerical order by
1236
+ # revision so that the newest task definitions in a family are listed
1237
+ # last. Setting this parameter to `DESC` reverses the sort order on
1238
+ # family name and revision so that the newest task definitions in a
1239
+ # family are listed first.
1240
+ # @option params [String] :next_token
1241
+ # The `nextToken` value returned from a previous paginated
1242
+ # `ListTaskDefinitions` request where `maxResults` was used and the
1243
+ # results exceeded the value of that parameter. Pagination continues
1244
+ # from the end of the previous results that returned the `nextToken`
1245
+ # value. This value is `null` when there are no more results to return.
1246
+ #
1247
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1248
+ # to retrieve the next items in a list and not for other programmatic
1249
+ # purposes.
1250
+ #
1251
+ # </note>
1252
+ # @option params [Integer] :max_results
1253
+ # The maximum number of task definition results returned by
1254
+ # `ListTaskDefinitions` in paginated output. When this parameter is
1255
+ # used, `ListTaskDefinitions` only returns `maxResults` results in a
1256
+ # single page along with a `nextToken` response element. The remaining
1257
+ # results of the initial request can be seen by sending another
1258
+ # `ListTaskDefinitions` request with the returned `nextToken` value.
1259
+ # This value can be between 1 and 100. If this parameter is not used,
1260
+ # then `ListTaskDefinitions` returns up to 100 results and a `nextToken`
1261
+ # value if applicable.
1262
+ # @return [Types::ListTaskDefinitionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1263
+ #
1264
+ # * {Types::ListTaskDefinitionsResponse#task_definition_arns #taskDefinitionArns} => Array&lt;String&gt;
1265
+ # * {Types::ListTaskDefinitionsResponse#next_token #nextToken} => String
1266
+ #
1267
+ # @example Request syntax with placeholder values
1268
+ # resp = client.list_task_definitions({
1269
+ # family_prefix: "String",
1270
+ # status: "ACTIVE", # accepts ACTIVE, INACTIVE
1271
+ # sort: "ASC", # accepts ASC, DESC
1272
+ # next_token: "String",
1273
+ # max_results: 1,
1274
+ # })
1275
+ #
1276
+ # @example Response structure
1277
+ # resp.task_definition_arns #=> Array
1278
+ # resp.task_definition_arns[0] #=> String
1279
+ # resp.next_token #=> String
1280
+ # @overload list_task_definitions(params = {})
1281
+ # @param [Hash] params ({})
1282
+ def list_task_definitions(params = {}, options = {})
1283
+ req = build_request(:list_task_definitions, params)
1284
+ req.send_request(options)
1285
+ end
1286
+
1287
+ # Returns a list of tasks for a specified cluster. You can filter the
1288
+ # results by family name, by a particular container instance, or by the
1289
+ # desired status of the task with the `family`, `containerInstance`, and
1290
+ # `desiredStatus` parameters.
1291
+ #
1292
+ # Recently-stopped tasks might appear in the returned results.
1293
+ # Currently, stopped tasks appear in the returned results for at least
1294
+ # one hour.
1295
+ # @option params [String] :cluster
1296
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
1297
+ # hosts the tasks to list. If you do not specify a cluster, the default
1298
+ # cluster is assumed.
1299
+ # @option params [String] :container_instance
1300
+ # The container instance ID or full Amazon Resource Name (ARN) of the
1301
+ # container instance with which to filter the `ListTasks` results.
1302
+ # Specifying a `containerInstance` limits the results to tasks that
1303
+ # belong to that container instance.
1304
+ # @option params [String] :family
1305
+ # The name of the family with which to filter the `ListTasks` results.
1306
+ # Specifying a `family` limits the results to tasks that belong to that
1307
+ # family.
1308
+ # @option params [String] :next_token
1309
+ # The `nextToken` value returned from a previous paginated `ListTasks`
1310
+ # request where `maxResults` was used and the results exceeded the value
1311
+ # of that parameter. Pagination continues from the end of the previous
1312
+ # results that returned the `nextToken` value. This value is `null` when
1313
+ # there are no more results to return.
1314
+ #
1315
+ # <note markdown="1"> This token should be treated as an opaque identifier that is only used
1316
+ # to retrieve the next items in a list and not for other programmatic
1317
+ # purposes.
1318
+ #
1319
+ # </note>
1320
+ # @option params [Integer] :max_results
1321
+ # The maximum number of task results returned by `ListTasks` in
1322
+ # paginated output. When this parameter is used, `ListTasks` only
1323
+ # returns `maxResults` results in a single page along with a `nextToken`
1324
+ # response element. The remaining results of the initial request can be
1325
+ # seen by sending another `ListTasks` request with the returned
1326
+ # `nextToken` value. This value can be between 1 and 100. If this
1327
+ # parameter is not used, then `ListTasks` returns up to 100 results and
1328
+ # a `nextToken` value if applicable.
1329
+ # @option params [String] :started_by
1330
+ # The `startedBy` value with which to filter the task results.
1331
+ # Specifying a `startedBy` value limits the results to tasks that were
1332
+ # started with that value.
1333
+ # @option params [String] :service_name
1334
+ # The name of the service with which to filter the `ListTasks` results.
1335
+ # Specifying a `serviceName` limits the results to tasks that belong to
1336
+ # that service.
1337
+ # @option params [String] :desired_status
1338
+ # The task desired status with which to filter the `ListTasks` results.
1339
+ # Specifying a `desiredStatus` of `STOPPED` limits the results to tasks
1340
+ # that ECS has set the desired status to `STOPPED`, which can be useful
1341
+ # for debugging tasks that are not starting properly or have died or
1342
+ # finished. The default status filter is `RUNNING`, which shows tasks
1343
+ # that ECS has set the desired status to `RUNNING`.
1344
+ #
1345
+ # <note markdown="1"> Although you can filter results based on a desired status of
1346
+ # `PENDING`, this will not return any results because ECS never sets the
1347
+ # desired status of a task to that value (only a task's `lastStatus`
1348
+ # may have a value of `PENDING`).
1349
+ #
1350
+ # </note>
1351
+ # @return [Types::ListTasksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1352
+ #
1353
+ # * {Types::ListTasksResponse#task_arns #taskArns} => Array&lt;String&gt;
1354
+ # * {Types::ListTasksResponse#next_token #nextToken} => String
1355
+ #
1356
+ # @example Request syntax with placeholder values
1357
+ # resp = client.list_tasks({
1358
+ # cluster: "String",
1359
+ # container_instance: "String",
1360
+ # family: "String",
1361
+ # next_token: "String",
1362
+ # max_results: 1,
1363
+ # started_by: "String",
1364
+ # service_name: "String",
1365
+ # desired_status: "RUNNING", # accepts RUNNING, PENDING, STOPPED
1366
+ # })
1367
+ #
1368
+ # @example Response structure
1369
+ # resp.task_arns #=> Array
1370
+ # resp.task_arns[0] #=> String
1371
+ # resp.next_token #=> String
1372
+ # @overload list_tasks(params = {})
1373
+ # @param [Hash] params ({})
1374
+ def list_tasks(params = {}, options = {})
1375
+ req = build_request(:list_tasks, params)
1376
+ req.send_request(options)
1377
+ end
1378
+
1379
+ # <note markdown="1"> This action is only used by the Amazon EC2 Container Service agent,
1380
+ # and it is not intended for use outside of the agent.
1381
+ #
1382
+ # </note>
1383
+ #
1384
+ # Registers an EC2 instance into the specified cluster. This instance
1385
+ # becomes available to place containers on.
1386
+ # @option params [String] :cluster
1387
+ # The short name or full Amazon Resource Name (ARN) of the cluster with
1388
+ # which to register your container instance. If you do not specify a
1389
+ # cluster, the default cluster is assumed.
1390
+ # @option params [String] :instance_identity_document
1391
+ # The instance identity document for the EC2 instance to register. This
1392
+ # document can be found by running the following command from the
1393
+ # instance: `curl
1394
+ # http://169.254.169.254/latest/dynamic/instance-identity/document/`
1395
+ # @option params [String] :instance_identity_document_signature
1396
+ # The instance identity document signature for the EC2 instance to
1397
+ # register. This signature can be found by running the following command
1398
+ # from the instance: `curl
1399
+ # http://169.254.169.254/latest/dynamic/instance-identity/signature/`
1400
+ # @option params [Array<Types::Resource>] :total_resources
1401
+ # The resources available on the instance.
1402
+ # @option params [Types::VersionInfo] :version_info
1403
+ # The version information for the Amazon ECS container agent and Docker
1404
+ # daemon running on the container instance.
1405
+ # @option params [String] :container_instance_arn
1406
+ # The Amazon Resource Name (ARN) of the container instance (if it was
1407
+ # previously registered).
1408
+ # @option params [Array<Types::Attribute>] :attributes
1409
+ # The container instance attributes that this container instance
1410
+ # supports.
1411
+ # @return [Types::RegisterContainerInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1412
+ #
1413
+ # * {Types::RegisterContainerInstanceResponse#container_instance #containerInstance} => Types::ContainerInstance
1414
+ #
1415
+ # @example Request syntax with placeholder values
1416
+ # resp = client.register_container_instance({
1417
+ # cluster: "String",
1418
+ # instance_identity_document: "String",
1419
+ # instance_identity_document_signature: "String",
1420
+ # total_resources: [
1421
+ # {
1422
+ # name: "String",
1423
+ # type: "String",
1424
+ # double_value: 1.0,
1425
+ # long_value: 1,
1426
+ # integer_value: 1,
1427
+ # string_set_value: ["String"],
1428
+ # },
1429
+ # ],
1430
+ # version_info: {
1431
+ # agent_version: "String",
1432
+ # agent_hash: "String",
1433
+ # docker_version: "String",
1434
+ # },
1435
+ # container_instance_arn: "String",
1436
+ # attributes: [
1437
+ # {
1438
+ # name: "String", # required
1439
+ # value: "String",
1440
+ # },
1441
+ # ],
1442
+ # })
1443
+ #
1444
+ # @example Response structure
1445
+ # resp.container_instance.container_instance_arn #=> String
1446
+ # resp.container_instance.ec2_instance_id #=> String
1447
+ # resp.container_instance.version #=> Integer
1448
+ # resp.container_instance.version_info.agent_version #=> String
1449
+ # resp.container_instance.version_info.agent_hash #=> String
1450
+ # resp.container_instance.version_info.docker_version #=> String
1451
+ # resp.container_instance.remaining_resources #=> Array
1452
+ # resp.container_instance.remaining_resources[0].name #=> String
1453
+ # resp.container_instance.remaining_resources[0].type #=> String
1454
+ # resp.container_instance.remaining_resources[0].double_value #=> Float
1455
+ # resp.container_instance.remaining_resources[0].long_value #=> Integer
1456
+ # resp.container_instance.remaining_resources[0].integer_value #=> Integer
1457
+ # resp.container_instance.remaining_resources[0].string_set_value #=> Array
1458
+ # resp.container_instance.remaining_resources[0].string_set_value[0] #=> String
1459
+ # resp.container_instance.registered_resources #=> Array
1460
+ # resp.container_instance.registered_resources[0].name #=> String
1461
+ # resp.container_instance.registered_resources[0].type #=> String
1462
+ # resp.container_instance.registered_resources[0].double_value #=> Float
1463
+ # resp.container_instance.registered_resources[0].long_value #=> Integer
1464
+ # resp.container_instance.registered_resources[0].integer_value #=> Integer
1465
+ # resp.container_instance.registered_resources[0].string_set_value #=> Array
1466
+ # resp.container_instance.registered_resources[0].string_set_value[0] #=> String
1467
+ # resp.container_instance.status #=> String
1468
+ # resp.container_instance.agent_connected #=> Boolean
1469
+ # resp.container_instance.running_tasks_count #=> Integer
1470
+ # resp.container_instance.pending_tasks_count #=> Integer
1471
+ # resp.container_instance.agent_update_status #=> String, one of "PENDING", "STAGING", "STAGED", "UPDATING", "UPDATED", "FAILED"
1472
+ # resp.container_instance.attributes #=> Array
1473
+ # resp.container_instance.attributes[0].name #=> String
1474
+ # resp.container_instance.attributes[0].value #=> String
1475
+ # @overload register_container_instance(params = {})
1476
+ # @param [Hash] params ({})
1477
+ def register_container_instance(params = {}, options = {})
1478
+ req = build_request(:register_container_instance, params)
1479
+ req.send_request(options)
1480
+ end
1481
+
1482
+ # Registers a new task definition from the supplied `family` and
1483
+ # `containerDefinitions`. Optionally, you can add data volumes to your
1484
+ # containers with the `volumes` parameter. For more information about
1485
+ # task definition parameters and defaults, see [Amazon ECS Task
1486
+ # Definitions][1] in the *Amazon EC2 Container Service Developer Guide*.
1487
+ #
1488
+ # You can specify an IAM role for your task with the `taskRoleArn`
1489
+ # parameter. When you specify an IAM role for a task, its containers can
1490
+ # then use the latest versions of the AWS CLI or SDKs to make API
1491
+ # requests to the AWS services that are specified in the IAM policy
1492
+ # associated with the role. For more information, see [IAM Roles for
1493
+ # Tasks][2] in the *Amazon EC2 Container Service Developer Guide*.
1494
+ #
1495
+ # You can specify a Docker networking mode for the containers in your
1496
+ # task definition with the `networkMode` parameter. The available
1497
+ # network modes correspond to those described in [Network settings][3]
1498
+ # in the Docker run reference.
1499
+ #
1500
+ #
1501
+ #
1502
+ # [1]: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html
1503
+ # [2]: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html
1504
+ # [3]: https://docs.docker.com/engine/reference/run/#/network-settings
1505
+ # @option params [required, String] :family
1506
+ # You must specify a `family` for a task definition, which allows you to
1507
+ # track multiple versions of the same task definition. The `family` is
1508
+ # used as a name for your task definition. Up to 255 letters (uppercase
1509
+ # and lowercase), numbers, hyphens, and underscores are allowed.
1510
+ # @option params [String] :task_role_arn
1511
+ # The short name or full Amazon Resource Name (ARN) of the IAM role that
1512
+ # containers in this task can assume. All containers in this task are
1513
+ # granted the permissions that are specified in this role. For more
1514
+ # information, see [IAM Roles for Tasks][1] in the *Amazon EC2 Container
1515
+ # Service Developer Guide*.
1516
+ #
1517
+ #
1518
+ #
1519
+ # [1]: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html
1520
+ # @option params [String] :network_mode
1521
+ # The Docker networking mode to use for the containers in the task. The
1522
+ # valid values are `none`, `bridge`, and `host`.
1523
+ #
1524
+ # The default Docker network mode is `bridge`. If the network mode is
1525
+ # set to `none`, you cannot specify port mappings in your container
1526
+ # definitions, and the task's containers do not have external
1527
+ # connectivity. The `host` network mode offers the highest networking
1528
+ # performance for containers because they use the host network stack
1529
+ # instead of the virtualized network stack provided by the `bridge`
1530
+ # mode; however, exposed container ports are mapped directly to the
1531
+ # corresponding host port, so you cannot take advantage of dynamic host
1532
+ # port mappings or run multiple instantiations of the same task on a
1533
+ # single container instance if port mappings are used.
1534
+ #
1535
+ # For more information, see [Network settings][1] in the *Docker run
1536
+ # reference*.
1537
+ #
1538
+ #
1539
+ #
1540
+ # [1]: https://docs.docker.com/engine/reference/run/#network-settings
1541
+ # @option params [required, Array<Types::ContainerDefinition>] :container_definitions
1542
+ # A list of container definitions in JSON format that describe the
1543
+ # different containers that make up your task.
1544
+ # @option params [Array<Types::Volume>] :volumes
1545
+ # A list of volume definitions in JSON format that containers in your
1546
+ # task may use.
1547
+ # @return [Types::RegisterTaskDefinitionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1548
+ #
1549
+ # * {Types::RegisterTaskDefinitionResponse#task_definition #taskDefinition} => Types::TaskDefinition
1550
+ #
1551
+ # @example Request syntax with placeholder values
1552
+ # resp = client.register_task_definition({
1553
+ # family: "String", # required
1554
+ # task_role_arn: "String",
1555
+ # network_mode: "bridge", # accepts bridge, host, none
1556
+ # container_definitions: [ # required
1557
+ # {
1558
+ # name: "String",
1559
+ # image: "String",
1560
+ # cpu: 1,
1561
+ # memory: 1,
1562
+ # memory_reservation: 1,
1563
+ # links: ["String"],
1564
+ # port_mappings: [
1565
+ # {
1566
+ # container_port: 1,
1567
+ # host_port: 1,
1568
+ # protocol: "tcp", # accepts tcp, udp
1569
+ # },
1570
+ # ],
1571
+ # essential: false,
1572
+ # entry_point: ["String"],
1573
+ # command: ["String"],
1574
+ # environment: [
1575
+ # {
1576
+ # name: "String",
1577
+ # value: "String",
1578
+ # },
1579
+ # ],
1580
+ # mount_points: [
1581
+ # {
1582
+ # source_volume: "String",
1583
+ # container_path: "String",
1584
+ # read_only: false,
1585
+ # },
1586
+ # ],
1587
+ # volumes_from: [
1588
+ # {
1589
+ # source_container: "String",
1590
+ # read_only: false,
1591
+ # },
1592
+ # ],
1593
+ # hostname: "String",
1594
+ # user: "String",
1595
+ # working_directory: "String",
1596
+ # disable_networking: false,
1597
+ # privileged: false,
1598
+ # readonly_root_filesystem: false,
1599
+ # dns_servers: ["String"],
1600
+ # dns_search_domains: ["String"],
1601
+ # extra_hosts: [
1602
+ # {
1603
+ # hostname: "String", # required
1604
+ # ip_address: "String", # required
1605
+ # },
1606
+ # ],
1607
+ # docker_security_options: ["String"],
1608
+ # docker_labels: {
1609
+ # "String" => "String",
1610
+ # },
1611
+ # ulimits: [
1612
+ # {
1613
+ # name: "core", # required, accepts core, cpu, data, fsize, locks, memlock, msgqueue, nice, nofile, nproc, rss, rtprio, rttime, sigpending, stack
1614
+ # soft_limit: 1, # required
1615
+ # hard_limit: 1, # required
1616
+ # },
1617
+ # ],
1618
+ # log_configuration: {
1619
+ # log_driver: "json-file", # required, accepts json-file, syslog, journald, gelf, fluentd, awslogs, splunk
1620
+ # options: {
1621
+ # "String" => "String",
1622
+ # },
1623
+ # },
1624
+ # },
1625
+ # ],
1626
+ # volumes: [
1627
+ # {
1628
+ # name: "String",
1629
+ # host: {
1630
+ # source_path: "String",
1631
+ # },
1632
+ # },
1633
+ # ],
1634
+ # })
1635
+ #
1636
+ # @example Response structure
1637
+ # resp.task_definition.task_definition_arn #=> String
1638
+ # resp.task_definition.container_definitions #=> Array
1639
+ # resp.task_definition.container_definitions[0].name #=> String
1640
+ # resp.task_definition.container_definitions[0].image #=> String
1641
+ # resp.task_definition.container_definitions[0].cpu #=> Integer
1642
+ # resp.task_definition.container_definitions[0].memory #=> Integer
1643
+ # resp.task_definition.container_definitions[0].memory_reservation #=> Integer
1644
+ # resp.task_definition.container_definitions[0].links #=> Array
1645
+ # resp.task_definition.container_definitions[0].links[0] #=> String
1646
+ # resp.task_definition.container_definitions[0].port_mappings #=> Array
1647
+ # resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
1648
+ # resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
1649
+ # resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
1650
+ # resp.task_definition.container_definitions[0].essential #=> Boolean
1651
+ # resp.task_definition.container_definitions[0].entry_point #=> Array
1652
+ # resp.task_definition.container_definitions[0].entry_point[0] #=> String
1653
+ # resp.task_definition.container_definitions[0].command #=> Array
1654
+ # resp.task_definition.container_definitions[0].command[0] #=> String
1655
+ # resp.task_definition.container_definitions[0].environment #=> Array
1656
+ # resp.task_definition.container_definitions[0].environment[0].name #=> String
1657
+ # resp.task_definition.container_definitions[0].environment[0].value #=> String
1658
+ # resp.task_definition.container_definitions[0].mount_points #=> Array
1659
+ # resp.task_definition.container_definitions[0].mount_points[0].source_volume #=> String
1660
+ # resp.task_definition.container_definitions[0].mount_points[0].container_path #=> String
1661
+ # resp.task_definition.container_definitions[0].mount_points[0].read_only #=> Boolean
1662
+ # resp.task_definition.container_definitions[0].volumes_from #=> Array
1663
+ # resp.task_definition.container_definitions[0].volumes_from[0].source_container #=> String
1664
+ # resp.task_definition.container_definitions[0].volumes_from[0].read_only #=> Boolean
1665
+ # resp.task_definition.container_definitions[0].hostname #=> String
1666
+ # resp.task_definition.container_definitions[0].user #=> String
1667
+ # resp.task_definition.container_definitions[0].working_directory #=> String
1668
+ # resp.task_definition.container_definitions[0].disable_networking #=> Boolean
1669
+ # resp.task_definition.container_definitions[0].privileged #=> Boolean
1670
+ # resp.task_definition.container_definitions[0].readonly_root_filesystem #=> Boolean
1671
+ # resp.task_definition.container_definitions[0].dns_servers #=> Array
1672
+ # resp.task_definition.container_definitions[0].dns_servers[0] #=> String
1673
+ # resp.task_definition.container_definitions[0].dns_search_domains #=> Array
1674
+ # resp.task_definition.container_definitions[0].dns_search_domains[0] #=> String
1675
+ # resp.task_definition.container_definitions[0].extra_hosts #=> Array
1676
+ # resp.task_definition.container_definitions[0].extra_hosts[0].hostname #=> String
1677
+ # resp.task_definition.container_definitions[0].extra_hosts[0].ip_address #=> String
1678
+ # resp.task_definition.container_definitions[0].docker_security_options #=> Array
1679
+ # resp.task_definition.container_definitions[0].docker_security_options[0] #=> String
1680
+ # resp.task_definition.container_definitions[0].docker_labels #=> Hash
1681
+ # resp.task_definition.container_definitions[0].docker_labels["String"] #=> String
1682
+ # resp.task_definition.container_definitions[0].ulimits #=> Array
1683
+ # resp.task_definition.container_definitions[0].ulimits[0].name #=> String, one of "core", "cpu", "data", "fsize", "locks", "memlock", "msgqueue", "nice", "nofile", "nproc", "rss", "rtprio", "rttime", "sigpending", "stack"
1684
+ # resp.task_definition.container_definitions[0].ulimits[0].soft_limit #=> Integer
1685
+ # resp.task_definition.container_definitions[0].ulimits[0].hard_limit #=> Integer
1686
+ # resp.task_definition.container_definitions[0].log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk"
1687
+ # resp.task_definition.container_definitions[0].log_configuration.options #=> Hash
1688
+ # resp.task_definition.container_definitions[0].log_configuration.options["String"] #=> String
1689
+ # resp.task_definition.family #=> String
1690
+ # resp.task_definition.task_role_arn #=> String
1691
+ # resp.task_definition.network_mode #=> String, one of "bridge", "host", "none"
1692
+ # resp.task_definition.revision #=> Integer
1693
+ # resp.task_definition.volumes #=> Array
1694
+ # resp.task_definition.volumes[0].name #=> String
1695
+ # resp.task_definition.volumes[0].host.source_path #=> String
1696
+ # resp.task_definition.status #=> String, one of "ACTIVE", "INACTIVE"
1697
+ # resp.task_definition.requires_attributes #=> Array
1698
+ # resp.task_definition.requires_attributes[0].name #=> String
1699
+ # resp.task_definition.requires_attributes[0].value #=> String
1700
+ # @overload register_task_definition(params = {})
1701
+ # @param [Hash] params ({})
1702
+ def register_task_definition(params = {}, options = {})
1703
+ req = build_request(:register_task_definition, params)
1704
+ req.send_request(options)
1705
+ end
1706
+
1707
+ # Start a task using random placement and the default Amazon ECS
1708
+ # scheduler. To use your own scheduler or place a task on a specific
1709
+ # container instance, use `StartTask` instead.
1710
+ #
1711
+ # The `count` parameter is limited to 10 tasks per call.
1712
+ # @option params [String] :cluster
1713
+ # The short name or full Amazon Resource Name (ARN) of the cluster on
1714
+ # which to run your task. If you do not specify a cluster, the default
1715
+ # cluster is assumed.
1716
+ # @option params [required, String] :task_definition
1717
+ # The `family` and `revision` (`family:revision`) or full Amazon
1718
+ # Resource Name (ARN) of the task definition to run. If a `revision` is
1719
+ # not specified, the latest `ACTIVE` revision is used.
1720
+ # @option params [Types::TaskOverride] :overrides
1721
+ # A list of container overrides in JSON format that specify the name of
1722
+ # a container in the specified task definition and the overrides it
1723
+ # should receive. You can override the default command for a container
1724
+ # (that is specified in the task definition or Docker image) with a
1725
+ # `command` override. You can also override existing environment
1726
+ # variables (that are specified in the task definition or Docker image)
1727
+ # on a container or add new environment variables to it with an
1728
+ # `environment` override.
1729
+ #
1730
+ # <note markdown="1"> A total of 8192 characters are allowed for overrides. This limit
1731
+ # includes the JSON formatting characters of the override structure.
1732
+ #
1733
+ # </note>
1734
+ # @option params [Integer] :count
1735
+ # The number of instantiations of the specified task to place on your
1736
+ # cluster.
1737
+ #
1738
+ # The `count` parameter is limited to 10 tasks per call.
1739
+ # @option params [String] :started_by
1740
+ # An optional tag specified when a task is started. For example if you
1741
+ # automatically trigger a task to run a batch process job, you could
1742
+ # apply a unique identifier for that job to your task with the
1743
+ # `startedBy` parameter. You can then identify which tasks belong to
1744
+ # that job by filtering the results of a ListTasks call with the
1745
+ # `startedBy` value. Up to 36 letters (uppercase and lowercase),
1746
+ # numbers, hyphens, and underscores are allowed.
1747
+ #
1748
+ # If a task is started by an Amazon ECS service, then the `startedBy`
1749
+ # parameter contains the deployment ID of the service that starts it.
1750
+ # @return [Types::RunTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1751
+ #
1752
+ # * {Types::RunTaskResponse#tasks #tasks} => Array&lt;Types::Task&gt;
1753
+ # * {Types::RunTaskResponse#failures #failures} => Array&lt;Types::Failure&gt;
1754
+ #
1755
+ # @example Request syntax with placeholder values
1756
+ # resp = client.run_task({
1757
+ # cluster: "String",
1758
+ # task_definition: "String", # required
1759
+ # overrides: {
1760
+ # container_overrides: [
1761
+ # {
1762
+ # name: "String",
1763
+ # command: ["String"],
1764
+ # environment: [
1765
+ # {
1766
+ # name: "String",
1767
+ # value: "String",
1768
+ # },
1769
+ # ],
1770
+ # },
1771
+ # ],
1772
+ # task_role_arn: "String",
1773
+ # },
1774
+ # count: 1,
1775
+ # started_by: "String",
1776
+ # })
1777
+ #
1778
+ # @example Response structure
1779
+ # resp.tasks #=> Array
1780
+ # resp.tasks[0].task_arn #=> String
1781
+ # resp.tasks[0].cluster_arn #=> String
1782
+ # resp.tasks[0].task_definition_arn #=> String
1783
+ # resp.tasks[0].container_instance_arn #=> String
1784
+ # resp.tasks[0].overrides.container_overrides #=> Array
1785
+ # resp.tasks[0].overrides.container_overrides[0].name #=> String
1786
+ # resp.tasks[0].overrides.container_overrides[0].command #=> Array
1787
+ # resp.tasks[0].overrides.container_overrides[0].command[0] #=> String
1788
+ # resp.tasks[0].overrides.container_overrides[0].environment #=> Array
1789
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].name #=> String
1790
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].value #=> String
1791
+ # resp.tasks[0].overrides.task_role_arn #=> String
1792
+ # resp.tasks[0].last_status #=> String
1793
+ # resp.tasks[0].desired_status #=> String
1794
+ # resp.tasks[0].containers #=> Array
1795
+ # resp.tasks[0].containers[0].container_arn #=> String
1796
+ # resp.tasks[0].containers[0].task_arn #=> String
1797
+ # resp.tasks[0].containers[0].name #=> String
1798
+ # resp.tasks[0].containers[0].last_status #=> String
1799
+ # resp.tasks[0].containers[0].exit_code #=> Integer
1800
+ # resp.tasks[0].containers[0].reason #=> String
1801
+ # resp.tasks[0].containers[0].network_bindings #=> Array
1802
+ # resp.tasks[0].containers[0].network_bindings[0].bind_ip #=> String
1803
+ # resp.tasks[0].containers[0].network_bindings[0].container_port #=> Integer
1804
+ # resp.tasks[0].containers[0].network_bindings[0].host_port #=> Integer
1805
+ # resp.tasks[0].containers[0].network_bindings[0].protocol #=> String, one of "tcp", "udp"
1806
+ # resp.tasks[0].started_by #=> String
1807
+ # resp.tasks[0].version #=> Integer
1808
+ # resp.tasks[0].stopped_reason #=> String
1809
+ # resp.tasks[0].created_at #=> Time
1810
+ # resp.tasks[0].started_at #=> Time
1811
+ # resp.tasks[0].stopped_at #=> Time
1812
+ # resp.failures #=> Array
1813
+ # resp.failures[0].arn #=> String
1814
+ # resp.failures[0].reason #=> String
1815
+ # @overload run_task(params = {})
1816
+ # @param [Hash] params ({})
1817
+ def run_task(params = {}, options = {})
1818
+ req = build_request(:run_task, params)
1819
+ req.send_request(options)
1820
+ end
1821
+
1822
+ # Starts a new task from the specified task definition on the specified
1823
+ # container instance or instances. To use the default Amazon ECS
1824
+ # scheduler to place your task, use `RunTask` instead.
1825
+ #
1826
+ # The list of container instances to start tasks on is limited to 10.
1827
+ # @option params [String] :cluster
1828
+ # The short name or full Amazon Resource Name (ARN) of the cluster on
1829
+ # which to start your task. If you do not specify a cluster, the default
1830
+ # cluster is assumed.
1831
+ # @option params [required, String] :task_definition
1832
+ # The `family` and `revision` (`family:revision`) or full Amazon
1833
+ # Resource Name (ARN) of the task definition to start. If a `revision`
1834
+ # is not specified, the latest `ACTIVE` revision is used.
1835
+ # @option params [Types::TaskOverride] :overrides
1836
+ # A list of container overrides in JSON format that specify the name of
1837
+ # a container in the specified task definition and the overrides it
1838
+ # should receive. You can override the default command for a container
1839
+ # (that is specified in the task definition or Docker image) with a
1840
+ # `command` override. You can also override existing environment
1841
+ # variables (that are specified in the task definition or Docker image)
1842
+ # on a container or add new environment variables to it with an
1843
+ # `environment` override.
1844
+ #
1845
+ # <note markdown="1"> A total of 8192 characters are allowed for overrides. This limit
1846
+ # includes the JSON formatting characters of the override structure.
1847
+ #
1848
+ # </note>
1849
+ # @option params [required, Array<String>] :container_instances
1850
+ # The container instance IDs or full Amazon Resource Name (ARN) entries
1851
+ # for the container instances on which you would like to place your
1852
+ # task.
1853
+ #
1854
+ # The list of container instances to start tasks on is limited to 10.
1855
+ # @option params [String] :started_by
1856
+ # An optional tag specified when a task is started. For example if you
1857
+ # automatically trigger a task to run a batch process job, you could
1858
+ # apply a unique identifier for that job to your task with the
1859
+ # `startedBy` parameter. You can then identify which tasks belong to
1860
+ # that job by filtering the results of a ListTasks call with the
1861
+ # `startedBy` value. Up to 36 letters (uppercase and lowercase),
1862
+ # numbers, hyphens, and underscores are allowed.
1863
+ #
1864
+ # If a task is started by an Amazon ECS service, then the `startedBy`
1865
+ # parameter contains the deployment ID of the service that starts it.
1866
+ # @return [Types::StartTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1867
+ #
1868
+ # * {Types::StartTaskResponse#tasks #tasks} => Array&lt;Types::Task&gt;
1869
+ # * {Types::StartTaskResponse#failures #failures} => Array&lt;Types::Failure&gt;
1870
+ #
1871
+ # @example Request syntax with placeholder values
1872
+ # resp = client.start_task({
1873
+ # cluster: "String",
1874
+ # task_definition: "String", # required
1875
+ # overrides: {
1876
+ # container_overrides: [
1877
+ # {
1878
+ # name: "String",
1879
+ # command: ["String"],
1880
+ # environment: [
1881
+ # {
1882
+ # name: "String",
1883
+ # value: "String",
1884
+ # },
1885
+ # ],
1886
+ # },
1887
+ # ],
1888
+ # task_role_arn: "String",
1889
+ # },
1890
+ # container_instances: ["String"], # required
1891
+ # started_by: "String",
1892
+ # })
1893
+ #
1894
+ # @example Response structure
1895
+ # resp.tasks #=> Array
1896
+ # resp.tasks[0].task_arn #=> String
1897
+ # resp.tasks[0].cluster_arn #=> String
1898
+ # resp.tasks[0].task_definition_arn #=> String
1899
+ # resp.tasks[0].container_instance_arn #=> String
1900
+ # resp.tasks[0].overrides.container_overrides #=> Array
1901
+ # resp.tasks[0].overrides.container_overrides[0].name #=> String
1902
+ # resp.tasks[0].overrides.container_overrides[0].command #=> Array
1903
+ # resp.tasks[0].overrides.container_overrides[0].command[0] #=> String
1904
+ # resp.tasks[0].overrides.container_overrides[0].environment #=> Array
1905
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].name #=> String
1906
+ # resp.tasks[0].overrides.container_overrides[0].environment[0].value #=> String
1907
+ # resp.tasks[0].overrides.task_role_arn #=> String
1908
+ # resp.tasks[0].last_status #=> String
1909
+ # resp.tasks[0].desired_status #=> String
1910
+ # resp.tasks[0].containers #=> Array
1911
+ # resp.tasks[0].containers[0].container_arn #=> String
1912
+ # resp.tasks[0].containers[0].task_arn #=> String
1913
+ # resp.tasks[0].containers[0].name #=> String
1914
+ # resp.tasks[0].containers[0].last_status #=> String
1915
+ # resp.tasks[0].containers[0].exit_code #=> Integer
1916
+ # resp.tasks[0].containers[0].reason #=> String
1917
+ # resp.tasks[0].containers[0].network_bindings #=> Array
1918
+ # resp.tasks[0].containers[0].network_bindings[0].bind_ip #=> String
1919
+ # resp.tasks[0].containers[0].network_bindings[0].container_port #=> Integer
1920
+ # resp.tasks[0].containers[0].network_bindings[0].host_port #=> Integer
1921
+ # resp.tasks[0].containers[0].network_bindings[0].protocol #=> String, one of "tcp", "udp"
1922
+ # resp.tasks[0].started_by #=> String
1923
+ # resp.tasks[0].version #=> Integer
1924
+ # resp.tasks[0].stopped_reason #=> String
1925
+ # resp.tasks[0].created_at #=> Time
1926
+ # resp.tasks[0].started_at #=> Time
1927
+ # resp.tasks[0].stopped_at #=> Time
1928
+ # resp.failures #=> Array
1929
+ # resp.failures[0].arn #=> String
1930
+ # resp.failures[0].reason #=> String
1931
+ # @overload start_task(params = {})
1932
+ # @param [Hash] params ({})
1933
+ def start_task(params = {}, options = {})
1934
+ req = build_request(:start_task, params)
1935
+ req.send_request(options)
1936
+ end
1937
+
1938
+ # Stops a running task.
1939
+ #
1940
+ # When StopTask is called on a task, the equivalent of `docker stop` is
1941
+ # issued to the containers running in the task. This results in a
1942
+ # `SIGTERM` and a 30-second timeout, after which `SIGKILL` is sent and
1943
+ # the containers are forcibly stopped. If the container handles the
1944
+ # `SIGTERM` gracefully and exits within 30 seconds from receiving it, no
1945
+ # `SIGKILL` is sent.
1946
+ # @option params [String] :cluster
1947
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
1948
+ # hosts the task to stop. If you do not specify a cluster, the default
1949
+ # cluster is assumed.
1950
+ # @option params [required, String] :task
1951
+ # The task ID or full Amazon Resource Name (ARN) entry of the task to
1952
+ # stop.
1953
+ # @option params [String] :reason
1954
+ # An optional message specified when a task is stopped. For example, if
1955
+ # you are using a custom scheduler, you can use this parameter to
1956
+ # specify the reason for stopping the task here, and the message will
1957
+ # appear in subsequent DescribeTasks API operations on this task. Up to
1958
+ # 255 characters are allowed in this message.
1959
+ # @return [Types::StopTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1960
+ #
1961
+ # * {Types::StopTaskResponse#task #task} => Types::Task
1962
+ #
1963
+ # @example Request syntax with placeholder values
1964
+ # resp = client.stop_task({
1965
+ # cluster: "String",
1966
+ # task: "String", # required
1967
+ # reason: "String",
1968
+ # })
1969
+ #
1970
+ # @example Response structure
1971
+ # resp.task.task_arn #=> String
1972
+ # resp.task.cluster_arn #=> String
1973
+ # resp.task.task_definition_arn #=> String
1974
+ # resp.task.container_instance_arn #=> String
1975
+ # resp.task.overrides.container_overrides #=> Array
1976
+ # resp.task.overrides.container_overrides[0].name #=> String
1977
+ # resp.task.overrides.container_overrides[0].command #=> Array
1978
+ # resp.task.overrides.container_overrides[0].command[0] #=> String
1979
+ # resp.task.overrides.container_overrides[0].environment #=> Array
1980
+ # resp.task.overrides.container_overrides[0].environment[0].name #=> String
1981
+ # resp.task.overrides.container_overrides[0].environment[0].value #=> String
1982
+ # resp.task.overrides.task_role_arn #=> String
1983
+ # resp.task.last_status #=> String
1984
+ # resp.task.desired_status #=> String
1985
+ # resp.task.containers #=> Array
1986
+ # resp.task.containers[0].container_arn #=> String
1987
+ # resp.task.containers[0].task_arn #=> String
1988
+ # resp.task.containers[0].name #=> String
1989
+ # resp.task.containers[0].last_status #=> String
1990
+ # resp.task.containers[0].exit_code #=> Integer
1991
+ # resp.task.containers[0].reason #=> String
1992
+ # resp.task.containers[0].network_bindings #=> Array
1993
+ # resp.task.containers[0].network_bindings[0].bind_ip #=> String
1994
+ # resp.task.containers[0].network_bindings[0].container_port #=> Integer
1995
+ # resp.task.containers[0].network_bindings[0].host_port #=> Integer
1996
+ # resp.task.containers[0].network_bindings[0].protocol #=> String, one of "tcp", "udp"
1997
+ # resp.task.started_by #=> String
1998
+ # resp.task.version #=> Integer
1999
+ # resp.task.stopped_reason #=> String
2000
+ # resp.task.created_at #=> Time
2001
+ # resp.task.started_at #=> Time
2002
+ # resp.task.stopped_at #=> Time
2003
+ # @overload stop_task(params = {})
2004
+ # @param [Hash] params ({})
2005
+ def stop_task(params = {}, options = {})
2006
+ req = build_request(:stop_task, params)
2007
+ req.send_request(options)
2008
+ end
2009
+
2010
+ # <note markdown="1"> This action is only used by the Amazon EC2 Container Service agent,
2011
+ # and it is not intended for use outside of the agent.
2012
+ #
2013
+ # </note>
2014
+ #
2015
+ # Sent to acknowledge that a container changed states.
2016
+ # @option params [String] :cluster
2017
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
2018
+ # hosts the container.
2019
+ # @option params [String] :task
2020
+ # The task ID or full Amazon Resource Name (ARN) of the task that hosts
2021
+ # the container.
2022
+ # @option params [String] :container_name
2023
+ # The name of the container.
2024
+ # @option params [String] :status
2025
+ # The status of the state change request.
2026
+ # @option params [Integer] :exit_code
2027
+ # The exit code returned for the state change request.
2028
+ # @option params [String] :reason
2029
+ # The reason for the state change request.
2030
+ # @option params [Array<Types::NetworkBinding>] :network_bindings
2031
+ # The network bindings of the container.
2032
+ # @return [Types::SubmitContainerStateChangeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2033
+ #
2034
+ # * {Types::SubmitContainerStateChangeResponse#acknowledgment #acknowledgment} => String
2035
+ #
2036
+ # @example Request syntax with placeholder values
2037
+ # resp = client.submit_container_state_change({
2038
+ # cluster: "String",
2039
+ # task: "String",
2040
+ # container_name: "String",
2041
+ # status: "String",
2042
+ # exit_code: 1,
2043
+ # reason: "String",
2044
+ # network_bindings: [
2045
+ # {
2046
+ # bind_ip: "String",
2047
+ # container_port: 1,
2048
+ # host_port: 1,
2049
+ # protocol: "tcp", # accepts tcp, udp
2050
+ # },
2051
+ # ],
2052
+ # })
2053
+ #
2054
+ # @example Response structure
2055
+ # resp.acknowledgment #=> String
2056
+ # @overload submit_container_state_change(params = {})
2057
+ # @param [Hash] params ({})
2058
+ def submit_container_state_change(params = {}, options = {})
2059
+ req = build_request(:submit_container_state_change, params)
2060
+ req.send_request(options)
2061
+ end
2062
+
2063
+ # <note markdown="1"> This action is only used by the Amazon EC2 Container Service agent,
2064
+ # and it is not intended for use outside of the agent.
2065
+ #
2066
+ # </note>
2067
+ #
2068
+ # Sent to acknowledge that a task changed states.
2069
+ # @option params [String] :cluster
2070
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
2071
+ # hosts the task.
2072
+ # @option params [String] :task
2073
+ # The task ID or full Amazon Resource Name (ARN) of the task in the
2074
+ # state change request.
2075
+ # @option params [String] :status
2076
+ # The status of the state change request.
2077
+ # @option params [String] :reason
2078
+ # The reason for the state change request.
2079
+ # @return [Types::SubmitTaskStateChangeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2080
+ #
2081
+ # * {Types::SubmitTaskStateChangeResponse#acknowledgment #acknowledgment} => String
2082
+ #
2083
+ # @example Request syntax with placeholder values
2084
+ # resp = client.submit_task_state_change({
2085
+ # cluster: "String",
2086
+ # task: "String",
2087
+ # status: "String",
2088
+ # reason: "String",
2089
+ # })
2090
+ #
2091
+ # @example Response structure
2092
+ # resp.acknowledgment #=> String
2093
+ # @overload submit_task_state_change(params = {})
2094
+ # @param [Hash] params ({})
2095
+ def submit_task_state_change(params = {}, options = {})
2096
+ req = build_request(:submit_task_state_change, params)
2097
+ req.send_request(options)
2098
+ end
2099
+
2100
+ # Updates the Amazon ECS container agent on a specified container
2101
+ # instance. Updating the Amazon ECS container agent does not interrupt
2102
+ # running tasks or services on the container instance. The process for
2103
+ # updating the agent differs depending on whether your container
2104
+ # instance was launched with the Amazon ECS-optimized AMI or another
2105
+ # operating system.
2106
+ #
2107
+ # `UpdateContainerAgent` requires the Amazon ECS-optimized AMI or Amazon
2108
+ # Linux with the `ecs-init` service installed and running. For help
2109
+ # updating the Amazon ECS container agent on other operating systems,
2110
+ # see [Manually Updating the Amazon ECS Container Agent][1] in the
2111
+ # *Amazon EC2 Container Service Developer Guide*.
2112
+ #
2113
+ #
2114
+ #
2115
+ # [1]: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent
2116
+ # @option params [String] :cluster
2117
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
2118
+ # your container instance is running on. If you do not specify a
2119
+ # cluster, the default cluster is assumed.
2120
+ # @option params [required, String] :container_instance
2121
+ # The container instance ID or full Amazon Resource Name (ARN) entries
2122
+ # for the container instance on which you would like to update the
2123
+ # Amazon ECS container agent.
2124
+ # @return [Types::UpdateContainerAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2125
+ #
2126
+ # * {Types::UpdateContainerAgentResponse#container_instance #containerInstance} => Types::ContainerInstance
2127
+ #
2128
+ # @example Request syntax with placeholder values
2129
+ # resp = client.update_container_agent({
2130
+ # cluster: "String",
2131
+ # container_instance: "String", # required
2132
+ # })
2133
+ #
2134
+ # @example Response structure
2135
+ # resp.container_instance.container_instance_arn #=> String
2136
+ # resp.container_instance.ec2_instance_id #=> String
2137
+ # resp.container_instance.version #=> Integer
2138
+ # resp.container_instance.version_info.agent_version #=> String
2139
+ # resp.container_instance.version_info.agent_hash #=> String
2140
+ # resp.container_instance.version_info.docker_version #=> String
2141
+ # resp.container_instance.remaining_resources #=> Array
2142
+ # resp.container_instance.remaining_resources[0].name #=> String
2143
+ # resp.container_instance.remaining_resources[0].type #=> String
2144
+ # resp.container_instance.remaining_resources[0].double_value #=> Float
2145
+ # resp.container_instance.remaining_resources[0].long_value #=> Integer
2146
+ # resp.container_instance.remaining_resources[0].integer_value #=> Integer
2147
+ # resp.container_instance.remaining_resources[0].string_set_value #=> Array
2148
+ # resp.container_instance.remaining_resources[0].string_set_value[0] #=> String
2149
+ # resp.container_instance.registered_resources #=> Array
2150
+ # resp.container_instance.registered_resources[0].name #=> String
2151
+ # resp.container_instance.registered_resources[0].type #=> String
2152
+ # resp.container_instance.registered_resources[0].double_value #=> Float
2153
+ # resp.container_instance.registered_resources[0].long_value #=> Integer
2154
+ # resp.container_instance.registered_resources[0].integer_value #=> Integer
2155
+ # resp.container_instance.registered_resources[0].string_set_value #=> Array
2156
+ # resp.container_instance.registered_resources[0].string_set_value[0] #=> String
2157
+ # resp.container_instance.status #=> String
2158
+ # resp.container_instance.agent_connected #=> Boolean
2159
+ # resp.container_instance.running_tasks_count #=> Integer
2160
+ # resp.container_instance.pending_tasks_count #=> Integer
2161
+ # resp.container_instance.agent_update_status #=> String, one of "PENDING", "STAGING", "STAGED", "UPDATING", "UPDATED", "FAILED"
2162
+ # resp.container_instance.attributes #=> Array
2163
+ # resp.container_instance.attributes[0].name #=> String
2164
+ # resp.container_instance.attributes[0].value #=> String
2165
+ # @overload update_container_agent(params = {})
2166
+ # @param [Hash] params ({})
2167
+ def update_container_agent(params = {}, options = {})
2168
+ req = build_request(:update_container_agent, params)
2169
+ req.send_request(options)
2170
+ end
2171
+
2172
+ # Modifies the desired count, deployment configuration, or task
2173
+ # definition used in a service.
2174
+ #
2175
+ # You can add to or subtract from the number of instantiations of a task
2176
+ # definition in a service by specifying the cluster that the service is
2177
+ # running in and a new `desiredCount` parameter.
2178
+ #
2179
+ # You can use UpdateService to modify your task definition and deploy a
2180
+ # new version of your service.
2181
+ #
2182
+ # You can also update the deployment configuration of a service. When a
2183
+ # deployment is triggered by updating the task definition of a service,
2184
+ # the service scheduler uses the deployment configuration parameters,
2185
+ # `minimumHealthyPercent` and `maximumPercent`, to determine the
2186
+ # deployment strategy.
2187
+ #
2188
+ # If the `minimumHealthyPercent` is below 100%, the scheduler can ignore
2189
+ # the `desiredCount` temporarily during a deployment. For example, if
2190
+ # your service has a `desiredCount` of four tasks, a
2191
+ # `minimumHealthyPercent` of 50% allows the scheduler to stop two
2192
+ # existing tasks before starting two new tasks. Tasks for services that
2193
+ # *do not* use a load balancer are considered healthy if they are in the
2194
+ # `RUNNING` state; tasks for services that *do* use a load balancer are
2195
+ # considered healthy if they are in the `RUNNING` state and the
2196
+ # container instance it is hosted on is reported as healthy by the load
2197
+ # balancer.
2198
+ #
2199
+ # The `maximumPercent` parameter represents an upper limit on the number
2200
+ # of running tasks during a deployment, which enables you to define the
2201
+ # deployment batch size. For example, if your service has a
2202
+ # `desiredCount` of four tasks, a `maximumPercent` value of 200% starts
2203
+ # four new tasks before stopping the four older tasks (provided that the
2204
+ # cluster resources required to do this are available).
2205
+ #
2206
+ # When UpdateService stops a task during a deployment, the equivalent of
2207
+ # `docker stop` is issued to the containers running in the task. This
2208
+ # results in a `SIGTERM` and a 30-second timeout, after which `SIGKILL`
2209
+ # is sent and the containers are forcibly stopped. If the container
2210
+ # handles the `SIGTERM` gracefully and exits within 30 seconds from
2211
+ # receiving it, no `SIGKILL` is sent.
2212
+ #
2213
+ # When the service scheduler launches new tasks, it attempts to balance
2214
+ # them across the Availability Zones in your cluster with the following
2215
+ # logic:
2216
+ #
2217
+ # * Determine which of the container instances in your cluster can
2218
+ # support your service's task definition (for example, they have the
2219
+ # required CPU, memory, ports, and container instance attributes).
2220
+ #
2221
+ # * Sort the valid container instances by the fewest number of running
2222
+ # tasks for this service in the same Availability Zone as the
2223
+ # instance. For example, if zone A has one running service task and
2224
+ # zones B and C each have zero, valid container instances in either
2225
+ # zone B or C are considered optimal for placement.
2226
+ #
2227
+ # * Place the new service task on a valid container instance in an
2228
+ # optimal Availability Zone (based on the previous steps), favoring
2229
+ # container instances with the fewest number of running tasks for this
2230
+ # service.
2231
+ # @option params [String] :cluster
2232
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
2233
+ # your service is running on. If you do not specify a cluster, the
2234
+ # default cluster is assumed.
2235
+ # @option params [required, String] :service
2236
+ # The name of the service to update.
2237
+ # @option params [Integer] :desired_count
2238
+ # The number of instantiations of the task to place and keep running in
2239
+ # your service.
2240
+ # @option params [String] :task_definition
2241
+ # The `family` and `revision` (`family:revision`) or full Amazon
2242
+ # Resource Name (ARN) of the task definition to run in your service. If
2243
+ # a `revision` is not specified, the latest `ACTIVE` revision is used.
2244
+ # If you modify the task definition with `UpdateService`, Amazon ECS
2245
+ # spawns a task with the new version of the task definition and then
2246
+ # stops an old task after the new version is running.
2247
+ # @option params [Types::DeploymentConfiguration] :deployment_configuration
2248
+ # Optional deployment parameters that control how many tasks run during
2249
+ # the deployment and the ordering of stopping and starting tasks.
2250
+ # @return [Types::UpdateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2251
+ #
2252
+ # * {Types::UpdateServiceResponse#service #service} => Types::Service
2253
+ #
2254
+ # @example Request syntax with placeholder values
2255
+ # resp = client.update_service({
2256
+ # cluster: "String",
2257
+ # service: "String", # required
2258
+ # desired_count: 1,
2259
+ # task_definition: "String",
2260
+ # deployment_configuration: {
2261
+ # maximum_percent: 1,
2262
+ # minimum_healthy_percent: 1,
2263
+ # },
2264
+ # })
2265
+ #
2266
+ # @example Response structure
2267
+ # resp.service.service_arn #=> String
2268
+ # resp.service.service_name #=> String
2269
+ # resp.service.cluster_arn #=> String
2270
+ # resp.service.load_balancers #=> Array
2271
+ # resp.service.load_balancers[0].target_group_arn #=> String
2272
+ # resp.service.load_balancers[0].load_balancer_name #=> String
2273
+ # resp.service.load_balancers[0].container_name #=> String
2274
+ # resp.service.load_balancers[0].container_port #=> Integer
2275
+ # resp.service.status #=> String
2276
+ # resp.service.desired_count #=> Integer
2277
+ # resp.service.running_count #=> Integer
2278
+ # resp.service.pending_count #=> Integer
2279
+ # resp.service.task_definition #=> String
2280
+ # resp.service.deployment_configuration.maximum_percent #=> Integer
2281
+ # resp.service.deployment_configuration.minimum_healthy_percent #=> Integer
2282
+ # resp.service.deployments #=> Array
2283
+ # resp.service.deployments[0].id #=> String
2284
+ # resp.service.deployments[0].status #=> String
2285
+ # resp.service.deployments[0].task_definition #=> String
2286
+ # resp.service.deployments[0].desired_count #=> Integer
2287
+ # resp.service.deployments[0].pending_count #=> Integer
2288
+ # resp.service.deployments[0].running_count #=> Integer
2289
+ # resp.service.deployments[0].created_at #=> Time
2290
+ # resp.service.deployments[0].updated_at #=> Time
2291
+ # resp.service.role_arn #=> String
2292
+ # resp.service.events #=> Array
2293
+ # resp.service.events[0].id #=> String
2294
+ # resp.service.events[0].created_at #=> Time
2295
+ # resp.service.events[0].message #=> String
2296
+ # resp.service.created_at #=> Time
2297
+ # @overload update_service(params = {})
2298
+ # @param [Hash] params ({})
2299
+ def update_service(params = {}, options = {})
2300
+ req = build_request(:update_service, params)
2301
+ req.send_request(options)
2302
+ end
2303
+
2304
+ # @!endgroup
2305
+
2306
+ # @param params ({})
2307
+ # @api private
2308
+ def build_request(operation_name, params = {})
2309
+ handlers = @handlers.for(operation_name)
2310
+ context = Seahorse::Client::RequestContext.new(
2311
+ operation_name: operation_name,
2312
+ operation: config.api.operation(operation_name),
2313
+ client: self,
2314
+ params: params,
2315
+ config: config)
2316
+ context[:gem_name] = 'aws-sdk-ecs'
2317
+ context[:gem_version] = '1.0.0.rc1'
2318
+ Seahorse::Client::Request.new(handlers, context)
2319
+ end
2320
+
2321
+ # Polls an API operation until a resource enters a desired state.
2322
+ #
2323
+ # ## Basic Usage
2324
+ #
2325
+ # A waiter will call an API operation until:
2326
+ #
2327
+ # * It is successful
2328
+ # * It enters a terminal state
2329
+ # * It makes the maximum number of attempts
2330
+ #
2331
+ # In between attempts, the waiter will sleep.
2332
+ #
2333
+ # # polls in a loop, sleeping between attempts
2334
+ # client.waiter_until(waiter_name, params)
2335
+ #
2336
+ # ## Configuration
2337
+ #
2338
+ # You can configure the maximum number of polling attempts, and the
2339
+ # delay (in seconds) between each polling attempt. You can pass
2340
+ # configuration as the final arguments hash.
2341
+ #
2342
+ # # poll for ~25 seconds
2343
+ # client.wait_until(waiter_name, params, {
2344
+ # max_attempts: 5,
2345
+ # delay: 5,
2346
+ # })
2347
+ #
2348
+ # ## Callbacks
2349
+ #
2350
+ # You can be notified before each polling attempt and before each
2351
+ # delay. If you throw `:success` or `:failure` from these callbacks,
2352
+ # it will terminate the waiter.
2353
+ #
2354
+ # started_at = Time.now
2355
+ # client.wait_until(waiter_name, params, {
2356
+ #
2357
+ # # disable max attempts
2358
+ # max_attempts: nil,
2359
+ #
2360
+ # # poll for 1 hour, instead of a number of attempts
2361
+ # before_wait: -> (attempts, response) do
2362
+ # throw :failure if Time.now - started_at > 3600
2363
+ # end
2364
+ # })
2365
+ #
2366
+ # ## Handling Errors
2367
+ #
2368
+ # When a waiter is unsuccessful, it will raise an error.
2369
+ # All of the failure errors extend from
2370
+ # {Aws::Waiters::Errors::WaiterFailed}.
2371
+ #
2372
+ # begin
2373
+ # client.wait_until(...)
2374
+ # rescue Aws::Waiters::Errors::WaiterFailed
2375
+ # # resource did not enter the desired state in time
2376
+ # end
2377
+ #
2378
+ # ## Valid Waiters
2379
+ #
2380
+ # The following table lists the valid waiter names, the operations they call,
2381
+ # and the default `:delay` and `:max_attempts` values.
2382
+ #
2383
+ # | waiter_name | params | :delay | :max_attempts |
2384
+ # | ----------------- | -------------------- | -------- | ------------- |
2385
+ # | services_inactive | {#describe_services} | 15 | 40 |
2386
+ # | services_stable | {#describe_services} | 15 | 40 |
2387
+ # | tasks_running | {#describe_tasks} | 6 | 100 |
2388
+ # | tasks_stopped | {#describe_tasks} | 6 | 100 |
2389
+ #
2390
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
2391
+ # because the waiter has entered a state that it will not transition
2392
+ # out of, preventing success.
2393
+ #
2394
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
2395
+ # maximum number of attempts have been made, and the waiter is not
2396
+ # yet successful.
2397
+ #
2398
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
2399
+ # while polling for a resource that is not expected.
2400
+ #
2401
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
2402
+ # for an unknown state.
2403
+ #
2404
+ # @return [Boolean] Returns `true` if the waiter was successful.
2405
+ # @param [Symbol] waiter_name
2406
+ # @param [Hash] params ({})
2407
+ # @param [Hash] options ({})
2408
+ # @option options [Integer] :max_attempts
2409
+ # @option options [Integer] :delay
2410
+ # @option options [Proc] :before_attempt
2411
+ # @option options [Proc] :before_wait
2412
+ def wait_until(waiter_name, params = {}, options = {})
2413
+ w = waiter(waiter_name, options)
2414
+ yield(w.waiter) if block_given? # deprecated
2415
+ w.wait(params)
2416
+ end
2417
+
2418
+ # @api private
2419
+ # @deprecated
2420
+ def waiter_names
2421
+ waiters.keys
2422
+ end
2423
+
2424
+ private
2425
+
2426
+ # @param [Symbol] waiter_name
2427
+ # @param [Hash] options ({})
2428
+ def waiter(waiter_name, options = {})
2429
+ waiter_class = waiters[waiter_name]
2430
+ if waiter_class
2431
+ waiter_class.new(options.merge(client: self))
2432
+ else
2433
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
2434
+ end
2435
+ end
2436
+
2437
+ def waiters
2438
+ {
2439
+ tasks_running: Waiters::TasksRunning,
2440
+ tasks_stopped: Waiters::TasksStopped,
2441
+ services_stable: Waiters::ServicesStable,
2442
+ services_inactive: Waiters::ServicesInactive
2443
+ }
2444
+ end
2445
+
2446
+ class << self
2447
+
2448
+ # @api private
2449
+ attr_reader :identifier
2450
+
2451
+ # @api private
2452
+ def errors_module
2453
+ Errors
2454
+ end
2455
+
2456
+ end
2457
+ end
2458
+ end
2459
+ end