禁用 s3 存储桶中的访问日志记录
Disable access logging in s3 buckets
我已经编写了 python 启用访问日志记录的代码 buckets.And 我需要通过 boto3 取消最后的操作(禁用访问日志记录)。但是我在 boto3 文档中搜索它并没有找到任何解决方案。有什么办法吗?
要禁用存储桶日志记录,您应该使用空的 BucketLoggingStatus 请求元素:
response = client.put_bucket_logging(
Bucket='string',
BucketLoggingStatus={},
ExpectedBucketOwner='string'
)
参考:
我已经编写了 python 启用访问日志记录的代码 buckets.And 我需要通过 boto3 取消最后的操作(禁用访问日志记录)。但是我在 boto3 文档中搜索它并没有找到任何解决方案。有什么办法吗?
要禁用存储桶日志记录,您应该使用空的 BucketLoggingStatus 请求元素:
response = client.put_bucket_logging(
Bucket='string',
BucketLoggingStatus={},
ExpectedBucketOwner='string'
)
参考: