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': ''}
}
]
}
)
관련 콘텐츠
- 질문됨 8달 전
- AWS 공식업데이트됨 일 년 전