You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long: `Set the lifecycle of a file. Lifecycle value must great than or equal to -1, unit: day.
75
+
* less than -1: there's no point and it won't trigger any effect
76
+
* equal to -1: cancel lifecycle
77
+
* equal to 0: there's no point and it won't trigger any effect
78
+
* bigger than 0: set lifecycle`,
79
+
Run: func(cmd*cobra.Command, args []string) {
80
+
cfg.CmdCfg.CmdId=docs.ChangeLifecycle
81
+
iflen(args) >0 {
82
+
info.Bucket=args[0]
83
+
}
84
+
iflen(args) >1 {
85
+
info.Key=args[1]
86
+
}
87
+
operations.ChangeLifecycle(cfg, info)
88
+
},
89
+
}
90
+
cmd.Flags().IntVarP(&info.ToIAAfterDays, "to-ia-after-days", "", 0, "to IA storage after some days. the range is -1 or bigger than 0. -1 means cancel to IA storage")
91
+
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to archive storage")
92
+
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to deep archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to deep archive storage")
93
+
cmd.Flags().IntVarP(&info.DeleteAfterDays, "delete-after-days", "", 0, "delete after some days. the range is -1 or bigger than 0. -1 means cancel to delete")
Long: `Set the lifecycle of some file. <KeyFile> contain all file keys that need to set. one key per line.
163
+
Lifecycle value must great than or equal to -1, unit: day.
164
+
* less than -1: there's no point and it won't trigger any effect
165
+
* equal to -1: cancel lifecycle
166
+
* equal to 0: there's no point and it won't trigger any effect
167
+
* bigger than 0: set lifecycle`,
168
+
Run: func(cmd*cobra.Command, args []string) {
169
+
cfg.CmdCfg.CmdId=docs.BatchChangeLifecycle
170
+
iflen(args) >0 {
171
+
info.Bucket=args[0]
172
+
}
173
+
operations.BatchChangeLifecycle(cfg, info)
174
+
},
175
+
}
176
+
cmd.Flags().IntVarP(&info.ToIAAfterDays, "to-ia-after-days", "", 0, "to IA storage after some days. the range is -1 or bigger than 0. -1 means cancel to IA storage")
177
+
cmd.Flags().IntVarP(&info.ToArchiveAfterDays, "to-archive-after-days", "", 0, "to archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to archive storage")
178
+
cmd.Flags().IntVarP(&info.ToDeepArchiveAfterDays, "to-deep-archive-after-days", "", 0, "to deep archive storage after some days. the range is -1 or bigger than 0. -1 means cancel to deep archive storage")
179
+
cmd.Flags().IntVarP(&info.DeleteAfterDays, "delete-after-days", "", 0, "delete after some days. the range is -1 or bigger than 0. -1 means cancel to delete")
0 commit comments