

# ListCallerAccessGrants
<a name="API_control_ListCallerAccessGrants"></a>

Use this API to list the access grants that grant the caller access to Amazon S3 data through S3 Access Grants. The caller (grantee) can be an Amazon Identity and Access Management (IAM) identity or Amazon Identity Center corporate directory identity. You must pass the Amazon Web Services account of the S3 data owner (grantor) in the request. You can, optionally, narrow the results by `GrantScope`, using a fragment of the data's S3 path, and S3 Access Grants will return only the grants with a path that contains the path fragment. You can also pass the `AllowedByApplication` filter in the request, which returns only the grants authorized for applications, whether the application is the caller's Identity Center application or any other application (`ALL`). For more information, see [List the caller's access grants](https://docs.amazonaws.cn/AmazonS3/latest/userguide/access-grants-list-grants.html) in the *Amazon S3 User Guide*.

Permissions  
You must have the `s3:ListCallerAccessGrants` permission to use this operation. 

## Request Syntax
<a name="API_control_ListCallerAccessGrants_RequestSyntax"></a>

```
GET /v20180820/accessgrantsinstance/caller/grants?allowedByApplication=AllowedByApplication&grantscope=GrantScope&maxResults=MaxResults&nextToken=NextToken HTTP/1.1
Host: s3-control.amazonaws.com.cn
x-amz-account-id: AccountId
```

## URI Request Parameters
<a name="API_control_ListCallerAccessGrants_RequestParameters"></a>

The request uses the following URI parameters.

 ** [allowedByApplication](#API_control_ListCallerAccessGrants_RequestSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-request-uri-querystring-AllowedByApplication"></a>
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`).

 ** [grantscope](#API_control_ListCallerAccessGrants_RequestSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-request-uri-querystring-GrantScope"></a>
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.   
Length Constraints: Minimum length of 1. Maximum length of 2000.  
Pattern: `^.+$` 

 ** [maxResults](#API_control_ListCallerAccessGrants_RequestSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-request-uri-querystring-MaxResults"></a>
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.  
Valid Range: Minimum value of 0. Maximum value of 1000.

 ** [nextToken](#API_control_ListCallerAccessGrants_RequestSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-request-uri-querystring-NextToken"></a>
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.

 ** [x-amz-account-id](#API_control_ListCallerAccessGrants_RequestSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-request-header-AccountId"></a>
The Amazon Web Services account ID of the S3 Access Grants instance.  
Length Constraints: Maximum length of 64.  
Pattern: `^\d{12}$`   
Required: Yes

## Request Body
<a name="API_control_ListCallerAccessGrants_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_control_ListCallerAccessGrants_ResponseSyntax"></a>

```
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<ListCallerAccessGrantsResult>
   <NextToken>string</NextToken>
   <CallerAccessGrantsList>
      <AccessGrant>
         <ApplicationArn>string</ApplicationArn>
         <GrantScope>string</GrantScope>
         <Permission>string</Permission>
      </AccessGrant>
   </CallerAccessGrantsList>
</ListCallerAccessGrantsResult>
```

## Response Elements
<a name="API_control_ListCallerAccessGrants_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

 ** [ListCallerAccessGrantsResult](#API_control_ListCallerAccessGrants_ResponseSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-response-ListCallerAccessGrantsResult"></a>
Root level tag for the ListCallerAccessGrantsResult parameters.  
Required: Yes

 ** [CallerAccessGrantsList](#API_control_ListCallerAccessGrants_ResponseSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-response-CallerAccessGrantsList"></a>
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.   
Type: Array of [ListCallerAccessGrantsEntry](API_control_ListCallerAccessGrantsEntry.md) data types

 ** [NextToken](#API_control_ListCallerAccessGrants_ResponseSyntax) **   <a name="AmazonS3-control_ListCallerAccessGrants-response-NextToken"></a>
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.  
Type: String

## See Also
<a name="API_control_ListCallerAccessGrants_SeeAlso"></a>

For more information about using this API in one of the language-specific Amazon SDKs, see the following:
+  [Amazon Command Line Interface V2](https://docs.amazonaws.cn/goto/cli2/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for .NET V4](https://docs.amazonaws.cn/goto/DotNetSDKV4/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for C\$1\$1](https://docs.amazonaws.cn/goto/SdkForCpp/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for Go v2](https://docs.amazonaws.cn/goto/SdkForGoV2/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for Java V2](https://docs.amazonaws.cn/goto/SdkForJavaV2/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for JavaScript V3](https://docs.amazonaws.cn/goto/SdkForJavaScriptV3/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for Kotlin](https://docs.amazonaws.cn/goto/SdkForKotlin/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for PHP V3](https://docs.amazonaws.cn/goto/SdkForPHPV3/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for Python](https://docs.amazonaws.cn/goto/boto3/s3control-2018-08-20/ListCallerAccessGrants) 
+  [Amazon SDK for Ruby V3](https://docs.amazonaws.cn/goto/SdkForRubyV3/s3control-2018-08-20/ListCallerAccessGrants) 