Skip to content

Commit

Permalink
feat(client-ec2): This release introduces EC2 AMI Deregistration Prot…
Browse files Browse the repository at this point in the history
…ection, 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.
  • Loading branch information
awstools committed Apr 23, 2024
1 parent 71c61f3 commit 4fcf9f7
Show file tree
Hide file tree
Showing 31 changed files with 1,007 additions and 319 deletions.
16 changes: 16 additions & 0 deletions clients/client-ec2/README.md
Expand Up @@ -3269,6 +3269,14 @@ DisableImageDeprecation

[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/)

</details>
<details>
<summary>
DisableImageDeregistrationProtection
</summary>

[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/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -3509,6 +3517,14 @@ EnableImageDeprecation

[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/)

</details>
<details>
<summary>
EnableImageDeregistrationProtection
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
46 changes: 46 additions & 0 deletions clients/client-ec2/src/EC2.ts
Expand Up @@ -1873,6 +1873,11 @@ import {
DisableImageDeprecationCommandInput,
DisableImageDeprecationCommandOutput,
} from "./commands/DisableImageDeprecationCommand";
import {
DisableImageDeregistrationProtectionCommand,
DisableImageDeregistrationProtectionCommandInput,
DisableImageDeregistrationProtectionCommandOutput,
} from "./commands/DisableImageDeregistrationProtectionCommand";
import {
DisableIpamOrganizationAdminAccountCommand,
DisableIpamOrganizationAdminAccountCommandInput,
Expand Down Expand Up @@ -2019,6 +2024,11 @@ import {
EnableImageDeprecationCommandInput,
EnableImageDeprecationCommandOutput,
} from "./commands/EnableImageDeprecationCommand";
import {
EnableImageDeregistrationProtectionCommand,
EnableImageDeregistrationProtectionCommandInput,
EnableImageDeregistrationProtectionCommandOutput,
} from "./commands/EnableImageDeregistrationProtectionCommand";
import {
EnableIpamOrganizationAdminAccountCommand,
EnableIpamOrganizationAdminAccountCommandInput,
Expand Down Expand Up @@ -3410,6 +3420,7 @@ const commands = {
DisableImageCommand,
DisableImageBlockPublicAccessCommand,
DisableImageDeprecationCommand,
DisableImageDeregistrationProtectionCommand,
DisableIpamOrganizationAdminAccountCommand,
DisableSerialConsoleAccessCommand,
DisableSnapshotBlockPublicAccessCommand,
Expand Down Expand Up @@ -3440,6 +3451,7 @@ const commands = {
EnableImageCommand,
EnableImageBlockPublicAccessCommand,
EnableImageDeprecationCommand,
EnableImageDeregistrationProtectionCommand,
EnableIpamOrganizationAdminAccountCommand,
EnableReachabilityAnalyzerOrganizationSharingCommand,
EnableSerialConsoleAccessCommand,
Expand Down Expand Up @@ -10077,6 +10089,23 @@ export interface EC2 {
cb: (err: any, data?: DisableImageDeprecationCommandOutput) => void
): void;

/**
* @see {@link DisableImageDeregistrationProtectionCommand}
*/
disableImageDeregistrationProtection(
args: DisableImageDeregistrationProtectionCommandInput,
options?: __HttpHandlerOptions
): Promise<DisableImageDeregistrationProtectionCommandOutput>;
disableImageDeregistrationProtection(
args: DisableImageDeregistrationProtectionCommandInput,
cb: (err: any, data?: DisableImageDeregistrationProtectionCommandOutput) => void
): void;
disableImageDeregistrationProtection(
args: DisableImageDeregistrationProtectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DisableImageDeregistrationProtectionCommandOutput) => void
): void;

/**
* @see {@link DisableIpamOrganizationAdminAccountCommand}
*/
Expand Down Expand Up @@ -10587,6 +10616,23 @@ export interface EC2 {
cb: (err: any, data?: EnableImageDeprecationCommandOutput) => void
): void;

/**
* @see {@link EnableImageDeregistrationProtectionCommand}
*/
enableImageDeregistrationProtection(
args: EnableImageDeregistrationProtectionCommandInput,
options?: __HttpHandlerOptions
): Promise<EnableImageDeregistrationProtectionCommandOutput>;
enableImageDeregistrationProtection(
args: EnableImageDeregistrationProtectionCommandInput,
cb: (err: any, data?: EnableImageDeregistrationProtectionCommandOutput) => void
): void;
enableImageDeregistrationProtection(
args: EnableImageDeregistrationProtectionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: EnableImageDeregistrationProtectionCommandOutput) => void
): void;

/**
* @see {@link EnableIpamOrganizationAdminAccountCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Expand Up @@ -1327,6 +1327,10 @@ import {
DisableImageDeprecationCommandInput,
DisableImageDeprecationCommandOutput,
} from "./commands/DisableImageDeprecationCommand";
import {
DisableImageDeregistrationProtectionCommandInput,
DisableImageDeregistrationProtectionCommandOutput,
} from "./commands/DisableImageDeregistrationProtectionCommand";
import {
DisableIpamOrganizationAdminAccountCommandInput,
DisableIpamOrganizationAdminAccountCommandOutput,
Expand Down Expand Up @@ -1441,6 +1445,10 @@ import {
EnableImageDeprecationCommandInput,
EnableImageDeprecationCommandOutput,
} from "./commands/EnableImageDeprecationCommand";
import {
EnableImageDeregistrationProtectionCommandInput,
EnableImageDeregistrationProtectionCommandOutput,
} from "./commands/EnableImageDeregistrationProtectionCommand";
import {
EnableIpamOrganizationAdminAccountCommandInput,
EnableIpamOrganizationAdminAccountCommandOutput,
Expand Down Expand Up @@ -2539,6 +2547,7 @@ export type ServiceInputTypes =
| DisableImageBlockPublicAccessCommandInput
| DisableImageCommandInput
| DisableImageDeprecationCommandInput
| DisableImageDeregistrationProtectionCommandInput
| DisableIpamOrganizationAdminAccountCommandInput
| DisableSerialConsoleAccessCommandInput
| DisableSnapshotBlockPublicAccessCommandInput
Expand Down Expand Up @@ -2569,6 +2578,7 @@ export type ServiceInputTypes =
| EnableImageBlockPublicAccessCommandInput
| EnableImageCommandInput
| EnableImageDeprecationCommandInput
| EnableImageDeregistrationProtectionCommandInput
| EnableIpamOrganizationAdminAccountCommandInput
| EnableReachabilityAnalyzerOrganizationSharingCommandInput
| EnableSerialConsoleAccessCommandInput
Expand Down Expand Up @@ -3162,6 +3172,7 @@ export type ServiceOutputTypes =
| DisableImageBlockPublicAccessCommandOutput
| DisableImageCommandOutput
| DisableImageDeprecationCommandOutput
| DisableImageDeregistrationProtectionCommandOutput
| DisableIpamOrganizationAdminAccountCommandOutput
| DisableSerialConsoleAccessCommandOutput
| DisableSnapshotBlockPublicAccessCommandOutput
Expand Down Expand Up @@ -3192,6 +3203,7 @@ export type ServiceOutputTypes =
| EnableImageBlockPublicAccessCommandOutput
| EnableImageCommandOutput
| EnableImageDeprecationCommandOutput
| EnableImageDeregistrationProtectionCommandOutput
| EnableIpamOrganizationAdminAccountCommandOutput
| EnableReachabilityAnalyzerOrganizationSharingCommandOutput
| EnableSerialConsoleAccessCommandOutput
Expand Down
Expand Up @@ -72,7 +72,7 @@ export interface CreateDhcpOptionsCommandOutput extends CreateDhcpOptionsResult,
* </li>
* <li>
* <p>
* <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.
* <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.
* 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
* lease renewal requests. Lease renewal typically occurs when half of the lease time has elapsed.</p>
* </li>
Expand Down
Expand Up @@ -37,9 +37,9 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
* 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
* an instance from a launch template</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <p>If you want to clone an existing launch template as the basis for creating a new
* launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support
* 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
* <p>To clone an existing launch template as the basis for a new launch template, use the
* Amazon EC2 console. The API, SDKs, and CLI do not support 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
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -32,13 +32,14 @@ export interface CreateLaunchTemplateVersionCommandInput extends CreateLaunchTem
export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTemplateVersionResult, __MetadataBearer {}

/**
* <p>Creates a new version of a launch template. You can specify an existing version of
* launch template from which to base the new version.</p>
* <p>Creates a new version of a launch template. You must specify an existing launch
* template, either by name or ID. You can determine whether the new version inherits
* parameters from a source version, and add or overwrite parameters as needed.</p>
* <p>Launch template versions are numbered in the order in which they are created. You
* cannot specify, change, or replace the numbering of launch template versions.</p>
* can't specify, change, or replace the numbering of launch template versions.</p>
* <p>Launch templates are immutable; after you create a launch template, you can't modify
* it. Instead, you can create a new version of the launch template that includes any
* changes you require.</p>
* it. Instead, you can create a new version of the launch template that includes the
* changes that you require.</p>
* <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
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* @example
Expand Down
Expand Up @@ -40,7 +40,7 @@ export interface DescribeImageAttributeCommandOutput extends ImageAttribute, __M
* // const { EC2Client, DescribeImageAttributeCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
* const client = new EC2Client(config);
* const input = { // DescribeImageAttributeRequest
* Attribute: "description" || "kernel" || "ramdisk" || "launchPermission" || "productCodes" || "blockDeviceMapping" || "sriovNetSupport" || "bootMode" || "tpmSupport" || "uefiData" || "lastLaunchedTime" || "imdsSupport", // required
* Attribute: "description" || "kernel" || "ramdisk" || "launchPermission" || "productCodes" || "blockDeviceMapping" || "sriovNetSupport" || "bootMode" || "tpmSupport" || "uefiData" || "lastLaunchedTime" || "imdsSupport" || "deregistrationProtection", // required
* ImageId: "STRING_VALUE", // required
* DryRun: true || false,
* };
Expand Down Expand Up @@ -99,6 +99,7 @@ export interface DescribeImageAttributeCommandOutput extends ImageAttribute, __M
* // UefiData: "<AttributeValue>",
* // LastLaunchedTime: "<AttributeValue>",
* // ImdsSupport: "<AttributeValue>",
* // DeregistrationProtection: "<AttributeValue>",
* // };
*
* ```
Expand Down
6 changes: 6 additions & 0 deletions clients/client-ec2/src/commands/DescribeImagesCommand.ts
Expand Up @@ -34,6 +34,10 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResult, __Met
* return empty results. After all instances that reference a deregistered AMI are terminated,
* specifying the ID of the image will eventually return an error indicating that the AMI ID
* cannot be found.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* <note>
* <p>The order of the elements in the response, including those within nested
* structures, might vary. Applications should not assume the elements appear in a
Expand Down Expand Up @@ -135,6 +139,8 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResult, __Met
* // DeprecationTime: "STRING_VALUE",
* // ImdsSupport: "v2.0",
* // SourceInstanceId: "STRING_VALUE",
* // DeregistrationProtection: "STRING_VALUE",
* // LastLaunchedTime: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
4 changes: 4 additions & 0 deletions clients/client-ec2/src/commands/DescribeInstancesCommand.ts
Expand Up @@ -43,6 +43,10 @@ export interface DescribeInstancesCommandOutput extends DescribeInstancesResult,
* not specify any instance IDs at all, the call fails. If you describe instances and
* specify only instance IDs that are in an unaffected zone, the call works
* normally.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* <note>
* <p>The order of the elements in the response, including those within nested
* structures, might vary. Applications should not assume the elements appear in a
Expand Down
Expand Up @@ -32,6 +32,10 @@ export interface DescribeNetworkInterfacesCommandOutput extends DescribeNetworkI
* you use pagination or one of the following filters: <code>group-id</code>,
* <code>mac-address</code>, <code>private-dns-name</code>, <code>private-ip-address</code>,
* <code>private-dns-name</code>, <code>subnet-id</code>, or <code>vpc-id</code>.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
4 changes: 4 additions & 0 deletions clients/client-ec2/src/commands/DescribeSnapshotsCommand.ts
Expand Up @@ -70,6 +70,10 @@ export interface DescribeSnapshotsCommandOutput extends DescribeSnapshotsResult,
* list more manageable. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
* <p>To get the state of fast snapshot restores for a snapshot, use <a>DescribeFastSnapshotRestores</a>.</p>
* <p>For more information about EBS snapshots, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-snapshots.html">Amazon EBS snapshots</a> in the <i>Amazon EBS User Guide</i>.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
4 changes: 4 additions & 0 deletions clients/client-ec2/src/commands/DescribeTagsCommand.ts
Expand Up @@ -30,6 +30,10 @@ export interface DescribeTagsCommandOutput extends DescribeTagsResult, __Metadat
* <p>Describes the specified tags for your EC2 resources.</p>
* <p>For more information about tags, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2 resources</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* <note>
* <p>The order of the elements in the response, including those within nested
* structures, might vary. Applications should not assume the elements appear in a
Expand Down
4 changes: 4 additions & 0 deletions clients/client-ec2/src/commands/DescribeVolumesCommand.ts
Expand Up @@ -31,6 +31,10 @@ export interface DescribeVolumesCommandOutput extends DescribeVolumesResult, __M
* <p>If you are describing a long list of volumes, we recommend that you paginate the output to make the list
* more manageable. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>
* <p>For more information about EBS volumes, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes.html">Amazon EBS volumes</a> in the <i>Amazon EBS User Guide</i>.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
* </important>
* <note>
* <p>The order of the elements in the response, including those within nested
* structures, might vary. Applications should not assume the elements appear in a
Expand Down

0 comments on commit 4fcf9f7

Please sign in to comment.