Updates the existing Storage Lens group.
To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup 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 want to update.
-
account_id
(AccountId)
–
The Amazon Web Services account ID of the Storage Lens group owner.
-
storage_lens_group
(StorageLensGroup)
–
The JSON file that contains the Storage Lens group configuration.
Raises:
Source code in docs_src/capo_s3_control/_services/async_s3_control.py
| async def update_storage_lens_group(
self,
name: "capo_s3_control.types.storage_lens_group_name.StorageLensGroupName",
account_id: "capo_s3_control.types.account_id.AccountId",
storage_lens_group: "capo_s3_control.types.storage_lens_group.StorageLensGroup",
*,
config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> None:
"""<p> Updates the existing Storage Lens group.</p> <p>To use this operation, you must have the permission to perform the <code>s3:UpdateStorageLensGroup</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 want to update. </p>
account_id: <p> The Amazon Web Services account ID of the Storage Lens group owner. </p>
storage_lens_group: <p> The JSON file that contains the Storage Lens group configuration. </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.update_storage_lens_group_request.UpdateStorageLensGroupRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3_control._operations.awss3_control_service_v20180820.update_storage_lens_group
(
output,
http_response,
) = await capo_s3_control._operations.awss3_control_service_v20180820.update_storage_lens_group.async_update_storage_lens_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateStorageLensGroup")
)
input_: capo_s3_control.types.update_storage_lens_group_request.UpdateStorageLensGroupRequest = {
"name": name,
"account_id": account_id,
"storage_lens_group": storage_lens_group,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|