Skip to content

Commit

Permalink
feat(client-s3-control): Amazon Simple Storage Service /S3 Access Gra…
Browse files Browse the repository at this point in the history
…nts / Features : This release launches new Access Grants API - ListCallerAccessGrants.
  • Loading branch information
awstools committed Sep 4, 2024
1 parent f71b730 commit 157b80b
Show file tree
Hide file tree
Showing 15 changed files with 537 additions and 107 deletions.
8 changes: 8 additions & 0 deletions clients/client-s3-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,14 @@ ListAccessPointsForObjectLambda

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3-control/command/ListAccessPointsForObjectLambdaCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3-control/Interface/ListAccessPointsForObjectLambdaCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3-control/Interface/ListAccessPointsForObjectLambdaCommandOutput/)

</details>
<details>
<summary>
ListCallerAccessGrants
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3-control/command/ListCallerAccessGrantsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3-control/Interface/ListCallerAccessGrantsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3-control/Interface/ListCallerAccessGrantsCommandOutput/)

</details>
<details>
<summary>
Expand Down
24 changes: 24 additions & 0 deletions clients/client-s3-control/src/S3Control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ import {
ListAccessPointsForObjectLambdaCommandInput,
ListAccessPointsForObjectLambdaCommandOutput,
} from "./commands/ListAccessPointsForObjectLambdaCommand";
import {
ListCallerAccessGrantsCommand,
ListCallerAccessGrantsCommandInput,
ListCallerAccessGrantsCommandOutput,
} from "./commands/ListCallerAccessGrantsCommand";
import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
import {
ListMultiRegionAccessPointsCommand,
Expand Down Expand Up @@ -510,6 +515,7 @@ const commands = {
ListAccessGrantsLocationsCommand,
ListAccessPointsCommand,
ListAccessPointsForObjectLambdaCommand,
ListCallerAccessGrantsCommand,
ListJobsCommand,
ListMultiRegionAccessPointsCommand,
ListRegionalBucketsCommand,
Expand Down Expand Up @@ -1607,6 +1613,24 @@ export interface S3Control {
cb: (err: any, data?: ListAccessPointsForObjectLambdaCommandOutput) => void
): void;

/**
* @see {@link ListCallerAccessGrantsCommand}
*/
listCallerAccessGrants(): Promise<ListCallerAccessGrantsCommandOutput>;
listCallerAccessGrants(
args: ListCallerAccessGrantsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListCallerAccessGrantsCommandOutput>;
listCallerAccessGrants(
args: ListCallerAccessGrantsCommandInput,
cb: (err: any, data?: ListCallerAccessGrantsCommandOutput) => void
): void;
listCallerAccessGrants(
args: ListCallerAccessGrantsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListCallerAccessGrantsCommandOutput) => void
): void;

/**
* @see {@link ListJobsCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-s3-control/src/S3ControlClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ import {
ListAccessPointsForObjectLambdaCommandInput,
ListAccessPointsForObjectLambdaCommandOutput,
} from "./commands/ListAccessPointsForObjectLambdaCommand";
import {
ListCallerAccessGrantsCommandInput,
ListCallerAccessGrantsCommandOutput,
} from "./commands/ListCallerAccessGrantsCommand";
import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
import {
ListMultiRegionAccessPointsCommandInput,
Expand Down Expand Up @@ -429,6 +433,7 @@ export type ServiceInputTypes =
| ListAccessGrantsLocationsCommandInput
| ListAccessPointsCommandInput
| ListAccessPointsForObjectLambdaCommandInput
| ListCallerAccessGrantsCommandInput
| ListJobsCommandInput
| ListMultiRegionAccessPointsCommandInput
| ListRegionalBucketsCommandInput
Expand Down Expand Up @@ -526,6 +531,7 @@ export type ServiceOutputTypes =
| ListAccessGrantsLocationsCommandOutput
| ListAccessPointsCommandOutput
| ListAccessPointsForObjectLambdaCommandOutput
| ListCallerAccessGrantsCommandOutput
| ListJobsCommandOutput
| ListMultiRegionAccessPointsCommandOutput
| ListRegionalBucketsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export interface CreateAccessGrantsInstanceCommandOutput extends CreateAccessGra
* // AccessGrantsInstanceId: "STRING_VALUE",
* // AccessGrantsInstanceArn: "STRING_VALUE",
* // IdentityCenterArn: "STRING_VALUE",
* // IdentityCenterInstanceArn: "STRING_VALUE",
* // IdentityCenterApplicationArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export interface GetAccessGrantsInstanceCommandOutput extends GetAccessGrantsIns
* <p>You must have the <code>s3:GetAccessGrantsInstance</code> permission to use this operation. </p>
* </dd>
* </dl>
* <note>
* <p>
* <code>GetAccessGrantsInstance</code> is not supported for cross-account access. You can only call the API from the account that owns the S3 Access Grants instance.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -52,6 +56,8 @@ export interface GetAccessGrantsInstanceCommandOutput extends GetAccessGrantsIns
* // AccessGrantsInstanceArn: "STRING_VALUE",
* // AccessGrantsInstanceId: "STRING_VALUE",
* // IdentityCenterArn: "STRING_VALUE",
* // IdentityCenterInstanceArn: "STRING_VALUE",
* // IdentityCenterApplicationArn: "STRING_VALUE",
* // CreatedAt: new Date("TIMESTAMP"),
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export interface ListAccessGrantsInstancesCommandOutput extends ListAccessGrants
* // AccessGrantsInstanceArn: "STRING_VALUE",
* // CreatedAt: new Date("TIMESTAMP"),
* // IdentityCenterArn: "STRING_VALUE",
* // IdentityCenterInstanceArn: "STRING_VALUE",
* // IdentityCenterApplicationArn: "STRING_VALUE",
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// smithy-typescript generated code
import { getProcessArnablesPlugin } from "@aws-sdk/middleware-sdk-s3-control";
import { getApplyMd5BodyChecksumPlugin } from "@smithy/middleware-apply-body-checksum";
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { ListCallerAccessGrantsRequest, ListCallerAccessGrantsResult } from "../models/models_0";
import { de_ListCallerAccessGrantsCommand, se_ListCallerAccessGrantsCommand } from "../protocols/Aws_restXml";
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ListCallerAccessGrantsCommand}.
*/
export interface ListCallerAccessGrantsCommandInput extends ListCallerAccessGrantsRequest {}
/**
* @public
*
* The output of {@link ListCallerAccessGrantsCommand}.
*/
export interface ListCallerAccessGrantsCommandOutput extends ListCallerAccessGrantsResult, __MetadataBearer {}

/**
* <p>Returns a list of the access grants that were given to the caller using S3 Access Grants and that allow the caller to access the S3 data of the Amazon Web Services account specified in the request.</p>
* <dl>
* <dt>Permissions</dt>
* <dd>
* <p>You must have the <code>s3:ListCallerAccessGrants</code> permission to use this operation. </p>
* </dd>
* </dl>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { S3ControlClient, ListCallerAccessGrantsCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
* // const { S3ControlClient, ListCallerAccessGrantsCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
* const client = new S3ControlClient(config);
* const input = { // ListCallerAccessGrantsRequest
* AccountId: "STRING_VALUE",
* GrantScope: "STRING_VALUE",
* NextToken: "STRING_VALUE",
* MaxResults: Number("int"),
* AllowedByApplication: true || false,
* };
* const command = new ListCallerAccessGrantsCommand(input);
* const response = await client.send(command);
* // { // ListCallerAccessGrantsResult
* // NextToken: "STRING_VALUE",
* // CallerAccessGrantsList: [ // CallerAccessGrantsList
* // { // ListCallerAccessGrantsEntry
* // Permission: "READ" || "WRITE" || "READWRITE",
* // GrantScope: "STRING_VALUE",
* // ApplicationArn: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param ListCallerAccessGrantsCommandInput - {@link ListCallerAccessGrantsCommandInput}
* @returns {@link ListCallerAccessGrantsCommandOutput}
* @see {@link ListCallerAccessGrantsCommandInput} for command's `input` shape.
* @see {@link ListCallerAccessGrantsCommandOutput} for command's `response` shape.
* @see {@link S3ControlClientResolvedConfig | config} for S3ControlClient's `config` shape.
*
* @throws {@link S3ControlServiceException}
* <p>Base exception class for all service exceptions from S3Control service.</p>
*
* @public
*/
export class ListCallerAccessGrantsCommand extends $Command
.classBuilder<
ListCallerAccessGrantsCommandInput,
ListCallerAccessGrantsCommandOutput,
S3ControlClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
RequiresAccountId: { type: "staticContextParams", value: true },
AccountId: { type: "contextParams", name: "AccountId" },
})
.m(function (this: any, Command: any, cs: any, config: S3ControlClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
getProcessArnablesPlugin(config),
getApplyMd5BodyChecksumPlugin(config),
];
})
.s("AWSS3ControlServiceV20180820", "ListCallerAccessGrants", {})
.n("S3ControlClient", "ListCallerAccessGrantsCommand")
.f(void 0, void 0)
.ser(se_ListCallerAccessGrantsCommand)
.de(de_ListCallerAccessGrantsCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { ListStorageLensConfigurationsRequest, ListStorageLensConfigurationsResult } from "../models/models_0";
import { ListStorageLensConfigurationsRequest } from "../models/models_0";
import { ListStorageLensConfigurationsResult } from "../models/models_1";
import {
de_ListStorageLensConfigurationsCommand,
se_ListStorageLensConfigurationsCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { ListStorageLensGroupsRequest } from "../models/models_0";
import { ListStorageLensGroupsResult } from "../models/models_1";
import { ListStorageLensGroupsRequest, ListStorageLensGroupsResult } from "../models/models_1";
import { de_ListStorageLensGroupsCommand, se_ListStorageLensGroupsCommand } from "../protocols/Aws_restXml";
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";

Expand Down
1 change: 1 addition & 0 deletions clients/client-s3-control/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export * from "./ListAccessGrantsInstancesCommand";
export * from "./ListAccessGrantsLocationsCommand";
export * from "./ListAccessPointsCommand";
export * from "./ListAccessPointsForObjectLambdaCommand";
export * from "./ListCallerAccessGrantsCommand";
export * from "./ListJobsCommand";
export * from "./ListMultiRegionAccessPointsCommand";
export * from "./ListRegionalBucketsCommand";
Expand Down
Loading

0 comments on commit 157b80b

Please sign in to comment.