Handle unlimited blob retention in CLI output
@@ -348,9 +348,14 @@ func DescribeDomain(c *cli.Context) {
formatStr = formatStr + "BucketName: %v\n"
descValues = append(descValues, resp.Configuration.GetArchivalBucketName())
}
- if resp.Configuration.GetArchivalRetentionPeriodInDays() != 0 {
+ if resp.Configuration.ArchivalRetentionPeriodInDays != nil {
formatStr = formatStr + "ArchivalRetentionInDays: %v\n"
- descValues = append(descValues, resp.Configuration.GetArchivalRetentionPeriodInDays())
+ archivalRetentionDays := resp.Configuration.GetArchivalRetentionPeriodInDays()
+ if archivalRetentionDays == 0 {
+ descValues = append(descValues, "unlimited")
+ } else {
+ descValues = append(descValues, archivalRetentionDays)
+ }
}
if resp.Configuration.GetArchivalBucketOwner() != "" {
formatStr = formatStr + "BucketOwner: %v\n"
