@@ -51,6 +51,16 @@ class ObjectStorageEndpoint(JSONObject):
5151 s3_endpoint : Optional [str ] = None
5252
5353
54+ @dataclass
55+ class ObjectStorageQuotaUsage (JSONObject ):
56+ """
57+ ObjectStorageQuotaUsage contains the fields of an object storage quota usage information.
58+ """
59+
60+ quota_limit : int = 0
61+ usage : int = 0
62+
63+
5464class ObjectStorageType (Base ):
5565 """
5666 An ObjectStorageType represents the structure of a valid Object Storage type.
@@ -566,3 +576,41 @@ class ObjectStorageKeys(Base):
566576 "limited" : Property (),
567577 "regions" : Property (unordered = True ),
568578 }
579+
580+
581+ class ObjectStorageQuota (Base ):
582+ """
583+ An Object Storage related quota information on your account.
584+
585+ API documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-quota
586+ """
587+
588+ api_endpoint = "/object-storage/quotas/{quota_id}"
589+ id_attribute = "quota_id"
590+
591+ properties = {
592+ "quota_id" : Property (identifier = True ),
593+ "quota_name" : Property (),
594+ "endpoint_type" : Property (),
595+ "s3_endpoint" : Property (),
596+ "description" : Property (),
597+ "quota_limit" : Property (),
598+ "resource_metric" : Property (),
599+ }
600+
601+ def usage (self ):
602+ """
603+ Gets usage data for a specific ObjectStorage Quota resource you can have on your account and the current usage for that resource.
604+
605+ API documentation: https://techdocs.akamai.com/linode-api/reference/get-object-storage-quota-usage
606+
607+ :returns: The Object Storage Quota usage.
608+ :rtype: ObjectStorageQuotaUsage
609+ """
610+
611+ result = self ._client .get (
612+ f"{ type (self ).api_endpoint } /usage" ,
613+ model = self ,
614+ )
615+
616+ return ObjectStorageQuotaUsage .from_json (result )
0 commit comments