Skip to content

Commit

Permalink
feat(client-ec2): Add Nitro Enclaves support on DescribeInstanceTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jul 6, 2023
1 parent 0f3c27f commit 1db6ac4
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export interface DescribeInstanceTypesCommandOutput extends DescribeInstanceType
* // SupportedBootModes: [ // BootModeTypeList
* // "legacy-bios" || "uefi",
* // ],
* // NitroEnclavesSupport: "unsupported" || "supported",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
8 changes: 6 additions & 2 deletions clients/client-ec2/src/commands/ImportImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { ImportImageRequest, ImportImageRequestFilterSensitiveLog } from "../models/models_5";
import { ImportImageResult, ImportImageResultFilterSensitiveLog } from "../models/models_6";
import {
ImportImageRequest,
ImportImageRequestFilterSensitiveLog,
ImportImageResult,
ImportImageResultFilterSensitiveLog,
} from "../models/models_6";
import { de_ImportImageCommand, se_ImportImageCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import {
RunScheduledInstancesRequest,
RunScheduledInstancesRequestFilterSensitiveLog,
RunScheduledInstancesResult,
} from "../models/models_6";
import { RunScheduledInstancesRequest, RunScheduledInstancesRequestFilterSensitiveLog } from "../models/models_6";
import { RunScheduledInstancesResult } from "../models/models_7";
import { de_RunScheduledInstancesCommand, se_RunScheduledInstancesCommand } from "../protocols/Aws_ec2";

/**
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/commands/StopInstancesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export interface StopInstancesCommandOutput extends StopInstancesResult, __Metad
* @public
* <p>Stops an Amazon EBS-backed instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html">Stop and start
* your instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>You can use the Stop action to hibernate an instance if the instance is <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation">enabled for
* hibernation</a> and it meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation
* <p>You can use the Stop action to hibernate an instance if the instance is <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enabling-hibernation.html">enabled for
* hibernation</a> and it meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>We don't charge usage for a stopped instance, or data transfer fees; however, your
Expand Down
6 changes: 3 additions & 3 deletions clients/client-ec2/src/models/models_3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9146,14 +9146,14 @@ export interface ElasticInferenceAcceleratorAssociation {
/**
* @public
* <p>Indicates whether your instance is configured for hibernation. This parameter is valid
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites">hibernation
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
*/
export interface HibernationOptions {
/**
* <p>If this parameter is set to <code>true</code>, your instance is enabled for
* hibernation; otherwise, it is not enabled for hibernation.</p>
* <p>If <code>true</code>, your instance is enabled for hibernation; otherwise, it is not
* enabled for hibernation.</p>
*/
Configured?: boolean;
}
Expand Down
54 changes: 19 additions & 35 deletions clients/client-ec2/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,20 @@ export interface NetworkInfo {
EnaSrdSupported?: boolean;
}

/**
* @public
* @enum
*/
export const NitroEnclavesSupport = {
SUPPORTED: "supported",
UNSUPPORTED: "unsupported",
} as const;

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

/**
* @public
* @enum
Expand Down Expand Up @@ -2446,6 +2460,11 @@ export interface InstanceTypeInfo {
* <i>Amazon EC2 User Guide</i>.</p>
*/
SupportedBootModes?: (BootModeType | string)[];

/**
* <p>Indicates whether Nitro Enclaves is supported.</p>
*/
NitroEnclavesSupport?: NitroEnclavesSupport | string;
}

/**
Expand Down Expand Up @@ -11135,41 +11154,6 @@ export interface VerifiedAccessLogS3Destination {
BucketOwner?: string;
}

/**
* @public
* <p>Describes the options for Verified Access logs.</p>
*/
export interface VerifiedAccessLogs {
/**
* <p>Amazon S3 logging options.</p>
*/
S3?: VerifiedAccessLogS3Destination;

/**
* <p>CloudWatch Logs logging destination.</p>
*/
CloudWatchLogs?: VerifiedAccessLogCloudWatchLogsDestination;

/**
* <p>Kinesis logging destination.</p>
*/
KinesisDataFirehose?: VerifiedAccessLogKinesisDataFirehoseDestination;

/**
* <p>
* Describes current setting for the logging version.
* </p>
*/
LogVersion?: string;

/**
* <p>
* Describes current setting for including trust data into the logs.
* </p>
*/
IncludeTrustContext?: boolean;
}

/**
* @internal
*/
Expand Down
179 changes: 42 additions & 137 deletions clients/client-ec2/src/models/models_5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import {
} from "./models_2";
import {
AttributeBooleanValue,
BootModeValues,
ExportTaskS3Location,
FastLaunchLaunchTemplateSpecificationResponse,
FastLaunchResourceType,
Expand All @@ -78,7 +77,48 @@ import {
StatisticType,
VirtualizationType,
} from "./models_3";
import { AnalysisStatus, ArchitectureType, VerifiedAccessLogs } from "./models_4";
import {
AnalysisStatus,
ArchitectureType,
VerifiedAccessLogCloudWatchLogsDestination,
VerifiedAccessLogKinesisDataFirehoseDestination,
VerifiedAccessLogS3Destination,
} from "./models_4";

/**
* @public
* <p>Describes the options for Verified Access logs.</p>
*/
export interface VerifiedAccessLogs {
/**
* <p>Amazon S3 logging options.</p>
*/
S3?: VerifiedAccessLogS3Destination;

/**
* <p>CloudWatch Logs logging destination.</p>
*/
CloudWatchLogs?: VerifiedAccessLogCloudWatchLogsDestination;

/**
* <p>Kinesis logging destination.</p>
*/
KinesisDataFirehose?: VerifiedAccessLogKinesisDataFirehoseDestination;

/**
* <p>
* Describes current setting for the logging version.
* </p>
*/
LogVersion?: string;

/**
* <p>
* Describes current setting for including trust data into the logs.
* </p>
*/
IncludeTrustContext?: boolean;
}

/**
* @public
Expand Down Expand Up @@ -7609,131 +7649,6 @@ export interface ImportImageLicenseConfigurationRequest {
LicenseConfigurationArn?: string;
}

/**
* @public
*/
export interface ImportImageRequest {
/**
* <p>The architecture of the virtual machine.</p>
* <p>Valid values: <code>i386</code> | <code>x86_64</code>
* </p>
*/
Architecture?: string;

/**
* <p>The client-specific data.</p>
*/
ClientData?: ClientData;

/**
* <p>The token to enable idempotency for VM import requests.</p>
*/
ClientToken?: string;

/**
* <p>A description string for the import image task.</p>
*/
Description?: string;

/**
* <p>Information about the disk containers.</p>
*/
DiskContainers?: ImageDiskContainer[];

/**
* <p>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 <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
DryRun?: boolean;

/**
* <p>Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used
* unless you specify a non-default KMS key using <code>KmsKeyId</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html">Amazon EBS Encryption</a> in the
* <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
*/
Encrypted?: boolean;

/**
* <p>The target hypervisor platform.</p>
* <p>Valid values: <code>xen</code>
* </p>
*/
Hypervisor?: string;

/**
* <p>An identifier for the symmetric KMS key to use when creating the
* encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this
* parameter is not specified, the default KMS key for EBS is used. If a <code>KmsKeyId</code> is
* specified, the <code>Encrypted</code> flag must also be set. </p>
* <p>The KMS key identifier may be provided in any of the following formats: </p>
* <ul>
* <li>
* <p>Key ID</p>
* </li>
* <li>
* <p>Key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>.</p>
* </li>
* <li>
* <p>ARN using key ID. The ID ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>key</code> namespace, and then the key ID. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:key/<i>abcd1234-a123-456a-a12b-a123b4cd56ef</i>.</p>
* </li>
* <li>
* <p>ARN using key alias. The alias ARN contains the <code>arn:aws:kms</code> namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the <code>alias</code> namespace, and then the key alias. For example, arn:aws:kms:<i>us-east-1</i>:<i>012345678910</i>:alias/<i>ExampleAlias</i>. </p>
* </li>
* </ul>
* <p>Amazon Web Services parses <code>KmsKeyId</code> asynchronously, meaning that the action you call may appear to complete even
* though you provided an invalid identifier. This action will eventually report failure. </p>
* <p>The specified KMS key must exist in the Region that the AMI is being copied to.</p>
* <p>Amazon EBS does not support asymmetric KMS keys.</p>
*/
KmsKeyId?: string;

/**
* <p>The license type to be used for the Amazon Machine Image (AMI) after importing.</p>
* <p>Specify <code>AWS</code> to replace the source-system license with an Amazon Web Services
* license or <code>BYOL</code> to retain the source-system license. Leaving this parameter
* undefined is the same as choosing <code>AWS</code> when importing a Windows Server operating
* system, and the same as choosing <code>BYOL</code> when importing a Windows client operating
* system (such as Windows 10) or a Linux operating system.</p>
* <p>To use <code>BYOL</code>, you must have existing licenses with rights to use these licenses in a third party
* cloud, such as Amazon Web Services. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image">Prerequisites</a> in the
* VM Import/Export User Guide.</p>
*/
LicenseType?: string;

/**
* <p>The operating system of the virtual machine.</p>
* <p>Valid values: <code>Windows</code> | <code>Linux</code>
* </p>
*/
Platform?: string;

/**
* <p>The name of the role to use when not using the default role, 'vmimport'.</p>
*/
RoleName?: string;

/**
* <p>The ARNs of the license configurations.</p>
*/
LicenseSpecifications?: ImportImageLicenseConfigurationRequest[];

/**
* <p>The tags to apply to the import image task during creation.</p>
*/
TagSpecifications?: TagSpecification[];

/**
* <p>The usage operation value. For more information, see <a href="https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#prerequisites">Licensing options</a> in the <i>VM Import/Export User Guide</i>.</p>
*/
UsageOperation?: string;

/**
* <p>The boot mode of the virtual machine.</p>
*/
BootMode?: BootModeValues | string;
}

/**
* @internal
*/
Expand Down Expand Up @@ -7797,13 +7712,3 @@ export const ImageDiskContainerFilterSensitiveLog = (obj: ImageDiskContainer): a
...obj,
...(obj.Url && { Url: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ImportImageRequestFilterSensitiveLog = (obj: ImportImageRequest): any => ({
...obj,
...(obj.DiskContainers && {
DiskContainers: obj.DiskContainers.map((item) => ImageDiskContainerFilterSensitiveLog(item)),
}),
});
Loading

0 comments on commit 1db6ac4

Please sign in to comment.