Redshift: describe_clusters() now returns the TotalStorageCapacityInMegaBytes (#6868)

This commit is contained in:
Bert Blommers 2023-09-29 22:05:38 +00:00 committed by GitHub
parent 06982582b7
commit 504387dcb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,7 @@ class Cluster(TaggableResourceMixin, CloudFormationModel):
self.restored_from_snapshot = restored_from_snapshot
self.kms_key_id = kms_key_id
self.cluster_snapshot_copy_status: Optional[Dict[str, Any]] = None
self.total_storage_capacity = 0
@staticmethod
def cloudformation_name_type() -> str:
@ -313,6 +314,7 @@ class Cluster(TaggableResourceMixin, CloudFormationModel):
for iam_role_arn in self.iam_roles_arn
],
"KmsKeyId": self.kms_key_id,
"TotalStorageCapacityInMegaBytes": self.total_storage_capacity,
}
if self.restored_from_snapshot:
json_response["RestoreStatus"] = {

View File

@ -219,6 +219,7 @@ def test_create_cluster_all_attributes():
assert cluster["ClusterVersion"] == "1.0"
assert cluster["AllowVersionUpgrade"] is True
assert cluster["NumberOfNodes"] == 3
assert cluster["TotalStorageCapacityInMegaBytes"] == 0
@mock_redshift