From c57a8bf3a499e5838896e485354947f1521042bc Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 27 Apr 2023 18:16:22 +0000 Subject: [PATCH] feat(client-ec2): This release adds support for AMD SEV-SNP on EC2 instances. --- .../commands/CreateLaunchTemplateCommand.ts | 1 + .../CreateLaunchTemplateVersionCommand.ts | 1 + .../DeleteSpotDatafeedSubscriptionCommand.ts | 2 +- .../DescribeVolumeAttributeCommand.ts | 3 +- .../src/commands/DescribeVolumesCommand.ts | 3 +- .../src/commands/ImportKeyPairCommand.ts | 2 +- .../ModifyInstanceAttributeCommand.ts | 2 +- .../ModifyReservedInstancesCommand.ts | 3 - ...urchaseReservedInstancesOfferingCommand.ts | 3 - .../commands/RequestSpotInstancesCommand.ts | 3 - .../src/commands/RunInstancesCommand.ts | 19 +- .../SendDiagnosticInterruptCommand.ts | 2 +- .../src/commands/StartInstancesCommand.ts | 3 +- clients/client-ec2/src/models/models_0.ts | 4 +- clients/client-ec2/src/models/models_1.ts | 130 +++------ clients/client-ec2/src/models/models_2.ts | 103 ++++++- clients/client-ec2/src/models/models_3.ts | 46 ++- clients/client-ec2/src/models/models_4.ts | 270 +++++------------- clients/client-ec2/src/models/models_5.ts | 200 +++++++++---- clients/client-ec2/src/models/models_6.ts | 132 +++++---- clients/client-ec2/src/models/models_7.ts | 39 +++ clients/client-ec2/src/protocols/Aws_ec2.ts | 51 +++- codegen/sdk-codegen/aws-models/ec2.json | 167 ++++++++--- 23 files changed, 656 insertions(+), 533 deletions(-) diff --git a/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts b/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts index b2b536fbcde3..8d35baea5ca1 100644 --- a/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts +++ b/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts @@ -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", diff --git a/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts b/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts index 2201e24c5a97..087f5c4c4967 100644 --- a/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts +++ b/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts @@ -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", diff --git a/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts b/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts index 0d35f342c6bc..c9bd3e37bc58 100644 --- a/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts +++ b/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts @@ -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, diff --git a/clients/client-ec2/src/commands/DescribeVolumeAttributeCommand.ts b/clients/client-ec2/src/commands/DescribeVolumeAttributeCommand.ts index d2bb5f0afbb4..098fab95c389 100644 --- a/clients/client-ec2/src/commands/DescribeVolumeAttributeCommand.ts +++ b/clients/client-ec2/src/commands/DescribeVolumeAttributeCommand.ts @@ -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"; /** diff --git a/clients/client-ec2/src/commands/DescribeVolumesCommand.ts b/clients/client-ec2/src/commands/DescribeVolumesCommand.ts index 63ee1ba3b5b8..a8207a151e0c 100644 --- a/clients/client-ec2/src/commands/DescribeVolumesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeVolumesCommand.ts @@ -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"; /** diff --git a/clients/client-ec2/src/commands/ImportKeyPairCommand.ts b/clients/client-ec2/src/commands/ImportKeyPairCommand.ts index 2a63fa574132..4d9659ea9c9b 100644 --- a/clients/client-ec2/src/commands/ImportKeyPairCommand.ts +++ b/clients/client-ec2/src/commands/ImportKeyPairCommand.ts @@ -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"; /** diff --git a/clients/client-ec2/src/commands/ModifyInstanceAttributeCommand.ts b/clients/client-ec2/src/commands/ModifyInstanceAttributeCommand.ts index 12a6c5a13dcf..157a8ab14043 100644 --- a/clients/client-ec2/src/commands/ModifyInstanceAttributeCommand.ts +++ b/clients/client-ec2/src/commands/ModifyInstanceAttributeCommand.ts @@ -36,7 +36,7 @@ export interface ModifyInstanceAttributeCommandOutput extends __MetadataBearer { * attribute at a time.

*

* Note: 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 ModifyNetworkInterfaceAttribute action.

diff --git a/clients/client-ec2/src/commands/ModifyReservedInstancesCommand.ts b/clients/client-ec2/src/commands/ModifyReservedInstancesCommand.ts index 77d4f0a92c38..33a263424eb6 100644 --- a/clients/client-ec2/src/commands/ModifyReservedInstancesCommand.ts +++ b/clients/client-ec2/src/commands/ModifyReservedInstancesCommand.ts @@ -37,9 +37,6 @@ export interface ModifyReservedInstancesCommandOutput extends ModifyReservedInst * except for Availability Zone, network platform, and instance type.

*

For more information, see Modifying Reserved * Instances in the Amazon EC2 User Guide.

- * - *

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

- *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts b/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts index 83c9d1f868ec..d64e7c9712bd 100644 --- a/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts +++ b/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts @@ -47,9 +47,6 @@ export interface PurchaseReservedInstancesOfferingCommandOutput *

For more information, see Reserved Instances and * Reserved Instance Marketplace * in the Amazon EC2 User Guide.

- * - *

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

- *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-ec2/src/commands/RequestSpotInstancesCommand.ts b/clients/client-ec2/src/commands/RequestSpotInstancesCommand.ts index 0f1606493a35..abd90d4f680d 100644 --- a/clients/client-ec2/src/commands/RequestSpotInstancesCommand.ts +++ b/clients/client-ec2/src/commands/RequestSpotInstancesCommand.ts @@ -47,9 +47,6 @@ export interface RequestSpotInstancesCommandOutput extends RequestSpotInstancesR * is the best Spot request method to use? in the * Amazon EC2 User Guide for Linux Instances.

* - * - *

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide for Linux Instances.

- *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-ec2/src/commands/RunInstancesCommand.ts b/clients/client-ec2/src/commands/RunInstancesCommand.ts index 83ccb486521b..0f186d7388f6 100644 --- a/clients/client-ec2/src/commands/RunInstancesCommand.ts +++ b/clients/client-ec2/src/commands/RunInstancesCommand.ts @@ -39,21 +39,12 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer * apply:

* - *

For more information, see Use a Systems Manager parameter to find an AMI in the Amazon Elastic Compute Cloud User Guide.

+ * + *

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.

+ *
+ *

For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide.

*/ ImageId?: string; @@ -6595,6 +6624,12 @@ export interface LaunchTemplateCpuOptions { *

The number of threads per CPU core.

*/ ThreadsPerCore?: number; + + /** + *

Indicates whether the instance is enabled for + * AMD SEV-SNP.

+ */ + AmdSevSnp?: AmdSevSnpSpecification | string; } /** @@ -7026,7 +7061,7 @@ export interface LaunchTemplatePlacement { HostId?: string; /** - *

The tenancy of the instance (if the instance is running in a VPC). An instance with a + *

The tenancy of the instance. An instance with a * tenancy of dedicated runs on single-tenant hardware.

*/ Tenancy?: Tenancy | string; @@ -9727,93 +9762,6 @@ export const ReplaceRootVolumeTaskState = { */ export type ReplaceRootVolumeTaskState = (typeof ReplaceRootVolumeTaskState)[keyof typeof ReplaceRootVolumeTaskState]; -/** - * @public - *

Information about a root volume replacement task.

- */ -export interface ReplaceRootVolumeTask { - /** - *

The ID of the root volume replacement task.

- */ - ReplaceRootVolumeTaskId?: string; - - /** - *

The ID of the instance for which the root volume replacement task was created.

- */ - InstanceId?: string; - - /** - *

The state of the task. The task can be in one of the following states:

- * - */ - TaskState?: ReplaceRootVolumeTaskState | string; - - /** - *

The time the task was started.

- */ - StartTime?: string; - - /** - *

The time the task completed.

- */ - CompleteTime?: string; - - /** - *

The tags assigned to the task.

- */ - Tags?: Tag[]; - - /** - *

The ID of the AMI used to create the replacement root volume.

- */ - ImageId?: string; - - /** - *

The ID of the snapshot used to create the replacement root volume.

- */ - SnapshotId?: string; - - /** - *

Indicates whether the original root volume is to be deleted after the root volume - * replacement task completes.

- */ - DeleteReplacedRootVolume?: boolean; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_2.ts b/clients/client-ec2/src/models/models_2.ts index dac8a1c4a240..baf521e9da2b 100644 --- a/clients/client-ec2/src/models/models_2.ts +++ b/clients/client-ec2/src/models/models_2.ts @@ -44,13 +44,100 @@ import { LocalGatewayRouteTableVirtualInterfaceGroupAssociation, LocalGatewayRouteTableVpcAssociation, ManagedPrefixList, - ReplaceRootVolumeTask, + ReplaceRootVolumeTaskState, Subnet, Tenancy, VolumeType, Vpc, } from "./models_1"; +/** + * @public + *

Information about a root volume replacement task.

+ */ +export interface ReplaceRootVolumeTask { + /** + *

The ID of the root volume replacement task.

+ */ + ReplaceRootVolumeTaskId?: string; + + /** + *

The ID of the instance for which the root volume replacement task was created.

+ */ + InstanceId?: string; + + /** + *

The state of the task. The task can be in one of the following states:

+ * + */ + TaskState?: ReplaceRootVolumeTaskState | string; + + /** + *

The time the task was started.

+ */ + StartTime?: string; + + /** + *

The time the task completed.

+ */ + CompleteTime?: string; + + /** + *

The tags assigned to the task.

+ */ + Tags?: Tag[]; + + /** + *

The ID of the AMI used to create the replacement root volume.

+ */ + ImageId?: string; + + /** + *

The ID of the snapshot used to create the replacement root volume.

+ */ + SnapshotId?: string; + + /** + *

Indicates whether the original root volume is to be deleted after the root volume + * replacement task completes.

+ */ + DeleteReplacedRootVolume?: boolean; +} + /** * @public */ @@ -7623,20 +7710,6 @@ export interface DeleteSnapshotRequest { DryRun?: boolean; } -/** - * @public - *

Contains the parameters for DeleteSpotDatafeedSubscription.

- */ -export interface DeleteSpotDatafeedSubscriptionRequest { - /** - *

Checks whether you have the required permissions for the action, without actually - * making the request, and provides an error response. If you have the required - * permissions, the error response is DryRunOperation. Otherwise, it is - * UnauthorizedOperation.

- */ - DryRun?: boolean; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_3.ts b/clients/client-ec2/src/models/models_3.ts index 13a29097025b..acd59d140805 100644 --- a/clients/client-ec2/src/models/models_3.ts +++ b/clients/client-ec2/src/models/models_3.ts @@ -38,6 +38,7 @@ import { VerifiedAccessTrustProviderFilterSensitiveLog, } from "./models_0"; import { + AmdSevSnpSpecification, AttributeValue, BlockDeviceMapping, CapacityReservationPreference, @@ -88,6 +89,20 @@ import { VerifiedAccessGroup, } from "./models_2"; +/** + * @public + *

Contains the parameters for DeleteSpotDatafeedSubscription.

+ */ +export interface DeleteSpotDatafeedSubscriptionRequest { + /** + *

Checks whether you have the required permissions for the action, without actually + * making the request, and provides an error response. If you have the required + * permissions, the error response is DryRunOperation. Otherwise, it is + * UnauthorizedOperation.

+ */ + DryRun?: boolean; +} + /** * @public */ @@ -8358,16 +8373,6 @@ export interface DescribeInstancesRequest { * *
  • *

    - * group-id - The ID of the security group for the instance. - * EC2-Classic only.

    - *
  • - *
  • - *

    - * group-name - The name of the security group for the instance. - * EC2-Classic only.

    - *
  • - *
  • - *

    * hibernation-options.configured - A Boolean that indicates whether * the instance is enabled for hibernation. A value of true means that * the instance is enabled for hibernation.

    @@ -8850,6 +8855,11 @@ export interface CpuOptions { *

    The number of threads per CPU core.

    */ ThreadsPerCore?: number; + + /** + *

    Indicates whether the instance is enabled for AMD SEV-SNP.

    + */ + AmdSevSnp?: AmdSevSnpSpecification | string; } /** @@ -9139,22 +9149,6 @@ export interface InstanceMetadataOptionsResponse { InstanceMetadataTags?: InstanceMetadataTagsState | string; } -/** - * @public - * @enum - */ -export const MonitoringState = { - disabled: "disabled", - disabling: "disabling", - enabled: "enabled", - pending: "pending", -} as const; - -/** - * @public - */ -export type MonitoringState = (typeof MonitoringState)[keyof typeof MonitoringState]; - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index bd1d0b348d1d..919683a77ba2 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -69,7 +69,6 @@ import { PlacementGroup, PlatformValues, PrivateIpAddressSpecification, - ReplaceRootVolumeTask, SpotInstanceType, StateReason, Subnet, @@ -77,6 +76,7 @@ import { Tenancy, } from "./models_1"; import { + ReplaceRootVolumeTask, RouteTable, Snapshot, SnapshotState, @@ -117,12 +117,27 @@ import { InstanceMaintenanceOptions, InstanceMetadataOptionsResponse, LicenseConfiguration, - MonitoringState, PermissionGroup, ProductCode, VirtualizationType, } from "./models_3"; +/** + * @public + * @enum + */ +export const MonitoringState = { + disabled: "disabled", + disabling: "disabling", + enabled: "enabled", + pending: "pending", +} as const; + +/** + * @public + */ +export type MonitoringState = (typeof MonitoringState)[keyof typeof MonitoringState]; + /** * @public *

    Describes the monitoring of an instance.

    @@ -505,10 +520,10 @@ export interface Instance { Platform?: PlatformValues | string; /** - *

    (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname + *

    [IPv4 only] The private DNS hostname name assigned to the instance. This DNS hostname * can only be used inside the Amazon EC2 network. This name is not available until the * instance enters the running state.

    - *

    [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS + *

    The Amazon-provided DNS server resolves Amazon-provided private DNS * hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not * using the Amazon-provided DNS server in your VPC, your custom domain name servers must * resolve the hostname as appropriate.

    @@ -526,8 +541,8 @@ export interface Instance { ProductCodes?: ProductCode[]; /** - *

    (IPv4 only) The public DNS name assigned to the instance. This name is not available - * until the instance enters the running state. For EC2-VPC, this name is only + *

    [IPv4 only] The public DNS name assigned to the instance. This name is not available + * until the instance enters the running state. This name is only * available if you've enabled DNS hostnames for your VPC.

    */ PublicDnsName?: string; @@ -556,12 +571,12 @@ export interface Instance { StateTransitionReason?: string; /** - *

    [EC2-VPC] The ID of the subnet in which the instance is running.

    + *

    The ID of the subnet in which the instance is running.

    */ SubnetId?: string; /** - *

    [EC2-VPC] The ID of the VPC in which the instance is running.

    + *

    The ID of the VPC in which the instance is running.

    */ VpcId?: string; @@ -622,7 +637,7 @@ export interface Instance { ElasticInferenceAcceleratorAssociations?: ElasticInferenceAcceleratorAssociation[]; /** - *

    [EC2-VPC] The network interfaces for the instance.

    + *

    The network interfaces for the instance.

    */ NetworkInterfaces?: InstanceNetworkInterface[]; @@ -783,7 +798,7 @@ export interface Instance { */ export interface Reservation { /** - *

    [EC2-Classic only] The security groups.

    + *

    Not supported.

    */ Groups?: GroupIdentifier[]; @@ -1266,7 +1281,7 @@ export interface DescribeInstanceTypesRequest { * @@ -6450,7 +6468,7 @@ export interface ScheduledInstanceAvailability { MinTermDurationInDays?: number; /** - *

    The network platform (EC2-Classic or EC2-VPC).

    + *

    The network platform.

    */ NetworkPlatform?: string; @@ -6537,10 +6555,6 @@ export interface DescribeScheduledInstancesRequest { *
  • *
  • *

    - * network-platform - The network platform (EC2-Classic or EC2-VPC).

    - *
  • - *
  • - *

    * platform - The platform (Linux/UNIX or Windows).

    *
  • * @@ -6602,7 +6616,7 @@ export interface ScheduledInstance { InstanceType?: string; /** - *

    The network platform (EC2-Classic or EC2-VPC).

    + *

    The network platform.

    */ NetworkPlatform?: string; @@ -7831,7 +7845,7 @@ export interface SpotFleetTagSpecification { */ export interface SpotFleetLaunchSpecification { /** - *

    One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

    + *

    The security groups.

    */ SecurityGroups?: GroupIdentifier[]; @@ -8498,7 +8512,7 @@ export interface DescribeSpotFleetRequestsResponse { */ export interface DescribeSpotInstanceRequestsRequest { /** - *

    One or more filters.

    + *

    The filters.

    *