Returns a list of the access points that are owned by the Amazon Web Services account and that are associated with the specified directory bucket.
To list access points for general purpose buckets, see ListAccesspoints.
To use this operation, you must have the permission to perform the s3express:ListAccessPointsForDirectoryBuckets action.
For information about REST API errors, see REST error responses.
Parameters:
-
account_id
(AccountId)
–
The Amazon Web Services account ID that owns the access points.
-
directory_bucket
(Optional[BucketName], default:
None
)
–
The name of the directory bucket associated with the access points you want to list.
-
next_token
(Optional[NonEmptyMaxLength1024String], default:
None
)
–
If NextToken is returned, there are more access points available than requested in the maxResults value. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of access points that you would like returned in the ListAccessPointsForDirectoryBuckets response. If the directory bucket is associated with more than this number of access points, the results include the pagination token NextToken. Make another call using the NextToken to retrieve more results.
Raises:
Source code in docs_src/capo_s3_control/_services/s3_control.py
| def list_access_points_for_directory_buckets(
self,
account_id: "capo_s3_control.types.account_id.AccountId",
*,
config_overrides: Optional[S3ControlClientConfig] = None,
directory_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,
) -> "capo_s3_control.types.list_access_points_for_directory_buckets_result.ListAccessPointsForDirectoryBucketsResult":
"""<p>Returns a list of the access points that are owned by the Amazon Web Services account and that are associated with the specified directory bucket.</p> <p>To list access points for general purpose buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListAccessPoints.html">ListAccesspoints</a>.</p> <p>To use this operation, you must have the permission to perform the <code>s3express:ListAccessPointsForDirectoryBuckets</code> action.</p> <p>For information about REST API errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses">REST error responses</a>.</p>
Args:
account_id: <p>The Amazon Web Services account ID that owns the access points.</p>
directory_bucket: <p>The name of the directory bucket associated with the access points you want to list.</p>
next_token: <p> If <code>NextToken</code> is returned, there are more access points available than requested in the <code>maxResults</code> value. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. </p>
max_results: <p>The maximum number of access points that you would like returned in the <code>ListAccessPointsForDirectoryBuckets</code> response. If the directory bucket is associated with more than this number of access points, the results include the pagination token <code>NextToken</code>. Make another call using the <code>NextToken</code> to retrieve more results.</p>
Raises:
capo_s3_control.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_s3_control.types.list_access_points_for_directory_buckets_request.ListAccessPointsForDirectoryBucketsRequest]",
) -> OperationResponse[
"capo_s3_control.types.list_access_points_for_directory_buckets_result.ListAccessPointsForDirectoryBucketsResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.list_access_points_for_directory_buckets
output, http_response = (
capo_s3_control._operations.awss3_control_service_v20180820.list_access_points_for_directory_buckets.list_access_points_for_directory_buckets(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAccessPointsForDirectoryBuckets")
)
input_: capo_s3_control.types.list_access_points_for_directory_buckets_request.ListAccessPointsForDirectoryBucketsRequest = {
"account_id": account_id
}
if directory_bucket is not None:
input_["directory_bucket"] = directory_bucket
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|