Skip to content

list_access_grants_instances async

list_access_grants_instances(
    account_id: AccountId,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
    next_token: Optional[ContinuationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAccessGrantsInstancesResult

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/async_s3_control.py
async def list_access_grants_instances(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3_control.types.list_access_grants_instances_request.ListAccessGrantsInstancesRequest]",
    ) -> AsyncOperationResponse[
        "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,
        ) = await capo_s3_control._operations.awss3_control_service_v20180820.list_access_grants_instances.async_list_access_grants_instances(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output