|
| 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() {} |
0 commit comments