1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 您不能在指定天数或日期值的同一过期规则中添加 ExpiredObjectDeleteMarker 配置。 尝试为 LifeCycleConfiguration 使用两个单独的规则。是这样的:
response = bucket_lifecycle_configuration.put(
LifecycleConfiguration={
'Rules': [
{
'Expiration': {
'Days': 1
},
'ID': 'Rule01',
'Status': 'Enabled',
'Filter': {'Prefix': ''},
'NoncurrentVersionExpiration': {
'NoncurrentDays': 1
},
'AbortIncompleteMultipartUpload': {
'DaysAfterInitiation': 1
}
},
{
'Expiration': {
'ExpiredObjectDeleteMarker': True
},
'ID': 'Rule02',
'Status': 'Enabled',
'Filter': {'Prefix': ''}
}
]
}
)
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 5 个月前