Skip to content

Commit 157b80b

Browse files
author
awstools
committed
feat(client-s3-control): Amazon Simple Storage Service /S3 Access Grants / Features : This release launches new Access Grants API - ListCallerAccessGrants.
1 parent f71b730 commit 157b80b

15 files changed

+537
-107
lines changed

clients/client-s3-control/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,14 @@ ListAccessPointsForObjectLambda
722722

723723
[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/)
724724

725+
</details>
726+
<details>
727+
<summary>
728+
ListCallerAccessGrants
729+
</summary>
730+
731+
[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/)
732+
725733
</details>
726734
<details>
727735
<summary>

clients/client-s3-control/src/S3Control.ts

+24
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ import {
315315
ListAccessPointsForObjectLambdaCommandInput,
316316
ListAccessPointsForObjectLambdaCommandOutput,
317317
} from "./commands/ListAccessPointsForObjectLambdaCommand";
318+
import {
319+
ListCallerAccessGrantsCommand,
320+
ListCallerAccessGrantsCommandInput,
321+
ListCallerAccessGrantsCommandOutput,
322+
} from "./commands/ListCallerAccessGrantsCommand";
318323
import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
319324
import {
320325
ListMultiRegionAccessPointsCommand,
@@ -510,6 +515,7 @@ const commands = {
510515
ListAccessGrantsLocationsCommand,
511516
ListAccessPointsCommand,
512517
ListAccessPointsForObjectLambdaCommand,
518+
ListCallerAccessGrantsCommand,
513519
ListJobsCommand,
514520
ListMultiRegionAccessPointsCommand,
515521
ListRegionalBucketsCommand,
@@ -1607,6 +1613,24 @@ export interface S3Control {
16071613
cb: (err: any, data?: ListAccessPointsForObjectLambdaCommandOutput) => void
16081614
): void;
16091615

1616+
/**
1617+
* @see {@link ListCallerAccessGrantsCommand}
1618+
*/
1619+
listCallerAccessGrants(): Promise<ListCallerAccessGrantsCommandOutput>;
1620+
listCallerAccessGrants(
1621+
args: ListCallerAccessGrantsCommandInput,
1622+
options?: __HttpHandlerOptions
1623+
): Promise<ListCallerAccessGrantsCommandOutput>;
1624+
listCallerAccessGrants(
1625+
args: ListCallerAccessGrantsCommandInput,
1626+
cb: (err: any, data?: ListCallerAccessGrantsCommandOutput) => void
1627+
): void;
1628+
listCallerAccessGrants(
1629+
args: ListCallerAccessGrantsCommandInput,
1630+
options: __HttpHandlerOptions,
1631+
cb: (err: any, data?: ListCallerAccessGrantsCommandOutput) => void
1632+
): void;
1633+
16101634
/**
16111635
* @see {@link ListJobsCommand}
16121636
*/

clients/client-s3-control/src/S3ControlClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ import {
265265
ListAccessPointsForObjectLambdaCommandInput,
266266
ListAccessPointsForObjectLambdaCommandOutput,
267267
} from "./commands/ListAccessPointsForObjectLambdaCommand";
268+
import {
269+
ListCallerAccessGrantsCommandInput,
270+
ListCallerAccessGrantsCommandOutput,
271+
} from "./commands/ListCallerAccessGrantsCommand";
268272
import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
269273
import {
270274
ListMultiRegionAccessPointsCommandInput,
@@ -429,6 +433,7 @@ export type ServiceInputTypes =
429433
| ListAccessGrantsLocationsCommandInput
430434
| ListAccessPointsCommandInput
431435
| ListAccessPointsForObjectLambdaCommandInput
436+
| ListCallerAccessGrantsCommandInput
432437
| ListJobsCommandInput
433438
| ListMultiRegionAccessPointsCommandInput
434439
| ListRegionalBucketsCommandInput
@@ -526,6 +531,7 @@ export type ServiceOutputTypes =
526531
| ListAccessGrantsLocationsCommandOutput
527532
| ListAccessPointsCommandOutput
528533
| ListAccessPointsForObjectLambdaCommandOutput
534+
| ListCallerAccessGrantsCommandOutput
529535
| ListJobsCommandOutput
530536
| ListMultiRegionAccessPointsCommandOutput
531537
| ListRegionalBucketsCommandOutput

clients/client-s3-control/src/commands/CreateAccessGrantsInstanceCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export interface CreateAccessGrantsInstanceCommandOutput extends CreateAccessGra
6464
* // AccessGrantsInstanceId: "STRING_VALUE",
6565
* // AccessGrantsInstanceArn: "STRING_VALUE",
6666
* // IdentityCenterArn: "STRING_VALUE",
67+
* // IdentityCenterInstanceArn: "STRING_VALUE",
68+
* // IdentityCenterApplicationArn: "STRING_VALUE",
6769
* // };
6870
*
6971
* ```

clients/client-s3-control/src/commands/GetAccessGrantsInstanceCommand.ts

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export interface GetAccessGrantsInstanceCommandOutput extends GetAccessGrantsIns
3737
* <p>You must have the <code>s3:GetAccessGrantsInstance</code> permission to use this operation. </p>
3838
* </dd>
3939
* </dl>
40+
* <note>
41+
* <p>
42+
* <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>
43+
* </note>
4044
* @example
4145
* Use a bare-bones client and the command you need to make an API call.
4246
* ```javascript
@@ -52,6 +56,8 @@ export interface GetAccessGrantsInstanceCommandOutput extends GetAccessGrantsIns
5256
* // AccessGrantsInstanceArn: "STRING_VALUE",
5357
* // AccessGrantsInstanceId: "STRING_VALUE",
5458
* // IdentityCenterArn: "STRING_VALUE",
59+
* // IdentityCenterInstanceArn: "STRING_VALUE",
60+
* // IdentityCenterApplicationArn: "STRING_VALUE",
5561
* // CreatedAt: new Date("TIMESTAMP"),
5662
* // };
5763
*

clients/client-s3-control/src/commands/ListAccessGrantsInstancesCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export interface ListAccessGrantsInstancesCommandOutput extends ListAccessGrants
5858
* // AccessGrantsInstanceArn: "STRING_VALUE",
5959
* // CreatedAt: new Date("TIMESTAMP"),
6060
* // IdentityCenterArn: "STRING_VALUE",
61+
* // IdentityCenterInstanceArn: "STRING_VALUE",
62+
* // IdentityCenterApplicationArn: "STRING_VALUE",
6163
* // },
6264
* // ],
6365
* // };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// smithy-typescript generated code
2+
import { getProcessArnablesPlugin } from "@aws-sdk/middleware-sdk-s3-control";
3+
import { getApplyMd5BodyChecksumPlugin } from "@smithy/middleware-apply-body-checksum";
4+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
5+
import { getSerdePlugin } from "@smithy/middleware-serde";
6+
import { Command as $Command } from "@smithy/smithy-client";
7+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
8+
9+
import { commonParams } from "../endpoint/EndpointParameters";
10+
import { ListCallerAccessGrantsRequest, ListCallerAccessGrantsResult } from "../models/models_0";
11+
import { de_ListCallerAccessGrantsCommand, se_ListCallerAccessGrantsCommand } from "../protocols/Aws_restXml";
12+
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";
13+
14+
/**
15+
* @public
16+
*/
17+
export type { __MetadataBearer };
18+
export { $Command };
19+
/**
20+
* @public
21+
*
22+
* The input for {@link ListCallerAccessGrantsCommand}.
23+
*/
24+
export interface ListCallerAccessGrantsCommandInput extends ListCallerAccessGrantsRequest {}
25+
/**
26+
* @public
27+
*
28+
* The output of {@link ListCallerAccessGrantsCommand}.
29+
*/
30+
export interface ListCallerAccessGrantsCommandOutput extends ListCallerAccessGrantsResult, __MetadataBearer {}
31+
32+
/**
33+
* <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>
34+
* <dl>
35+
* <dt>Permissions</dt>
36+
* <dd>
37+
* <p>You must have the <code>s3:ListCallerAccessGrants</code> permission to use this operation. </p>
38+
* </dd>
39+
* </dl>
40+
* @example
41+
* Use a bare-bones client and the command you need to make an API call.
42+
* ```javascript
43+
* import { S3ControlClient, ListCallerAccessGrantsCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
44+
* // const { S3ControlClient, ListCallerAccessGrantsCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
45+
* const client = new S3ControlClient(config);
46+
* const input = { // ListCallerAccessGrantsRequest
47+
* AccountId: "STRING_VALUE",
48+
* GrantScope: "STRING_VALUE",
49+
* NextToken: "STRING_VALUE",
50+
* MaxResults: Number("int"),
51+
* AllowedByApplication: true || false,
52+
* };
53+
* const command = new ListCallerAccessGrantsCommand(input);
54+
* const response = await client.send(command);
55+
* // { // ListCallerAccessGrantsResult
56+
* // NextToken: "STRING_VALUE",
57+
* // CallerAccessGrantsList: [ // CallerAccessGrantsList
58+
* // { // ListCallerAccessGrantsEntry
59+
* // Permission: "READ" || "WRITE" || "READWRITE",
60+
* // GrantScope: "STRING_VALUE",
61+
* // ApplicationArn: "STRING_VALUE",
62+
* // },
63+
* // ],
64+
* // };
65+
*
66+
* ```
67+
*
68+
* @param ListCallerAccessGrantsCommandInput - {@link ListCallerAccessGrantsCommandInput}
69+
* @returns {@link ListCallerAccessGrantsCommandOutput}
70+
* @see {@link ListCallerAccessGrantsCommandInput} for command's `input` shape.
71+
* @see {@link ListCallerAccessGrantsCommandOutput} for command's `response` shape.
72+
* @see {@link S3ControlClientResolvedConfig | config} for S3ControlClient's `config` shape.
73+
*
74+
* @throws {@link S3ControlServiceException}
75+
* <p>Base exception class for all service exceptions from S3Control service.</p>
76+
*
77+
* @public
78+
*/
79+
export class ListCallerAccessGrantsCommand extends $Command
80+
.classBuilder<
81+
ListCallerAccessGrantsCommandInput,
82+
ListCallerAccessGrantsCommandOutput,
83+
S3ControlClientResolvedConfig,
84+
ServiceInputTypes,
85+
ServiceOutputTypes
86+
>()
87+
.ep({
88+
...commonParams,
89+
RequiresAccountId: { type: "staticContextParams", value: true },
90+
AccountId: { type: "contextParams", name: "AccountId" },
91+
})
92+
.m(function (this: any, Command: any, cs: any, config: S3ControlClientResolvedConfig, o: any) {
93+
return [
94+
getSerdePlugin(config, this.serialize, this.deserialize),
95+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
96+
getProcessArnablesPlugin(config),
97+
getApplyMd5BodyChecksumPlugin(config),
98+
];
99+
})
100+
.s("AWSS3ControlServiceV20180820", "ListCallerAccessGrants", {})
101+
.n("S3ControlClient", "ListCallerAccessGrantsCommand")
102+
.f(void 0, void 0)
103+
.ser(se_ListCallerAccessGrantsCommand)
104+
.de(de_ListCallerAccessGrantsCommand)
105+
.build() {}

clients/client-s3-control/src/commands/ListStorageLensConfigurationsCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { Command as $Command } from "@smithy/smithy-client";
66
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
77

88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ListStorageLensConfigurationsRequest, ListStorageLensConfigurationsResult } from "../models/models_0";
9+
import { ListStorageLensConfigurationsRequest } from "../models/models_0";
10+
import { ListStorageLensConfigurationsResult } from "../models/models_1";
1011
import {
1112
de_ListStorageLensConfigurationsCommand,
1213
se_ListStorageLensConfigurationsCommand,

clients/client-s3-control/src/commands/ListStorageLensGroupsCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { Command as $Command } from "@smithy/smithy-client";
66
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
77

88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ListStorageLensGroupsRequest } from "../models/models_0";
10-
import { ListStorageLensGroupsResult } from "../models/models_1";
9+
import { ListStorageLensGroupsRequest, ListStorageLensGroupsResult } from "../models/models_1";
1110
import { de_ListStorageLensGroupsCommand, se_ListStorageLensGroupsCommand } from "../protocols/Aws_restXml";
1211
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";
1312

clients/client-s3-control/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export * from "./ListAccessGrantsInstancesCommand";
6464
export * from "./ListAccessGrantsLocationsCommand";
6565
export * from "./ListAccessPointsCommand";
6666
export * from "./ListAccessPointsForObjectLambdaCommand";
67+
export * from "./ListCallerAccessGrantsCommand";
6768
export * from "./ListJobsCommand";
6869
export * from "./ListMultiRegionAccessPointsCommand";
6970
export * from "./ListRegionalBucketsCommand";

0 commit comments

Comments
 (0)