Retrieves the Storage Lens group configuration details.
To use this operation, you must have the permission to perform the s3:GetStorageLensGroup 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:
-
name
(StorageLensGroupName)
–
The name of the Storage Lens group that you're trying to retrieve the configuration details for.
-
account_id
(AccountId)
–
The Amazon Web Services account ID associated with the Storage Lens group that you're trying to retrieve the details for.
Raises:
Source code in docs_src/capo_s3_control/_services/s3_control.py
| def get_storage_lens_group(
self,
name: "capo_s3_control.types.storage_lens_group_name.StorageLensGroupName",
account_id: "capo_s3_control.types.account_id.AccountId",
*,
config_overrides: Optional[S3ControlClientConfig] = None,
) -> (
"capo_s3_control.types.get_storage_lens_group_result.GetStorageLensGroupResult"
):
"""<p> Retrieves the Storage Lens group configuration details.</p> <p>To use this operation, you must have the permission to perform the <code>s3:GetStorageLensGroup</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:
name: <p> The name of the Storage Lens group that you're trying to retrieve the configuration details for. </p>
account_id: <p> The Amazon Web Services account ID associated with the Storage Lens group that you're trying to retrieve the details for. </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.get_storage_lens_group_request.GetStorageLensGroupRequest]",
) -> OperationResponse[
"capo_s3_control.types.get_storage_lens_group_result.GetStorageLensGroupResult"
]:
import capo_s3_control._operations.awss3_control_service_v20180820.get_storage_lens_group
output, http_response = (
capo_s3_control._operations.awss3_control_service_v20180820.get_storage_lens_group.get_storage_lens_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetStorageLensGroup")
)
input_: capo_s3_control.types.get_storage_lens_group_request.GetStorageLensGroupRequest = {
"name": name,
"account_id": account_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|