diff --git a/src/spaceone/inventory/connector/aws_s3_connector/schema/resource.py b/src/spaceone/inventory/connector/aws_s3_connector/schema/resource.py index 99cb160..d0f699b 100644 --- a/src/spaceone/inventory/connector/aws_s3_connector/schema/resource.py +++ b/src/spaceone/inventory/connector/aws_s3_connector/schema/resource.py @@ -11,6 +11,7 @@ EnumDyField, SizeField, MoreField, + DictDyField, ) from spaceone.inventory.libs.schema.dynamic_layout import ( ItemDynamicLayout, @@ -196,6 +197,26 @@ ], ) +lifecycle_rules = TableDynamicLayout.set_fields( + "Lifecycle Rules", + "data.lifecycle_rules", + fields=[ + TextDyField.data_source("ID", "id"), + EnumDyField.data_source( + "Status", + "status", + default_state={"safe": ["Enabled"], "alert": ["Disabled"]}, + ), + DictDyField.data_source("Expiration", "expiration"), + DictDyField.data_source( + "Noncurrent Version Expiration", "noncurrent_version_expiration" + ), + DictDyField.data_source( + "Noncurrent Version Expiration", "noncurrent_version_expiration" + ), + ], +) + metadata = CloudServiceMeta.set_layouts( layouts=[ bucket, @@ -210,6 +231,7 @@ transfer_acc, requester_pays, topic_conf, + lifecycle_rules, ] )