Skip to content

Commit 7304adf

Browse files
author
awstools
committed
feat(client-ec2): Adding an imdsSupport attribute to EC2 AMIs
1 parent 22500bf commit 7304adf

File tree

8 files changed

+249
-160
lines changed

8 files changed

+249
-160
lines changed

clients/client-ec2/src/commands/DescribeLocalGatewaysCommand.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
16-
import { DescribeLocalGatewaysRequest, DescribeLocalGatewaysRequestFilterSensitiveLog } from "../models/models_3";
17-
import { DescribeLocalGatewaysResult, DescribeLocalGatewaysResultFilterSensitiveLog } from "../models/models_4";
16+
import {
17+
DescribeLocalGatewaysRequest,
18+
DescribeLocalGatewaysRequestFilterSensitiveLog,
19+
DescribeLocalGatewaysResult,
20+
DescribeLocalGatewaysResultFilterSensitiveLog,
21+
} from "../models/models_4";
1822
import {
1923
deserializeAws_ec2DescribeLocalGatewaysCommand,
2024
serializeAws_ec2DescribeLocalGatewaysCommand,

clients/client-ec2/src/commands/ModifyVpnTunnelOptionsCommand.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ import {
1313
} from "@aws-sdk/types";
1414

1515
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
16-
import {
17-
ModifyVpnTunnelOptionsRequest,
18-
ModifyVpnTunnelOptionsRequestFilterSensitiveLog,
19-
ModifyVpnTunnelOptionsResult,
20-
ModifyVpnTunnelOptionsResultFilterSensitiveLog,
21-
} from "../models/models_5";
16+
import { ModifyVpnTunnelOptionsRequest, ModifyVpnTunnelOptionsRequestFilterSensitiveLog } from "../models/models_5";
17+
import { ModifyVpnTunnelOptionsResult, ModifyVpnTunnelOptionsResultFilterSensitiveLog } from "../models/models_6";
2218
import {
2319
deserializeAws_ec2ModifyVpnTunnelOptionsCommand,
2420
serializeAws_ec2ModifyVpnTunnelOptionsCommand,

clients/client-ec2/src/models/models_3.ts

+25-55
Original file line numberDiff line numberDiff line change
@@ -4899,6 +4899,7 @@ export enum ImageAttributeName {
48994899
blockDeviceMapping = "blockDeviceMapping",
49004900
bootMode = "bootMode",
49014901
description = "description",
4902+
imdsSupport = "imdsSupport",
49024903
kernel = "kernel",
49034904
lastLaunchedTime = "lastLaunchedTime",
49044905
launchPermission = "launchPermission",
@@ -5034,6 +5035,16 @@ export interface ImageAttribute {
50345035
* </note>
50355036
*/
50365037
LastLaunchedTime?: AttributeValue;
5038+
5039+
/**
5040+
* <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched
5041+
* from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so
5042+
* that, by default, the instance requires that IMDSv2 is used when requesting instance metadata.
5043+
* In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more
5044+
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure
5045+
* the AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
5046+
*/
5047+
ImdsSupport?: AttributeValue;
50375048
}
50385049

50395050
export interface DescribeImagesRequest {
@@ -5273,6 +5284,10 @@ export enum ImageTypeValues {
52735284
ramdisk = "ramdisk",
52745285
}
52755286

5287+
export enum ImdsSupportValues {
5288+
v2_0 = "v2.0",
5289+
}
5290+
52765291
export enum DeviceType {
52775292
ebs = "ebs",
52785293
instance_store = "instance-store",
@@ -5462,6 +5477,16 @@ export interface Image {
54625477
* nearest minute.</p>
54635478
*/
54645479
DeprecationTime?: string;
5480+
5481+
/**
5482+
* <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched
5483+
* from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so
5484+
* that, by default, the instance requires that IMDSv2 is used when requesting instance metadata.
5485+
* In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more
5486+
* information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure
5487+
* the AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
5488+
*/
5489+
ImdsSupport?: ImdsSupportValues | string;
54655490
}
54665491

54675492
export interface DescribeImagesResult {
@@ -9680,54 +9705,6 @@ export interface DescribeLocalGatewayRouteTableVpcAssociationsResult {
96809705
NextToken?: string;
96819706
}
96829707

9683-
export interface DescribeLocalGatewaysRequest {
9684-
/**
9685-
* <p>The IDs of the local gateways.</p>
9686-
*/
9687-
LocalGatewayIds?: string[];
9688-
9689-
/**
9690-
* <p>One or more filters.</p>
9691-
* <ul>
9692-
* <li>
9693-
* <p>
9694-
* <code>local-gateway-id</code> - The ID of a local gateway.</p>
9695-
* </li>
9696-
* <li>
9697-
* <p>
9698-
* <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
9699-
* </li>
9700-
* <li>
9701-
* <p>
9702-
* <code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway.</p>
9703-
* </li>
9704-
* <li>
9705-
* <p>
9706-
* <code>state</code> - The state of the association.</p>
9707-
* </li>
9708-
* </ul>
9709-
*/
9710-
Filters?: Filter[];
9711-
9712-
/**
9713-
* <p>The maximum number of results to return with a single call.
9714-
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
9715-
*/
9716-
MaxResults?: number;
9717-
9718-
/**
9719-
* <p>The token for the next page of results.</p>
9720-
*/
9721-
NextToken?: string;
9722-
9723-
/**
9724-
* <p>Checks whether you have the required permissions for the action, without actually making the request,
9725-
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
9726-
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
9727-
*/
9728-
DryRun?: boolean;
9729-
}
9730-
97319708
/**
97329709
* @internal
97339710
*/
@@ -11499,10 +11476,3 @@ export const DescribeLocalGatewayRouteTableVpcAssociationsResultFilterSensitiveL
1149911476
): any => ({
1150011477
...obj,
1150111478
});
11502-
11503-
/**
11504-
* @internal
11505-
*/
11506-
export const DescribeLocalGatewaysRequestFilterSensitiveLog = (obj: DescribeLocalGatewaysRequest): any => ({
11507-
...obj,
11508-
});

clients/client-ec2/src/models/models_4.ts

+52-78
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,54 @@ import {
109109
ProductCode,
110110
} from "./models_3";
111111

112+
export interface DescribeLocalGatewaysRequest {
113+
/**
114+
* <p>The IDs of the local gateways.</p>
115+
*/
116+
LocalGatewayIds?: string[];
117+
118+
/**
119+
* <p>One or more filters.</p>
120+
* <ul>
121+
* <li>
122+
* <p>
123+
* <code>local-gateway-id</code> - The ID of a local gateway.</p>
124+
* </li>
125+
* <li>
126+
* <p>
127+
* <code>outpost-arn</code> - The Amazon Resource Name (ARN) of the Outpost.</p>
128+
* </li>
129+
* <li>
130+
* <p>
131+
* <code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway.</p>
132+
* </li>
133+
* <li>
134+
* <p>
135+
* <code>state</code> - The state of the association.</p>
136+
* </li>
137+
* </ul>
138+
*/
139+
Filters?: Filter[];
140+
141+
/**
142+
* <p>The maximum number of results to return with a single call.
143+
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
144+
*/
145+
MaxResults?: number;
146+
147+
/**
148+
* <p>The token for the next page of results.</p>
149+
*/
150+
NextToken?: string;
151+
152+
/**
153+
* <p>Checks whether you have the required permissions for the action, without actually making the request,
154+
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
155+
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
156+
*/
157+
DryRun?: boolean;
158+
}
159+
112160
/**
113161
* <p>Describes a local gateway.</p>
114162
*/
@@ -9712,76 +9760,11 @@ export interface EnableFastSnapshotRestoresRequest {
97129760
}
97139761

97149762
/**
9715-
* <p>Describes fast snapshot restores that were successfully enabled.</p>
9763+
* @internal
97169764
*/
9717-
export interface EnableFastSnapshotRestoreSuccessItem {
9718-
/**
9719-
* <p>The ID of the snapshot.</p>
9720-
*/
9721-
SnapshotId?: string;
9722-
9723-
/**
9724-
* <p>The Availability Zone.</p>
9725-
*/
9726-
AvailabilityZone?: string;
9727-
9728-
/**
9729-
* <p>The state of fast snapshot restores.</p>
9730-
*/
9731-
State?: FastSnapshotRestoreStateCode | string;
9732-
9733-
/**
9734-
* <p>The reason for the state transition. The possible values are as follows:</p>
9735-
* <ul>
9736-
* <li>
9737-
* <p>
9738-
* <code>Client.UserInitiated</code> - The state successfully transitioned to <code>enabling</code> or
9739-
* <code>disabling</code>.</p>
9740-
* </li>
9741-
* <li>
9742-
* <p>
9743-
* <code>Client.UserInitiated - Lifecycle state transition</code> - The state successfully transitioned
9744-
* to <code>optimizing</code>, <code>enabled</code>, or <code>disabled</code>.</p>
9745-
* </li>
9746-
* </ul>
9747-
*/
9748-
StateTransitionReason?: string;
9749-
9750-
/**
9751-
* <p>The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.</p>
9752-
*/
9753-
OwnerId?: string;
9754-
9755-
/**
9756-
* <p>The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.</p>
9757-
*/
9758-
OwnerAlias?: string;
9759-
9760-
/**
9761-
* <p>The time at which fast snapshot restores entered the <code>enabling</code> state.</p>
9762-
*/
9763-
EnablingTime?: Date;
9764-
9765-
/**
9766-
* <p>The time at which fast snapshot restores entered the <code>optimizing</code> state.</p>
9767-
*/
9768-
OptimizingTime?: Date;
9769-
9770-
/**
9771-
* <p>The time at which fast snapshot restores entered the <code>enabled</code> state.</p>
9772-
*/
9773-
EnabledTime?: Date;
9774-
9775-
/**
9776-
* <p>The time at which fast snapshot restores entered the <code>disabling</code> state.</p>
9777-
*/
9778-
DisablingTime?: Date;
9779-
9780-
/**
9781-
* <p>The time at which fast snapshot restores entered the <code>disabled</code> state.</p>
9782-
*/
9783-
DisabledTime?: Date;
9784-
}
9765+
export const DescribeLocalGatewaysRequestFilterSensitiveLog = (obj: DescribeLocalGatewaysRequest): any => ({
9766+
...obj,
9767+
});
97859768

97869769
/**
97879770
* @internal
@@ -11918,12 +11901,3 @@ export const EnableFastLaunchResultFilterSensitiveLog = (obj: EnableFastLaunchRe
1191811901
export const EnableFastSnapshotRestoresRequestFilterSensitiveLog = (obj: EnableFastSnapshotRestoresRequest): any => ({
1191911902
...obj,
1192011903
});
11921-
11922-
/**
11923-
* @internal
11924-
*/
11925-
export const EnableFastSnapshotRestoreSuccessItemFilterSensitiveLog = (
11926-
obj: EnableFastSnapshotRestoreSuccessItem
11927-
): any => ({
11928-
...obj,
11929-
});

0 commit comments

Comments
 (0)