This operation is not supported by directory buckets.
Returns a list of the access points. You can retrieve up to 1,000 access points per call. If the call returns more than 1,000 access points (or the number specified in maxResults, whichever is less), the response will include a continuation token that you can use to list the additional access points.
Returns only access points attached to S3 buckets by default. To return all access points specify DataSourceType as ALL.
All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by using the access point ARN, see the Examples section.
The following actions are related to ListAccessPoints:
Parameters:
-
account_id
(AccountId)
–
The Amazon Web Services account ID for the account that owns the specified access points.
-
bucket
(Optional[BucketName], default:
None
)
–
The name of the bucket whose associated access points you want to list.
For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.
For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format arn:aws:s3-outposts:::outpost//bucket/. For example, to access the bucket reports through Outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports. The value must be URL encoded.
-
next_token
(Optional[NonEmptyMaxLength1024String], default:
None
)
–
A continuation token. If a previous call to ListAccessPoints returned a continuation token in the NextToken field, then providing that value here causes Amazon S3 to retrieve the next page of results.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of access points that you want to include in the list. If the specified bucket has more than this number of access points, then the response will include a continuation token in the NextToken field that you can use to retrieve the next page of access points.
-
data_source_id
(Optional[DataSourceId], default:
None
)
–
The unique identifier for the data source of the access point.
-
data_source_type
(Optional[DataSourceType], default:
None
)
–
The type of the data source that the access point is attached to. Returns only access points attached to S3 buckets by default. To return all access points specify DataSourceType as ALL.
Raises:
Source code in docs_src/capo_s3_control/_services/async_s3_control.py
| async def list_access_points(
self,
account_id: "capo_s3_control.types.account_id.AccountId",
*,
config_overrides: Optional[AsyncS3ControlClientConfig] = None,
bucket: Optional["capo_s3_control.types.bucket_name.BucketName"] = None,
next_token: Optional[
"capo_s3_control.types.non_empty_max_length1024_string.NonEmptyMaxLength1024String"
] = None,
max_results: Optional["capo_s3_control.types.max_results.MaxResults"] = None,
data_source_id: Optional[
"capo_s3_control.types.data_source_id.DataSourceId"
] = None,
data_source_type: Optional[
"capo_s3_control.types.data_source_type.DataSourceType"
] = None,
) -> "capo_s3_control.types.list_access_points_result.ListAccessPointsResult":
"""<note> <p>This operation is not supported by directory buckets.</p> </note> <p>Returns a list of the access points. You can retrieve up to 1,000 access points per call. If the call returns more than 1,000 access points (or the number specified in <code>maxResults</code>, whichever is less), the response will include a continuation token that you can use to list the additional access points.</p> <p>Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p> <p></p> <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html#API_control_GetAccessPoint_Examples">Examples</a> section.</p> <p>The following actions are related to <code>ListAccessPoints</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html">CreateAccessPoint</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPoint.html">DeleteAccessPoint</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html">GetAccessPoint</a> </p> </li> </ul>
Args:
account_id: <p>The Amazon Web Services account ID for the account that owns the specified access points.</p>
bucket: <p>The name of the bucket whose associated access points you want to list.</p> <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p> <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/bucket/<my-bucket-name></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded. </p>
next_token: <p>A continuation token. If a previous call to <code>ListAccessPoints</code> returned a continuation token in the <code>NextToken</code> field, then providing that value here causes Amazon S3 to retrieve the next page of results.</p>
max_results: <p>The maximum number of access points that you want to include in the list. If the specified bucket has more than this number of access points, then the response will include a continuation token in the <code>NextToken</code> field that you can use to retrieve the next page of access points.</p>
data_source_id: <p>The unique identifier for the data source of the access point.</p>
data_source_type: <p>The type of the data source that the access point is attached to. Returns only access points attached to S3 buckets by default. To return all access points specify <code>DataSourceType</code> as <code>ALL</code>.</p>
Raises:
capo_s3_control.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3_control.types.list_access_points_request.ListAccessPointsRequest]",
) -> AsyncOperationResponse[
"capo_s3_control.types.list_access_points_result.ListAccessPointsResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.list_access_points
(
output,
http_response,
) = await capo_s3_control._operations.awss3_control_service_v20180820.list_access_points.async_list_access_points(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAccessPoints")
)
input_: capo_s3_control.types.list_access_points_request.ListAccessPointsRequest = {
"account_id": account_id
}
if bucket is not None:
input_["bucket"] = bucket
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
if data_source_id is not None:
input_["data_source_id"] = data_source_id
if data_source_type is not None:
input_["data_source_type"] = data_source_type
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|