From d014e696986e8a0ea97f51cb8de5c579a5bff0b7 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sat, 30 Nov 2024 10:04:55 -0800 Subject: [PATCH] AWS: Deprecated `createdTime` in favor of `createdAt` We use createdAt in 35 places and createTime in 6. Add createdAt to these resources and deprecate the existing createTime. Signed-off-by: Tim Smith --- providers/aws/resources/aws.lr | 24 +++++-- providers/aws/resources/aws.lr.go | 72 ++++++++++++++++++++ providers/aws/resources/aws.lr.manifest.yaml | 12 ++++ providers/aws/resources/aws_cloudfront.go | 1 + providers/aws/resources/aws_dynamodb.go | 1 + providers/aws/resources/aws_elb.go | 2 + providers/aws/resources/aws_rds.go | 2 + providers/aws/resources/aws_s3.go | 1 + 8 files changed, 109 insertions(+), 6 deletions(-) diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index e78c1c2bbc..95e03b17eb 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -1221,8 +1221,10 @@ private aws.elb.loadbalancer @defaults("name region elbType scheme vpcId dnsName attributes() []dict // Deprecated: Use `vpc` instead vpcId string - // Date and time when the load balancer was created + // Deprecated (use `createdAt` instead) createdTime time + // Date and time when the load balancer was created + createdAt time // Availability zone where the load balancer runs availabilityZones []string // VPC security groups for the load balancer @@ -1671,8 +1673,10 @@ private aws.cloudfront.function @defaults("name status") { arn string // Date and time when the function was last updated lastModifiedTime time - // Date and time when the function was created + // Deprecated (use `createdAt` instead) createdTime time + // Date and time when the function was created + createdAt time // Stage that the function is in stage string // Comment to describe the function @@ -1769,8 +1773,10 @@ private aws.s3.bucket @defaults("name location public") { publicAccessBlock() dict // Whether the bucket still exists (stale reference) exists bool - // Date the bucket was created + // Deprecated (use `createdAt` instead) createdTime time + // Date the bucket was created + createdAt time } // Amazon S3 bucket grant @@ -1977,8 +1983,10 @@ private aws.dynamodb.table @defaults("name region") { continuousBackups() dict // Tags for the table tags() map[string]string - // Creation time of the table + // Deprecated (use `createdAt` instead) createdTime time + // Creation time of the table + createdAt time // Whether deletion protection is enabled deletionProtectionEnabled bool // Global table version @@ -2095,8 +2103,10 @@ private aws.rds.dbcluster @defaults("id region") { storageType string // Current state of the cluster status string - // Creation date of the RDS cluster + // Deprecated (use `createdAt` instead) createdTime time + // Creation date of the RDS cluster + createdAt time // Number of days automated snapshots are retained backupRetentionPeriod int // Whether minor version patches are applied automatically @@ -2235,8 +2245,10 @@ private aws.rds.dbinstance @defaults("id region engine engineVersion") { status string // Whether minor version patches are applied automatically autoMinorVersionUpgrade bool - // Creation date of the RDS instance + // Deprecated (use `createdAt` instead) createdTime time + // Creation date of the RDS instance + createdAt time // Port that the database instance listens on. If the database instance is part of a DB cluster, this can be a different port than the DB cluster port. port int // Connection endpoint for the database instance diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index c2cda90fc4..1b75b39a35 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -2195,6 +2195,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.elb.loadbalancer.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsElbLoadbalancer).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.elb.loadbalancer.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsElbLoadbalancer).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.elb.loadbalancer.availabilityZones": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsElbLoadbalancer).GetAvailabilityZones()).ToDataRes(types.Array(types.String)) }, @@ -2699,6 +2702,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.cloudfront.function.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsCloudfrontFunction).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.cloudfront.function.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsCloudfrontFunction).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.cloudfront.function.stage": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsCloudfrontFunction).GetStage()).ToDataRes(types.String) }, @@ -2816,6 +2822,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.s3.bucket.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsS3Bucket).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.s3.bucket.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsS3Bucket).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.s3.bucket.grant.id": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsS3BucketGrant).GetId()).ToDataRes(types.String) }, @@ -3047,6 +3056,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.dynamodb.table.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsDynamodbTable).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.dynamodb.table.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsDynamodbTable).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.dynamodb.table.deletionProtectionEnabled": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsDynamodbTable).GetDeletionProtectionEnabled()).ToDataRes(types.Bool) }, @@ -3194,6 +3206,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.rds.dbcluster.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsRdsDbcluster).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.rds.dbcluster.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsRdsDbcluster).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.rds.dbcluster.backupRetentionPeriod": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsRdsDbcluster).GetBackupRetentionPeriod()).ToDataRes(types.Int) }, @@ -3392,6 +3407,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "aws.rds.dbinstance.createdTime": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsRdsDbinstance).GetCreatedTime()).ToDataRes(types.Time) }, + "aws.rds.dbinstance.createdAt": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlAwsRdsDbinstance).GetCreatedAt()).ToDataRes(types.Time) + }, "aws.rds.dbinstance.port": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlAwsRdsDbinstance).GetPort()).ToDataRes(types.Int) }, @@ -7099,6 +7117,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsElbLoadbalancer).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.elb.loadbalancer.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsElbLoadbalancer).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.elb.loadbalancer.availabilityZones": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsElbLoadbalancer).AvailabilityZones, ok = plugin.RawToTValue[[]interface{}](v.Value, v.Error) return @@ -7883,6 +7905,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsCloudfrontFunction).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.cloudfront.function.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsCloudfrontFunction).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.cloudfront.function.stage": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsCloudfrontFunction).Stage, ok = plugin.RawToTValue[string](v.Value, v.Error) return @@ -8059,6 +8085,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsS3Bucket).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.s3.bucket.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsS3Bucket).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.s3.bucket.grant.__id": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsS3BucketGrant).__id, ok = v.Value.(string) return @@ -8419,6 +8449,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsDynamodbTable).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.dynamodb.table.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsDynamodbTable).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.dynamodb.table.deletionProtectionEnabled": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsDynamodbTable).DeletionProtectionEnabled, ok = plugin.RawToTValue[bool](v.Value, v.Error) return @@ -8635,6 +8669,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsRdsDbcluster).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.rds.dbcluster.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsRdsDbcluster).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.rds.dbcluster.backupRetentionPeriod": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsRdsDbcluster).BackupRetentionPeriod, ok = plugin.RawToTValue[int64](v.Value, v.Error) return @@ -8907,6 +8945,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlAwsRdsDbinstance).CreatedTime, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) return }, + "aws.rds.dbinstance.createdAt": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlAwsRdsDbinstance).CreatedAt, ok = plugin.RawToTValue[*time.Time](v.Value, v.Error) + return + }, "aws.rds.dbinstance.port": func(r plugin.Resource, v *llx.RawData) (ok bool) { r.(*mqlAwsRdsDbinstance).Port, ok = plugin.RawToTValue[int64](v.Value, v.Error) return @@ -17527,6 +17569,7 @@ type mqlAwsElbLoadbalancer struct { Attributes plugin.TValue[[]interface{}] VpcId plugin.TValue[string] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] AvailabilityZones plugin.TValue[[]interface{}] SecurityGroups plugin.TValue[[]interface{}] HostedZoneId plugin.TValue[string] @@ -17609,6 +17652,10 @@ func (c *mqlAwsElbLoadbalancer) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsElbLoadbalancer) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + func (c *mqlAwsElbLoadbalancer) GetAvailabilityZones() *plugin.TValue[[]interface{}] { return &c.AvailabilityZones } @@ -19922,6 +19969,7 @@ type mqlAwsCloudfrontFunction struct { Arn plugin.TValue[string] LastModifiedTime plugin.TValue[*time.Time] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] Stage plugin.TValue[string] Comment plugin.TValue[string] Runtime plugin.TValue[string] @@ -19984,6 +20032,10 @@ func (c *mqlAwsCloudfrontFunction) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsCloudfrontFunction) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + func (c *mqlAwsCloudfrontFunction) GetStage() *plugin.TValue[string] { return &c.Stage } @@ -20351,6 +20403,7 @@ type mqlAwsS3Bucket struct { PublicAccessBlock plugin.TValue[interface{}] Exists plugin.TValue[bool] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] } // createAwsS3Bucket creates a new instance of this resource @@ -20520,6 +20573,10 @@ func (c *mqlAwsS3Bucket) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsS3Bucket) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + // mqlAwsS3BucketGrant for the aws.s3.bucket.grant resource type mqlAwsS3BucketGrant struct { MqlRuntime *plugin.Runtime @@ -21538,6 +21595,7 @@ type mqlAwsDynamodbTable struct { ContinuousBackups plugin.TValue[interface{}] Tags plugin.TValue[map[string]interface{}] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] DeletionProtectionEnabled plugin.TValue[bool] GlobalTableVersion plugin.TValue[string] Items plugin.TValue[int64] @@ -21629,6 +21687,10 @@ func (c *mqlAwsDynamodbTable) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsDynamodbTable) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + func (c *mqlAwsDynamodbTable) GetDeletionProtectionEnabled() *plugin.TValue[bool] { return &c.DeletionProtectionEnabled } @@ -22131,6 +22193,7 @@ type mqlAwsRdsDbcluster struct { StorageType plugin.TValue[string] Status plugin.TValue[string] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] BackupRetentionPeriod plugin.TValue[int64] AutoMinorVersionUpgrade plugin.TValue[bool] ClusterDbInstanceClass plugin.TValue[string] @@ -22256,6 +22319,10 @@ func (c *mqlAwsRdsDbcluster) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsRdsDbcluster) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + func (c *mqlAwsRdsDbcluster) GetBackupRetentionPeriod() *plugin.TValue[int64] { return &c.BackupRetentionPeriod } @@ -22531,6 +22598,7 @@ type mqlAwsRdsDbinstance struct { Status plugin.TValue[string] AutoMinorVersionUpgrade plugin.TValue[bool] CreatedTime plugin.TValue[*time.Time] + CreatedAt plugin.TValue[*time.Time] Port plugin.TValue[int64] Endpoint plugin.TValue[string] MasterUsername plugin.TValue[string] @@ -22715,6 +22783,10 @@ func (c *mqlAwsRdsDbinstance) GetCreatedTime() *plugin.TValue[*time.Time] { return &c.CreatedTime } +func (c *mqlAwsRdsDbinstance) GetCreatedAt() *plugin.TValue[*time.Time] { + return &c.CreatedAt +} + func (c *mqlAwsRdsDbinstance) GetPort() *plugin.TValue[int64] { return &c.Port } diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index 653f20e920..bdb714ba59 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -394,6 +394,8 @@ resources: fields: arn: {} comment: {} + createdAt: + min_mondoo_version: 9.0.0 createdTime: {} lastModifiedTime: {} name: {} @@ -850,6 +852,8 @@ resources: arn: {} backups: {} continuousBackups: {} + createdAt: + min_mondoo_version: 9.0.0 createdTime: min_mondoo_version: 9.0.0 deletionProtectionEnabled: @@ -1679,6 +1683,8 @@ resources: attributes: {} availabilityZones: min_mondoo_version: 9.0.0 + createdAt: + min_mondoo_version: 9.0.0 createdTime: min_mondoo_version: 9.0.0 dnsName: {} @@ -2448,6 +2454,8 @@ resources: min_mondoo_version: latest clusterDbInstanceClass: min_mondoo_version: 9.0.0 + createdAt: + min_mondoo_version: 9.0.0 createdTime: min_mondoo_version: 9.0.0 deletionProtection: @@ -2525,6 +2533,8 @@ resources: min_mondoo_version: latest certificateExpiresAt: min_mondoo_version: latest + createdAt: + min_mondoo_version: 9.0.0 createdTime: min_mondoo_version: 9.0.0 customIamInstanceProfile: @@ -2769,6 +2779,8 @@ resources: acl: {} arn: {} cors: {} + createdAt: + min_mondoo_version: 9.0.0 createdTime: min_mondoo_version: 9.0.0 defaultLock: {} diff --git a/providers/aws/resources/aws_cloudfront.go b/providers/aws/resources/aws_cloudfront.go index 0ae64791d7..6c37e658a9 100644 --- a/providers/aws/resources/aws_cloudfront.go +++ b/providers/aws/resources/aws_cloudfront.go @@ -149,6 +149,7 @@ func (a *mqlAwsCloudfront) functions() ([]interface{}, error) { "status": llx.StringDataPtr(funct.Status), "lastModifiedTime": llx.TimeDataPtr(lmTime), "createdTime": llx.TimeDataPtr(crTime), + "createdAt": llx.TimeDataPtr(crTime), "stage": llx.StringData(stage), "comment": llx.StringData(comment), "runtime": llx.StringData(runtime), diff --git a/providers/aws/resources/aws_dynamodb.go b/providers/aws/resources/aws_dynamodb.go index 622db4d621..ef90bfff53 100644 --- a/providers/aws/resources/aws_dynamodb.go +++ b/providers/aws/resources/aws_dynamodb.go @@ -497,6 +497,7 @@ func (a *mqlAwsDynamodb) getTables(conn *connection.AwsConnection) []*jobpool.Jo "sseDescription": llx.DictData(sseDict), "provisionedThroughput": llx.DictData(throughputDict), "createdTime": llx.TimeDataPtr(table.Table.CreationDateTime), + "createdAt": llx.TimeDataPtr(table.Table.CreationDateTime), "deletionProtectionEnabled": llx.BoolDataPtr(table.Table.DeletionProtectionEnabled), "globalTableVersion": llx.StringDataPtr(table.Table.GlobalTableVersion), "id": llx.StringDataPtr(table.Table.TableId), diff --git a/providers/aws/resources/aws_elb.go b/providers/aws/resources/aws_elb.go index a7c5597156..0988cddb1c 100644 --- a/providers/aws/resources/aws_elb.go +++ b/providers/aws/resources/aws_elb.go @@ -78,6 +78,7 @@ func (a *mqlAwsElb) getClassicLoadBalancers(conn *connection.AwsConnection) []*j map[string]*llx.RawData{ "arn": llx.StringData(fmt.Sprintf(elbv1LbArnPattern, regionVal, conn.AccountId(), convert.ToString(lb.LoadBalancerName))), "createdTime": llx.TimeDataPtr(lb.CreatedTime), + "createdAt": llx.TimeDataPtr(lb.CreatedTime), "dnsName": llx.StringDataPtr(lb.DNSName), "elbType": llx.StringData("classic"), "listenerDescriptions": llx.AnyData(jsonListeners), @@ -173,6 +174,7 @@ func (a *mqlAwsElb) getLoadBalancers(conn *connection.AwsConnection) []*jobpool. "arn": llx.StringDataPtr(lb.LoadBalancerArn), "availabilityZones": llx.ArrayData(availabilityZones, types.String), "createdTime": llx.TimeDataPtr(lb.CreatedTime), + "createdAt": llx.TimeDataPtr(lb.CreatedTime), "dnsName": llx.StringDataPtr(lb.DNSName), "hostedZoneId": llx.StringDataPtr(lb.CanonicalHostedZoneId), "name": llx.StringDataPtr(lb.LoadBalancerName), diff --git a/providers/aws/resources/aws_rds.go b/providers/aws/resources/aws_rds.go index 02d57dad3b..3709e976f6 100644 --- a/providers/aws/resources/aws_rds.go +++ b/providers/aws/resources/aws_rds.go @@ -209,6 +209,7 @@ func newMqlAwsRdsInstance(runtime *plugin.Runtime, region string, accountID stri "availabilityZone": llx.StringDataPtr(dbInstance.AvailabilityZone), "backupRetentionPeriod": llx.IntDataDefault(dbInstance.BackupRetentionPeriod, 0), "createdTime": llx.TimeDataPtr(dbInstance.InstanceCreateTime), + "createdAt": llx.TimeDataPtr(dbInstance.InstanceCreateTime), "dbInstanceClass": llx.StringDataPtr(dbInstance.DBInstanceClass), "dbInstanceIdentifier": llx.StringDataPtr(dbInstance.DBInstanceIdentifier), "deletionProtection": llx.BoolDataPtr(dbInstance.DeletionProtection), @@ -540,6 +541,7 @@ func newMqlAwsRdsCluster(runtime *plugin.Runtime, region string, accountID strin "backupRetentionPeriod": llx.IntDataDefault(cluster.BackupRetentionPeriod, 0), "clusterDbInstanceClass": llx.StringDataPtr(cluster.DBClusterInstanceClass), "createdTime": llx.TimeDataPtr(cluster.ClusterCreateTime), + "createdAt": llx.TimeDataPtr(cluster.ClusterCreateTime), "deletionProtection": llx.BoolDataPtr(cluster.DeletionProtection), "endpoint": llx.StringDataPtr(cluster.Endpoint), "engine": llx.StringDataPtr(cluster.Engine), diff --git a/providers/aws/resources/aws_s3.go b/providers/aws/resources/aws_s3.go index 13e1fc0186..b85eb2078f 100644 --- a/providers/aws/resources/aws_s3.go +++ b/providers/aws/resources/aws_s3.go @@ -102,6 +102,7 @@ func (a *mqlAwsS3) buckets() ([]interface{}, error) { "exists": llx.BoolData(true), "location": llx.StringData(region), "createdTime": llx.TimeDataPtr(bucket.CreationDate), + "createdAt": llx.TimeDataPtr(bucket.CreationDate), }) if err != nil { return nil, err