Returns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your individual access grants. You can only have one S3 Access Grants instance per Region per account.
- Permissions
-
You must have the s3:ListAccessGrantsInstances permission to use this operation.
Parameters:
-
account_id
(AccountId)
–
The Amazon Web Services account ID of the S3 Access Grants instance.
-
next_token
(Optional[ContinuationToken], default:
None
)
–
A pagination token to request the next page of results. Pass this value into a subsequent List Access Grants Instances request in order to retrieve the next page of results.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of access grants that you would like returned in the List Access Grants response. If the results include the pagination token NextToken, make another call using the NextToken to determine if there are more results.
Raises:
Source code in docs_src/capo_s3_control/_services/s3_control.py
| def list_access_grants_instances(
self,
account_id: "capo_s3_control.types.account_id.AccountId",
*,
config_overrides: Optional[S3ControlClientConfig] = None,
next_token: Optional[
"capo_s3_control.types.continuation_token.ContinuationToken"
] = None,
max_results: Optional["capo_s3_control.types.max_results.MaxResults"] = None,
) -> "capo_s3_control.types.list_access_grants_instances_result.ListAccessGrantsInstancesResult":
"""<p>Returns a list of S3 Access Grants instances. An S3 Access Grants instance serves as a logical grouping for your individual access grants. You can only have one S3 Access Grants instance per Region per account.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:ListAccessGrantsInstances</code> permission to use this operation. </p> </dd> </dl>
Args:
account_id: <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
next_token: <p>A pagination token to request the next page of results. Pass this value into a subsequent <code>List Access Grants Instances</code> request in order to retrieve the next page of results.</p>
max_results: <p>The maximum number of access grants that you would like returned in the <code>List Access Grants</code> response. If the results include the pagination token <code>NextToken</code>, make another call using the <code>NextToken</code> to determine if there are 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_grants_instances_request.ListAccessGrantsInstancesRequest]",
) -> OperationResponse[
"capo_s3_control.types.list_access_grants_instances_result.ListAccessGrantsInstancesResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.list_access_grants_instances
output, http_response = (
capo_s3_control._operations.awss3_control_service_v20180820.list_access_grants_instances.list_access_grants_instances(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAccessGrantsInstances")
)
input_: capo_s3_control.types.list_access_grants_instances_request.ListAccessGrantsInstancesRequest = {
"account_id": account_id
}
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
|