From 157b80b62fa1cc6c286f9c76e7ceabb06946b904 Mon Sep 17 00:00:00 2001
From: awstools You must have the
+ * 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. You must have the Base exception class for all service exceptions from S3Control service. If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance. The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs. If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance. The virtual private cloud (VPC) configuration for this access point, if one exists. This element is empty if this access point is an Amazon S3 on Outposts access point that is used by other
- * Amazon Web Services.
+ListCallerAccessGrants
+
+
+[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/)
+
diff --git a/clients/client-s3-control/src/S3Control.ts b/clients/client-s3-control/src/S3Control.ts
index 33aae9a6ac04..d31f5482d394 100644
--- a/clients/client-s3-control/src/S3Control.ts
+++ b/clients/client-s3-control/src/S3Control.ts
@@ -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,
@@ -510,6 +515,7 @@ const commands = {
ListAccessGrantsLocationsCommand,
ListAccessPointsCommand,
ListAccessPointsForObjectLambdaCommand,
+ ListCallerAccessGrantsCommand,
ListJobsCommand,
ListMultiRegionAccessPointsCommand,
ListRegionalBucketsCommand,
@@ -1607,6 +1613,24 @@ export interface S3Control {
cb: (err: any, data?: ListAccessPointsForObjectLambdaCommandOutput) => void
): void;
+ /**
+ * @see {@link ListCallerAccessGrantsCommand}
+ */
+ listCallerAccessGrants(): Promise
s3:GetAccessGrantsInstance
permission to use this operation. GetAccessGrantsInstance
is not supported for cross-account access. You can only call the API from the account that owns the S3 Access Grants instance.
+ *
+ * @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}
+ * s3:ListCallerAccessGrants
permission to use this operation.
The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -698,7 +712,7 @@ export interface PublicAccessBlockConfiguration { /** *Specifies whether Amazon S3 should restrict public bucket policies for buckets in this
* account. Setting this element to TRUE
restricts access to buckets with public
- * policies to only Amazon Web Service principals and authorized users within this
+ * policies to only Amazon Web Servicesservice principals and authorized users within this
* account.
Enabling this setting doesn't affect previously stored bucket policies, except that * public and cross-account access within any public bucket policy, including non-public @@ -964,7 +978,7 @@ export interface Tag { */ export interface CreateAccessGrantRequest { /** - *
The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -1105,7 +1119,7 @@ export interface CreateAccessGrantResult { */ export interface CreateAccessGrantsInstanceRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -1140,16 +1154,30 @@ export interface CreateAccessGrantsInstanceResult { AccessGrantsInstanceId?: string; /** - *The Amazon Resource Name (ARN) of the S3 Access Grants instance.
+ *The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.
* @public */ AccessGrantsInstanceArn?: string; /** - *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance passed in the request. S3 Access Grants creates this Identity Center application for this specific S3 Access Grants instance.
+ * @deprecated + * + *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
* @public */ IdentityCenterArn?: string; + + /** + *The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.
+ * @public + */ + IdentityCenterInstanceArn?: string; + + /** + *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
+ * @public + */ + IdentityCenterApplicationArn?: string; } /** @@ -1157,7 +1185,7 @@ export interface CreateAccessGrantsInstanceResult { */ export interface CreateAccessGrantsLocationRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -1834,21 +1862,21 @@ export interface JobManifest { export interface KeyNameConstraint { /** *If provided, the generated manifest includes objects where the specified string appears - * at the start of the object key string.
+ * at the start of the object key string. Each KeyNameConstraint filter accepts an array of strings with a length of 1 string. * @public */ MatchAnyPrefix?: string[]; /** *If provided, the generated manifest includes objects where the specified string appears - * at the end of the object key string.
+ * at the end of the object key string. Each KeyNameConstraint filter accepts an array of strings with a length of 1 string. * @public */ MatchAnySuffix?: string[]; /** *If provided, the generated manifest includes objects where the specified string appears - * anywhere within the object key string.
+ * anywhere within the object key string. Each KeyNameConstraint filter accepts an array of strings with a length of 1 string. * @public */ MatchAnySubstring?: string[]; @@ -2059,7 +2087,7 @@ export interface S3JobManifestGenerator { ExpectedBucketOwner?: string; /** - *The source bucket used by the ManifestGenerator.
+ *The ARN of the source bucket used by the ManifestGenerator.
** Directory buckets - Directory buckets aren't supported @@ -3535,7 +3563,7 @@ export interface CreateStorageLensGroupRequest { */ export interface DeleteAccessGrantRequest { /** - *
The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -3552,7 +3580,7 @@ export interface DeleteAccessGrantRequest { */ export interface DeleteAccessGrantsInstanceRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -3563,7 +3591,7 @@ export interface DeleteAccessGrantsInstanceRequest { */ export interface DeleteAccessGrantsInstanceResourcePolicyRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -3574,7 +3602,7 @@ export interface DeleteAccessGrantsInstanceResourcePolicyRequest { */ export interface DeleteAccessGrantsLocationRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4211,7 +4239,7 @@ export interface DescribeMultiRegionAccessPointOperationResult { */ export interface DissociateAccessGrantsIdentityCenterRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4222,7 +4250,7 @@ export interface DissociateAccessGrantsIdentityCenterRequest { */ export interface GetAccessGrantRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4312,7 +4340,7 @@ export interface GetAccessGrantResult { */ export interface GetAccessGrantsInstanceRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4335,11 +4363,25 @@ export interface GetAccessGrantsInstanceResult { AccessGrantsInstanceId?: string; /** - *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
+ * @deprecated + * + *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
* @public */ IdentityCenterArn?: string; + /** + *The Amazon Resource Name (ARN) of the Amazon Web Services IAM Identity Center instance that you are associating with your S3 Access Grants instance. An IAM Identity Center instance is your corporate identity directory that you added to the IAM Identity Center. You can use the ListInstances API operation to retrieve a list of your Identity Center instances and their ARNs.
+ * @public + */ + IdentityCenterInstanceArn?: string; + + /** + *If you associated your S3 Access Grants instance with an Amazon Web Services IAM Identity Center instance, this field returns the Amazon Resource Name (ARN) of the IAM Identity Center instance application; a subresource of the original Identity Center instance. S3 Access Grants creates this Identity Center application for the specific S3 Access Grants instance.
+ * @public + */ + IdentityCenterApplicationArn?: string; + /** *The date and time when you created the S3 Access Grants instance.
* @public @@ -4386,7 +4428,7 @@ export interface GetAccessGrantsInstanceForPrefixResult { */ export interface GetAccessGrantsInstanceResourcePolicyRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4420,7 +4462,7 @@ export interface GetAccessGrantsInstanceResourcePolicyResult { */ export interface GetAccessGrantsLocationRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -4518,7 +4560,7 @@ export interface GetAccessPointResult { *Contains the virtual private cloud (VPC) configuration for the specified access point.
*This element is empty if this access point is an Amazon S3 on Outposts access point that is used by other - * Amazon Web Services.
+ * Amazon Web Servicesservices. *Specifies encryption-related information for an Amazon S3 bucket that is a destination for - * replicated objects.
+ * replicated objects. If you're specifying a customer managed KMS key, we recommend using a fully qualified + * KMS key ARN. If you use a KMS key alias instead, then KMS resolves the key within the + * requester’s account. This behavior can result in data that's encrypted with a KMS key + * that belongs to the requester, and not the bucket owner. *This is not supported by Amazon S3 on Outposts buckets.
*The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -6761,7 +6806,7 @@ export interface GetStorageLensGroupResult { */ export interface ListAccessGrantsRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -6859,7 +6904,7 @@ export interface ListAccessGrantsResult { */ export interface ListAccessGrantsInstancesRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -6899,7 +6944,7 @@ export interface ListAccessGrantsInstancesResult { */ export interface ListAccessGrantsLocationsRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -7068,6 +7113,97 @@ export interface ListAccessPointsForObjectLambdaResult { NextToken?: string; } +/** + * @public + */ +export interface ListCallerAccessGrantsRequest { + /** + *The Amazon Web Services account ID of the S3 Access Grants instance.
+ * @public + */ + AccountId?: string; + + /** + *The S3 path of the data that you would like to access. Must start with s3://
. You can optionally pass only the beginning characters of a path, and S3 Access Grants will search for all applicable grants for the path fragment.
A pagination token to request the next page of results. Pass this value into a subsequent List Caller Access Grants
request in order to retrieve the next page of results.
The maximum number of access grants that you would like returned in the List Caller Access Grants
response. If the results include the pagination token NextToken
, make another call using the NextToken
to determine if there are more results.
If this optional parameter is passed in the request, a filter is applied to the results. The results will include only the access grants for the caller's Identity Center application or for any other applications (ALL
).
Part of ListCallerAccessGrantsResult
. Each entry includes the
+ * permission level (READ, WRITE, or READWRITE) and the grant scope of the access grant. If the grant also includes an application ARN, the grantee can only access the S3 data through this application.
The type of permission granted, which can be one of the following values:
+ *
+ * READ
- Grants read-only access to the S3 data.
+ * WRITE
- Grants write-only access to the S3 data.
+ * READWRITE
- Grants both read and write access to the S3 data.
The S3 path of the data to which you have been granted access.
+ * @public + */ + GrantScope?: string; + + /** + *The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.
+ * @public + */ + ApplicationArn?: string; +} + +/** + * @public + */ +export interface ListCallerAccessGrantsResult { + /** + *A pagination token that you can use to request the next page of results. Pass this value into a subsequent List Caller Access Grants
request in order to retrieve the next page of results.
A list of the caller's access grants that were created using S3 Access Grants and that grant the caller access to the S3 data of the Amazon Web Services account ID that was specified in the request.
+ * @public + */ + CallerAccessGrantsList?: ListCallerAccessGrantsEntry[]; +} + /** * * @public @@ -7394,79 +7530,6 @@ export interface ListStorageLensConfigurationsRequest { NextToken?: string; } -/** - *Part of ListStorageLensConfigurationResult
. Each entry includes the
- * description of the S3 Storage Lens configuration, its home Region, whether it is enabled, its
- * Amazon Resource Name (ARN), and config ID.
A container for the S3 Storage Lens configuration ID.
- * @public - */ - Id: string | undefined; - - /** - *The ARN of the S3 Storage Lens configuration. This property is read-only.
- * @public - */ - StorageLensArn: string | undefined; - - /** - *A container for the S3 Storage Lens home Region. Your metrics data is stored and retained in - * your designated S3 Storage Lens home Region.
- * @public - */ - HomeRegion: string | undefined; - - /** - *A container for whether the S3 Storage Lens configuration is enabled. This property is - * required.
- * @public - */ - IsEnabled?: boolean; -} - -/** - * @public - */ -export interface ListStorageLensConfigurationsResult { - /** - *If the request produced more than the maximum number of S3 Storage Lens configuration results, - * you can pass this value into a subsequent request to retrieve the next page of - * results.
- * @public - */ - NextToken?: string; - - /** - *A list of S3 Storage Lens configurations.
- * @public - */ - StorageLensConfigurationList?: ListStorageLensConfigurationEntry[]; -} - -/** - * @public - */ -export interface ListStorageLensGroupsRequest { - /** - *- * The Amazon Web Services account ID that owns the Storage Lens groups. - *
- * @public - */ - AccountId?: string; - - /** - *The token for the next set of results, or null
if there are no more results.
- *
Part of ListStorageLensConfigurationResult
. Each entry includes the
+ * description of the S3 Storage Lens configuration, its home Region, whether it is enabled, its
+ * Amazon Resource Name (ARN), and config ID.
A container for the S3 Storage Lens configuration ID.
+ * @public + */ + Id: string | undefined; + + /** + *The ARN of the S3 Storage Lens configuration. This property is read-only.
+ * @public + */ + StorageLensArn: string | undefined; + + /** + *A container for the S3 Storage Lens home Region. Your metrics data is stored and retained in + * your designated S3 Storage Lens home Region.
+ * @public + */ + HomeRegion: string | undefined; + + /** + *A container for whether the S3 Storage Lens configuration is enabled. This property is + * required.
+ * @public + */ + IsEnabled?: boolean; +} + +/** + * @public + */ +export interface ListStorageLensConfigurationsResult { + /** + *If the request produced more than the maximum number of S3 Storage Lens configuration results, + * you can pass this value into a subsequent request to retrieve the next page of + * results.
+ * @public + */ + NextToken?: string; + + /** + *A list of S3 Storage Lens configurations.
+ * @public + */ + StorageLensConfigurationList?: ListStorageLensConfigurationEntry[]; +} + +/** + * @public + */ +export interface ListStorageLensGroupsRequest { + /** + *+ * The Amazon Web Services account ID that owns the Storage Lens groups. + *
+ * @public + */ + AccountId?: string; + + /** + *The token for the next set of results, or null
if there are no more results.
+ *
* Each entry contains a Storage Lens group that exists in the specified home Region. @@ -114,7 +187,7 @@ export interface ListTagsForResourceResult { */ export interface PutAccessGrantsInstanceResourcePolicyRequest { /** - *
The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; @@ -692,7 +765,7 @@ export interface UntagResourceResult {} */ export interface UpdateAccessGrantsLocationRequest { /** - *The ID of the Amazon Web Services account that is making this request.
+ *The Amazon Web Services account ID of the S3 Access Grants instance.
* @public */ AccountId?: string; diff --git a/clients/client-s3-control/src/pagination/ListCallerAccessGrantsPaginator.ts b/clients/client-s3-control/src/pagination/ListCallerAccessGrantsPaginator.ts new file mode 100644 index 000000000000..b5edfac5e22b --- /dev/null +++ b/clients/client-s3-control/src/pagination/ListCallerAccessGrantsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListCallerAccessGrantsCommand, + ListCallerAccessGrantsCommandInput, + ListCallerAccessGrantsCommandOutput, +} from "../commands/ListCallerAccessGrantsCommand"; +import { S3ControlClient } from "../S3ControlClient"; +import { S3ControlPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListCallerAccessGrants: ( + config: S3ControlPaginationConfiguration, + input: ListCallerAccessGrantsCommandInput, + ...rest: any[] +) => Paginator