Skip to content

Commit

Permalink
feat(client-ec2): Amazon EC2 Fleet customers can now override the Blo…
Browse files Browse the repository at this point in the history
…ck Device Mapping specified in the Launch Template when creating a new Fleet request, saving the effort of creating and associating new Launch Templates to customize the Block Device Mapping.
  • Loading branch information
awstools committed Feb 26, 2025
1 parent 95b84bb commit 7ac960d
Show file tree
Hide file tree
Showing 35 changed files with 2,013 additions and 1,099 deletions.
51 changes: 51 additions & 0 deletions clients/client-ec2/src/commands/CreateFleetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
* GroupId: "STRING_VALUE",
* AvailabilityZone: "STRING_VALUE",
* },
* BlockDeviceMappings: [ // FleetBlockDeviceMappingRequestList
* { // FleetBlockDeviceMappingRequest
* DeviceName: "STRING_VALUE",
* VirtualName: "STRING_VALUE",
* Ebs: { // FleetEbsBlockDeviceRequest
* Encrypted: true || false,
* DeleteOnTermination: true || false,
* Iops: Number("int"),
* Throughput: Number("int"),
* KmsKeyId: "STRING_VALUE",
* SnapshotId: "STRING_VALUE",
* VolumeSize: Number("int"),
* VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* },
* NoDevice: "STRING_VALUE",
* },
* ],
* InstanceRequirements: { // InstanceRequirementsRequest
* VCpuCount: { // VCpuCountRangeRequest
* Min: Number("int"), // required
Expand Down Expand Up @@ -303,6 +320,23 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
* // },
* // },
* // ImageId: "STRING_VALUE",
* // BlockDeviceMappings: [ // BlockDeviceMappingResponseList
* // { // BlockDeviceMappingResponse
* // DeviceName: "STRING_VALUE",
* // VirtualName: "STRING_VALUE",
* // Ebs: { // EbsBlockDeviceResponse
* // Encrypted: true || false,
* // DeleteOnTermination: true || false,
* // Iops: Number("int"),
* // Throughput: Number("int"),
* // KmsKeyId: "STRING_VALUE",
* // SnapshotId: "STRING_VALUE",
* // VolumeSize: Number("int"),
* // VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* // },
* // NoDevice: "STRING_VALUE",
* // },
* // ],
* // },
* // },
* // Lifecycle: "spot" || "on-demand",
Expand Down Expand Up @@ -407,6 +441,23 @@ export interface CreateFleetCommandOutput extends CreateFleetResult, __MetadataB
* // },
* // },
* // ImageId: "STRING_VALUE",
* // BlockDeviceMappings: [
* // {
* // DeviceName: "STRING_VALUE",
* // VirtualName: "STRING_VALUE",
* // Ebs: {
* // Encrypted: true || false,
* // DeleteOnTermination: true || false,
* // Iops: Number("int"),
* // Throughput: Number("int"),
* // KmsKeyId: "STRING_VALUE",
* // SnapshotId: "STRING_VALUE",
* // VolumeSize: Number("int"),
* // VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* // },
* // NoDevice: "STRING_VALUE",
* // },
* // ],
* // },
* // },
* // Lifecycle: "spot" || "on-demand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export interface CreateLaunchTemplateCommandOutput extends CreateLaunchTemplateR
* <p>Creates a launch template.</p>
* <p>A launch template contains the parameters to launch an instance. When you launch an
* instance using <a>RunInstances</a>, you can specify a launch template instead
* of providing the launch parameters in the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Launch
* an instance from a launch template</a> in the
* of providing the launch parameters in the request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html">Store
* instance launch parameters in Amazon EC2 launch templates</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>To clone an existing launch template as the basis for a new launch template, use the
* Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. For more
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template">Create a launch template from an existing launch template</a> in the
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#create-launch-template-from-existing-launch-template">Create a launch template from an existing launch template</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface CreateLaunchTemplateVersionCommandOutput extends CreateLaunchTe
* <p>Launch templates are immutable; after you create a launch template, you can't modify
* it. Instead, you can create a new version of the launch template that includes the
* changes that you require.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions">Modify a launch template (manage launch template versions)</a> in the
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html">Modify a launch template (manage launch template versions)</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import {
CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationRequest,
CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResult,
} from "../models/models_1";
import { CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationRequest } from "../models/models_1";
import { CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResult } from "../models/models_2";
import {
de_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommand,
se_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { CreateLocalGatewayRouteTableVpcAssociationRequest } from "../models/models_1";
import { CreateLocalGatewayRouteTableVpcAssociationResult } from "../models/models_2";
import {
CreateLocalGatewayRouteTableVpcAssociationRequest,
CreateLocalGatewayRouteTableVpcAssociationResult,
} from "../models/models_2";
import {
de_CreateLocalGatewayRouteTableVpcAssociationCommand,
se_CreateLocalGatewayRouteTableVpcAssociationCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteCarrierGatewayRequest, DeleteCarrierGatewayResult } from "../models/models_2";
import { DeleteCarrierGatewayRequest, DeleteCarrierGatewayResult } from "../models/models_3";
import { de_DeleteCarrierGatewayCommand, se_DeleteCarrierGatewayCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteClientVpnEndpointRequest, DeleteClientVpnEndpointResult } from "../models/models_2";
import { DeleteClientVpnEndpointRequest, DeleteClientVpnEndpointResult } from "../models/models_3";
import { de_DeleteClientVpnEndpointCommand, se_DeleteClientVpnEndpointCommand } from "../protocols/Aws_ec2";

/**
Expand Down
26 changes: 14 additions & 12 deletions clients/client-ec2/src/commands/DeleteFleetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ export interface DeleteFleetsCommandInput extends DeleteFleetsRequest {}
export interface DeleteFleetsCommandOutput extends DeleteFleetsResult, __MetadataBearer {}

/**
* <p>Deletes the specified EC2 Fleets.</p>
* <p>After you delete an EC2 Fleet, it launches no new instances.</p>
* <p>You must also specify whether a deleted EC2 Fleet should terminate its instances. If you
* choose to terminate the instances, the EC2 Fleet enters the <code>deleted_terminating</code>
* state. Otherwise, the EC2 Fleet enters the <code>deleted_running</code> state, and the instances
* continue to run until they are interrupted or you terminate them manually.</p>
* <p>For <code>instant</code> fleets, EC2 Fleet must terminate the instances when the fleet is
* deleted. Up to 1000 instances can be terminated in a single request to delete
* <code>instant</code> fleets. A deleted <code>instant</code> fleet with running instances
* is not supported.</p>
* <p>Deletes the specified EC2 Fleet request.</p>
* <p>After you delete an EC2 Fleet request, it launches no new instances.</p>
* <p>You must also specify whether a deleted EC2 Fleet request should terminate its instances. If
* you choose to terminate the instances, the EC2 Fleet request enters the
* <code>deleted_terminating</code> state. Otherwise, it enters the
* <code>deleted_running</code> state, and the instances continue to run until they are
* interrupted or you terminate them manually.</p>
* <p>A deleted <code>instant</code> fleet with running instances is not supported. When you
* delete an <code>instant</code> fleet, Amazon EC2 automatically terminates all its instances. For
* fleets with more than 1000 instances, the deletion request might fail. If your fleet has
* more than 1000 instances, first terminate most of the instances manually, leaving 1000 or
* fewer. Then delete the fleet, and the remaining instances will be terminated automatically.</p>
* <p class="title">
* <b>Restrictions</b>
* </p>
Expand All @@ -59,8 +61,8 @@ export interface DeleteFleetsCommandOutput extends DeleteFleetsResult, __Metadat
* deleted.</p>
* </li>
* </ul>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet">Delete an EC2
* Fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/delete-fleet.html">Delete an EC2 Fleet request and the instances
* in the fleet</a> in the <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface DeleteLaunchTemplateVersionsCommandOutput
* <p>You can delete up to 200 launch template versions in a single request. To delete more
* than 200 versions in a single request, use <a>DeleteLaunchTemplate</a>, which
* deletes the launch template and all of its versions.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html#delete-launch-template-version">Delete a launch template version</a> in the
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/delete-launch-template.html#delete-launch-template-version">Delete a launch template version</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/commands/DeregisterImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeregisterImageRequest } from "../models/models_3";
import { DeregisterImageRequest, DeregisterImageResult } from "../models/models_3";
import { de_DeregisterImageCommand, se_DeregisterImageCommand } from "../protocols/Aws_ec2";

/**
Expand All @@ -25,7 +25,7 @@ export interface DeregisterImageCommandInput extends DeregisterImageRequest {}
*
* The output of {@link DeregisterImageCommand}.
*/
export interface DeregisterImageCommandOutput extends __MetadataBearer {}
export interface DeregisterImageCommandOutput extends DeregisterImageResult, __MetadataBearer {}

/**
* <p>Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeFastSnapshotRestoresRequest, DescribeFastSnapshotRestoresResult } from "../models/models_3";
import { DescribeFastSnapshotRestoresRequest } from "../models/models_3";
import { DescribeFastSnapshotRestoresResult } from "../models/models_4";
import { de_DescribeFastSnapshotRestoresCommand, se_DescribeFastSnapshotRestoresCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeFleetHistoryRequest } from "../models/models_3";
import { DescribeFleetHistoryResult } from "../models/models_4";
import { DescribeFleetHistoryRequest, DescribeFleetHistoryResult } from "../models/models_4";
import { de_DescribeFleetHistoryCommand, se_DescribeFleetHistoryCommand } from "../protocols/Aws_ec2";

/**
Expand Down
51 changes: 51 additions & 0 deletions clients/client-ec2/src/commands/DescribeFleetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,23 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met
* // },
* // },
* // ImageId: "STRING_VALUE",
* // BlockDeviceMappings: [ // BlockDeviceMappingResponseList
* // { // BlockDeviceMappingResponse
* // DeviceName: "STRING_VALUE",
* // VirtualName: "STRING_VALUE",
* // Ebs: { // EbsBlockDeviceResponse
* // Encrypted: true || false,
* // DeleteOnTermination: true || false,
* // Iops: Number("int"),
* // Throughput: Number("int"),
* // KmsKeyId: "STRING_VALUE",
* // SnapshotId: "STRING_VALUE",
* // VolumeSize: Number("int"),
* // VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* // },
* // NoDevice: "STRING_VALUE",
* // },
* // ],
* // },
* // ],
* // },
Expand Down Expand Up @@ -312,6 +329,23 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met
* // },
* // },
* // ImageId: "STRING_VALUE",
* // BlockDeviceMappings: [
* // {
* // DeviceName: "STRING_VALUE",
* // VirtualName: "STRING_VALUE",
* // Ebs: {
* // Encrypted: true || false,
* // DeleteOnTermination: true || false,
* // Iops: Number("int"),
* // Throughput: Number("int"),
* // KmsKeyId: "STRING_VALUE",
* // SnapshotId: "STRING_VALUE",
* // VolumeSize: Number("int"),
* // VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* // },
* // NoDevice: "STRING_VALUE",
* // },
* // ],
* // },
* // },
* // Lifecycle: "spot" || "on-demand",
Expand Down Expand Up @@ -416,6 +450,23 @@ export interface DescribeFleetsCommandOutput extends DescribeFleetsResult, __Met
* // },
* // },
* // ImageId: "STRING_VALUE",
* // BlockDeviceMappings: [
* // {
* // DeviceName: "STRING_VALUE",
* // VirtualName: "STRING_VALUE",
* // Ebs: {
* // Encrypted: true || false,
* // DeleteOnTermination: true || false,
* // Iops: Number("int"),
* // Throughput: Number("int"),
* // KmsKeyId: "STRING_VALUE",
* // SnapshotId: "STRING_VALUE",
* // VolumeSize: Number("int"),
* // VolumeType: "standard" || "io1" || "io2" || "gp2" || "sc1" || "st1" || "gp3",
* // },
* // NoDevice: "STRING_VALUE",
* // },
* // ],
* // },
* // },
* // Lifecycle: "spot" || "on-demand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface DescribeNetworkInterfacesCommandOutput extends DescribeNetworkI
* <p>If you have a large number of network interfaces, the operation fails unless
* you use pagination or one of the following filters: <code>group-id</code>,
* <code>mac-address</code>, <code>private-dns-name</code>, <code>private-ip-address</code>,
* <code>private-dns-name</code>, <code>subnet-id</code>, or <code>vpc-id</code>.</p>
* <code>subnet-id</code>, or <code>vpc-id</code>.</p>
* <important>
* <p>We strongly recommend using only paginated requests. Unpaginated requests are
* susceptible to throttling and timeouts.</p>
Expand Down
3 changes: 2 additions & 1 deletion clients/client-ec2/src/commands/DescribeRegionsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeRegionsRequest, DescribeRegionsResult } from "../models/models_4";
import { DescribeRegionsRequest } from "../models/models_4";
import { DescribeRegionsResult } from "../models/models_5";
import { de_DescribeRegionsCommand, se_DescribeRegionsCommand } from "../protocols/Aws_ec2";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeReplaceRootVolumeTasksRequest, DescribeReplaceRootVolumeTasksResult } from "../models/models_4";
import { DescribeReplaceRootVolumeTasksRequest, DescribeReplaceRootVolumeTasksResult } from "../models/models_5";
import {
de_DescribeReplaceRootVolumeTasksCommand,
se_DescribeReplaceRootVolumeTasksCommand,
Expand Down
Loading

0 comments on commit 7ac960d

Please sign in to comment.