diff --git a/clients/client-ec2/README.md b/clients/client-ec2/README.md
index 9c9817cf264fd..1362d5cd1c1ad 100644
--- a/clients/client-ec2/README.md
+++ b/clients/client-ec2/README.md
@@ -3725,6 +3725,14 @@ GetImageBlockPublicAccessState
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/GetImageBlockPublicAccessStateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/GetImageBlockPublicAccessStateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/GetImageBlockPublicAccessStateCommandOutput/)
+
+ Gets the default instance metadata service (IMDS) settings that are set at the account
+ * level in the specified Amazon Web Services
Region. For more information, see Order of precedence for instance metadata options in the
+ * Amazon EC2 User Guide. Base exception class for all service exceptions from EC2 service. Modifies the default instance metadata service (IMDS) settings at the account level in
+ * the specified Amazon Web Services
Region. To remove a parameter's account-level default setting, specify
+ * Base exception class for all service exceptions from EC2 service. The Amazon Web Services account alias (for example, The owner alias (
- *
+GetInstanceMetadataDefaults
+
+
+[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/GetInstanceMetadataDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/GetInstanceMetadataDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/GetInstanceMetadataDefaultsCommandOutput/)
+
@@ -4213,6 +4221,14 @@ ModifyInstanceMaintenanceOptions
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyInstanceMaintenanceOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMaintenanceOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMaintenanceOptionsCommandOutput/)
+
+ModifyInstanceMetadataDefaults
+
+
+[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyInstanceMetadataDefaultsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMetadataDefaultsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyInstanceMetadataDefaultsCommandOutput/)
+
diff --git a/clients/client-ec2/src/EC2.ts b/clients/client-ec2/src/EC2.ts
index 7c83e0c8bd4d8..996565e2a6772 100644
--- a/clients/client-ec2/src/EC2.ts
+++ b/clients/client-ec2/src/EC2.ts
@@ -2150,6 +2150,11 @@ import {
GetImageBlockPublicAccessStateCommandInput,
GetImageBlockPublicAccessStateCommandOutput,
} from "./commands/GetImageBlockPublicAccessStateCommand";
+import {
+ GetInstanceMetadataDefaultsCommand,
+ GetInstanceMetadataDefaultsCommandInput,
+ GetInstanceMetadataDefaultsCommandOutput,
+} from "./commands/GetInstanceMetadataDefaultsCommand";
import {
GetInstanceTypesFromInstanceRequirementsCommand,
GetInstanceTypesFromInstanceRequirementsCommandInput,
@@ -2443,6 +2448,11 @@ import {
ModifyInstanceMaintenanceOptionsCommandInput,
ModifyInstanceMaintenanceOptionsCommandOutput,
} from "./commands/ModifyInstanceMaintenanceOptionsCommand";
+import {
+ ModifyInstanceMetadataDefaultsCommand,
+ ModifyInstanceMetadataDefaultsCommandInput,
+ ModifyInstanceMetadataDefaultsCommandOutput,
+} from "./commands/ModifyInstanceMetadataDefaultsCommand";
import {
ModifyInstanceMetadataOptionsCommand,
ModifyInstanceMetadataOptionsCommandInput,
@@ -3457,6 +3467,7 @@ const commands = {
GetGroupsForCapacityReservationCommand,
GetHostReservationPurchasePreviewCommand,
GetImageBlockPublicAccessStateCommand,
+ GetInstanceMetadataDefaultsCommand,
GetInstanceTypesFromInstanceRequirementsCommand,
GetInstanceUefiDataCommand,
GetIpamAddressHistoryCommand,
@@ -3518,6 +3529,7 @@ const commands = {
ModifyInstanceEventStartTimeCommand,
ModifyInstanceEventWindowCommand,
ModifyInstanceMaintenanceOptionsCommand,
+ ModifyInstanceMetadataDefaultsCommand,
ModifyInstanceMetadataOptionsCommand,
ModifyInstancePlacementCommand,
ModifyIpamCommand,
@@ -11032,6 +11044,24 @@ export interface EC2 {
cb: (err: any, data?: GetImageBlockPublicAccessStateCommandOutput) => void
): void;
+ /**
+ * @see {@link GetInstanceMetadataDefaultsCommand}
+ */
+ getInstanceMetadataDefaults(): Promise
no-preference
. At instance launch, the value will come from the
+ * AMI, or from the launch parameter if specified. For more information, see Order of precedence for instance metadata options in the
+ * Amazon EC2 User Guide.amazon
, self
) or
- * the Amazon Web Services account ID of the AMI owner.amazon
| aws-marketplace
).
*
optional
- IMDSv2 is optional. You can choose whether to send a
- * session token in your instance metadata retrieval requests. If you retrieve
- * IAM role credentials without a session token, you receive the IMDSv1 role
- * credentials. If you retrieve IAM role credentials using a valid session token,
- * you receive the IMDSv2 role credentials.optional
- IMDSv2 is optional, which means that you can use
+ * either IMDSv2 or IMDSv1.
- * required
- IMDSv2 is required. You must send a session token
- * in your instance metadata retrieval requests. With this option, retrieving the
- * IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are
- * not available.
required
- IMDSv2 is required, which means that IMDSv1 is
+ * disabled, and you must use IMDSv2.
* The desired HTTP PUT response hop limit for instance metadata requests. The larger the - * number, the further instance metadata requests can travel.
- *Default: 1
- *
The maximum number of hops that the metadata token can travel.
*Possible values: Integers from 1
to 64
*
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend @@ -8142,6 +8149,77 @@ export interface GetImageBlockPublicAccessStateResult { ImageBlockPublicAccessState?: string; } +/** + * @public + */ +export interface GetInstanceMetadataDefaultsRequest { + /** + *
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
.
The default instance metadata service (IMDS) settings that were set at the account + * level in the specified Amazon Web Services Region.
+ * @public + */ +export interface InstanceMetadataDefaultsResponse { + /** + *Indicates whether IMDSv2 is required.
+ *
+ * optional
– IMDSv2 is optional, which means that you can
+ * use either IMDSv2 or IMDSv1.
+ * required
– IMDSv2 is required, which means that IMDSv1 is
+ * disabled, and you must use IMDSv2.
The maximum number of hops that the metadata token can travel.
+ * @public + */ + HttpPutResponseHopLimit?: number; + + /** + *Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance + * metadata can't be accessed.
+ * @public + */ + HttpEndpoint?: InstanceMetadataEndpointState; + + /** + *Indicates whether access to instance tags from the instance metadata is enabled or + * disabled. For more information, see Work with + * instance tags using the instance metadata in the + * Amazon EC2 User Guide.
+ * @public + */ + InstanceMetadataTags?: InstanceMetadataTagsState; +} + +/** + * @public + */ +export interface GetInstanceMetadataDefaultsResult { + /** + *The account-level default IMDS settings.
+ * @public + */ + AccountLevel?: InstanceMetadataDefaultsResponse; +} + /** * @public */ @@ -8678,64 +8756,6 @@ export const IpamPublicAddressAssociationStatus = { export type IpamPublicAddressAssociationStatus = (typeof IpamPublicAddressAssociationStatus)[keyof typeof IpamPublicAddressAssociationStatus]; -/** - *The security group that the resource with the public IP address is in.
- * @public - */ -export interface IpamPublicAddressSecurityGroup { - /** - *The security group's name.
- * @public - */ - GroupName?: string; - - /** - *The security group's ID.
- * @public - */ - GroupId?: string; -} - -/** - * @public - * @enum - */ -export const IpamPublicAddressAwsService = { - AGA: "global-accelerator", - DMS: "database-migration-service", - EC2_LB: "load-balancer", - ECS: "elastic-container-service", - NAT_GATEWAY: "nat-gateway", - OTHER: "other", - RDS: "relational-database-service", - REDSHIFT: "redshift", - S2S_VPN: "site-to-site-vpn", -} as const; - -/** - * @public - */ -export type IpamPublicAddressAwsService = - (typeof IpamPublicAddressAwsService)[keyof typeof IpamPublicAddressAwsService]; - -/** - *A tag for a public IP address discovered by IPAM.
- * @public - */ -export interface IpamPublicAddressTag { - /** - *The tag's key.
- * @public - */ - Key?: string; - - /** - *The tag's value.
- * @public - */ - Value?: string; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_6.ts b/clients/client-ec2/src/models/models_6.ts index aef05bb6313b5..240d306155f11 100644 --- a/clients/client-ec2/src/models/models_6.ts +++ b/clients/client-ec2/src/models/models_6.ts @@ -147,7 +147,6 @@ import { Monitoring, PublicIpv4PoolRange, ReservedInstancesConfiguration, - ScheduledInstance, SnapshotAttributeName, SnapshotTaskDetail, SnapshotTaskDetailFilterSensitiveLog, @@ -158,11 +157,7 @@ import { IpamComplianceStatus, IpamOverlapStatus, IpamPublicAddressAssociationStatus, - IpamPublicAddressAwsService, - IpamPublicAddressSecurityGroup, - IpamPublicAddressTag, IpamPublicAddressType, - Purchase, SnapshotBlockPublicAccessState, TransitGatewayPropagationState, UnlimitedSupportedInstanceFamily, @@ -170,6 +165,64 @@ import { VolumeModification, } from "./models_5"; +/** + *The security group that the resource with the public IP address is in.
+ * @public + */ +export interface IpamPublicAddressSecurityGroup { + /** + *The security group's name.
+ * @public + */ + GroupName?: string; + + /** + *The security group's ID.
+ * @public + */ + GroupId?: string; +} + +/** + * @public + * @enum + */ +export const IpamPublicAddressAwsService = { + AGA: "global-accelerator", + DMS: "database-migration-service", + EC2_LB: "load-balancer", + ECS: "elastic-container-service", + NAT_GATEWAY: "nat-gateway", + OTHER: "other", + RDS: "relational-database-service", + REDSHIFT: "redshift", + S2S_VPN: "site-to-site-vpn", +} as const; + +/** + * @public + */ +export type IpamPublicAddressAwsService = + (typeof IpamPublicAddressAwsService)[keyof typeof IpamPublicAddressAwsService]; + +/** + *A tag for a public IP address discovered by IPAM.
+ * @public + */ +export interface IpamPublicAddressTag { + /** + *The tag's key.
+ * @public + */ + Key?: string; + + /** + *The tag's value.
+ * @public + */ + Value?: string; +} + /** *Tags for a public IP address discovered by IPAM.
* @public @@ -5395,6 +5448,123 @@ export interface ModifyInstanceMaintenanceOptionsResult { AutoRecovery?: InstanceAutoRecoveryState; } +/** + * @public + * @enum + */ +export const DefaultInstanceMetadataEndpointState = { + disabled: "disabled", + enabled: "enabled", + no_preference: "no-preference", +} as const; + +/** + * @public + */ +export type DefaultInstanceMetadataEndpointState = + (typeof DefaultInstanceMetadataEndpointState)[keyof typeof DefaultInstanceMetadataEndpointState]; + +/** + * @public + * @enum + */ +export const MetadataDefaultHttpTokensState = { + no_preference: "no-preference", + optional: "optional", + required: "required", +} as const; + +/** + * @public + */ +export type MetadataDefaultHttpTokensState = + (typeof MetadataDefaultHttpTokensState)[keyof typeof MetadataDefaultHttpTokensState]; + +/** + * @public + * @enum + */ +export const DefaultInstanceMetadataTagsState = { + disabled: "disabled", + enabled: "enabled", + no_preference: "no-preference", +} as const; + +/** + * @public + */ +export type DefaultInstanceMetadataTagsState = + (typeof DefaultInstanceMetadataTagsState)[keyof typeof DefaultInstanceMetadataTagsState]; + +/** + * @public + */ +export interface ModifyInstanceMetadataDefaultsRequest { + /** + *Indicates whether IMDSv2 is required.
+ *
+ * optional
– IMDSv2 is optional, which means that you can
+ * use either IMDSv2 or IMDSv1.
+ * required
– IMDSv2 is required, which means that IMDSv1 is
+ * disabled, and you must use IMDSv2.
The maximum number of hops that the metadata token can travel.
+ *Minimum: 1
+ *
Maximum: 64
+ *
Enables or disables the IMDS endpoint on an instance. When disabled, the instance + * metadata can't be accessed.
+ * @public + */ + HttpEndpoint?: DefaultInstanceMetadataEndpointState; + + /** + *Enables or disables access to an instance's tags from the instance metadata. For more + * information, see Work with + * instance tags using the instance metadata in the + * Amazon EC2 User Guide.
+ * @public + */ + InstanceMetadataTags?: DefaultInstanceMetadataTagsState; + + /** + *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
.
If the request succeeds, the response returns true
. If the request fails,
+ * no response is returned, and instead an error message is returned.
Default: If the value of ImdsSupport
for the Amazon Machine Image (AMI)
- * for your instance is v2.0
, the default is required
.
Default:
+ *If the value of ImdsSupport
for the Amazon Machine Image (AMI)
+ * for your instance is v2.0
and the account level default is set to
+ * no-preference
, the default is required
.
If the value of ImdsSupport
for the Amazon Machine Image (AMI)
+ * for your instance is v2.0
, but the account level default is set to
+ * V1 or V2
, the default is optional
.
The default value can also be affected by other combinations of parameters. For more + * information, see Order of precedence for instance metadata options in the + * Amazon EC2 User Guide.
* @public */ HttpTokens?: HttpTokensState; @@ -9361,190 +9545,6 @@ export interface PurchaseHostReservationRequest { TagSpecifications?: TagSpecification[]; } -/** - * @public - */ -export interface PurchaseHostReservationResult { - /** - *Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
- * @public - */ - ClientToken?: string; - - /** - *The currency in which the totalUpfrontPrice
and
- * totalHourlyPrice
amounts are specified. At this time, the only
- * supported currency is USD
.
Describes the details of the purchase.
- * @public - */ - Purchase?: Purchase[]; - - /** - *The total hourly price of the reservation calculated per hour.
- * @public - */ - TotalHourlyPrice?: string; - - /** - *The total amount charged to your account when you purchase the reservation.
- * @public - */ - TotalUpfrontPrice?: string; -} - -/** - *Describes the limit price of a Reserved Instance offering.
- * @public - */ -export interface ReservedInstanceLimitPrice { - /** - *Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).
- * @public - */ - Amount?: number; - - /** - *The currency in which the limitPrice
amount is specified.
- * At this time, the only supported currency is USD
.
Contains the parameters for PurchaseReservedInstancesOffering.
- * @public - */ -export interface PurchaseReservedInstancesOfferingRequest { - /** - *The number of Reserved Instances to purchase.
- * @public - */ - InstanceCount: number | undefined; - - /** - *The ID of the Reserved Instance offering to purchase.
- * @public - */ - ReservedInstancesOfferingId: string | undefined; - - /** - *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
.
Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
- * @public - */ - LimitPrice?: ReservedInstanceLimitPrice; - - /** - *The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- * @public - */ - PurchaseTime?: Date; -} - -/** - *Contains the output of PurchaseReservedInstancesOffering.
- * @public - */ -export interface PurchaseReservedInstancesOfferingResult { - /** - *The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted - * pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing - * pricing tiers in the Amazon Elastic Compute Cloud User Guide.
- * @public - */ - ReservedInstancesId?: string; -} - -/** - *Describes a request to purchase Scheduled Instances.
- * @public - */ -export interface PurchaseRequest { - /** - *The number of instances.
- * @public - */ - InstanceCount: number | undefined; - - /** - *The purchase token.
- * @public - */ - PurchaseToken: string | undefined; -} - -/** - *Contains the parameters for PurchaseScheduledInstances.
- * @public - */ -export interface PurchaseScheduledInstancesRequest { - /** - *Unique, case-sensitive identifier that ensures the idempotency of the request. - * For more information, see Ensuring Idempotency.
- * @public - */ - ClientToken?: string; - - /** - *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
.
The purchase requests.
- * @public - */ - PurchaseRequests: PurchaseRequest[] | undefined; -} - -/** - *Contains the output of PurchaseScheduledInstances.
- * @public - */ -export interface PurchaseScheduledInstancesResult { - /** - *Information about the Scheduled Instances.
- * @public - */ - ScheduledInstanceSet?: ScheduledInstance[]; -} - -/** - * @public - */ -export interface RebootInstancesRequest { - /** - *The instance IDs.
- * @public - */ - InstanceIds: string[] | undefined; - - /** - *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
.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
+ * @public + */ + ClientToken?: string; + + /** + *The currency in which the totalUpfrontPrice
and
+ * totalHourlyPrice
amounts are specified. At this time, the only
+ * supported currency is USD
.
Describes the details of the purchase.
+ * @public + */ + Purchase?: Purchase[]; + + /** + *The total hourly price of the reservation calculated per hour.
+ * @public + */ + TotalHourlyPrice?: string; + + /** + *The total amount charged to your account when you purchase the reservation.
+ * @public + */ + TotalUpfrontPrice?: string; +} + +/** + *Describes the limit price of a Reserved Instance offering.
+ * @public + */ +export interface ReservedInstanceLimitPrice { + /** + *Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).
+ * @public + */ + Amount?: number; + + /** + *The currency in which the limitPrice
amount is specified.
+ * At this time, the only supported currency is USD
.
Contains the parameters for PurchaseReservedInstancesOffering.
+ * @public + */ +export interface PurchaseReservedInstancesOfferingRequest { + /** + *The number of Reserved Instances to purchase.
+ * @public + */ + InstanceCount: number | undefined; + + /** + *The ID of the Reserved Instance offering to purchase.
+ * @public + */ + ReservedInstancesOfferingId: string | undefined; + + /** + *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
.
Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
+ * @public + */ + LimitPrice?: ReservedInstanceLimitPrice; + + /** + *The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ * @public + */ + PurchaseTime?: Date; +} + +/** + *Contains the output of PurchaseReservedInstancesOffering.
+ * @public + */ +export interface PurchaseReservedInstancesOfferingResult { + /** + *The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted + * pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing + * pricing tiers in the Amazon Elastic Compute Cloud User Guide.
+ * @public + */ + ReservedInstancesId?: string; +} + +/** + *Describes a request to purchase Scheduled Instances.
+ * @public + */ +export interface PurchaseRequest { + /** + *The number of instances.
+ * @public + */ + InstanceCount: number | undefined; + + /** + *The purchase token.
+ * @public + */ + PurchaseToken: string | undefined; +} + +/** + *Contains the parameters for PurchaseScheduledInstances.
+ * @public + */ +export interface PurchaseScheduledInstancesRequest { + /** + *Unique, case-sensitive identifier that ensures the idempotency of the request. + * For more information, see Ensuring Idempotency.
+ * @public + */ + ClientToken?: string; + + /** + *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
.
The purchase requests.
+ * @public + */ + PurchaseRequests: PurchaseRequest[] | undefined; +} + +/** + *Contains the output of PurchaseScheduledInstances.
+ * @public + */ +export interface PurchaseScheduledInstancesResult { + /** + *Information about the Scheduled Instances.
+ * @public + */ + ScheduledInstanceSet?: ScheduledInstance[]; +} + +/** + * @public + */ +export interface RebootInstancesRequest { + /** + *The instance IDs.
+ * @public + */ + InstanceIds: string[] | undefined; + + /** + *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
.
Contains the parameters for RegisterImage.
* @public @@ -2490,30 +2678,37 @@ export interface InstanceMetadataOptionsRequest { *
- * optional
- IMDSv2 is optional. You can choose whether to send a
- * session token in your instance metadata retrieval requests. If you retrieve
- * IAM role credentials without a session token, you receive the IMDSv1 role
- * credentials. If you retrieve IAM role credentials using a valid session token,
- * you receive the IMDSv2 role credentials.
optional
- IMDSv2 is optional, which means that you can use
+ * either IMDSv2 or IMDSv1.
*
- * required
- IMDSv2 is required. You must send a session token
- * in your instance metadata retrieval requests. With this option, retrieving the
- * IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are
- * not available.
required
- IMDSv2 is required, which means that IMDSv1 is
+ * disabled, and you must use IMDSv2.
+ * Default:
+ *If the value of ImdsSupport
for the Amazon Machine Image (AMI)
+ * for your instance is v2.0
and the account level default is set to
+ * no-preference
, the default is required
.
If the value of ImdsSupport
for the Amazon Machine Image (AMI)
+ * for your instance is v2.0
, but the account level default is set to
+ * V1 or V2
, the default is optional
.
Default: If the value of ImdsSupport
for the Amazon Machine Image (AMI)
- * for your instance is v2.0
, the default is required
.
The default value can also be affected by other combinations of parameters. For more + * information, see Order of precedence for instance metadata options in the + * Amazon EC2 User Guide.
* @public */ HttpTokens?: HttpTokensState; /** - *The desired HTTP PUT response hop limit for instance metadata requests. The larger the - * number, the further instance metadata requests can travel.
- *Default: 1
+ *The maximum number of hops that the metadata token can travel.
*Possible values: Integers from 1 to 64
* @public */ @@ -3714,7 +3909,8 @@ export interface SearchTransitGatewayRoutesRequest { Filters: Filter[] | undefined; /** - *The maximum number of routes to return.
+ *The maximum number of routes to return. If a value is not provided, the default is + * 1000.
* @public */ MaxResults?: number; diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 3a1ebe6819038..f381bf3f73db6 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -1507,6 +1507,10 @@ import { GetImageBlockPublicAccessStateCommandInput, GetImageBlockPublicAccessStateCommandOutput, } from "../commands/GetImageBlockPublicAccessStateCommand"; +import { + GetInstanceMetadataDefaultsCommandInput, + GetInstanceMetadataDefaultsCommandOutput, +} from "../commands/GetInstanceMetadataDefaultsCommand"; import { GetInstanceTypesFromInstanceRequirementsCommandInput, GetInstanceTypesFromInstanceRequirementsCommandOutput, @@ -1718,6 +1722,10 @@ import { ModifyInstanceMaintenanceOptionsCommandInput, ModifyInstanceMaintenanceOptionsCommandOutput, } from "../commands/ModifyInstanceMaintenanceOptionsCommand"; +import { + ModifyInstanceMetadataDefaultsCommandInput, + ModifyInstanceMetadataDefaultsCommandOutput, +} from "../commands/ModifyInstanceMetadataDefaultsCommand"; import { ModifyInstanceMetadataOptionsCommandInput, ModifyInstanceMetadataOptionsCommandOutput, @@ -3578,6 +3586,8 @@ import { GetHostReservationPurchasePreviewResult, GetImageBlockPublicAccessStateRequest, GetImageBlockPublicAccessStateResult, + GetInstanceMetadataDefaultsRequest, + GetInstanceMetadataDefaultsResult, GetInstanceTypesFromInstanceRequirementsRequest, GetInstanceTypesFromInstanceRequirementsResult, GetInstanceUefiDataRequest, @@ -3589,14 +3599,13 @@ import { GetIpamDiscoveredPublicAddressesRequest, InstanceEventWindowDisassociationRequest, InstanceFamilyCreditSpecification, + InstanceMetadataDefaultsResponse, InstanceTypeInfoFromInstanceRequirements, InstanceUsage, IntegrateServices, IpamAddressHistoryRecord, IpamDiscoveredAccount, IpamDiscoveryFailureReason, - IpamPublicAddressSecurityGroup, - IpamPublicAddressTag, Ipv6CidrAssociation, MetricPoint, PrivateDnsDetails, @@ -3717,6 +3726,8 @@ import { IpamCidrAuthorizationContext, IpamDiscoveredPublicAddress, IpamDiscoveredResourceCidr, + IpamPublicAddressSecurityGroup, + IpamPublicAddressTag, IpamPublicAddressTags, IpamResourceCidr, LaunchPermissionModifications, @@ -3763,6 +3774,8 @@ import { ModifyInstanceEventWindowResult, ModifyInstanceMaintenanceOptionsRequest, ModifyInstanceMaintenanceOptionsResult, + ModifyInstanceMetadataDefaultsRequest, + ModifyInstanceMetadataDefaultsResult, ModifyInstanceMetadataOptionsRequest, ModifyInstanceMetadataOptionsResult, ModifyInstancePlacementRequest, @@ -3877,17 +3890,9 @@ import { PurchaseCapacityBlockRequest, PurchaseCapacityBlockResult, PurchaseHostReservationRequest, - PurchaseHostReservationResult, - PurchaseRequest, - PurchaseReservedInstancesOfferingRequest, - PurchaseReservedInstancesOfferingResult, - PurchaseScheduledInstancesRequest, - PurchaseScheduledInstancesResult, - RebootInstancesRequest, RemoveIpamOperatingRegion, RemovePrefixListEntry, ReservationValue, - ReservedInstanceLimitPrice, ReservedInstanceReservationValue, SecurityGroupForVpc, SecurityGroupRuleRequest, @@ -3930,6 +3935,13 @@ import { LaunchTemplateSpecification, LicenseConfigurationRequest, PrivateDnsNameOptionsRequest, + PurchaseHostReservationResult, + PurchaseRequest, + PurchaseReservedInstancesOfferingRequest, + PurchaseReservedInstancesOfferingResult, + PurchaseScheduledInstancesRequest, + PurchaseScheduledInstancesResult, + RebootInstancesRequest, RegisterImageRequest, RegisterImageResult, RegisterInstanceEventNotificationAttributesRequest, @@ -3973,6 +3985,7 @@ import { RequestSpotInstancesRequest, RequestSpotInstancesResult, RequestSpotLaunchSpecification, + ReservedInstanceLimitPrice, ResetAddressAttributeRequest, ResetAddressAttributeResult, ResetEbsDefaultKmsKeyIdRequest, @@ -11535,6 +11548,23 @@ export const se_GetImageBlockPublicAccessStateCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2GetInstanceMetadataDefaultsCommand + */ +export const se_GetInstanceMetadataDefaultsCommand = async ( + input: GetInstanceMetadataDefaultsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_GetInstanceMetadataDefaultsRequest(input, context), + [_A]: _GIMD, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand */ @@ -12572,6 +12602,23 @@ export const se_ModifyInstanceMaintenanceOptionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2ModifyInstanceMetadataDefaultsCommand + */ +export const se_ModifyInstanceMetadataDefaultsCommand = async ( + input: ModifyInstanceMetadataDefaultsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ModifyInstanceMetadataDefaultsRequest(input, context), + [_A]: _MIMD, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2ModifyInstanceMetadataOptionsCommand */ @@ -23222,6 +23269,26 @@ export const de_GetImageBlockPublicAccessStateCommand = async ( return response; }; +/** + * deserializeAws_ec2GetInstanceMetadataDefaultsCommand + */ +export const de_GetInstanceMetadataDefaultsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseGets the default instance metadata service (IMDS) settings that are set at the account\n level in the specified Amazon Web Services\u2028 Region.
\nFor more information, see Order of precedence for instance metadata options in the\n Amazon EC2 User Guide.
" + } + }, + "com.amazonaws.ec2#GetInstanceMetadataDefaultsRequest": { + "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, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
The account-level default IMDS settings.
", + "smithy.api#xmlName": "accountLevel" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#GetInstanceTypesFromInstanceRequirements": { "type": "operation", "input": { @@ -55511,7 +55608,7 @@ "target": "com.amazonaws.ec2#String", "traits": { "aws.protocols#ec2QueryName": "ImageOwnerAlias", - "smithy.api#documentation": "The Amazon Web Services account alias (for example, amazon
, self
) or\n the Amazon Web Services account ID of the AMI owner.
The owner alias (amazon
| aws-marketplace
).
Indicates whether IMDSv2 is required.
\n\n optional
– IMDSv2 is optional, which means that you can\n use either IMDSv2 or IMDSv1.
\n required
– IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.
The maximum number of hops that the metadata token can travel.
", + "smithy.api#xmlName": "httpPutResponseHopLimit" + } + }, + "HttpEndpoint": { + "target": "com.amazonaws.ec2#InstanceMetadataEndpointState", + "traits": { + "aws.protocols#ec2QueryName": "HttpEndpoint", + "smithy.api#documentation": "Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance\n metadata can't be accessed.
", + "smithy.api#xmlName": "httpEndpoint" + } + }, + "InstanceMetadataTags": { + "target": "com.amazonaws.ec2#InstanceMetadataTagsState", + "traits": { + "aws.protocols#ec2QueryName": "InstanceMetadataTags", + "smithy.api#documentation": "Indicates whether access to instance tags from the instance metadata is enabled or\n disabled. For more information, see Work with\n instance tags using the instance metadata in the\n Amazon EC2 User Guide.
", + "smithy.api#xmlName": "instanceMetadataTags" + } + } + }, + "traits": { + "smithy.api#documentation": "The default instance metadata service (IMDS) settings that were set at the account\n level in the specified Amazon Web Services\u2028 Region.
" + } + }, "com.amazonaws.ec2#InstanceMetadataEndpointState": { "type": "enum", "members": { @@ -59121,13 +59258,13 @@ "HttpTokens": { "target": "com.amazonaws.ec2#HttpTokensState", "traits": { - "smithy.api#documentation": "Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional. You can choose whether to send a \n session token in your instance metadata retrieval requests. If you retrieve \n IAM role credentials without a session token, you receive the IMDSv1 role \n credentials. If you retrieve IAM role credentials using a valid session token, \n you receive the IMDSv2 role credentials.
\n required
- IMDSv2 is required. You must send a session token \n in your instance metadata retrieval requests. With this option, retrieving the \n IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are \n not available.
Default: If the value of ImdsSupport
for the Amazon Machine Image (AMI) \n for your instance is v2.0
, the default is required
.
Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional, which means that you can use\n either IMDSv2 or IMDSv1.
\n required
- IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.
Default:
\nIf the value of ImdsSupport
for the Amazon Machine Image (AMI)\n for your instance is v2.0
and the account level default is set to\n no-preference
, the default is required
.
If the value of ImdsSupport
for the Amazon Machine Image (AMI)\n for your instance is v2.0
, but the account level default is set to\n V1 or V2
, the default is optional
.
The default value can also be affected by other combinations of parameters. For more\n information, see Order of precedence for instance metadata options in the\n Amazon EC2 User Guide.
" } }, "HttpPutResponseHopLimit": { "target": "com.amazonaws.ec2#Integer", "traits": { - "smithy.api#documentation": "The desired HTTP PUT response hop limit for instance metadata requests. The larger the\n number, the further instance metadata requests can travel.
\nDefault: 1
\nPossible values: Integers from 1 to 64
" + "smithy.api#documentation": "The maximum number of hops that the metadata token can travel.
\nPossible values: Integers from 1 to 64
" } }, "HttpEndpoint": { @@ -59168,7 +59305,7 @@ "target": "com.amazonaws.ec2#HttpTokensState", "traits": { "aws.protocols#ec2QueryName": "HttpTokens", - "smithy.api#documentation": "Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional. You can choose whether to send a \n session token in your instance metadata retrieval requests. If you retrieve \n IAM role credentials without a session token, you receive the IMDSv1 role \n credentials. If you retrieve IAM role credentials using a valid session token, \n you receive the IMDSv2 role credentials.
\n required
- IMDSv2 is required. You must send a session token \n in your instance metadata retrieval requests. With this option, retrieving the \n IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are \n not available.
Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional, which means that you can use\n either IMDSv2 or IMDSv1.
\n required
- IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.
The desired HTTP PUT response hop limit for instance metadata requests. The larger the\n number, the further instance metadata requests can travel.
\nDefault: 1
\n
Possible values: Integers from 1
to 64
\n
The maximum number of hops that the metadata token can travel.
\nPossible values: Integers from 1
to 64
\n
Modifies the default instance metadata service (IMDS) settings at the account level in\n the specified Amazon Web Services\u2028 Region.
\nTo remove a parameter's account-level default setting, specify\n no-preference
. At instance launch, the value will come from the\n AMI, or from the launch parameter if specified. For more information, see Order of precedence for instance metadata options in the\n Amazon EC2 User Guide.
Indicates whether IMDSv2 is required.
\n\n optional
– IMDSv2 is optional, which means that you can\n use either IMDSv2 or IMDSv1.
\n required
– IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.
The maximum number of hops that the metadata token can travel.
\nMinimum: 1
\n
Maximum: 64
\n
Enables or disables the IMDS endpoint on an instance. When disabled, the instance\n metadata can't be accessed.
" + } + }, + "InstanceMetadataTags": { + "target": "com.amazonaws.ec2#DefaultInstanceMetadataTagsState", + "traits": { + "smithy.api#documentation": "Enables or disables access to an instance's tags from the instance metadata. For more\n information, see Work with\n instance tags using the instance metadata in the\n Amazon EC2 User Guide.
" + } + }, + "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, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation
. \n Otherwise, it is UnauthorizedOperation
.
If the request succeeds, the response returns true
. If the request fails,\n no response is returned, and instead an error message is returned.
Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional. You can choose whether to send a \n session token in your instance metadata retrieval requests. If you retrieve \n IAM role credentials without a session token, you receive the IMDSv1 role \n credentials. If you retrieve IAM role credentials using a valid session token, \n you receive the IMDSv2 role credentials.
\n required
- IMDSv2 is required. You must send a session token \n in your instance metadata retrieval requests. With this option, retrieving the \n IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are \n not available.
Default: If the value of ImdsSupport
for the Amazon Machine Image (AMI) \n for your instance is v2.0
, the default is required
.
Indicates whether IMDSv2 is required.
\n\n optional
- IMDSv2 is optional. You can choose whether to send a \n session token in your instance metadata retrieval requests. If you retrieve \n IAM role credentials without a session token, you receive the IMDSv1 role \n credentials. If you retrieve IAM role credentials using a valid session token, \n you receive the IMDSv2 role credentials.
\n required
- IMDSv2 is required. You must send a session token \n in your instance metadata retrieval requests. With this option, retrieving the \n IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are \n not available.
Default:
\nIf the value of ImdsSupport
for the Amazon Machine Image (AMI)\n for your instance is v2.0
and the account level default is set to\n no-preference
, the default is required
.
If the value of ImdsSupport
for the Amazon Machine Image (AMI)\n for your instance is v2.0
, but the account level default is set to\n V1 or V2
, the default is optional
.
The default value can also be affected by other combinations of parameters. For more\n information, see Order of precedence for instance metadata options in the\n Amazon EC2 User Guide.
" } }, "HttpPutResponseHopLimit": { @@ -92699,7 +92925,7 @@ "MaxResults": { "target": "com.amazonaws.ec2#TransitGatewayMaxResults", "traits": { - "smithy.api#documentation": "The maximum number of routes to return.
" + "smithy.api#documentation": "The maximum number of routes to return. If a value is not provided, the default is\n 1000.
" } }, "DryRun": {