Skip to content

Commit

Permalink
feat(client-ec2): This release adds support for restricting public sh…
Browse files Browse the repository at this point in the history
…aring of AMIs through AMI Block Public Access
  • Loading branch information
awstools committed Sep 12, 2023
1 parent fecfd43 commit 0528034
Show file tree
Hide file tree
Showing 16 changed files with 2,172 additions and 1,106 deletions.
24 changes: 24 additions & 0 deletions clients/client-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

</details>
<details>
<summary>
DisableImageBlockPublicAccess
</summary>

[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)

</details>
<details>
<summary>
Expand Down Expand Up @@ -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)

</details>
<details>
<summary>
EnableImageBlockPublicAccess
</summary>

[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)

</details>
<details>
<summary>
Expand Down Expand Up @@ -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)

</details>
<details>
<summary>
GetImageBlockPublicAccessState
</summary>

[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)

</details>
<details>
<summary>
Expand Down
69 changes: 69 additions & 0 deletions clients/client-ec2/src/EC2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,11 @@ import {
DisableFastSnapshotRestoresCommandInput,
DisableFastSnapshotRestoresCommandOutput,
} from "./commands/DisableFastSnapshotRestoresCommand";
import {
DisableImageBlockPublicAccessCommand,
DisableImageBlockPublicAccessCommandInput,
DisableImageBlockPublicAccessCommandOutput,
} from "./commands/DisableImageBlockPublicAccessCommand";
import {
DisableImageDeprecationCommand,
DisableImageDeprecationCommandInput,
Expand Down Expand Up @@ -1953,6 +1958,11 @@ import {
EnableFastSnapshotRestoresCommandInput,
EnableFastSnapshotRestoresCommandOutput,
} from "./commands/EnableFastSnapshotRestoresCommand";
import {
EnableImageBlockPublicAccessCommand,
EnableImageBlockPublicAccessCommandInput,
EnableImageBlockPublicAccessCommandOutput,
} from "./commands/EnableImageBlockPublicAccessCommand";
import {
EnableImageDeprecationCommand,
EnableImageDeprecationCommandInput,
Expand Down Expand Up @@ -2079,6 +2089,11 @@ import {
GetHostReservationPurchasePreviewCommandInput,
GetHostReservationPurchasePreviewCommandOutput,
} from "./commands/GetHostReservationPurchasePreviewCommand";
import {
GetImageBlockPublicAccessStateCommand,
GetImageBlockPublicAccessStateCommandInput,
GetImageBlockPublicAccessStateCommandOutput,
} from "./commands/GetImageBlockPublicAccessStateCommand";
import {
GetInstanceTypesFromInstanceRequirementsCommand,
GetInstanceTypesFromInstanceRequirementsCommandInput,
Expand Down Expand Up @@ -3284,6 +3299,7 @@ const commands = {
DisableEbsEncryptionByDefaultCommand,
DisableFastLaunchCommand,
DisableFastSnapshotRestoresCommand,
DisableImageBlockPublicAccessCommand,
DisableImageDeprecationCommand,
DisableIpamOrganizationAdminAccountCommand,
DisableSerialConsoleAccessCommand,
Expand All @@ -3310,6 +3326,7 @@ const commands = {
EnableEbsEncryptionByDefaultCommand,
EnableFastLaunchCommand,
EnableFastSnapshotRestoresCommand,
EnableImageBlockPublicAccessCommand,
EnableImageDeprecationCommand,
EnableIpamOrganizationAdminAccountCommand,
EnableReachabilityAnalyzerOrganizationSharingCommand,
Expand All @@ -3336,6 +3353,7 @@ const commands = {
GetFlowLogsIntegrationTemplateCommand,
GetGroupsForCapacityReservationCommand,
GetHostReservationPurchasePreviewCommand,
GetImageBlockPublicAccessStateCommand,
GetInstanceTypesFromInstanceRequirementsCommand,
GetInstanceUefiDataCommand,
GetIpamAddressHistoryCommand,
Expand Down Expand Up @@ -9618,6 +9636,23 @@ export interface EC2 {
cb: (err: any, data?: DisableFastSnapshotRestoresCommandOutput) => void
): void;

/**
* @see {@link DisableImageBlockPublicAccessCommand}
*/
disableImageBlockPublicAccess(
args: DisableImageBlockPublicAccessCommandInput,
options?: __HttpHandlerOptions
): Promise<DisableImageBlockPublicAccessCommandOutput>;
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}
*/
Expand Down Expand Up @@ -10060,6 +10095,23 @@ export interface EC2 {
cb: (err: any, data?: EnableFastSnapshotRestoresCommandOutput) => void
): void;

/**
* @see {@link EnableImageBlockPublicAccessCommand}
*/
enableImageBlockPublicAccess(
args: EnableImageBlockPublicAccessCommandInput,
options?: __HttpHandlerOptions
): Promise<EnableImageBlockPublicAccessCommandOutput>;
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}
*/
Expand Down Expand Up @@ -10493,6 +10545,23 @@ export interface EC2 {
cb: (err: any, data?: GetHostReservationPurchasePreviewCommandOutput) => void
): void;

/**
* @see {@link GetImageBlockPublicAccessStateCommand}
*/
getImageBlockPublicAccessState(
args: GetImageBlockPublicAccessStateCommandInput,
options?: __HttpHandlerOptions
): Promise<GetImageBlockPublicAccessStateCommandOutput>;
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}
*/
Expand Down
18 changes: 18 additions & 0 deletions clients/client-ec2/src/EC2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,10 @@ import {
DisableFastSnapshotRestoresCommandInput,
DisableFastSnapshotRestoresCommandOutput,
} from "./commands/DisableFastSnapshotRestoresCommand";
import {
DisableImageBlockPublicAccessCommandInput,
DisableImageBlockPublicAccessCommandOutput,
} from "./commands/DisableImageBlockPublicAccessCommand";
import {
DisableImageDeprecationCommandInput,
DisableImageDeprecationCommandOutput,
Expand Down Expand Up @@ -1394,6 +1398,10 @@ import {
EnableFastSnapshotRestoresCommandInput,
EnableFastSnapshotRestoresCommandOutput,
} from "./commands/EnableFastSnapshotRestoresCommand";
import {
EnableImageBlockPublicAccessCommandInput,
EnableImageBlockPublicAccessCommandOutput,
} from "./commands/EnableImageBlockPublicAccessCommand";
import {
EnableImageDeprecationCommandInput,
EnableImageDeprecationCommandOutput,
Expand Down Expand Up @@ -1486,6 +1494,10 @@ import {
GetHostReservationPurchasePreviewCommandInput,
GetHostReservationPurchasePreviewCommandOutput,
} from "./commands/GetHostReservationPurchasePreviewCommand";
import {
GetImageBlockPublicAccessStateCommandInput,
GetImageBlockPublicAccessStateCommandOutput,
} from "./commands/GetImageBlockPublicAccessStateCommand";
import {
GetInstanceTypesFromInstanceRequirementsCommandInput,
GetInstanceTypesFromInstanceRequirementsCommandOutput,
Expand Down Expand Up @@ -2448,6 +2460,7 @@ export type ServiceInputTypes =
| DisableEbsEncryptionByDefaultCommandInput
| DisableFastLaunchCommandInput
| DisableFastSnapshotRestoresCommandInput
| DisableImageBlockPublicAccessCommandInput
| DisableImageDeprecationCommandInput
| DisableIpamOrganizationAdminAccountCommandInput
| DisableSerialConsoleAccessCommandInput
Expand All @@ -2474,6 +2487,7 @@ export type ServiceInputTypes =
| EnableEbsEncryptionByDefaultCommandInput
| EnableFastLaunchCommandInput
| EnableFastSnapshotRestoresCommandInput
| EnableImageBlockPublicAccessCommandInput
| EnableImageDeprecationCommandInput
| EnableIpamOrganizationAdminAccountCommandInput
| EnableReachabilityAnalyzerOrganizationSharingCommandInput
Expand All @@ -2500,6 +2514,7 @@ export type ServiceInputTypes =
| GetFlowLogsIntegrationTemplateCommandInput
| GetGroupsForCapacityReservationCommandInput
| GetHostReservationPurchasePreviewCommandInput
| GetImageBlockPublicAccessStateCommandInput
| GetInstanceTypesFromInstanceRequirementsCommandInput
| GetInstanceUefiDataCommandInput
| GetIpamAddressHistoryCommandInput
Expand Down Expand Up @@ -3047,6 +3062,7 @@ export type ServiceOutputTypes =
| DisableEbsEncryptionByDefaultCommandOutput
| DisableFastLaunchCommandOutput
| DisableFastSnapshotRestoresCommandOutput
| DisableImageBlockPublicAccessCommandOutput
| DisableImageDeprecationCommandOutput
| DisableIpamOrganizationAdminAccountCommandOutput
| DisableSerialConsoleAccessCommandOutput
Expand All @@ -3073,6 +3089,7 @@ export type ServiceOutputTypes =
| EnableEbsEncryptionByDefaultCommandOutput
| EnableFastLaunchCommandOutput
| EnableFastSnapshotRestoresCommandOutput
| EnableImageBlockPublicAccessCommandOutput
| EnableImageDeprecationCommandOutput
| EnableIpamOrganizationAdminAccountCommandOutput
| EnableReachabilityAnalyzerOrganizationSharingCommandOutput
Expand All @@ -3099,6 +3116,7 @@ export type ServiceOutputTypes =
| GetFlowLogsIntegrationTemplateCommandOutput
| GetGroupsForCapacityReservationCommandOutput
| GetHostReservationPurchasePreviewCommandOutput
| GetImageBlockPublicAccessStateCommandOutput
| GetInstanceTypesFromInstanceRequirementsCommandOutput
| GetInstanceUefiDataCommandOutput
| GetIpamAddressHistoryCommandOutput
Expand Down
Loading

0 comments on commit 0528034

Please sign in to comment.