Skip to content

Commit 4fcf9f7

Browse files
author
awstools
committed
feat(client-ec2): This release introduces EC2 AMI Deregistration Protection, a new AMI property that can be enabled by customers to protect an AMI against an unintended deregistration. This release also enables the AMI owners to view the AMI 'LastLaunchedTime' in DescribeImages API.
1 parent 71c61f3 commit 4fcf9f7

31 files changed

+1007
-319
lines changed

clients/client-ec2/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,6 +3269,14 @@ DisableImageDeprecation
32693269

32703270
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DisableImageDeprecationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DisableImageDeprecationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DisableImageDeprecationCommandOutput/)
32713271

3272+
</details>
3273+
<details>
3274+
<summary>
3275+
DisableImageDeregistrationProtection
3276+
</summary>
3277+
3278+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/DisableImageDeregistrationProtectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DisableImageDeregistrationProtectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/DisableImageDeregistrationProtectionCommandOutput/)
3279+
32723280
</details>
32733281
<details>
32743282
<summary>
@@ -3509,6 +3517,14 @@ EnableImageDeprecation
35093517

35103518
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/EnableImageDeprecationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/EnableImageDeprecationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/EnableImageDeprecationCommandOutput/)
35113519

3520+
</details>
3521+
<details>
3522+
<summary>
3523+
EnableImageDeregistrationProtection
3524+
</summary>
3525+
3526+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/EnableImageDeregistrationProtectionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/EnableImageDeregistrationProtectionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/EnableImageDeregistrationProtectionCommandOutput/)
3527+
35123528
</details>
35133529
<details>
35143530
<summary>

clients/client-ec2/src/EC2.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,11 @@ import {
18731873
DisableImageDeprecationCommandInput,
18741874
DisableImageDeprecationCommandOutput,
18751875
} from "./commands/DisableImageDeprecationCommand";
1876+
import {
1877+
DisableImageDeregistrationProtectionCommand,
1878+
DisableImageDeregistrationProtectionCommandInput,
1879+
DisableImageDeregistrationProtectionCommandOutput,
1880+
} from "./commands/DisableImageDeregistrationProtectionCommand";
18761881
import {
18771882
DisableIpamOrganizationAdminAccountCommand,
18781883
DisableIpamOrganizationAdminAccountCommandInput,
@@ -2019,6 +2024,11 @@ import {
20192024
EnableImageDeprecationCommandInput,
20202025
EnableImageDeprecationCommandOutput,
20212026
} from "./commands/EnableImageDeprecationCommand";
2027+
import {
2028+
EnableImageDeregistrationProtectionCommand,
2029+
EnableImageDeregistrationProtectionCommandInput,
2030+
EnableImageDeregistrationProtectionCommandOutput,
2031+
} from "./commands/EnableImageDeregistrationProtectionCommand";
20222032
import {
20232033
EnableIpamOrganizationAdminAccountCommand,
20242034
EnableIpamOrganizationAdminAccountCommandInput,
@@ -3410,6 +3420,7 @@ const commands = {
34103420
DisableImageCommand,
34113421
DisableImageBlockPublicAccessCommand,
34123422
DisableImageDeprecationCommand,
3423+
DisableImageDeregistrationProtectionCommand,
34133424
DisableIpamOrganizationAdminAccountCommand,
34143425
DisableSerialConsoleAccessCommand,
34153426
DisableSnapshotBlockPublicAccessCommand,
@@ -3440,6 +3451,7 @@ const commands = {
34403451
EnableImageCommand,
34413452
EnableImageBlockPublicAccessCommand,
34423453
EnableImageDeprecationCommand,
3454+
EnableImageDeregistrationProtectionCommand,
34433455
EnableIpamOrganizationAdminAccountCommand,
34443456
EnableReachabilityAnalyzerOrganizationSharingCommand,
34453457
EnableSerialConsoleAccessCommand,
@@ -10077,6 +10089,23 @@ export interface EC2 {
1007710089
cb: (err: any, data?: DisableImageDeprecationCommandOutput) => void
1007810090
): void;
1007910091

10092+
/**
10093+
* @see {@link DisableImageDeregistrationProtectionCommand}
10094+
*/
10095+
disableImageDeregistrationProtection(
10096+
args: DisableImageDeregistrationProtectionCommandInput,
10097+
options?: __HttpHandlerOptions
10098+
): Promise<DisableImageDeregistrationProtectionCommandOutput>;
10099+
disableImageDeregistrationProtection(
10100+
args: DisableImageDeregistrationProtectionCommandInput,
10101+
cb: (err: any, data?: DisableImageDeregistrationProtectionCommandOutput) => void
10102+
): void;
10103+
disableImageDeregistrationProtection(
10104+
args: DisableImageDeregistrationProtectionCommandInput,
10105+
options: __HttpHandlerOptions,
10106+
cb: (err: any, data?: DisableImageDeregistrationProtectionCommandOutput) => void
10107+
): void;
10108+
1008010109
/**
1008110110
* @see {@link DisableIpamOrganizationAdminAccountCommand}
1008210111
*/
@@ -10587,6 +10616,23 @@ export interface EC2 {
1058710616
cb: (err: any, data?: EnableImageDeprecationCommandOutput) => void
1058810617
): void;
1058910618

10619+
/**
10620+
* @see {@link EnableImageDeregistrationProtectionCommand}
10621+
*/
10622+
enableImageDeregistrationProtection(
10623+
args: EnableImageDeregistrationProtectionCommandInput,
10624+
options?: __HttpHandlerOptions
10625+
): Promise<EnableImageDeregistrationProtectionCommandOutput>;
10626+
enableImageDeregistrationProtection(
10627+
args: EnableImageDeregistrationProtectionCommandInput,
10628+
cb: (err: any, data?: EnableImageDeregistrationProtectionCommandOutput) => void
10629+
): void;
10630+
enableImageDeregistrationProtection(
10631+
args: EnableImageDeregistrationProtectionCommandInput,
10632+
options: __HttpHandlerOptions,
10633+
cb: (err: any, data?: EnableImageDeregistrationProtectionCommandOutput) => void
10634+
): void;
10635+
1059010636
/**
1059110637
* @see {@link EnableIpamOrganizationAdminAccountCommand}
1059210638
*/

clients/client-ec2/src/EC2Client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,10 @@ import {
13271327
DisableImageDeprecationCommandInput,
13281328
DisableImageDeprecationCommandOutput,
13291329
} from "./commands/DisableImageDeprecationCommand";
1330+
import {
1331+
DisableImageDeregistrationProtectionCommandInput,
1332+
DisableImageDeregistrationProtectionCommandOutput,
1333+
} from "./commands/DisableImageDeregistrationProtectionCommand";
13301334
import {
13311335
DisableIpamOrganizationAdminAccountCommandInput,
13321336
DisableIpamOrganizationAdminAccountCommandOutput,
@@ -1441,6 +1445,10 @@ import {
14411445
EnableImageDeprecationCommandInput,
14421446
EnableImageDeprecationCommandOutput,
14431447
} from "./commands/EnableImageDeprecationCommand";
1448+
import {
1449+
EnableImageDeregistrationProtectionCommandInput,
1450+
EnableImageDeregistrationProtectionCommandOutput,
1451+
} from "./commands/EnableImageDeregistrationProtectionCommand";
14441452
import {
14451453
EnableIpamOrganizationAdminAccountCommandInput,
14461454
EnableIpamOrganizationAdminAccountCommandOutput,
@@ -2539,6 +2547,7 @@ export type ServiceInputTypes =
25392547
| DisableImageBlockPublicAccessCommandInput
25402548
| DisableImageCommandInput
25412549
| DisableImageDeprecationCommandInput
2550+
| DisableImageDeregistrationProtectionCommandInput
25422551
| DisableIpamOrganizationAdminAccountCommandInput
25432552
| DisableSerialConsoleAccessCommandInput
25442553
| DisableSnapshotBlockPublicAccessCommandInput
@@ -2569,6 +2578,7 @@ export type ServiceInputTypes =
25692578
| EnableImageBlockPublicAccessCommandInput
25702579
| EnableImageCommandInput
25712580
| EnableImageDeprecationCommandInput
2581+
| EnableImageDeregistrationProtectionCommandInput
25722582
| EnableIpamOrganizationAdminAccountCommandInput
25732583
| EnableReachabilityAnalyzerOrganizationSharingCommandInput
25742584
| EnableSerialConsoleAccessCommandInput
@@ -3162,6 +3172,7 @@ export type ServiceOutputTypes =
31623172
| DisableImageBlockPublicAccessCommandOutput
31633173
| DisableImageCommandOutput
31643174
| DisableImageDeprecationCommandOutput
3175+
| DisableImageDeregistrationProtectionCommandOutput
31653176
| DisableIpamOrganizationAdminAccountCommandOutput
31663177
| DisableSerialConsoleAccessCommandOutput
31673178
| DisableSnapshotBlockPublicAccessCommandOutput
@@ -3192,6 +3203,7 @@ export type ServiceOutputTypes =
31923203
| EnableImageBlockPublicAccessCommandOutput
31933204
| EnableImageCommandOutput
31943205
| EnableImageDeprecationCommandOutput
3206+
| EnableImageDeregistrationProtectionCommandOutput
31953207
| EnableIpamOrganizationAdminAccountCommandOutput
31963208
| EnableReachabilityAnalyzerOrganizationSharingCommandOutput
31973209
| EnableSerialConsoleAccessCommandOutput

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export interface CreateDhcpOptionsCommandOutput extends CreateDhcpOptionsResult,
7272
* </li>
7373
* <li>
7474
* <p>
75-
* <code>ipv6-preferred-lease-time</code> - A value (in seconds, minutes, hours, or years) for how frequently a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
75+
* <code>ipv6-address-preferred-lease-time</code> - A value (in seconds, minutes, hours, or years) for how frequently a running instance with an IPv6 assigned to it goes through DHCPv6 lease renewal.
7676
* Acceptable values are between 140 and 2147483647 seconds (approximately 68 years). If no value is entered, the default lease time is 140 seconds. If you use long-term addressing for EC2 instances, you can increase the lease time and avoid frequent
7777
* lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.</p>
7878
* </li>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
3737
* of providing the launch parameters in the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launch
3838
* an instance from a launch template</a> in the
3939
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
40-
* <p>If you want to clone an existing launch template as the basis for creating a new
41-
* launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support
42-
* cloning a template. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template">Create a launch template from an existing launch template</a> in the
40+
* <p>To clone an existing launch template as the basis for a new launch template, use the
41+
* Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. For more
42+
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template">Create a launch template from an existing launch template</a> in the
4343
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
4444
* @example
4545
* Use a bare-bones client and the command you need to make an API call.

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ export interface CreateLaunchTemplateVersionCommandInput extends CreateLaunchTem
3232
export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTemplateVersionResult, __MetadataBearer {}
3333

3434
/**
35-
* <p>Creates a new version of a launch template. You can specify an existing version of
36-
* launch template from which to base the new version.</p>
35+
* <p>Creates a new version of a launch template. You must specify an existing launch
36+
* template, either by name or ID. You can determine whether the new version inherits
37+
* parameters from a source version, and add or overwrite parameters as needed.</p>
3738
* <p>Launch template versions are numbered in the order in which they are created. You
38-
* cannot specify, change, or replace the numbering of launch template versions.</p>
39+
* can't specify, change, or replace the numbering of launch template versions.</p>
3940
* <p>Launch templates are immutable; after you create a launch template, you can't modify
40-
* it. Instead, you can create a new version of the launch template that includes any
41-
* changes you require.</p>
41+
* it. Instead, you can create a new version of the launch template that includes the
42+
* changes that you require.</p>
4243
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions">Modify a launch template (manage launch template versions)</a> in the
4344
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
4445
* @example

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface DescribeImageAttributeCommandOutput extends ImageAttribute, __M
4040
* // const { EC2Client, DescribeImageAttributeCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
4141
* const client = new EC2Client(config);
4242
* const input = { // DescribeImageAttributeRequest
43-
* Attribute: "description" || "kernel" || "ramdisk" || "launchPermission" || "productCodes" || "blockDeviceMapping" || "sriovNetSupport" || "bootMode" || "tpmSupport" || "uefiData" || "lastLaunchedTime" || "imdsSupport", // required
43+
* Attribute: "description" || "kernel" || "ramdisk" || "launchPermission" || "productCodes" || "blockDeviceMapping" || "sriovNetSupport" || "bootMode" || "tpmSupport" || "uefiData" || "lastLaunchedTime" || "imdsSupport" || "deregistrationProtection", // required
4444
* ImageId: "STRING_VALUE", // required
4545
* DryRun: true || false,
4646
* };
@@ -99,6 +99,7 @@ export interface DescribeImageAttributeCommandOutput extends ImageAttribute, __M
9999
* // UefiData: "<AttributeValue>",
100100
* // LastLaunchedTime: "<AttributeValue>",
101101
* // ImdsSupport: "<AttributeValue>",
102+
* // DeregistrationProtection: "<AttributeValue>",
102103
* // };
103104
*
104105
* ```

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResult, __Met
3434
* return empty results. After all instances that reference a deregistered AMI are terminated,
3535
* specifying the ID of the image will eventually return an error indicating that the AMI ID
3636
* cannot be found.</p>
37+
* <important>
38+
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
39+
* susceptible to throttling and timeouts.</p>
40+
* </important>
3741
* <note>
3842
* <p>The order of the elements in the response, including those within nested
3943
* structures, might vary. Applications should not assume the elements appear in a
@@ -135,6 +139,8 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResult, __Met
135139
* // DeprecationTime: "STRING_VALUE",
136140
* // ImdsSupport: "v2.0",
137141
* // SourceInstanceId: "STRING_VALUE",
142+
* // DeregistrationProtection: "STRING_VALUE",
143+
* // LastLaunchedTime: "STRING_VALUE",
138144
* // },
139145
* // ],
140146
* // NextToken: "STRING_VALUE",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export interface DescribeInstancesCommandOutput extends DescribeInstancesResult,
4343
* not specify any instance IDs at all, the call fails. If you describe instances and
4444
* specify only instance IDs that are in an unaffected zone, the call works
4545
* normally.</p>
46+
* <important>
47+
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
48+
* susceptible to throttling and timeouts.</p>
49+
* </important>
4650
* <note>
4751
* <p>The order of the elements in the response, including those within nested
4852
* structures, might vary. Applications should not assume the elements appear in a

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ export interface DescribeNetworkInterfacesCommandOutput extends DescribeNetworkI
3232
* you use pagination or one of the following filters: <code>group-id</code>,
3333
* <code>mac-address</code>, <code>private-dns-name</code>, <code>private-ip-address</code>,
3434
* <code>private-dns-name</code>, <code>subnet-id</code>, or <code>vpc-id</code>.</p>
35+
* <important>
36+
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
37+
* susceptible to throttling and timeouts.</p>
38+
* </important>
3539
* @example
3640
* Use a bare-bones client and the command you need to make an API call.
3741
* ```javascript

0 commit comments

Comments
 (0)