Skip to content

list_storage_lens_configurations async

list_storage_lens_configurations(
    account_id: AccountId,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
    next_token: Optional[ContinuationToken] = None,
) -> ListStorageLensConfigurationsResult

This operation is not supported by directory buckets.

Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide.

To use this action, you must have permission to perform the s3:ListStorageLensConfigurations action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

Parameters:

  • account_id (AccountId) –

    The account ID of the requester.

  • next_token (Optional[ContinuationToken], default: None ) –

    A pagination token to request the next page of results.

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def list_storage_lens_configurations(
    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,
) -> "capo_s3_control.types.list_storage_lens_configurations_result.ListStorageLensConfigurationsResult":
    """<note> <p>This operation is not supported by directory buckets.</p> </note> <p>Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html">Assessing your storage activity and usage with Amazon S3 Storage Lens </a> in the <i>Amazon S3 User Guide</i>.</p> <note> <p>To use this action, you must have permission to perform the <code>s3:ListStorageLensConfigurations</code> action. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html">Setting permissions to use Amazon S3 Storage Lens</a> in the <i>Amazon S3 User Guide</i>.</p> </note>

    Args:
        account_id: <p>The account ID of the requester.</p>
        next_token: <p>A pagination token to request the next page of 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_storage_lens_configurations_request.ListStorageLensConfigurationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3_control.types.list_storage_lens_configurations_result.ListStorageLensConfigurationsResult"
    ]:
        import capo_s3_control._operations.awss3_control_service_v20180820.list_storage_lens_configurations

        (
            output,
            http_response,
        ) = await capo_s3_control._operations.awss3_control_service_v20180820.list_storage_lens_configurations.async_list_storage_lens_configurations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListStorageLensConfigurations")
    )
    input_: capo_s3_control.types.list_storage_lens_configurations_request.ListStorageLensConfigurationsRequest = {
        "account_id": account_id
    }
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output