From 052803455bd5838c040957ed30ae4e24c1384d41 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 12 Sep 2023 18:20:27 +0000 Subject: [PATCH] feat(client-ec2): This release adds support for restricting public sharing of AMIs through AMI Block Public Access --- clients/client-ec2/README.md | 24 + clients/client-ec2/src/EC2.ts | 69 ++ clients/client-ec2/src/EC2Client.ts | 18 + .../DisableImageBlockPublicAccessCommand.ts | 156 +++ .../EnableImageBlockPublicAccessCommand.ts | 156 +++ .../GetImageBlockPublicAccessStateCommand.ts | 156 +++ ...nectionDeviceSampleConfigurationCommand.ts | 2 +- .../GetVpnConnectionDeviceTypesCommand.ts | 2 +- .../GetVpnTunnelReplacementStatusCommand.ts | 2 +- .../src/commands/RunInstancesCommand.ts | 2 +- clients/client-ec2/src/commands/index.ts | 3 + clients/client-ec2/src/models/models_5.ts | 360 +++---- clients/client-ec2/src/models/models_6.ts | 934 +++++------------- clients/client-ec2/src/models/models_7.ts | 690 ++++++++++++- clients/client-ec2/src/protocols/Aws_ec2.ts | 308 +++++- codegen/sdk-codegen/aws-models/ec2.json | 396 ++++---- 16 files changed, 2172 insertions(+), 1106 deletions(-) create mode 100644 clients/client-ec2/src/commands/DisableImageBlockPublicAccessCommand.ts create mode 100644 clients/client-ec2/src/commands/EnableImageBlockPublicAccessCommand.ts create mode 100644 clients/client-ec2/src/commands/GetImageBlockPublicAccessStateCommand.ts diff --git a/clients/client-ec2/README.md b/clients/client-ec2/README.md index 2ad90654f7b1..e01c77b0aa21 100644 --- a/clients/client-ec2/README.md +++ b/clients/client-ec2/README.md @@ -3212,6 +3212,14 @@ DisableFastSnapshotRestores [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/disablefastsnapshotrestorescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/disablefastsnapshotrestorescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/disablefastsnapshotrestorescommandoutput.html) + +
+ +DisableImageBlockPublicAccess + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/disableimageblockpublicaccesscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/disableimageblockpublicaccesscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/disableimageblockpublicaccesscommandoutput.html) +
@@ -3420,6 +3428,14 @@ EnableFastSnapshotRestores [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/enablefastsnapshotrestorescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/enablefastsnapshotrestorescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/enablefastsnapshotrestorescommandoutput.html) +
+
+ +EnableImageBlockPublicAccess + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/enableimageblockpublicaccesscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/enableimageblockpublicaccesscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/enableimageblockpublicaccesscommandoutput.html) +
@@ -3628,6 +3644,14 @@ GetHostReservationPurchasePreview [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/gethostreservationpurchasepreviewcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/gethostreservationpurchasepreviewcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/gethostreservationpurchasepreviewcommandoutput.html) +
+
+ +GetImageBlockPublicAccessState + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/classes/getimageblockpublicaccessstatecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/getimageblockpublicaccessstatecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ec2/interfaces/getimageblockpublicaccessstatecommandoutput.html) +
diff --git a/clients/client-ec2/src/EC2.ts b/clients/client-ec2/src/EC2.ts index 7523332b3751..4088f6e4adc5 100644 --- a/clients/client-ec2/src/EC2.ts +++ b/clients/client-ec2/src/EC2.ts @@ -1823,6 +1823,11 @@ import { DisableFastSnapshotRestoresCommandInput, DisableFastSnapshotRestoresCommandOutput, } from "./commands/DisableFastSnapshotRestoresCommand"; +import { + DisableImageBlockPublicAccessCommand, + DisableImageBlockPublicAccessCommandInput, + DisableImageBlockPublicAccessCommandOutput, +} from "./commands/DisableImageBlockPublicAccessCommand"; import { DisableImageDeprecationCommand, DisableImageDeprecationCommandInput, @@ -1953,6 +1958,11 @@ import { EnableFastSnapshotRestoresCommandInput, EnableFastSnapshotRestoresCommandOutput, } from "./commands/EnableFastSnapshotRestoresCommand"; +import { + EnableImageBlockPublicAccessCommand, + EnableImageBlockPublicAccessCommandInput, + EnableImageBlockPublicAccessCommandOutput, +} from "./commands/EnableImageBlockPublicAccessCommand"; import { EnableImageDeprecationCommand, EnableImageDeprecationCommandInput, @@ -2079,6 +2089,11 @@ import { GetHostReservationPurchasePreviewCommandInput, GetHostReservationPurchasePreviewCommandOutput, } from "./commands/GetHostReservationPurchasePreviewCommand"; +import { + GetImageBlockPublicAccessStateCommand, + GetImageBlockPublicAccessStateCommandInput, + GetImageBlockPublicAccessStateCommandOutput, +} from "./commands/GetImageBlockPublicAccessStateCommand"; import { GetInstanceTypesFromInstanceRequirementsCommand, GetInstanceTypesFromInstanceRequirementsCommandInput, @@ -3284,6 +3299,7 @@ const commands = { DisableEbsEncryptionByDefaultCommand, DisableFastLaunchCommand, DisableFastSnapshotRestoresCommand, + DisableImageBlockPublicAccessCommand, DisableImageDeprecationCommand, DisableIpamOrganizationAdminAccountCommand, DisableSerialConsoleAccessCommand, @@ -3310,6 +3326,7 @@ const commands = { EnableEbsEncryptionByDefaultCommand, EnableFastLaunchCommand, EnableFastSnapshotRestoresCommand, + EnableImageBlockPublicAccessCommand, EnableImageDeprecationCommand, EnableIpamOrganizationAdminAccountCommand, EnableReachabilityAnalyzerOrganizationSharingCommand, @@ -3336,6 +3353,7 @@ const commands = { GetFlowLogsIntegrationTemplateCommand, GetGroupsForCapacityReservationCommand, GetHostReservationPurchasePreviewCommand, + GetImageBlockPublicAccessStateCommand, GetInstanceTypesFromInstanceRequirementsCommand, GetInstanceUefiDataCommand, GetIpamAddressHistoryCommand, @@ -9618,6 +9636,23 @@ export interface EC2 { cb: (err: any, data?: DisableFastSnapshotRestoresCommandOutput) => void ): void; + /** + * @see {@link DisableImageBlockPublicAccessCommand} + */ + disableImageBlockPublicAccess( + args: DisableImageBlockPublicAccessCommandInput, + options?: __HttpHandlerOptions + ): Promise; + disableImageBlockPublicAccess( + args: DisableImageBlockPublicAccessCommandInput, + cb: (err: any, data?: DisableImageBlockPublicAccessCommandOutput) => void + ): void; + disableImageBlockPublicAccess( + args: DisableImageBlockPublicAccessCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisableImageBlockPublicAccessCommandOutput) => void + ): void; + /** * @see {@link DisableImageDeprecationCommand} */ @@ -10060,6 +10095,23 @@ export interface EC2 { cb: (err: any, data?: EnableFastSnapshotRestoresCommandOutput) => void ): void; + /** + * @see {@link EnableImageBlockPublicAccessCommand} + */ + enableImageBlockPublicAccess( + args: EnableImageBlockPublicAccessCommandInput, + options?: __HttpHandlerOptions + ): Promise; + enableImageBlockPublicAccess( + args: EnableImageBlockPublicAccessCommandInput, + cb: (err: any, data?: EnableImageBlockPublicAccessCommandOutput) => void + ): void; + enableImageBlockPublicAccess( + args: EnableImageBlockPublicAccessCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: EnableImageBlockPublicAccessCommandOutput) => void + ): void; + /** * @see {@link EnableImageDeprecationCommand} */ @@ -10493,6 +10545,23 @@ export interface EC2 { cb: (err: any, data?: GetHostReservationPurchasePreviewCommandOutput) => void ): void; + /** + * @see {@link GetImageBlockPublicAccessStateCommand} + */ + getImageBlockPublicAccessState( + args: GetImageBlockPublicAccessStateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getImageBlockPublicAccessState( + args: GetImageBlockPublicAccessStateCommandInput, + cb: (err: any, data?: GetImageBlockPublicAccessStateCommandOutput) => void + ): void; + getImageBlockPublicAccessState( + args: GetImageBlockPublicAccessStateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetImageBlockPublicAccessStateCommandOutput) => void + ): void; + /** * @see {@link GetInstanceTypesFromInstanceRequirementsCommand} */ diff --git a/clients/client-ec2/src/EC2Client.ts b/clients/client-ec2/src/EC2Client.ts index ee8141d9e8c4..c209a5785d2c 100644 --- a/clients/client-ec2/src/EC2Client.ts +++ b/clients/client-ec2/src/EC2Client.ts @@ -1293,6 +1293,10 @@ import { DisableFastSnapshotRestoresCommandInput, DisableFastSnapshotRestoresCommandOutput, } from "./commands/DisableFastSnapshotRestoresCommand"; +import { + DisableImageBlockPublicAccessCommandInput, + DisableImageBlockPublicAccessCommandOutput, +} from "./commands/DisableImageBlockPublicAccessCommand"; import { DisableImageDeprecationCommandInput, DisableImageDeprecationCommandOutput, @@ -1394,6 +1398,10 @@ import { EnableFastSnapshotRestoresCommandInput, EnableFastSnapshotRestoresCommandOutput, } from "./commands/EnableFastSnapshotRestoresCommand"; +import { + EnableImageBlockPublicAccessCommandInput, + EnableImageBlockPublicAccessCommandOutput, +} from "./commands/EnableImageBlockPublicAccessCommand"; import { EnableImageDeprecationCommandInput, EnableImageDeprecationCommandOutput, @@ -1486,6 +1494,10 @@ import { GetHostReservationPurchasePreviewCommandInput, GetHostReservationPurchasePreviewCommandOutput, } from "./commands/GetHostReservationPurchasePreviewCommand"; +import { + GetImageBlockPublicAccessStateCommandInput, + GetImageBlockPublicAccessStateCommandOutput, +} from "./commands/GetImageBlockPublicAccessStateCommand"; import { GetInstanceTypesFromInstanceRequirementsCommandInput, GetInstanceTypesFromInstanceRequirementsCommandOutput, @@ -2448,6 +2460,7 @@ export type ServiceInputTypes = | DisableEbsEncryptionByDefaultCommandInput | DisableFastLaunchCommandInput | DisableFastSnapshotRestoresCommandInput + | DisableImageBlockPublicAccessCommandInput | DisableImageDeprecationCommandInput | DisableIpamOrganizationAdminAccountCommandInput | DisableSerialConsoleAccessCommandInput @@ -2474,6 +2487,7 @@ export type ServiceInputTypes = | EnableEbsEncryptionByDefaultCommandInput | EnableFastLaunchCommandInput | EnableFastSnapshotRestoresCommandInput + | EnableImageBlockPublicAccessCommandInput | EnableImageDeprecationCommandInput | EnableIpamOrganizationAdminAccountCommandInput | EnableReachabilityAnalyzerOrganizationSharingCommandInput @@ -2500,6 +2514,7 @@ export type ServiceInputTypes = | GetFlowLogsIntegrationTemplateCommandInput | GetGroupsForCapacityReservationCommandInput | GetHostReservationPurchasePreviewCommandInput + | GetImageBlockPublicAccessStateCommandInput | GetInstanceTypesFromInstanceRequirementsCommandInput | GetInstanceUefiDataCommandInput | GetIpamAddressHistoryCommandInput @@ -3047,6 +3062,7 @@ export type ServiceOutputTypes = | DisableEbsEncryptionByDefaultCommandOutput | DisableFastLaunchCommandOutput | DisableFastSnapshotRestoresCommandOutput + | DisableImageBlockPublicAccessCommandOutput | DisableImageDeprecationCommandOutput | DisableIpamOrganizationAdminAccountCommandOutput | DisableSerialConsoleAccessCommandOutput @@ -3073,6 +3089,7 @@ export type ServiceOutputTypes = | EnableEbsEncryptionByDefaultCommandOutput | EnableFastLaunchCommandOutput | EnableFastSnapshotRestoresCommandOutput + | EnableImageBlockPublicAccessCommandOutput | EnableImageDeprecationCommandOutput | EnableIpamOrganizationAdminAccountCommandOutput | EnableReachabilityAnalyzerOrganizationSharingCommandOutput @@ -3099,6 +3116,7 @@ export type ServiceOutputTypes = | GetFlowLogsIntegrationTemplateCommandOutput | GetGroupsForCapacityReservationCommandOutput | GetHostReservationPurchasePreviewCommandOutput + | GetImageBlockPublicAccessStateCommandOutput | GetInstanceTypesFromInstanceRequirementsCommandOutput | GetInstanceUefiDataCommandOutput | GetIpamAddressHistoryCommandOutput diff --git a/clients/client-ec2/src/commands/DisableImageBlockPublicAccessCommand.ts b/clients/client-ec2/src/commands/DisableImageBlockPublicAccessCommand.ts new file mode 100644 index 000000000000..91db27236af1 --- /dev/null +++ b/clients/client-ec2/src/commands/DisableImageBlockPublicAccessCommand.ts @@ -0,0 +1,156 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { DisableImageBlockPublicAccessRequest, DisableImageBlockPublicAccessResult } from "../models/models_5"; +import { de_DisableImageBlockPublicAccessCommand, se_DisableImageBlockPublicAccessCommand } from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DisableImageBlockPublicAccessCommand}. + */ +export interface DisableImageBlockPublicAccessCommandInput extends DisableImageBlockPublicAccessRequest {} +/** + * @public + * + * The output of {@link DisableImageBlockPublicAccessCommand}. + */ +export interface DisableImageBlockPublicAccessCommandOutput + extends DisableImageBlockPublicAccessResult, + __MetadataBearer {} + +/** + * @public + *

Disables block public access for AMIs at the account level in the + * specified Amazon Web Services Region. This removes the block public access restriction + * from your account. With the restriction removed, you can publicly share your AMIs in the + * specified Amazon Web Services Region.

+ *

The API can take up to 10 minutes to configure this setting. During this time, if you run + * GetImageBlockPublicAccessState, the response will be + * block-new-sharing. When the API has completed the configuration, the response + * will be unblocked.

+ *

For more information, see Block public access to your AMIs 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, DisableImageBlockPublicAccessCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, DisableImageBlockPublicAccessCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // DisableImageBlockPublicAccessRequest + * DryRun: true || false, + * }; + * const command = new DisableImageBlockPublicAccessCommand(input); + * const response = await client.send(command); + * // { // DisableImageBlockPublicAccessResult + * // ImageBlockPublicAccessState: "unblocked", + * // }; + * + * ``` + * + * @param DisableImageBlockPublicAccessCommandInput - {@link DisableImageBlockPublicAccessCommandInput} + * @returns {@link DisableImageBlockPublicAccessCommandOutput} + * @see {@link DisableImageBlockPublicAccessCommandInput} for command's `input` shape. + * @see {@link DisableImageBlockPublicAccessCommandOutput} 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.

+ * + */ +export class DisableImageBlockPublicAccessCommand extends $Command< + DisableImageBlockPublicAccessCommandInput, + DisableImageBlockPublicAccessCommandOutput, + EC2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DisableImageBlockPublicAccessCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EC2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DisableImageBlockPublicAccessCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EC2Client"; + const commandName = "DisableImageBlockPublicAccessCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DisableImageBlockPublicAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DisableImageBlockPublicAccessCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DisableImageBlockPublicAccessCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-ec2/src/commands/EnableImageBlockPublicAccessCommand.ts b/clients/client-ec2/src/commands/EnableImageBlockPublicAccessCommand.ts new file mode 100644 index 000000000000..b5fd9c6e6211 --- /dev/null +++ b/clients/client-ec2/src/commands/EnableImageBlockPublicAccessCommand.ts @@ -0,0 +1,156 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { EnableImageBlockPublicAccessRequest, EnableImageBlockPublicAccessResult } from "../models/models_5"; +import { de_EnableImageBlockPublicAccessCommand, se_EnableImageBlockPublicAccessCommand } from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link EnableImageBlockPublicAccessCommand}. + */ +export interface EnableImageBlockPublicAccessCommandInput extends EnableImageBlockPublicAccessRequest {} +/** + * @public + * + * The output of {@link EnableImageBlockPublicAccessCommand}. + */ +export interface EnableImageBlockPublicAccessCommandOutput + extends EnableImageBlockPublicAccessResult, + __MetadataBearer {} + +/** + * @public + *

Enables block public access for AMIs at the account level in the + * specified Amazon Web Services Region. This prevents the public sharing of your AMIs. However, if you already + * have public AMIs, they will remain publicly available.

+ *

The API can take up to 10 minutes to configure this setting. During this time, if you run + * GetImageBlockPublicAccessState, the response will be unblocked. When + * the API has completed the configuration, the response will be + * block-new-sharing.

+ *

For more information, see Block + * public access to your AMIs 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, EnableImageBlockPublicAccessCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, EnableImageBlockPublicAccessCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // EnableImageBlockPublicAccessRequest + * ImageBlockPublicAccessState: "block-new-sharing", // required + * DryRun: true || false, + * }; + * const command = new EnableImageBlockPublicAccessCommand(input); + * const response = await client.send(command); + * // { // EnableImageBlockPublicAccessResult + * // ImageBlockPublicAccessState: "block-new-sharing", + * // }; + * + * ``` + * + * @param EnableImageBlockPublicAccessCommandInput - {@link EnableImageBlockPublicAccessCommandInput} + * @returns {@link EnableImageBlockPublicAccessCommandOutput} + * @see {@link EnableImageBlockPublicAccessCommandInput} for command's `input` shape. + * @see {@link EnableImageBlockPublicAccessCommandOutput} 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.

+ * + */ +export class EnableImageBlockPublicAccessCommand extends $Command< + EnableImageBlockPublicAccessCommandInput, + EnableImageBlockPublicAccessCommandOutput, + EC2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: EnableImageBlockPublicAccessCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EC2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, EnableImageBlockPublicAccessCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EC2Client"; + const commandName = "EnableImageBlockPublicAccessCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: EnableImageBlockPublicAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_EnableImageBlockPublicAccessCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_EnableImageBlockPublicAccessCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-ec2/src/commands/GetImageBlockPublicAccessStateCommand.ts b/clients/client-ec2/src/commands/GetImageBlockPublicAccessStateCommand.ts new file mode 100644 index 000000000000..703662ba416c --- /dev/null +++ b/clients/client-ec2/src/commands/GetImageBlockPublicAccessStateCommand.ts @@ -0,0 +1,156 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; +import { GetImageBlockPublicAccessStateRequest, GetImageBlockPublicAccessStateResult } from "../models/models_5"; +import { + de_GetImageBlockPublicAccessStateCommand, + se_GetImageBlockPublicAccessStateCommand, +} from "../protocols/Aws_ec2"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetImageBlockPublicAccessStateCommand}. + */ +export interface GetImageBlockPublicAccessStateCommandInput extends GetImageBlockPublicAccessStateRequest {} +/** + * @public + * + * The output of {@link GetImageBlockPublicAccessStateCommand}. + */ +export interface GetImageBlockPublicAccessStateCommandOutput + extends GetImageBlockPublicAccessStateResult, + __MetadataBearer {} + +/** + * @public + *

Gets the current state of block public access for AMIs at the account + * level in the specified Amazon Web Services Region.

+ *

For more information, see Block + * public access to your AMIs 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, GetImageBlockPublicAccessStateCommand } from "@aws-sdk/client-ec2"; // ES Modules import + * // const { EC2Client, GetImageBlockPublicAccessStateCommand } = require("@aws-sdk/client-ec2"); // CommonJS import + * const client = new EC2Client(config); + * const input = { // GetImageBlockPublicAccessStateRequest + * DryRun: true || false, + * }; + * const command = new GetImageBlockPublicAccessStateCommand(input); + * const response = await client.send(command); + * // { // GetImageBlockPublicAccessStateResult + * // ImageBlockPublicAccessState: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetImageBlockPublicAccessStateCommandInput - {@link GetImageBlockPublicAccessStateCommandInput} + * @returns {@link GetImageBlockPublicAccessStateCommandOutput} + * @see {@link GetImageBlockPublicAccessStateCommandInput} for command's `input` shape. + * @see {@link GetImageBlockPublicAccessStateCommandOutput} 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.

+ * + */ +export class GetImageBlockPublicAccessStateCommand extends $Command< + GetImageBlockPublicAccessStateCommandInput, + GetImageBlockPublicAccessStateCommandOutput, + EC2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: GetImageBlockPublicAccessStateCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: EC2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetImageBlockPublicAccessStateCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "EC2Client"; + const commandName = "GetImageBlockPublicAccessStateCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: GetImageBlockPublicAccessStateCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_GetImageBlockPublicAccessStateCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetImageBlockPublicAccessStateCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-ec2/src/commands/GetVpnConnectionDeviceSampleConfigurationCommand.ts b/clients/client-ec2/src/commands/GetVpnConnectionDeviceSampleConfigurationCommand.ts index 5d4e74f91236..385cf657c387 100644 --- a/clients/client-ec2/src/commands/GetVpnConnectionDeviceSampleConfigurationCommand.ts +++ b/clients/client-ec2/src/commands/GetVpnConnectionDeviceSampleConfigurationCommand.ts @@ -18,7 +18,7 @@ import { GetVpnConnectionDeviceSampleConfigurationRequest, GetVpnConnectionDeviceSampleConfigurationResult, GetVpnConnectionDeviceSampleConfigurationResultFilterSensitiveLog, -} from "../models/models_5"; +} from "../models/models_6"; import { de_GetVpnConnectionDeviceSampleConfigurationCommand, se_GetVpnConnectionDeviceSampleConfigurationCommand, diff --git a/clients/client-ec2/src/commands/GetVpnConnectionDeviceTypesCommand.ts b/clients/client-ec2/src/commands/GetVpnConnectionDeviceTypesCommand.ts index ff4e26727700..394ad0db9a60 100644 --- a/clients/client-ec2/src/commands/GetVpnConnectionDeviceTypesCommand.ts +++ b/clients/client-ec2/src/commands/GetVpnConnectionDeviceTypesCommand.ts @@ -14,7 +14,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { GetVpnConnectionDeviceTypesRequest, GetVpnConnectionDeviceTypesResult } from "../models/models_5"; +import { GetVpnConnectionDeviceTypesRequest, GetVpnConnectionDeviceTypesResult } from "../models/models_6"; import { de_GetVpnConnectionDeviceTypesCommand, se_GetVpnConnectionDeviceTypesCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/GetVpnTunnelReplacementStatusCommand.ts b/clients/client-ec2/src/commands/GetVpnTunnelReplacementStatusCommand.ts index 535b622da088..48adeb636853 100644 --- a/clients/client-ec2/src/commands/GetVpnTunnelReplacementStatusCommand.ts +++ b/clients/client-ec2/src/commands/GetVpnTunnelReplacementStatusCommand.ts @@ -14,7 +14,7 @@ import { } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; -import { GetVpnTunnelReplacementStatusRequest, GetVpnTunnelReplacementStatusResult } from "../models/models_5"; +import { GetVpnTunnelReplacementStatusRequest, GetVpnTunnelReplacementStatusResult } from "../models/models_6"; import { de_GetVpnTunnelReplacementStatusCommand, se_GetVpnTunnelReplacementStatusCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/RunInstancesCommand.ts b/clients/client-ec2/src/commands/RunInstancesCommand.ts index 8529f8473641..dd034aaa453e 100644 --- a/clients/client-ec2/src/commands/RunInstancesCommand.ts +++ b/clients/client-ec2/src/commands/RunInstancesCommand.ts @@ -15,7 +15,7 @@ import { import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { Reservation } from "../models/models_4"; -import { RunInstancesRequest, RunInstancesRequestFilterSensitiveLog } from "../models/models_6"; +import { RunInstancesRequest, RunInstancesRequestFilterSensitiveLog } from "../models/models_7"; import { de_RunInstancesCommand, se_RunInstancesCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/index.ts b/clients/client-ec2/src/commands/index.ts index 9a7163165703..d1314f7eb9cc 100644 --- a/clients/client-ec2/src/commands/index.ts +++ b/clients/client-ec2/src/commands/index.ts @@ -372,6 +372,7 @@ export * from "./DisableAwsNetworkPerformanceMetricSubscriptionCommand"; export * from "./DisableEbsEncryptionByDefaultCommand"; export * from "./DisableFastLaunchCommand"; export * from "./DisableFastSnapshotRestoresCommand"; +export * from "./DisableImageBlockPublicAccessCommand"; export * from "./DisableImageDeprecationCommand"; export * from "./DisableIpamOrganizationAdminAccountCommand"; export * from "./DisableSerialConsoleAccessCommand"; @@ -398,6 +399,7 @@ export * from "./EnableAwsNetworkPerformanceMetricSubscriptionCommand"; export * from "./EnableEbsEncryptionByDefaultCommand"; export * from "./EnableFastLaunchCommand"; export * from "./EnableFastSnapshotRestoresCommand"; +export * from "./EnableImageBlockPublicAccessCommand"; export * from "./EnableImageDeprecationCommand"; export * from "./EnableIpamOrganizationAdminAccountCommand"; export * from "./EnableReachabilityAnalyzerOrganizationSharingCommand"; @@ -424,6 +426,7 @@ export * from "./GetEbsEncryptionByDefaultCommand"; export * from "./GetFlowLogsIntegrationTemplateCommand"; export * from "./GetGroupsForCapacityReservationCommand"; export * from "./GetHostReservationPurchasePreviewCommand"; +export * from "./GetImageBlockPublicAccessStateCommand"; export * from "./GetInstanceTypesFromInstanceRequirementsCommand"; export * from "./GetInstanceUefiDataCommand"; export * from "./GetIpamAddressHistoryCommand"; diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 95497920a8de..be0a09c931f4 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -3102,6 +3102,45 @@ export interface DisableFastSnapshotRestoresResult { Unsuccessful?: DisableFastSnapshotRestoreErrorItem[]; } +/** + * @public + */ +export interface DisableImageBlockPublicAccessRequest { + /** + * @public + *

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.

+ */ + DryRun?: boolean; +} + +/** + * @public + * @enum + */ +export const ImageBlockPublicAccessDisabledState = { + unblocked: "unblocked", +} as const; + +/** + * @public + */ +export type ImageBlockPublicAccessDisabledState = + (typeof ImageBlockPublicAccessDisabledState)[keyof typeof ImageBlockPublicAccessDisabledState]; + +/** + * @public + */ +export interface DisableImageBlockPublicAccessResult { + /** + * @public + *

Returns unblocked if the request succeeds; otherwise, it returns an + * error.

+ */ + ImageBlockPublicAccessState?: ImageBlockPublicAccessDisabledState | string; +} + /** * @public */ @@ -4308,6 +4347,53 @@ export interface EnableFastSnapshotRestoresResult { Unsuccessful?: EnableFastSnapshotRestoreErrorItem[]; } +/** + * @public + * @enum + */ +export const ImageBlockPublicAccessEnabledState = { + block_new_sharing: "block-new-sharing", +} as const; + +/** + * @public + */ +export type ImageBlockPublicAccessEnabledState = + (typeof ImageBlockPublicAccessEnabledState)[keyof typeof ImageBlockPublicAccessEnabledState]; + +/** + * @public + */ +export interface EnableImageBlockPublicAccessRequest { + /** + * @public + *

Specify block-new-sharing to enable block public access for AMIs at the + * account level in the specified Region. This will block any attempt to publicly share your AMIs + * in the specified Region.

+ */ + ImageBlockPublicAccessState: ImageBlockPublicAccessEnabledState | string | undefined; + + /** + * @public + *

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.

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

Returns block-new-sharing if the request succeeds; otherwise, it returns an + * error.

+ */ + ImageBlockPublicAccessState?: ImageBlockPublicAccessEnabledState | string; +} + /** * @public */ @@ -5910,6 +5996,44 @@ export interface GetHostReservationPurchasePreviewResult { TotalUpfrontPrice?: string; } +/** + * @public + */ +export interface GetImageBlockPublicAccessStateRequest { + /** + * @public + *

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.

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

The current state of block public access for AMIs at the account level in the specified + * Amazon Web Services Region.

+ *

Possible values:

+ *
    + *
  • + *

    + * block-new-sharing - Any attempt to publicly share your AMIs in the + * specified Region is blocked.

    + *
  • + *
  • + *

    + * unblocked - Your AMIs in the specified Region can be publicly + * shared.

    + *
  • + *
+ */ + ImageBlockPublicAccessState?: string; +} + /** * @public */ @@ -8344,232 +8468,6 @@ export interface GetVerifiedAccessGroupPolicyResult { PolicyDocument?: string; } -/** - * @public - */ -export interface GetVpnConnectionDeviceSampleConfigurationRequest { - /** - * @public - *

The VpnConnectionId specifies the Site-to-Site VPN connection used for the sample - * configuration.

- */ - VpnConnectionId: string | undefined; - - /** - * @public - *

Device identifier provided by the GetVpnConnectionDeviceTypes API.

- */ - VpnConnectionDeviceTypeId: string | undefined; - - /** - * @public - *

The IKE version to be used in the sample configuration file for your customer gateway - * device. You can specify one of the following versions: ikev1 or - * ikev2.

- */ - InternetKeyExchangeVersion?: string; - - /** - * @public - *

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.

- */ - DryRun?: boolean; -} - -/** - * @public - */ -export interface GetVpnConnectionDeviceSampleConfigurationResult { - /** - * @public - *

Sample configuration file for the specified customer gateway device.

- */ - VpnConnectionDeviceSampleConfiguration?: string; -} - -/** - * @public - */ -export interface GetVpnConnectionDeviceTypesRequest { - /** - * @public - *

The maximum number of results returned by GetVpnConnectionDeviceTypes in - * paginated output. When this parameter is used, GetVpnConnectionDeviceTypes - * only returns MaxResults results in a single page along with a - * NextToken response element. The remaining results of the initial - * request can be seen by sending another GetVpnConnectionDeviceTypes request - * with the returned NextToken value. This value can be between 200 and 1000. - * If this parameter is not used, then GetVpnConnectionDeviceTypes returns all - * results.

- */ - MaxResults?: number; - - /** - * @public - *

The NextToken value returned from a previous paginated - * GetVpnConnectionDeviceTypes request where MaxResults was - * used and the results exceeded the value of that parameter. Pagination continues from the - * end of the previous results that returned the NextToken value. This value - * is null when there are no more results to return.

- */ - NextToken?: string; - - /** - * @public - *

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.

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

List of customer gateway devices that have a sample configuration file available for - * use. You can also see the list of device types with sample configuration files available - * under Your customer - * gateway device in the Amazon Web Services Site-to-Site VPN User Guide.

- */ -export interface VpnConnectionDeviceType { - /** - * @public - *

Customer gateway device identifier.

- */ - VpnConnectionDeviceTypeId?: string; - - /** - * @public - *

Customer gateway device vendor.

- */ - Vendor?: string; - - /** - * @public - *

Customer gateway device platform.

- */ - Platform?: string; - - /** - * @public - *

Customer gateway device software version.

- */ - Software?: string; -} - -/** - * @public - */ -export interface GetVpnConnectionDeviceTypesResult { - /** - * @public - *

List of customer gateway devices that have a sample configuration file available for - * use.

- */ - VpnConnectionDeviceTypes?: VpnConnectionDeviceType[]; - - /** - * @public - *

The NextToken value to include in a future - * GetVpnConnectionDeviceTypes request. When the results of a - * GetVpnConnectionDeviceTypes request exceed MaxResults, - * this value can be used to retrieve the next page of results. This value is null when - * there are no more results to return.

- */ - NextToken?: string; -} - -/** - * @public - */ -export interface GetVpnTunnelReplacementStatusRequest { - /** - * @public - *

The ID of the Site-to-Site VPN connection.

- */ - VpnConnectionId: string | undefined; - - /** - * @public - *

The external IP address of the VPN tunnel.

- */ - VpnTunnelOutsideIpAddress: string | undefined; - - /** - * @public - *

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.

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

Details for Site-to-Site VPN tunnel endpoint maintenance events.

- */ -export interface MaintenanceDetails { - /** - * @public - *

Verify existence of a pending maintenance.

- */ - PendingMaintenance?: string; - - /** - * @public - *

The timestamp after which Amazon Web Services will automatically apply maintenance.

- */ - MaintenanceAutoAppliedAfter?: Date; - - /** - * @public - *

Timestamp of last applied maintenance.

- */ - LastMaintenanceApplied?: Date; -} - -/** - * @public - */ -export interface GetVpnTunnelReplacementStatusResult { - /** - * @public - *

The ID of the Site-to-Site VPN connection.

- */ - VpnConnectionId?: string; - - /** - * @public - *

The ID of the transit gateway associated with the VPN connection.

- */ - TransitGatewayId?: string; - - /** - * @public - *

The ID of the customer gateway.

- */ - CustomerGatewayId?: string; - - /** - * @public - *

The ID of the virtual private gateway.

- */ - VpnGatewayId?: string; - - /** - * @public - *

The external IP address of the VPN tunnel.

- */ - VpnTunnelOutsideIpAddress?: string; - - /** - * @public - *

Get details of pending tunnel endpoint maintenance.

- */ - MaintenanceDetails?: MaintenanceDetails; -} - /** * @internal */ @@ -8623,13 +8521,3 @@ export const GetPasswordDataResultFilterSensitiveLog = (obj: GetPasswordDataResu ...obj, ...(obj.PasswordData && { PasswordData: SENSITIVE_STRING }), }); - -/** - * @internal - */ -export const GetVpnConnectionDeviceSampleConfigurationResultFilterSensitiveLog = ( - obj: GetVpnConnectionDeviceSampleConfigurationResult -): any => ({ - ...obj, - ...(obj.VpnConnectionDeviceSampleConfiguration && { VpnConnectionDeviceSampleConfiguration: SENSITIVE_STRING }), -}); diff --git a/clients/client-ec2/src/models/models_6.ts b/clients/client-ec2/src/models/models_6.ts index d6554e4c1b30..a355882b5bc0 100644 --- a/clients/client-ec2/src/models/models_6.ts +++ b/clients/client-ec2/src/models/models_6.ts @@ -45,16 +45,13 @@ import { ClientConnectOptions, ClientLoginBannerOptions, ConnectionLogOptions, - CreditSpecificationRequest, DiskImageFormat, - ElasticGpuSpecification, FleetExcessCapacityTerminationPolicy, FleetLaunchTemplateConfigRequest, HostnameType, IcmpTypeCode, InstanceEventWindowTimeRangeRequest, InstanceInterruptionBehavior, - InstanceIpv6Address, Ipam, IpamPool, IpamResourceDiscovery, @@ -162,6 +159,232 @@ import { VolumeModification, } from "./models_5"; +/** + * @public + */ +export interface GetVpnConnectionDeviceSampleConfigurationRequest { + /** + * @public + *

The VpnConnectionId specifies the Site-to-Site VPN connection used for the sample + * configuration.

+ */ + VpnConnectionId: string | undefined; + + /** + * @public + *

Device identifier provided by the GetVpnConnectionDeviceTypes API.

+ */ + VpnConnectionDeviceTypeId: string | undefined; + + /** + * @public + *

The IKE version to be used in the sample configuration file for your customer gateway + * device. You can specify one of the following versions: ikev1 or + * ikev2.

+ */ + InternetKeyExchangeVersion?: string; + + /** + * @public + *

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.

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

Sample configuration file for the specified customer gateway device.

+ */ + VpnConnectionDeviceSampleConfiguration?: string; +} + +/** + * @public + */ +export interface GetVpnConnectionDeviceTypesRequest { + /** + * @public + *

The maximum number of results returned by GetVpnConnectionDeviceTypes in + * paginated output. When this parameter is used, GetVpnConnectionDeviceTypes + * only returns MaxResults results in a single page along with a + * NextToken response element. The remaining results of the initial + * request can be seen by sending another GetVpnConnectionDeviceTypes request + * with the returned NextToken value. This value can be between 200 and 1000. + * If this parameter is not used, then GetVpnConnectionDeviceTypes returns all + * results.

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

The NextToken value returned from a previous paginated + * GetVpnConnectionDeviceTypes request where MaxResults was + * used and the results exceeded the value of that parameter. Pagination continues from the + * end of the previous results that returned the NextToken value. This value + * is null when there are no more results to return.

+ */ + NextToken?: string; + + /** + * @public + *

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.

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

List of customer gateway devices that have a sample configuration file available for + * use. You can also see the list of device types with sample configuration files available + * under Your customer + * gateway device in the Amazon Web Services Site-to-Site VPN User Guide.

+ */ +export interface VpnConnectionDeviceType { + /** + * @public + *

Customer gateway device identifier.

+ */ + VpnConnectionDeviceTypeId?: string; + + /** + * @public + *

Customer gateway device vendor.

+ */ + Vendor?: string; + + /** + * @public + *

Customer gateway device platform.

+ */ + Platform?: string; + + /** + * @public + *

Customer gateway device software version.

+ */ + Software?: string; +} + +/** + * @public + */ +export interface GetVpnConnectionDeviceTypesResult { + /** + * @public + *

List of customer gateway devices that have a sample configuration file available for + * use.

+ */ + VpnConnectionDeviceTypes?: VpnConnectionDeviceType[]; + + /** + * @public + *

The NextToken value to include in a future + * GetVpnConnectionDeviceTypes request. When the results of a + * GetVpnConnectionDeviceTypes request exceed MaxResults, + * this value can be used to retrieve the next page of results. This value is null when + * there are no more results to return.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface GetVpnTunnelReplacementStatusRequest { + /** + * @public + *

The ID of the Site-to-Site VPN connection.

+ */ + VpnConnectionId: string | undefined; + + /** + * @public + *

The external IP address of the VPN tunnel.

+ */ + VpnTunnelOutsideIpAddress: string | undefined; + + /** + * @public + *

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.

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

Details for Site-to-Site VPN tunnel endpoint maintenance events.

+ */ +export interface MaintenanceDetails { + /** + * @public + *

Verify existence of a pending maintenance.

+ */ + PendingMaintenance?: string; + + /** + * @public + *

The timestamp after which Amazon Web Services will automatically apply maintenance.

+ */ + MaintenanceAutoAppliedAfter?: Date; + + /** + * @public + *

Timestamp of last applied maintenance.

+ */ + LastMaintenanceApplied?: Date; +} + +/** + * @public + */ +export interface GetVpnTunnelReplacementStatusResult { + /** + * @public + *

The ID of the Site-to-Site VPN connection.

+ */ + VpnConnectionId?: string; + + /** + * @public + *

The ID of the transit gateway associated with the VPN connection.

+ */ + TransitGatewayId?: string; + + /** + * @public + *

The ID of the customer gateway.

+ */ + CustomerGatewayId?: string; + + /** + * @public + *

The ID of the virtual private gateway.

+ */ + VpnGatewayId?: string; + + /** + * @public + *

The external IP address of the VPN tunnel.

+ */ + VpnTunnelOutsideIpAddress?: string; + + /** + * @public + *

Get details of pending tunnel endpoint maintenance.

+ */ + MaintenanceDetails?: MaintenanceDetails; +} + /** * @public */ @@ -8986,680 +9209,45 @@ export interface LicenseConfigurationRequest { } /** - * @public - *

The maintenance options for the instance.

+ * @internal */ -export interface InstanceMaintenanceOptionsRequest { - /** - * @public - *

Disables the automatic recovery behavior of your instance or sets it to default. For - * more information, see Simplified automatic recovery.

- */ - AutoRecovery?: InstanceAutoRecoveryState | string; -} +export const GetVpnConnectionDeviceSampleConfigurationResultFilterSensitiveLog = ( + obj: GetVpnConnectionDeviceSampleConfigurationResult +): any => ({ + ...obj, + ...(obj.VpnConnectionDeviceSampleConfiguration && { VpnConnectionDeviceSampleConfiguration: SENSITIVE_STRING }), +}); /** - * @public - *

The metadata options for the instance.

+ * @internal */ -export interface InstanceMetadataOptionsRequest { - /** - * @public - *

IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to optional - * (in other words, set the use of IMDSv2 to optional) or - * required (in other words, set the use of IMDSv2 to - * required).

- *
    - *
  • - *

    - * optional - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without - * a session token in your request. If you retrieve the IAM role credentials - * without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials - * using a valid session token, the IMDSv2 role credentials are returned.

    - *
  • - *
  • - *

    - * required - When IMDSv2 is required, you must send a session token - * with any instance metadata retrieval requests. In this state, retrieving the IAM role - * credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.

    - *
  • - *
- *

Default: optional - *

- */ - HttpTokens?: HttpTokensState | string; - - /** - * @public - *

The desired HTTP PUT response hop limit for instance metadata requests. The larger the - * number, the further instance metadata requests can travel.

- *

Default: 1

- *

Possible values: Integers from 1 to 64

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

Enables or disables the HTTP metadata endpoint on your instances.

- *

If you specify a value of disabled, you cannot access your instance - * metadata.

- *

Default: enabled - *

- */ - HttpEndpoint?: InstanceMetadataEndpointState | string; +export const ImageDiskContainerFilterSensitiveLog = (obj: ImageDiskContainer): any => ({ + ...obj, + ...(obj.Url && { Url: SENSITIVE_STRING }), +}); - /** - * @public - *

Enables or disables the IPv6 endpoint for the instance metadata service.

- */ - HttpProtocolIpv6?: InstanceMetadataProtocolState | string; +/** + * @internal + */ +export const ImportImageRequestFilterSensitiveLog = (obj: ImportImageRequest): any => ({ + ...obj, + ...(obj.DiskContainers && { + DiskContainers: obj.DiskContainers.map((item) => ImageDiskContainerFilterSensitiveLog(item)), + }), +}); - /** - * @public - *

Set to enabled to allow access to instance tags from the instance - * metadata. Set to disabled to turn off access to instance tags from the - * instance metadata. For more information, see Work with - * instance tags using the instance metadata.

- *

Default: disabled - *

- */ - InstanceMetadataTags?: InstanceMetadataTagsState | string; -} +/** + * @internal + */ +export const ImportImageResultFilterSensitiveLog = (obj: ImportImageResult): any => ({ + ...obj, + ...(obj.SnapshotDetails && { + SnapshotDetails: obj.SnapshotDetails.map((item) => SnapshotDetailFilterSensitiveLog(item)), + }), +}); /** - * @public - *

Describes the options for instance hostnames.

- */ -export interface PrivateDnsNameOptionsRequest { - /** - * @public - *

The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name - * must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name - * must be based on the instance ID. For dual-stack subnets, you can specify whether DNS - * names use the instance IPv4 address or the instance ID.

- */ - HostnameType?: HostnameType | string; - - /** - * @public - *

Indicates whether to respond to DNS queries for instance hostnames with DNS A - * records.

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

Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA - * records.

- */ - EnableResourceNameDnsAAAARecord?: boolean; -} - -/** - * @public - */ -export interface RunInstancesRequest { - /** - * @public - *

The block device mapping, which defines the EBS volumes and instance store volumes to - * attach to the instance at launch. For more information, see Block device - * mappings in the Amazon EC2 User Guide.

- */ - BlockDeviceMappings?: BlockDeviceMapping[]; - - /** - * @public - *

The ID of the AMI. An AMI ID is required to launch an instance and must be specified - * here or in a launch template.

- */ - ImageId?: string; - - /** - * @public - *

The instance type. For more information, see Instance types in the - * Amazon EC2 User Guide.

- */ - InstanceType?: _InstanceType | string; - - /** - * @public - *

The number of IPv6 addresses to associate with the primary network - * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You - * cannot specify this option and the option to assign specific IPv6 addresses in the same - * request. You can specify this option if you've specified a minimum number of instances - * to launch.

- *

You cannot specify this option and the network interfaces option in the same - * request.

- */ - Ipv6AddressCount?: number; - - /** - * @public - *

The IPv6 addresses from the range of the subnet to associate with the - * primary network interface. You cannot specify this option and the option to assign a - * number of IPv6 addresses in the same request. You cannot specify this option if you've - * specified a minimum number of instances to launch.

- *

You cannot specify this option and the network interfaces option in the same - * request.

- */ - Ipv6Addresses?: InstanceIpv6Address[]; - - /** - * @public - *

The ID of the kernel.

- * - *

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - * information, see PV-GRUB in the - * Amazon EC2 User Guide.

- *
- */ - KernelId?: string; - - /** - * @public - *

The name of the key pair. You can create a key pair using CreateKeyPair or - * ImportKeyPair.

- * - *

If you do not specify a key pair, you can't connect to the instance unless you - * choose an AMI that is configured to allow users another way to log in.

- *
- */ - KeyName?: string; - - /** - * @public - *

The maximum number of instances to launch. If you specify more instances than Amazon - * EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible - * number of instances above MinCount.

- *

Constraints: Between 1 and the maximum number you're allowed for the specified - * instance type. For more information about the default limits, and how to request an - * increase, see How many instances can I - * run in Amazon EC2 in the Amazon EC2 FAQ.

- */ - MaxCount: number | undefined; - - /** - * @public - *

The minimum number of instances to launch. If you specify a minimum that is more - * instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 - * launches no instances.

- *

Constraints: Between 1 and the maximum number you're allowed for the specified - * instance type. For more information about the default limits, and how to request an - * increase, see How many instances can I - * run in Amazon EC2 in the Amazon EC2 General FAQ.

- */ - MinCount: number | undefined; - - /** - * @public - *

Specifies whether detailed monitoring is enabled for the instance.

- */ - Monitoring?: RunInstancesMonitoringEnabled; - - /** - * @public - *

The placement for the instance.

- */ - Placement?: Placement; - - /** - * @public - *

The ID of the RAM disk to select. Some kernels require additional drivers at launch. - * Check the kernel requirements for information about whether you need to specify a RAM - * disk. To find kernel requirements, go to the Amazon Web Services Resource Center and - * search for the kernel ID.

- * - *

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - * information, see PV-GRUB in the - * Amazon EC2 User Guide.

- *
- */ - RamdiskId?: string; - - /** - * @public - *

The IDs of the security groups. You can create a security group using CreateSecurityGroup.

- *

If you specify a network interface, you must specify any security groups as part of - * the network interface.

- */ - SecurityGroupIds?: string[]; - - /** - * @public - *

[Default VPC] The names of the security groups.

- *

If you specify a network interface, you must specify any security groups as part of - * the network interface.

- *

Default: Amazon EC2 uses the default security group.

- */ - SecurityGroups?: string[]; - - /** - * @public - *

The ID of the subnet to launch the instance into.

- *

If you specify a network interface, you must specify any subnets as part of the - * network interface.

- */ - SubnetId?: string; - - /** - * @public - *

The user data script to make available to the instance. For more information, see - * Run - * commands on your Linux instance at launch and Run commands on your - * Windows instance at launch. If you are using a command line tool, - * base64-encoding is performed for you, and you can load the text from a file. Otherwise, - * you must provide base64-encoded text. User data is limited to 16 KB.

- */ - UserData?: string; - - /** - * @public - *

Reserved.

- */ - AdditionalInfo?: string; - - /** - * @public - *

Unique, case-sensitive identifier you provide to ensure the idempotency of the - * request. If you do not specify a client token, a randomly generated token is used for - * the request to ensure idempotency.

- *

For more information, see Ensuring - * Idempotency.

- *

Constraints: Maximum 64 ASCII characters

- */ - ClientToken?: string; - - /** - * @public - *

If you set this parameter to true, you can't terminate the instance using - * the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after - * launch, use ModifyInstanceAttribute. Alternatively, if you set - * InstanceInitiatedShutdownBehavior to terminate, you can - * terminate the instance by running the shutdown command from the instance.

- *

Default: false - *

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

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.

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

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization - * provides dedicated throughput to Amazon EBS and an optimized configuration stack to - * provide optimal Amazon EBS I/O performance. This optimization isn't available with all - * instance types. Additional usage charges apply when using an EBS-optimized - * instance.

- *

Default: false - *

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

The name or Amazon Resource Name (ARN) of an IAM instance - * profile.

- */ - IamInstanceProfile?: IamInstanceProfileSpecification; - - /** - * @public - *

Indicates whether an instance stops or terminates when you initiate shutdown from the - * instance (using the operating system command for system shutdown).

- *

Default: stop - *

- */ - InstanceInitiatedShutdownBehavior?: ShutdownBehavior | string; - - /** - * @public - *

The network interfaces to associate with the instance. If you specify a network - * interface, you must specify any security groups and subnets as part of the network - * interface.

- */ - NetworkInterfaces?: InstanceNetworkInterfaceSpecification[]; - - /** - * @public - *

The primary IPv4 address. You must specify a value from the IPv4 address - * range of the subnet.

- *

Only one private IP address can be designated as primary. You can't specify this - * option if you've specified the option to designate a private IP address as the primary - * IP address in a network interface specification. You cannot specify this option if - * you're launching more than one instance in the request.

- *

You cannot specify this option and the network interfaces option in the same - * request.

- */ - PrivateIpAddress?: string; - - /** - * @public - *

An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that - * you can attach to your Windows instance to accelerate the graphics performance of your - * applications. For more information, see Amazon EC2 Elastic GPUs in - * the Amazon EC2 User Guide.

- */ - ElasticGpuSpecification?: ElasticGpuSpecification[]; - - /** - * @public - *

An elastic inference accelerator to associate with the instance. Elastic inference - * accelerators are a resource you can attach to your Amazon EC2 instances to accelerate - * your Deep Learning (DL) inference workloads.

- *

You cannot specify accelerators from different generations in the same request.

- * - *

Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon - * Elastic Inference (EI), and will help current customers migrate their workloads to - * options that offer better price and performance. After April 15, 2023, new customers - * will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, - * Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during - * the past 30-day period are considered current customers and will be able to continue - * using the service.

- *
- */ - ElasticInferenceAccelerators?: ElasticInferenceAccelerator[]; - - /** - * @public - *

The tags to apply to the resources that are created during instance launch.

- *

You can specify tags for the following resources only:

- *
    - *
  • - *

    Instances

    - *
  • - *
  • - *

    Volumes

    - *
  • - *
  • - *

    Elastic graphics

    - *
  • - *
  • - *

    Spot Instance requests

    - *
  • - *
  • - *

    Network interfaces

    - *
  • - *
- *

To tag a resource after it has been created, see CreateTags.

- */ - TagSpecifications?: TagSpecification[]; - - /** - * @public - *

The launch template to use to launch the instances. Any parameters that you specify in - * RunInstances override the same parameters in the launch template. - * You can specify either the name or ID of a launch template, but not both.

- */ - LaunchTemplate?: LaunchTemplateSpecification; - - /** - * @public - *

The market (purchasing) option for the instances.

- *

For RunInstances, persistent Spot Instance requests are - * only supported when InstanceInterruptionBehavior is set - * to either hibernate or stop.

- */ - InstanceMarketOptions?: InstanceMarketOptionsRequest; - - /** - * @public - *

The credit option for CPU usage of the burstable performance instance. Valid values - * are standard and unlimited. To change this attribute after - * launch, use - * ModifyInstanceCreditSpecification. For more information, see Burstable - * performance instances in the Amazon EC2 User Guide.

- *

Default: standard (T2 instances) or unlimited (T3/T3a/T4g - * instances)

- *

For T3 instances with host tenancy, only standard is - * supported.

- */ - CreditSpecification?: CreditSpecificationRequest; - - /** - * @public - *

The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.

- */ - CpuOptions?: CpuOptionsRequest; - - /** - * @public - *

Information about the Capacity Reservation targeting option. If you do not specify this parameter, the - * instance's Capacity Reservation preference defaults to open, which enables - * it to run in any open Capacity Reservation that has matching attributes (instance type, - * platform, Availability Zone).

- */ - CapacityReservationSpecification?: CapacityReservationSpecification; - - /** - * @public - *

Indicates whether an instance is enabled for hibernation. This parameter is valid only - * if the instance meets the hibernation - * prerequisites. For more information, see Hibernate your instance in the - * Amazon EC2 User Guide.

- *

You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same - * instance.

- */ - HibernationOptions?: HibernationOptionsRequest; - - /** - * @public - *

The license configurations.

- */ - LicenseSpecifications?: LicenseConfigurationRequest[]; - - /** - * @public - *

The metadata options for the instance. For more information, see Instance metadata and user data.

- */ - MetadataOptions?: InstanceMetadataOptionsRequest; - - /** - * @public - *

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For - * more information, see What is Amazon Web Services Nitro - * Enclaves? in the Amazon Web Services Nitro Enclaves User - * Guide.

- *

You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same - * instance.

- */ - EnclaveOptions?: EnclaveOptionsRequest; - - /** - * @public - *

The options for the instance hostname. - * The default values are inherited from the subnet. - * Applies only if creating a network interface, not attaching an existing one.

- */ - PrivateDnsNameOptions?: PrivateDnsNameOptionsRequest; - - /** - * @public - *

The maintenance and recovery options for the instance.

- */ - MaintenanceOptions?: InstanceMaintenanceOptionsRequest; - - /** - * @public - *

Indicates whether an instance is enabled for stop protection. For more information, - * see Stop - * protection.

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

If you’re launching an instance into a dual-stack or IPv6-only subnet, you can enable - * assigning a primary IPv6 address. A primary IPv6 address is an IPv6 GUA address - * associated with an ENI that you have enabled to use a primary IPv6 address. Use this - * option if an instance relies on its IPv6 address not changing. When you launch the - * instance, Amazon Web Services will automatically assign an IPv6 address associated with - * the ENI attached to your instance to be the primary IPv6 address. Once you enable an - * IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 - * GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 - * address until the instance is terminated or the network interface is detached. If you - * have multiple IPv6 addresses associated with an ENI attached to your instance and you - * enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI - * becomes the primary IPv6 address.

- */ - EnablePrimaryIpv6?: boolean; -} - -/** - * @public - *

Describes an EBS volume for a Scheduled Instance.

- */ -export interface ScheduledInstancesEbs { - /** - * @public - *

Indicates whether the volume is deleted on instance termination.

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

Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.

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

The number of I/O operations per second (IOPS) to provision for an io1 or io2 volume, with a maximum - * ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB for io2. Range is 100 to 64,000 IOPS for - * volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on - * instances built on the Nitro System. Other instance families guarantee performance up to - * 32,000 IOPS. For more information, see Amazon EBS volume types in the - * Amazon EC2 User Guide.

- *

This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes.

- */ - Iops?: number; - - /** - * @public - *

The ID of the snapshot.

- */ - SnapshotId?: string; - - /** - * @public - *

The size of the volume, in GiB.

- *

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

- */ - VolumeSize?: number; - - /** - * @public - *

The volume type. gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, Throughput Optimized HDD - * for st1, Cold HDD for sc1, or standard for - * Magnetic.

- *

Default: gp2 - *

- */ - VolumeType?: string; -} - -/** - * @public - *

Describes a block device mapping for a Scheduled Instance.

- */ -export interface ScheduledInstancesBlockDeviceMapping { - /** - * @public - *

The device name (for example, /dev/sdh or xvdh).

- */ - DeviceName?: string; - - /** - * @public - *

Parameters used to set up EBS volumes automatically when the instance is launched.

- */ - Ebs?: ScheduledInstancesEbs; - - /** - * @public - *

To omit the device from the block device mapping, specify an empty string.

- */ - NoDevice?: string; - - /** - * @public - *

The virtual device name (ephemeralN). Instance store volumes are numbered - * starting from 0. An instance type with two available instance store volumes can specify mappings - * for ephemeral0 and ephemeral1. The number of available instance store - * volumes depends on the instance type. After you connect to the instance, you must mount the - * volume.

- *

Constraints: For M3 instances, you must specify instance store volumes in the block device - * mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes - * specified in the block device mapping for the AMI.

- */ - VirtualName?: string; -} - -/** - * @public - *

Describes an IAM instance profile for a Scheduled Instance.

- */ -export interface ScheduledInstancesIamInstanceProfile { - /** - * @public - *

The Amazon Resource Name (ARN).

- */ - Arn?: string; - - /** - * @public - *

The name.

- */ - Name?: string; -} - -/** - * @public - *

Describes whether monitoring is enabled for a Scheduled Instance.

- */ -export interface ScheduledInstancesMonitoring { - /** - * @public - *

Indicates whether monitoring is enabled.

- */ - Enabled?: boolean; -} - -/** - * @internal - */ -export const ImageDiskContainerFilterSensitiveLog = (obj: ImageDiskContainer): any => ({ - ...obj, - ...(obj.Url && { Url: SENSITIVE_STRING }), -}); - -/** - * @internal - */ -export const ImportImageRequestFilterSensitiveLog = (obj: ImportImageRequest): any => ({ - ...obj, - ...(obj.DiskContainers && { - DiskContainers: obj.DiskContainers.map((item) => ImageDiskContainerFilterSensitiveLog(item)), - }), -}); - -/** - * @internal - */ -export const ImportImageResultFilterSensitiveLog = (obj: ImportImageResult): any => ({ - ...obj, - ...(obj.SnapshotDetails && { - SnapshotDetails: obj.SnapshotDetails.map((item) => SnapshotDetailFilterSensitiveLog(item)), - }), -}); - -/** - * @internal + * @internal */ export const DiskImageDetailFilterSensitiveLog = (obj: DiskImageDetail): any => ({ ...obj, @@ -9869,11 +9457,3 @@ export const RequestSpotInstancesResultFilterSensitiveLog = (obj: RequestSpotIns SpotInstanceRequests: obj.SpotInstanceRequests.map((item) => SpotInstanceRequestFilterSensitiveLog(item)), }), }); - -/** - * @internal - */ -export const RunInstancesRequestFilterSensitiveLog = (obj: RunInstancesRequest): any => ({ - ...obj, - ...(obj.UserData && { UserData: SENSITIVE_STRING }), -}); diff --git a/clients/client-ec2/src/models/models_7.ts b/clients/client-ec2/src/models/models_7.ts index cb7b714cec34..7e74c474a5d0 100644 --- a/clients/client-ec2/src/models/models_7.ts +++ b/clients/client-ec2/src/models/models_7.ts @@ -2,23 +2,695 @@ import { SENSITIVE_STRING } from "@smithy/smithy-client"; import { + _InstanceType, ByoipCidr, + IamInstanceProfileSpecification, IpPermission, NatGatewayAddress, TagSpecification, TransitGatewayAttachmentResourceType, } from "./models_0"; -import { LocalGatewayRoute } from "./models_1"; +import { + BlockDeviceMapping, + CreditSpecificationRequest, + ElasticGpuSpecification, + HostnameType, + InstanceIpv6Address, + LocalGatewayRoute, + Placement, + ShutdownBehavior, +} from "./models_1"; import { TransitGatewayRoute } from "./models_2"; import { ClientVpnConnectionStatus, Filter } from "./models_3"; -import { InstanceState, NetworkInsightsAccessScopeAnalysis, NetworkInsightsAnalysis } from "./models_4"; import { + HttpTokensState, + InstanceAutoRecoveryState, + InstanceMetadataEndpointState, + InstanceMetadataProtocolState, + InstanceMetadataTagsState, + InstanceNetworkInterfaceSpecification, + InstanceState, + NetworkInsightsAccessScopeAnalysis, + NetworkInsightsAnalysis, + RunInstancesMonitoringEnabled, +} from "./models_4"; +import { + CapacityReservationSpecification, + CpuOptionsRequest, + ElasticInferenceAccelerator, + EnclaveOptionsRequest, + HibernationOptionsRequest, + InstanceMarketOptionsRequest, InstanceMonitoring, - ScheduledInstancesBlockDeviceMapping, - ScheduledInstancesIamInstanceProfile, - ScheduledInstancesMonitoring, + LaunchTemplateSpecification, + LicenseConfigurationRequest, } from "./models_6"; +/** + * @public + *

The maintenance options for the instance.

+ */ +export interface InstanceMaintenanceOptionsRequest { + /** + * @public + *

Disables the automatic recovery behavior of your instance or sets it to default. For + * more information, see Simplified automatic recovery.

+ */ + AutoRecovery?: InstanceAutoRecoveryState | string; +} + +/** + * @public + *

The metadata options for the instance.

+ */ +export interface InstanceMetadataOptionsRequest { + /** + * @public + *

IMDSv2 uses token-backed sessions. Set the use of HTTP tokens to optional + * (in other words, set the use of IMDSv2 to optional) or + * required (in other words, set the use of IMDSv2 to + * required).

+ *
    + *
  • + *

    + * optional - When IMDSv2 is optional, you can choose to retrieve instance metadata with or without + * a session token in your request. If you retrieve the IAM role credentials + * without a token, the IMDSv1 role credentials are returned. If you retrieve the IAM role credentials + * using a valid session token, the IMDSv2 role credentials are returned.

    + *
  • + *
  • + *

    + * required - When IMDSv2 is required, you must send a session token + * with any instance metadata retrieval requests. In this state, retrieving the IAM role + * credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.

    + *
  • + *
+ *

Default: optional + *

+ */ + HttpTokens?: HttpTokensState | string; + + /** + * @public + *

The desired HTTP PUT response hop limit for instance metadata requests. The larger the + * number, the further instance metadata requests can travel.

+ *

Default: 1

+ *

Possible values: Integers from 1 to 64

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

Enables or disables the HTTP metadata endpoint on your instances.

+ *

If you specify a value of disabled, you cannot access your instance + * metadata.

+ *

Default: enabled + *

+ */ + HttpEndpoint?: InstanceMetadataEndpointState | string; + + /** + * @public + *

Enables or disables the IPv6 endpoint for the instance metadata service.

+ */ + HttpProtocolIpv6?: InstanceMetadataProtocolState | string; + + /** + * @public + *

Set to enabled to allow access to instance tags from the instance + * metadata. Set to disabled to turn off access to instance tags from the + * instance metadata. For more information, see Work with + * instance tags using the instance metadata.

+ *

Default: disabled + *

+ */ + InstanceMetadataTags?: InstanceMetadataTagsState | string; +} + +/** + * @public + *

Describes the options for instance hostnames.

+ */ +export interface PrivateDnsNameOptionsRequest { + /** + * @public + *

The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name + * must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name + * must be based on the instance ID. For dual-stack subnets, you can specify whether DNS + * names use the instance IPv4 address or the instance ID.

+ */ + HostnameType?: HostnameType | string; + + /** + * @public + *

Indicates whether to respond to DNS queries for instance hostnames with DNS A + * records.

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

Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA + * records.

+ */ + EnableResourceNameDnsAAAARecord?: boolean; +} + +/** + * @public + */ +export interface RunInstancesRequest { + /** + * @public + *

The block device mapping, which defines the EBS volumes and instance store volumes to + * attach to the instance at launch. For more information, see Block device + * mappings in the Amazon EC2 User Guide.

+ */ + BlockDeviceMappings?: BlockDeviceMapping[]; + + /** + * @public + *

The ID of the AMI. An AMI ID is required to launch an instance and must be specified + * here or in a launch template.

+ */ + ImageId?: string; + + /** + * @public + *

The instance type. For more information, see Instance types in the + * Amazon EC2 User Guide.

+ */ + InstanceType?: _InstanceType | string; + + /** + * @public + *

The number of IPv6 addresses to associate with the primary network + * interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You + * cannot specify this option and the option to assign specific IPv6 addresses in the same + * request. You can specify this option if you've specified a minimum number of instances + * to launch.

+ *

You cannot specify this option and the network interfaces option in the same + * request.

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

The IPv6 addresses from the range of the subnet to associate with the + * primary network interface. You cannot specify this option and the option to assign a + * number of IPv6 addresses in the same request. You cannot specify this option if you've + * specified a minimum number of instances to launch.

+ *

You cannot specify this option and the network interfaces option in the same + * request.

+ */ + Ipv6Addresses?: InstanceIpv6Address[]; + + /** + * @public + *

The ID of the kernel.

+ * + *

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + * information, see PV-GRUB in the + * Amazon EC2 User Guide.

+ *
+ */ + KernelId?: string; + + /** + * @public + *

The name of the key pair. You can create a key pair using CreateKeyPair or + * ImportKeyPair.

+ * + *

If you do not specify a key pair, you can't connect to the instance unless you + * choose an AMI that is configured to allow users another way to log in.

+ *
+ */ + KeyName?: string; + + /** + * @public + *

The maximum number of instances to launch. If you specify more instances than Amazon + * EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible + * number of instances above MinCount.

+ *

Constraints: Between 1 and the maximum number you're allowed for the specified + * instance type. For more information about the default limits, and how to request an + * increase, see How many instances can I + * run in Amazon EC2 in the Amazon EC2 FAQ.

+ */ + MaxCount: number | undefined; + + /** + * @public + *

The minimum number of instances to launch. If you specify a minimum that is more + * instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 + * launches no instances.

+ *

Constraints: Between 1 and the maximum number you're allowed for the specified + * instance type. For more information about the default limits, and how to request an + * increase, see How many instances can I + * run in Amazon EC2 in the Amazon EC2 General FAQ.

+ */ + MinCount: number | undefined; + + /** + * @public + *

Specifies whether detailed monitoring is enabled for the instance.

+ */ + Monitoring?: RunInstancesMonitoringEnabled; + + /** + * @public + *

The placement for the instance.

+ */ + Placement?: Placement; + + /** + * @public + *

The ID of the RAM disk to select. Some kernels require additional drivers at launch. + * Check the kernel requirements for information about whether you need to specify a RAM + * disk. To find kernel requirements, go to the Amazon Web Services Resource Center and + * search for the kernel ID.

+ * + *

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + * information, see PV-GRUB in the + * Amazon EC2 User Guide.

+ *
+ */ + RamdiskId?: string; + + /** + * @public + *

The IDs of the security groups. You can create a security group using CreateSecurityGroup.

+ *

If you specify a network interface, you must specify any security groups as part of + * the network interface.

+ */ + SecurityGroupIds?: string[]; + + /** + * @public + *

[Default VPC] The names of the security groups.

+ *

If you specify a network interface, you must specify any security groups as part of + * the network interface.

+ *

Default: Amazon EC2 uses the default security group.

+ */ + SecurityGroups?: string[]; + + /** + * @public + *

The ID of the subnet to launch the instance into.

+ *

If you specify a network interface, you must specify any subnets as part of the + * network interface.

+ */ + SubnetId?: string; + + /** + * @public + *

The user data script to make available to the instance. For more information, see + * Run + * commands on your Linux instance at launch and Run commands on your + * Windows instance at launch. If you are using a command line tool, + * base64-encoding is performed for you, and you can load the text from a file. Otherwise, + * you must provide base64-encoded text. User data is limited to 16 KB.

+ */ + UserData?: string; + + /** + * @public + *

Reserved.

+ */ + AdditionalInfo?: string; + + /** + * @public + *

Unique, case-sensitive identifier you provide to ensure the idempotency of the + * request. If you do not specify a client token, a randomly generated token is used for + * the request to ensure idempotency.

+ *

For more information, see Ensuring + * Idempotency.

+ *

Constraints: Maximum 64 ASCII characters

+ */ + ClientToken?: string; + + /** + * @public + *

If you set this parameter to true, you can't terminate the instance using + * the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after + * launch, use ModifyInstanceAttribute. Alternatively, if you set + * InstanceInitiatedShutdownBehavior to terminate, you can + * terminate the instance by running the shutdown command from the instance.

+ *

Default: false + *

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

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.

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

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + * provides dedicated throughput to Amazon EBS and an optimized configuration stack to + * provide optimal Amazon EBS I/O performance. This optimization isn't available with all + * instance types. Additional usage charges apply when using an EBS-optimized + * instance.

+ *

Default: false + *

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

The name or Amazon Resource Name (ARN) of an IAM instance + * profile.

+ */ + IamInstanceProfile?: IamInstanceProfileSpecification; + + /** + * @public + *

Indicates whether an instance stops or terminates when you initiate shutdown from the + * instance (using the operating system command for system shutdown).

+ *

Default: stop + *

+ */ + InstanceInitiatedShutdownBehavior?: ShutdownBehavior | string; + + /** + * @public + *

The network interfaces to associate with the instance. If you specify a network + * interface, you must specify any security groups and subnets as part of the network + * interface.

+ */ + NetworkInterfaces?: InstanceNetworkInterfaceSpecification[]; + + /** + * @public + *

The primary IPv4 address. You must specify a value from the IPv4 address + * range of the subnet.

+ *

Only one private IP address can be designated as primary. You can't specify this + * option if you've specified the option to designate a private IP address as the primary + * IP address in a network interface specification. You cannot specify this option if + * you're launching more than one instance in the request.

+ *

You cannot specify this option and the network interfaces option in the same + * request.

+ */ + PrivateIpAddress?: string; + + /** + * @public + *

An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that + * you can attach to your Windows instance to accelerate the graphics performance of your + * applications. For more information, see Amazon EC2 Elastic GPUs in + * the Amazon EC2 User Guide.

+ */ + ElasticGpuSpecification?: ElasticGpuSpecification[]; + + /** + * @public + *

An elastic inference accelerator to associate with the instance. Elastic inference + * accelerators are a resource you can attach to your Amazon EC2 instances to accelerate + * your Deep Learning (DL) inference workloads.

+ *

You cannot specify accelerators from different generations in the same request.

+ * + *

Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon + * Elastic Inference (EI), and will help current customers migrate their workloads to + * options that offer better price and performance. After April 15, 2023, new customers + * will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, + * Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during + * the past 30-day period are considered current customers and will be able to continue + * using the service.

+ *
+ */ + ElasticInferenceAccelerators?: ElasticInferenceAccelerator[]; + + /** + * @public + *

The tags to apply to the resources that are created during instance launch.

+ *

You can specify tags for the following resources only:

+ *
    + *
  • + *

    Instances

    + *
  • + *
  • + *

    Volumes

    + *
  • + *
  • + *

    Elastic graphics

    + *
  • + *
  • + *

    Spot Instance requests

    + *
  • + *
  • + *

    Network interfaces

    + *
  • + *
+ *

To tag a resource after it has been created, see CreateTags.

+ */ + TagSpecifications?: TagSpecification[]; + + /** + * @public + *

The launch template to use to launch the instances. Any parameters that you specify in + * RunInstances override the same parameters in the launch template. + * You can specify either the name or ID of a launch template, but not both.

+ */ + LaunchTemplate?: LaunchTemplateSpecification; + + /** + * @public + *

The market (purchasing) option for the instances.

+ *

For RunInstances, persistent Spot Instance requests are + * only supported when InstanceInterruptionBehavior is set + * to either hibernate or stop.

+ */ + InstanceMarketOptions?: InstanceMarketOptionsRequest; + + /** + * @public + *

The credit option for CPU usage of the burstable performance instance. Valid values + * are standard and unlimited. To change this attribute after + * launch, use + * ModifyInstanceCreditSpecification. For more information, see Burstable + * performance instances in the Amazon EC2 User Guide.

+ *

Default: standard (T2 instances) or unlimited (T3/T3a/T4g + * instances)

+ *

For T3 instances with host tenancy, only standard is + * supported.

+ */ + CreditSpecification?: CreditSpecificationRequest; + + /** + * @public + *

The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.

+ */ + CpuOptions?: CpuOptionsRequest; + + /** + * @public + *

Information about the Capacity Reservation targeting option. If you do not specify this parameter, the + * instance's Capacity Reservation preference defaults to open, which enables + * it to run in any open Capacity Reservation that has matching attributes (instance type, + * platform, Availability Zone).

+ */ + CapacityReservationSpecification?: CapacityReservationSpecification; + + /** + * @public + *

Indicates whether an instance is enabled for hibernation. This parameter is valid only + * if the instance meets the hibernation + * prerequisites. For more information, see Hibernate your instance in the + * Amazon EC2 User Guide.

+ *

You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same + * instance.

+ */ + HibernationOptions?: HibernationOptionsRequest; + + /** + * @public + *

The license configurations.

+ */ + LicenseSpecifications?: LicenseConfigurationRequest[]; + + /** + * @public + *

The metadata options for the instance. For more information, see Instance metadata and user data.

+ */ + MetadataOptions?: InstanceMetadataOptionsRequest; + + /** + * @public + *

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For + * more information, see What is Amazon Web Services Nitro + * Enclaves? in the Amazon Web Services Nitro Enclaves User + * Guide.

+ *

You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same + * instance.

+ */ + EnclaveOptions?: EnclaveOptionsRequest; + + /** + * @public + *

The options for the instance hostname. + * The default values are inherited from the subnet. + * Applies only if creating a network interface, not attaching an existing one.

+ */ + PrivateDnsNameOptions?: PrivateDnsNameOptionsRequest; + + /** + * @public + *

The maintenance and recovery options for the instance.

+ */ + MaintenanceOptions?: InstanceMaintenanceOptionsRequest; + + /** + * @public + *

Indicates whether an instance is enabled for stop protection. For more information, + * see Stop + * protection.

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

If you’re launching an instance into a dual-stack or IPv6-only subnet, you can enable + * assigning a primary IPv6 address. A primary IPv6 address is an IPv6 GUA address + * associated with an ENI that you have enabled to use a primary IPv6 address. Use this + * option if an instance relies on its IPv6 address not changing. When you launch the + * instance, Amazon Web Services will automatically assign an IPv6 address associated with + * the ENI attached to your instance to be the primary IPv6 address. Once you enable an + * IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 + * GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 + * address until the instance is terminated or the network interface is detached. If you + * have multiple IPv6 addresses associated with an ENI attached to your instance and you + * enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI + * becomes the primary IPv6 address.

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

Describes an EBS volume for a Scheduled Instance.

+ */ +export interface ScheduledInstancesEbs { + /** + * @public + *

Indicates whether the volume is deleted on instance termination.

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

Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.

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

The number of I/O operations per second (IOPS) to provision for an io1 or io2 volume, with a maximum + * ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB for io2. Range is 100 to 64,000 IOPS for + * volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on + * instances built on the Nitro System. Other instance families guarantee performance up to + * 32,000 IOPS. For more information, see Amazon EBS volume types in the + * Amazon EC2 User Guide.

+ *

This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes.

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

The ID of the snapshot.

+ */ + SnapshotId?: string; + + /** + * @public + *

The size of the volume, in GiB.

+ *

Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

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

The volume type. gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, Throughput Optimized HDD + * for st1, Cold HDD for sc1, or standard for + * Magnetic.

+ *

Default: gp2 + *

+ */ + VolumeType?: string; +} + +/** + * @public + *

Describes a block device mapping for a Scheduled Instance.

+ */ +export interface ScheduledInstancesBlockDeviceMapping { + /** + * @public + *

The device name (for example, /dev/sdh or xvdh).

+ */ + DeviceName?: string; + + /** + * @public + *

Parameters used to set up EBS volumes automatically when the instance is launched.

+ */ + Ebs?: ScheduledInstancesEbs; + + /** + * @public + *

To omit the device from the block device mapping, specify an empty string.

+ */ + NoDevice?: string; + + /** + * @public + *

The virtual device name (ephemeralN). Instance store volumes are numbered + * starting from 0. An instance type with two available instance store volumes can specify mappings + * for ephemeral0 and ephemeral1. The number of available instance store + * volumes depends on the instance type. After you connect to the instance, you must mount the + * volume.

+ *

Constraints: For M3 instances, you must specify instance store volumes in the block device + * mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes + * specified in the block device mapping for the AMI.

+ */ + VirtualName?: string; +} + +/** + * @public + *

Describes an IAM instance profile for a Scheduled Instance.

+ */ +export interface ScheduledInstancesIamInstanceProfile { + /** + * @public + *

The Amazon Resource Name (ARN).

+ */ + Arn?: string; + + /** + * @public + *

The name.

+ */ + Name?: string; +} + +/** + * @public + *

Describes whether monitoring is enabled for a Scheduled Instance.

+ */ +export interface ScheduledInstancesMonitoring { + /** + * @public + *

Indicates whether monitoring is enabled.

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

Describes an IPv6 address.

@@ -1328,6 +2000,14 @@ export interface WithdrawByoipCidrResult { ByoipCidr?: ByoipCidr; } +/** + * @internal + */ +export const RunInstancesRequestFilterSensitiveLog = (obj: RunInstancesRequest): any => ({ + ...obj, + ...(obj.UserData && { UserData: SENSITIVE_STRING }), +}); + /** * @internal */ diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 17bffff419da..e70eeb5ea8b7 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -1267,6 +1267,10 @@ import { DisableFastSnapshotRestoresCommandInput, DisableFastSnapshotRestoresCommandOutput, } from "../commands/DisableFastSnapshotRestoresCommand"; +import { + DisableImageBlockPublicAccessCommandInput, + DisableImageBlockPublicAccessCommandOutput, +} from "../commands/DisableImageBlockPublicAccessCommand"; import { DisableImageDeprecationCommandInput, DisableImageDeprecationCommandOutput, @@ -1368,6 +1372,10 @@ import { EnableFastSnapshotRestoresCommandInput, EnableFastSnapshotRestoresCommandOutput, } from "../commands/EnableFastSnapshotRestoresCommand"; +import { + EnableImageBlockPublicAccessCommandInput, + EnableImageBlockPublicAccessCommandOutput, +} from "../commands/EnableImageBlockPublicAccessCommand"; import { EnableImageDeprecationCommandInput, EnableImageDeprecationCommandOutput, @@ -1460,6 +1468,10 @@ import { GetHostReservationPurchasePreviewCommandInput, GetHostReservationPurchasePreviewCommandOutput, } from "../commands/GetHostReservationPurchasePreviewCommand"; +import { + GetImageBlockPublicAccessStateCommandInput, + GetImageBlockPublicAccessStateCommandOutput, +} from "../commands/GetImageBlockPublicAccessStateCommand"; import { GetInstanceTypesFromInstanceRequirementsCommandInput, GetInstanceTypesFromInstanceRequirementsCommandOutput, @@ -3353,6 +3365,8 @@ import { DisableFastSnapshotRestoreStateError, DisableFastSnapshotRestoreStateErrorItem, DisableFastSnapshotRestoreSuccessItem, + DisableImageBlockPublicAccessRequest, + DisableImageBlockPublicAccessResult, DisableImageDeprecationRequest, DisableImageDeprecationResult, DisableIpamOrganizationAdminAccountRequest, @@ -3406,6 +3420,8 @@ import { EnableFastSnapshotRestoreStateError, EnableFastSnapshotRestoreStateErrorItem, EnableFastSnapshotRestoreSuccessItem, + EnableImageBlockPublicAccessRequest, + EnableImageBlockPublicAccessResult, EnableImageDeprecationRequest, EnableImageDeprecationResult, EnableIpamOrganizationAdminAccountRequest, @@ -3459,6 +3475,8 @@ import { GetGroupsForCapacityReservationResult, GetHostReservationPurchasePreviewRequest, GetHostReservationPurchasePreviewResult, + GetImageBlockPublicAccessStateRequest, + GetImageBlockPublicAccessStateResult, GetInstanceTypesFromInstanceRequirementsRequest, GetInstanceTypesFromInstanceRequirementsResult, GetInstanceUefiDataRequest, @@ -3513,12 +3531,6 @@ import { GetVerifiedAccessEndpointPolicyResult, GetVerifiedAccessGroupPolicyRequest, GetVerifiedAccessGroupPolicyResult, - GetVpnConnectionDeviceSampleConfigurationRequest, - GetVpnConnectionDeviceSampleConfigurationResult, - GetVpnConnectionDeviceTypesRequest, - GetVpnConnectionDeviceTypesResult, - GetVpnTunnelReplacementStatusRequest, - GetVpnTunnelReplacementStatusResult, InstanceEventWindowDisassociationRequest, InstanceFamilyCreditSpecification, InstanceRequirementsWithMetadataRequest, @@ -3531,7 +3543,6 @@ import { IpamDiscoveryFailureReason, IpamResourceCidr, Ipv6CidrAssociation, - MaintenanceDetails, MetricPoint, PrefixListAssociation, PrefixListEntry, @@ -3566,7 +3577,6 @@ import { VolumeStatusItem, VpcClassicLink, VpcEndpointConnection, - VpnConnectionDeviceType, } from "../models/models_5"; import { BlobAttributeValue, @@ -3581,6 +3591,12 @@ import { EbsInstanceBlockDeviceSpecification, ElasticInferenceAccelerator, EnclaveOptionsRequest, + GetVpnConnectionDeviceSampleConfigurationRequest, + GetVpnConnectionDeviceSampleConfigurationResult, + GetVpnConnectionDeviceTypesRequest, + GetVpnConnectionDeviceTypesResult, + GetVpnTunnelReplacementStatusRequest, + GetVpnTunnelReplacementStatusResult, HibernationOptionsRequest, ImageDiskContainer, ImageRecycleBinInfo, @@ -3600,9 +3616,7 @@ import { ImportVolumeResult, InstanceBlockDeviceMappingSpecification, InstanceCreditSpecificationRequest, - InstanceMaintenanceOptionsRequest, InstanceMarketOptionsRequest, - InstanceMetadataOptionsRequest, InstanceMonitoring, IpamCidrAuthorizationContext, LaunchPermissionModifications, @@ -3614,6 +3628,7 @@ import { ListSnapshotsInRecycleBinResult, LoadPermissionModifications, LoadPermissionRequest, + MaintenanceDetails, ModifyAddressAttributeRequest, ModifyAddressAttributeResult, ModifyAvailabilityZoneGroupRequest, @@ -3748,7 +3763,6 @@ import { NetworkInterfaceAttachmentChanges, PeeringConnectionOptions, PeeringConnectionOptionsRequest, - PrivateDnsNameOptionsRequest, ProvisionByoipCidrRequest, ProvisionByoipCidrResult, ProvisionIpamPoolCidrRequest, @@ -3835,11 +3849,6 @@ import { RevokeSecurityGroupEgressResult, RevokeSecurityGroupIngressRequest, RevokeSecurityGroupIngressResult, - RunInstancesRequest, - ScheduledInstancesBlockDeviceMapping, - ScheduledInstancesEbs, - ScheduledInstancesIamInstanceProfile, - ScheduledInstancesMonitoring, SecurityGroupRuleRequest, SecurityGroupRuleUpdate, SnapshotDiskContainer, @@ -3859,13 +3868,22 @@ import { VerifiedAccessLogOptions, VerifiedAccessLogS3DestinationOptions, VolumeDetail, + VpnConnectionDeviceType, } from "../models/models_6"; import { + InstanceMaintenanceOptionsRequest, + InstanceMetadataOptionsRequest, InstanceStateChange, + PrivateDnsNameOptionsRequest, + RunInstancesRequest, RunScheduledInstancesRequest, RunScheduledInstancesResult, + ScheduledInstancesBlockDeviceMapping, + ScheduledInstancesEbs, + ScheduledInstancesIamInstanceProfile, ScheduledInstancesIpv6Address, ScheduledInstancesLaunchSpecification, + ScheduledInstancesMonitoring, ScheduledInstancesNetworkInterface, ScheduledInstancesPlacement, ScheduledInstancesPrivateIpAddressConfig, @@ -10249,6 +10267,23 @@ export const se_DisableFastSnapshotRestoresCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2DisableImageBlockPublicAccessCommand + */ +export const se_DisableImageBlockPublicAccessCommand = async ( + input: DisableImageBlockPublicAccessCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DisableImageBlockPublicAccessRequest(input, context), + Action: "DisableImageBlockPublicAccess", + Version: "2016-11-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2DisableImageDeprecationCommand */ @@ -10691,6 +10726,23 @@ export const se_EnableFastSnapshotRestoresCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2EnableImageBlockPublicAccessCommand + */ +export const se_EnableImageBlockPublicAccessCommand = async ( + input: EnableImageBlockPublicAccessCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_EnableImageBlockPublicAccessRequest(input, context), + Action: "EnableImageBlockPublicAccess", + Version: "2016-11-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2EnableImageDeprecationCommand */ @@ -11133,6 +11185,23 @@ export const se_GetHostReservationPurchasePreviewCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_ec2GetImageBlockPublicAccessStateCommand + */ +export const se_GetImageBlockPublicAccessStateCommand = async ( + input: GetImageBlockPublicAccessStateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_GetImageBlockPublicAccessStateRequest(input, context), + Action: "GetImageBlockPublicAccessState", + Version: "2016-11-15", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand */ @@ -28836,6 +28905,46 @@ const de_DisableFastSnapshotRestoresCommandError = async ( }); }; +/** + * deserializeAws_ec2DisableImageBlockPublicAccessCommand + */ +export const de_DisableImageBlockPublicAccessCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DisableImageBlockPublicAccessCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DisableImageBlockPublicAccessResult(data, context); + const response: DisableImageBlockPublicAccessCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_ec2DisableImageBlockPublicAccessCommandError + */ +const de_DisableImageBlockPublicAccessCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadEc2ErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Errors.Error, + errorCode, + }); +}; + /** * deserializeAws_ec2DisableImageDeprecationCommand */ @@ -29867,6 +29976,46 @@ const de_EnableFastSnapshotRestoresCommandError = async ( }); }; +/** + * deserializeAws_ec2EnableImageBlockPublicAccessCommand + */ +export const de_EnableImageBlockPublicAccessCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_EnableImageBlockPublicAccessCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_EnableImageBlockPublicAccessResult(data, context); + const response: EnableImageBlockPublicAccessCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_ec2EnableImageBlockPublicAccessCommandError + */ +const de_EnableImageBlockPublicAccessCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadEc2ErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Errors.Error, + errorCode, + }); +}; + /** * deserializeAws_ec2EnableImageDeprecationCommand */ @@ -30901,6 +31050,46 @@ const de_GetHostReservationPurchasePreviewCommandError = async ( }); }; +/** + * deserializeAws_ec2GetImageBlockPublicAccessStateCommand + */ +export const de_GetImageBlockPublicAccessStateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetImageBlockPublicAccessStateCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetImageBlockPublicAccessStateResult(data, context); + const response: GetImageBlockPublicAccessStateCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_ec2GetImageBlockPublicAccessStateCommandError + */ +const de_GetImageBlockPublicAccessStateCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadEc2ErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Errors.Error, + errorCode, + }); +}; + /** * deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsCommand */ @@ -50582,6 +50771,20 @@ const se_DisableFastSnapshotRestoresRequest = ( return entries; }; +/** + * serializeAws_ec2DisableImageBlockPublicAccessRequest + */ +const se_DisableImageBlockPublicAccessRequest = ( + input: DisableImageBlockPublicAccessRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.DryRun != null) { + entries["DryRun"] = input.DryRun; + } + return entries; +}; + /** * serializeAws_ec2DisableImageDeprecationRequest */ @@ -51375,6 +51578,23 @@ const se_EnableFastSnapshotRestoresRequest = ( return entries; }; +/** + * serializeAws_ec2EnableImageBlockPublicAccessRequest + */ +const se_EnableImageBlockPublicAccessRequest = ( + input: EnableImageBlockPublicAccessRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.ImageBlockPublicAccessState != null) { + entries["ImageBlockPublicAccessState"] = input.ImageBlockPublicAccessState; + } + if (input.DryRun != null) { + entries["DryRun"] = input.DryRun; + } + return entries; +}; + /** * serializeAws_ec2EnableImageDeprecationRequest */ @@ -52395,6 +52615,20 @@ const se_GetHostReservationPurchasePreviewRequest = ( return entries; }; +/** + * serializeAws_ec2GetImageBlockPublicAccessStateRequest + */ +const se_GetImageBlockPublicAccessStateRequest = ( + input: GetImageBlockPublicAccessStateRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.DryRun != null) { + entries["DryRun"] = input.DryRun; + } + return entries; +}; + /** * serializeAws_ec2GetInstanceTypesFromInstanceRequirementsRequest */ @@ -74500,6 +74734,20 @@ const de_DisableFastSnapshotRestoreSuccessSet = ( }); }; +/** + * deserializeAws_ec2DisableImageBlockPublicAccessResult + */ +const de_DisableImageBlockPublicAccessResult = ( + output: any, + context: __SerdeContext +): DisableImageBlockPublicAccessResult => { + const contents: any = {}; + if (output["imageBlockPublicAccessState"] !== undefined) { + contents.ImageBlockPublicAccessState = __expectString(output["imageBlockPublicAccessState"]); + } + return contents; +}; + /** * deserializeAws_ec2DisableImageDeprecationResult */ @@ -75488,6 +75736,20 @@ const de_EnableFastSnapshotRestoreSuccessSet = ( }); }; +/** + * deserializeAws_ec2EnableImageBlockPublicAccessResult + */ +const de_EnableImageBlockPublicAccessResult = ( + output: any, + context: __SerdeContext +): EnableImageBlockPublicAccessResult => { + const contents: any = {}; + if (output["imageBlockPublicAccessState"] !== undefined) { + contents.ImageBlockPublicAccessState = __expectString(output["imageBlockPublicAccessState"]); + } + return contents; +}; + /** * deserializeAws_ec2EnableImageDeprecationResult */ @@ -77029,6 +77291,20 @@ const de_GetHostReservationPurchasePreviewResult = ( return contents; }; +/** + * deserializeAws_ec2GetImageBlockPublicAccessStateResult + */ +const de_GetImageBlockPublicAccessStateResult = ( + output: any, + context: __SerdeContext +): GetImageBlockPublicAccessStateResult => { + const contents: any = {}; + if (output["imageBlockPublicAccessState"] !== undefined) { + contents.ImageBlockPublicAccessState = __expectString(output["imageBlockPublicAccessState"]); + } + return contents; +}; + /** * deserializeAws_ec2GetInstanceTypesFromInstanceRequirementsResult */ diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index 1618a1a7ae83..df543f22b585 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -3254,6 +3254,9 @@ { "target": "com.amazonaws.ec2#DisableFastSnapshotRestores" }, + { + "target": "com.amazonaws.ec2#DisableImageBlockPublicAccess" + }, { "target": "com.amazonaws.ec2#DisableImageDeprecation" }, @@ -3332,6 +3335,9 @@ { "target": "com.amazonaws.ec2#EnableFastSnapshotRestores" }, + { + "target": "com.amazonaws.ec2#EnableImageBlockPublicAccess" + }, { "target": "com.amazonaws.ec2#EnableImageDeprecation" }, @@ -3410,6 +3416,9 @@ { "target": "com.amazonaws.ec2#GetHostReservationPurchasePreview" }, + { + "target": "com.amazonaws.ec2#GetImageBlockPublicAccessState" + }, { "target": "com.amazonaws.ec2#GetInstanceTypesFromInstanceRequirements" }, @@ -5763,9 +5772,7 @@ "documentation": "This example assigns the specified secondary private IP address to the specified network interface.", "input": { "NetworkInterfaceId": "eni-e5aa89a3", - "PrivateIpAddresses": [ - "10.0.0.82" - ] + "PrivateIpAddresses": ["10.0.0.82"] } } ] @@ -9784,9 +9791,7 @@ "title": "To cancel a Spot fleet request", "documentation": "This example cancels the specified Spot fleet request and terminates its associated Spot Instances.", "input": { - "SpotFleetRequestIds": [ - "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE" - ], + "SpotFleetRequestIds": ["sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"], "TerminateInstances": true }, "output": { @@ -10015,9 +10020,7 @@ "title": "To cancel Spot Instance requests", "documentation": "This example cancels a Spot Instance request.", "input": { - "SpotInstanceRequestIds": [ - "sir-08b93456" - ] + "SpotInstanceRequestIds": ["sir-08b93456"] }, "output": { "CancelledSpotInstanceRequests": [ @@ -14330,10 +14333,7 @@ "DhcpConfigurations": [ { "Key": "domain-name-servers", - "Values": [ - "10.2.5.1", - "10.2.5.2" - ] + "Values": ["10.2.5.1", "10.2.5.2"] } ] }, @@ -18518,9 +18518,7 @@ "title": "To add a tag to a resource", "documentation": "This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack.", "input": { - "Resources": [ - "ami-78a54011" - ], + "Resources": ["ami-78a54011"], "Tags": [ { "Key": "Stack", @@ -22968,9 +22966,7 @@ "documentation": "This example deletes the specified launch template version.", "input": { "LaunchTemplateId": "lt-0abcd290751193123", - "Versions": [ - "1" - ] + "Versions": ["1"] }, "output": { "SuccessfullyDeletedLaunchTemplateVersions": [ @@ -24521,9 +24517,7 @@ "title": "To delete a tag from a resource", "documentation": "This example deletes the tag Stack=test from the specified image.", "input": { - "Resources": [ - "ami-78a54011" - ], + "Resources": ["ami-78a54011"], "Tags": [ { "Key": "Stack", @@ -26470,9 +26464,7 @@ "title": "To describe a single attribute for your AWS account", "documentation": "This example describes the supported-platforms attribute for your AWS account.", "input": { - "AttributeNames": [ - "supported-platforms" - ] + "AttributeNames": ["supported-platforms"] }, "output": { "AccountAttributes": [ @@ -28314,9 +28306,7 @@ "title": "To describe a customer gateway", "documentation": "This example describes the specified customer gateway.", "input": { - "CustomerGatewayIds": [ - "cgw-0e11f167" - ] + "CustomerGatewayIds": ["cgw-0e11f167"] }, "output": { "CustomerGateways": [ @@ -28435,9 +28425,7 @@ "title": "To describe a DHCP options set", "documentation": "This example describes the specified DHCP options set.", "input": { - "DhcpOptionsIds": [ - "dopt-d9070ebb" - ] + "DhcpOptionsIds": ["dopt-d9070ebb"] }, "output": { "DhcpOptions": [ @@ -30217,9 +30205,7 @@ "title": "To describe an IAM instance profile association", "documentation": "This example describes the specified IAM instance profile association.", "input": { - "AssociationIds": [ - "iip-assoc-0db249b1f25fa24b8" - ] + "AssociationIds": ["iip-assoc-0db249b1f25fa24b8"] }, "output": { "IamInstanceProfileAssociations": [ @@ -30490,9 +30476,7 @@ "title": "To describe an AMI", "documentation": "This example describes the specified AMI.", "input": { - "ImageIds": [ - "ami-5731123e" - ] + "ImageIds": ["ami-5731123e"] }, "output": { "Images": [ @@ -30533,9 +30517,7 @@ "items": "Images", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "ImageAvailable": { "acceptors": [ @@ -31271,9 +31253,7 @@ "title": "To describe the status of an instance", "documentation": "This example describes the current status of the specified instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef0" - ] + "InstanceIds": ["i-1234567890abcdef0"] }, "output": { "InstanceStatuses": [ @@ -31313,9 +31293,7 @@ "items": "InstanceStatuses", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "InstanceStatusOk": { "acceptors": [ @@ -31618,9 +31596,7 @@ "title": "To describe an Amazon EC2 instance", "documentation": "This example describes the specified instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef0" - ] + "InstanceIds": ["i-1234567890abcdef0"] }, "output": {} } @@ -31631,9 +31607,7 @@ "items": "Reservations", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "InstanceExists": { "acceptors": [ @@ -31872,9 +31846,7 @@ "Filters": [ { "Name": "attachment.vpc-id", - "Values": [ - "vpc-a01106c2" - ] + "Values": ["vpc-a01106c2"] } ] }, @@ -31900,9 +31872,7 @@ "items": "InternetGateways", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "InternetGatewayExists": { "acceptors": [ @@ -32540,9 +32510,7 @@ "title": "To display a key pair", "documentation": "This example displays the fingerprint for the specified key.", "input": { - "KeyNames": [ - "my-key-pair" - ] + "KeyNames": ["my-key-pair"] }, "output": { "KeyPairs": [ @@ -32554,9 +32522,7 @@ } } ], - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "KeyPairExists": { "acceptors": [ @@ -32677,9 +32643,7 @@ { "SubnetId": "subnet-1a2b3c4d", "DeviceIndex": 0, - "Groups": [ - "sg-7c227019" - ] + "Groups": ["sg-7c227019"] } ] }, @@ -32701,9 +32665,7 @@ "SubnetId": "subnet-7b16de0c", "DeviceIndex": 0, "DeleteOnTermination": false, - "Groups": [ - "sg-7c227019" - ], + "Groups": ["sg-7c227019"], "AssociatePublicIpAddress": true } ] @@ -32838,9 +32800,7 @@ "title": "To describe a launch template", "documentation": "This example describes the specified launch template.", "input": { - "LaunchTemplateIds": [ - "lt-01238c059e3466abc" - ] + "LaunchTemplateIds": ["lt-01238c059e3466abc"] }, "output": { "LaunchTemplates": [ @@ -33687,9 +33647,7 @@ "Filter": [ { "Name": "vpc-id", - "Values": [ - "vpc-1a2b3c4d" - ] + "Values": ["vpc-1a2b3c4d"] } ] }, @@ -33720,9 +33678,7 @@ "items": "NatGateways", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "NatGatewayAvailable": { "acceptors": [ @@ -33891,9 +33847,7 @@ "title": "To describe a network ACL", "documentation": "This example describes the specified network ACL.", "input": { - "NetworkAclIds": [ - "acl-5fb85d36" - ] + "NetworkAclIds": ["acl-5fb85d36"] }, "output": { "NetworkAcls": [ @@ -34623,9 +34577,7 @@ "title": "To describe a network interface", "documentation": "", "input": { - "NetworkInterfaceIds": [ - "eni-e5aa89a3" - ] + "NetworkInterfaceIds": ["eni-e5aa89a3"] }, "output": { "NetworkInterfaces": [ @@ -34688,9 +34640,7 @@ "items": "NetworkInterfaces", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "NetworkInterfaceAvailable": { "acceptors": [ @@ -35728,9 +35678,7 @@ "title": "To describe a route table", "documentation": "This example describes the specified route table.", "input": { - "RouteTableIds": [ - "rtb-1f382e7d" - ] + "RouteTableIds": ["rtb-1f382e7d"] }, "output": { "RouteTables": [ @@ -36079,9 +36027,7 @@ "title": "To describe security group references", "documentation": "This example describes the security group references for the specified security group.", "input": { - "GroupId": [ - "sg-903004f8" - ] + "GroupId": ["sg-903004f8"] }, "output": { "SecurityGroupReferenceSet": [ @@ -36247,9 +36193,7 @@ "title": "To describe a security group", "documentation": "This example describes the specified security group.", "input": { - "GroupIds": [ - "sg-903004f8" - ] + "GroupIds": ["sg-903004f8"] }, "output": {} } @@ -36260,9 +36204,7 @@ "items": "SecurityGroups", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "SecurityGroupExists": { "acceptors": [ @@ -36562,9 +36504,7 @@ "title": "To describe a snapshot", "documentation": "This example describes a snapshot with the snapshot ID of ``snap-1234567890abcdef0``.", "input": { - "SnapshotIds": [ - "snap-1234567890abcdef0" - ] + "SnapshotIds": ["snap-1234567890abcdef0"] }, "output": { "Snapshots": [ @@ -37083,9 +37023,7 @@ "title": "To describe a Spot fleet request", "documentation": "This example describes the specified Spot fleet request.", "input": { - "SpotFleetRequestIds": [ - "sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE" - ] + "SpotFleetRequestIds": ["sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"] }, "output": { "SpotFleetRequestConfigs": [ @@ -37225,9 +37163,7 @@ "title": "To describe a Spot Instance request", "documentation": "This example describes the specified Spot Instance request.", "input": { - "SpotInstanceRequestIds": [ - "sir-08b93456" - ] + "SpotInstanceRequestIds": ["sir-08b93456"] }, "output": { "SpotInstanceRequests": [ @@ -37278,9 +37214,7 @@ "items": "SpotInstanceRequests", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "SpotInstanceRequestFulfilled": { "acceptors": [ @@ -37445,12 +37379,8 @@ "input": { "StartTime": "2014-01-06T07:08:09.05Z", "EndTime": "2014-01-06T08:09:10.05Z", - "InstanceTypes": [ - "m1.xlarge" - ], - "ProductDescriptions": [ - "Linux/UNIX (Amazon VPC)" - ] + "InstanceTypes": ["m1.xlarge"], + "ProductDescriptions": ["Linux/UNIX (Amazon VPC)"] }, "output": { "SpotPriceHistory": [ @@ -37837,9 +37767,7 @@ "Filters": [ { "Name": "vpc-id", - "Values": [ - "vpc-a01106c2" - ] + "Values": ["vpc-a01106c2"] } ] }, @@ -37982,9 +37910,7 @@ "Filters": [ { "Name": "resource-id", - "Values": [ - "i-1234567890abcdef8" - ] + "Values": ["i-1234567890abcdef8"] } ] }, @@ -39892,9 +39818,7 @@ "title": "To describe the status of a single volume", "documentation": "This example describes the status for the volume ``vol-1234567890abcdef0``.", "input": { - "VolumeIds": [ - "vol-1234567890abcdef0" - ] + "VolumeIds": ["vol-1234567890abcdef0"] }, "output": { "VolumeStatuses": [ @@ -40045,9 +39969,7 @@ "items": "Volumes", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "VolumeAvailable": { "acceptors": [ @@ -41066,9 +40988,7 @@ "items": "VpcPeeringConnections", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "VpcPeeringConnectionDeleted": { "acceptors": [ @@ -41206,9 +41126,7 @@ "title": "To describe a VPC", "documentation": "This example describes the specified VPC.", "input": { - "VpcIds": [ - "vpc-a01106c2" - ] + "VpcIds": ["vpc-a01106c2"] }, "output": { "Vpcs": [ @@ -41236,9 +41154,7 @@ "items": "Vpcs", "pageSize": "MaxResults" }, - "smithy.api#suppress": [ - "WaitableTraitInvalidErrorType" - ], + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "VpcAvailable": { "acceptors": [ @@ -42750,6 +42666,50 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#DisableImageBlockPublicAccess": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#DisableImageBlockPublicAccessRequest" + }, + "output": { + "target": "com.amazonaws.ec2#DisableImageBlockPublicAccessResult" + }, + "traits": { + "smithy.api#documentation": "

Disables block public access for AMIs at the account level in the\n specified Amazon Web Services Region. This removes the block public access restriction\n from your account. With the restriction removed, you can publicly share your AMIs in the\n specified Amazon Web Services Region.

\n

The API can take up to 10 minutes to configure this setting. During this time, if you run\n GetImageBlockPublicAccessState, the response will be\n block-new-sharing. When the API has completed the configuration, the response\n will be unblocked.

\n

For more information, see Block public access to your AMIs in\n the Amazon EC2 User Guide.

" + } + }, + "com.amazonaws.ec2#DisableImageBlockPublicAccessRequest": { + "type": "structure", + "members": { + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": false, + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n\t\t\tand provides an error response. If you have the required permissions, the error response is \n\t\t\tDryRunOperation. Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#DisableImageBlockPublicAccessResult": { + "type": "structure", + "members": { + "ImageBlockPublicAccessState": { + "target": "com.amazonaws.ec2#ImageBlockPublicAccessDisabledState", + "traits": { + "aws.protocols#ec2QueryName": "ImageBlockPublicAccessState", + "smithy.api#documentation": "

Returns unblocked if the request succeeds; otherwise, it returns an\n error.

", + "smithy.api#xmlName": "imageBlockPublicAccessState" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#DisableImageDeprecation": { "type": "operation", "input": { @@ -45991,6 +45951,58 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#EnableImageBlockPublicAccess": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#EnableImageBlockPublicAccessRequest" + }, + "output": { + "target": "com.amazonaws.ec2#EnableImageBlockPublicAccessResult" + }, + "traits": { + "smithy.api#documentation": "

Enables block public access for AMIs at the account level in the\n specified Amazon Web Services Region. This prevents the public sharing of your AMIs. However, if you already\n have public AMIs, they will remain publicly available.

\n

The API can take up to 10 minutes to configure this setting. During this time, if you run\n GetImageBlockPublicAccessState, the response will be unblocked. When\n the API has completed the configuration, the response will be\n block-new-sharing.

\n

For more information, see Block\n public access to your AMIs in the Amazon EC2 User Guide.

" + } + }, + "com.amazonaws.ec2#EnableImageBlockPublicAccessRequest": { + "type": "structure", + "members": { + "ImageBlockPublicAccessState": { + "target": "com.amazonaws.ec2#ImageBlockPublicAccessEnabledState", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "

Specify block-new-sharing to enable block public access for AMIs at the\n account level in the specified Region. This will block any attempt to publicly share your AMIs\n in the specified Region.

", + "smithy.api#required": {} + } + }, + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": false, + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n\t\t\tand provides an error response. If you have the required permissions, the error response is \n\t\t\tDryRunOperation. Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#EnableImageBlockPublicAccessResult": { + "type": "structure", + "members": { + "ImageBlockPublicAccessState": { + "target": "com.amazonaws.ec2#ImageBlockPublicAccessEnabledState", + "traits": { + "aws.protocols#ec2QueryName": "ImageBlockPublicAccessState", + "smithy.api#documentation": "

Returns block-new-sharing if the request succeeds; otherwise, it returns an\n error.

", + "smithy.api#xmlName": "imageBlockPublicAccessState" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#EnableImageDeprecation": { "type": "operation", "input": { @@ -50919,6 +50931,50 @@ "smithy.api#output": {} } }, + "com.amazonaws.ec2#GetImageBlockPublicAccessState": { + "type": "operation", + "input": { + "target": "com.amazonaws.ec2#GetImageBlockPublicAccessStateRequest" + }, + "output": { + "target": "com.amazonaws.ec2#GetImageBlockPublicAccessStateResult" + }, + "traits": { + "smithy.api#documentation": "

Gets the current state of block public access for AMIs at the account\n level in the specified Amazon Web Services Region.

\n

For more information, see Block\n public access to your AMIs in the Amazon EC2 User Guide.

" + } + }, + "com.amazonaws.ec2#GetImageBlockPublicAccessStateRequest": { + "type": "structure", + "members": { + "DryRun": { + "target": "com.amazonaws.ec2#Boolean", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#default": false, + "smithy.api#documentation": "

Checks whether you have the required permissions for the action, without actually making the request, \n\t\t\tand provides an error response. If you have the required permissions, the error response is \n\t\t\tDryRunOperation. Otherwise, it is UnauthorizedOperation.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.ec2#GetImageBlockPublicAccessStateResult": { + "type": "structure", + "members": { + "ImageBlockPublicAccessState": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "ImageBlockPublicAccessState", + "smithy.api#documentation": "

The current state of block public access for AMIs at the account level in the specified\n Amazon Web Services Region.

\n

Possible values:

\n
    \n
  • \n

    \n block-new-sharing - Any attempt to publicly share your AMIs in the\n specified Region is blocked.

    \n
  • \n
  • \n

    \n unblocked - Your AMIs in the specified Region can be publicly\n shared.

    \n
  • \n
", + "smithy.api#xmlName": "imageBlockPublicAccessState" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.ec2#GetInstanceTypesFromInstanceRequirements": { "type": "operation", "input": { @@ -51703,9 +51759,7 @@ "NetworkInterfaces": [ { "DeviceIndex": 0, - "Groups": [ - "sg-d14e1bb4" - ], + "Groups": ["sg-d14e1bb4"], "Ipv6Addresses": [], "AssociatePublicIpAddress": false, "NetworkInterfaceId": "eni-4338b5a9", @@ -52477,7 +52531,7 @@ "target": "com.amazonaws.ec2#SpotPlacementScores", "traits": { "aws.protocols#ec2QueryName": "SpotPlacementScoreSet", - "smithy.api#documentation": "

The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale\n from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone\n will succeed at fulfilling the specified target capacity
 at the time of the Spot\n placement score request. A score of 10 means that your Spot\n capacity request is highly likely to succeed in that Region or Availability Zone.

\n

If you request a Spot placement score for Regions, a high score assumes that your fleet\n request will be configured to use all Availability Zones and the\n capacity-optimized allocation strategy. If you request a Spot placement\n score for Availability Zones, a high score assumes that your fleet request will be\n configured to use a single Availability Zone and the capacity-optimized\n allocation strategy.

\n

Different
 Regions or Availability Zones might return the same score.

\n \n

The Spot placement score serves as a recommendation only. No score guarantees that your\n Spot request will be fully or partially fulfilled.

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

The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale\n from 1 to 10. Each score\u2028 reflects how likely it is that each Region or Availability Zone\n will succeed at fulfilling the specified target capacity\u2028 at the time of the Spot\n placement score request. A score of 10 means that your Spot\n capacity request is highly likely to succeed in that Region or Availability Zone.

\n

If you request a Spot placement score for Regions, a high score assumes that your fleet\n request will be configured to use all Availability Zones and the\n capacity-optimized allocation strategy. If you request a Spot placement\n score for Availability Zones, a high score assumes that your fleet request will be\n configured to use a single Availability Zone and the capacity-optimized\n allocation strategy.

\n

Different\u2028 Regions or Availability Zones might return the same score.

\n \n

The Spot placement score serves as a recommendation only. No score guarantees that your\n Spot request will be fully or partially fulfilled.

\n
", "smithy.api#xmlName": "spotPlacementScoreSet" } }, @@ -55157,6 +55211,28 @@ } } }, + "com.amazonaws.ec2#ImageBlockPublicAccessDisabledState": { + "type": "enum", + "members": { + "unblocked": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unblocked" + } + } + } + }, + "com.amazonaws.ec2#ImageBlockPublicAccessEnabledState": { + "type": "enum", + "members": { + "block_new_sharing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "block-new-sharing" + } + } + } + }, "com.amazonaws.ec2#ImageDiskContainer": { "type": "structure", "members": { @@ -74132,9 +74208,7 @@ "SnapshotId": "snap-1234567890abcdef0", "Attribute": "createVolumePermission", "OperationType": "remove", - "UserIds": [ - "123456789012" - ] + "UserIds": ["123456789012"] }, "output": {} } @@ -83006,9 +83080,7 @@ "title": "To reboot an EC2 instance", "documentation": "This example reboots the specified EC2 instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef5" - ] + "InstanceIds": ["i-1234567890abcdef5"] }, "output": {} } @@ -85468,9 +85540,7 @@ "LaunchSpecification": { "ImageId": "ami-1a2b3c4d", "KeyName": "my-key-pair", - "SecurityGroupIds": [ - "sg-1a2b3c4d" - ], + "SecurityGroupIds": ["sg-1a2b3c4d"], "InstanceType": "m3.medium", "Placement": { "AvailabilityZone": "us-west-2a" @@ -89352,9 +89422,7 @@ "KeyName": "my-key-pair", "MaxCount": 1, "MinCount": 1, - "SecurityGroupIds": [ - "sg-1a2b3c4d" - ], + "SecurityGroupIds": ["sg-1a2b3c4d"], "SubnetId": "subnet-6e7f829e", "TagSpecifications": [ { @@ -94097,9 +94165,7 @@ "title": "To start a stopped EC2 instance", "documentation": "This example starts the specified EC2 instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef0" - ] + "InstanceIds": ["i-1234567890abcdef0"] }, "output": { "StartingInstances": [ @@ -94558,9 +94624,7 @@ "title": "To stop a running EC2 instance", "documentation": "This example stops the specified EC2 instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef0" - ] + "InstanceIds": ["i-1234567890abcdef0"] }, "output": { "StoppingInstances": [ @@ -96097,9 +96161,7 @@ "title": "To terminate an EC2 instance", "documentation": "This example terminates the specified EC2 instance.", "input": { - "InstanceIds": [ - "i-1234567890abcdef0" - ] + "InstanceIds": ["i-1234567890abcdef0"] }, "output": { "TerminatingInstances": [ @@ -100287,9 +100349,7 @@ "documentation": "This example unassigns the specified private IP address from the specified network interface.", "input": { "NetworkInterfaceId": "eni-e5aa89a3", - "PrivateIpAddresses": [ - "10.0.0.82" - ] + "PrivateIpAddresses": ["10.0.0.82"] } } ] @@ -105267,4 +105327,4 @@ "type": "integer" } } -} \ No newline at end of file +}