Skip to content

Commit

Permalink
feat(client-lambda): Support for JSON resource-based policies and blo…
Browse files Browse the repository at this point in the history
…ck public access
  • Loading branch information
awstools committed Sep 17, 2024
1 parent 9043072 commit 566bb05
Show file tree
Hide file tree
Showing 12 changed files with 1,606 additions and 0 deletions.
40 changes: 40 additions & 0 deletions clients/client-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,14 @@ DeleteProvisionedConcurrencyConfig

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/DeleteProvisionedConcurrencyConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/DeleteProvisionedConcurrencyConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/DeleteProvisionedConcurrencyConfigCommandOutput/)

</details>
<details>
<summary>
DeleteResourcePolicy
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/DeleteResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/DeleteResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/DeleteResourcePolicyCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -531,6 +539,22 @@ GetProvisionedConcurrencyConfig

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/GetProvisionedConcurrencyConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetProvisionedConcurrencyConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetProvisionedConcurrencyConfigCommandOutput/)

</details>
<details>
<summary>
GetPublicAccessBlockConfig
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/GetPublicAccessBlockConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetPublicAccessBlockConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetPublicAccessBlockConfigCommandOutput/)

</details>
<details>
<summary>
GetResourcePolicy
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/GetResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/GetResourcePolicyCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -715,6 +739,22 @@ PutProvisionedConcurrencyConfig

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/PutProvisionedConcurrencyConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutProvisionedConcurrencyConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutProvisionedConcurrencyConfigCommandOutput/)

</details>
<details>
<summary>
PutPublicAccessBlockConfig
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/PutPublicAccessBlockConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutPublicAccessBlockConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutPublicAccessBlockConfigCommandOutput/)

</details>
<details>
<summary>
PutResourcePolicy
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/command/PutResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lambda/Interface/PutResourcePolicyCommandOutput/)

</details>
<details>
<summary>
Expand Down
115 changes: 115 additions & 0 deletions clients/client-lambda/src/Lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ import {
DeleteProvisionedConcurrencyConfigCommandInput,
DeleteProvisionedConcurrencyConfigCommandOutput,
} from "./commands/DeleteProvisionedConcurrencyConfigCommand";
import {
DeleteResourcePolicyCommand,
DeleteResourcePolicyCommandInput,
DeleteResourcePolicyCommandOutput,
} from "./commands/DeleteResourcePolicyCommand";
import {
GetAccountSettingsCommand,
GetAccountSettingsCommandInput,
Expand Down Expand Up @@ -147,6 +152,16 @@ import {
GetProvisionedConcurrencyConfigCommandInput,
GetProvisionedConcurrencyConfigCommandOutput,
} from "./commands/GetProvisionedConcurrencyConfigCommand";
import {
GetPublicAccessBlockConfigCommand,
GetPublicAccessBlockConfigCommandInput,
GetPublicAccessBlockConfigCommandOutput,
} from "./commands/GetPublicAccessBlockConfigCommand";
import {
GetResourcePolicyCommand,
GetResourcePolicyCommandInput,
GetResourcePolicyCommandOutput,
} from "./commands/GetResourcePolicyCommand";
import {
GetRuntimeManagementConfigCommand,
GetRuntimeManagementConfigCommandInput,
Expand Down Expand Up @@ -242,6 +257,16 @@ import {
PutProvisionedConcurrencyConfigCommandInput,
PutProvisionedConcurrencyConfigCommandOutput,
} from "./commands/PutProvisionedConcurrencyConfigCommand";
import {
PutPublicAccessBlockConfigCommand,
PutPublicAccessBlockConfigCommandInput,
PutPublicAccessBlockConfigCommandOutput,
} from "./commands/PutPublicAccessBlockConfigCommand";
import {
PutResourcePolicyCommand,
PutResourcePolicyCommandInput,
PutResourcePolicyCommandOutput,
} from "./commands/PutResourcePolicyCommand";
import {
PutRuntimeManagementConfigCommand,
PutRuntimeManagementConfigCommandInput,
Expand Down Expand Up @@ -314,6 +339,7 @@ const commands = {
DeleteFunctionUrlConfigCommand,
DeleteLayerVersionCommand,
DeleteProvisionedConcurrencyConfigCommand,
DeleteResourcePolicyCommand,
GetAccountSettingsCommand,
GetAliasCommand,
GetCodeSigningConfigCommand,
Expand All @@ -330,6 +356,8 @@ const commands = {
GetLayerVersionPolicyCommand,
GetPolicyCommand,
GetProvisionedConcurrencyConfigCommand,
GetPublicAccessBlockConfigCommand,
GetResourcePolicyCommand,
GetRuntimeManagementConfigCommand,
InvokeCommand,
InvokeAsyncCommand,
Expand All @@ -353,6 +381,8 @@ const commands = {
PutFunctionEventInvokeConfigCommand,
PutFunctionRecursionConfigCommand,
PutProvisionedConcurrencyConfigCommand,
PutPublicAccessBlockConfigCommand,
PutResourcePolicyCommand,
PutRuntimeManagementConfigCommand,
RemoveLayerVersionPermissionCommand,
RemovePermissionCommand,
Expand Down Expand Up @@ -633,6 +663,23 @@ export interface Lambda {
cb: (err: any, data?: DeleteProvisionedConcurrencyConfigCommandOutput) => void
): void;

/**
* @see {@link DeleteResourcePolicyCommand}
*/
deleteResourcePolicy(
args: DeleteResourcePolicyCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteResourcePolicyCommandOutput>;
deleteResourcePolicy(
args: DeleteResourcePolicyCommandInput,
cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void
): void;
deleteResourcePolicy(
args: DeleteResourcePolicyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void
): void;

/**
* @see {@link GetAccountSettingsCommand}
*/
Expand Down Expand Up @@ -885,6 +932,40 @@ export interface Lambda {
cb: (err: any, data?: GetProvisionedConcurrencyConfigCommandOutput) => void
): void;

/**
* @see {@link GetPublicAccessBlockConfigCommand}
*/
getPublicAccessBlockConfig(
args: GetPublicAccessBlockConfigCommandInput,
options?: __HttpHandlerOptions
): Promise<GetPublicAccessBlockConfigCommandOutput>;
getPublicAccessBlockConfig(
args: GetPublicAccessBlockConfigCommandInput,
cb: (err: any, data?: GetPublicAccessBlockConfigCommandOutput) => void
): void;
getPublicAccessBlockConfig(
args: GetPublicAccessBlockConfigCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetPublicAccessBlockConfigCommandOutput) => void
): void;

/**
* @see {@link GetResourcePolicyCommand}
*/
getResourcePolicy(
args: GetResourcePolicyCommandInput,
options?: __HttpHandlerOptions
): Promise<GetResourcePolicyCommandOutput>;
getResourcePolicy(
args: GetResourcePolicyCommandInput,
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
): void;
getResourcePolicy(
args: GetResourcePolicyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
): void;

/**
* @see {@link GetRuntimeManagementConfigCommand}
*/
Expand Down Expand Up @@ -1241,6 +1322,40 @@ export interface Lambda {
cb: (err: any, data?: PutProvisionedConcurrencyConfigCommandOutput) => void
): void;

/**
* @see {@link PutPublicAccessBlockConfigCommand}
*/
putPublicAccessBlockConfig(
args: PutPublicAccessBlockConfigCommandInput,
options?: __HttpHandlerOptions
): Promise<PutPublicAccessBlockConfigCommandOutput>;
putPublicAccessBlockConfig(
args: PutPublicAccessBlockConfigCommandInput,
cb: (err: any, data?: PutPublicAccessBlockConfigCommandOutput) => void
): void;
putPublicAccessBlockConfig(
args: PutPublicAccessBlockConfigCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutPublicAccessBlockConfigCommandOutput) => void
): void;

/**
* @see {@link PutResourcePolicyCommand}
*/
putResourcePolicy(
args: PutResourcePolicyCommandInput,
options?: __HttpHandlerOptions
): Promise<PutResourcePolicyCommandOutput>;
putResourcePolicy(
args: PutResourcePolicyCommandInput,
cb: (err: any, data?: PutResourcePolicyCommandOutput) => void
): void;
putResourcePolicy(
args: PutResourcePolicyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutResourcePolicyCommandOutput) => void
): void;

/**
* @see {@link PutRuntimeManagementConfigCommand}
*/
Expand Down
24 changes: 24 additions & 0 deletions clients/client-lambda/src/LambdaClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ import {
DeleteProvisionedConcurrencyConfigCommandInput,
DeleteProvisionedConcurrencyConfigCommandOutput,
} from "./commands/DeleteProvisionedConcurrencyConfigCommand";
import {
DeleteResourcePolicyCommandInput,
DeleteResourcePolicyCommandOutput,
} from "./commands/DeleteResourcePolicyCommand";
import { GetAccountSettingsCommandInput, GetAccountSettingsCommandOutput } from "./commands/GetAccountSettingsCommand";
import { GetAliasCommandInput, GetAliasCommandOutput } from "./commands/GetAliasCommand";
import {
Expand Down Expand Up @@ -158,6 +162,11 @@ import {
GetProvisionedConcurrencyConfigCommandInput,
GetProvisionedConcurrencyConfigCommandOutput,
} from "./commands/GetProvisionedConcurrencyConfigCommand";
import {
GetPublicAccessBlockConfigCommandInput,
GetPublicAccessBlockConfigCommandOutput,
} from "./commands/GetPublicAccessBlockConfigCommand";
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
import {
GetRuntimeManagementConfigCommandInput,
GetRuntimeManagementConfigCommandOutput,
Expand Down Expand Up @@ -226,6 +235,11 @@ import {
PutProvisionedConcurrencyConfigCommandInput,
PutProvisionedConcurrencyConfigCommandOutput,
} from "./commands/PutProvisionedConcurrencyConfigCommand";
import {
PutPublicAccessBlockConfigCommandInput,
PutPublicAccessBlockConfigCommandOutput,
} from "./commands/PutPublicAccessBlockConfigCommand";
import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
import {
PutRuntimeManagementConfigCommandInput,
PutRuntimeManagementConfigCommandOutput,
Expand Down Expand Up @@ -291,6 +305,7 @@ export type ServiceInputTypes =
| DeleteFunctionUrlConfigCommandInput
| DeleteLayerVersionCommandInput
| DeleteProvisionedConcurrencyConfigCommandInput
| DeleteResourcePolicyCommandInput
| GetAccountSettingsCommandInput
| GetAliasCommandInput
| GetCodeSigningConfigCommandInput
Expand All @@ -307,6 +322,8 @@ export type ServiceInputTypes =
| GetLayerVersionPolicyCommandInput
| GetPolicyCommandInput
| GetProvisionedConcurrencyConfigCommandInput
| GetPublicAccessBlockConfigCommandInput
| GetResourcePolicyCommandInput
| GetRuntimeManagementConfigCommandInput
| InvokeAsyncCommandInput
| InvokeCommandInput
Expand All @@ -330,6 +347,8 @@ export type ServiceInputTypes =
| PutFunctionEventInvokeConfigCommandInput
| PutFunctionRecursionConfigCommandInput
| PutProvisionedConcurrencyConfigCommandInput
| PutPublicAccessBlockConfigCommandInput
| PutResourcePolicyCommandInput
| PutRuntimeManagementConfigCommandInput
| RemoveLayerVersionPermissionCommandInput
| RemovePermissionCommandInput
Expand Down Expand Up @@ -364,6 +383,7 @@ export type ServiceOutputTypes =
| DeleteFunctionUrlConfigCommandOutput
| DeleteLayerVersionCommandOutput
| DeleteProvisionedConcurrencyConfigCommandOutput
| DeleteResourcePolicyCommandOutput
| GetAccountSettingsCommandOutput
| GetAliasCommandOutput
| GetCodeSigningConfigCommandOutput
Expand All @@ -380,6 +400,8 @@ export type ServiceOutputTypes =
| GetLayerVersionPolicyCommandOutput
| GetPolicyCommandOutput
| GetProvisionedConcurrencyConfigCommandOutput
| GetPublicAccessBlockConfigCommandOutput
| GetResourcePolicyCommandOutput
| GetRuntimeManagementConfigCommandOutput
| InvokeAsyncCommandOutput
| InvokeCommandOutput
Expand All @@ -403,6 +425,8 @@ export type ServiceOutputTypes =
| PutFunctionEventInvokeConfigCommandOutput
| PutFunctionRecursionConfigCommandOutput
| PutProvisionedConcurrencyConfigCommandOutput
| PutPublicAccessBlockConfigCommandOutput
| PutResourcePolicyCommandOutput
| PutRuntimeManagementConfigCommandOutput
| RemoveLayerVersionPermissionCommandOutput
| RemovePermissionCommandOutput
Expand Down
Loading

0 comments on commit 566bb05

Please sign in to comment.