Skip to content

Commit dd0cdf2

Browse files
author
awstools
committed
feat(client-ec2): This release adds support for adding an ElasticBlockStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks.
1 parent fbbd00f commit dd0cdf2

File tree

16 files changed

+196
-96
lines changed

16 files changed

+196
-96
lines changed

clients/client-ec2/src/commands/AttachVolumeCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export interface AttachVolumeCommandOutput extends VolumeAttachment, __MetadataB
7474
* // State: "attaching" || "attached" || "detaching" || "detached" || "busy",
7575
* // VolumeId: "STRING_VALUE",
7676
* // DeleteOnTermination: true || false,
77+
* // AssociatedResource: "STRING_VALUE",
78+
* // InstanceOwningService: "STRING_VALUE",
7779
* // };
7880
*
7981
* ```

clients/client-ec2/src/commands/CreateVolumeCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export interface CreateVolumeCommandOutput extends Volume, __MetadataBearer {}
8181
* // State: "attaching" || "attached" || "detaching" || "detached" || "busy",
8282
* // VolumeId: "STRING_VALUE",
8383
* // DeleteOnTermination: true || false,
84+
* // AssociatedResource: "STRING_VALUE",
85+
* // InstanceOwningService: "STRING_VALUE",
8486
* // },
8587
* // ],
8688
* // AvailabilityZone: "STRING_VALUE",

clients/client-ec2/src/commands/DescribeInstanceAttributeCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export interface DescribeInstanceAttributeCommandOutput extends InstanceAttribut
6464
* // DeleteOnTermination: true || false,
6565
* // Status: "attaching" || "attached" || "detaching" || "detached",
6666
* // VolumeId: "STRING_VALUE",
67+
* // AssociatedResource: "STRING_VALUE",
68+
* // VolumeOwnerId: "STRING_VALUE",
6769
* // },
6870
* // },
6971
* // ],

clients/client-ec2/src/commands/DescribeInstancesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ export interface DescribeInstancesCommandOutput extends DescribeInstancesResult,
128128
* // DeleteOnTermination: true || false,
129129
* // Status: "attaching" || "attached" || "detaching" || "detached",
130130
* // VolumeId: "STRING_VALUE",
131+
* // AssociatedResource: "STRING_VALUE",
132+
* // VolumeOwnerId: "STRING_VALUE",
131133
* // },
132134
* // },
133135
* // ],

clients/client-ec2/src/commands/DescribeVolumesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export interface DescribeVolumesCommandOutput extends DescribeVolumesResult, __M
6767
* // State: "attaching" || "attached" || "detaching" || "detached" || "busy",
6868
* // VolumeId: "STRING_VALUE",
6969
* // DeleteOnTermination: true || false,
70+
* // AssociatedResource: "STRING_VALUE",
71+
* // InstanceOwningService: "STRING_VALUE",
7072
* // },
7173
* // ],
7274
* // AvailabilityZone: "STRING_VALUE",

clients/client-ec2/src/commands/DetachVolumeCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export interface DetachVolumeCommandOutput extends VolumeAttachment, __MetadataB
3838
* first.</p>
3939
* <p>When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the
4040
* product code is no longer associated with the instance.</p>
41+
* <p>You can't detach or force detach volumes that are attached to Amazon ECS or
42+
* Fargate tasks. Attempting to do this results in the <code>UnsupportedOperationException</code>
43+
* exception with the <code>Unable to detach volume attached to ECS tasks</code> error message.</p>
4144
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html">Detach an Amazon EBS volume</a> in the
4245
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
4346
* @example
@@ -62,6 +65,8 @@ export interface DetachVolumeCommandOutput extends VolumeAttachment, __MetadataB
6265
* // State: "attaching" || "attached" || "detaching" || "detached" || "busy",
6366
* // VolumeId: "STRING_VALUE",
6467
* // DeleteOnTermination: true || false,
68+
* // AssociatedResource: "STRING_VALUE",
69+
* // InstanceOwningService: "STRING_VALUE",
6570
* // };
6671
*
6772
* ```

clients/client-ec2/src/commands/RunInstancesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
345345
* // DeleteOnTermination: true || false,
346346
* // Status: "attaching" || "attached" || "detaching" || "detached",
347347
* // VolumeId: "STRING_VALUE",
348+
* // AssociatedResource: "STRING_VALUE",
349+
* // VolumeOwnerId: "STRING_VALUE",
348350
* // },
349351
* // },
350352
* // ],

clients/client-ec2/src/models/models_0.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6140,12 +6140,16 @@ export interface VolumeAttachment {
61406140
/**
61416141
* @public
61426142
* <p>The device name.</p>
6143+
* <p>If the volume is attached to a Fargate task, this parameter
6144+
* returns <code>null</code>.</p>
61436145
*/
61446146
Device?: string;
61456147

61466148
/**
61476149
* @public
61486150
* <p>The ID of the instance.</p>
6151+
* <p>If the volume is attached to a Fargate task, this parameter
6152+
* returns <code>null</code>.</p>
61496153
*/
61506154
InstanceId?: string;
61516155

@@ -6166,6 +6170,22 @@ export interface VolumeAttachment {
61666170
* <p>Indicates whether the EBS volume is deleted on instance termination.</p>
61676171
*/
61686172
DeleteOnTermination?: boolean;
6173+
6174+
/**
6175+
* @public
6176+
* <p>The ARN of the Amazon ECS or Fargate task
6177+
* to which the volume is attached.</p>
6178+
*/
6179+
AssociatedResource?: string;
6180+
6181+
/**
6182+
* @public
6183+
* <p>The service principal of Amazon Web Services service that owns the underlying
6184+
* instance to which the volume is attached.</p>
6185+
* <p>This parameter is returned only for volumes that are attached to
6186+
* Fargate tasks.</p>
6187+
*/
6188+
InstanceOwningService?: string;
61696189
}
61706190

61716191
/**

clients/client-ec2/src/models/models_1.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2756,15 +2756,14 @@ export type TargetCapacityUnitType = (typeof TargetCapacityUnitType)[keyof typeo
27562756
* does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances
27572757
* in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're
27582758
* willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops
2759-
* launching instances even if it hasnt met the target capacity. The
2759+
* launching instances even if it hasn't met the target capacity. The
27602760
* <code>MaxTotalPrice</code> parameters are located in <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest">OnDemandOptionsRequest</a>
27612761
* and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest">SpotOptionsRequest</a>.</p>
27622762
*/
27632763
export interface TargetCapacitySpecificationRequest {
27642764
/**
27652765
* @public
2766-
* <p>The number of units to request, filled using
2767-
* <code>DefaultTargetCapacityType</code>.</p>
2766+
* <p>The number of units to request, filled using the default target capacity type.</p>
27682767
*/
27692768
TotalTargetCapacity: number | undefined;
27702769

@@ -2782,15 +2781,15 @@ export interface TargetCapacitySpecificationRequest {
27822781

27832782
/**
27842783
* @public
2785-
* <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or
2786-
* <code>On-Demand</code>.</p>
2784+
* <p>The default target capacity type.</p>
27872785
*/
27882786
DefaultTargetCapacityType?: DefaultTargetCapacityType;
27892787

27902788
/**
27912789
* @public
2792-
* <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
2793-
* <p>Default: <code>units</code> (translates to number of instances)</p>
2790+
* <p>The unit for the target capacity. You can specify this parameter only when using
2791+
* attributed-based instance type selection.</p>
2792+
* <p>Default: <code>units</code> (the number of instances)</p>
27942793
*/
27952794
TargetCapacityUnitType?: TargetCapacityUnitType;
27962795
}
@@ -9158,7 +9157,7 @@ export interface StateReason {
91589157
* <li>
91599158
* <p>
91609159
* <code>Client.InstanceInitiatedShutdown</code>: The instance was shut down
9161-
* using the <code>shutdown -h</code> command from the instance.</p>
9160+
* from the operating system of the instance.</p>
91629161
* </li>
91639162
* <li>
91649163
* <p>

clients/client-ec2/src/models/models_3.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,7 +2859,8 @@ export interface DescribeCapacityBlockOfferingsRequest {
28592859

28602860
/**
28612861
* @public
2862-
* <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
2862+
* <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information,
2863+
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
28632864
*/
28642865
MaxResults?: number;
28652866
}
@@ -2965,7 +2966,8 @@ export interface DescribeCapacityReservationFleetsRequest {
29652966

29662967
/**
29672968
* @public
2968-
* <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
2969+
* <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information,
2970+
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
29692971
*/
29702972
MaxResults?: number;
29712973

@@ -3190,7 +3192,8 @@ export interface DescribeCapacityReservationsRequest {
31903192

31913193
/**
31923194
* @public
3193-
* <p>The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned <code>nextToken</code> value. This value can be between 5 and 500. If <code>maxResults</code> is given a larger value than 500, you receive an error.</p>
3195+
* <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information,
3196+
* see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
31943197
*/
31953198
MaxResults?: number;
31963199

@@ -6596,8 +6599,7 @@ export interface SpotOptions {
65966599
export interface TargetCapacitySpecification {
65976600
/**
65986601
* @public
6599-
* <p>The number of units to request, filled using
6600-
* <code>DefaultTargetCapacityType</code>.</p>
6602+
* <p>The number of units to request, filled the default target capacity type.</p>
66016603
*/
66026604
TotalTargetCapacity?: number;
66036605

@@ -6615,15 +6617,13 @@ export interface TargetCapacitySpecification {
66156617

66166618
/**
66176619
* @public
6618-
* <p>The default <code>TotalTargetCapacity</code>, which is either <code>Spot</code> or
6619-
* <code>On-Demand</code>.</p>
6620+
* <p>The default target capacity type.</p>
66206621
*/
66216622
DefaultTargetCapacityType?: DefaultTargetCapacityType;
66226623

66236624
/**
66246625
* @public
6625-
* <p>The unit for the target capacity. <code>TargetCapacityUnitType</code> can only be specified when <code>InstanceRequirements</code> is specified.</p>
6626-
* <p>Default: <code>units</code> (translates to number of instances)</p>
6626+
* <p>The unit for the target capacity.</p>
66276627
*/
66286628
TargetCapacityUnitType?: TargetCapacityUnitType;
66296629
}

0 commit comments

Comments
 (0)