Skip to content

Commit

Permalink
feat(client-ec2): This release adds support for AMD SEV-SNP on EC2 in…
Browse files Browse the repository at this point in the history
…stances.
  • Loading branch information
awstools committed Apr 27, 2023
1 parent 3699876 commit c57a8bf
Show file tree
Hide file tree
Showing 23 changed files with 656 additions and 533 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
* CpuOptions: { // LaunchTemplateCpuOptionsRequest
* CoreCount: Number("int"),
* ThreadsPerCore: Number("int"),
* AmdSevSnp: "enabled" || "disabled",
* },
* CapacityReservationSpecification: { // LaunchTemplateCapacityReservationSpecificationRequest
* CapacityReservationPreference: "open" || "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* CpuOptions: { // LaunchTemplateCpuOptionsRequest
* CoreCount: Number("int"),
* ThreadsPerCore: Number("int"),
* AmdSevSnp: "enabled" || "disabled",
* },
* CapacityReservationSpecification: { // LaunchTemplateCapacityReservationSpecificationRequest
* CapacityReservationPreference: "open" || "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DeleteSpotDatafeedSubscriptionRequest } from "../models/models_2";
import { DeleteSpotDatafeedSubscriptionRequest } from "../models/models_3";
import {
de_DeleteSpotDatafeedSubscriptionCommand,
se_DeleteSpotDatafeedSubscriptionCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DescribeVolumeAttributeRequest, DescribeVolumeAttributeResult } from "../models/models_4";
import { DescribeVolumeAttributeRequest } from "../models/models_4";
import { DescribeVolumeAttributeResult } from "../models/models_5";
import { de_DescribeVolumeAttributeCommand, se_DescribeVolumeAttributeCommand } from "../protocols/Aws_ec2";

/**
Expand Down
3 changes: 1 addition & 2 deletions clients/client-ec2/src/commands/DescribeVolumesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DescribeVolumesRequest } from "../models/models_4";
import { DescribeVolumesResult } from "../models/models_5";
import { DescribeVolumesRequest, DescribeVolumesResult } from "../models/models_5";
import { de_DescribeVolumesCommand, se_DescribeVolumesCommand } from "../protocols/Aws_ec2";

/**
Expand Down
2 changes: 1 addition & 1 deletion clients/client-ec2/src/commands/ImportKeyPairCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { ImportKeyPairRequest, ImportKeyPairResult } from "../models/models_5";
import { ImportKeyPairRequest, ImportKeyPairResult } from "../models/models_6";
import { de_ImportKeyPairCommand, se_ImportKeyPairCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ModifyInstanceAttributeCommandOutput extends __MetadataBearer {
* attribute at a time.</p>
* <p>
* <b>Note: </b>Using this action to change the security groups
* associated with an elastic network interface (ENI) attached to an instance in a VPC can
* associated with an elastic network interface (ENI) attached to an instance can
* result in an error if the instance has more than one ENI. To change the security groups
* associated with an ENI attached to an instance that has multiple ENIs, we recommend that
* you use the <a>ModifyNetworkInterfaceAttribute</a> action.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export interface ModifyReservedInstancesCommandOutput extends ModifyReservedInst
* except for Availability Zone, network platform, and instance type.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html">Modifying Reserved
* Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <note>
* <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ export interface PurchaseReservedInstancesOfferingCommandOutput
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html">Reserved Instances</a> and
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html">Reserved Instance Marketplace</a>
* in the <i>Amazon EC2 User Guide</i>.</p>
* <note>
* <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ export interface RequestSpotInstancesCommandOutput extends RequestSpotInstancesR
* is the best Spot request method to use?</a> in the
* <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
* </important>
* <note>
* <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a VPC</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
19 changes: 3 additions & 16 deletions clients/client-ec2/src/commands/RunInstancesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,12 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
* apply:</p>
* <ul>
* <li>
* <p>[EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from
* <p>If you don't specify a subnet ID, we choose a default subnet from
* your default VPC for you. If you don't have a default VPC, you must specify a
* subnet ID in the request.</p>
* </li>
* <li>
* <p>[EC2-Classic] If don't specify an Availability Zone, we choose one for
* you.</p>
* </li>
* <li>
* <p>Some instance types must be launched into a VPC. If you do not have a default
* VPC, or if you do not specify a subnet ID, the request fails. For more
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html#vpc-only-instance-types">Instance types available only in a VPC</a>.</p>
* </li>
* <li>
* <p>[EC2-VPC] All instances have a network interface with a primary private IPv4
* <p>All instances have a network interface with a primary private IPv4
* address. If you don't specify this address, we choose one from the IPv4 range of
* your subnet.</p>
* </li>
Expand Down Expand Up @@ -90,11 +81,6 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
* pairs</a>.</p>
* <p>For troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html">What to do if
* an instance immediately terminates</a>, and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html">Troubleshooting connecting to your instance</a>.</p>
* <note>
* <p>We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a
* VPC. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html">Migrate from EC2-Classic to a
* VPC</a> in the <i>Amazon EC2 User Guide</i>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -251,6 +237,7 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer
* CpuOptions: { // CpuOptionsRequest
* CoreCount: Number("int"),
* ThreadsPerCore: Number("int"),
* AmdSevSnp: "enabled" || "disabled",
* },
* CapacityReservationSpecification: { // CapacityReservationSpecification
* CapacityReservationPreference: "open" || "none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { SendDiagnosticInterruptRequest } from "../models/models_6";
import { SendDiagnosticInterruptRequest } from "../models/models_7";
import { de_SendDiagnosticInterruptCommand, se_SendDiagnosticInterruptCommand } from "../protocols/Aws_ec2";

/**
Expand Down
3 changes: 1 addition & 2 deletions clients/client-ec2/src/commands/StartInstancesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
} from "@aws-sdk/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { StartInstancesRequest } from "../models/models_6";
import { StartInstancesResult } from "../models/models_7";
import { StartInstancesRequest, StartInstancesResult } from "../models/models_7";
import { de_StartInstancesCommand, se_StartInstancesCommand } from "../protocols/Aws_ec2";

/**
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6622,7 +6622,7 @@ export interface CancelSpotInstanceRequestsRequest {
DryRun?: boolean;

/**
* <p>One or more Spot Instance request IDs.</p>
* <p>The IDs of the Spot Instance requests.</p>
*/
SpotInstanceRequestIds: string[] | undefined;
}
Expand Down Expand Up @@ -6667,7 +6667,7 @@ export interface CancelledSpotInstanceRequest {
*/
export interface CancelSpotInstanceRequestsResult {
/**
* <p>One or more Spot Instance requests.</p>
* <p>The Spot Instance requests.</p>
*/
CancelledSpotInstanceRequests?: CancelledSpotInstanceRequest[];
}
Expand Down
130 changes: 39 additions & 91 deletions clients/client-ec2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ export interface Placement {
HostId?: string;

/**
* <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a
* <p>The tenancy of the instance. An instance with a
* tenancy of <code>dedicated</code> runs on single-tenant hardware.</p>
* <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet">CreateFleet</a>. The
* <code>host</code> tenancy is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html">ImportInstance</a> or
Expand Down Expand Up @@ -5304,6 +5304,20 @@ export interface LaunchTemplateCapacityReservationSpecificationRequest {
CapacityReservationTarget?: CapacityReservationTarget;
}

/**
* @public
* @enum
*/
export const AmdSevSnpSpecification = {
disabled: "disabled",
enabled: "enabled",
} as const;

/**
* @public
*/
export type AmdSevSnpSpecification = (typeof AmdSevSnpSpecification)[keyof typeof AmdSevSnpSpecification];

/**
* @public
* <p>The CPU options for the instance. Both the core count and threads per core must be
Expand All @@ -5321,6 +5335,12 @@ export interface LaunchTemplateCpuOptionsRequest {
* <code>2</code>.</p>
*/
ThreadsPerCore?: number;

/**
* <p>Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported
* with M6a, R6a, and C6a instance types only.</p>
*/
AmdSevSnp?: AmdSevSnpSpecification | string;
}

/**
Expand Down Expand Up @@ -5916,7 +5936,7 @@ export interface LaunchTemplatePlacementRequest {
HostId?: string;

/**
* <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a
* <p>The tenancy of the instance. An instance with a
* tenancy of dedicated runs on single-tenant hardware.</p>
*/
Tenancy?: Tenancy | string;
Expand Down Expand Up @@ -6063,8 +6083,17 @@ export interface RequestLaunchTemplateData {
* <code>resolve:ssm:parameter-name:label</code>
* </p>
* </li>
* <li>
* <p>
* <code>resolve:ssm:public-parameter</code>
* </p>
* </li>
* </ul>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html#using-systems-manager-parameter-to-find-AMI">Use a Systems Manager parameter to find an AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
* <note>
* <p>Currently, EC2 Fleet and Spot Fleet do not support specifying a Systems Manager parameter.
* If the launch template will be used by an EC2 Fleet or Spot Fleet, you must specify the AMI ID.</p>
* </note>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id">Use a Systems Manager parameter instead of an AMI ID</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
*/
ImageId?: string;

Expand Down Expand Up @@ -6595,6 +6624,12 @@ export interface LaunchTemplateCpuOptions {
* <p>The number of threads per CPU core.</p>
*/
ThreadsPerCore?: number;

/**
* <p>Indicates whether the instance is enabled for
* AMD SEV-SNP.</p>
*/
AmdSevSnp?: AmdSevSnpSpecification | string;
}

/**
Expand Down Expand Up @@ -7026,7 +7061,7 @@ export interface LaunchTemplatePlacement {
HostId?: string;

/**
* <p>The tenancy of the instance (if the instance is running in a VPC). An instance with a
* <p>The tenancy of the instance. An instance with a
* tenancy of <code>dedicated</code> runs on single-tenant hardware. </p>
*/
Tenancy?: Tenancy | string;
Expand Down Expand Up @@ -9727,93 +9762,6 @@ export const ReplaceRootVolumeTaskState = {
*/
export type ReplaceRootVolumeTaskState = (typeof ReplaceRootVolumeTaskState)[keyof typeof ReplaceRootVolumeTaskState];

/**
* @public
* <p>Information about a root volume replacement task.</p>
*/
export interface ReplaceRootVolumeTask {
/**
* <p>The ID of the root volume replacement task.</p>
*/
ReplaceRootVolumeTaskId?: string;

/**
* <p>The ID of the instance for which the root volume replacement task was created.</p>
*/
InstanceId?: string;

/**
* <p>The state of the task. The task can be in one of the following states:</p>
* <ul>
* <li>
* <p>
* <code>pending</code> - the replacement volume is being created.</p>
* </li>
* <li>
* <p>
* <code>in-progress</code> - the original volume is being detached and the
* replacement volume is being attached.</p>
* </li>
* <li>
* <p>
* <code>succeeded</code> - the replacement volume has been successfully attached
* to the instance and the instance is available.</p>
* </li>
* <li>
* <p>
* <code>failing</code> - the replacement task is in the process of failing.</p>
* </li>
* <li>
* <p>
* <code>failed</code> - the replacement task has failed but the original root
* volume is still attached.</p>
* </li>
* <li>
* <p>
* <code>failing-detached</code> - the replacement task is in the process of failing.
* The instance might have no root volume attached.</p>
* </li>
* <li>
* <p>
* <code>failed-detached</code> - the replacement task has failed and the instance
* has no root volume attached.</p>
* </li>
* </ul>
*/
TaskState?: ReplaceRootVolumeTaskState | string;

/**
* <p>The time the task was started.</p>
*/
StartTime?: string;

/**
* <p>The time the task completed.</p>
*/
CompleteTime?: string;

/**
* <p>The tags assigned to the task.</p>
*/
Tags?: Tag[];

/**
* <p>The ID of the AMI used to create the replacement root volume.</p>
*/
ImageId?: string;

/**
* <p>The ID of the snapshot used to create the replacement root volume.</p>
*/
SnapshotId?: string;

/**
* <p>Indicates whether the original root volume is to be deleted after the root volume
* replacement task completes.</p>
*/
DeleteReplacedRootVolume?: boolean;
}

/**
* @internal
*/
Expand Down
Loading

0 comments on commit c57a8bf

Please sign in to comment.