From 5f73bcda5288d895451b0a3b2e9fdf7ff00e46fe Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 31 Oct 2023 18:29:49 +0000 Subject: [PATCH] feat(client-ec2): Capacity Blocks for ML are a new EC2 purchasing option for reserving GPU instances on a future date to support short duration machine learning (ML) workloads. Capacity Blocks automatically place instances close together inside Amazon EC2 UltraClusters for low-latency, high-throughput networking. --- clients/client-ec2/README.md | 16 + clients/client-ec2/src/EC2.ts | 46 + clients/client-ec2/src/EC2Client.ts | 12 + .../CreateCapacityReservationCommand.ts | 3 +- .../src/commands/CreateFleetCommand.ts | 2 +- .../commands/CreateLaunchTemplateCommand.ts | 2 +- .../CreateLaunchTemplateVersionCommand.ts | 4 +- .../commands/DeletePublicIpv4PoolCommand.ts | 3 +- .../DescribeCapacityBlockOfferingsCommand.ts | 179 ++++ .../DescribeCapacityReservationsCommand.ts | 3 +- .../src/commands/DescribeFleetsCommand.ts | 2 +- .../commands/DescribeInstanceTypesCommand.ts | 2 +- .../src/commands/DescribeInstancesCommand.ts | 5 +- .../DescribeLaunchTemplateVersionsCommand.ts | 2 +- ...scribeTrunkInterfaceAssociationsCommand.ts | 2 +- .../DescribeVerifiedAccessEndpointsCommand.ts | 2 +- .../GetCapacityReservationUsageCommand.ts | 2 +- .../commands/GetLaunchTemplateDataCommand.ts | 2 +- ...TransitGatewayPolicyTableEntriesCommand.ts | 6 +- ...ansitGatewayPrefixListReferencesCommand.ts | 2 +- ...sitGatewayRouteTableAssociationsCommand.ts | 6 +- .../src/commands/ModifyFleetCommand.ts | 2 +- .../commands/PurchaseCapacityBlockCommand.ts | 196 ++++ .../commands/RestoreSnapshotTierCommand.ts | 3 +- .../commands/RevokeClientVpnIngressCommand.ts | 2 +- .../RevokeSecurityGroupEgressCommand.ts | 2 +- .../RevokeSecurityGroupIngressCommand.ts | 3 +- .../src/commands/RunInstancesCommand.ts | 4 +- clients/client-ec2/src/commands/index.ts | 2 + clients/client-ec2/src/models/models_0.ts | 41 +- clients/client-ec2/src/models/models_1.ts | 82 +- clients/client-ec2/src/models/models_2.ts | 79 +- clients/client-ec2/src/models/models_3.ts | 957 +++--------------- clients/client-ec2/src/models/models_4.ts | 942 ++++++++++++++--- clients/client-ec2/src/models/models_5.ts | 287 +++--- clients/client-ec2/src/models/models_6.ts | 445 ++++---- clients/client-ec2/src/models/models_7.ts | 249 +++++ ...DescribeCapacityBlockOfferingsPaginator.ts | 50 + clients/client-ec2/src/pagination/index.ts | 5 +- clients/client-ec2/src/protocols/Aws_ec2.ts | 317 +++++- codegen/sdk-codegen/aws-models/ec2.json | 350 ++++++- 41 files changed, 2826 insertions(+), 1495 deletions(-) create mode 100644 clients/client-ec2/src/commands/DescribeCapacityBlockOfferingsCommand.ts create mode 100644 clients/client-ec2/src/commands/PurchaseCapacityBlockCommand.ts create mode 100644 clients/client-ec2/src/pagination/DescribeCapacityBlockOfferingsPaginator.ts diff --git a/clients/client-ec2/README.md b/clients/client-ec2/README.md index 72eac2d23cce..336fbb3674fc 100644 --- a/clients/client-ec2/README.md +++ b/clients/client-ec2/README.md @@ -2036,6 +2036,14 @@ DescribeByoipCidrs [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/describebyoipcidrscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describebyoipcidrscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describebyoipcidrscommandoutput.html) + +
+ +DescribeCapacityBlockOfferings + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/describecapacityblockofferingscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describecapacityblockofferingscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/describecapacityblockofferingscommandoutput.html) +
@@ -4540,6 +4548,14 @@ ProvisionPublicIpv4PoolCidr [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/provisionpublicipv4poolcidrcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/provisionpublicipv4poolcidrcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/provisionpublicipv4poolcidrcommandoutput.html) +
+
+ +PurchaseCapacityBlock + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/purchasecapacityblockcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/purchasecapacityblockcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/purchasecapacityblockcommandoutput.html) +
diff --git a/clients/client-ec2/src/EC2.ts b/clients/client-ec2/src/EC2.ts index ec0451d8ad45..a61217c29c8d 100644 --- a/clients/client-ec2/src/EC2.ts +++ b/clients/client-ec2/src/EC2.ts @@ -1088,6 +1088,11 @@ import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput, } from "./commands/DescribeByoipCidrsCommand"; +import { + DescribeCapacityBlockOfferingsCommand, + DescribeCapacityBlockOfferingsCommandInput, + DescribeCapacityBlockOfferingsCommandOutput, +} from "./commands/DescribeCapacityBlockOfferingsCommand"; import { DescribeCapacityReservationFleetsCommand, DescribeCapacityReservationFleetsCommandInput, @@ -2629,6 +2634,11 @@ import { ProvisionPublicIpv4PoolCidrCommandInput, ProvisionPublicIpv4PoolCidrCommandOutput, } from "./commands/ProvisionPublicIpv4PoolCidrCommand"; +import { + PurchaseCapacityBlockCommand, + PurchaseCapacityBlockCommandInput, + PurchaseCapacityBlockCommandOutput, +} from "./commands/PurchaseCapacityBlockCommand"; import { PurchaseHostReservationCommand, PurchaseHostReservationCommandInput, @@ -3163,6 +3173,7 @@ const commands = { DescribeAwsNetworkPerformanceMetricSubscriptionsCommand, DescribeBundleTasksCommand, DescribeByoipCidrsCommand, + DescribeCapacityBlockOfferingsCommand, DescribeCapacityReservationFleetsCommand, DescribeCapacityReservationsCommand, DescribeCarrierGatewaysCommand, @@ -3476,6 +3487,7 @@ const commands = { ProvisionByoipCidrCommand, ProvisionIpamPoolCidrCommand, ProvisionPublicIpv4PoolCidrCommand, + PurchaseCapacityBlockCommand, PurchaseHostReservationCommand, PurchaseReservedInstancesOfferingCommand, PurchaseScheduledInstancesCommand, @@ -7196,6 +7208,23 @@ export interface EC2 { cb: (err: any, data?: DescribeByoipCidrsCommandOutput) => void ): void; + /** + * @see {@link DescribeCapacityBlockOfferingsCommand} + */ + describeCapacityBlockOfferings( + args: DescribeCapacityBlockOfferingsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeCapacityBlockOfferings( + args: DescribeCapacityBlockOfferingsCommandInput, + cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void + ): void; + describeCapacityBlockOfferings( + args: DescribeCapacityBlockOfferingsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeCapacityBlockOfferingsCommandOutput) => void + ): void; + /** * @see {@link DescribeCapacityReservationFleetsCommand} */ @@ -12391,6 +12420,23 @@ export interface EC2 { cb: (err: any, data?: ProvisionPublicIpv4PoolCidrCommandOutput) => void ): void; + /** + * @see {@link PurchaseCapacityBlockCommand} + */ + purchaseCapacityBlock( + args: PurchaseCapacityBlockCommandInput, + options?: __HttpHandlerOptions + ): Promise; + purchaseCapacityBlock( + args: PurchaseCapacityBlockCommandInput, + cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void + ): void; + purchaseCapacityBlock( + args: PurchaseCapacityBlockCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PurchaseCapacityBlockCommandOutput) => void + ): void; + /** * @see {@link PurchaseHostReservationCommand} */ diff --git a/clients/client-ec2/src/EC2Client.ts b/clients/client-ec2/src/EC2Client.ts index 6eb7338d1e5f..d23e0c5ed560 100644 --- a/clients/client-ec2/src/EC2Client.ts +++ b/clients/client-ec2/src/EC2Client.ts @@ -771,6 +771,10 @@ import { DescribeBundleTasksCommandOutput, } from "./commands/DescribeBundleTasksCommand"; import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "./commands/DescribeByoipCidrsCommand"; +import { + DescribeCapacityBlockOfferingsCommandInput, + DescribeCapacityBlockOfferingsCommandOutput, +} from "./commands/DescribeCapacityBlockOfferingsCommand"; import { DescribeCapacityReservationFleetsCommandInput, DescribeCapacityReservationFleetsCommandOutput, @@ -1873,6 +1877,10 @@ import { ProvisionPublicIpv4PoolCidrCommandInput, ProvisionPublicIpv4PoolCidrCommandOutput, } from "./commands/ProvisionPublicIpv4PoolCidrCommand"; +import { + PurchaseCapacityBlockCommandInput, + PurchaseCapacityBlockCommandOutput, +} from "./commands/PurchaseCapacityBlockCommand"; import { PurchaseHostReservationCommandInput, PurchaseHostReservationCommandOutput, @@ -2319,6 +2327,7 @@ export type ServiceInputTypes = | DescribeAwsNetworkPerformanceMetricSubscriptionsCommandInput | DescribeBundleTasksCommandInput | DescribeByoipCidrsCommandInput + | DescribeCapacityBlockOfferingsCommandInput | DescribeCapacityReservationFleetsCommandInput | DescribeCapacityReservationsCommandInput | DescribeCarrierGatewaysCommandInput @@ -2632,6 +2641,7 @@ export type ServiceInputTypes = | ProvisionByoipCidrCommandInput | ProvisionIpamPoolCidrCommandInput | ProvisionPublicIpv4PoolCidrCommandInput + | PurchaseCapacityBlockCommandInput | PurchaseHostReservationCommandInput | PurchaseReservedInstancesOfferingCommandInput | PurchaseScheduledInstancesCommandInput @@ -2924,6 +2934,7 @@ export type ServiceOutputTypes = | DescribeAwsNetworkPerformanceMetricSubscriptionsCommandOutput | DescribeBundleTasksCommandOutput | DescribeByoipCidrsCommandOutput + | DescribeCapacityBlockOfferingsCommandOutput | DescribeCapacityReservationFleetsCommandOutput | DescribeCapacityReservationsCommandOutput | DescribeCarrierGatewaysCommandOutput @@ -3237,6 +3248,7 @@ export type ServiceOutputTypes = | ProvisionByoipCidrCommandOutput | ProvisionIpamPoolCidrCommandOutput | ProvisionPublicIpv4PoolCidrCommandOutput + | PurchaseCapacityBlockCommandOutput | PurchaseHostReservationCommandOutput | PurchaseReservedInstancesOfferingCommandOutput | PurchaseScheduledInstancesCommandOutput diff --git a/clients/client-ec2/src/commands/CreateCapacityReservationCommand.ts b/clients/client-ec2/src/commands/CreateCapacityReservationCommand.ts index babd51a69a29..d3bebd72ceae 100644 --- a/clients/client-ec2/src/commands/CreateCapacityReservationCommand.ts +++ b/clients/client-ec2/src/commands/CreateCapacityReservationCommand.ts @@ -102,7 +102,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe * // AvailableInstanceCount: Number("int"), * // EbsOptimized: true || false, * // EphemeralStorage: true || false, - * // State: "active" || "expired" || "cancelled" || "pending" || "failed", + * // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed", * // StartDate: new Date("TIMESTAMP"), * // EndDate: new Date("TIMESTAMP"), * // EndDateType: "unlimited" || "limited", @@ -123,6 +123,7 @@ export interface CreateCapacityReservationCommandOutput extends CreateCapacityRe * // Count: Number("int"), * // }, * // ], + * // ReservationType: "default" || "capacity-block", * // }, * // }; * diff --git a/clients/client-ec2/src/commands/CreateFleetCommand.ts b/clients/client-ec2/src/commands/CreateFleetCommand.ts index dbdcef49511d..7102dee03e4b 100644 --- a/clients/client-ec2/src/commands/CreateFleetCommand.ts +++ b/clients/client-ec2/src/commands/CreateFleetCommand.ts @@ -180,7 +180,7 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB * TotalTargetCapacity: Number("int"), // required * OnDemandTargetCapacity: Number("int"), * SpotTargetCapacity: Number("int"), - * DefaultTargetCapacityType: "spot" || "on-demand", + * DefaultTargetCapacityType: "spot" || "on-demand" || "capacity-block", * TargetCapacityUnitType: "vcpu" || "memory-mib" || "units", * }, * TerminateInstancesWithExpiration: true || false, diff --git a/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts b/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts index 9220753c119b..0dbb84111b67 100644 --- a/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts +++ b/clients/client-ec2/src/commands/CreateLaunchTemplateCommand.ts @@ -179,7 +179,7 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR * "STRING_VALUE", * ], * InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest - * MarketType: "spot", + * MarketType: "spot" || "capacity-block", * SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest * MaxPrice: "STRING_VALUE", * SpotInstanceType: "one-time" || "persistent", diff --git a/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts b/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts index 52504a086fd5..e65b6ce05416 100644 --- a/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts +++ b/clients/client-ec2/src/commands/CreateLaunchTemplateVersionCommand.ts @@ -181,7 +181,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe * "STRING_VALUE", * ], * InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptionsRequest - * MarketType: "spot", + * MarketType: "spot" || "capacity-block", * SpotOptions: { // LaunchTemplateSpotMarketOptionsRequest * MaxPrice: "STRING_VALUE", * SpotInstanceType: "one-time" || "persistent", @@ -432,7 +432,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe * // "STRING_VALUE", * // ], * // InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptions - * // MarketType: "spot", + * // MarketType: "spot" || "capacity-block", * // SpotOptions: { // LaunchTemplateSpotMarketOptions * // MaxPrice: "STRING_VALUE", * // SpotInstanceType: "one-time" || "persistent", diff --git a/clients/client-ec2/src/commands/DeletePublicIpv4PoolCommand.ts b/clients/client-ec2/src/commands/DeletePublicIpv4PoolCommand.ts index 15c4d433e6be..fdd1c59f2278 100644 --- a/clients/client-ec2/src/commands/DeletePublicIpv4PoolCommand.ts +++ b/clients/client-ec2/src/commands/DeletePublicIpv4PoolCommand.ts @@ -15,8 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { DeletePublicIpv4PoolRequest } from "../models/models_2"; -import { DeletePublicIpv4PoolResult } from "../models/models_3"; +import { DeletePublicIpv4PoolRequest, DeletePublicIpv4PoolResult } from "../models/models_3"; import { de_DeletePublicIpv4PoolCommand, se_DeletePublicIpv4PoolCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/DescribeCapacityBlockOfferingsCommand.ts b/clients/client-ec2/src/commands/DescribeCapacityBlockOfferingsCommand.ts new file mode 100644 index 000000000000..0f3d52876e51 --- /dev/null +++ b/clients/client-ec2/src/commands/DescribeCapacityBlockOfferingsCommand.ts @@ -0,0 +1,179 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { DescribeCapacityBlockOfferingsRequest, DescribeCapacityBlockOfferingsResult } from "../models/models_3"; +import { + de_DescribeCapacityBlockOfferingsCommand, + se_DescribeCapacityBlockOfferingsCommand, +} from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DescribeCapacityBlockOfferingsCommand}. + */ +export interface DescribeCapacityBlockOfferingsCommandInput extends DescribeCapacityBlockOfferingsRequest {} +/** + * @public + * + * The output of {@link DescribeCapacityBlockOfferingsCommand}. + */ +export interface DescribeCapacityBlockOfferingsCommandOutput + extends DescribeCapacityBlockOfferingsResult, + __MetadataBearer {} + +/** + * @public + *

Describes Capacity Block offerings available for purchase. With Capacity Blocks, you purchase a specific instance type for a period of time.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EC2Client, DescribeCapacityBlockOfferingsCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, DescribeCapacityBlockOfferingsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // DescribeCapacityBlockOfferingsRequest + * DryRun: true || false, + * InstanceType: "STRING_VALUE", // required + * InstanceCount: Number("int"), // required + * StartDateRange: new Date("TIMESTAMP"), + * EndDateRange: new Date("TIMESTAMP"), + * CapacityDurationHours: Number("int"), // required + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * }; + * const command = new DescribeCapacityBlockOfferingsCommand(input); + * const response = await client.send(command); + * // { // DescribeCapacityBlockOfferingsResult + * // CapacityBlockOfferings: [ // CapacityBlockOfferingSet + * // { // CapacityBlockOffering + * // CapacityBlockOfferingId: "STRING_VALUE", + * // InstanceType: "STRING_VALUE", + * // AvailabilityZone: "STRING_VALUE", + * // InstanceCount: Number("int"), + * // StartDate: new Date("TIMESTAMP"), + * // EndDate: new Date("TIMESTAMP"), + * // CapacityBlockDurationHours: Number("int"), + * // UpfrontFee: "STRING_VALUE", + * // CurrencyCode: "STRING_VALUE", + * // Tenancy: "default" || "dedicated", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param DescribeCapacityBlockOfferingsCommandInput - {@link DescribeCapacityBlockOfferingsCommandInput} + * @returns {@link DescribeCapacityBlockOfferingsCommandOutput} + * @see {@link DescribeCapacityBlockOfferingsCommandInput} for command's `input` shape. + * @see {@link DescribeCapacityBlockOfferingsCommandOutput} for command's `response` shape. + * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. + * + * @throws {@link EC2ServiceException} + *

Base exception class for all service exceptions from EC2 service.

+ * + */ +export class DescribeCapacityBlockOfferingsCommand extends $Command< + DescribeCapacityBlockOfferingsCommandInput, + DescribeCapacityBlockOfferingsCommandOutput, + EC2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DescribeCapacityBlockOfferingsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EC2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DescribeCapacityBlockOfferingsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EC2Client"; + const commandName = "DescribeCapacityBlockOfferingsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AmazonEC2", + operation: "DescribeCapacityBlockOfferings", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: DescribeCapacityBlockOfferingsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_DescribeCapacityBlockOfferingsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DescribeCapacityBlockOfferingsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-ec2/src/commands/DescribeCapacityReservationsCommand.ts b/clients/client-ec2/src/commands/DescribeCapacityReservationsCommand.ts index 07562e941634..d047a8f31dc1 100644 --- a/clients/client-ec2/src/commands/DescribeCapacityReservationsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeCapacityReservationsCommand.ts @@ -81,7 +81,7 @@ export interface DescribeCapacityReservationsCommandOutput * // AvailableInstanceCount: Number("int"), * // EbsOptimized: true || false, * // EphemeralStorage: true || false, - * // State: "active" || "expired" || "cancelled" || "pending" || "failed", + * // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed", * // StartDate: new Date("TIMESTAMP"), * // EndDate: new Date("TIMESTAMP"), * // EndDateType: "unlimited" || "limited", @@ -102,6 +102,7 @@ export interface DescribeCapacityReservationsCommandOutput * // Count: Number("int"), * // }, * // ], + * // ReservationType: "default" || "capacity-block", * // }, * // ], * // }; diff --git a/clients/client-ec2/src/commands/DescribeFleetsCommand.ts b/clients/client-ec2/src/commands/DescribeFleetsCommand.ts index 120e4bd1f64c..c7667ea73f68 100644 --- a/clients/client-ec2/src/commands/DescribeFleetsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeFleetsCommand.ts @@ -170,7 +170,7 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met * // TotalTargetCapacity: Number("int"), * // OnDemandTargetCapacity: Number("int"), * // SpotTargetCapacity: Number("int"), - * // DefaultTargetCapacityType: "spot" || "on-demand", + * // DefaultTargetCapacityType: "spot" || "on-demand" || "capacity-block", * // TargetCapacityUnitType: "vcpu" || "memory-mib" || "units", * // }, * // TerminateInstancesWithExpiration: true || false, diff --git a/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts b/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts index 1d0b76466440..889f72182daf 100644 --- a/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts @@ -70,7 +70,7 @@ export interface DescribeInstanceTypesCommandOutput extends DescribeInstanceType * // CurrentGeneration: true || false, * // FreeTierEligible: true || false, * // SupportedUsageClasses: [ // UsageClassTypeList - * // "spot" || "on-demand", + * // "spot" || "on-demand" || "capacity-block", * // ], * // SupportedRootDeviceTypes: [ // RootDeviceTypeList * // "ebs" || "instance-store", diff --git a/clients/client-ec2/src/commands/DescribeInstancesCommand.ts b/clients/client-ec2/src/commands/DescribeInstancesCommand.ts index 3847e98d850b..9dfe50285581 100644 --- a/clients/client-ec2/src/commands/DescribeInstancesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeInstancesCommand.ts @@ -15,8 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { DescribeInstancesRequest } from "../models/models_3"; -import { DescribeInstancesResult } from "../models/models_4"; +import { DescribeInstancesRequest, DescribeInstancesResult } from "../models/models_4"; import { de_DescribeInstancesCommand, se_DescribeInstancesCommand } from "../protocols/Aws_ec2"; /** @@ -149,7 +148,7 @@ export interface DescribeInstancesCommandOutput extends DescribeInstancesResult, * // Arn: "STRING_VALUE", * // Id: "STRING_VALUE", * // }, - * // InstanceLifecycle: "spot" || "scheduled", + * // InstanceLifecycle: "spot" || "scheduled" || "capacity-block", * // ElasticGpuAssociations: [ // ElasticGpuAssociationList * // { // ElasticGpuAssociation * // ElasticGpuId: "STRING_VALUE", diff --git a/clients/client-ec2/src/commands/DescribeLaunchTemplateVersionsCommand.ts b/clients/client-ec2/src/commands/DescribeLaunchTemplateVersionsCommand.ts index 843cfc770dd5..f14d7edcc2ca 100644 --- a/clients/client-ec2/src/commands/DescribeLaunchTemplateVersionsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeLaunchTemplateVersionsCommand.ts @@ -207,7 +207,7 @@ export interface DescribeLaunchTemplateVersionsCommandOutput * // "STRING_VALUE", * // ], * // InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptions - * // MarketType: "spot", + * // MarketType: "spot" || "capacity-block", * // SpotOptions: { // LaunchTemplateSpotMarketOptions * // MaxPrice: "STRING_VALUE", * // SpotInstanceType: "one-time" || "persistent", diff --git a/clients/client-ec2/src/commands/DescribeTrunkInterfaceAssociationsCommand.ts b/clients/client-ec2/src/commands/DescribeTrunkInterfaceAssociationsCommand.ts index 5e2c284ad88d..1d7c32111af5 100644 --- a/clients/client-ec2/src/commands/DescribeTrunkInterfaceAssociationsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeTrunkInterfaceAssociationsCommand.ts @@ -18,7 +18,7 @@ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from " import { DescribeTrunkInterfaceAssociationsRequest, DescribeTrunkInterfaceAssociationsResult, -} from "../models/models_4"; +} from "../models/models_5"; import { de_DescribeTrunkInterfaceAssociationsCommand, se_DescribeTrunkInterfaceAssociationsCommand, diff --git a/clients/client-ec2/src/commands/DescribeVerifiedAccessEndpointsCommand.ts b/clients/client-ec2/src/commands/DescribeVerifiedAccessEndpointsCommand.ts index d2f6d4968248..65e847152d89 100644 --- a/clients/client-ec2/src/commands/DescribeVerifiedAccessEndpointsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeVerifiedAccessEndpointsCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { DescribeVerifiedAccessEndpointsRequest, DescribeVerifiedAccessEndpointsResult } from "../models/models_4"; +import { DescribeVerifiedAccessEndpointsRequest, DescribeVerifiedAccessEndpointsResult } from "../models/models_5"; import { de_DescribeVerifiedAccessEndpointsCommand, se_DescribeVerifiedAccessEndpointsCommand, diff --git a/clients/client-ec2/src/commands/GetCapacityReservationUsageCommand.ts b/clients/client-ec2/src/commands/GetCapacityReservationUsageCommand.ts index 0780f25f81f6..4facf3b046a0 100644 --- a/clients/client-ec2/src/commands/GetCapacityReservationUsageCommand.ts +++ b/clients/client-ec2/src/commands/GetCapacityReservationUsageCommand.ts @@ -60,7 +60,7 @@ export interface GetCapacityReservationUsageCommandOutput extends GetCapacityRes * // InstanceType: "STRING_VALUE", * // TotalInstanceCount: Number("int"), * // AvailableInstanceCount: Number("int"), - * // State: "active" || "expired" || "cancelled" || "pending" || "failed", + * // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed", * // InstanceUsages: [ // InstanceUsageSet * // { // InstanceUsage * // AccountId: "STRING_VALUE", diff --git a/clients/client-ec2/src/commands/GetLaunchTemplateDataCommand.ts b/clients/client-ec2/src/commands/GetLaunchTemplateDataCommand.ts index 8ba3b315a555..d0b498e00a89 100644 --- a/clients/client-ec2/src/commands/GetLaunchTemplateDataCommand.ts +++ b/clients/client-ec2/src/commands/GetLaunchTemplateDataCommand.ts @@ -180,7 +180,7 @@ export interface GetLaunchTemplateDataCommandOutput extends GetLaunchTemplateDat * // "STRING_VALUE", * // ], * // InstanceMarketOptions: { // LaunchTemplateInstanceMarketOptions - * // MarketType: "spot", + * // MarketType: "spot" || "capacity-block", * // SpotOptions: { // LaunchTemplateSpotMarketOptions * // MaxPrice: "STRING_VALUE", * // SpotInstanceType: "one-time" || "persistent", diff --git a/clients/client-ec2/src/commands/GetTransitGatewayPolicyTableEntriesCommand.ts b/clients/client-ec2/src/commands/GetTransitGatewayPolicyTableEntriesCommand.ts index 26ab919abe12..47b8fbd751a0 100644 --- a/clients/client-ec2/src/commands/GetTransitGatewayPolicyTableEntriesCommand.ts +++ b/clients/client-ec2/src/commands/GetTransitGatewayPolicyTableEntriesCommand.ts @@ -15,10 +15,8 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { - GetTransitGatewayPolicyTableEntriesRequest, - GetTransitGatewayPolicyTableEntriesResult, -} from "../models/models_5"; +import { GetTransitGatewayPolicyTableEntriesRequest } from "../models/models_5"; +import { GetTransitGatewayPolicyTableEntriesResult } from "../models/models_6"; import { de_GetTransitGatewayPolicyTableEntriesCommand, se_GetTransitGatewayPolicyTableEntriesCommand, diff --git a/clients/client-ec2/src/commands/GetTransitGatewayPrefixListReferencesCommand.ts b/clients/client-ec2/src/commands/GetTransitGatewayPrefixListReferencesCommand.ts index cc6374d762ef..5f5cb8bbc995 100644 --- a/clients/client-ec2/src/commands/GetTransitGatewayPrefixListReferencesCommand.ts +++ b/clients/client-ec2/src/commands/GetTransitGatewayPrefixListReferencesCommand.ts @@ -18,7 +18,7 @@ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from " import { GetTransitGatewayPrefixListReferencesRequest, GetTransitGatewayPrefixListReferencesResult, -} from "../models/models_5"; +} from "../models/models_6"; import { de_GetTransitGatewayPrefixListReferencesCommand, se_GetTransitGatewayPrefixListReferencesCommand, diff --git a/clients/client-ec2/src/commands/GetTransitGatewayRouteTableAssociationsCommand.ts b/clients/client-ec2/src/commands/GetTransitGatewayRouteTableAssociationsCommand.ts index d1f523becfef..c25b19306c2c 100644 --- a/clients/client-ec2/src/commands/GetTransitGatewayRouteTableAssociationsCommand.ts +++ b/clients/client-ec2/src/commands/GetTransitGatewayRouteTableAssociationsCommand.ts @@ -15,8 +15,10 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { GetTransitGatewayRouteTableAssociationsRequest } from "../models/models_5"; -import { GetTransitGatewayRouteTableAssociationsResult } from "../models/models_6"; +import { + GetTransitGatewayRouteTableAssociationsRequest, + GetTransitGatewayRouteTableAssociationsResult, +} from "../models/models_6"; import { de_GetTransitGatewayRouteTableAssociationsCommand, se_GetTransitGatewayRouteTableAssociationsCommand, diff --git a/clients/client-ec2/src/commands/ModifyFleetCommand.ts b/clients/client-ec2/src/commands/ModifyFleetCommand.ts index 86af8fb3b64e..cdeb6e76ac4a 100644 --- a/clients/client-ec2/src/commands/ModifyFleetCommand.ts +++ b/clients/client-ec2/src/commands/ModifyFleetCommand.ts @@ -172,7 +172,7 @@ export interface ModifyFleetCommandOutput extends ModifyFleetResult, __MetadataB * TotalTargetCapacity: Number("int"), // required * OnDemandTargetCapacity: Number("int"), * SpotTargetCapacity: Number("int"), - * DefaultTargetCapacityType: "spot" || "on-demand", + * DefaultTargetCapacityType: "spot" || "on-demand" || "capacity-block", * TargetCapacityUnitType: "vcpu" || "memory-mib" || "units", * }, * Context: "STRING_VALUE", diff --git a/clients/client-ec2/src/commands/PurchaseCapacityBlockCommand.ts b/clients/client-ec2/src/commands/PurchaseCapacityBlockCommand.ts new file mode 100644 index 000000000000..124089a531a8 --- /dev/null +++ b/clients/client-ec2/src/commands/PurchaseCapacityBlockCommand.ts @@ -0,0 +1,196 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { PurchaseCapacityBlockRequest, PurchaseCapacityBlockResult } from "../models/models_6"; +import { de_PurchaseCapacityBlockCommand, se_PurchaseCapacityBlockCommand } from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link PurchaseCapacityBlockCommand}. + */ +export interface PurchaseCapacityBlockCommandInput extends PurchaseCapacityBlockRequest {} +/** + * @public + * + * The output of {@link PurchaseCapacityBlockCommand}. + */ +export interface PurchaseCapacityBlockCommandOutput extends PurchaseCapacityBlockResult, __MetadataBearer {} + +/** + * @public + *

Purchase the Capacity Block for use with your account. + * With Capacity Blocks you ensure GPU capacity is available for machine learning (ML) workloads. You must specify the ID of the Capacity Block offering you are purchasing.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EC2Client, PurchaseCapacityBlockCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, PurchaseCapacityBlockCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // PurchaseCapacityBlockRequest + * DryRun: true || false, + * TagSpecifications: [ // TagSpecificationList + * { // TagSpecification + * ResourceType: "capacity-reservation" || "client-vpn-endpoint" || "customer-gateway" || "carrier-gateway" || "coip-pool" || "dedicated-host" || "dhcp-options" || "egress-only-internet-gateway" || "elastic-ip" || "elastic-gpu" || "export-image-task" || "export-instance-task" || "fleet" || "fpga-image" || "host-reservation" || "image" || "import-image-task" || "import-snapshot-task" || "instance" || "instance-event-window" || "internet-gateway" || "ipam" || "ipam-pool" || "ipam-scope" || "ipv4pool-ec2" || "ipv6pool-ec2" || "key-pair" || "launch-template" || "local-gateway" || "local-gateway-route-table" || "local-gateway-virtual-interface" || "local-gateway-virtual-interface-group" || "local-gateway-route-table-vpc-association" || "local-gateway-route-table-virtual-interface-group-association" || "natgateway" || "network-acl" || "network-interface" || "network-insights-analysis" || "network-insights-path" || "network-insights-access-scope" || "network-insights-access-scope-analysis" || "placement-group" || "prefix-list" || "replace-root-volume-task" || "reserved-instances" || "route-table" || "security-group" || "security-group-rule" || "snapshot" || "spot-fleet-request" || "spot-instances-request" || "subnet" || "subnet-cidr-reservation" || "traffic-mirror-filter" || "traffic-mirror-session" || "traffic-mirror-target" || "transit-gateway" || "transit-gateway-attachment" || "transit-gateway-connect-peer" || "transit-gateway-multicast-domain" || "transit-gateway-policy-table" || "transit-gateway-route-table" || "transit-gateway-route-table-announcement" || "volume" || "vpc" || "vpc-endpoint" || "vpc-endpoint-connection" || "vpc-endpoint-service" || "vpc-endpoint-service-permission" || "vpc-peering-connection" || "vpn-connection" || "vpn-gateway" || "vpc-flow-log" || "capacity-reservation-fleet" || "traffic-mirror-filter-rule" || "vpc-endpoint-connection-device-type" || "verified-access-instance" || "verified-access-group" || "verified-access-endpoint" || "verified-access-policy" || "verified-access-trust-provider" || "vpn-connection-device-type" || "vpc-block-public-access-exclusion" || "ipam-resource-discovery" || "ipam-resource-discovery-association" || "instance-connect-endpoint", + * Tags: [ // TagList + * { // Tag + * Key: "STRING_VALUE", + * Value: "STRING_VALUE", + * }, + * ], + * }, + * ], + * CapacityBlockOfferingId: "STRING_VALUE", // required + * InstancePlatform: "Linux/UNIX" || "Red Hat Enterprise Linux" || "SUSE Linux" || "Windows" || "Windows with SQL Server" || "Windows with SQL Server Enterprise" || "Windows with SQL Server Standard" || "Windows with SQL Server Web" || "Linux with SQL Server Standard" || "Linux with SQL Server Web" || "Linux with SQL Server Enterprise" || "RHEL with SQL Server Standard" || "RHEL with SQL Server Enterprise" || "RHEL with SQL Server Web" || "RHEL with HA" || "RHEL with HA and SQL Server Standard" || "RHEL with HA and SQL Server Enterprise" || "Ubuntu Pro", // required + * }; + * const command = new PurchaseCapacityBlockCommand(input); + * const response = await client.send(command); + * // { // PurchaseCapacityBlockResult + * // CapacityReservation: { // CapacityReservation + * // CapacityReservationId: "STRING_VALUE", + * // OwnerId: "STRING_VALUE", + * // CapacityReservationArn: "STRING_VALUE", + * // AvailabilityZoneId: "STRING_VALUE", + * // InstanceType: "STRING_VALUE", + * // InstancePlatform: "Linux/UNIX" || "Red Hat Enterprise Linux" || "SUSE Linux" || "Windows" || "Windows with SQL Server" || "Windows with SQL Server Enterprise" || "Windows with SQL Server Standard" || "Windows with SQL Server Web" || "Linux with SQL Server Standard" || "Linux with SQL Server Web" || "Linux with SQL Server Enterprise" || "RHEL with SQL Server Standard" || "RHEL with SQL Server Enterprise" || "RHEL with SQL Server Web" || "RHEL with HA" || "RHEL with HA and SQL Server Standard" || "RHEL with HA and SQL Server Enterprise" || "Ubuntu Pro", + * // AvailabilityZone: "STRING_VALUE", + * // Tenancy: "default" || "dedicated", + * // TotalInstanceCount: Number("int"), + * // AvailableInstanceCount: Number("int"), + * // EbsOptimized: true || false, + * // EphemeralStorage: true || false, + * // State: "active" || "expired" || "cancelled" || "pending" || "failed" || "scheduled" || "payment-pending" || "payment-failed", + * // StartDate: new Date("TIMESTAMP"), + * // EndDate: new Date("TIMESTAMP"), + * // EndDateType: "unlimited" || "limited", + * // InstanceMatchCriteria: "open" || "targeted", + * // CreateDate: new Date("TIMESTAMP"), + * // Tags: [ // TagList + * // { // Tag + * // Key: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // }, + * // ], + * // OutpostArn: "STRING_VALUE", + * // CapacityReservationFleetId: "STRING_VALUE", + * // PlacementGroupArn: "STRING_VALUE", + * // CapacityAllocations: [ // CapacityAllocations + * // { // CapacityAllocation + * // AllocationType: "used", + * // Count: Number("int"), + * // }, + * // ], + * // ReservationType: "default" || "capacity-block", + * // }, + * // }; + * + * ``` + * + * @param PurchaseCapacityBlockCommandInput - {@link PurchaseCapacityBlockCommandInput} + * @returns {@link PurchaseCapacityBlockCommandOutput} + * @see {@link PurchaseCapacityBlockCommandInput} for command's `input` shape. + * @see {@link PurchaseCapacityBlockCommandOutput} for command's `response` shape. + * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. + * + * @throws {@link EC2ServiceException} + *

Base exception class for all service exceptions from EC2 service.

+ * + */ +export class PurchaseCapacityBlockCommand extends $Command< + PurchaseCapacityBlockCommandInput, + PurchaseCapacityBlockCommandOutput, + EC2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: PurchaseCapacityBlockCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EC2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, PurchaseCapacityBlockCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EC2Client"; + const commandName = "PurchaseCapacityBlockCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + [SMITHY_CONTEXT_KEY]: { + service: "AmazonEC2", + operation: "PurchaseCapacityBlock", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: PurchaseCapacityBlockCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_PurchaseCapacityBlockCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_PurchaseCapacityBlockCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-ec2/src/commands/RestoreSnapshotTierCommand.ts b/clients/client-ec2/src/commands/RestoreSnapshotTierCommand.ts index f4fbe9c6fcd1..f9bc544191e2 100644 --- a/clients/client-ec2/src/commands/RestoreSnapshotTierCommand.ts +++ b/clients/client-ec2/src/commands/RestoreSnapshotTierCommand.ts @@ -15,7 +15,8 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { RestoreSnapshotTierRequest, RestoreSnapshotTierResult } from "../models/models_6"; +import { RestoreSnapshotTierRequest } from "../models/models_6"; +import { RestoreSnapshotTierResult } from "../models/models_7"; import { de_RestoreSnapshotTierCommand, se_RestoreSnapshotTierCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RevokeClientVpnIngressCommand.ts b/clients/client-ec2/src/commands/RevokeClientVpnIngressCommand.ts index 4f7b61ed8420..d9dd6ccfca66 100644 --- a/clients/client-ec2/src/commands/RevokeClientVpnIngressCommand.ts +++ b/clients/client-ec2/src/commands/RevokeClientVpnIngressCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { RevokeClientVpnIngressRequest, RevokeClientVpnIngressResult } from "../models/models_6"; +import { RevokeClientVpnIngressRequest, RevokeClientVpnIngressResult } from "../models/models_7"; import { de_RevokeClientVpnIngressCommand, se_RevokeClientVpnIngressCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RevokeSecurityGroupEgressCommand.ts b/clients/client-ec2/src/commands/RevokeSecurityGroupEgressCommand.ts index 7a06e6297448..ea161a9f83ae 100644 --- a/clients/client-ec2/src/commands/RevokeSecurityGroupEgressCommand.ts +++ b/clients/client-ec2/src/commands/RevokeSecurityGroupEgressCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { RevokeSecurityGroupEgressRequest, RevokeSecurityGroupEgressResult } from "../models/models_6"; +import { RevokeSecurityGroupEgressRequest, RevokeSecurityGroupEgressResult } from "../models/models_7"; import { de_RevokeSecurityGroupEgressCommand, se_RevokeSecurityGroupEgressCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RevokeSecurityGroupIngressCommand.ts b/clients/client-ec2/src/commands/RevokeSecurityGroupIngressCommand.ts index 8c919ec7ddbf..27d396a9d78d 100644 --- a/clients/client-ec2/src/commands/RevokeSecurityGroupIngressCommand.ts +++ b/clients/client-ec2/src/commands/RevokeSecurityGroupIngressCommand.ts @@ -15,8 +15,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { RevokeSecurityGroupIngressRequest } from "../models/models_6"; -import { RevokeSecurityGroupIngressResult } from "../models/models_7"; +import { RevokeSecurityGroupIngressRequest, RevokeSecurityGroupIngressResult } from "../models/models_7"; import { de_RevokeSecurityGroupIngressCommand, se_RevokeSecurityGroupIngressCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RunInstancesCommand.ts b/clients/client-ec2/src/commands/RunInstancesCommand.ts index 090cb8acd79e..5180d90da333 100644 --- a/clients/client-ec2/src/commands/RunInstancesCommand.ts +++ b/clients/client-ec2/src/commands/RunInstancesCommand.ts @@ -230,7 +230,7 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer * Version: "STRING_VALUE", * }, * InstanceMarketOptions: { // InstanceMarketOptionsRequest - * MarketType: "spot", + * MarketType: "spot" || "capacity-block", * SpotOptions: { // SpotMarketOptions * MaxPrice: "STRING_VALUE", * SpotInstanceType: "one-time" || "persistent", @@ -354,7 +354,7 @@ export interface RunInstancesCommandOutput extends Reservation, __MetadataBearer * // Arn: "STRING_VALUE", * // Id: "STRING_VALUE", * // }, - * // InstanceLifecycle: "spot" || "scheduled", + * // InstanceLifecycle: "spot" || "scheduled" || "capacity-block", * // ElasticGpuAssociations: [ // ElasticGpuAssociationList * // { // ElasticGpuAssociation * // ElasticGpuId: "STRING_VALUE", diff --git a/clients/client-ec2/src/commands/index.ts b/clients/client-ec2/src/commands/index.ts index 1eda39e460cc..a090679381c9 100644 --- a/clients/client-ec2/src/commands/index.ts +++ b/clients/client-ec2/src/commands/index.ts @@ -225,6 +225,7 @@ export * from "./DescribeAvailabilityZonesCommand"; export * from "./DescribeAwsNetworkPerformanceMetricSubscriptionsCommand"; export * from "./DescribeBundleTasksCommand"; export * from "./DescribeByoipCidrsCommand"; +export * from "./DescribeCapacityBlockOfferingsCommand"; export * from "./DescribeCapacityReservationFleetsCommand"; export * from "./DescribeCapacityReservationsCommand"; export * from "./DescribeCarrierGatewaysCommand"; @@ -538,6 +539,7 @@ export * from "./MoveByoipCidrToIpamCommand"; export * from "./ProvisionByoipCidrCommand"; export * from "./ProvisionIpamPoolCidrCommand"; export * from "./ProvisionPublicIpv4PoolCidrCommand"; +export * from "./PurchaseCapacityBlockCommand"; export * from "./PurchaseHostReservationCommand"; export * from "./PurchaseReservedInstancesOfferingCommand"; export * from "./PurchaseScheduledInstancesCommand"; diff --git a/clients/client-ec2/src/models/models_0.ts b/clients/client-ec2/src/models/models_0.ts index 4c84fb3f96c2..33d86cff18c5 100644 --- a/clients/client-ec2/src/models/models_0.ts +++ b/clients/client-ec2/src/models/models_0.ts @@ -8142,6 +8142,20 @@ export interface CapacityAllocation { Count?: number; } +/** + * @public + * @enum + */ +export const CapacityReservationType = { + CAPACITY_BLOCK: "capacity-block", + DEFAULT: "default", +} as const; + +/** + * @public + */ +export type CapacityReservationType = (typeof CapacityReservationType)[keyof typeof CapacityReservationType]; + /** * @public * @enum @@ -8151,7 +8165,10 @@ export const CapacityReservationState = { cancelled: "cancelled", expired: "expired", failed: "failed", + payment_failed: "payment-failed", + payment_pending: "payment-pending", pending: "pending", + scheduled: "scheduled", } as const; /** @@ -8377,6 +8394,12 @@ export interface CapacityReservation { *

Information about instance capacity usage.

*/ CapacityAllocations?: CapacityAllocation[]; + + /** + * @public + *

The type of Capacity Reservation.

+ */ + ReservationType?: CapacityReservationType; } /** @@ -9614,24 +9637,6 @@ export interface DirectoryServiceAuthenticationRequest { DirectoryId?: string; } -/** - * @public - *

The IAM SAML identity provider used for federated authentication.

- */ -export interface FederatedAuthenticationRequest { - /** - * @public - *

The Amazon Resource Name (ARN) of the IAM SAML identity provider.

- */ - SAMLProviderArn?: string; - - /** - * @public - *

The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

- */ - SelfServiceSAMLProviderArn?: string; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_1.ts b/clients/client-ec2/src/models/models_1.ts index 7a1b6a61ca9e..0fad39bad634 100644 --- a/clients/client-ec2/src/models/models_1.ts +++ b/clients/client-ec2/src/models/models_1.ts @@ -17,7 +17,6 @@ import { AddressFamily, AttachmentStatus, DirectoryServiceAuthenticationRequest, - FederatedAuthenticationRequest, InstanceEventWindow, Ipv4PrefixSpecification, NatGatewayAddress, @@ -33,6 +32,24 @@ import { WeekDay, } from "./models_0"; +/** + * @public + *

The IAM SAML identity provider used for federated authentication.

+ */ +export interface FederatedAuthenticationRequest { + /** + * @public + *

The Amazon Resource Name (ARN) of the IAM SAML identity provider.

+ */ + SAMLProviderArn?: string; + + /** + * @public + *

The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

+ */ + SelfServiceSAMLProviderArn?: string; +} + /** * @public *

Information about the client certificate to be used for authentication.

@@ -2585,6 +2602,7 @@ export interface SpotOptionsRequest { * @enum */ export const DefaultTargetCapacityType = { + CAPACITY_BLOCK: "capacity-block", ON_DEMAND: "on-demand", SPOT: "spot", } as const; @@ -3021,8 +3039,9 @@ export interface VCpuCountRange { * wizard or with the RunInstances API, you * can't specify InstanceRequirements.

* - *

For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot - * placement score in the Amazon EC2 User Guide.

+ *

For more information, see Create a mixed instances group using attribute-based instance type selection in + * the Amazon EC2 Auto Scaling User Guide, and also Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot + * placement score in the Amazon EC2 User Guide.

*/ export interface InstanceRequirements { /** @@ -6230,6 +6249,7 @@ export type ShutdownBehavior = (typeof ShutdownBehavior)[keyof typeof ShutdownBe * @enum */ export const MarketType = { + capacity_block: "capacity-block", spot: "spot", } as const; @@ -10993,62 +11013,6 @@ export const PlacementGroupState = { */ export type PlacementGroupState = (typeof PlacementGroupState)[keyof typeof PlacementGroupState]; -/** - * @public - *

Describes a placement group.

- */ -export interface PlacementGroup { - /** - * @public - *

The name of the placement group.

- */ - GroupName?: string; - - /** - * @public - *

The state of the placement group.

- */ - State?: PlacementGroupState; - - /** - * @public - *

The placement strategy.

- */ - Strategy?: PlacementStrategy; - - /** - * @public - *

The number of partitions. Valid only if strategy is - * set to partition.

- */ - PartitionCount?: number; - - /** - * @public - *

The ID of the placement group.

- */ - GroupId?: string; - - /** - * @public - *

Any tags applied to the placement group.

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

The Amazon Resource Name (ARN) of the placement group.

- */ - GroupArn?: string; - - /** - * @public - *

The spread level for the placement group. Only Outpost placement - * groups can be spread across hosts.

- */ - SpreadLevel?: SpreadLevel; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_2.ts b/clients/client-ec2/src/models/models_2.ts index 9fed33f600b2..c7c90196b0bd 100644 --- a/clients/client-ec2/src/models/models_2.ts +++ b/clients/client-ec2/src/models/models_2.ts @@ -46,13 +46,71 @@ import { LocalGatewayRouteTableVirtualInterfaceGroupAssociation, LocalGatewayRouteTableVpcAssociation, ManagedPrefixList, - PlacementGroup, + PlacementGroupState, + PlacementStrategy, + SpreadLevel, Subnet, Tenancy, VolumeType, Vpc, } from "./models_1"; +/** + * @public + *

Describes a placement group.

+ */ +export interface PlacementGroup { + /** + * @public + *

The name of the placement group.

+ */ + GroupName?: string; + + /** + * @public + *

The state of the placement group.

+ */ + State?: PlacementGroupState; + + /** + * @public + *

The placement strategy.

+ */ + Strategy?: PlacementStrategy; + + /** + * @public + *

The number of partitions. Valid only if strategy is + * set to partition.

+ */ + PartitionCount?: number; + + /** + * @public + *

The ID of the placement group.

+ */ + GroupId?: string; + + /** + * @public + *

Any tags applied to the placement group.

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

The Amazon Resource Name (ARN) of the placement group.

+ */ + GroupArn?: string; + + /** + * @public + *

The spread level for the placement group. Only Outpost placement + * groups can be spread across hosts.

+ */ + SpreadLevel?: SpreadLevel; +} + /** * @public */ @@ -8717,25 +8775,6 @@ export interface DeletePlacementGroupRequest { GroupName: string | undefined; } -/** - * @public - */ -export interface DeletePublicIpv4PoolRequest { - /** - * @public - *

A check for 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 - *

The ID of the public IPv4 pool you want to delete.

- */ - PoolId: string | undefined; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_3.ts b/clients/client-ec2/src/models/models_3.ts index d88237c86b3b..a25d4112ef51 100644 --- a/clients/client-ec2/src/models/models_3.ts +++ b/clients/client-ec2/src/models/models_3.ts @@ -20,6 +20,7 @@ import { ByoipCidr, CapacityReservation, CapacityReservationFleetState, + CapacityReservationTenancy, CarrierGateway, ClientVpnAuthorizationRuleStatus, CurrencyCodeValues, @@ -39,11 +40,8 @@ import { VerifiedAccessTrustProviderFilterSensitiveLog, } from "./models_0"; import { - AmdSevSnpSpecification, AttributeValue, BlockDeviceMapping, - CapacityReservationPreference, - CapacityReservationTargetResponse, ClientVpnAuthenticationType, ClientVpnEndpointStatus, ClientVpnRouteStatus, @@ -91,6 +89,25 @@ import { VerifiedAccessGroup, } from "./models_2"; +/** + * @public + */ +export interface DeletePublicIpv4PoolRequest { + /** + * @public + *

A check for 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 + *

The ID of the public IPv4 pool you want to delete.

+ */ + PoolId: string | undefined; +} + /** * @public */ @@ -2433,6 +2450,142 @@ export interface DescribeByoipCidrsResult { NextToken?: string; } +/** + * @public + */ +export interface DescribeCapacityBlockOfferingsRequest { + /** + * @public + *

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 + *

The type of instance for which the Capacity Block offering reserves capacity.

+ */ + InstanceType: string | undefined; + + /** + * @public + *

The number of instances for which to reserve capacity.

+ */ + InstanceCount: number | undefined; + + /** + * @public + *

The earliest start date for the Capacity Block offering.

+ */ + StartDateRange?: Date; + + /** + * @public + *

The latest end date for the Capacity Block offering.

+ */ + EndDateRange?: Date; + + /** + * @public + *

The number of hours for which to reserve Capacity Block.

+ */ + CapacityDurationHours: number | undefined; + + /** + * @public + *

The token to use to retrieve the next page of results.

+ */ + NextToken?: string; + + /** + * @public + *

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

+ */ + MaxResults?: number; +} + +/** + * @public + *

The recommended Capacity Block that fits your search requirements.

+ */ +export interface CapacityBlockOffering { + /** + * @public + *

The ID of the Capacity Block offering.

+ */ + CapacityBlockOfferingId?: string; + + /** + * @public + *

The instance type of the Capacity Block offering.

+ */ + InstanceType?: string; + + /** + * @public + *

The Availability Zone of the Capacity Block offering.

+ */ + AvailabilityZone?: string; + + /** + * @public + *

The number of instances in the Capacity Block offering.

+ */ + InstanceCount?: number; + + /** + * @public + *

The start date of the Capacity Block offering.

+ */ + StartDate?: Date; + + /** + * @public + *

The end date of the Capacity Block offering.

+ */ + EndDate?: Date; + + /** + * @public + *

The amount of time of the Capacity Block reservation in hours.

+ */ + CapacityBlockDurationHours?: number; + + /** + * @public + *

The total price to be paid up front.

+ */ + UpfrontFee?: string; + + /** + * @public + *

The currency of the payment for the Capacity Block.

+ */ + CurrencyCode?: string; + + /** + * @public + *

The tenancy of the Capacity Block.

+ */ + Tenancy?: CapacityReservationTenancy; +} + +/** + * @public + */ +export interface DescribeCapacityBlockOfferingsResult { + /** + * @public + *

The recommended Capacity Block offering for the dates specified.

+ */ + CapacityBlockOfferings?: CapacityBlockOffering[]; + + /** + * @public + *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

+ */ + NextToken?: string; +} + /** * @public */ @@ -9549,804 +9702,6 @@ export interface DescribeInstanceEventWindowsResult { NextToken?: string; } -/** - * @public - */ -export interface DescribeInstancesRequest { - /** - * @public - *

The filters.

- *
    - *
  • - *

    - * affinity - The affinity setting for an instance running on a - * Dedicated Host (default | host).

    - *
  • - *
  • - *

    - * architecture - The instance architecture (i386 | - * x86_64 | arm64).

    - *
  • - *
  • - *

    - * availability-zone - The Availability Zone of the instance.

    - *
  • - *
  • - *

    - * block-device-mapping.attach-time - The attach time for an EBS - * volume mapped to the instance, for example, - * 2022-09-15T17:15:20.000Z.

    - *
  • - *
  • - *

    - * block-device-mapping.delete-on-termination - A Boolean that - * indicates whether the EBS volume is deleted on instance termination.

    - *
  • - *
  • - *

    - * block-device-mapping.device-name - The device name specified in - * the block device mapping (for example, /dev/sdh or - * xvdh).

    - *
  • - *
  • - *

    - * block-device-mapping.status - The status for the EBS volume - * (attaching | attached | detaching | - * detached).

    - *
  • - *
  • - *

    - * block-device-mapping.volume-id - The volume ID of the EBS - * volume.

    - *
  • - *
  • - *

    - * boot-mode - The boot mode that was specified by the AMI - * (legacy-bios | uefi | - * uefi-preferred).

    - *
  • - *
  • - *

    - * capacity-reservation-id - The ID of the Capacity Reservation into which the - * instance was launched.

    - *
  • - *
  • - *

    - * capacity-reservation-specification.capacity-reservation-preference - * - The instance's Capacity Reservation preference (open | none).

    - *
  • - *
  • - *

    - * capacity-reservation-specification.capacity-reservation-target.capacity-reservation-id - * - The ID of the targeted Capacity Reservation.

    - *
  • - *
  • - *

    - * capacity-reservation-specification.capacity-reservation-target.capacity-reservation-resource-group-arn - * - The ARN of the targeted Capacity Reservation group.

    - *
  • - *
  • - *

    - * client-token - The idempotency token you provided when you - * launched the instance.

    - *
  • - *
  • - *

    - * current-instance-boot-mode - The boot mode that is used to launch - * the instance at launch or start (legacy-bios | - * uefi).

    - *
  • - *
  • - *

    - * dns-name - The public DNS name of the instance.

    - *
  • - *
  • - *

    - * ebs-optimized - A Boolean that indicates whether the instance is - * optimized for Amazon EBS I/O.

    - *
  • - *
  • - *

    - * ena-support - A Boolean that indicates whether the instance is - * enabled for enhanced networking with ENA.

    - *
  • - *
  • - *

    - * enclave-options.enabled - A Boolean that indicates whether the - * instance is enabled for Amazon Web Services Nitro Enclaves.

    - *
  • - *
  • - *

    - * 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.

    - *
  • - *
  • - *

    - * host-id - The ID of the Dedicated Host on which the instance is - * running, if applicable.

    - *
  • - *
  • - *

    - * hypervisor - The hypervisor type of the instance - * (ovm | xen). The value xen is used - * for both Xen and Nitro hypervisors.

    - *
  • - *
  • - *

    - * iam-instance-profile.arn - The instance profile associated with - * the instance. Specified as an ARN.

    - *
  • - *
  • - *

    - * iam-instance-profile.id - The instance profile associated with - * the instance. Specified as an ID.

    - *
  • - *
  • - *

    - * iam-instance-profile.name - The instance profile associated with - * the instance. Specified as an name.

    - *
  • - *
  • - *

    - * image-id - The ID of the image used to launch the - * instance.

    - *
  • - *
  • - *

    - * instance-id - The ID of the instance.

    - *
  • - *
  • - *

    - * instance-lifecycle - Indicates whether this is a Spot Instance or - * a Scheduled Instance (spot | scheduled).

    - *
  • - *
  • - *

    - * instance-state-code - The state of the instance, as a 16-bit - * unsigned integer. The high byte is used for internal purposes and should be - * ignored. The low byte is set based on the state represented. The valid values - * are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 - * (stopping), and 80 (stopped).

    - *
  • - *
  • - *

    - * instance-state-name - The state of the instance - * (pending | running | shutting-down | - * terminated | stopping | - * stopped).

    - *
  • - *
  • - *

    - * instance-type - The type of instance (for example, - * t2.micro).

    - *
  • - *
  • - *

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

    - *
  • - *
  • - *

    - * instance.group-name - The name of the security group for the - * instance.

    - *
  • - *
  • - *

    - * ip-address - The public IPv4 address of the instance.

    - *
  • - *
  • - *

    - * ipv6-address - The IPv6 address of the instance.

    - *
  • - *
  • - *

    - * kernel-id - The kernel ID.

    - *
  • - *
  • - *

    - * key-name - The name of the key pair used when the instance was - * launched.

    - *
  • - *
  • - *

    - * launch-index - When launching multiple instances, this is the - * index for the instance in the launch group (for example, 0, 1, 2, and so on). - *

    - *
  • - *
  • - *

    - * launch-time - The time when the instance was launched, in the ISO - * 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, - * 2021-09-29T11:04:43.305Z. You can use a wildcard - * (*), for example, 2021-09-29T*, which matches an - * entire day.

    - *
  • - *
  • - *

    - * maintenance-options.auto-recovery - The current automatic - * recovery behavior of the instance (disabled | default).

    - *
  • - *
  • - *

    - * metadata-options.http-endpoint - The status of access to the HTTP - * metadata endpoint on your instance (enabled | - * disabled)

    - *
  • - *
  • - *

    - * metadata-options.http-protocol-ipv4 - Indicates whether the IPv4 - * endpoint is enabled (disabled | enabled).

    - *
  • - *
  • - *

    - * metadata-options.http-protocol-ipv6 - Indicates whether the IPv6 - * endpoint is enabled (disabled | enabled).

    - *
  • - *
  • - *

    - * metadata-options.http-put-response-hop-limit - The HTTP metadata - * request put response hop limit (integer, possible values 1 to - * 64)

    - *
  • - *
  • - *

    - * metadata-options.http-tokens - The metadata request authorization - * state (optional | required)

    - *
  • - *
  • - *

    - * metadata-options.instance-metadata-tags - The status of access to - * instance tags from the instance metadata (enabled | - * disabled)

    - *
  • - *
  • - *

    - * metadata-options.state - The state of the metadata option changes - * (pending | applied).

    - *
  • - *
  • - *

    - * monitoring-state - Indicates whether detailed monitoring is - * enabled (disabled | enabled).

    - *
  • - *
  • - *

    - * network-interface.addresses.association.allocation-id - The allocation ID.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.association-id - The association ID.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.carrier-ip - The carrier IP address.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.customer-owned-ip - The customer-owned IP address.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.ip-owner-id - The owner - * ID of the private IPv4 address associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.public-dns-name - The public DNS name.

    - *
  • - *
  • - *

    - * network-interface.addresses.association.public-ip - The ID of the - * association of an Elastic IP address (IPv4) with a network interface.

    - *
  • - *
  • - *

    - * network-interface.addresses.primary - Specifies whether the IPv4 - * address of the network interface is the primary private IPv4 address.

    - *
  • - *
  • - *

    - * network-interface.addresses.private-dns-name - The private DNS name.

    - *
  • - *
  • - *

    - * network-interface.addresses.private-ip-address - The private IPv4 - * address associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.association.allocation-id - The allocation ID - * returned when you allocated the Elastic IP address (IPv4) for your network - * interface.

    - *
  • - *
  • - *

    - * network-interface.association.association-id - The association ID - * returned when the network interface was associated with an IPv4 address.

    - *
  • - *
  • - *

    - * network-interface.association.carrier-ip - The customer-owned IP address.

    - *
  • - *
  • - *

    - * network-interface.association.customer-owned-ip - The customer-owned IP address.

    - *
  • - *
  • - *

    - * network-interface.association.ip-owner-id - The owner of the - * Elastic IP address (IPv4) associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.association.public-dns-name - The public DNS name.

    - *
  • - *
  • - *

    - * network-interface.association.public-ip - The address of the - * Elastic IP address (IPv4) bound to the network interface.

    - *
  • - *
  • - *

    - * network-interface.attachment.attach-time - The time that the - * network interface was attached to an instance.

    - *
  • - *
  • - *

    - * network-interface.attachment.attachment-id - The ID of the - * interface attachment.

    - *
  • - *
  • - *

    - * network-interface.attachment.delete-on-termination - Specifies - * whether the attachment is deleted when an instance is terminated.

    - *
  • - *
  • - *

    - * network-interface.attachment.device-index - The device index to - * which the network interface is attached.

    - *
  • - *
  • - *

    - * network-interface.attachment.instance-id - The ID of the instance - * to which the network interface is attached.

    - *
  • - *
  • - *

    - * network-interface.attachment.instance-owner-id - The owner ID of - * the instance to which the network interface is attached.

    - *
  • - *
  • - *

    - * network-interface.attachment.network-card-index - The index of the network card.

    - *
  • - *
  • - *

    - * network-interface.attachment.status - The status of the - * attachment (attaching | attached | - * detaching | detached).

    - *
  • - *
  • - *

    - * network-interface.availability-zone - The Availability Zone for - * the network interface.

    - *
  • - *
  • - *

    - * network-interface.deny-all-igw-traffic - A Boolean that indicates whether - * a network interface with an IPv6 address is unreachable from the public internet.

    - *
  • - *
  • - *

    - * network-interface.description - The description of the network - * interface.

    - *
  • - *
  • - *

    - * network-interface.group-id - The ID of a security group - * associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.group-name - The name of a security group - * associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.ipv4-prefixes.ipv4-prefix - The IPv4 prefixes that are assigned to the network interface.

    - *
  • - *
  • - *

    - * network-interface.ipv6-address - The IPv6 address associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.ipv6-addresses.ipv6-address - The IPv6 address - * associated with the network interface.

    - *
  • - *
  • - *

    - * network-interface.ipv6-addresses.is-primary-ipv6 - A Boolean that indicates whether this - * is the primary IPv6 address.

    - *
  • - *
  • - *

    - * network-interface.ipv6-native - A Boolean that indicates whether this is - * an IPv6 only network interface.

    - *
  • - *
  • - *

    - * network-interface.ipv6-prefixes.ipv6-prefix - The IPv6 prefix assigned to the network interface.

    - *
  • - *
  • - *

    - * network-interface.mac-address - The MAC address of the network - * interface.

    - *
  • - *
  • - *

    - * network-interface.network-interface-id - The ID of the network - * interface.

    - *
  • - *
  • - *

    - * network-interface.outpost-arn - The ARN of the Outpost.

    - *
  • - *
  • - *

    - * network-interface.owner-id - The ID of the owner of the network - * interface.

    - *
  • - *
  • - *

    - * network-interface.private-dns-name - The private DNS name of the - * network interface.

    - *
  • - *
  • - *

    - * network-interface.private-ip-address - The private IPv4 address.

    - *
  • - *
  • - *

    - * network-interface.public-dns-name - The public DNS name.

    - *
  • - *
  • - *

    - * network-interface.requester-id - The requester ID for the network - * interface.

    - *
  • - *
  • - *

    - * network-interface.requester-managed - Indicates whether the - * network interface is being managed by Amazon Web Services.

    - *
  • - *
  • - *

    - * network-interface.status - The status of the network interface - * (available) | in-use).

    - *
  • - *
  • - *

    - * network-interface.source-dest-check - Whether the network - * interface performs source/destination checking. A value of true - * means that checking is enabled, and false means that checking is - * disabled. The value must be false for the network interface to - * perform network address translation (NAT) in your VPC.

    - *
  • - *
  • - *

    - * network-interface.subnet-id - The ID of the subnet for the - * network interface.

    - *
  • - *
  • - *

    - * network-interface.tag-key - The key of a tag assigned to the network interface.

    - *
  • - *
  • - *

    - * network-interface.tag-value - The value of a tag assigned to the network interface.

    - *
  • - *
  • - *

    - * network-interface.vpc-id - The ID of the VPC for the network - * interface.

    - *
  • - *
  • - *

    - * outpost-arn - The Amazon Resource Name (ARN) of the - * Outpost.

    - *
  • - *
  • - *

    - * owner-id - The Amazon Web Services account ID of the instance - * owner.

    - *
  • - *
  • - *

    - * placement-group-name - The name of the placement group for the - * instance.

    - *
  • - *
  • - *

    - * placement-partition-number - The partition in which the instance is - * located.

    - *
  • - *
  • - *

    - * platform - The platform. To list only Windows instances, use - * windows.

    - *
  • - *
  • - *

    - * platform-details - The platform (Linux/UNIX | - * Red Hat BYOL Linux | Red Hat Enterprise Linux | - * Red Hat Enterprise Linux with HA | Red Hat Enterprise - * Linux with SQL Server Standard and HA | Red Hat Enterprise - * Linux with SQL Server Enterprise and HA | Red Hat Enterprise - * Linux with SQL Server Standard | Red Hat Enterprise Linux with - * SQL Server Web | Red Hat Enterprise Linux with SQL Server - * Enterprise | SQL Server Enterprise | SQL Server - * Standard | SQL Server Web | SUSE Linux | - * Ubuntu Pro | Windows | Windows BYOL | - * Windows with SQL Server Enterprise | Windows with SQL - * Server Standard | Windows with SQL Server Web).

    - *
  • - *
  • - *

    - * private-dns-name - The private IPv4 DNS name of the - * instance.

    - *
  • - *
  • - *

    - * private-dns-name-options.enable-resource-name-dns-a-record - A - * Boolean that indicates whether to respond to DNS queries for instance hostnames - * with DNS A records.

    - *
  • - *
  • - *

    - * private-dns-name-options.enable-resource-name-dns-aaaa-record - A - * Boolean that indicates whether to respond to DNS queries for instance hostnames - * with DNS AAAA records.

    - *
  • - *
  • - *

    - * private-dns-name-options.hostname-type - The type of hostname - * (ip-name | resource-name).

    - *
  • - *
  • - *

    - * private-ip-address - The private IPv4 address of the - * instance.

    - *
  • - *
  • - *

    - * product-code - The product code associated with the AMI used to - * launch the instance.

    - *
  • - *
  • - *

    - * product-code.type - The type of product code (devpay - * | marketplace).

    - *
  • - *
  • - *

    - * ramdisk-id - The RAM disk ID.

    - *
  • - *
  • - *

    - * reason - The reason for the current state of the instance (for - * example, shows "User Initiated [date]" when you stop or terminate the instance). - * Similar to the state-reason-code filter.

    - *
  • - *
  • - *

    - * requester-id - The ID of the entity that launched the instance on - * your behalf (for example, Amazon Web Services Management Console, Auto Scaling, and so - * on).

    - *
  • - *
  • - *

    - * reservation-id - The ID of the instance's reservation. A - * reservation ID is created any time you launch an instance. A reservation ID has - * a one-to-one relationship with an instance launch request, but can be associated - * with more than one instance if you launch multiple instances using the same - * launch request. For example, if you launch one instance, you get one reservation - * ID. If you launch ten instances using the same launch request, you also get one - * reservation ID.

    - *
  • - *
  • - *

    - * root-device-name - The device name of the root device volume (for - * example, /dev/sda1).

    - *
  • - *
  • - *

    - * root-device-type - The type of the root device volume - * (ebs | instance-store).

    - *
  • - *
  • - *

    - * source-dest-check - Indicates whether the instance performs - * source/destination checking. A value of true means that checking is - * enabled, and false means that checking is disabled. The value must - * be false for the instance to perform network address translation - * (NAT) in your VPC.

    - *
  • - *
  • - *

    - * spot-instance-request-id - The ID of the Spot Instance - * request.

    - *
  • - *
  • - *

    - * state-reason-code - The reason code for the state change.

    - *
  • - *
  • - *

    - * state-reason-message - A message that describes the state - * change.

    - *
  • - *
  • - *

    - * subnet-id - The ID of the subnet for the instance.

    - *
  • - *
  • - *

    - * tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. - * For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    - *
  • - *
  • - *

    - * tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

    - *
  • - *
  • - *

    - * tenancy - The tenancy of an instance (dedicated | - * default | host).

    - *
  • - *
  • - *

    - * tpm-support - Indicates if the instance is configured for - * NitroTPM support (v2.0).

    - *
  • - *
  • - *

    - * usage-operation - The usage operation value for the instance - * (RunInstances | RunInstances:00g0 | - * RunInstances:0010 | RunInstances:1010 | - * RunInstances:1014 | RunInstances:1110 | - * RunInstances:0014 | RunInstances:0210 | - * RunInstances:0110 | RunInstances:0100 | - * RunInstances:0004 | RunInstances:0200 | - * RunInstances:000g | RunInstances:0g00 | - * RunInstances:0002 | RunInstances:0800 | - * RunInstances:0102 | RunInstances:0006 | - * RunInstances:0202).

    - *
  • - *
  • - *

    - * usage-operation-update-time - The time that the usage operation - * was last updated, for example, 2022-09-15T17:15:20.000Z.

    - *
  • - *
  • - *

    - * virtualization-type - The virtualization type of the instance - * (paravirtual | hvm).

    - *
  • - *
  • - *

    - * vpc-id - The ID of the VPC that the instance is running in.

    - *
  • - *
- */ - Filters?: Filter[]; - - /** - * @public - *

The instance IDs.

- *

Default: Describes all your instances.

- */ - InstanceIds?: string[]; - - /** - * @public - *

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 - *

The maximum number of items to return for this request. - * To get the next page of items, make another request with the token returned in the output. - * For more information, see Pagination.

- *

You cannot specify this parameter and the instance IDs parameter in the same request.

- */ - MaxResults?: number; - - /** - * @public - *

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

- */ - NextToken?: string; -} - -/** - * @public - *

Describes the instance's Capacity Reservation targeting preferences. The action returns the - * capacityReservationPreference response element if the instance is - * configured to run in On-Demand capacity, or if it is configured in run in any - * open Capacity Reservation that has matching attributes (instance type, platform, - * Availability Zone). The action returns the capacityReservationTarget - * response element if the instance explicily targets a specific Capacity Reservation or Capacity Reservation group.

- */ -export interface CapacityReservationSpecificationResponse { - /** - * @public - *

Describes the instance's Capacity Reservation preferences. Possible preferences include:

- *
    - *
  • - *

    - * open - The instance can run in any open Capacity Reservation that - * has matching attributes (instance type, platform, Availability Zone).

    - *
  • - *
  • - *

    - * none - The instance avoids running in a Capacity Reservation even if one is - * available. The instance runs in On-Demand capacity.

    - *
  • - *
- */ - CapacityReservationPreference?: CapacityReservationPreference; - - /** - * @public - *

Information about the targeted Capacity Reservation or Capacity Reservation group.

- */ - CapacityReservationTarget?: CapacityReservationTargetResponse; -} - -/** - * @public - *

The CPU options for the instance.

- */ -export interface CpuOptions { - /** - * @public - *

The number of CPU cores for the instance.

- */ - CoreCount?: number; - - /** - * @public - *

The number of threads per CPU core.

- */ - ThreadsPerCore?: number; - - /** - * @public - *

Indicates whether the instance is enabled for AMD SEV-SNP. For more information, see - * AMD SEV-SNP.

- */ - AmdSevSnp?: AmdSevSnpSpecification; -} - -/** - * @public - * @enum - */ -export const InstanceBootModeValues = { - legacy_bios: "legacy-bios", - uefi: "uefi", -} as const; - -/** - * @public - */ -export type InstanceBootModeValues = (typeof InstanceBootModeValues)[keyof typeof InstanceBootModeValues]; - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index 20d06bae0d3b..69e2f336c702 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -26,12 +26,14 @@ import { TransitGatewayAttachmentState, TransitGatewayPeeringAttachment, TransitGatewayVpcAttachment, - TrunkInterfaceAssociation, UserIdGroupPair, } from "./models_0"; import { + AmdSevSnpSpecification, AttributeValue, BlockDeviceMapping, + CapacityReservationPreference, + CapacityReservationTargetResponse, FleetLaunchTemplateSpecification, FleetType, GroupIdentifier, @@ -63,7 +65,6 @@ import { NetworkInterfacePermission, NetworkInterfaceStatus, Placement, - PlacementGroup, PlatformValues, PrivateIpAddressSpecification, SpotInstanceType, @@ -73,6 +74,7 @@ import { Tenancy, } from "./models_1"; import { + PlacementGroup, ReplaceRootVolumeTask, RouteTable, Snapshot, @@ -90,14 +92,11 @@ import { TransitGatewayPolicyTable, TransitGatewayRouteTable, TransitGatewayRouteTableAnnouncement, - VerifiedAccessEndpoint, } from "./models_2"; import { ArchitectureValues, AttributeBooleanValue, BootModeValues, - CapacityReservationSpecificationResponse, - CpuOptions, DeviceType, EnclaveOptions, EventInformation, @@ -105,12 +104,809 @@ import { HypervisorType, IdFormat, InstanceBlockDeviceMapping, - InstanceBootModeValues, PermissionGroup, ProductCode, VirtualizationType, } from "./models_3"; +/** + * @public + */ +export interface DescribeInstancesRequest { + /** + * @public + *

The filters.

+ *
    + *
  • + *

    + * affinity - The affinity setting for an instance running on a + * Dedicated Host (default | host).

    + *
  • + *
  • + *

    + * architecture - The instance architecture (i386 | + * x86_64 | arm64).

    + *
  • + *
  • + *

    + * availability-zone - The Availability Zone of the instance.

    + *
  • + *
  • + *

    + * block-device-mapping.attach-time - The attach time for an EBS + * volume mapped to the instance, for example, + * 2022-09-15T17:15:20.000Z.

    + *
  • + *
  • + *

    + * block-device-mapping.delete-on-termination - A Boolean that + * indicates whether the EBS volume is deleted on instance termination.

    + *
  • + *
  • + *

    + * block-device-mapping.device-name - The device name specified in + * the block device mapping (for example, /dev/sdh or + * xvdh).

    + *
  • + *
  • + *

    + * block-device-mapping.status - The status for the EBS volume + * (attaching | attached | detaching | + * detached).

    + *
  • + *
  • + *

    + * block-device-mapping.volume-id - The volume ID of the EBS + * volume.

    + *
  • + *
  • + *

    + * boot-mode - The boot mode that was specified by the AMI + * (legacy-bios | uefi | + * uefi-preferred).

    + *
  • + *
  • + *

    + * capacity-reservation-id - The ID of the Capacity Reservation into which the + * instance was launched.

    + *
  • + *
  • + *

    + * capacity-reservation-specification.capacity-reservation-preference + * - The instance's Capacity Reservation preference (open | none).

    + *
  • + *
  • + *

    + * capacity-reservation-specification.capacity-reservation-target.capacity-reservation-id + * - The ID of the targeted Capacity Reservation.

    + *
  • + *
  • + *

    + * capacity-reservation-specification.capacity-reservation-target.capacity-reservation-resource-group-arn + * - The ARN of the targeted Capacity Reservation group.

    + *
  • + *
  • + *

    + * client-token - The idempotency token you provided when you + * launched the instance.

    + *
  • + *
  • + *

    + * current-instance-boot-mode - The boot mode that is used to launch + * the instance at launch or start (legacy-bios | + * uefi).

    + *
  • + *
  • + *

    + * dns-name - The public DNS name of the instance.

    + *
  • + *
  • + *

    + * ebs-optimized - A Boolean that indicates whether the instance is + * optimized for Amazon EBS I/O.

    + *
  • + *
  • + *

    + * ena-support - A Boolean that indicates whether the instance is + * enabled for enhanced networking with ENA.

    + *
  • + *
  • + *

    + * enclave-options.enabled - A Boolean that indicates whether the + * instance is enabled for Amazon Web Services Nitro Enclaves.

    + *
  • + *
  • + *

    + * 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.

    + *
  • + *
  • + *

    + * host-id - The ID of the Dedicated Host on which the instance is + * running, if applicable.

    + *
  • + *
  • + *

    + * hypervisor - The hypervisor type of the instance + * (ovm | xen). The value xen is used + * for both Xen and Nitro hypervisors.

    + *
  • + *
  • + *

    + * iam-instance-profile.arn - The instance profile associated with + * the instance. Specified as an ARN.

    + *
  • + *
  • + *

    + * iam-instance-profile.id - The instance profile associated with + * the instance. Specified as an ID.

    + *
  • + *
  • + *

    + * iam-instance-profile.name - The instance profile associated with + * the instance. Specified as an name.

    + *
  • + *
  • + *

    + * image-id - The ID of the image used to launch the + * instance.

    + *
  • + *
  • + *

    + * instance-id - The ID of the instance.

    + *
  • + *
  • + *

    + * instance-lifecycle - Indicates whether this is a Spot Instance or + * a Scheduled Instance (spot | scheduled).

    + *
  • + *
  • + *

    + * instance-state-code - The state of the instance, as a 16-bit + * unsigned integer. The high byte is used for internal purposes and should be + * ignored. The low byte is set based on the state represented. The valid values + * are: 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 + * (stopping), and 80 (stopped).

    + *
  • + *
  • + *

    + * instance-state-name - The state of the instance + * (pending | running | shutting-down | + * terminated | stopping | + * stopped).

    + *
  • + *
  • + *

    + * instance-type - The type of instance (for example, + * t2.micro).

    + *
  • + *
  • + *

    + * instance.group-id - The ID of the security group for the + * instance.

    + *
  • + *
  • + *

    + * instance.group-name - The name of the security group for the + * instance.

    + *
  • + *
  • + *

    + * ip-address - The public IPv4 address of the instance.

    + *
  • + *
  • + *

    + * ipv6-address - The IPv6 address of the instance.

    + *
  • + *
  • + *

    + * kernel-id - The kernel ID.

    + *
  • + *
  • + *

    + * key-name - The name of the key pair used when the instance was + * launched.

    + *
  • + *
  • + *

    + * launch-index - When launching multiple instances, this is the + * index for the instance in the launch group (for example, 0, 1, 2, and so on). + *

    + *
  • + *
  • + *

    + * launch-time - The time when the instance was launched, in the ISO + * 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, + * 2021-09-29T11:04:43.305Z. You can use a wildcard + * (*), for example, 2021-09-29T*, which matches an + * entire day.

    + *
  • + *
  • + *

    + * maintenance-options.auto-recovery - The current automatic + * recovery behavior of the instance (disabled | default).

    + *
  • + *
  • + *

    + * metadata-options.http-endpoint - The status of access to the HTTP + * metadata endpoint on your instance (enabled | + * disabled)

    + *
  • + *
  • + *

    + * metadata-options.http-protocol-ipv4 - Indicates whether the IPv4 + * endpoint is enabled (disabled | enabled).

    + *
  • + *
  • + *

    + * metadata-options.http-protocol-ipv6 - Indicates whether the IPv6 + * endpoint is enabled (disabled | enabled).

    + *
  • + *
  • + *

    + * metadata-options.http-put-response-hop-limit - The HTTP metadata + * request put response hop limit (integer, possible values 1 to + * 64)

    + *
  • + *
  • + *

    + * metadata-options.http-tokens - The metadata request authorization + * state (optional | required)

    + *
  • + *
  • + *

    + * metadata-options.instance-metadata-tags - The status of access to + * instance tags from the instance metadata (enabled | + * disabled)

    + *
  • + *
  • + *

    + * metadata-options.state - The state of the metadata option changes + * (pending | applied).

    + *
  • + *
  • + *

    + * monitoring-state - Indicates whether detailed monitoring is + * enabled (disabled | enabled).

    + *
  • + *
  • + *

    + * network-interface.addresses.association.allocation-id - The allocation ID.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.association-id - The association ID.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.carrier-ip - The carrier IP address.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.customer-owned-ip - The customer-owned IP address.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.ip-owner-id - The owner + * ID of the private IPv4 address associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.public-dns-name - The public DNS name.

    + *
  • + *
  • + *

    + * network-interface.addresses.association.public-ip - The ID of the + * association of an Elastic IP address (IPv4) with a network interface.

    + *
  • + *
  • + *

    + * network-interface.addresses.primary - Specifies whether the IPv4 + * address of the network interface is the primary private IPv4 address.

    + *
  • + *
  • + *

    + * network-interface.addresses.private-dns-name - The private DNS name.

    + *
  • + *
  • + *

    + * network-interface.addresses.private-ip-address - The private IPv4 + * address associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.association.allocation-id - The allocation ID + * returned when you allocated the Elastic IP address (IPv4) for your network + * interface.

    + *
  • + *
  • + *

    + * network-interface.association.association-id - The association ID + * returned when the network interface was associated with an IPv4 address.

    + *
  • + *
  • + *

    + * network-interface.association.carrier-ip - The customer-owned IP address.

    + *
  • + *
  • + *

    + * network-interface.association.customer-owned-ip - The customer-owned IP address.

    + *
  • + *
  • + *

    + * network-interface.association.ip-owner-id - The owner of the + * Elastic IP address (IPv4) associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.association.public-dns-name - The public DNS name.

    + *
  • + *
  • + *

    + * network-interface.association.public-ip - The address of the + * Elastic IP address (IPv4) bound to the network interface.

    + *
  • + *
  • + *

    + * network-interface.attachment.attach-time - The time that the + * network interface was attached to an instance.

    + *
  • + *
  • + *

    + * network-interface.attachment.attachment-id - The ID of the + * interface attachment.

    + *
  • + *
  • + *

    + * network-interface.attachment.delete-on-termination - Specifies + * whether the attachment is deleted when an instance is terminated.

    + *
  • + *
  • + *

    + * network-interface.attachment.device-index - The device index to + * which the network interface is attached.

    + *
  • + *
  • + *

    + * network-interface.attachment.instance-id - The ID of the instance + * to which the network interface is attached.

    + *
  • + *
  • + *

    + * network-interface.attachment.instance-owner-id - The owner ID of + * the instance to which the network interface is attached.

    + *
  • + *
  • + *

    + * network-interface.attachment.network-card-index - The index of the network card.

    + *
  • + *
  • + *

    + * network-interface.attachment.status - The status of the + * attachment (attaching | attached | + * detaching | detached).

    + *
  • + *
  • + *

    + * network-interface.availability-zone - The Availability Zone for + * the network interface.

    + *
  • + *
  • + *

    + * network-interface.deny-all-igw-traffic - A Boolean that indicates whether + * a network interface with an IPv6 address is unreachable from the public internet.

    + *
  • + *
  • + *

    + * network-interface.description - The description of the network + * interface.

    + *
  • + *
  • + *

    + * network-interface.group-id - The ID of a security group + * associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.group-name - The name of a security group + * associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.ipv4-prefixes.ipv4-prefix - The IPv4 prefixes that are assigned to the network interface.

    + *
  • + *
  • + *

    + * network-interface.ipv6-address - The IPv6 address associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.ipv6-addresses.ipv6-address - The IPv6 address + * associated with the network interface.

    + *
  • + *
  • + *

    + * network-interface.ipv6-addresses.is-primary-ipv6 - A Boolean that indicates whether this + * is the primary IPv6 address.

    + *
  • + *
  • + *

    + * network-interface.ipv6-native - A Boolean that indicates whether this is + * an IPv6 only network interface.

    + *
  • + *
  • + *

    + * network-interface.ipv6-prefixes.ipv6-prefix - The IPv6 prefix assigned to the network interface.

    + *
  • + *
  • + *

    + * network-interface.mac-address - The MAC address of the network + * interface.

    + *
  • + *
  • + *

    + * network-interface.network-interface-id - The ID of the network + * interface.

    + *
  • + *
  • + *

    + * network-interface.outpost-arn - The ARN of the Outpost.

    + *
  • + *
  • + *

    + * network-interface.owner-id - The ID of the owner of the network + * interface.

    + *
  • + *
  • + *

    + * network-interface.private-dns-name - The private DNS name of the + * network interface.

    + *
  • + *
  • + *

    + * network-interface.private-ip-address - The private IPv4 address.

    + *
  • + *
  • + *

    + * network-interface.public-dns-name - The public DNS name.

    + *
  • + *
  • + *

    + * network-interface.requester-id - The requester ID for the network + * interface.

    + *
  • + *
  • + *

    + * network-interface.requester-managed - Indicates whether the + * network interface is being managed by Amazon Web Services.

    + *
  • + *
  • + *

    + * network-interface.status - The status of the network interface + * (available) | in-use).

    + *
  • + *
  • + *

    + * network-interface.source-dest-check - Whether the network + * interface performs source/destination checking. A value of true + * means that checking is enabled, and false means that checking is + * disabled. The value must be false for the network interface to + * perform network address translation (NAT) in your VPC.

    + *
  • + *
  • + *

    + * network-interface.subnet-id - The ID of the subnet for the + * network interface.

    + *
  • + *
  • + *

    + * network-interface.tag-key - The key of a tag assigned to the network interface.

    + *
  • + *
  • + *

    + * network-interface.tag-value - The value of a tag assigned to the network interface.

    + *
  • + *
  • + *

    + * network-interface.vpc-id - The ID of the VPC for the network + * interface.

    + *
  • + *
  • + *

    + * outpost-arn - The Amazon Resource Name (ARN) of the + * Outpost.

    + *
  • + *
  • + *

    + * owner-id - The Amazon Web Services account ID of the instance + * owner.

    + *
  • + *
  • + *

    + * placement-group-name - The name of the placement group for the + * instance.

    + *
  • + *
  • + *

    + * placement-partition-number - The partition in which the instance is + * located.

    + *
  • + *
  • + *

    + * platform - The platform. To list only Windows instances, use + * windows.

    + *
  • + *
  • + *

    + * platform-details - The platform (Linux/UNIX | + * Red Hat BYOL Linux | Red Hat Enterprise Linux | + * Red Hat Enterprise Linux with HA | Red Hat Enterprise + * Linux with SQL Server Standard and HA | Red Hat Enterprise + * Linux with SQL Server Enterprise and HA | Red Hat Enterprise + * Linux with SQL Server Standard | Red Hat Enterprise Linux with + * SQL Server Web | Red Hat Enterprise Linux with SQL Server + * Enterprise | SQL Server Enterprise | SQL Server + * Standard | SQL Server Web | SUSE Linux | + * Ubuntu Pro | Windows | Windows BYOL | + * Windows with SQL Server Enterprise | Windows with SQL + * Server Standard | Windows with SQL Server Web).

    + *
  • + *
  • + *

    + * private-dns-name - The private IPv4 DNS name of the + * instance.

    + *
  • + *
  • + *

    + * private-dns-name-options.enable-resource-name-dns-a-record - A + * Boolean that indicates whether to respond to DNS queries for instance hostnames + * with DNS A records.

    + *
  • + *
  • + *

    + * private-dns-name-options.enable-resource-name-dns-aaaa-record - A + * Boolean that indicates whether to respond to DNS queries for instance hostnames + * with DNS AAAA records.

    + *
  • + *
  • + *

    + * private-dns-name-options.hostname-type - The type of hostname + * (ip-name | resource-name).

    + *
  • + *
  • + *

    + * private-ip-address - The private IPv4 address of the + * instance.

    + *
  • + *
  • + *

    + * product-code - The product code associated with the AMI used to + * launch the instance.

    + *
  • + *
  • + *

    + * product-code.type - The type of product code (devpay + * | marketplace).

    + *
  • + *
  • + *

    + * ramdisk-id - The RAM disk ID.

    + *
  • + *
  • + *

    + * reason - The reason for the current state of the instance (for + * example, shows "User Initiated [date]" when you stop or terminate the instance). + * Similar to the state-reason-code filter.

    + *
  • + *
  • + *

    + * requester-id - The ID of the entity that launched the instance on + * your behalf (for example, Amazon Web Services Management Console, Auto Scaling, and so + * on).

    + *
  • + *
  • + *

    + * reservation-id - The ID of the instance's reservation. A + * reservation ID is created any time you launch an instance. A reservation ID has + * a one-to-one relationship with an instance launch request, but can be associated + * with more than one instance if you launch multiple instances using the same + * launch request. For example, if you launch one instance, you get one reservation + * ID. If you launch ten instances using the same launch request, you also get one + * reservation ID.

    + *
  • + *
  • + *

    + * root-device-name - The device name of the root device volume (for + * example, /dev/sda1).

    + *
  • + *
  • + *

    + * root-device-type - The type of the root device volume + * (ebs | instance-store).

    + *
  • + *
  • + *

    + * source-dest-check - Indicates whether the instance performs + * source/destination checking. A value of true means that checking is + * enabled, and false means that checking is disabled. The value must + * be false for the instance to perform network address translation + * (NAT) in your VPC.

    + *
  • + *
  • + *

    + * spot-instance-request-id - The ID of the Spot Instance + * request.

    + *
  • + *
  • + *

    + * state-reason-code - The reason code for the state change.

    + *
  • + *
  • + *

    + * state-reason-message - A message that describes the state + * change.

    + *
  • + *
  • + *

    + * subnet-id - The ID of the subnet for the instance.

    + *
  • + *
  • + *

    + * tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. + * For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    + *
  • + *
  • + *

    + * tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.

    + *
  • + *
  • + *

    + * tenancy - The tenancy of an instance (dedicated | + * default | host).

    + *
  • + *
  • + *

    + * tpm-support - Indicates if the instance is configured for + * NitroTPM support (v2.0).

    + *
  • + *
  • + *

    + * usage-operation - The usage operation value for the instance + * (RunInstances | RunInstances:00g0 | + * RunInstances:0010 | RunInstances:1010 | + * RunInstances:1014 | RunInstances:1110 | + * RunInstances:0014 | RunInstances:0210 | + * RunInstances:0110 | RunInstances:0100 | + * RunInstances:0004 | RunInstances:0200 | + * RunInstances:000g | RunInstances:0g00 | + * RunInstances:0002 | RunInstances:0800 | + * RunInstances:0102 | RunInstances:0006 | + * RunInstances:0202).

    + *
  • + *
  • + *

    + * usage-operation-update-time - The time that the usage operation + * was last updated, for example, 2022-09-15T17:15:20.000Z.

    + *
  • + *
  • + *

    + * virtualization-type - The virtualization type of the instance + * (paravirtual | hvm).

    + *
  • + *
  • + *

    + * vpc-id - The ID of the VPC that the instance is running in.

    + *
  • + *
+ */ + Filters?: Filter[]; + + /** + * @public + *

The instance IDs.

+ *

Default: Describes all your instances.

+ */ + InstanceIds?: string[]; + + /** + * @public + *

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 + *

The maximum number of items to return for this request. + * To get the next page of items, make another request with the token returned in the output. + * For more information, see Pagination.

+ *

You cannot specify this parameter and the instance IDs parameter in the same request.

+ */ + MaxResults?: number; + + /** + * @public + *

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

+ */ + NextToken?: string; +} + +/** + * @public + *

Describes the instance's Capacity Reservation targeting preferences. The action returns the + * capacityReservationPreference response element if the instance is + * configured to run in On-Demand capacity, or if it is configured in run in any + * open Capacity Reservation that has matching attributes (instance type, platform, + * Availability Zone). The action returns the capacityReservationTarget + * response element if the instance explicily targets a specific Capacity Reservation or Capacity Reservation group.

+ */ +export interface CapacityReservationSpecificationResponse { + /** + * @public + *

Describes the instance's Capacity Reservation preferences. Possible preferences include:

+ *
    + *
  • + *

    + * open - The instance can run in any open Capacity Reservation that + * has matching attributes (instance type, platform, Availability Zone).

    + *
  • + *
  • + *

    + * none - The instance avoids running in a Capacity Reservation even if one is + * available. The instance runs in On-Demand capacity.

    + *
  • + *
+ */ + CapacityReservationPreference?: CapacityReservationPreference; + + /** + * @public + *

Information about the targeted Capacity Reservation or Capacity Reservation group.

+ */ + CapacityReservationTarget?: CapacityReservationTargetResponse; +} + +/** + * @public + *

The CPU options for the instance.

+ */ +export interface CpuOptions { + /** + * @public + *

The number of CPU cores for the instance.

+ */ + CoreCount?: number; + + /** + * @public + *

The number of threads per CPU core.

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

Indicates whether the instance is enabled for AMD SEV-SNP. For more information, see + * AMD SEV-SNP.

+ */ + AmdSevSnp?: AmdSevSnpSpecification; +} + +/** + * @public + * @enum + */ +export const InstanceBootModeValues = { + legacy_bios: "legacy-bios", + uefi: "uefi", +} as const; + +/** + * @public + */ +export type InstanceBootModeValues = (typeof InstanceBootModeValues)[keyof typeof InstanceBootModeValues]; + /** * @public *

Describes the association between an instance and an Elastic Graphics accelerator.

@@ -203,6 +999,7 @@ export interface HibernationOptions { * @enum */ export const InstanceLifecycleType = { + capacity_block: "capacity-block", scheduled: "scheduled", spot: "spot", } as const; @@ -2689,6 +3486,7 @@ export type RootDeviceType = (typeof RootDeviceType)[keyof typeof RootDeviceType * @enum */ export const UsageClassType = { + capacity_block: "capacity-block", on_demand: "on-demand", spot: "spot", } as const; @@ -12180,138 +12978,6 @@ export interface DescribeTransitGatewayVpcAttachmentsResult { NextToken?: string; } -/** - * @public - */ -export interface DescribeTrunkInterfaceAssociationsRequest { - /** - * @public - *

The IDs of the associations.

- */ - AssociationIds?: string[]; - - /** - * @public - *

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 - *

One or more filters.

- *
    - *
  • - *

    - * gre-key - The ID of a trunk interface association.

    - *
  • - *
  • - *

    - * interface-protocol - The interface protocol. Valid values are VLAN and GRE.

    - *
  • - *
- */ - Filters?: Filter[]; - - /** - * @public - *

The token for the next page of results.

- */ - NextToken?: string; - - /** - * @public - *

The maximum number of results to return with a single call. - * To retrieve the remaining results, make another call with the returned nextToken value.

- */ - MaxResults?: number; -} - -/** - * @public - */ -export interface DescribeTrunkInterfaceAssociationsResult { - /** - * @public - *

Information about the trunk associations.

- */ - InterfaceAssociations?: TrunkInterfaceAssociation[]; - - /** - * @public - *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

- */ - NextToken?: string; -} - -/** - * @public - */ -export interface DescribeVerifiedAccessEndpointsRequest { - /** - * @public - *

The ID of the Verified Access endpoint.

- */ - VerifiedAccessEndpointIds?: string[]; - - /** - * @public - *

The ID of the Verified Access instance.

- */ - VerifiedAccessInstanceId?: string; - - /** - * @public - *

The ID of the Verified Access group.

- */ - VerifiedAccessGroupId?: string; - - /** - * @public - *

The maximum number of results to return with a single call. - * To retrieve the remaining results, make another call with the returned nextToken value.

- */ - MaxResults?: number; - - /** - * @public - *

The token for the next page of results.

- */ - NextToken?: string; - - /** - * @public - *

One or more filters. Filter names and values are case-sensitive.

- */ - Filters?: Filter[]; - - /** - * @public - *

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 - */ -export interface DescribeVerifiedAccessEndpointsResult { - /** - * @public - *

The ID of the Verified Access endpoint.

- */ - VerifiedAccessEndpoints?: VerifiedAccessEndpoint[]; - - /** - * @public - *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

- */ - NextToken?: string; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 1c9330764cdc..bd79a79fdc1c 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -22,6 +22,7 @@ import { TransitGatewayAttachmentResourceType, TransitGatewayMulticastDomainAssociations, TransitGatewayPolicyTableAssociation, + TrunkInterfaceAssociation, VerifiedAccessInstance, VerifiedAccessTrustProvider, VerifiedAccessTrustProviderFilterSensitiveLog, @@ -53,7 +54,7 @@ import { SSEType, State, SubnetCidrReservation, - TransitGatewayPrefixListReference, + VerifiedAccessEndpoint, VerifiedAccessGroup, Volume, VpcEndpoint, @@ -80,6 +81,138 @@ import { } from "./models_3"; import { AnalysisStatus, ArchitectureType } from "./models_4"; +/** + * @public + */ +export interface DescribeTrunkInterfaceAssociationsRequest { + /** + * @public + *

The IDs of the associations.

+ */ + AssociationIds?: string[]; + + /** + * @public + *

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 + *

One or more filters.

+ *
    + *
  • + *

    + * gre-key - The ID of a trunk interface association.

    + *
  • + *
  • + *

    + * interface-protocol - The interface protocol. Valid values are VLAN and GRE.

    + *
  • + *
+ */ + Filters?: Filter[]; + + /** + * @public + *

The token for the next page of results.

+ */ + NextToken?: string; + + /** + * @public + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; +} + +/** + * @public + */ +export interface DescribeTrunkInterfaceAssociationsResult { + /** + * @public + *

Information about the trunk associations.

+ */ + InterfaceAssociations?: TrunkInterfaceAssociation[]; + + /** + * @public + *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface DescribeVerifiedAccessEndpointsRequest { + /** + * @public + *

The ID of the Verified Access endpoint.

+ */ + VerifiedAccessEndpointIds?: string[]; + + /** + * @public + *

The ID of the Verified Access instance.

+ */ + VerifiedAccessInstanceId?: string; + + /** + * @public + *

The ID of the Verified Access group.

+ */ + VerifiedAccessGroupId?: string; + + /** + * @public + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; + + /** + * @public + *

The token for the next page of results.

+ */ + NextToken?: string; + + /** + * @public + *

One or more filters. Filter names and values are case-sensitive.

+ */ + Filters?: Filter[]; + + /** + * @public + *

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 + */ +export interface DescribeVerifiedAccessEndpointsResult { + /** + * @public + *

The ID of the Verified Access endpoint.

+ */ + VerifiedAccessEndpoints?: VerifiedAccessEndpoint[]; + + /** + * @public + *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

+ */ + NextToken?: string; +} + /** * @public */ @@ -8331,158 +8464,6 @@ export interface TransitGatewayPolicyTableEntry { TargetRouteTableId?: string; } -/** - * @public - */ -export interface GetTransitGatewayPolicyTableEntriesResult { - /** - * @public - *

The entries for the transit gateway policy table.

- */ - TransitGatewayPolicyTableEntries?: TransitGatewayPolicyTableEntry[]; -} - -/** - * @public - */ -export interface GetTransitGatewayPrefixListReferencesRequest { - /** - * @public - *

The ID of the transit gateway route table.

- */ - TransitGatewayRouteTableId: string | undefined; - - /** - * @public - *

One or more filters. The possible values are:

- *
    - *
  • - *

    - * attachment.resource-id - The ID of the resource for the attachment.

    - *
  • - *
  • - *

    - * attachment.resource-type - The type of resource for the - * attachment. Valid values are vpc | vpn | - * direct-connect-gateway | peering.

    - *
  • - *
  • - *

    - * attachment.transit-gateway-attachment-id - The ID of the attachment.

    - *
  • - *
  • - *

    - * is-blackhole - Whether traffic matching the route is blocked (true | false).

    - *
  • - *
  • - *

    - * prefix-list-id - The ID of the prefix list.

    - *
  • - *
  • - *

    - * prefix-list-owner-id - The ID of the owner of the prefix list.

    - *
  • - *
  • - *

    - * state - The state of the prefix list reference (pending | available | modifying | deleting).

    - *
  • - *
- */ - Filters?: Filter[]; - - /** - * @public - *

The maximum number of results to return with a single call. - * To retrieve the remaining results, make another call with the returned nextToken value.

- */ - MaxResults?: number; - - /** - * @public - *

The token for the next page of results.

- */ - NextToken?: string; - - /** - * @public - *

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 - */ -export interface GetTransitGatewayPrefixListReferencesResult { - /** - * @public - *

Information about the prefix list references.

- */ - TransitGatewayPrefixListReferences?: TransitGatewayPrefixListReference[]; - - /** - * @public - *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

- */ - NextToken?: string; -} - -/** - * @public - */ -export interface GetTransitGatewayRouteTableAssociationsRequest { - /** - * @public - *

The ID of the transit gateway route table.

- */ - TransitGatewayRouteTableId: string | undefined; - - /** - * @public - *

One or more filters. The possible values are:

- *
    - *
  • - *

    - * resource-id - The ID of the resource.

    - *
  • - *
  • - *

    - * resource-type - The resource type. Valid values are vpc - * | vpn | direct-connect-gateway | peering - * | connect.

    - *
  • - *
  • - *

    - * transit-gateway-attachment-id - The ID of the attachment.

    - *
  • - *
- */ - Filters?: Filter[]; - - /** - * @public - *

The maximum number of results to return with a single call. - * To retrieve the remaining results, make another call with the returned nextToken value.

- */ - MaxResults?: number; - - /** - * @public - *

The token for the next page of results.

- */ - NextToken?: string; - - /** - * @public - *

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_6.ts b/clients/client-ec2/src/models/models_6.ts index 7260f8ddf653..5528b2e7cd09 100644 --- a/clients/client-ec2/src/models/models_6.ts +++ b/clients/client-ec2/src/models/models_6.ts @@ -12,7 +12,8 @@ import { ApplianceModeSupportValue, AutoPlacement, ByoipCidr, - ClientVpnAuthorizationRuleStatus, + CapacityReservation, + CapacityReservationInstancePlatform, CurrencyCodeValues, DnsSupportValue, EnaSrdSpecification, @@ -22,7 +23,6 @@ import { IamInstanceProfileAssociation, IamInstanceProfileSpecification, InstanceEventWindow, - IpPermission, Ipv6SupportValue, PortRange, RouteTableAssociationState, @@ -157,12 +157,165 @@ import { InstanceFamilyCreditSpecification, IpamResourceCidr, Purchase, + TransitGatewayPolicyTableEntry, TransitGatewayPropagationState, UnlimitedSupportedInstanceFamily, VerifiedAccessInstanceLoggingConfiguration, VolumeModification, } from "./models_5"; +/** + * @public + */ +export interface GetTransitGatewayPolicyTableEntriesResult { + /** + * @public + *

The entries for the transit gateway policy table.

+ */ + TransitGatewayPolicyTableEntries?: TransitGatewayPolicyTableEntry[]; +} + +/** + * @public + */ +export interface GetTransitGatewayPrefixListReferencesRequest { + /** + * @public + *

The ID of the transit gateway route table.

+ */ + TransitGatewayRouteTableId: string | undefined; + + /** + * @public + *

One or more filters. The possible values are:

+ *
    + *
  • + *

    + * attachment.resource-id - The ID of the resource for the attachment.

    + *
  • + *
  • + *

    + * attachment.resource-type - The type of resource for the + * attachment. Valid values are vpc | vpn | + * direct-connect-gateway | peering.

    + *
  • + *
  • + *

    + * attachment.transit-gateway-attachment-id - The ID of the attachment.

    + *
  • + *
  • + *

    + * is-blackhole - Whether traffic matching the route is blocked (true | false).

    + *
  • + *
  • + *

    + * prefix-list-id - The ID of the prefix list.

    + *
  • + *
  • + *

    + * prefix-list-owner-id - The ID of the owner of the prefix list.

    + *
  • + *
  • + *

    + * state - The state of the prefix list reference (pending | available | modifying | deleting).

    + *
  • + *
+ */ + Filters?: Filter[]; + + /** + * @public + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; + + /** + * @public + *

The token for the next page of results.

+ */ + NextToken?: string; + + /** + * @public + *

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 + */ +export interface GetTransitGatewayPrefixListReferencesResult { + /** + * @public + *

Information about the prefix list references.

+ */ + TransitGatewayPrefixListReferences?: TransitGatewayPrefixListReference[]; + + /** + * @public + *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface GetTransitGatewayRouteTableAssociationsRequest { + /** + * @public + *

The ID of the transit gateway route table.

+ */ + TransitGatewayRouteTableId: string | undefined; + + /** + * @public + *

One or more filters. The possible values are:

+ *
    + *
  • + *

    + * resource-id - The ID of the resource.

    + *
  • + *
  • + *

    + * resource-type - The resource type. Valid values are vpc + * | vpn | direct-connect-gateway | peering + * | connect.

    + *
  • + *
  • + *

    + * transit-gateway-attachment-id - The ID of the attachment.

    + *
  • + *
+ */ + Filters?: Filter[]; + + /** + * @public + *

The maximum number of results to return with a single call. + * To retrieve the remaining results, make another call with the returned nextToken value.

+ */ + MaxResults?: number; + + /** + * @public + *

The token for the next page of results.

+ */ + NextToken?: string; + + /** + * @public + *

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 *

Describes an association between a route table and a resource attachment.

@@ -6892,6 +7045,46 @@ export interface ProvisionPublicIpv4PoolCidrResult { PoolAddressRange?: PublicIpv4PoolRange; } +/** + * @public + */ +export interface PurchaseCapacityBlockRequest { + /** + * @public + *

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 + *

The tags to apply to the Capacity Block during launch.

+ */ + TagSpecifications?: TagSpecification[]; + + /** + * @public + *

The ID of the Capacity Block offering.

+ */ + CapacityBlockOfferingId: string | undefined; + + /** + * @public + *

The type of operating system for which to reserve capacity.

+ */ + InstancePlatform: CapacityReservationInstancePlatform | undefined; +} + +/** + * @public + */ +export interface PurchaseCapacityBlockResult { + /** + * @public + *

The Capacity Reservation.

+ */ + CapacityReservation?: CapacityReservation; +} + /** * @public */ @@ -9004,254 +9197,6 @@ export interface RestoreSnapshotTierRequest { DryRun?: boolean; } -/** - * @public - */ -export interface RestoreSnapshotTierResult { - /** - * @public - *

The ID of the snapshot.

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

The date and time when the snapshot restore process started.

- */ - RestoreStartTime?: Date; - - /** - * @public - *

For temporary restores only. The number of days for which the archived snapshot - * is temporarily restored.

- */ - RestoreDuration?: number; - - /** - * @public - *

Indicates whether the snapshot is permanently restored. true indicates a permanent - * restore. false indicates a temporary restore.

- */ - IsPermanentRestore?: boolean; -} - -/** - * @public - */ -export interface RevokeClientVpnIngressRequest { - /** - * @public - *

The ID of the Client VPN endpoint with which the authorization rule is associated.

- */ - ClientVpnEndpointId: string | undefined; - - /** - * @public - *

The IPv4 address range, in CIDR notation, of the network for which access is being removed.

- */ - TargetNetworkCidr: string | undefined; - - /** - * @public - *

The ID of the Active Directory group for which to revoke access.

- */ - AccessGroupId?: string; - - /** - * @public - *

Indicates whether access should be revoked for all clients.

- */ - RevokeAllGroups?: boolean; - - /** - * @public - *

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 - */ -export interface RevokeClientVpnIngressResult { - /** - * @public - *

The current state of the authorization rule.

- */ - Status?: ClientVpnAuthorizationRuleStatus; -} - -/** - * @public - */ -export interface RevokeSecurityGroupEgressRequest { - /** - * @public - *

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 - *

The ID of the security group.

- */ - GroupId: string | undefined; - - /** - * @public - *

The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

- */ - IpPermissions?: IpPermission[]; - - /** - * @public - *

The IDs of the security group rules.

- */ - SecurityGroupRuleIds?: string[]; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify the CIDR.

- */ - CidrIp?: string; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify the port.

- */ - FromPort?: number; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify the protocol name or - * number.

- */ - IpProtocol?: string; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify the port.

- */ - ToPort?: number; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify a - * destination security group.

- */ - SourceSecurityGroupName?: string; - - /** - * @public - *

Not supported. Use a set of IP permissions to specify a destination security - * group.

- */ - SourceSecurityGroupOwnerId?: string; -} - -/** - * @public - */ -export interface RevokeSecurityGroupEgressResult { - /** - * @public - *

Returns true if the request succeeds; otherwise, returns an error.

- */ - Return?: boolean; - - /** - * @public - *

The outbound rules that were unknown to the service. In some cases, - * unknownIpPermissionSet might be in a different format from the request - * parameter.

- */ - UnknownIpPermissions?: IpPermission[]; -} - -/** - * @public - */ -export interface RevokeSecurityGroupIngressRequest { - /** - * @public - *

The CIDR IP address range. You can't specify this parameter when specifying a source security group.

- */ - CidrIp?: string; - - /** - * @public - *

If the protocol is TCP or UDP, this is the start of the port range. - * If the protocol is ICMP, this is the type number. A value of -1 indicates all ICMP types.

- */ - FromPort?: number; - - /** - * @public - *

The ID of the security group.

- */ - GroupId?: string; - - /** - * @public - *

[Default VPC] The name of the security group. You must specify either the - * security group ID or the security group name in the request. For security groups in a - * nondefault VPC, you must specify the security group ID.

- */ - GroupName?: string; - - /** - * @public - *

The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

- */ - IpPermissions?: IpPermission[]; - - /** - * @public - *

The IP protocol name (tcp, udp, icmp) or number - * (see Protocol Numbers). - * Use -1 to specify all.

- */ - IpProtocol?: string; - - /** - * @public - *

[Default VPC] The name of the source security group. You can't specify this parameter - * in combination with the following parameters: the CIDR IP address range, the start of the port range, - * the IP protocol, and the end of the port range. The source security group must be in the same VPC. - * To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

- */ - SourceSecurityGroupName?: string; - - /** - * @public - *

Not supported.

- */ - SourceSecurityGroupOwnerId?: string; - - /** - * @public - *

If the protocol is TCP or UDP, this is the end of the port range. - * If the protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

- */ - ToPort?: number; - - /** - * @public - *

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 - *

The IDs of the security group rules.

- */ - SecurityGroupRuleIds?: string[]; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_7.ts b/clients/client-ec2/src/models/models_7.ts index 550f9ce26ab9..e8a5f12fb037 100644 --- a/clients/client-ec2/src/models/models_7.ts +++ b/clients/client-ec2/src/models/models_7.ts @@ -4,6 +4,7 @@ import { SENSITIVE_STRING } from "@smithy/smithy-client"; import { _InstanceType, ByoipCidr, + ClientVpnAuthorizationRuleStatus, IamInstanceProfileSpecification, IpPermission, NatGatewayAddress, @@ -40,6 +41,254 @@ import { } from "./models_4"; import { CapacityReservationSpecification, InstanceMonitoring } from "./models_6"; +/** + * @public + */ +export interface RestoreSnapshotTierResult { + /** + * @public + *

The ID of the snapshot.

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

The date and time when the snapshot restore process started.

+ */ + RestoreStartTime?: Date; + + /** + * @public + *

For temporary restores only. The number of days for which the archived snapshot + * is temporarily restored.

+ */ + RestoreDuration?: number; + + /** + * @public + *

Indicates whether the snapshot is permanently restored. true indicates a permanent + * restore. false indicates a temporary restore.

+ */ + IsPermanentRestore?: boolean; +} + +/** + * @public + */ +export interface RevokeClientVpnIngressRequest { + /** + * @public + *

The ID of the Client VPN endpoint with which the authorization rule is associated.

+ */ + ClientVpnEndpointId: string | undefined; + + /** + * @public + *

The IPv4 address range, in CIDR notation, of the network for which access is being removed.

+ */ + TargetNetworkCidr: string | undefined; + + /** + * @public + *

The ID of the Active Directory group for which to revoke access.

+ */ + AccessGroupId?: string; + + /** + * @public + *

Indicates whether access should be revoked for all clients.

+ */ + RevokeAllGroups?: boolean; + + /** + * @public + *

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 + */ +export interface RevokeClientVpnIngressResult { + /** + * @public + *

The current state of the authorization rule.

+ */ + Status?: ClientVpnAuthorizationRuleStatus; +} + +/** + * @public + */ +export interface RevokeSecurityGroupEgressRequest { + /** + * @public + *

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 + *

The ID of the security group.

+ */ + GroupId: string | undefined; + + /** + * @public + *

The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

+ */ + IpPermissions?: IpPermission[]; + + /** + * @public + *

The IDs of the security group rules.

+ */ + SecurityGroupRuleIds?: string[]; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify the CIDR.

+ */ + CidrIp?: string; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify the port.

+ */ + FromPort?: number; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify the protocol name or + * number.

+ */ + IpProtocol?: string; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify the port.

+ */ + ToPort?: number; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify a + * destination security group.

+ */ + SourceSecurityGroupName?: string; + + /** + * @public + *

Not supported. Use a set of IP permissions to specify a destination security + * group.

+ */ + SourceSecurityGroupOwnerId?: string; +} + +/** + * @public + */ +export interface RevokeSecurityGroupEgressResult { + /** + * @public + *

Returns true if the request succeeds; otherwise, returns an error.

+ */ + Return?: boolean; + + /** + * @public + *

The outbound rules that were unknown to the service. In some cases, + * unknownIpPermissionSet might be in a different format from the request + * parameter.

+ */ + UnknownIpPermissions?: IpPermission[]; +} + +/** + * @public + */ +export interface RevokeSecurityGroupIngressRequest { + /** + * @public + *

The CIDR IP address range. You can't specify this parameter when specifying a source security group.

+ */ + CidrIp?: string; + + /** + * @public + *

If the protocol is TCP or UDP, this is the start of the port range. + * If the protocol is ICMP, this is the type number. A value of -1 indicates all ICMP types.

+ */ + FromPort?: number; + + /** + * @public + *

The ID of the security group.

+ */ + GroupId?: string; + + /** + * @public + *

[Default VPC] The name of the security group. You must specify either the + * security group ID or the security group name in the request. For security groups in a + * nondefault VPC, you must specify the security group ID.

+ */ + GroupName?: string; + + /** + * @public + *

The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

+ */ + IpPermissions?: IpPermission[]; + + /** + * @public + *

The IP protocol name (tcp, udp, icmp) or number + * (see Protocol Numbers). + * Use -1 to specify all.

+ */ + IpProtocol?: string; + + /** + * @public + *

[Default VPC] The name of the source security group. You can't specify this parameter + * in combination with the following parameters: the CIDR IP address range, the start of the port range, + * the IP protocol, and the end of the port range. The source security group must be in the same VPC. + * To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

+ */ + SourceSecurityGroupName?: string; + + /** + * @public + *

Not supported.

+ */ + SourceSecurityGroupOwnerId?: string; + + /** + * @public + *

If the protocol is TCP or UDP, this is the end of the port range. + * If the protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes.

+ */ + ToPort?: number; + + /** + * @public + *

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 + *

The IDs of the security group rules.

+ */ + SecurityGroupRuleIds?: string[]; +} + /** * @public */ diff --git a/clients/client-ec2/src/pagination/DescribeCapacityBlockOfferingsPaginator.ts b/clients/client-ec2/src/pagination/DescribeCapacityBlockOfferingsPaginator.ts new file mode 100644 index 000000000000..db83c69f3397 --- /dev/null +++ b/clients/client-ec2/src/pagination/DescribeCapacityBlockOfferingsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + DescribeCapacityBlockOfferingsCommand, + DescribeCapacityBlockOfferingsCommandInput, + DescribeCapacityBlockOfferingsCommandOutput, +} from "../commands/DescribeCapacityBlockOfferingsCommand"; +import { EC2Client } from "../EC2Client"; +import { EC2PaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: EC2Client, + input: DescribeCapacityBlockOfferingsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new DescribeCapacityBlockOfferingsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateDescribeCapacityBlockOfferings( + config: EC2PaginationConfiguration, + input: DescribeCapacityBlockOfferingsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: DescribeCapacityBlockOfferingsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof EC2Client) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected EC2 | EC2Client"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-ec2/src/pagination/index.ts b/clients/client-ec2/src/pagination/index.ts index 0fa2b9b473be..29cf9dddfd9c 100644 --- a/clients/client-ec2/src/pagination/index.ts +++ b/clients/client-ec2/src/pagination/index.ts @@ -6,6 +6,8 @@ export * from "./DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator"; export * from "./DescribeByoipCidrsPaginator"; +export * from "./DescribeCapacityBlockOfferingsPaginator"; + export * from "./DescribeCapacityReservationFleetsPaginator"; export * from "./DescribeCapacityReservationsPaginator"; @@ -15,10 +17,9 @@ export * from "./DescribeCarrierGatewaysPaginator"; export * from "./DescribeClassicLinkInstancesPaginator"; export * from "./DescribeClientVpnAuthorizationRulesPaginator"; - -export * from "./DescribeClientVpnConnectionsPaginator"; // smithy-typescript generated code export * from "./Interfaces"; +export * from "./DescribeClientVpnConnectionsPaginator"; export * from "./DescribeClientVpnEndpointsPaginator"; export * from "./DescribeClientVpnRoutesPaginator"; export * from "./DescribeClientVpnTargetNetworksPaginator"; diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 81e2456c3c1a..967e282d5457 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -745,6 +745,10 @@ import { DescribeBundleTasksCommandOutput, } from "../commands/DescribeBundleTasksCommand"; import { DescribeByoipCidrsCommandInput, DescribeByoipCidrsCommandOutput } from "../commands/DescribeByoipCidrsCommand"; +import { + DescribeCapacityBlockOfferingsCommandInput, + DescribeCapacityBlockOfferingsCommandOutput, +} from "../commands/DescribeCapacityBlockOfferingsCommand"; import { DescribeCapacityReservationFleetsCommandInput, DescribeCapacityReservationFleetsCommandOutput, @@ -1847,6 +1851,10 @@ import { ProvisionPublicIpv4PoolCidrCommandInput, ProvisionPublicIpv4PoolCidrCommandOutput, } from "../commands/ProvisionPublicIpv4PoolCidrCommand"; +import { + PurchaseCapacityBlockCommandInput, + PurchaseCapacityBlockCommandOutput, +} from "../commands/PurchaseCapacityBlockCommand"; import { PurchaseHostReservationCommandInput, PurchaseHostReservationCommandOutput, @@ -2216,7 +2224,6 @@ import { EnaSrdUdpSpecification, Explanation, FailedCapacityReservationFleetCancellationResult, - FederatedAuthenticationRequest, FirewallStatefulRule, FirewallStatelessRule, FleetCapacityReservation, @@ -2402,6 +2409,7 @@ import { ExportTask, ExportToS3Task, ExportToS3TaskSpecification, + FederatedAuthenticationRequest, FilterPortRange, FleetLaunchTemplateConfigRequest, FleetLaunchTemplateOverrides, @@ -2505,7 +2513,6 @@ import { PathFilter, PathRequestFilter, Placement, - PlacementGroup, PlacementResponse, PrivateDnsNameOptionsOnLaunch, PrivateIpAddressSpecification, @@ -2690,7 +2697,6 @@ import { DeleteNetworkInterfacePermissionResult, DeleteNetworkInterfaceRequest, DeletePlacementGroupRequest, - DeletePublicIpv4PoolRequest, DnsEntry, DnsOptions, DnsOptionsSpecification, @@ -2711,6 +2717,7 @@ import { Phase2EncryptionAlgorithmsRequestListValue, Phase2IntegrityAlgorithmsListValue, Phase2IntegrityAlgorithmsRequestListValue, + PlacementGroup, PriceScheduleSpecification, PrivateDnsNameConfiguration, PropagatingVgw, @@ -2781,9 +2788,9 @@ import { AvailabilityZone, AvailabilityZoneMessage, AvailableCapacity, + CapacityBlockOffering, CapacityReservationFleet, CapacityReservationOptions, - CapacityReservationSpecificationResponse, CertificateAuthentication, ClassicLinkInstance, ClientConnectResponseOptions, @@ -2796,7 +2803,7 @@ import { ClientVpnRoute, ConnectionLogResponseOptions, ConversionTask, - CpuOptions, + DeletePublicIpv4PoolRequest, DeletePublicIpv4PoolResult, DeleteQueuedReservedInstancesError, DeleteQueuedReservedInstancesRequest, @@ -2893,6 +2900,8 @@ import { DescribeBundleTasksResult, DescribeByoipCidrsRequest, DescribeByoipCidrsResult, + DescribeCapacityBlockOfferingsRequest, + DescribeCapacityBlockOfferingsResult, DescribeCapacityReservationFleetsRequest, DescribeCapacityReservationFleetsResult, DescribeCapacityReservationsRequest, @@ -2975,7 +2984,6 @@ import { DescribeInstanceEventNotificationAttributesResult, DescribeInstanceEventWindowsRequest, DescribeInstanceEventWindowsResult, - DescribeInstancesRequest, DestinationOptionsResponse, DirectoryServiceAuthentication, DiskImageDescription, @@ -3042,9 +3050,12 @@ import { import { ArchitectureType, BootModeType, + CapacityReservationSpecificationResponse, ClassicLoadBalancer, ClassicLoadBalancersConfig, + CpuOptions, CreateVolumePermission, + DescribeInstancesRequest, DescribeInstancesResult, DescribeInstanceStatusRequest, DescribeInstanceStatusResult, @@ -3190,10 +3201,6 @@ import { DescribeTransitGatewaysResult, DescribeTransitGatewayVpcAttachmentsRequest, DescribeTransitGatewayVpcAttachmentsResult, - DescribeTrunkInterfaceAssociationsRequest, - DescribeTrunkInterfaceAssociationsResult, - DescribeVerifiedAccessEndpointsRequest, - DescribeVerifiedAccessEndpointsResult, DiskInfo, EbsInfo, EbsOptimizedInfo, @@ -3309,6 +3316,10 @@ import { CoipAddressUsage, DataQuery, DataResponse, + DescribeTrunkInterfaceAssociationsRequest, + DescribeTrunkInterfaceAssociationsResult, + DescribeVerifiedAccessEndpointsRequest, + DescribeVerifiedAccessEndpointsResult, DescribeVerifiedAccessGroupsRequest, DescribeVerifiedAccessGroupsResult, DescribeVerifiedAccessInstanceLoggingConfigurationsRequest, @@ -3534,10 +3545,6 @@ import { GetTransitGatewayPolicyTableAssociationsRequest, GetTransitGatewayPolicyTableAssociationsResult, GetTransitGatewayPolicyTableEntriesRequest, - GetTransitGatewayPolicyTableEntriesResult, - GetTransitGatewayPrefixListReferencesRequest, - GetTransitGatewayPrefixListReferencesResult, - GetTransitGatewayRouteTableAssociationsRequest, InstanceEventWindowDisassociationRequest, InstanceFamilyCreditSpecification, InstanceRequirementsWithMetadataRequest, @@ -3594,6 +3601,10 @@ import { DiskImageDetail, DnsServersOptionsModifyStructure, EbsInstanceBlockDeviceSpecification, + GetTransitGatewayPolicyTableEntriesResult, + GetTransitGatewayPrefixListReferencesRequest, + GetTransitGatewayPrefixListReferencesResult, + GetTransitGatewayRouteTableAssociationsRequest, GetTransitGatewayRouteTableAssociationsResult, GetTransitGatewayRouteTablePropagationsRequest, GetTransitGatewayRouteTablePropagationsResult, @@ -3775,6 +3786,8 @@ import { ProvisionIpamPoolCidrResult, ProvisionPublicIpv4PoolCidrRequest, ProvisionPublicIpv4PoolCidrResult, + PurchaseCapacityBlockRequest, + PurchaseCapacityBlockResult, PurchaseHostReservationRequest, PurchaseHostReservationResult, PurchaseRequest, @@ -3848,12 +3861,6 @@ import { RestoreSnapshotFromRecycleBinRequest, RestoreSnapshotFromRecycleBinResult, RestoreSnapshotTierRequest, - RestoreSnapshotTierResult, - RevokeClientVpnIngressRequest, - RevokeClientVpnIngressResult, - RevokeSecurityGroupEgressRequest, - RevokeSecurityGroupEgressResult, - RevokeSecurityGroupIngressRequest, SecurityGroupRuleRequest, SecurityGroupRuleUpdate, SnapshotDiskContainer, @@ -3888,6 +3895,12 @@ import { LaunchTemplateSpecification, LicenseConfigurationRequest, PrivateDnsNameOptionsRequest, + RestoreSnapshotTierResult, + RevokeClientVpnIngressRequest, + RevokeClientVpnIngressResult, + RevokeSecurityGroupEgressRequest, + RevokeSecurityGroupEgressResult, + RevokeSecurityGroupIngressRequest, RevokeSecurityGroupIngressResult, RunInstancesRequest, RunScheduledInstancesRequest, @@ -7783,6 +7796,23 @@ export const se_DescribeByoipCidrsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2DescribeCapacityBlockOfferingsCommand + */ +export const se_DescribeCapacityBlockOfferingsCommand = async ( + input: DescribeCapacityBlockOfferingsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DescribeCapacityBlockOfferingsRequest(input, context), + Action: "DescribeCapacityBlockOfferings", + Version: "2016-11-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2DescribeCapacityReservationFleetsCommand */ @@ -13104,6 +13134,23 @@ export const se_ProvisionPublicIpv4PoolCidrCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2PurchaseCapacityBlockCommand + */ +export const se_PurchaseCapacityBlockCommand = async ( + input: PurchaseCapacityBlockCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_PurchaseCapacityBlockRequest(input, context), + Action: "PurchaseCapacityBlock", + Version: "2016-11-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2PurchaseHostReservationCommand */ @@ -23100,6 +23147,46 @@ const de_DescribeByoipCidrsCommandError = async ( }); }; +/** + * deserializeAws_ec2DescribeCapacityBlockOfferingsCommand + */ +export const de_DescribeCapacityBlockOfferingsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DescribeCapacityBlockOfferingsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeCapacityBlockOfferingsResult(data, context); + const response: DescribeCapacityBlockOfferingsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_ec2DescribeCapacityBlockOfferingsCommandError + */ +const de_DescribeCapacityBlockOfferingsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadEc2ErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Errors.Error, + errorCode, + }); +}; + /** * deserializeAws_ec2DescribeCapacityReservationFleetsCommand */ @@ -35569,6 +35656,46 @@ const de_ProvisionPublicIpv4PoolCidrCommandError = async ( }); }; +/** + * deserializeAws_ec2PurchaseCapacityBlockCommand + */ +export const de_PurchaseCapacityBlockCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_PurchaseCapacityBlockCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_PurchaseCapacityBlockResult(data, context); + const response: PurchaseCapacityBlockCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_ec2PurchaseCapacityBlockCommandError + */ +const de_PurchaseCapacityBlockCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadEc2ErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Errors.Error, + errorCode, + }); +}; + /** * deserializeAws_ec2PurchaseHostReservationCommand */ @@ -45773,6 +45900,41 @@ const se_DescribeByoipCidrsRequest = (input: DescribeByoipCidrsRequest, context: return entries; }; +/** + * serializeAws_ec2DescribeCapacityBlockOfferingsRequest + */ +const se_DescribeCapacityBlockOfferingsRequest = ( + input: DescribeCapacityBlockOfferingsRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.DryRun != null) { + entries["DryRun"] = input.DryRun; + } + if (input.InstanceType != null) { + entries["InstanceType"] = input.InstanceType; + } + if (input.InstanceCount != null) { + entries["InstanceCount"] = input.InstanceCount; + } + if (input.StartDateRange != null) { + entries["StartDateRange"] = input.StartDateRange.toISOString().split(".")[0] + "Z"; + } + if (input.EndDateRange != null) { + entries["EndDateRange"] = input.EndDateRange.toISOString().split(".")[0] + "Z"; + } + if (input.CapacityDurationHours != null) { + entries["CapacityDurationHours"] = input.CapacityDurationHours; + } + if (input.NextToken != null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults != null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; + /** * serializeAws_ec2DescribeCapacityReservationFleetsRequest */ @@ -60646,6 +60808,33 @@ const se_PublicIpv4PoolIdStringList = (input: string[], context: __SerdeContext) return entries; }; +/** + * serializeAws_ec2PurchaseCapacityBlockRequest + */ +const se_PurchaseCapacityBlockRequest = (input: PurchaseCapacityBlockRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.DryRun != null) { + entries["DryRun"] = input.DryRun; + } + if (input.TagSpecifications != null) { + const memberEntries = se_TagSpecificationList(input.TagSpecifications, context); + if (input.TagSpecifications?.length === 0) { + entries.TagSpecification = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TagSpecification.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.CapacityBlockOfferingId != null) { + entries["CapacityBlockOfferingId"] = input.CapacityBlockOfferingId; + } + if (input.InstancePlatform != null) { + entries["InstancePlatform"] = input.InstancePlatform; + } + return entries; +}; + /** * serializeAws_ec2PurchaseHostReservationRequest */ @@ -68102,6 +68291,55 @@ const de_CapacityAllocations = (output: any, context: __SerdeContext): CapacityA }); }; +/** + * deserializeAws_ec2CapacityBlockOffering + */ +const de_CapacityBlockOffering = (output: any, context: __SerdeContext): CapacityBlockOffering => { + const contents: any = {}; + if (output["capacityBlockOfferingId"] !== undefined) { + contents.CapacityBlockOfferingId = __expectString(output["capacityBlockOfferingId"]); + } + if (output["instanceType"] !== undefined) { + contents.InstanceType = __expectString(output["instanceType"]); + } + if (output["availabilityZone"] !== undefined) { + contents.AvailabilityZone = __expectString(output["availabilityZone"]); + } + if (output["instanceCount"] !== undefined) { + contents.InstanceCount = __strictParseInt32(output["instanceCount"]) as number; + } + if (output["startDate"] !== undefined) { + contents.StartDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["startDate"])); + } + if (output["endDate"] !== undefined) { + contents.EndDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(output["endDate"])); + } + if (output["capacityBlockDurationHours"] !== undefined) { + contents.CapacityBlockDurationHours = __strictParseInt32(output["capacityBlockDurationHours"]) as number; + } + if (output["upfrontFee"] !== undefined) { + contents.UpfrontFee = __expectString(output["upfrontFee"]); + } + if (output["currencyCode"] !== undefined) { + contents.CurrencyCode = __expectString(output["currencyCode"]); + } + if (output["tenancy"] !== undefined) { + contents.Tenancy = __expectString(output["tenancy"]); + } + return contents; +}; + +/** + * deserializeAws_ec2CapacityBlockOfferingSet + */ +const de_CapacityBlockOfferingSet = (output: any, context: __SerdeContext): CapacityBlockOffering[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CapacityBlockOffering(entry, context); + }); +}; + /** * deserializeAws_ec2CapacityReservation */ @@ -68183,6 +68421,9 @@ const de_CapacityReservation = (output: any, context: __SerdeContext): CapacityR context ); } + if (output["reservationType"] !== undefined) { + contents.ReservationType = __expectString(output["reservationType"]); + } return contents; }; @@ -71689,6 +71930,31 @@ const de_DescribeByoipCidrsResult = (output: any, context: __SerdeContext): Desc return contents; }; +/** + * deserializeAws_ec2DescribeCapacityBlockOfferingsResult + */ +const de_DescribeCapacityBlockOfferingsResult = ( + output: any, + context: __SerdeContext +): DescribeCapacityBlockOfferingsResult => { + const contents: any = {}; + if (output.capacityBlockOfferingSet === "") { + contents.CapacityBlockOfferings = []; + } else if ( + output["capacityBlockOfferingSet"] !== undefined && + output["capacityBlockOfferingSet"]["item"] !== undefined + ) { + contents.CapacityBlockOfferings = de_CapacityBlockOfferingSet( + __getArrayIfSingleItem(output["capacityBlockOfferingSet"]["item"]), + context + ); + } + if (output["nextToken"] !== undefined) { + contents.NextToken = __expectString(output["nextToken"]); + } + return contents; +}; + /** * deserializeAws_ec2DescribeCapacityReservationFleetsResult */ @@ -86662,6 +86928,17 @@ const de_Purchase = (output: any, context: __SerdeContext): Purchase => { return contents; }; +/** + * deserializeAws_ec2PurchaseCapacityBlockResult + */ +const de_PurchaseCapacityBlockResult = (output: any, context: __SerdeContext): PurchaseCapacityBlockResult => { + const contents: any = {}; + if (output["capacityReservation"] !== undefined) { + contents.CapacityReservation = de_CapacityReservation(output["capacityReservation"], context); + } + return contents; +}; + /** * deserializeAws_ec2PurchasedScheduledInstanceSet */ diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index be5834694468..206d399bd7f3 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -2770,6 +2770,9 @@ { "target": "com.amazonaws.ec2#DescribeByoipCidrs" }, + { + "target": "com.amazonaws.ec2#DescribeCapacityBlockOfferings" + }, { "target": "com.amazonaws.ec2#DescribeCapacityReservationFleets" }, @@ -3709,6 +3712,9 @@ { "target": "com.amazonaws.ec2#ProvisionPublicIpv4PoolCidr" }, + { + "target": "com.amazonaws.ec2#PurchaseCapacityBlock" + }, { "target": "com.amazonaws.ec2#PurchaseHostReservation" }, @@ -9970,6 +9976,103 @@ } } }, + "com.amazonaws.ec2#CapacityBlockOffering": { + "type": "structure", + "members": { + "CapacityBlockOfferingId": { + "target": "com.amazonaws.ec2#OfferingId", + "traits": { + "aws.protocols#ec2QueryName": "CapacityBlockOfferingId", + "smithy.api#documentation": "

The ID of the Capacity Block offering.

", + "smithy.api#xmlName": "capacityBlockOfferingId" + } + }, + "InstanceType": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "InstanceType", + "smithy.api#documentation": "

The instance type of the Capacity Block offering.

", + "smithy.api#xmlName": "instanceType" + } + }, + "AvailabilityZone": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "AvailabilityZone", + "smithy.api#documentation": "

The Availability Zone of the Capacity Block offering.

", + "smithy.api#xmlName": "availabilityZone" + } + }, + "InstanceCount": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "InstanceCount", + "smithy.api#documentation": "

The number of instances in the Capacity Block offering.

", + "smithy.api#xmlName": "instanceCount" + } + }, + "StartDate": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "StartDate", + "smithy.api#documentation": "

The start date of the Capacity Block offering.

", + "smithy.api#xmlName": "startDate" + } + }, + "EndDate": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "aws.protocols#ec2QueryName": "EndDate", + "smithy.api#documentation": "

The end date of the Capacity Block offering.

", + "smithy.api#xmlName": "endDate" + } + }, + "CapacityBlockDurationHours": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "CapacityBlockDurationHours", + "smithy.api#documentation": "

The amount of time of the Capacity Block reservation in hours.

", + "smithy.api#xmlName": "capacityBlockDurationHours" + } + }, + "UpfrontFee": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "UpfrontFee", + "smithy.api#documentation": "

The total price to be paid up front.

", + "smithy.api#xmlName": "upfrontFee" + } + }, + "CurrencyCode": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "CurrencyCode", + "smithy.api#documentation": "

The currency of the payment for the Capacity Block.

", + "smithy.api#xmlName": "currencyCode" + } + }, + "Tenancy": { + "target": "com.amazonaws.ec2#CapacityReservationTenancy", + "traits": { + "aws.protocols#ec2QueryName": "Tenancy", + "smithy.api#documentation": "

The tenancy of the Capacity Block.

", + "smithy.api#xmlName": "tenancy" + } + } + }, + "traits": { + "smithy.api#documentation": "

The recommended Capacity Block that fits your search requirements.

" + } + }, + "com.amazonaws.ec2#CapacityBlockOfferingSet": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#CapacityBlockOffering", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, "com.amazonaws.ec2#CapacityReservation": { "type": "structure", "members": { @@ -10156,6 +10259,14 @@ "smithy.api#documentation": "

Information about instance capacity usage.

", "smithy.api#xmlName": "capacityAllocationSet" } + }, + "ReservationType": { + "target": "com.amazonaws.ec2#CapacityReservationType", + "traits": { + "aws.protocols#ec2QueryName": "ReservationType", + "smithy.api#documentation": "

The type of Capacity Reservation.

", + "smithy.api#xmlName": "reservationType" + } } }, "traits": { @@ -10677,6 +10788,24 @@ "traits": { "smithy.api#enumValue": "failed" } + }, + "scheduled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scheduled" + } + }, + "payment_pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payment-pending" + } + }, + "payment_failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payment-failed" + } } } }, @@ -10741,6 +10870,23 @@ } } }, + "com.amazonaws.ec2#CapacityReservationType": { + "type": "enum", + "members": { + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "CAPACITY_BLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-block" + } + } + } + }, "com.amazonaws.ec2#CarrierGateway": { "type": "structure", "members": { @@ -21208,6 +21354,12 @@ "traits": { "smithy.api#enumValue": "on-demand" } + }, + "CAPACITY_BLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-block" + } } } }, @@ -26516,6 +26668,119 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#DescribeCapacityBlockOfferings": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#DescribeCapacityBlockOfferingsRequest" + }, + "output": { + "target": "com.amazonaws.ec2#DescribeCapacityBlockOfferingsResult" + }, + "traits": { + "smithy.api#documentation": "

Describes Capacity Block offerings available for purchase. With Capacity Blocks, you purchase a specific instance type for a period of time.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "CapacityBlockOfferings", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ec2#DescribeCapacityBlockOfferingsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.ec2#DescribeCapacityBlockOfferingsRequest": { + "type": "structure", + "members": { + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "InstanceType": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The type of instance for which the Capacity Block offering reserves capacity.

", + "smithy.api#required": {} + } + }, + "InstanceCount": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The number of instances for which to reserve capacity.

", + "smithy.api#required": {} + } + }, + "StartDateRange": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "smithy.api#documentation": "

The earliest start date for the Capacity Block offering.

" + } + }, + "EndDateRange": { + "target": "com.amazonaws.ec2#MillisecondDateTime", + "traits": { + "smithy.api#documentation": "

The latest end date for the Capacity Block offering.

" + } + }, + "CapacityDurationHours": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The number of hours for which to reserve Capacity Block.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#documentation": "

The token to use to retrieve the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ec2#DescribeCapacityBlockOfferingsMaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#DescribeCapacityBlockOfferingsResult": { + "type": "structure", + "members": { + "CapacityBlockOfferings": { + "target": "com.amazonaws.ec2#CapacityBlockOfferingSet", + "traits": { + "aws.protocols#ec2QueryName": "CapacityBlockOfferingSet", + "smithy.api#documentation": "

The recommended Capacity Block offering for the dates specified.

", + "smithy.api#xmlName": "capacityBlockOfferingSet" + } + }, + "NextToken": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "NextToken", + "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

", + "smithy.api#xmlName": "nextToken" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#DescribeCapacityReservationFleets": { "type": "operation", "input": { @@ -56925,6 +57190,12 @@ "traits": { "smithy.api#enumValue": "scheduled" } + }, + "capacity_block": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-block" + } } } }, @@ -57864,7 +58135,7 @@ } }, "traits": { - "smithy.api#documentation": "

The attributes for the instance types. When you specify instance attributes, Amazon EC2 will\n identify instance types with these attributes.

\n

You must specify VCpuCount and MemoryMiB. All other attributes\n are optional. Any unspecified optional attribute is set to its default.

\n

When you specify multiple attributes, you get instance types that satisfy all of the\n specified attributes. If you specify multiple values for an attribute, you get instance\n types that satisfy any of the specified values.

\n

To limit the list of instance types from which Amazon EC2 can identify matching instance types, \n you can use one of the following parameters, but not both in the same request:

\n
    \n
  • \n

    \n AllowedInstanceTypes - The instance types to include in the list. All \n other instance types are ignored, even if they match your specified attributes.

    \n
  • \n
  • \n

    \n ExcludedInstanceTypes - The instance types to exclude from the list, \n even if they match your specified attributes.

    \n
  • \n
\n \n

If you specify InstanceRequirements, you can't specify\n InstanceType.

\n

Attribute-based instance type selection is only supported when using Auto Scaling\n groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in\n the launch instance\n wizard or with the RunInstances API, you\n can't specify InstanceRequirements.

\n
\n

For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot\n placement score in the Amazon EC2 User Guide.

" + "smithy.api#documentation": "

The attributes for the instance types. When you specify instance attributes, Amazon EC2 will\n identify instance types with these attributes.

\n

You must specify VCpuCount and MemoryMiB. All other attributes\n are optional. Any unspecified optional attribute is set to its default.

\n

When you specify multiple attributes, you get instance types that satisfy all of the\n specified attributes. If you specify multiple values for an attribute, you get instance\n types that satisfy any of the specified values.

\n

To limit the list of instance types from which Amazon EC2 can identify matching instance types, \n you can use one of the following parameters, but not both in the same request:

\n
    \n
  • \n

    \n AllowedInstanceTypes - The instance types to include in the list. All \n other instance types are ignored, even if they match your specified attributes.

    \n
  • \n
  • \n

    \n ExcludedInstanceTypes - The instance types to exclude from the list, \n even if they match your specified attributes.

    \n
  • \n
\n \n

If you specify InstanceRequirements, you can't specify\n InstanceType.

\n

Attribute-based instance type selection is only supported when using Auto Scaling\n groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in\n the launch instance\n wizard or with the RunInstances API, you\n can't specify InstanceRequirements.

\n
\n

For more information, see Create a mixed instances group using attribute-based instance type selection in\n the Amazon EC2 Auto Scaling User Guide, and also Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot\n placement score in the Amazon EC2 User Guide.

" } }, "com.amazonaws.ec2#InstanceRequirementsRequest": { @@ -69844,6 +70115,12 @@ "traits": { "smithy.api#enumValue": "spot" } + }, + "capacity_block": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-block" + } } } }, @@ -80906,6 +81183,71 @@ "smithy.api#documentation": "

Describes the result of the purchase.

" } }, + "com.amazonaws.ec2#PurchaseCapacityBlock": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#PurchaseCapacityBlockRequest" + }, + "output": { + "target": "com.amazonaws.ec2#PurchaseCapacityBlockResult" + }, + "traits": { + "smithy.api#documentation": "

Purchase the Capacity Block for use with your account. \n\t\t With Capacity Blocks you ensure GPU capacity is available for machine learning (ML) workloads. You must specify the ID of the Capacity Block offering you are purchasing.

" + } + }, + "com.amazonaws.ec2#PurchaseCapacityBlockRequest": { + "type": "structure", + "members": { + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#documentation": "

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.

" + } + }, + "TagSpecifications": { + "target": "com.amazonaws.ec2#TagSpecificationList", + "traits": { + "smithy.api#documentation": "

The tags to apply to the Capacity Block during launch.

", + "smithy.api#xmlName": "TagSpecification" + } + }, + "CapacityBlockOfferingId": { + "target": "com.amazonaws.ec2#OfferingId", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The ID of the Capacity Block offering.

", + "smithy.api#required": {} + } + }, + "InstancePlatform": { + "target": "com.amazonaws.ec2#CapacityReservationInstancePlatform", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

The type of operating system for which to reserve capacity.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#PurchaseCapacityBlockResult": { + "type": "structure", + "members": { + "CapacityReservation": { + "target": "com.amazonaws.ec2#CapacityReservation", + "traits": { + "aws.protocols#ec2QueryName": "CapacityReservation", + "smithy.api#documentation": "

The Capacity Reservation.

", + "smithy.api#xmlName": "capacityReservation" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#PurchaseHostReservation": { "type": "operation", "input": { @@ -98682,6 +99024,12 @@ "traits": { "smithy.api#enumValue": "on-demand" } + }, + "capacity_block": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-block" + } } } },