aws-sdk-ecs 1.104.0 → 1.106.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-ecs/client.rb +571 -9
- data/lib/aws-sdk-ecs/client_api.rb +149 -0
- data/lib/aws-sdk-ecs/endpoints.rb +42 -0
- data/lib/aws-sdk-ecs/errors.rb +11 -0
- data/lib/aws-sdk-ecs/plugins/endpoints.rb +6 -0
- data/lib/aws-sdk-ecs/types.rb +989 -26
- data/lib/aws-sdk-ecs.rb +1 -1
- metadata +2 -2
data/lib/aws-sdk-ecs/client.rb
CHANGED
@@ -577,6 +577,28 @@ module Aws::ECS
|
|
577
577
|
# when it was created, it can be defined later with the
|
578
578
|
# PutClusterCapacityProviders API operation.
|
579
579
|
#
|
580
|
+
# @option params [Types::ClusterServiceConnectDefaultsRequest] :service_connect_defaults
|
581
|
+
# Use this parameter to set a default Service Connect namespace. After
|
582
|
+
# you set a default Service Connect namespace, any new services with
|
583
|
+
# Service Connect turned on that are created in the cluster are added as
|
584
|
+
# client services in the namespace. This setting only applies to new
|
585
|
+
# services that set the `enabled` parameter to `true` in the
|
586
|
+
# `ServiceConnectConfiguration`. You can set the namespace of each
|
587
|
+
# service individually in the `ServiceConnectConfiguration` to override
|
588
|
+
# this default parameter.
|
589
|
+
#
|
590
|
+
# Tasks that run in a namespace can use short names to connect to
|
591
|
+
# services in the namespace. Tasks can connect to services across all of
|
592
|
+
# the clusters in the namespace. Tasks connect through a managed proxy
|
593
|
+
# container that collects logs and metrics for increased visibility.
|
594
|
+
# Only the tasks that Amazon ECS services create are supported with
|
595
|
+
# Service Connect. For more information, see [Service Connect][1] in the
|
596
|
+
# *Amazon Elastic Container Service Developer Guide*.
|
597
|
+
#
|
598
|
+
#
|
599
|
+
#
|
600
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
601
|
+
#
|
580
602
|
# @return [Types::CreateClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
581
603
|
#
|
582
604
|
# * {Types::CreateClusterResponse#cluster #cluster} => Types::Cluster
|
@@ -640,6 +662,9 @@ module Aws::ECS
|
|
640
662
|
# base: 1,
|
641
663
|
# },
|
642
664
|
# ],
|
665
|
+
# service_connect_defaults: {
|
666
|
+
# namespace: "String", # required
|
667
|
+
# },
|
643
668
|
# })
|
644
669
|
#
|
645
670
|
# @example Response structure
|
@@ -681,6 +706,7 @@ module Aws::ECS
|
|
681
706
|
# resp.cluster.attachments[0].details[0].name #=> String
|
682
707
|
# resp.cluster.attachments[0].details[0].value #=> String
|
683
708
|
# resp.cluster.attachments_status #=> String
|
709
|
+
# resp.cluster.service_connect_defaults.namespace #=> String
|
684
710
|
#
|
685
711
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/CreateCluster AWS API Documentation
|
686
712
|
#
|
@@ -1015,8 +1041,8 @@ module Aws::ECS
|
|
1015
1041
|
# defined and you don't specify a health check grace period value, the
|
1016
1042
|
# default value of `0` is used.
|
1017
1043
|
#
|
1018
|
-
# If you do not use an Elastic Load Balancing, we
|
1019
|
-
# the `startPeriod` in the task definition
|
1044
|
+
# If you do not use an Elastic Load Balancing, we recommend that you use
|
1045
|
+
# the `startPeriod` in the task definition health check parameters. For
|
1020
1046
|
# more information, see [Health check][1].
|
1021
1047
|
#
|
1022
1048
|
# If your service's tasks take a while to start and respond to Elastic
|
@@ -1118,6 +1144,23 @@ module Aws::ECS
|
|
1118
1144
|
# the service. If `true`, this enables execute command functionality on
|
1119
1145
|
# all containers in the service tasks.
|
1120
1146
|
#
|
1147
|
+
# @option params [Types::ServiceConnectConfiguration] :service_connect_configuration
|
1148
|
+
# The configuration for this service to discover and connect to
|
1149
|
+
# services, and be discovered by, and connected from, other services
|
1150
|
+
# within a namespace.
|
1151
|
+
#
|
1152
|
+
# Tasks that run in a namespace can use short names to connect to
|
1153
|
+
# services in the namespace. Tasks can connect to services across all of
|
1154
|
+
# the clusters in the namespace. Tasks connect through a managed proxy
|
1155
|
+
# container that collects logs and metrics for increased visibility.
|
1156
|
+
# Only the tasks that Amazon ECS services create are supported with
|
1157
|
+
# Service Connect. For more information, see [Service Connect][1] in the
|
1158
|
+
# *Amazon Elastic Container Service Developer Guide*.
|
1159
|
+
#
|
1160
|
+
#
|
1161
|
+
#
|
1162
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
1163
|
+
#
|
1121
1164
|
# @return [Types::CreateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1122
1165
|
#
|
1123
1166
|
# * {Types::CreateServiceResponse#service #service} => Types::Service
|
@@ -1315,6 +1358,35 @@ module Aws::ECS
|
|
1315
1358
|
# enable_ecs_managed_tags: false,
|
1316
1359
|
# propagate_tags: "TASK_DEFINITION", # accepts TASK_DEFINITION, SERVICE, NONE
|
1317
1360
|
# enable_execute_command: false,
|
1361
|
+
# service_connect_configuration: {
|
1362
|
+
# enabled: false, # required
|
1363
|
+
# namespace: "String",
|
1364
|
+
# services: [
|
1365
|
+
# {
|
1366
|
+
# port_name: "String", # required
|
1367
|
+
# discovery_name: "String",
|
1368
|
+
# client_aliases: [
|
1369
|
+
# {
|
1370
|
+
# port: 1, # required
|
1371
|
+
# dns_name: "String",
|
1372
|
+
# },
|
1373
|
+
# ],
|
1374
|
+
# ingress_port_override: 1,
|
1375
|
+
# },
|
1376
|
+
# ],
|
1377
|
+
# log_configuration: {
|
1378
|
+
# log_driver: "json-file", # required, accepts json-file, syslog, journald, gelf, fluentd, awslogs, splunk, awsfirelens
|
1379
|
+
# options: {
|
1380
|
+
# "String" => "String",
|
1381
|
+
# },
|
1382
|
+
# secret_options: [
|
1383
|
+
# {
|
1384
|
+
# name: "String", # required
|
1385
|
+
# value_from: "String", # required
|
1386
|
+
# },
|
1387
|
+
# ],
|
1388
|
+
# },
|
1389
|
+
# },
|
1318
1390
|
# })
|
1319
1391
|
#
|
1320
1392
|
# @example Response structure
|
@@ -1415,6 +1487,24 @@ module Aws::ECS
|
|
1415
1487
|
# resp.service.deployments[0].network_configuration.awsvpc_configuration.assign_public_ip #=> String, one of "ENABLED", "DISABLED"
|
1416
1488
|
# resp.service.deployments[0].rollout_state #=> String, one of "COMPLETED", "FAILED", "IN_PROGRESS"
|
1417
1489
|
# resp.service.deployments[0].rollout_state_reason #=> String
|
1490
|
+
# resp.service.deployments[0].service_connect_configuration.enabled #=> Boolean
|
1491
|
+
# resp.service.deployments[0].service_connect_configuration.namespace #=> String
|
1492
|
+
# resp.service.deployments[0].service_connect_configuration.services #=> Array
|
1493
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].port_name #=> String
|
1494
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].discovery_name #=> String
|
1495
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases #=> Array
|
1496
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].port #=> Integer
|
1497
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].dns_name #=> String
|
1498
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].ingress_port_override #=> Integer
|
1499
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk", "awsfirelens"
|
1500
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options #=> Hash
|
1501
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options["String"] #=> String
|
1502
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options #=> Array
|
1503
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].name #=> String
|
1504
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].value_from #=> String
|
1505
|
+
# resp.service.deployments[0].service_connect_resources #=> Array
|
1506
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_name #=> String
|
1507
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_arn #=> String
|
1418
1508
|
# resp.service.role_arn #=> String
|
1419
1509
|
# resp.service.events #=> Array
|
1420
1510
|
# resp.service.events[0].id #=> String
|
@@ -1968,6 +2058,7 @@ module Aws::ECS
|
|
1968
2058
|
# resp.cluster.attachments[0].details[0].name #=> String
|
1969
2059
|
# resp.cluster.attachments[0].details[0].value #=> String
|
1970
2060
|
# resp.cluster.attachments_status #=> String
|
2061
|
+
# resp.cluster.service_connect_defaults.namespace #=> String
|
1971
2062
|
#
|
1972
2063
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteCluster AWS API Documentation
|
1973
2064
|
#
|
@@ -2138,6 +2229,24 @@ module Aws::ECS
|
|
2138
2229
|
# resp.service.deployments[0].network_configuration.awsvpc_configuration.assign_public_ip #=> String, one of "ENABLED", "DISABLED"
|
2139
2230
|
# resp.service.deployments[0].rollout_state #=> String, one of "COMPLETED", "FAILED", "IN_PROGRESS"
|
2140
2231
|
# resp.service.deployments[0].rollout_state_reason #=> String
|
2232
|
+
# resp.service.deployments[0].service_connect_configuration.enabled #=> Boolean
|
2233
|
+
# resp.service.deployments[0].service_connect_configuration.namespace #=> String
|
2234
|
+
# resp.service.deployments[0].service_connect_configuration.services #=> Array
|
2235
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].port_name #=> String
|
2236
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].discovery_name #=> String
|
2237
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases #=> Array
|
2238
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].port #=> Integer
|
2239
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].dns_name #=> String
|
2240
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].ingress_port_override #=> Integer
|
2241
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk", "awsfirelens"
|
2242
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options #=> Hash
|
2243
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options["String"] #=> String
|
2244
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options #=> Array
|
2245
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].name #=> String
|
2246
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].value_from #=> String
|
2247
|
+
# resp.service.deployments[0].service_connect_resources #=> Array
|
2248
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_name #=> String
|
2249
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_arn #=> String
|
2141
2250
|
# resp.service.role_arn #=> String
|
2142
2251
|
# resp.service.events #=> Array
|
2143
2252
|
# resp.service.events[0].id #=> String
|
@@ -2459,6 +2568,8 @@ module Aws::ECS
|
|
2459
2568
|
# resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
|
2460
2569
|
# resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
|
2461
2570
|
# resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
|
2571
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].name #=> String
|
2572
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].app_protocol #=> String, one of "http", "http2", "grpc"
|
2462
2573
|
# resp.task_definition.container_definitions[0].essential #=> Boolean
|
2463
2574
|
# resp.task_definition.container_definitions[0].entry_point #=> Array
|
2464
2575
|
# resp.task_definition.container_definitions[0].entry_point[0] #=> String
|
@@ -2711,7 +2822,8 @@ module Aws::ECS
|
|
2711
2822
|
# isn't included.
|
2712
2823
|
#
|
2713
2824
|
# If `ATTACHMENTS` is specified, the attachments for the container
|
2714
|
-
# instances or tasks within the cluster are included
|
2825
|
+
# instances or tasks within the cluster are included, for example the
|
2826
|
+
# capacity providers.
|
2715
2827
|
#
|
2716
2828
|
# If `SETTINGS` is specified, the settings for the cluster are included.
|
2717
2829
|
#
|
@@ -2800,6 +2912,7 @@ module Aws::ECS
|
|
2800
2912
|
# resp.clusters[0].attachments[0].details[0].name #=> String
|
2801
2913
|
# resp.clusters[0].attachments[0].details[0].value #=> String
|
2802
2914
|
# resp.clusters[0].attachments_status #=> String
|
2915
|
+
# resp.clusters[0].service_connect_defaults.namespace #=> String
|
2803
2916
|
# resp.failures #=> Array
|
2804
2917
|
# resp.failures[0].arn #=> String
|
2805
2918
|
# resp.failures[0].reason #=> String
|
@@ -3190,6 +3303,24 @@ module Aws::ECS
|
|
3190
3303
|
# resp.services[0].deployments[0].network_configuration.awsvpc_configuration.assign_public_ip #=> String, one of "ENABLED", "DISABLED"
|
3191
3304
|
# resp.services[0].deployments[0].rollout_state #=> String, one of "COMPLETED", "FAILED", "IN_PROGRESS"
|
3192
3305
|
# resp.services[0].deployments[0].rollout_state_reason #=> String
|
3306
|
+
# resp.services[0].deployments[0].service_connect_configuration.enabled #=> Boolean
|
3307
|
+
# resp.services[0].deployments[0].service_connect_configuration.namespace #=> String
|
3308
|
+
# resp.services[0].deployments[0].service_connect_configuration.services #=> Array
|
3309
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].port_name #=> String
|
3310
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].discovery_name #=> String
|
3311
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].client_aliases #=> Array
|
3312
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].client_aliases[0].port #=> Integer
|
3313
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].client_aliases[0].dns_name #=> String
|
3314
|
+
# resp.services[0].deployments[0].service_connect_configuration.services[0].ingress_port_override #=> Integer
|
3315
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk", "awsfirelens"
|
3316
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.options #=> Hash
|
3317
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.options["String"] #=> String
|
3318
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.secret_options #=> Array
|
3319
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.secret_options[0].name #=> String
|
3320
|
+
# resp.services[0].deployments[0].service_connect_configuration.log_configuration.secret_options[0].value_from #=> String
|
3321
|
+
# resp.services[0].deployments[0].service_connect_resources #=> Array
|
3322
|
+
# resp.services[0].deployments[0].service_connect_resources[0].discovery_name #=> String
|
3323
|
+
# resp.services[0].deployments[0].service_connect_resources[0].discovery_arn #=> String
|
3193
3324
|
# resp.services[0].role_arn #=> String
|
3194
3325
|
# resp.services[0].events #=> Array
|
3195
3326
|
# resp.services[0].events[0].id #=> String
|
@@ -3348,6 +3479,8 @@ module Aws::ECS
|
|
3348
3479
|
# resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
|
3349
3480
|
# resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
|
3350
3481
|
# resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
|
3482
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].name #=> String
|
3483
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].app_protocol #=> String, one of "http", "http2", "grpc"
|
3351
3484
|
# resp.task_definition.container_definitions[0].essential #=> Boolean
|
3352
3485
|
# resp.task_definition.container_definitions[0].entry_point #=> Array
|
3353
3486
|
# resp.task_definition.container_definitions[0].entry_point[0] #=> String
|
@@ -3780,7 +3913,7 @@ module Aws::ECS
|
|
3780
3913
|
# resp.tasks[0].pull_stopped_at #=> Time
|
3781
3914
|
# resp.tasks[0].started_at #=> Time
|
3782
3915
|
# resp.tasks[0].started_by #=> String
|
3783
|
-
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated"
|
3916
|
+
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated", "ServiceSchedulerInitiated", "SpotInterruption", "TerminationNotice"
|
3784
3917
|
# resp.tasks[0].stopped_at #=> Time
|
3785
3918
|
# resp.tasks[0].stopped_reason #=> String
|
3786
3919
|
# resp.tasks[0].stopping_at #=> Time
|
@@ -3835,6 +3968,7 @@ module Aws::ECS
|
|
3835
3968
|
#
|
3836
3969
|
# * {Types::DiscoverPollEndpointResponse#endpoint #endpoint} => String
|
3837
3970
|
# * {Types::DiscoverPollEndpointResponse#telemetry_endpoint #telemetry_endpoint} => String
|
3971
|
+
# * {Types::DiscoverPollEndpointResponse#service_connect_endpoint #service_connect_endpoint} => String
|
3838
3972
|
#
|
3839
3973
|
# @example Request syntax with placeholder values
|
3840
3974
|
#
|
@@ -3847,6 +3981,7 @@ module Aws::ECS
|
|
3847
3981
|
#
|
3848
3982
|
# resp.endpoint #=> String
|
3849
3983
|
# resp.telemetry_endpoint #=> String
|
3984
|
+
# resp.service_connect_endpoint #=> String
|
3850
3985
|
#
|
3851
3986
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DiscoverPollEndpoint AWS API Documentation
|
3852
3987
|
#
|
@@ -3861,7 +3996,7 @@ module Aws::ECS
|
|
3861
3996
|
#
|
3862
3997
|
# If you use a condition key in your IAM policy to refine the conditions
|
3863
3998
|
# for the policy statement, for example limit the actions to a specific
|
3864
|
-
# cluster, you
|
3999
|
+
# cluster, you receive an `AccessDeniedException` when there is a
|
3865
4000
|
# mismatch between the condition key value and the corresponding
|
3866
4001
|
# parameter value.
|
3867
4002
|
#
|
@@ -3923,6 +4058,72 @@ module Aws::ECS
|
|
3923
4058
|
req.send_request(options)
|
3924
4059
|
end
|
3925
4060
|
|
4061
|
+
# Retrieves the protection status of tasks in an Amazon ECS service.
|
4062
|
+
#
|
4063
|
+
# @option params [required, String] :cluster
|
4064
|
+
# The short name or full Amazon Resource Name (ARN) of the cluster that
|
4065
|
+
# hosts the service that the task sets exist in.
|
4066
|
+
#
|
4067
|
+
# @option params [Array<String>] :tasks
|
4068
|
+
# A list of up to 100 task IDs or full ARN entries.
|
4069
|
+
#
|
4070
|
+
# @return [Types::GetTaskProtectionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4071
|
+
#
|
4072
|
+
# * {Types::GetTaskProtectionResponse#protected_tasks #protected_tasks} => Array<Types::ProtectedTask>
|
4073
|
+
# * {Types::GetTaskProtectionResponse#failures #failures} => Array<Types::Failure>
|
4074
|
+
#
|
4075
|
+
#
|
4076
|
+
# @example Example: To get the protection status of a task
|
4077
|
+
#
|
4078
|
+
# # In this example, we get the protection status for a single task.
|
4079
|
+
#
|
4080
|
+
# resp = client.get_task_protection({
|
4081
|
+
# cluster: "test-task-protection",
|
4082
|
+
# tasks: [
|
4083
|
+
# "b8b1cf532d0e46ba8d44a40d1de16772",
|
4084
|
+
# ],
|
4085
|
+
# })
|
4086
|
+
#
|
4087
|
+
# resp.to_h outputs the following:
|
4088
|
+
# {
|
4089
|
+
# failures: [
|
4090
|
+
# ],
|
4091
|
+
# protected_tasks: [
|
4092
|
+
# {
|
4093
|
+
# expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
|
4094
|
+
# protection_enabled: true,
|
4095
|
+
# task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
|
4096
|
+
# },
|
4097
|
+
# ],
|
4098
|
+
# }
|
4099
|
+
#
|
4100
|
+
# @example Request syntax with placeholder values
|
4101
|
+
#
|
4102
|
+
# resp = client.get_task_protection({
|
4103
|
+
# cluster: "String", # required
|
4104
|
+
# tasks: ["String"],
|
4105
|
+
# })
|
4106
|
+
#
|
4107
|
+
# @example Response structure
|
4108
|
+
#
|
4109
|
+
# resp.protected_tasks #=> Array
|
4110
|
+
# resp.protected_tasks[0].task_arn #=> String
|
4111
|
+
# resp.protected_tasks[0].protection_enabled #=> Boolean
|
4112
|
+
# resp.protected_tasks[0].expiration_date #=> Time
|
4113
|
+
# resp.failures #=> Array
|
4114
|
+
# resp.failures[0].arn #=> String
|
4115
|
+
# resp.failures[0].reason #=> String
|
4116
|
+
# resp.failures[0].detail #=> String
|
4117
|
+
#
|
4118
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/GetTaskProtection AWS API Documentation
|
4119
|
+
#
|
4120
|
+
# @overload get_task_protection(params = {})
|
4121
|
+
# @param [Hash] params ({})
|
4122
|
+
def get_task_protection(params = {}, options = {})
|
4123
|
+
req = build_request(:get_task_protection, params)
|
4124
|
+
req.send_request(options)
|
4125
|
+
end
|
4126
|
+
|
3926
4127
|
# Lists the account settings for a specified principal.
|
3927
4128
|
#
|
3928
4129
|
# @option params [String] :name
|
@@ -4406,6 +4607,82 @@ module Aws::ECS
|
|
4406
4607
|
req.send_request(options)
|
4407
4608
|
end
|
4408
4609
|
|
4610
|
+
# This operation lists all of the services that are associated with a
|
4611
|
+
# Cloud Map namespace. This list might include services in different
|
4612
|
+
# clusters. In contrast, `ListServices` can only list services in one
|
4613
|
+
# cluster at a time. If you need to filter the list of services in a
|
4614
|
+
# single cluster by various parameters, use `ListServices`. For more
|
4615
|
+
# information, see [Service Connect][1] in the *Amazon Elastic Container
|
4616
|
+
# Service Developer Guide*.
|
4617
|
+
#
|
4618
|
+
#
|
4619
|
+
#
|
4620
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
4621
|
+
#
|
4622
|
+
# @option params [required, String] :namespace
|
4623
|
+
# The namespace name or full Amazon Resource Name (ARN) of the Cloud Map
|
4624
|
+
# namespace to list the services in.
|
4625
|
+
#
|
4626
|
+
# Tasks that run in a namespace can use short names to connect to
|
4627
|
+
# services in the namespace. Tasks can connect to services across all of
|
4628
|
+
# the clusters in the namespace. Tasks connect through a managed proxy
|
4629
|
+
# container that collects logs and metrics for increased visibility.
|
4630
|
+
# Only the tasks that Amazon ECS services create are supported with
|
4631
|
+
# Service Connect. For more information, see [Service Connect][1] in the
|
4632
|
+
# *Amazon Elastic Container Service Developer Guide*.
|
4633
|
+
#
|
4634
|
+
#
|
4635
|
+
#
|
4636
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
4637
|
+
#
|
4638
|
+
# @option params [String] :next_token
|
4639
|
+
# The `nextToken` value that's returned from a
|
4640
|
+
# `ListServicesByNamespace` request. It indicates that more results are
|
4641
|
+
# available to fulfill the request and further calls are needed. If
|
4642
|
+
# `maxResults` is returned, it is possible the number of results is less
|
4643
|
+
# than `maxResults`.
|
4644
|
+
#
|
4645
|
+
# @option params [Integer] :max_results
|
4646
|
+
# The maximum number of service results that `ListServicesByNamespace`
|
4647
|
+
# returns in paginated output. When this parameter is used,
|
4648
|
+
# `ListServicesByNamespace` only returns `maxResults` results in a
|
4649
|
+
# single page along with a `nextToken` response element. The remaining
|
4650
|
+
# results of the initial request can be seen by sending another
|
4651
|
+
# `ListServicesByNamespace` request with the returned `nextToken` value.
|
4652
|
+
# This value can be between 1 and 100. If this parameter isn't used,
|
4653
|
+
# then `ListServicesByNamespace` returns up to 10 results and a
|
4654
|
+
# `nextToken` value if applicable.
|
4655
|
+
#
|
4656
|
+
# @return [Types::ListServicesByNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4657
|
+
#
|
4658
|
+
# * {Types::ListServicesByNamespaceResponse#service_arns #service_arns} => Array<String>
|
4659
|
+
# * {Types::ListServicesByNamespaceResponse#next_token #next_token} => String
|
4660
|
+
#
|
4661
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
4662
|
+
#
|
4663
|
+
# @example Request syntax with placeholder values
|
4664
|
+
#
|
4665
|
+
# resp = client.list_services_by_namespace({
|
4666
|
+
# namespace: "String", # required
|
4667
|
+
# next_token: "String",
|
4668
|
+
# max_results: 1,
|
4669
|
+
# })
|
4670
|
+
#
|
4671
|
+
# @example Response structure
|
4672
|
+
#
|
4673
|
+
# resp.service_arns #=> Array
|
4674
|
+
# resp.service_arns[0] #=> String
|
4675
|
+
# resp.next_token #=> String
|
4676
|
+
#
|
4677
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServicesByNamespace AWS API Documentation
|
4678
|
+
#
|
4679
|
+
# @overload list_services_by_namespace(params = {})
|
4680
|
+
# @param [Hash] params ({})
|
4681
|
+
def list_services_by_namespace(params = {}, options = {})
|
4682
|
+
req = build_request(:list_services_by_namespace, params)
|
4683
|
+
req.send_request(options)
|
4684
|
+
end
|
4685
|
+
|
4409
4686
|
# List the tags for an Amazon ECS resource.
|
4410
4687
|
#
|
4411
4688
|
# @option params [required, String] :resource_arn
|
@@ -4742,6 +5019,9 @@ module Aws::ECS
|
|
4742
5019
|
# `startedBy` value limits the results to tasks that were started with
|
4743
5020
|
# that value.
|
4744
5021
|
#
|
5022
|
+
# When you specify `startedBy` as the filter, it must be the only filter
|
5023
|
+
# that you use.
|
5024
|
+
#
|
4745
5025
|
# @option params [String] :service_name
|
4746
5026
|
# The name of the service to use when filtering the `ListTasks` results.
|
4747
5027
|
# Specifying a `serviceName` limits the results to tasks that belong to
|
@@ -5223,6 +5503,7 @@ module Aws::ECS
|
|
5223
5503
|
# resp.cluster.attachments[0].details[0].name #=> String
|
5224
5504
|
# resp.cluster.attachments[0].details[0].value #=> String
|
5225
5505
|
# resp.cluster.attachments_status #=> String
|
5506
|
+
# resp.cluster.service_connect_defaults.namespace #=> String
|
5226
5507
|
#
|
5227
5508
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutClusterCapacityProviders AWS API Documentation
|
5228
5509
|
#
|
@@ -5864,6 +6145,8 @@ module Aws::ECS
|
|
5864
6145
|
# container_port: 1,
|
5865
6146
|
# host_port: 1,
|
5866
6147
|
# protocol: "tcp", # accepts tcp, udp
|
6148
|
+
# name: "String",
|
6149
|
+
# app_protocol: "http", # accepts http, http2, grpc
|
5867
6150
|
# },
|
5868
6151
|
# ],
|
5869
6152
|
# essential: false,
|
@@ -6093,6 +6376,8 @@ module Aws::ECS
|
|
6093
6376
|
# resp.task_definition.container_definitions[0].port_mappings[0].container_port #=> Integer
|
6094
6377
|
# resp.task_definition.container_definitions[0].port_mappings[0].host_port #=> Integer
|
6095
6378
|
# resp.task_definition.container_definitions[0].port_mappings[0].protocol #=> String, one of "tcp", "udp"
|
6379
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].name #=> String
|
6380
|
+
# resp.task_definition.container_definitions[0].port_mappings[0].app_protocol #=> String, one of "http", "http2", "grpc"
|
6096
6381
|
# resp.task_definition.container_definitions[0].essential #=> Boolean
|
6097
6382
|
# resp.task_definition.container_definitions[0].entry_point #=> Array
|
6098
6383
|
# resp.task_definition.container_definitions[0].entry_point[0] #=> String
|
@@ -6723,7 +7008,7 @@ module Aws::ECS
|
|
6723
7008
|
# resp.tasks[0].pull_stopped_at #=> Time
|
6724
7009
|
# resp.tasks[0].started_at #=> Time
|
6725
7010
|
# resp.tasks[0].started_by #=> String
|
6726
|
-
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated"
|
7011
|
+
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated", "ServiceSchedulerInitiated", "SpotInterruption", "TerminationNotice"
|
6727
7012
|
# resp.tasks[0].stopped_at #=> Time
|
6728
7013
|
# resp.tasks[0].stopped_reason #=> String
|
6729
7014
|
# resp.tasks[0].stopping_at #=> Time
|
@@ -7031,7 +7316,7 @@ module Aws::ECS
|
|
7031
7316
|
# resp.tasks[0].pull_stopped_at #=> Time
|
7032
7317
|
# resp.tasks[0].started_at #=> Time
|
7033
7318
|
# resp.tasks[0].started_by #=> String
|
7034
|
-
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated"
|
7319
|
+
# resp.tasks[0].stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated", "ServiceSchedulerInitiated", "SpotInterruption", "TerminationNotice"
|
7035
7320
|
# resp.tasks[0].stopped_at #=> Time
|
7036
7321
|
# resp.tasks[0].stopped_reason #=> String
|
7037
7322
|
# resp.tasks[0].stopping_at #=> Time
|
@@ -7197,7 +7482,7 @@ module Aws::ECS
|
|
7197
7482
|
# resp.task.pull_stopped_at #=> Time
|
7198
7483
|
# resp.task.started_at #=> Time
|
7199
7484
|
# resp.task.started_by #=> String
|
7200
|
-
# resp.task.stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated"
|
7485
|
+
# resp.task.stop_code #=> String, one of "TaskFailedToStart", "EssentialContainerExited", "UserInitiated", "ServiceSchedulerInitiated", "SpotInterruption", "TerminationNotice"
|
7201
7486
|
# resp.task.stopped_at #=> Time
|
7202
7487
|
# resp.task.stopped_reason #=> String
|
7203
7488
|
# resp.task.stopping_at #=> Time
|
@@ -7621,6 +7906,28 @@ module Aws::ECS
|
|
7621
7906
|
# @option params [Types::ClusterConfiguration] :configuration
|
7622
7907
|
# The execute command configuration for the cluster.
|
7623
7908
|
#
|
7909
|
+
# @option params [Types::ClusterServiceConnectDefaultsRequest] :service_connect_defaults
|
7910
|
+
# Use this parameter to set a default Service Connect namespace. After
|
7911
|
+
# you set a default Service Connect namespace, any new services with
|
7912
|
+
# Service Connect turned on that are created in the cluster are added as
|
7913
|
+
# client services in the namespace. This setting only applies to new
|
7914
|
+
# services that set the `enabled` parameter to `true` in the
|
7915
|
+
# `ServiceConnectConfiguration`. You can set the namespace of each
|
7916
|
+
# service individually in the `ServiceConnectConfiguration` to override
|
7917
|
+
# this default parameter.
|
7918
|
+
#
|
7919
|
+
# Tasks that run in a namespace can use short names to connect to
|
7920
|
+
# services in the namespace. Tasks can connect to services across all of
|
7921
|
+
# the clusters in the namespace. Tasks connect through a managed proxy
|
7922
|
+
# container that collects logs and metrics for increased visibility.
|
7923
|
+
# Only the tasks that Amazon ECS services create are supported with
|
7924
|
+
# Service Connect. For more information, see [Service Connect][1] in the
|
7925
|
+
# *Amazon Elastic Container Service Developer Guide*.
|
7926
|
+
#
|
7927
|
+
#
|
7928
|
+
#
|
7929
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
7930
|
+
#
|
7624
7931
|
# @return [Types::UpdateClusterResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
7625
7932
|
#
|
7626
7933
|
# * {Types::UpdateClusterResponse#cluster #cluster} => Types::Cluster
|
@@ -7648,6 +7955,9 @@ module Aws::ECS
|
|
7648
7955
|
# },
|
7649
7956
|
# },
|
7650
7957
|
# },
|
7958
|
+
# service_connect_defaults: {
|
7959
|
+
# namespace: "String", # required
|
7960
|
+
# },
|
7651
7961
|
# })
|
7652
7962
|
#
|
7653
7963
|
# @example Response structure
|
@@ -7689,6 +7999,7 @@ module Aws::ECS
|
|
7689
7999
|
# resp.cluster.attachments[0].details[0].name #=> String
|
7690
8000
|
# resp.cluster.attachments[0].details[0].value #=> String
|
7691
8001
|
# resp.cluster.attachments_status #=> String
|
8002
|
+
# resp.cluster.service_connect_defaults.namespace #=> String
|
7692
8003
|
#
|
7693
8004
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateCluster AWS API Documentation
|
7694
8005
|
#
|
@@ -7710,6 +8021,13 @@ module Aws::ECS
|
|
7710
8021
|
# specified, it overrides the `containerInsights` value set with
|
7711
8022
|
# PutAccountSetting or PutAccountSettingDefault.
|
7712
8023
|
#
|
8024
|
+
# Currently, if you delete an existing cluster that does not have
|
8025
|
+
# Container Insights turned on, and then create a new cluster with the
|
8026
|
+
# same name with Container Insights tuned on, Container Insights will
|
8027
|
+
# not actually be turned on. If you want to preserve the same name for
|
8028
|
+
# your existing cluster and turn on Container Insights, you must wait 7
|
8029
|
+
# days before you can re-create it.
|
8030
|
+
#
|
7713
8031
|
# @return [Types::UpdateClusterSettingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
7714
8032
|
#
|
7715
8033
|
# * {Types::UpdateClusterSettingsResponse#cluster #cluster} => Types::Cluster
|
@@ -7765,6 +8083,7 @@ module Aws::ECS
|
|
7765
8083
|
# resp.cluster.attachments[0].details[0].name #=> String
|
7766
8084
|
# resp.cluster.attachments[0].details[0].value #=> String
|
7767
8085
|
# resp.cluster.attachments_status #=> String
|
8086
|
+
# resp.cluster.service_connect_defaults.namespace #=> String
|
7768
8087
|
#
|
7769
8088
|
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateClusterSettings AWS API Documentation
|
7770
8089
|
#
|
@@ -7791,6 +8110,13 @@ module Aws::ECS
|
|
7791
8110
|
#
|
7792
8111
|
# </note>
|
7793
8112
|
#
|
8113
|
+
# <note markdown="1"> Agent updates with the `UpdateContainerAgent` API operation do not
|
8114
|
+
# apply to Windows container instances. We recommend that you launch new
|
8115
|
+
# container instances to update the agent version in your Windows
|
8116
|
+
# clusters.
|
8117
|
+
#
|
8118
|
+
# </note>
|
8119
|
+
#
|
7794
8120
|
# The `UpdateContainerAgent` API requires an Amazon ECS-optimized AMI or
|
7795
8121
|
# Amazon Linux AMI with the `ecs-init` service installed and running.
|
7796
8122
|
# For help updating the Amazon ECS container agent on other operating
|
@@ -8359,6 +8685,23 @@ module Aws::ECS
|
|
8359
8685
|
#
|
8360
8686
|
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html
|
8361
8687
|
#
|
8688
|
+
# @option params [Types::ServiceConnectConfiguration] :service_connect_configuration
|
8689
|
+
# The configuration for this service to discover and connect to
|
8690
|
+
# services, and be discovered by, and connected from, other services
|
8691
|
+
# within a namespace.
|
8692
|
+
#
|
8693
|
+
# Tasks that run in a namespace can use short names to connect to
|
8694
|
+
# services in the namespace. Tasks can connect to services across all of
|
8695
|
+
# the clusters in the namespace. Tasks connect through a managed proxy
|
8696
|
+
# container that collects logs and metrics for increased visibility.
|
8697
|
+
# Only the tasks that Amazon ECS services create are supported with
|
8698
|
+
# Service Connect. For more information, see [Service Connect][1] in the
|
8699
|
+
# *Amazon Elastic Container Service Developer Guide*.
|
8700
|
+
#
|
8701
|
+
#
|
8702
|
+
#
|
8703
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html
|
8704
|
+
#
|
8362
8705
|
# @return [Types::UpdateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
8363
8706
|
#
|
8364
8707
|
# * {Types::UpdateServiceResponse#service #service} => Types::Service
|
@@ -8453,6 +8796,35 @@ module Aws::ECS
|
|
8453
8796
|
# container_port: 1,
|
8454
8797
|
# },
|
8455
8798
|
# ],
|
8799
|
+
# service_connect_configuration: {
|
8800
|
+
# enabled: false, # required
|
8801
|
+
# namespace: "String",
|
8802
|
+
# services: [
|
8803
|
+
# {
|
8804
|
+
# port_name: "String", # required
|
8805
|
+
# discovery_name: "String",
|
8806
|
+
# client_aliases: [
|
8807
|
+
# {
|
8808
|
+
# port: 1, # required
|
8809
|
+
# dns_name: "String",
|
8810
|
+
# },
|
8811
|
+
# ],
|
8812
|
+
# ingress_port_override: 1,
|
8813
|
+
# },
|
8814
|
+
# ],
|
8815
|
+
# log_configuration: {
|
8816
|
+
# log_driver: "json-file", # required, accepts json-file, syslog, journald, gelf, fluentd, awslogs, splunk, awsfirelens
|
8817
|
+
# options: {
|
8818
|
+
# "String" => "String",
|
8819
|
+
# },
|
8820
|
+
# secret_options: [
|
8821
|
+
# {
|
8822
|
+
# name: "String", # required
|
8823
|
+
# value_from: "String", # required
|
8824
|
+
# },
|
8825
|
+
# ],
|
8826
|
+
# },
|
8827
|
+
# },
|
8456
8828
|
# })
|
8457
8829
|
#
|
8458
8830
|
# @example Response structure
|
@@ -8553,6 +8925,24 @@ module Aws::ECS
|
|
8553
8925
|
# resp.service.deployments[0].network_configuration.awsvpc_configuration.assign_public_ip #=> String, one of "ENABLED", "DISABLED"
|
8554
8926
|
# resp.service.deployments[0].rollout_state #=> String, one of "COMPLETED", "FAILED", "IN_PROGRESS"
|
8555
8927
|
# resp.service.deployments[0].rollout_state_reason #=> String
|
8928
|
+
# resp.service.deployments[0].service_connect_configuration.enabled #=> Boolean
|
8929
|
+
# resp.service.deployments[0].service_connect_configuration.namespace #=> String
|
8930
|
+
# resp.service.deployments[0].service_connect_configuration.services #=> Array
|
8931
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].port_name #=> String
|
8932
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].discovery_name #=> String
|
8933
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases #=> Array
|
8934
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].port #=> Integer
|
8935
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].client_aliases[0].dns_name #=> String
|
8936
|
+
# resp.service.deployments[0].service_connect_configuration.services[0].ingress_port_override #=> Integer
|
8937
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.log_driver #=> String, one of "json-file", "syslog", "journald", "gelf", "fluentd", "awslogs", "splunk", "awsfirelens"
|
8938
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options #=> Hash
|
8939
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.options["String"] #=> String
|
8940
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options #=> Array
|
8941
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].name #=> String
|
8942
|
+
# resp.service.deployments[0].service_connect_configuration.log_configuration.secret_options[0].value_from #=> String
|
8943
|
+
# resp.service.deployments[0].service_connect_resources #=> Array
|
8944
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_name #=> String
|
8945
|
+
# resp.service.deployments[0].service_connect_resources[0].discovery_arn #=> String
|
8556
8946
|
# resp.service.role_arn #=> String
|
8557
8947
|
# resp.service.events #=> Array
|
8558
8948
|
# resp.service.events[0].id #=> String
|
@@ -8679,6 +9069,178 @@ module Aws::ECS
|
|
8679
9069
|
req.send_request(options)
|
8680
9070
|
end
|
8681
9071
|
|
9072
|
+
# Updates the protection status of a task. You can set
|
9073
|
+
# `protectionEnabled` to `true` to protect your task from termination
|
9074
|
+
# during scale-in events from [Service Autoscaling][1] or
|
9075
|
+
# [deployments][2].
|
9076
|
+
#
|
9077
|
+
# Task-protection, by default, expires after 2 hours at which point
|
9078
|
+
# Amazon ECS unsets the `protectionEnabled` property making the task
|
9079
|
+
# eligible for termination by a subsequent scale-in event.
|
9080
|
+
#
|
9081
|
+
# You can specify a custom expiration period for task protection from 1
|
9082
|
+
# minute to up to 2,880 minutes (48 hours). To specify the custom
|
9083
|
+
# expiration period, set the `expiresInMinutes` property. The
|
9084
|
+
# `expiresInMinutes` property is always reset when you invoke this
|
9085
|
+
# operation for a task that already has `protectionEnabled` set to
|
9086
|
+
# `true`. You can keep extending the protection expiration period of a
|
9087
|
+
# task by invoking this operation repeatedly.
|
9088
|
+
#
|
9089
|
+
# To learn more about Amazon ECS task protection, see [Task scale-in
|
9090
|
+
# protection][3] in the <i> <i>Amazon Elastic Container Service
|
9091
|
+
# Developer Guide</i> </i>.
|
9092
|
+
#
|
9093
|
+
# <note markdown="1"> This operation is only supported for tasks belonging to an Amazon ECS
|
9094
|
+
# service. Invoking this operation for a standalone task will result in
|
9095
|
+
# an `TASK_NOT_VALID` failure. For more information, see [API failure
|
9096
|
+
# reasons][4].
|
9097
|
+
#
|
9098
|
+
# </note>
|
9099
|
+
#
|
9100
|
+
# If you prefer to set task protection from within the container, we
|
9101
|
+
# recommend using the [Task scale-in protection endpoint][5].
|
9102
|
+
#
|
9103
|
+
#
|
9104
|
+
#
|
9105
|
+
# [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html
|
9106
|
+
# [2]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html
|
9107
|
+
# [3]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-scale-in-protection.html
|
9108
|
+
# [4]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/api_failures_messages.html
|
9109
|
+
# [5]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-scale-in-protection-endpoint.html
|
9110
|
+
#
|
9111
|
+
# @option params [required, String] :cluster
|
9112
|
+
# The short name or full Amazon Resource Name (ARN) of the cluster that
|
9113
|
+
# hosts the service that the task sets exist in.
|
9114
|
+
#
|
9115
|
+
# @option params [required, Array<String>] :tasks
|
9116
|
+
# A list of up to 10 task IDs or full ARN entries.
|
9117
|
+
#
|
9118
|
+
# @option params [required, Boolean] :protection_enabled
|
9119
|
+
# Specify `true` to mark a task for protection and `false` to unset
|
9120
|
+
# protection, making it eligible for termination.
|
9121
|
+
#
|
9122
|
+
# @option params [Integer] :expires_in_minutes
|
9123
|
+
# If you set `protectionEnabled` to `true`, you can specify the duration
|
9124
|
+
# for task protection in minutes. You can specify a value from 1 minute
|
9125
|
+
# to up to 2,880 minutes (48 hours). During this time, your task will
|
9126
|
+
# not be terminated by scale-in events from Service Auto Scaling or
|
9127
|
+
# deployments. After this time period lapses, `protectionEnabled` will
|
9128
|
+
# be reset to `false`.
|
9129
|
+
#
|
9130
|
+
# If you don’t specify the time, then the task is automatically
|
9131
|
+
# protected for 120 minutes (2 hours).
|
9132
|
+
#
|
9133
|
+
# @return [Types::UpdateTaskProtectionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
9134
|
+
#
|
9135
|
+
# * {Types::UpdateTaskProtectionResponse#protected_tasks #protected_tasks} => Array<Types::ProtectedTask>
|
9136
|
+
# * {Types::UpdateTaskProtectionResponse#failures #failures} => Array<Types::Failure>
|
9137
|
+
#
|
9138
|
+
#
|
9139
|
+
# @example Example: To set task scale-in protection for a task for 60 minutes
|
9140
|
+
#
|
9141
|
+
# # This example enables scale-in protection for a task for 60 minutes.
|
9142
|
+
#
|
9143
|
+
# resp = client.update_task_protection({
|
9144
|
+
# cluster: "test-task-protection",
|
9145
|
+
# expires_in_minutes: 60,
|
9146
|
+
# protection_enabled: true,
|
9147
|
+
# tasks: [
|
9148
|
+
# "b8b1cf532d0e46ba8d44a40d1de16772",
|
9149
|
+
# ],
|
9150
|
+
# })
|
9151
|
+
#
|
9152
|
+
# resp.to_h outputs the following:
|
9153
|
+
# {
|
9154
|
+
# failures: [
|
9155
|
+
# ],
|
9156
|
+
# protected_tasks: [
|
9157
|
+
# {
|
9158
|
+
# expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
|
9159
|
+
# protection_enabled: true,
|
9160
|
+
# task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
|
9161
|
+
# },
|
9162
|
+
# ],
|
9163
|
+
# }
|
9164
|
+
#
|
9165
|
+
# @example Example: To set task scale-in protection for the default time period in minutes
|
9166
|
+
#
|
9167
|
+
# # This example enables task scale-in protection for a task, without specifying the expiresInMinutes parameter, for the
|
9168
|
+
# # default protection period of 120 minutes.
|
9169
|
+
#
|
9170
|
+
# resp = client.update_task_protection({
|
9171
|
+
# cluster: "test-task-protection",
|
9172
|
+
# protection_enabled: true,
|
9173
|
+
# tasks: [
|
9174
|
+
# "b8b1cf532d0e46ba8d44a40d1de16772",
|
9175
|
+
# ],
|
9176
|
+
# })
|
9177
|
+
#
|
9178
|
+
# resp.to_h outputs the following:
|
9179
|
+
# {
|
9180
|
+
# failures: [
|
9181
|
+
# ],
|
9182
|
+
# protected_tasks: [
|
9183
|
+
# {
|
9184
|
+
# expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
|
9185
|
+
# protection_enabled: true,
|
9186
|
+
# task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
|
9187
|
+
# },
|
9188
|
+
# ],
|
9189
|
+
# }
|
9190
|
+
#
|
9191
|
+
# @example Example: To remove task scale-in protection
|
9192
|
+
#
|
9193
|
+
# # This example removes scale-in protection for a task.
|
9194
|
+
#
|
9195
|
+
# resp = client.update_task_protection({
|
9196
|
+
# cluster: "test-task-protection",
|
9197
|
+
# protection_enabled: false,
|
9198
|
+
# tasks: [
|
9199
|
+
# "b8b1cf532d0e46ba8d44a40d1de16772",
|
9200
|
+
# ],
|
9201
|
+
# })
|
9202
|
+
#
|
9203
|
+
# resp.to_h outputs the following:
|
9204
|
+
# {
|
9205
|
+
# failures: [
|
9206
|
+
# ],
|
9207
|
+
# protected_tasks: [
|
9208
|
+
# {
|
9209
|
+
# protection_enabled: false,
|
9210
|
+
# task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
|
9211
|
+
# },
|
9212
|
+
# ],
|
9213
|
+
# }
|
9214
|
+
#
|
9215
|
+
# @example Request syntax with placeholder values
|
9216
|
+
#
|
9217
|
+
# resp = client.update_task_protection({
|
9218
|
+
# cluster: "String", # required
|
9219
|
+
# tasks: ["String"], # required
|
9220
|
+
# protection_enabled: false, # required
|
9221
|
+
# expires_in_minutes: 1,
|
9222
|
+
# })
|
9223
|
+
#
|
9224
|
+
# @example Response structure
|
9225
|
+
#
|
9226
|
+
# resp.protected_tasks #=> Array
|
9227
|
+
# resp.protected_tasks[0].task_arn #=> String
|
9228
|
+
# resp.protected_tasks[0].protection_enabled #=> Boolean
|
9229
|
+
# resp.protected_tasks[0].expiration_date #=> Time
|
9230
|
+
# resp.failures #=> Array
|
9231
|
+
# resp.failures[0].arn #=> String
|
9232
|
+
# resp.failures[0].reason #=> String
|
9233
|
+
# resp.failures[0].detail #=> String
|
9234
|
+
#
|
9235
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateTaskProtection AWS API Documentation
|
9236
|
+
#
|
9237
|
+
# @overload update_task_protection(params = {})
|
9238
|
+
# @param [Hash] params ({})
|
9239
|
+
def update_task_protection(params = {}, options = {})
|
9240
|
+
req = build_request(:update_task_protection, params)
|
9241
|
+
req.send_request(options)
|
9242
|
+
end
|
9243
|
+
|
8682
9244
|
# Modifies a task set. This is used when a service uses the `EXTERNAL`
|
8683
9245
|
# deployment controller type. For more information, see [Amazon ECS
|
8684
9246
|
# Deployment Types][1] in the *Amazon Elastic Container Service
|
@@ -8787,7 +9349,7 @@ module Aws::ECS
|
|
8787
9349
|
params: params,
|
8788
9350
|
config: config)
|
8789
9351
|
context[:gem_name] = 'aws-sdk-ecs'
|
8790
|
-
context[:gem_version] = '1.
|
9352
|
+
context[:gem_version] = '1.106.0'
|
8791
9353
|
Seahorse::Client::Request.new(handlers, context)
|
8792
9354
|
end
|
8793
9355
|
|