Skip to content

Commit 0528034

Browse files
author
awstools
committed
feat(client-ec2): This release adds support for restricting public sharing of AMIs through AMI Block Public Access
1 parent fecfd43 commit 0528034

16 files changed

+2172
-1106
lines changed

clients/client-ec2/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,6 +3212,14 @@ DisableFastSnapshotRestores
32123212

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

3215+
</details>
3216+
<details>
3217+
<summary>
3218+
DisableImageBlockPublicAccess
3219+
</summary>
3220+
3221+
[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)
3222+
32153223
</details>
32163224
<details>
32173225
<summary>
@@ -3420,6 +3428,14 @@ EnableFastSnapshotRestores
34203428

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

3431+
</details>
3432+
<details>
3433+
<summary>
3434+
EnableImageBlockPublicAccess
3435+
</summary>
3436+
3437+
[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)
3438+
34233439
</details>
34243440
<details>
34253441
<summary>
@@ -3628,6 +3644,14 @@ GetHostReservationPurchasePreview
36283644

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

3647+
</details>
3648+
<details>
3649+
<summary>
3650+
GetImageBlockPublicAccessState
3651+
</summary>
3652+
3653+
[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)
3654+
36313655
</details>
36323656
<details>
36333657
<summary>

clients/client-ec2/src/EC2.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,11 @@ import {
18231823
DisableFastSnapshotRestoresCommandInput,
18241824
DisableFastSnapshotRestoresCommandOutput,
18251825
} from "./commands/DisableFastSnapshotRestoresCommand";
1826+
import {
1827+
DisableImageBlockPublicAccessCommand,
1828+
DisableImageBlockPublicAccessCommandInput,
1829+
DisableImageBlockPublicAccessCommandOutput,
1830+
} from "./commands/DisableImageBlockPublicAccessCommand";
18261831
import {
18271832
DisableImageDeprecationCommand,
18281833
DisableImageDeprecationCommandInput,
@@ -1953,6 +1958,11 @@ import {
19531958
EnableFastSnapshotRestoresCommandInput,
19541959
EnableFastSnapshotRestoresCommandOutput,
19551960
} from "./commands/EnableFastSnapshotRestoresCommand";
1961+
import {
1962+
EnableImageBlockPublicAccessCommand,
1963+
EnableImageBlockPublicAccessCommandInput,
1964+
EnableImageBlockPublicAccessCommandOutput,
1965+
} from "./commands/EnableImageBlockPublicAccessCommand";
19561966
import {
19571967
EnableImageDeprecationCommand,
19581968
EnableImageDeprecationCommandInput,
@@ -2079,6 +2089,11 @@ import {
20792089
GetHostReservationPurchasePreviewCommandInput,
20802090
GetHostReservationPurchasePreviewCommandOutput,
20812091
} from "./commands/GetHostReservationPurchasePreviewCommand";
2092+
import {
2093+
GetImageBlockPublicAccessStateCommand,
2094+
GetImageBlockPublicAccessStateCommandInput,
2095+
GetImageBlockPublicAccessStateCommandOutput,
2096+
} from "./commands/GetImageBlockPublicAccessStateCommand";
20822097
import {
20832098
GetInstanceTypesFromInstanceRequirementsCommand,
20842099
GetInstanceTypesFromInstanceRequirementsCommandInput,
@@ -3284,6 +3299,7 @@ const commands = {
32843299
DisableEbsEncryptionByDefaultCommand,
32853300
DisableFastLaunchCommand,
32863301
DisableFastSnapshotRestoresCommand,
3302+
DisableImageBlockPublicAccessCommand,
32873303
DisableImageDeprecationCommand,
32883304
DisableIpamOrganizationAdminAccountCommand,
32893305
DisableSerialConsoleAccessCommand,
@@ -3310,6 +3326,7 @@ const commands = {
33103326
EnableEbsEncryptionByDefaultCommand,
33113327
EnableFastLaunchCommand,
33123328
EnableFastSnapshotRestoresCommand,
3329+
EnableImageBlockPublicAccessCommand,
33133330
EnableImageDeprecationCommand,
33143331
EnableIpamOrganizationAdminAccountCommand,
33153332
EnableReachabilityAnalyzerOrganizationSharingCommand,
@@ -3336,6 +3353,7 @@ const commands = {
33363353
GetFlowLogsIntegrationTemplateCommand,
33373354
GetGroupsForCapacityReservationCommand,
33383355
GetHostReservationPurchasePreviewCommand,
3356+
GetImageBlockPublicAccessStateCommand,
33393357
GetInstanceTypesFromInstanceRequirementsCommand,
33403358
GetInstanceUefiDataCommand,
33413359
GetIpamAddressHistoryCommand,
@@ -9618,6 +9636,23 @@ export interface EC2 {
96189636
cb: (err: any, data?: DisableFastSnapshotRestoresCommandOutput) => void
96199637
): void;
96209638

9639+
/**
9640+
* @see {@link DisableImageBlockPublicAccessCommand}
9641+
*/
9642+
disableImageBlockPublicAccess(
9643+
args: DisableImageBlockPublicAccessCommandInput,
9644+
options?: __HttpHandlerOptions
9645+
): Promise<DisableImageBlockPublicAccessCommandOutput>;
9646+
disableImageBlockPublicAccess(
9647+
args: DisableImageBlockPublicAccessCommandInput,
9648+
cb: (err: any, data?: DisableImageBlockPublicAccessCommandOutput) => void
9649+
): void;
9650+
disableImageBlockPublicAccess(
9651+
args: DisableImageBlockPublicAccessCommandInput,
9652+
options: __HttpHandlerOptions,
9653+
cb: (err: any, data?: DisableImageBlockPublicAccessCommandOutput) => void
9654+
): void;
9655+
96219656
/**
96229657
* @see {@link DisableImageDeprecationCommand}
96239658
*/
@@ -10060,6 +10095,23 @@ export interface EC2 {
1006010095
cb: (err: any, data?: EnableFastSnapshotRestoresCommandOutput) => void
1006110096
): void;
1006210097

10098+
/**
10099+
* @see {@link EnableImageBlockPublicAccessCommand}
10100+
*/
10101+
enableImageBlockPublicAccess(
10102+
args: EnableImageBlockPublicAccessCommandInput,
10103+
options?: __HttpHandlerOptions
10104+
): Promise<EnableImageBlockPublicAccessCommandOutput>;
10105+
enableImageBlockPublicAccess(
10106+
args: EnableImageBlockPublicAccessCommandInput,
10107+
cb: (err: any, data?: EnableImageBlockPublicAccessCommandOutput) => void
10108+
): void;
10109+
enableImageBlockPublicAccess(
10110+
args: EnableImageBlockPublicAccessCommandInput,
10111+
options: __HttpHandlerOptions,
10112+
cb: (err: any, data?: EnableImageBlockPublicAccessCommandOutput) => void
10113+
): void;
10114+
1006310115
/**
1006410116
* @see {@link EnableImageDeprecationCommand}
1006510117
*/
@@ -10493,6 +10545,23 @@ export interface EC2 {
1049310545
cb: (err: any, data?: GetHostReservationPurchasePreviewCommandOutput) => void
1049410546
): void;
1049510547

10548+
/**
10549+
* @see {@link GetImageBlockPublicAccessStateCommand}
10550+
*/
10551+
getImageBlockPublicAccessState(
10552+
args: GetImageBlockPublicAccessStateCommandInput,
10553+
options?: __HttpHandlerOptions
10554+
): Promise<GetImageBlockPublicAccessStateCommandOutput>;
10555+
getImageBlockPublicAccessState(
10556+
args: GetImageBlockPublicAccessStateCommandInput,
10557+
cb: (err: any, data?: GetImageBlockPublicAccessStateCommandOutput) => void
10558+
): void;
10559+
getImageBlockPublicAccessState(
10560+
args: GetImageBlockPublicAccessStateCommandInput,
10561+
options: __HttpHandlerOptions,
10562+
cb: (err: any, data?: GetImageBlockPublicAccessStateCommandOutput) => void
10563+
): void;
10564+
1049610565
/**
1049710566
* @see {@link GetInstanceTypesFromInstanceRequirementsCommand}
1049810567
*/

clients/client-ec2/src/EC2Client.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,10 @@ import {
12931293
DisableFastSnapshotRestoresCommandInput,
12941294
DisableFastSnapshotRestoresCommandOutput,
12951295
} from "./commands/DisableFastSnapshotRestoresCommand";
1296+
import {
1297+
DisableImageBlockPublicAccessCommandInput,
1298+
DisableImageBlockPublicAccessCommandOutput,
1299+
} from "./commands/DisableImageBlockPublicAccessCommand";
12961300
import {
12971301
DisableImageDeprecationCommandInput,
12981302
DisableImageDeprecationCommandOutput,
@@ -1394,6 +1398,10 @@ import {
13941398
EnableFastSnapshotRestoresCommandInput,
13951399
EnableFastSnapshotRestoresCommandOutput,
13961400
} from "./commands/EnableFastSnapshotRestoresCommand";
1401+
import {
1402+
EnableImageBlockPublicAccessCommandInput,
1403+
EnableImageBlockPublicAccessCommandOutput,
1404+
} from "./commands/EnableImageBlockPublicAccessCommand";
13971405
import {
13981406
EnableImageDeprecationCommandInput,
13991407
EnableImageDeprecationCommandOutput,
@@ -1486,6 +1494,10 @@ import {
14861494
GetHostReservationPurchasePreviewCommandInput,
14871495
GetHostReservationPurchasePreviewCommandOutput,
14881496
} from "./commands/GetHostReservationPurchasePreviewCommand";
1497+
import {
1498+
GetImageBlockPublicAccessStateCommandInput,
1499+
GetImageBlockPublicAccessStateCommandOutput,
1500+
} from "./commands/GetImageBlockPublicAccessStateCommand";
14891501
import {
14901502
GetInstanceTypesFromInstanceRequirementsCommandInput,
14911503
GetInstanceTypesFromInstanceRequirementsCommandOutput,
@@ -2448,6 +2460,7 @@ export type ServiceInputTypes =
24482460
| DisableEbsEncryptionByDefaultCommandInput
24492461
| DisableFastLaunchCommandInput
24502462
| DisableFastSnapshotRestoresCommandInput
2463+
| DisableImageBlockPublicAccessCommandInput
24512464
| DisableImageDeprecationCommandInput
24522465
| DisableIpamOrganizationAdminAccountCommandInput
24532466
| DisableSerialConsoleAccessCommandInput
@@ -2474,6 +2487,7 @@ export type ServiceInputTypes =
24742487
| EnableEbsEncryptionByDefaultCommandInput
24752488
| EnableFastLaunchCommandInput
24762489
| EnableFastSnapshotRestoresCommandInput
2490+
| EnableImageBlockPublicAccessCommandInput
24772491
| EnableImageDeprecationCommandInput
24782492
| EnableIpamOrganizationAdminAccountCommandInput
24792493
| EnableReachabilityAnalyzerOrganizationSharingCommandInput
@@ -2500,6 +2514,7 @@ export type ServiceInputTypes =
25002514
| GetFlowLogsIntegrationTemplateCommandInput
25012515
| GetGroupsForCapacityReservationCommandInput
25022516
| GetHostReservationPurchasePreviewCommandInput
2517+
| GetImageBlockPublicAccessStateCommandInput
25032518
| GetInstanceTypesFromInstanceRequirementsCommandInput
25042519
| GetInstanceUefiDataCommandInput
25052520
| GetIpamAddressHistoryCommandInput
@@ -3047,6 +3062,7 @@ export type ServiceOutputTypes =
30473062
| DisableEbsEncryptionByDefaultCommandOutput
30483063
| DisableFastLaunchCommandOutput
30493064
| DisableFastSnapshotRestoresCommandOutput
3065+
| DisableImageBlockPublicAccessCommandOutput
30503066
| DisableImageDeprecationCommandOutput
30513067
| DisableIpamOrganizationAdminAccountCommandOutput
30523068
| DisableSerialConsoleAccessCommandOutput
@@ -3073,6 +3089,7 @@ export type ServiceOutputTypes =
30733089
| EnableEbsEncryptionByDefaultCommandOutput
30743090
| EnableFastLaunchCommandOutput
30753091
| EnableFastSnapshotRestoresCommandOutput
3092+
| EnableImageBlockPublicAccessCommandOutput
30763093
| EnableImageDeprecationCommandOutput
30773094
| EnableIpamOrganizationAdminAccountCommandOutput
30783095
| EnableReachabilityAnalyzerOrganizationSharingCommandOutput
@@ -3099,6 +3116,7 @@ export type ServiceOutputTypes =
30993116
| GetFlowLogsIntegrationTemplateCommandOutput
31003117
| GetGroupsForCapacityReservationCommandOutput
31013118
| GetHostReservationPurchasePreviewCommandOutput
3119+
| GetImageBlockPublicAccessStateCommandOutput
31023120
| GetInstanceTypesFromInstanceRequirementsCommandOutput
31033121
| GetInstanceUefiDataCommandOutput
31043122
| GetIpamAddressHistoryCommandOutput

0 commit comments

Comments
 (0)