Skip to content

Commit e7c0231

Browse files
authored
Fix lifecycle (#61)
1 parent 6218681 commit e7c0231

File tree

3 files changed

+3853
-3806
lines changed

3 files changed

+3853
-3806
lines changed

sample.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,21 +424,30 @@
424424
'Bucket' => $bucket,
425425
'Rules' => array(
426426
array(
427-
'Expiration' => array(
428-
'Days' => 1000,
429-
),
430-
'ID' => 'id1',
427+
'Status' => 'Enabled',
431428
'Filter' => array(
432-
'Prefix' => 'documents/'
429+
'Tag' => array(
430+
'Key' => 'datalevel',
431+
'Value' => 'backup'
432+
)
433433
),
434-
'Status' => 'Enabled',
435434
'Transitions' => array(
436435
array(
437-
'Days' => 200,
438-
'StorageClass' => 'NEARLINE'),
436+
# 30天后转换为Standard_IA
437+
'Days' => 30,
438+
'StorageClass' => 'Standard_IA'),
439+
array(
440+
# 365天后转换为Archive
441+
'Days' => 365,
442+
'StorageClass' => 'Archive')
439443
),
440-
),
441-
)));
444+
'Expiration' => array(
445+
# 3650天后过期删除
446+
'Days' => 3650,
447+
)
448+
)
449+
)
450+
));
442451
print_r($result);
443452
} catch (\Exception $e) {
444453
echo "$e\n";

0 commit comments

Comments
 (0)