Skip to content

Commit

Permalink
feat(client-ec2): This release allows IMDS support to be set to v2-on…
Browse files Browse the repository at this point in the history
…ly on an existing AMI, so that all future instances launched from that AMI will use IMDSv2 by default.
  • Loading branch information
awstools committed Feb 28, 2023
1 parent af22194 commit b623f24
Show file tree
Hide file tree
Showing 16 changed files with 435 additions and 375 deletions.
52 changes: 30 additions & 22 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4691,9 +4691,9 @@ export class EC2 extends EC2Client {

/**
* <p>Cancels the specified Spot Fleet requests.</p>
* <p>After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances.
* You must specify whether the Spot Fleet should also terminate its Spot Instances. If you
* terminate the instances, the Spot Fleet request enters the
* <p>After you cancel a Spot Fleet request, the Spot Fleet launches no new instances.</p>
* <p>You must also specify whether a canceled Spot Fleet request should terminate its instances. If you
* choose to terminate the instances, the Spot Fleet request enters the
* <code>cancelled_terminating</code> state. Otherwise, the Spot Fleet request enters
* the <code>cancelled_running</code> state and the instances continue to run until they
* are interrupted or you terminate them manually.</p>
Expand Down Expand Up @@ -8265,9 +8265,9 @@ export class EC2 extends EC2Client {
}

/**
* <p>Deletes the specified EC2 Fleet.</p>
* <p>Deletes the specified EC2 Fleets.</p>
* <p>After you delete an EC2 Fleet, it launches no new instances.</p>
* <p>You must specify whether a deleted EC2 Fleet should also terminate its instances. If you
* <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>
Expand Down Expand Up @@ -14318,12 +14318,12 @@ export class EC2 extends EC2Client {
* with a filter to look for instances where the instance lifecycle is
* <code>spot</code>.</p>
* <p>We recommend that you set <code>MaxResults</code> to a value between 5 and 1000 to
* limit the number of results returned. This paginates the output, which makes the list
* more manageable and returns the results faster. If the list of results exceeds your
* <code>MaxResults</code> value, then that number of results is returned along with a
* limit the number of items returned. This paginates the output, which makes the list
* more manageable and returns the items faster. If the list of items exceeds your
* <code>MaxResults</code> value, then that number of items is returned along with a
* <code>NextToken</code> value that can be passed to a subsequent
* <code>DescribeSpotInstanceRequests</code> request to retrieve the remaining
* results.</p>
* items.</p>
* <p>Spot Instance requests are deleted four hours after they are canceled and their instances are
* terminated.</p>
*/
Expand Down Expand Up @@ -19047,7 +19047,14 @@ export class EC2 extends EC2Client {
}

/**
* <p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).</p>
* <note>
* <p>To import your virtual machines (VMs) with a console-based experience, you can use the
* <i>Import virtual machine images to Amazon Web Services</i> template in the <a href="https://console.aws.amazon.com/migrationhub/orchestrator">Migration Hub Orchestrator console</a>. For more
* information, see the <a href="https://docs.aws.amazon.com/migrationhub-orchestrator/latest/userguide/import-vm-images.html">
* <i>Migration Hub Orchestrator User Guide</i>
* </a>.</p>
* </note>
* <p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).</p>
* <important>
* <p>Amazon Web Services VM Import/Export strongly recommends specifying a value for either the
* <code>--license-type</code> or <code>--usage-operation</code> parameter when you create a new
Expand Down Expand Up @@ -19767,9 +19774,9 @@ export class EC2 extends EC2Client {
}

/**
* <p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
* You can use the <code>Attribute</code> parameter to specify the attribute or one of the following parameters:
* <code>Description</code> or <code>LaunchPermission</code>.</p>
* <p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>
* <p>To specify the attribute, you can use the <code>Attribute</code> parameter, or one of the following parameters:
* <code>Description</code>, <code>ImdsSupport</code>, or <code>LaunchPermission</code>.</p>
* <p>Images with an Amazon Web Services Marketplace product code cannot be made public.</p>
* <p>To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance
* and create an AMI from the instance.</p>
Expand Down Expand Up @@ -21445,15 +21452,16 @@ export class EC2 extends EC2Client {
* addresses when queried from instances in the peer VPC.</p>
* </li>
* </ul>
* <p>If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution
* for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP
* addresses in the peer VPC. This option is not available if the peered VPCs are in different
* different Amazon Web Services accounts or different Regions. For peered VPCs in different
* Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request
* to modify the peering connection options. For inter-region peering connections, you must use the
* Region for the requester VPC to modify the requester VPC peering options and the Region for the
* accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and
* the requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>
* <p>If the peered VPCs are in the same Amazon Web Services account, you can enable DNS
* resolution for queries from the local VPC. This ensures that queries from the local VPC
* resolve to private IP addresses in the peer VPC. This option is not available if the
* peered VPCs are in different Amazon Web Services accounts or different Regions. For
* peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account
* owner must initiate a separate request to modify the peering connection options. For
* inter-region peering connections, you must use the Region for the requester VPC to
* modify the requester VPC peering options and the Region for the accepter VPC to modify
* the accepter VPC peering options. To verify which VPCs are the accepter and the
* requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>
*/
public modifyVpcPeeringConnectionOptions(
args: ModifyVpcPeeringConnectionOptionsCommandInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export interface CancelSpotFleetRequestsCommandOutput extends CancelSpotFleetReq

/**
* <p>Cancels the specified Spot Fleet requests.</p>
* <p>After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances.
* You must specify whether the Spot Fleet should also terminate its Spot Instances. If you
* terminate the instances, the Spot Fleet request enters the
* <p>After you cancel a Spot Fleet request, the Spot Fleet launches no new instances.</p>
* <p>You must also specify whether a canceled Spot Fleet request should terminate its instances. If you
* choose to terminate the instances, the Spot Fleet request enters the
* <code>cancelled_terminating</code> state. Otherwise, the Spot Fleet request enters
* the <code>cancelled_running</code> state and the instances continue to run until they
* are interrupted or you terminate them manually.</p>
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/commands/DeleteFleetsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export interface DeleteFleetsCommandInput extends DeleteFleetsRequest {}
export interface DeleteFleetsCommandOutput extends DeleteFleetsResult, __MetadataBearer {}

/**
* <p>Deletes the specified EC2 Fleet.</p>
* <p>Deletes the specified EC2 Fleets.</p>
* <p>After you delete an EC2 Fleet, it launches no new instances.</p>
* <p>You must specify whether a deleted EC2 Fleet should also terminate its instances. If you
* <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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export interface DescribeSpotInstanceRequestsCommandOutput
* with a filter to look for instances where the instance lifecycle is
* <code>spot</code>.</p>
* <p>We recommend that you set <code>MaxResults</code> to a value between 5 and 1000 to
* limit the number of results returned. This paginates the output, which makes the list
* more manageable and returns the results faster. If the list of results exceeds your
* <code>MaxResults</code> value, then that number of results is returned along with a
* limit the number of items returned. This paginates the output, which makes the list
* more manageable and returns the items faster. If the list of items exceeds your
* <code>MaxResults</code> value, then that number of items is returned along with a
* <code>NextToken</code> value that can be passed to a subsequent
* <code>DescribeSpotInstanceRequests</code> request to retrieve the remaining
* results.</p>
* items.</p>
* <p>Spot Instance requests are deleted four hours after they are canceled and their instances are
* terminated.</p>
* @example
Expand Down
9 changes: 8 additions & 1 deletion clients/client-ec2/src/commands/ImportImageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export interface ImportImageCommandInput extends ImportImageRequest {}
export interface ImportImageCommandOutput extends ImportImageResult, __MetadataBearer {}

/**
* <p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).</p>
* <note>
* <p>To import your virtual machines (VMs) with a console-based experience, you can use the
* <i>Import virtual machine images to Amazon Web Services</i> template in the <a href="https://console.aws.amazon.com/migrationhub/orchestrator">Migration Hub Orchestrator console</a>. For more
* information, see the <a href="https://docs.aws.amazon.com/migrationhub-orchestrator/latest/userguide/import-vm-images.html">
* <i>Migration Hub Orchestrator User Guide</i>
* </a>.</p>
* </note>
* <p>Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).</p>
* <important>
* <p>Amazon Web Services VM Import/Export strongly recommends specifying a value for either the
* <code>--license-type</code> or <code>--usage-operation</code> parameter when you create a new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export interface ModifyImageAttributeCommandInput extends ModifyImageAttributeRe
export interface ModifyImageAttributeCommandOutput extends __MetadataBearer {}

/**
* <p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.
* You can use the <code>Attribute</code> parameter to specify the attribute or one of the following parameters:
* <code>Description</code> or <code>LaunchPermission</code>.</p>
* <p>Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time.</p>
* <p>To specify the attribute, you can use the <code>Attribute</code> parameter, or one of the following parameters:
* <code>Description</code>, <code>ImdsSupport</code>, or <code>LaunchPermission</code>.</p>
* <p>Images with an Amazon Web Services Marketplace product code cannot be made public.</p>
* <p>To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance
* and create an AMI from the instance.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ export interface ModifyVpcPeeringConnectionOptionsCommandOutput
* addresses when queried from instances in the peer VPC.</p>
* </li>
* </ul>
* <p>If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution
* for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP
* addresses in the peer VPC. This option is not available if the peered VPCs are in different
* different Amazon Web Services accounts or different Regions. For peered VPCs in different
* Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request
* to modify the peering connection options. For inter-region peering connections, you must use the
* Region for the requester VPC to modify the requester VPC peering options and the Region for the
* accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and
* the requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>
* <p>If the peered VPCs are in the same Amazon Web Services account, you can enable DNS
* resolution for queries from the local VPC. This ensures that queries from the local VPC
* resolve to private IP addresses in the peer VPC. This option is not available if the
* peered VPCs are in different Amazon Web Services accounts or different Regions. For
* peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account
* owner must initiate a separate request to modify the peering connection options. For
* inter-region peering connections, you must use the Region for the requester VPC to
* modify the requester VPC peering options and the Region for the accepter VPC to modify
* the accepter VPC peering options. To verify which VPCs are the accepter and the
* requester for a VPC peering connection, use the <a>DescribeVpcPeeringConnections</a> command.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
17 changes: 8 additions & 9 deletions clients/client-ec2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2343,10 +2343,8 @@ export interface AllocateHostsRequest {

/**
* <p>Indicates whether to enable or disable host maintenance for the Dedicated Host. For
* more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html"> Host
* more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html">Host
* maintenance</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>Default: <code>on</code>
* </p>
*/
HostMaintenance?: HostMaintenance | string;
}
Expand Down Expand Up @@ -5419,10 +5417,9 @@ export interface CancelReservedInstancesListingResult {
*/
export interface CancelSpotFleetRequestsRequest {
/**
* <p>Checks whether you have the required permissions for the action, without actually
* making the request, and provides an error response. If you have the required
* permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is
* <code>UnauthorizedOperation</code>.</p>
* <p>Checks whether you have the required permissions for the action, without actually making the request,
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
*/
DryRun?: boolean;

Expand All @@ -5432,8 +5429,10 @@ export interface CancelSpotFleetRequestsRequest {
SpotFleetRequestIds: string[] | undefined;

/**
* <p>Indicates whether to terminate instances for a Spot Fleet request if it is canceled
* successfully.</p>
* <p>Indicates whether to terminate the associated instances when the Spot Fleet request is canceled.
* The default is to terminate the instances.</p>
* <p>To let the instances continue to run after the Spot Fleet request is canceled, specify
* <code>no-terminate-instances</code>.</p>
*/
TerminateInstances: boolean | undefined;
}
Expand Down
6 changes: 5 additions & 1 deletion clients/client-ec2/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,8 @@ export interface Placement {
export interface FleetLaunchTemplateOverridesRequest {
/**
* <p>The instance type.</p>
* <p>
* <code>mac1.metal</code> is not supported as a launch template override.</p>
* <note>
* <p>If you specify <code>InstanceType</code>, you can't specify
* <code>InstanceRequirements</code>.</p>
Expand Down Expand Up @@ -1648,7 +1650,7 @@ export interface FleetLaunchTemplateOverridesRequest {
* identify instance types with those attributes.</p>
* <note>
* <p>If you specify <code>InstanceRequirements</code>, you can't specify
* <code>InstanceType</code>.</p>
* <code>InstanceType</code>.</p>
* </note>
*/
InstanceRequirements?: InstanceRequirementsRequest;
Expand Down Expand Up @@ -2643,6 +2645,8 @@ export interface PlacementResponse {
export interface FleetLaunchTemplateOverrides {
/**
* <p>The instance type.</p>
* <p>
* <code>mac1.metal</code> is not supported as a launch template override.</p>
* <note>
* <p>If you specify <code>InstanceType</code>, you can't specify
* <code>InstanceRequirements</code>.</p>
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ec2/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5368,10 +5368,10 @@ export interface DeleteFleetsRequest {
FleetIds: string[] | undefined;

/**
* <p>Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to
* <p>Indicates whether to terminate the associated instances when the EC2 Fleet is deleted. The default is to
* terminate the instances.</p>
* <p>To let the instances continue to run after the EC2 Fleet is deleted, specify
* <code>NoTerminateInstances</code>. Supported only for fleets of type
* <code>no-terminate-instances</code>. Supported only for fleets of type
* <code>maintain</code> and <code>request</code>.</p>
* <p>For <code>instant</code> fleets, you cannot specify <code>NoTerminateInstances</code>. A
* deleted <code>instant</code> fleet with running instances is not supported.</p>
Expand Down
Loading

0 comments on commit b623f24

Please sign in to comment.