Lists all the Storage Lens groups in the specified home Region.
To use this operation, you must have the permission to perform the s3:ListStorageLensGroups action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups.
For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes.
Parameters:
-
account_id
(AccountId)
–
The Amazon Web Services account ID that owns the Storage Lens groups.
-
next_token
(Optional[ContinuationToken], default:
None
)
–
The token for the next set of results, or null if there are no more results.
Raises:
Source code in docs_src/capo_s3_control/_services/s3_control.py
| def list_storage_lens_groups(
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,
) -> "capo_s3_control.types.list_storage_lens_groups_result.ListStorageLensGroupsResult":
"""<p> Lists all the Storage Lens groups in the specified home Region. </p> <p>To use this operation, you must have the permission to perform the <code>s3:ListStorageLensGroups</code> action. For more information about the required Storage Lens Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p> <p>For information about Storage Lens groups errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#S3LensErrorCodeList">List of Amazon S3 Storage Lens error codes</a>.</p>
Args:
account_id: <p> The Amazon Web Services account ID that owns the Storage Lens groups. </p>
next_token: <p>The token for the next set of results, or <code>null</code> if there are no 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_storage_lens_groups_request.ListStorageLensGroupsRequest]",
) -> OperationResponse[
"capo_s3_control.types.list_storage_lens_groups_result.ListStorageLensGroupsResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.list_storage_lens_groups
output, http_response = (
capo_s3_control._operations.awss3_control_service_v20180820.list_storage_lens_groups.list_storage_lens_groups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListStorageLensGroups")
)
input_: capo_s3_control.types.list_storage_lens_groups_request.ListStorageLensGroupsRequest = {
"account_id": account_id
}
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|