aws-sdk-ecs 1.104.0 → 1.105.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d03e4fab11bd39b92fbcdbf6a3ebed07329178d7c5080eaf2b2a85c9c89e87e
4
- data.tar.gz: 893527cac61e23178c789840c8e8d091768037266e91e8d44bb23ecc16ebc77f
3
+ metadata.gz: 789d2a119deed80004f66d84bc3c5425758742b1b0070ab60f0c8993525c6837
4
+ data.tar.gz: 3adc2267e9be935901ef6184fca3fe15e350978a51bf0b9a94aa4df0798f66bd
5
5
  SHA512:
6
- metadata.gz: 3f421d7c2aa311de2bce9b139e575e512ea1e0b1bf37f204d7dec89f1c343fac14ac43f84e0037a81ed6f6076d987acd3872f179a90ed4e06b3e913ce32d6b74
7
- data.tar.gz: 75ebd63a0f0e5dc5d441279b5bc65bda44f19e574f0c9ec2ab07d48c62c9125c4ee9ae52cbf92b95f4ec2752949175d5de2a3e59ad19474a4e7dbd8ed7bb2271
6
+ metadata.gz: 586f1fae25026a2076ab9855bd6b5b77b412c1c8695254660535faa674b417c5220e9fbba04c1e07a6f1bfdf5e6ab3e56e0f01a769b3ca54f26d60943f27e26d
7
+ data.tar.gz: a348d4a49a77edc12f0659706f29c97349d87be7fb76de6e188c8888f37870d61556fad1c77bcd2b24fb877c6a9af6463ca251d3f8766cf73e5f636975f569f7
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.105.0 (2022-11-10)
5
+ ------------------
6
+
7
+ * Feature - This release adds support for task scale-in protection with updateTaskProtection and getTaskProtection APIs. UpdateTaskProtection API can be used to protect a service managed task from being terminated by scale-in events and getTaskProtection API to get the scale-in protection status of a task.
8
+
4
9
  1.104.0 (2022-10-25)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.104.0
1
+ 1.105.0
@@ -3923,6 +3923,72 @@ module Aws::ECS
3923
3923
  req.send_request(options)
3924
3924
  end
3925
3925
 
3926
+ # Retrieves the protection status of tasks in an Amazon ECS service.
3927
+ #
3928
+ # @option params [required, String] :cluster
3929
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
3930
+ # hosts the service that the task sets exist in.
3931
+ #
3932
+ # @option params [Array<String>] :tasks
3933
+ # A list of up to 100 task IDs or full ARN entries.
3934
+ #
3935
+ # @return [Types::GetTaskProtectionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3936
+ #
3937
+ # * {Types::GetTaskProtectionResponse#protected_tasks #protected_tasks} => Array&lt;Types::ProtectedTask&gt;
3938
+ # * {Types::GetTaskProtectionResponse#failures #failures} => Array&lt;Types::Failure&gt;
3939
+ #
3940
+ #
3941
+ # @example Example: To get the protection status of a task
3942
+ #
3943
+ # # In this example, we get the protection status for a single task.
3944
+ #
3945
+ # resp = client.get_task_protection({
3946
+ # cluster: "test-task-protection",
3947
+ # tasks: [
3948
+ # "b8b1cf532d0e46ba8d44a40d1de16772",
3949
+ # ],
3950
+ # })
3951
+ #
3952
+ # resp.to_h outputs the following:
3953
+ # {
3954
+ # failures: [
3955
+ # ],
3956
+ # protected_tasks: [
3957
+ # {
3958
+ # expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
3959
+ # protection_enabled: true,
3960
+ # task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
3961
+ # },
3962
+ # ],
3963
+ # }
3964
+ #
3965
+ # @example Request syntax with placeholder values
3966
+ #
3967
+ # resp = client.get_task_protection({
3968
+ # cluster: "String", # required
3969
+ # tasks: ["String"],
3970
+ # })
3971
+ #
3972
+ # @example Response structure
3973
+ #
3974
+ # resp.protected_tasks #=> Array
3975
+ # resp.protected_tasks[0].task_arn #=> String
3976
+ # resp.protected_tasks[0].protection_enabled #=> Boolean
3977
+ # resp.protected_tasks[0].expiration_date #=> Time
3978
+ # resp.failures #=> Array
3979
+ # resp.failures[0].arn #=> String
3980
+ # resp.failures[0].reason #=> String
3981
+ # resp.failures[0].detail #=> String
3982
+ #
3983
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/GetTaskProtection AWS API Documentation
3984
+ #
3985
+ # @overload get_task_protection(params = {})
3986
+ # @param [Hash] params ({})
3987
+ def get_task_protection(params = {}, options = {})
3988
+ req = build_request(:get_task_protection, params)
3989
+ req.send_request(options)
3990
+ end
3991
+
3926
3992
  # Lists the account settings for a specified principal.
3927
3993
  #
3928
3994
  # @option params [String] :name
@@ -8679,6 +8745,178 @@ module Aws::ECS
8679
8745
  req.send_request(options)
8680
8746
  end
8681
8747
 
8748
+ # Updates the protection status of a task. You can set
8749
+ # `protectionEnabled` to `true` to protect your task from termination
8750
+ # during scale-in events from [Service Autoscaling][1] or
8751
+ # [deployments][2].
8752
+ #
8753
+ # Task-protection, by default, expires after 2 hours at which point
8754
+ # Amazon ECS unsets the `protectionEnabled` property making the task
8755
+ # eligible for termination by a subsequent scale-in event.
8756
+ #
8757
+ # You can specify a custom expiration period for task protection from 1
8758
+ # minute to up to 2,880 minutes (48 hours). To specify the custom
8759
+ # expiration period, set the `expiresInMinutes` property. The
8760
+ # `expiresInMinutes` property is always reset when you invoke this
8761
+ # operation for a task that already has `protectionEnabled` set to
8762
+ # `true`. You can keep extending the protection expiration period of a
8763
+ # task by invoking this operation repeatedly.
8764
+ #
8765
+ # To learn more about Amazon ECS task protection, see [Task scale-in
8766
+ # protection][3] in the *Amazon Elastic Container Service Developer
8767
+ # Guide*.
8768
+ #
8769
+ # <note markdown="1"> This operation is only supported for tasks belonging to an Amazon ECS
8770
+ # service. Invoking this operation for a standalone task will result in
8771
+ # an `TASK_NOT_VALID` failure. For more information, see [API failure
8772
+ # reasons][4].
8773
+ #
8774
+ # </note>
8775
+ #
8776
+ # If you prefer to set task protection from within the container, we
8777
+ # recommend using the [Amazon ECS container agent endpoint][5].
8778
+ #
8779
+ #
8780
+ #
8781
+ # [1]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html
8782
+ # [2]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html
8783
+ # [3]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-scale-in-protection.html
8784
+ # [4]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/api_failures_messages.html.html
8785
+ # [5]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-endpoint.html
8786
+ #
8787
+ # @option params [required, String] :cluster
8788
+ # The short name or full Amazon Resource Name (ARN) of the cluster that
8789
+ # hosts the service that the task sets exist in.
8790
+ #
8791
+ # @option params [required, Array<String>] :tasks
8792
+ # A list of up to 10 task IDs or full ARN entries.
8793
+ #
8794
+ # @option params [required, Boolean] :protection_enabled
8795
+ # Specify `true` to mark a task for protection and `false` to unset
8796
+ # protection, making it eligible for termination.
8797
+ #
8798
+ # @option params [Integer] :expires_in_minutes
8799
+ # If you set `protectionEnabled` to `true`, you can specify the duration
8800
+ # for task protection in minutes. You can specify a value from 1 minute
8801
+ # to up to 2,880 minutes (48 hours). During this time, your task will
8802
+ # not be terminated by scale-in events from Service Auto Scaling or
8803
+ # deployments. After this time period lapses, `protectionEnabled` will
8804
+ # be reset to `false`.
8805
+ #
8806
+ # If you don’t specify the time, then the task is automatically
8807
+ # protected for 120 minutes (2 hours).
8808
+ #
8809
+ # @return [Types::UpdateTaskProtectionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
8810
+ #
8811
+ # * {Types::UpdateTaskProtectionResponse#protected_tasks #protected_tasks} => Array&lt;Types::ProtectedTask&gt;
8812
+ # * {Types::UpdateTaskProtectionResponse#failures #failures} => Array&lt;Types::Failure&gt;
8813
+ #
8814
+ #
8815
+ # @example Example: To set task scale-in protection for a task for 60 minutes
8816
+ #
8817
+ # # This example enables scale-in protection for a task for 60 minutes.
8818
+ #
8819
+ # resp = client.update_task_protection({
8820
+ # cluster: "test-task-protection",
8821
+ # expires_in_minutes: 60,
8822
+ # protection_enabled: true,
8823
+ # tasks: [
8824
+ # "b8b1cf532d0e46ba8d44a40d1de16772",
8825
+ # ],
8826
+ # })
8827
+ #
8828
+ # resp.to_h outputs the following:
8829
+ # {
8830
+ # failures: [
8831
+ # ],
8832
+ # protected_tasks: [
8833
+ # {
8834
+ # expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
8835
+ # protection_enabled: true,
8836
+ # task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
8837
+ # },
8838
+ # ],
8839
+ # }
8840
+ #
8841
+ # @example Example: To set task scale-in protection for the default time period in minutes
8842
+ #
8843
+ # # This example enables task scale-in protection for a task, without specifying the expiresInMinutes parameter, for the
8844
+ # # default protection period of 120 minutes.
8845
+ #
8846
+ # resp = client.update_task_protection({
8847
+ # cluster: "test-task-protection",
8848
+ # protection_enabled: true,
8849
+ # tasks: [
8850
+ # "b8b1cf532d0e46ba8d44a40d1de16772",
8851
+ # ],
8852
+ # })
8853
+ #
8854
+ # resp.to_h outputs the following:
8855
+ # {
8856
+ # failures: [
8857
+ # ],
8858
+ # protected_tasks: [
8859
+ # {
8860
+ # expiration_date: Time.parse("2022-11-02T06:56:32.553Z"),
8861
+ # protection_enabled: true,
8862
+ # task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
8863
+ # },
8864
+ # ],
8865
+ # }
8866
+ #
8867
+ # @example Example: To remove task scale-in protection
8868
+ #
8869
+ # # This example removes scale-in protection for a task.
8870
+ #
8871
+ # resp = client.update_task_protection({
8872
+ # cluster: "test-task-protection",
8873
+ # protection_enabled: false,
8874
+ # tasks: [
8875
+ # "b8b1cf532d0e46ba8d44a40d1de16772",
8876
+ # ],
8877
+ # })
8878
+ #
8879
+ # resp.to_h outputs the following:
8880
+ # {
8881
+ # failures: [
8882
+ # ],
8883
+ # protected_tasks: [
8884
+ # {
8885
+ # protection_enabled: false,
8886
+ # task_arn: "arn:aws:ecs:us-west-2:012345678910:task/b8b1cf532d0e46ba8d44a40d1de16772",
8887
+ # },
8888
+ # ],
8889
+ # }
8890
+ #
8891
+ # @example Request syntax with placeholder values
8892
+ #
8893
+ # resp = client.update_task_protection({
8894
+ # cluster: "String", # required
8895
+ # tasks: ["String"], # required
8896
+ # protection_enabled: false, # required
8897
+ # expires_in_minutes: 1,
8898
+ # })
8899
+ #
8900
+ # @example Response structure
8901
+ #
8902
+ # resp.protected_tasks #=> Array
8903
+ # resp.protected_tasks[0].task_arn #=> String
8904
+ # resp.protected_tasks[0].protection_enabled #=> Boolean
8905
+ # resp.protected_tasks[0].expiration_date #=> Time
8906
+ # resp.failures #=> Array
8907
+ # resp.failures[0].arn #=> String
8908
+ # resp.failures[0].reason #=> String
8909
+ # resp.failures[0].detail #=> String
8910
+ #
8911
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateTaskProtection AWS API Documentation
8912
+ #
8913
+ # @overload update_task_protection(params = {})
8914
+ # @param [Hash] params ({})
8915
+ def update_task_protection(params = {}, options = {})
8916
+ req = build_request(:update_task_protection, params)
8917
+ req.send_request(options)
8918
+ end
8919
+
8682
8920
  # Modifies a task set. This is used when a service uses the `EXTERNAL`
8683
8921
  # deployment controller type. For more information, see [Amazon ECS
8684
8922
  # Deployment Types][1] in the *Amazon Elastic Container Service
@@ -8787,7 +9025,7 @@ module Aws::ECS
8787
9025
  params: params,
8788
9026
  config: config)
8789
9027
  context[:gem_name] = 'aws-sdk-ecs'
8790
- context[:gem_version] = '1.104.0'
9028
+ context[:gem_version] = '1.105.0'
8791
9029
  Seahorse::Client::Request.new(handlers, context)
8792
9030
  end
8793
9031
 
@@ -151,6 +151,8 @@ module Aws::ECS
151
151
  FirelensConfiguration = Shapes::StructureShape.new(name: 'FirelensConfiguration')
152
152
  FirelensConfigurationOptionsMap = Shapes::MapShape.new(name: 'FirelensConfigurationOptionsMap')
153
153
  FirelensConfigurationType = Shapes::StringShape.new(name: 'FirelensConfigurationType')
154
+ GetTaskProtectionRequest = Shapes::StructureShape.new(name: 'GetTaskProtectionRequest')
155
+ GetTaskProtectionResponse = Shapes::StructureShape.new(name: 'GetTaskProtectionResponse')
154
156
  GpuIds = Shapes::ListShape.new(name: 'GpuIds')
155
157
  HealthCheck = Shapes::StructureShape.new(name: 'HealthCheck')
156
158
  HealthStatus = Shapes::StringShape.new(name: 'HealthStatus')
@@ -234,6 +236,8 @@ module Aws::ECS
234
236
  PortMapping = Shapes::StructureShape.new(name: 'PortMapping')
235
237
  PortMappingList = Shapes::ListShape.new(name: 'PortMappingList')
236
238
  PropagateTags = Shapes::StringShape.new(name: 'PropagateTags')
239
+ ProtectedTask = Shapes::StructureShape.new(name: 'ProtectedTask')
240
+ ProtectedTasks = Shapes::ListShape.new(name: 'ProtectedTasks')
237
241
  ProxyConfiguration = Shapes::StructureShape.new(name: 'ProxyConfiguration')
238
242
  ProxyConfigurationProperties = Shapes::ListShape.new(name: 'ProxyConfigurationProperties')
239
243
  ProxyConfigurationType = Shapes::StringShape.new(name: 'ProxyConfigurationType')
@@ -355,6 +359,8 @@ module Aws::ECS
355
359
  UpdateServicePrimaryTaskSetResponse = Shapes::StructureShape.new(name: 'UpdateServicePrimaryTaskSetResponse')
356
360
  UpdateServiceRequest = Shapes::StructureShape.new(name: 'UpdateServiceRequest')
357
361
  UpdateServiceResponse = Shapes::StructureShape.new(name: 'UpdateServiceResponse')
362
+ UpdateTaskProtectionRequest = Shapes::StructureShape.new(name: 'UpdateTaskProtectionRequest')
363
+ UpdateTaskProtectionResponse = Shapes::StructureShape.new(name: 'UpdateTaskProtectionResponse')
358
364
  UpdateTaskSetRequest = Shapes::StructureShape.new(name: 'UpdateTaskSetRequest')
359
365
  UpdateTaskSetResponse = Shapes::StructureShape.new(name: 'UpdateTaskSetResponse')
360
366
  VersionInfo = Shapes::StructureShape.new(name: 'VersionInfo')
@@ -907,6 +913,14 @@ module Aws::ECS
907
913
  FirelensConfigurationOptionsMap.key = Shapes::ShapeRef.new(shape: String)
908
914
  FirelensConfigurationOptionsMap.value = Shapes::ShapeRef.new(shape: String)
909
915
 
916
+ GetTaskProtectionRequest.add_member(:cluster, Shapes::ShapeRef.new(shape: String, required: true, location_name: "cluster"))
917
+ GetTaskProtectionRequest.add_member(:tasks, Shapes::ShapeRef.new(shape: StringList, location_name: "tasks"))
918
+ GetTaskProtectionRequest.struct_class = Types::GetTaskProtectionRequest
919
+
920
+ GetTaskProtectionResponse.add_member(:protected_tasks, Shapes::ShapeRef.new(shape: ProtectedTasks, location_name: "protectedTasks"))
921
+ GetTaskProtectionResponse.add_member(:failures, Shapes::ShapeRef.new(shape: Failures, location_name: "failures"))
922
+ GetTaskProtectionResponse.struct_class = Types::GetTaskProtectionResponse
923
+
910
924
  GpuIds.member = Shapes::ShapeRef.new(shape: String)
911
925
 
912
926
  HealthCheck.add_member(:command, Shapes::ShapeRef.new(shape: StringList, required: true, location_name: "command"))
@@ -1159,6 +1173,13 @@ module Aws::ECS
1159
1173
 
1160
1174
  PortMappingList.member = Shapes::ShapeRef.new(shape: PortMapping)
1161
1175
 
1176
+ ProtectedTask.add_member(:task_arn, Shapes::ShapeRef.new(shape: String, location_name: "taskArn"))
1177
+ ProtectedTask.add_member(:protection_enabled, Shapes::ShapeRef.new(shape: Boolean, location_name: "protectionEnabled"))
1178
+ ProtectedTask.add_member(:expiration_date, Shapes::ShapeRef.new(shape: Timestamp, location_name: "expirationDate"))
1179
+ ProtectedTask.struct_class = Types::ProtectedTask
1180
+
1181
+ ProtectedTasks.member = Shapes::ShapeRef.new(shape: ProtectedTask)
1182
+
1162
1183
  ProxyConfiguration.add_member(:type, Shapes::ShapeRef.new(shape: ProxyConfigurationType, location_name: "type"))
1163
1184
  ProxyConfiguration.add_member(:container_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "containerName"))
1164
1185
  ProxyConfiguration.add_member(:properties, Shapes::ShapeRef.new(shape: ProxyConfigurationProperties, location_name: "properties"))
@@ -1667,6 +1688,16 @@ module Aws::ECS
1667
1688
  UpdateServiceResponse.add_member(:service, Shapes::ShapeRef.new(shape: Service, location_name: "service"))
1668
1689
  UpdateServiceResponse.struct_class = Types::UpdateServiceResponse
1669
1690
 
1691
+ UpdateTaskProtectionRequest.add_member(:cluster, Shapes::ShapeRef.new(shape: String, required: true, location_name: "cluster"))
1692
+ UpdateTaskProtectionRequest.add_member(:tasks, Shapes::ShapeRef.new(shape: StringList, required: true, location_name: "tasks"))
1693
+ UpdateTaskProtectionRequest.add_member(:protection_enabled, Shapes::ShapeRef.new(shape: Boolean, required: true, location_name: "protectionEnabled"))
1694
+ UpdateTaskProtectionRequest.add_member(:expires_in_minutes, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "expiresInMinutes"))
1695
+ UpdateTaskProtectionRequest.struct_class = Types::UpdateTaskProtectionRequest
1696
+
1697
+ UpdateTaskProtectionResponse.add_member(:protected_tasks, Shapes::ShapeRef.new(shape: ProtectedTasks, location_name: "protectedTasks"))
1698
+ UpdateTaskProtectionResponse.add_member(:failures, Shapes::ShapeRef.new(shape: Failures, location_name: "failures"))
1699
+ UpdateTaskProtectionResponse.struct_class = Types::UpdateTaskProtectionResponse
1700
+
1670
1701
  UpdateTaskSetRequest.add_member(:cluster, Shapes::ShapeRef.new(shape: String, required: true, location_name: "cluster"))
1671
1702
  UpdateTaskSetRequest.add_member(:service, Shapes::ShapeRef.new(shape: String, required: true, location_name: "service"))
1672
1703
  UpdateTaskSetRequest.add_member(:task_set, Shapes::ShapeRef.new(shape: String, required: true, location_name: "taskSet"))
@@ -1984,6 +2015,21 @@ module Aws::ECS
1984
2015
  o.errors << Shapes::ShapeRef.new(shape: TargetNotConnectedException)
1985
2016
  end)
1986
2017
 
2018
+ api.add_operation(:get_task_protection, Seahorse::Model::Operation.new.tap do |o|
2019
+ o.name = "GetTaskProtection"
2020
+ o.http_method = "POST"
2021
+ o.http_request_uri = "/"
2022
+ o.input = Shapes::ShapeRef.new(shape: GetTaskProtectionRequest)
2023
+ o.output = Shapes::ShapeRef.new(shape: GetTaskProtectionResponse)
2024
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
2025
+ o.errors << Shapes::ShapeRef.new(shape: ClientException)
2026
+ o.errors << Shapes::ShapeRef.new(shape: ClusterNotFoundException)
2027
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
2028
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2029
+ o.errors << Shapes::ShapeRef.new(shape: ServerException)
2030
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedFeatureException)
2031
+ end)
2032
+
1987
2033
  api.add_operation(:list_account_settings, Seahorse::Model::Operation.new.tap do |o|
1988
2034
  o.name = "ListAccountSettings"
1989
2035
  o.http_method = "POST"
@@ -2403,6 +2449,21 @@ module Aws::ECS
2403
2449
  o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
2404
2450
  end)
2405
2451
 
2452
+ api.add_operation(:update_task_protection, Seahorse::Model::Operation.new.tap do |o|
2453
+ o.name = "UpdateTaskProtection"
2454
+ o.http_method = "POST"
2455
+ o.http_request_uri = "/"
2456
+ o.input = Shapes::ShapeRef.new(shape: UpdateTaskProtectionRequest)
2457
+ o.output = Shapes::ShapeRef.new(shape: UpdateTaskProtectionResponse)
2458
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
2459
+ o.errors << Shapes::ShapeRef.new(shape: ClientException)
2460
+ o.errors << Shapes::ShapeRef.new(shape: ClusterNotFoundException)
2461
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
2462
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2463
+ o.errors << Shapes::ShapeRef.new(shape: ServerException)
2464
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedFeatureException)
2465
+ end)
2466
+
2406
2467
  api.add_operation(:update_task_set, Seahorse::Model::Operation.new.tap do |o|
2407
2468
  o.name = "UpdateTaskSet"
2408
2469
  o.http_method = "POST"
@@ -305,6 +305,20 @@ module Aws::ECS
305
305
  end
306
306
  end
307
307
 
308
+ class GetTaskProtection
309
+ def self.build(context)
310
+ unless context.config.regional_endpoint
311
+ endpoint = context.config.endpoint.to_s
312
+ end
313
+ Aws::ECS::EndpointParameters.new(
314
+ region: context.config.region,
315
+ use_dual_stack: context.config.use_dualstack_endpoint,
316
+ use_fips: context.config.use_fips_endpoint,
317
+ endpoint: endpoint,
318
+ )
319
+ end
320
+ end
321
+
308
322
  class ListAccountSettings
309
323
  def self.build(context)
310
324
  unless context.config.regional_endpoint
@@ -725,6 +739,20 @@ module Aws::ECS
725
739
  end
726
740
  end
727
741
 
742
+ class UpdateTaskProtection
743
+ def self.build(context)
744
+ unless context.config.regional_endpoint
745
+ endpoint = context.config.endpoint.to_s
746
+ end
747
+ Aws::ECS::EndpointParameters.new(
748
+ region: context.config.region,
749
+ use_dual_stack: context.config.use_dualstack_endpoint,
750
+ use_fips: context.config.use_fips_endpoint,
751
+ endpoint: endpoint,
752
+ )
753
+ end
754
+ end
755
+
728
756
  class UpdateTaskSet
729
757
  def self.build(context)
730
758
  unless context.config.regional_endpoint
@@ -98,6 +98,8 @@ module Aws::ECS
98
98
  Aws::ECS::Endpoints::DiscoverPollEndpoint.build(context)
99
99
  when :execute_command
100
100
  Aws::ECS::Endpoints::ExecuteCommand.build(context)
101
+ when :get_task_protection
102
+ Aws::ECS::Endpoints::GetTaskProtection.build(context)
101
103
  when :list_account_settings
102
104
  Aws::ECS::Endpoints::ListAccountSettings.build(context)
103
105
  when :list_attributes
@@ -158,6 +160,8 @@ module Aws::ECS
158
160
  Aws::ECS::Endpoints::UpdateService.build(context)
159
161
  when :update_service_primary_task_set
160
162
  Aws::ECS::Endpoints::UpdateServicePrimaryTaskSet.build(context)
163
+ when :update_task_protection
164
+ Aws::ECS::Endpoints::UpdateTaskProtection.build(context)
161
165
  when :update_task_set
162
166
  Aws::ECS::Endpoints::UpdateTaskSet.build(context)
163
167
  end
@@ -5346,6 +5346,58 @@ module Aws::ECS
5346
5346
  include Aws::Structure
5347
5347
  end
5348
5348
 
5349
+ # @note When making an API call, you may pass GetTaskProtectionRequest
5350
+ # data as a hash:
5351
+ #
5352
+ # {
5353
+ # cluster: "String", # required
5354
+ # tasks: ["String"],
5355
+ # }
5356
+ #
5357
+ # @!attribute [rw] cluster
5358
+ # The short name or full Amazon Resource Name (ARN) of the cluster
5359
+ # that hosts the service that the task sets exist in.
5360
+ # @return [String]
5361
+ #
5362
+ # @!attribute [rw] tasks
5363
+ # A list of up to 100 task IDs or full ARN entries.
5364
+ # @return [Array<String>]
5365
+ #
5366
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/GetTaskProtectionRequest AWS API Documentation
5367
+ #
5368
+ class GetTaskProtectionRequest < Struct.new(
5369
+ :cluster,
5370
+ :tasks)
5371
+ SENSITIVE = []
5372
+ include Aws::Structure
5373
+ end
5374
+
5375
+ # @!attribute [rw] protected_tasks
5376
+ # A list of tasks with the following information.
5377
+ #
5378
+ # * `taskArn`\: The task ARN.
5379
+ #
5380
+ # * `protectionEnabled`\: The protection status of the task. If
5381
+ # scale-in protection is enabled for a task, the value is `true`.
5382
+ # Otherwise, it is `false`.
5383
+ #
5384
+ # * `expirationDate`\: The epoch time when protection for the task
5385
+ # will expire.
5386
+ # @return [Array<Types::ProtectedTask>]
5387
+ #
5388
+ # @!attribute [rw] failures
5389
+ # Any failures associated with the call.
5390
+ # @return [Array<Types::Failure>]
5391
+ #
5392
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/GetTaskProtectionResponse AWS API Documentation
5393
+ #
5394
+ class GetTaskProtectionResponse < Struct.new(
5395
+ :protected_tasks,
5396
+ :failures)
5397
+ SENSITIVE = []
5398
+ include Aws::Structure
5399
+ end
5400
+
5349
5401
  # An object representing a container health check. Health check
5350
5402
  # parameters that are specified in a container definition override any
5351
5403
  # Docker health checks that exist in the container image (such as those
@@ -7470,6 +7522,33 @@ module Aws::ECS
7470
7522
  include Aws::Structure
7471
7523
  end
7472
7524
 
7525
+ # An object representing the protection status details for a task. You
7526
+ # can set the protection status with the UpdateTaskProtection API and
7527
+ # get the status of tasks with the GetTaskProtection API.
7528
+ #
7529
+ # @!attribute [rw] task_arn
7530
+ # The task ARN.
7531
+ # @return [String]
7532
+ #
7533
+ # @!attribute [rw] protection_enabled
7534
+ # The protection status of the task. If scale-in protection is enabled
7535
+ # for a task, the value is `true`. Otherwise, it is `false`.
7536
+ # @return [Boolean]
7537
+ #
7538
+ # @!attribute [rw] expiration_date
7539
+ # The epoch time when protection for the task will expire.
7540
+ # @return [Time]
7541
+ #
7542
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ProtectedTask AWS API Documentation
7543
+ #
7544
+ class ProtectedTask < Struct.new(
7545
+ :task_arn,
7546
+ :protection_enabled,
7547
+ :expiration_date)
7548
+ SENSITIVE = []
7549
+ include Aws::Structure
7550
+ end
7551
+
7473
7552
  # The configuration details for the App Mesh proxy.
7474
7553
  #
7475
7554
  # For tasks that use the EC2 launch type, the container instances
@@ -12310,6 +12389,79 @@ module Aws::ECS
12310
12389
  include Aws::Structure
12311
12390
  end
12312
12391
 
12392
+ # @note When making an API call, you may pass UpdateTaskProtectionRequest
12393
+ # data as a hash:
12394
+ #
12395
+ # {
12396
+ # cluster: "String", # required
12397
+ # tasks: ["String"], # required
12398
+ # protection_enabled: false, # required
12399
+ # expires_in_minutes: 1,
12400
+ # }
12401
+ #
12402
+ # @!attribute [rw] cluster
12403
+ # The short name or full Amazon Resource Name (ARN) of the cluster
12404
+ # that hosts the service that the task sets exist in.
12405
+ # @return [String]
12406
+ #
12407
+ # @!attribute [rw] tasks
12408
+ # A list of up to 10 task IDs or full ARN entries.
12409
+ # @return [Array<String>]
12410
+ #
12411
+ # @!attribute [rw] protection_enabled
12412
+ # Specify `true` to mark a task for protection and `false` to unset
12413
+ # protection, making it eligible for termination.
12414
+ # @return [Boolean]
12415
+ #
12416
+ # @!attribute [rw] expires_in_minutes
12417
+ # If you set `protectionEnabled` to `true`, you can specify the
12418
+ # duration for task protection in minutes. You can specify a value
12419
+ # from 1 minute to up to 2,880 minutes (48 hours). During this time,
12420
+ # your task will not be terminated by scale-in events from Service
12421
+ # Auto Scaling or deployments. After this time period lapses,
12422
+ # `protectionEnabled` will be reset to `false`.
12423
+ #
12424
+ # If you don’t specify the time, then the task is automatically
12425
+ # protected for 120 minutes (2 hours).
12426
+ # @return [Integer]
12427
+ #
12428
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateTaskProtectionRequest AWS API Documentation
12429
+ #
12430
+ class UpdateTaskProtectionRequest < Struct.new(
12431
+ :cluster,
12432
+ :tasks,
12433
+ :protection_enabled,
12434
+ :expires_in_minutes)
12435
+ SENSITIVE = []
12436
+ include Aws::Structure
12437
+ end
12438
+
12439
+ # @!attribute [rw] protected_tasks
12440
+ # A list of tasks with the following information.
12441
+ #
12442
+ # * `taskArn`\: The task ARN.
12443
+ #
12444
+ # * `protectionEnabled`\: The protection status of the task. If
12445
+ # scale-in protection is enabled for a task, the value is `true`.
12446
+ # Otherwise, it is `false`.
12447
+ #
12448
+ # * `expirationDate`\: The epoch time when protection for the task
12449
+ # will expire.
12450
+ # @return [Array<Types::ProtectedTask>]
12451
+ #
12452
+ # @!attribute [rw] failures
12453
+ # Any failures associated with the call.
12454
+ # @return [Array<Types::Failure>]
12455
+ #
12456
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateTaskProtectionResponse AWS API Documentation
12457
+ #
12458
+ class UpdateTaskProtectionResponse < Struct.new(
12459
+ :protected_tasks,
12460
+ :failures)
12461
+ SENSITIVE = []
12462
+ include Aws::Structure
12463
+ end
12464
+
12313
12465
  # @note When making an API call, you may pass UpdateTaskSetRequest
12314
12466
  # data as a hash:
12315
12467
  #
data/lib/aws-sdk-ecs.rb CHANGED
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-ecs/customizations'
53
53
  # @!group service
54
54
  module Aws::ECS
55
55
 
56
- GEM_VERSION = '1.104.0'
56
+ GEM_VERSION = '1.105.0'
57
57
 
58
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-ecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.104.0
4
+ version: 1.105.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2022-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core