diff --git a/clients/client-ec2/README.md b/clients/client-ec2/README.md index 9c9817cf264f..1362d5cd1c1a 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/) + +
+ +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 7c83e0c8bd4d..996565e2a677 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; + getInstanceMetadataDefaults( + args: GetInstanceMetadataDefaultsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getInstanceMetadataDefaults( + args: GetInstanceMetadataDefaultsCommandInput, + cb: (err: any, data?: GetInstanceMetadataDefaultsCommandOutput) => void + ): void; + getInstanceMetadataDefaults( + args: GetInstanceMetadataDefaultsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetInstanceMetadataDefaultsCommandOutput) => void + ): void; + /** * @see {@link GetInstanceTypesFromInstanceRequirementsCommand} */ @@ -12028,6 +12058,24 @@ export interface EC2 { cb: (err: any, data?: ModifyInstanceMaintenanceOptionsCommandOutput) => void ): void; + /** + * @see {@link ModifyInstanceMetadataDefaultsCommand} + */ + modifyInstanceMetadataDefaults(): Promise; + modifyInstanceMetadataDefaults( + args: ModifyInstanceMetadataDefaultsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + modifyInstanceMetadataDefaults( + args: ModifyInstanceMetadataDefaultsCommandInput, + cb: (err: any, data?: ModifyInstanceMetadataDefaultsCommandOutput) => void + ): void; + modifyInstanceMetadataDefaults( + args: ModifyInstanceMetadataDefaultsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ModifyInstanceMetadataDefaultsCommandOutput) => void + ): void; + /** * @see {@link ModifyInstanceMetadataOptionsCommand} */ diff --git a/clients/client-ec2/src/EC2Client.ts b/clients/client-ec2/src/EC2Client.ts index 23438774dfb6..6d00d6dfbfdb 100644 --- a/clients/client-ec2/src/EC2Client.ts +++ b/clients/client-ec2/src/EC2Client.ts @@ -1537,6 +1537,10 @@ import { GetImageBlockPublicAccessStateCommandInput, GetImageBlockPublicAccessStateCommandOutput, } from "./commands/GetImageBlockPublicAccessStateCommand"; +import { + GetInstanceMetadataDefaultsCommandInput, + GetInstanceMetadataDefaultsCommandOutput, +} from "./commands/GetInstanceMetadataDefaultsCommand"; import { GetInstanceTypesFromInstanceRequirementsCommandInput, GetInstanceTypesFromInstanceRequirementsCommandOutput, @@ -1748,6 +1752,10 @@ import { ModifyInstanceMaintenanceOptionsCommandInput, ModifyInstanceMaintenanceOptionsCommandOutput, } from "./commands/ModifyInstanceMaintenanceOptionsCommand"; +import { + ModifyInstanceMetadataDefaultsCommandInput, + ModifyInstanceMetadataDefaultsCommandOutput, +} from "./commands/ModifyInstanceMetadataDefaultsCommand"; import { ModifyInstanceMetadataOptionsCommandInput, ModifyInstanceMetadataOptionsCommandOutput, @@ -2588,6 +2596,7 @@ export type ServiceInputTypes = | GetGroupsForCapacityReservationCommandInput | GetHostReservationPurchasePreviewCommandInput | GetImageBlockPublicAccessStateCommandInput + | GetInstanceMetadataDefaultsCommandInput | GetInstanceTypesFromInstanceRequirementsCommandInput | GetInstanceUefiDataCommandInput | GetIpamAddressHistoryCommandInput @@ -2649,6 +2658,7 @@ export type ServiceInputTypes = | ModifyInstanceEventStartTimeCommandInput | ModifyInstanceEventWindowCommandInput | ModifyInstanceMaintenanceOptionsCommandInput + | ModifyInstanceMetadataDefaultsCommandInput | ModifyInstanceMetadataOptionsCommandInput | ModifyInstancePlacementCommandInput | ModifyIpamCommandInput @@ -3209,6 +3219,7 @@ export type ServiceOutputTypes = | GetGroupsForCapacityReservationCommandOutput | GetHostReservationPurchasePreviewCommandOutput | GetImageBlockPublicAccessStateCommandOutput + | GetInstanceMetadataDefaultsCommandOutput | GetInstanceTypesFromInstanceRequirementsCommandOutput | GetInstanceUefiDataCommandOutput | GetIpamAddressHistoryCommandOutput @@ -3270,6 +3281,7 @@ export type ServiceOutputTypes = | ModifyInstanceEventStartTimeCommandOutput | ModifyInstanceEventWindowCommandOutput | ModifyInstanceMaintenanceOptionsCommandOutput + | ModifyInstanceMetadataDefaultsCommandOutput | ModifyInstanceMetadataOptionsCommandOutput | ModifyInstancePlacementCommandOutput | ModifyIpamCommandOutput diff --git a/clients/client-ec2/src/commands/GetInstanceMetadataDefaultsCommand.ts b/clients/client-ec2/src/commands/GetInstanceMetadataDefaultsCommand.ts new file mode 100644 index 000000000000..5647a107f8e8 --- /dev/null +++ b/clients/client-ec2/src/commands/GetInstanceMetadataDefaultsCommand.ts @@ -0,0 +1,89 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetInstanceMetadataDefaultsRequest, GetInstanceMetadataDefaultsResult } from "../models/models_5"; +import { de_GetInstanceMetadataDefaultsCommand, se_GetInstanceMetadataDefaultsCommand } from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetInstanceMetadataDefaultsCommand}. + */ +export interface GetInstanceMetadataDefaultsCommandInput extends GetInstanceMetadataDefaultsRequest {} +/** + * @public + * + * The output of {@link GetInstanceMetadataDefaultsCommand}. + */ +export interface GetInstanceMetadataDefaultsCommandOutput extends GetInstanceMetadataDefaultsResult, __MetadataBearer {} + +/** + *

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.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EC2Client, GetInstanceMetadataDefaultsCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, GetInstanceMetadataDefaultsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // GetInstanceMetadataDefaultsRequest + * DryRun: true || false, + * }; + * const command = new GetInstanceMetadataDefaultsCommand(input); + * const response = await client.send(command); + * // { // GetInstanceMetadataDefaultsResult + * // AccountLevel: { // InstanceMetadataDefaultsResponse + * // HttpTokens: "optional" || "required", + * // HttpPutResponseHopLimit: Number("int"), + * // HttpEndpoint: "disabled" || "enabled", + * // InstanceMetadataTags: "disabled" || "enabled", + * // }, + * // }; + * + * ``` + * + * @param GetInstanceMetadataDefaultsCommandInput - {@link GetInstanceMetadataDefaultsCommandInput} + * @returns {@link GetInstanceMetadataDefaultsCommandOutput} + * @see {@link GetInstanceMetadataDefaultsCommandInput} for command's `input` shape. + * @see {@link GetInstanceMetadataDefaultsCommandOutput} 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.

+ * + * @public + */ +export class GetInstanceMetadataDefaultsCommand extends $Command + .classBuilder< + GetInstanceMetadataDefaultsCommandInput, + GetInstanceMetadataDefaultsCommandOutput, + EC2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonEC2", "GetInstanceMetadataDefaults", {}) + .n("EC2Client", "GetInstanceMetadataDefaultsCommand") + .f(void 0, void 0) + .ser(se_GetInstanceMetadataDefaultsCommand) + .de(de_GetInstanceMetadataDefaultsCommand) + .build() {} diff --git a/clients/client-ec2/src/commands/ModifyInstanceMetadataDefaultsCommand.ts b/clients/client-ec2/src/commands/ModifyInstanceMetadataDefaultsCommand.ts new file mode 100644 index 000000000000..350e6e75eeb4 --- /dev/null +++ b/clients/client-ec2/src/commands/ModifyInstanceMetadataDefaultsCommand.ts @@ -0,0 +1,97 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ModifyInstanceMetadataDefaultsRequest, ModifyInstanceMetadataDefaultsResult } from "../models/models_6"; +import { + de_ModifyInstanceMetadataDefaultsCommand, + se_ModifyInstanceMetadataDefaultsCommand, +} from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ModifyInstanceMetadataDefaultsCommand}. + */ +export interface ModifyInstanceMetadataDefaultsCommandInput extends ModifyInstanceMetadataDefaultsRequest {} +/** + * @public + * + * The output of {@link ModifyInstanceMetadataDefaultsCommand}. + */ +export interface ModifyInstanceMetadataDefaultsCommandOutput + extends ModifyInstanceMetadataDefaultsResult, + __MetadataBearer {} + +/** + *

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

+ *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { EC2Client, ModifyInstanceMetadataDefaultsCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, ModifyInstanceMetadataDefaultsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // ModifyInstanceMetadataDefaultsRequest + * HttpTokens: "optional" || "required" || "no-preference", + * HttpPutResponseHopLimit: Number("int"), + * HttpEndpoint: "disabled" || "enabled" || "no-preference", + * InstanceMetadataTags: "disabled" || "enabled" || "no-preference", + * DryRun: true || false, + * }; + * const command = new ModifyInstanceMetadataDefaultsCommand(input); + * const response = await client.send(command); + * // { // ModifyInstanceMetadataDefaultsResult + * // Return: true || false, + * // }; + * + * ``` + * + * @param ModifyInstanceMetadataDefaultsCommandInput - {@link ModifyInstanceMetadataDefaultsCommandInput} + * @returns {@link ModifyInstanceMetadataDefaultsCommandOutput} + * @see {@link ModifyInstanceMetadataDefaultsCommandInput} for command's `input` shape. + * @see {@link ModifyInstanceMetadataDefaultsCommandOutput} 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.

+ * + * @public + */ +export class ModifyInstanceMetadataDefaultsCommand extends $Command + .classBuilder< + ModifyInstanceMetadataDefaultsCommandInput, + ModifyInstanceMetadataDefaultsCommandOutput, + EC2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonEC2", "ModifyInstanceMetadataDefaults", {}) + .n("EC2Client", "ModifyInstanceMetadataDefaultsCommand") + .f(void 0, void 0) + .ser(se_ModifyInstanceMetadataDefaultsCommand) + .de(de_ModifyInstanceMetadataDefaultsCommand) + .build() {} diff --git a/clients/client-ec2/src/commands/PurchaseHostReservationCommand.ts b/clients/client-ec2/src/commands/PurchaseHostReservationCommand.ts index 95e237c65278..9319f24ae648 100644 --- a/clients/client-ec2/src/commands/PurchaseHostReservationCommand.ts +++ b/clients/client-ec2/src/commands/PurchaseHostReservationCommand.ts @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { PurchaseHostReservationRequest, PurchaseHostReservationResult } from "../models/models_6"; +import { PurchaseHostReservationRequest } from "../models/models_6"; +import { PurchaseHostReservationResult } from "../models/models_7"; import { de_PurchaseHostReservationCommand, se_PurchaseHostReservationCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts b/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts index 90bf5e8672b4..e59b575422bf 100644 --- a/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts +++ b/clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { PurchaseReservedInstancesOfferingRequest, PurchaseReservedInstancesOfferingResult } from "../models/models_6"; +import { PurchaseReservedInstancesOfferingRequest, PurchaseReservedInstancesOfferingResult } from "../models/models_7"; import { de_PurchaseReservedInstancesOfferingCommand, se_PurchaseReservedInstancesOfferingCommand, diff --git a/clients/client-ec2/src/commands/PurchaseScheduledInstancesCommand.ts b/clients/client-ec2/src/commands/PurchaseScheduledInstancesCommand.ts index fef1a484d97c..ed88ddc4cf54 100644 --- a/clients/client-ec2/src/commands/PurchaseScheduledInstancesCommand.ts +++ b/clients/client-ec2/src/commands/PurchaseScheduledInstancesCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { PurchaseScheduledInstancesRequest, PurchaseScheduledInstancesResult } from "../models/models_6"; +import { PurchaseScheduledInstancesRequest, PurchaseScheduledInstancesResult } from "../models/models_7"; import { de_PurchaseScheduledInstancesCommand, se_PurchaseScheduledInstancesCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RebootInstancesCommand.ts b/clients/client-ec2/src/commands/RebootInstancesCommand.ts index f2825c0d3cb0..8127705127ee 100644 --- a/clients/client-ec2/src/commands/RebootInstancesCommand.ts +++ b/clients/client-ec2/src/commands/RebootInstancesCommand.ts @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { RebootInstancesRequest } from "../models/models_6"; +import { RebootInstancesRequest } from "../models/models_7"; import { de_RebootInstancesCommand, se_RebootInstancesCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/index.ts b/clients/client-ec2/src/commands/index.ts index 66e11af0028b..b40698b450ed 100644 --- a/clients/client-ec2/src/commands/index.ts +++ b/clients/client-ec2/src/commands/index.ts @@ -439,6 +439,7 @@ export * from "./GetFlowLogsIntegrationTemplateCommand"; export * from "./GetGroupsForCapacityReservationCommand"; export * from "./GetHostReservationPurchasePreviewCommand"; export * from "./GetImageBlockPublicAccessStateCommand"; +export * from "./GetInstanceMetadataDefaultsCommand"; export * from "./GetInstanceTypesFromInstanceRequirementsCommand"; export * from "./GetInstanceUefiDataCommand"; export * from "./GetIpamAddressHistoryCommand"; @@ -500,6 +501,7 @@ export * from "./ModifyInstanceCreditSpecificationCommand"; export * from "./ModifyInstanceEventStartTimeCommand"; export * from "./ModifyInstanceEventWindowCommand"; export * from "./ModifyInstanceMaintenanceOptionsCommand"; +export * from "./ModifyInstanceMetadataDefaultsCommand"; export * from "./ModifyInstanceMetadataOptionsCommand"; export * from "./ModifyInstancePlacementCommand"; export * from "./ModifyIpamCommand"; diff --git a/clients/client-ec2/src/models/models_3.ts b/clients/client-ec2/src/models/models_3.ts index 5d91a9a11863..03c193bf9e6c 100644 --- a/clients/client-ec2/src/models/models_3.ts +++ b/clients/client-ec2/src/models/models_3.ts @@ -8978,8 +8978,7 @@ export interface Image { Hypervisor?: HypervisorType; /** - *

The Amazon Web Services account alias (for example, amazon, self) or - * the Amazon Web Services account ID of the AMI owner.

+ *

The owner alias (amazon | aws-marketplace).

* @public */ ImageOwnerAlias?: string; diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index 025945a32125..545706df4336 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -1873,18 +1873,13 @@ export interface InstanceMetadataOptionsResponse { *
    *
  • *

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

    *
  • *
* @public @@ -1892,10 +1887,7 @@ export interface InstanceMetadataOptionsResponse { 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 diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 6382f9ebbb81..e8532aea9d97 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -81,7 +81,14 @@ import { VirtualizationType, } from "./models_3"; -import { ArchitectureType, AttributeBooleanValue, RIProductDescription } from "./models_4"; +import { + ArchitectureType, + AttributeBooleanValue, + HttpTokensState, + InstanceMetadataEndpointState, + InstanceMetadataTagsState, + RIProductDescription, +} from "./models_4"; /** *

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.

+ * @public + */ + DryRun?: boolean; +} + +/** + *

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.

    + *
  • + *
+ * @public + */ + HttpTokens?: HttpTokensState; + + /** + *

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 aef05bb6313b..240d306155f1 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.

    + *
  • + *
+ * @public + */ + HttpTokens?: MetadataDefaultHttpTokensState; + + /** + *

The maximum number of hops that the metadata token can travel.

+ *

Minimum: 1 + *

+ *

Maximum: 64 + *

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

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.

+ * @public + */ + DryRun?: boolean; +} + +/** + * @public + */ +export interface ModifyInstanceMetadataDefaultsResult { + /** + *

If the request succeeds, the response returns true. If the request fails, + * no response is returned, and instead an error message is returned.

+ * @public + */ + Return?: boolean; +} + /** * @public */ @@ -5424,8 +5594,22 @@ export interface ModifyInstanceMetadataOptionsRequest { * not available.

* * - *

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.

- * @public - */ - CurrencyCode?: CurrencyCodeValues; - - /** - *

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.

- * @public - */ - CurrencyCode?: CurrencyCodeValues; -} - -/** - *

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.

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

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.

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

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.

- * @public - */ - DryRun?: boolean; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_7.ts b/clients/client-ec2/src/models/models_7.ts index 1369346c6468..7e16f85a7965 100644 --- a/clients/client-ec2/src/models/models_7.ts +++ b/clients/client-ec2/src/models/models_7.ts @@ -7,6 +7,7 @@ import { AddressAttributeName, ByoipCidr, ClientVpnAuthorizationRuleStatus, + CurrencyCodeValues, IamInstanceProfileAssociation, IamInstanceProfileSpecification, IpPermission, @@ -63,6 +64,7 @@ import { NetworkInsightsAccessScopeAnalysis, NetworkInsightsAnalysis, RunInstancesMonitoringEnabled, + ScheduledInstance, SnapshotAttributeName, SpotFleetRequestConfigData, SpotFleetRequestConfigDataFilterSensitiveLog, @@ -71,8 +73,194 @@ import { SpotPlacement, } from "./models_4"; +import { Purchase } from "./models_5"; + import { CapacityReservationSpecification, InstanceMonitoring, Status } from "./models_6"; +/** + * @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.

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

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.

+ * @public + */ + CurrencyCode?: CurrencyCodeValues; +} + +/** + *

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.

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

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.

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

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.

+ * @public + */ + DryRun?: boolean; +} + /** *

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 3a1ebe681903..f381bf3f73db 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 +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetInstanceMetadataDefaultsResult(data, context); + const response: GetInstanceMetadataDefaultsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand */ @@ -24430,6 +24497,26 @@ export const de_ModifyInstanceMaintenanceOptionsCommand = async ( return response; }; +/** + * deserializeAws_ec2ModifyInstanceMetadataDefaultsCommand + */ +export const de_ModifyInstanceMetadataDefaultsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ModifyInstanceMetadataDefaultsResult(data, context); + const response: ModifyInstanceMetadataDefaultsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_ec2ModifyInstanceMetadataOptionsCommand */ @@ -42006,6 +42093,20 @@ const se_GetImageBlockPublicAccessStateRequest = ( return entries; }; +/** + * serializeAws_ec2GetInstanceMetadataDefaultsRequest + */ +const se_GetInstanceMetadataDefaultsRequest = ( + input: GetInstanceMetadataDefaultsRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input[_DRr] != null) { + entries[_DRr] = input[_DRr]; + } + return entries; +}; + /** * serializeAws_ec2GetInstanceTypesFromInstanceRequirementsRequest */ @@ -46843,6 +46944,32 @@ const se_ModifyInstanceMaintenanceOptionsRequest = ( return entries; }; +/** + * serializeAws_ec2ModifyInstanceMetadataDefaultsRequest + */ +const se_ModifyInstanceMetadataDefaultsRequest = ( + input: ModifyInstanceMetadataDefaultsRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input[_HT] != null) { + entries[_HT] = input[_HT]; + } + if (input[_HPRHL] != null) { + entries[_HPRHL] = input[_HPRHL]; + } + if (input[_HE] != null) { + entries[_HE] = input[_HE]; + } + if (input[_IMT] != null) { + entries[_IMT] = input[_IMT]; + } + if (input[_DRr] != null) { + entries[_DRr] = input[_DRr]; + } + return entries; +}; + /** * serializeAws_ec2ModifyInstanceMetadataOptionsRequest */ @@ -66624,6 +66751,20 @@ const de_GetImageBlockPublicAccessStateResult = ( return contents; }; +/** + * deserializeAws_ec2GetInstanceMetadataDefaultsResult + */ +const de_GetInstanceMetadataDefaultsResult = ( + output: any, + context: __SerdeContext +): GetInstanceMetadataDefaultsResult => { + const contents: any = {}; + if (output[_aL] != null) { + contents[_ALc] = de_InstanceMetadataDefaultsResponse(output[_aL], context); + } + return contents; +}; + /** * deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsResult */ @@ -69088,6 +69229,29 @@ const de_InstanceMaintenanceOptions = (output: any, context: __SerdeContext): In return contents; }; +/** + * deserializeAws_ec2InstanceMetadataDefaultsResponse + */ +const de_InstanceMetadataDefaultsResponse = ( + output: any, + context: __SerdeContext +): InstanceMetadataDefaultsResponse => { + const contents: any = {}; + if (output[_hT] != null) { + contents[_HT] = __expectString(output[_hT]); + } + if (output[_hPRHL] != null) { + contents[_HPRHL] = __strictParseInt32(output[_hPRHL]) as number; + } + if (output[_hE] != null) { + contents[_HE] = __expectString(output[_hE]); + } + if (output[_iMT] != null) { + contents[_IMT] = __expectString(output[_iMT]); + } + return contents; +}; + /** * deserializeAws_ec2InstanceMetadataOptionsResponse */ @@ -73061,6 +73225,20 @@ const de_ModifyInstanceMaintenanceOptionsResult = ( return contents; }; +/** + * deserializeAws_ec2ModifyInstanceMetadataDefaultsResult + */ +const de_ModifyInstanceMetadataDefaultsResult = ( + output: any, + context: __SerdeContext +): ModifyInstanceMetadataDefaultsResult => { + const contents: any = {}; + if (output[_r] != null) { + contents[_Ret] = __parseBoolean(output[_r]); + } + return contents; +}; + /** * deserializeAws_ec2ModifyInstanceMetadataOptionsResult */ @@ -81976,8 +82154,8 @@ const de_VerifiedAccessInstanceLoggingConfiguration = ( if (output[_vAII] != null) { contents[_VAII] = __expectString(output[_vAII]); } - if (output[_aL] != null) { - contents[_AL] = de_VerifiedAccessLogs(output[_aL], context); + if (output[_aLc] != null) { + contents[_AL] = de_VerifiedAccessLogs(output[_aLc], context); } return contents; }; @@ -83421,6 +83599,7 @@ const _AIth = "AthenaIntegrations"; const _AIu = "AutoImport"; const _AL = "AccessLogs"; const _ALI = "AmiLaunchIndex"; +const _ALc = "AccountLevel"; const _AM = "AcceleratorManufacturers"; const _AMIT = "AllowsMultipleInstanceTypes"; const _AMNL = "AllocationMinNetmaskLength"; @@ -84411,6 +84590,7 @@ const _GIBPAS = "GetImageBlockPublicAccessState"; const _GIDA = "GetIpamDiscoveredAccounts"; const _GIDPA = "GetIpamDiscoveredPublicAddresses"; const _GIDRC = "GetIpamDiscoveredResourceCidrs"; +const _GIMD = "GetInstanceMetadataDefaults"; const _GIPA = "GetIpamPoolAllocations"; const _GIPC = "GetIpamPoolCidrs"; const _GIRC = "GetIpamResourceCidrs"; @@ -84850,6 +85030,7 @@ const _MIEST = "ModifyInstanceEventStartTime"; const _MIEW = "ModifyInstanceEventWindow"; const _MIF = "ModifyIdFormat"; const _MIIF = "ModifyIdentityIdFormat"; +const _MIMD = "ModifyInstanceMetadataDefaults"; const _MIMO = "ModifyInstanceMaintenanceOptions"; const _MIMOo = "ModifyInstanceMetadataOptions"; const _MIP = "ModifyInstancePlacement"; @@ -85918,8 +86099,9 @@ const _aIs = "associationId"; const _aIss = "assetId"; const _aIt = "attachmentId"; const _aIu = "autoImport"; -const _aL = "accessLogs"; +const _aL = "accountLevel"; const _aLI = "amiLaunchIndex"; +const _aLc = "accessLogs"; const _aMIT = "allowsMultipleInstanceTypes"; const _aMNL = "allocationMinNetmaskLength"; const _aMNLl = "allocationMaxNetmaskLength"; diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index e34df73d023a..b9da06b0e76d 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -3455,6 +3455,9 @@ { "target": "com.amazonaws.ec2#GetImageBlockPublicAccessState" }, + { + "target": "com.amazonaws.ec2#GetInstanceMetadataDefaults" + }, { "target": "com.amazonaws.ec2#GetInstanceTypesFromInstanceRequirements" }, @@ -3638,6 +3641,9 @@ { "target": "com.amazonaws.ec2#ModifyInstanceMaintenanceOptions" }, + { + "target": "com.amazonaws.ec2#ModifyInstanceMetadataDefaults" + }, { "target": "com.amazonaws.ec2#ModifyInstanceMetadataOptions" }, @@ -9195,6 +9201,9 @@ "com.amazonaws.ec2#BoxedDouble": { "type": "double" }, + "com.amazonaws.ec2#BoxedInteger": { + "type": "integer" + }, "com.amazonaws.ec2#BundleId": { "type": "string" }, @@ -22035,6 +22044,52 @@ } } }, + "com.amazonaws.ec2#DefaultInstanceMetadataEndpointState": { + "type": "enum", + "members": { + "disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled" + } + }, + "enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enabled" + } + }, + "no_preference": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no-preference" + } + } + } + }, + "com.amazonaws.ec2#DefaultInstanceMetadataTagsState": { + "type": "enum", + "members": { + "disabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled" + } + }, + "enabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enabled" + } + }, + "no_preference": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no-preference" + } + } + } + }, "com.amazonaws.ec2#DefaultNetworkCardIndex": { "type": "integer" }, @@ -51468,6 +51523,48 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#GetInstanceMetadataDefaults": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#GetInstanceMetadataDefaultsRequest" + }, + "output": { + "target": "com.amazonaws.ec2#GetInstanceMetadataDefaultsResult" + }, + "traits": { + "smithy.api#documentation": "

Gets the default instance metadata service (IMDS) settings that are set at the account\n level in the specified Amazon Web Services\u2028 Region.

\n

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

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#GetInstanceMetadataDefaultsResult": { + "type": "structure", + "members": { + "AccountLevel": { + "target": "com.amazonaws.ec2#InstanceMetadataDefaultsResponse", + "traits": { + "aws.protocols#ec2QueryName": "AccountLevel", + "smithy.api#documentation": "

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.

", + "smithy.api#documentation": "

The owner alias (amazon | aws-marketplace).

", "smithy.api#xmlName": "imageOwnerAlias" } }, @@ -59098,6 +59195,46 @@ } } }, + "com.amazonaws.ec2#InstanceMetadataDefaultsResponse": { + "type": "structure", + "members": { + "HttpTokens": { + "target": "com.amazonaws.ec2#HttpTokensState", + "traits": { + "aws.protocols#ec2QueryName": "HttpTokens", + "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \n

    \n optional – IMDSv2 is optional, which means that you can\n use either IMDSv2 or IMDSv1.

    \n
  • \n
  • \n

    \n required – IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.

    \n
  • \n
", + "smithy.api#xmlName": "httpTokens" + } + }, + "HttpPutResponseHopLimit": { + "target": "com.amazonaws.ec2#BoxedInteger", + "traits": { + "aws.protocols#ec2QueryName": "HttpPutResponseHopLimit", + "smithy.api#documentation": "

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
  • \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
  • \n
  • \n

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

    \n
  • \n
\n

Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) \n for your instance is v2.0, the default is required.

" + "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \n

    \n optional - IMDSv2 is optional, which means that you can use\n either IMDSv2 or IMDSv1.

    \n
  • \n
  • \n

    \n required - IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.

    \n
  • \n
\n

Default:

\n
    \n
  • \n

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

    \n
  • \n
  • \n

    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.

    \n
  • \n
\n

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.

\n

Default: 1

\n

Possible values: Integers from 1 to 64

" + "smithy.api#documentation": "

The maximum number of hops that the metadata token can travel.

\n

Possible 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
  • \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
  • \n
  • \n

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

    \n
  • \n
", + "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \n

    \n optional - IMDSv2 is optional, which means that you can use\n either IMDSv2 or IMDSv1.

    \n
  • \n
  • \n

    \n required - IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.

    \n
  • \n
", "smithy.api#xmlName": "httpTokens" } }, @@ -59176,7 +59313,7 @@ "target": "com.amazonaws.ec2#Integer", "traits": { "aws.protocols#ec2QueryName": "HttpPutResponseHopLimit", - "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.

\n

Default: 1\n

\n

Possible values: Integers from 1 to 64\n

", + "smithy.api#documentation": "

The maximum number of hops that the metadata token can travel.

\n

Possible values: Integers from 1 to 64\n

", "smithy.api#xmlName": "httpPutResponseHopLimit" } }, @@ -73289,6 +73426,29 @@ "com.amazonaws.ec2#MemorySize": { "type": "long" }, + "com.amazonaws.ec2#MetadataDefaultHttpTokensState": { + "type": "enum", + "members": { + "optional": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "optional" + } + }, + "required": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "required" + } + }, + "no_preference": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no-preference" + } + } + } + }, "com.amazonaws.ec2#MetricPoint": { "type": "structure", "members": { @@ -74848,6 +75008,72 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#ModifyInstanceMetadataDefaults": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#ModifyInstanceMetadataDefaultsRequest" + }, + "output": { + "target": "com.amazonaws.ec2#ModifyInstanceMetadataDefaultsResult" + }, + "traits": { + "smithy.api#documentation": "

Modifies the default instance metadata service (IMDS) settings at the account level in\n the specified Amazon Web Services\u2028 Region.

\n \n

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

\n
" + } + }, + "com.amazonaws.ec2#ModifyInstanceMetadataDefaultsRequest": { + "type": "structure", + "members": { + "HttpTokens": { + "target": "com.amazonaws.ec2#MetadataDefaultHttpTokensState", + "traits": { + "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \n

    \n optional – IMDSv2 is optional, which means that you can\n use either IMDSv2 or IMDSv1.

    \n
  • \n
  • \n

    \n required – IMDSv2 is required, which means that IMDSv1 is\n disabled, and you must use IMDSv2.

    \n
  • \n
" + } + }, + "HttpPutResponseHopLimit": { + "target": "com.amazonaws.ec2#BoxedInteger", + "traits": { + "smithy.api#documentation": "

The maximum number of hops that the metadata token can travel.

\n

Minimum: 1\n

\n

Maximum: 64\n

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

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.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#ModifyInstanceMetadataDefaultsResult": { + "type": "structure", + "members": { + "Return": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "aws.protocols#ec2QueryName": "Return", + "smithy.api#documentation": "

If the request succeeds, the response returns true. If the request fails,\n no response is returned, and instead an error message is returned.

", + "smithy.api#xmlName": "return" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#ModifyInstanceMetadataOptions": { "type": "operation", "input": { @@ -74874,7 +75100,7 @@ "HttpTokens": { "target": "com.amazonaws.ec2#HttpTokensState", "traits": { - "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \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
  • \n
  • \n

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

    \n
  • \n
\n

Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) \n for your instance is v2.0, the default is required.

" + "smithy.api#documentation": "

Indicates whether IMDSv2 is required.

\n
    \n
  • \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
  • \n
  • \n

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

    \n
  • \n
\n

Default:

\n
    \n
  • \n

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

    \n
  • \n
  • \n

    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.

    \n
  • \n
\n

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": {