diff --git a/object_storage_quota.go b/object_storage_quota.go index 26535250d..31b210992 100644 --- a/object_storage_quota.go +++ b/object_storage_quota.go @@ -13,6 +13,8 @@ type ObjectStorageQuota struct { Description string `json:"description"` QuotaLimit int `json:"quota_limit"` ResourceMetric string `json:"resource_metric"` + QuotaType string `json:"quota_type"` + HasUsage bool `json:"has_usage"` } // ObjectStorageQuotaUsage is the usage data for a specific Object Storage related quota on your account. @@ -21,6 +23,23 @@ type ObjectStorageQuotaUsage struct { Usage *int `json:"usage"` } +// ObjectStorageGlobalQuota represents global/account-level Object Storage quota information. +type ObjectStorageGlobalQuota struct { + QuotaID string `json:"quota_id"` + QuotaName string `json:"quota_name"` + QuotaType string `json:"quota_type"` + Description string `json:"description"` + QuotaLimit int `json:"quota_limit"` + ResourceMetric string `json:"resource_metric"` + HasUsage bool `json:"has_usage"` +} + +// ObjectStorageGlobalQuotaUsage is the usage data for a specific global/account-level Object Storage quota. +type ObjectStorageGlobalQuotaUsage struct { + QuotaLimit int `json:"quota_limit"` + Usage *int `json:"usage"` +} + // ListObjectStorageQuotas lists the active ObjectStorage-related quotas applied to your account. func (c *Client) ListObjectStorageQuotas(ctx context.Context, opts *ListOptions) ([]ObjectStorageQuota, error) { return getPaginatedResults[ObjectStorageQuota](ctx, c, formatAPIPath("object-storage/quotas"), opts) @@ -37,3 +56,20 @@ func (c *Client) GetObjectStorageQuotaUsage(ctx context.Context, quotaID string) e := formatAPIPath("object-storage/quotas/%s/usage", quotaID) return doGETRequest[ObjectStorageQuotaUsage](ctx, c, e) } + +// ListObjectStorageGlobalQuotas lists the global/account-level ObjectStorage-related quotas applied to your account. +func (c *Client) ListObjectStorageGlobalQuotas(ctx context.Context, opts *ListOptions) ([]ObjectStorageGlobalQuota, error) { + return getPaginatedResults[ObjectStorageGlobalQuota](ctx, c, formatAPIPath("object-storage/global-quotas"), opts) +} + +// GetObjectStorageGlobalQuota gets information about a specific global/account-level ObjectStorage-related quota on your account. +func (c *Client) GetObjectStorageGlobalQuota(ctx context.Context, quotaID string) (*ObjectStorageGlobalQuota, error) { + e := formatAPIPath("object-storage/global-quotas/%s", quotaID) + return doGETRequest[ObjectStorageGlobalQuota](ctx, c, e) +} + +// GetObjectStorageGlobalQuotaUsage gets usage data for a specific global/account-level ObjectStorage quota resource. +func (c *Client) GetObjectStorageGlobalQuotaUsage(ctx context.Context, quotaID string) (*ObjectStorageGlobalQuotaUsage, error) { + e := formatAPIPath("object-storage/global-quotas/%s/usage", quotaID) + return doGETRequest[ObjectStorageGlobalQuotaUsage](ctx, c, e) +} diff --git a/test/integration/fixtures/TestObjectStorageGlobalQuotaUsage_Get.yaml b/test/integration/fixtures/TestObjectStorageGlobalQuotaUsage_Get.yaml new file mode 100644 index 000000000..c660df6a6 --- /dev/null +++ b/test/integration/fixtures/TestObjectStorageGlobalQuotaUsage_Get.yaml @@ -0,0 +1,130 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/object-storage/global-quotas?page=1 + method: GET + response: + body: '{"data": [{"quota_id": "keys", "quota_name": "Number of Access Keys", "quota_type": + "keys", "description": "Current number of access keys per account", "quota_limit": + 100, "resource_metric": "key", "has_usage": true}], "page": 1, "pages": 1, "results": + 1}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Akamai-Internal-Account: + - '*' + Cache-Control: + - max-age=0, no-cache, no-store + Connection: + - keep-alive + Content-Length: + - "255" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Expires: + - Wed, 18 Feb 2026 07:24:58 GMT + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - object_storage:read_only + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "1840" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/object-storage/global-quotas/keys/usage + method: GET + response: + body: '{"quota_limit": 100, "usage": 0}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Akamai-Internal-Account: + - '*' + Cache-Control: + - max-age=0, no-cache, no-store + Connection: + - keep-alive + Content-Length: + - "32" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Expires: + - Wed, 18 Feb 2026 07:24:59 GMT + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - object_storage:read_only + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "1840" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" diff --git a/test/integration/fixtures/TestObjectStorageGlobalQuotas_Get.yaml b/test/integration/fixtures/TestObjectStorageGlobalQuotas_Get.yaml new file mode 100644 index 000000000..fcfcdc2d3 --- /dev/null +++ b/test/integration/fixtures/TestObjectStorageGlobalQuotas_Get.yaml @@ -0,0 +1,132 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/object-storage/global-quotas?page=1 + method: GET + response: + body: '{"data": [{"quota_id": "keys", "quota_name": "Number of Access Keys", "quota_type": + "keys", "description": "Current number of access keys per account", "quota_limit": + 100, "resource_metric": "key", "has_usage": true}], "page": 1, "pages": 1, "results": + 1}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Akamai-Internal-Account: + - '*' + Cache-Control: + - max-age=0, no-cache, no-store + Connection: + - keep-alive + Content-Length: + - "255" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Expires: + - Wed, 18 Feb 2026 07:24:08 GMT + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - object_storage:read_only + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "1840" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/object-storage/global-quotas/keys + method: GET + response: + body: '{"quota_id": "keys", "quota_name": "Number of Access Keys", "quota_type": + "keys", "description": "Current number of access keys per account", "quota_limit": + 100, "resource_metric": "key", "has_usage": true}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Akamai-Internal-Account: + - '*' + Cache-Control: + - max-age=0, no-cache, no-store + Connection: + - keep-alive + Content-Length: + - "206" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Expires: + - Wed, 18 Feb 2026 07:24:08 GMT + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - object_storage:read_only + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "1840" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" diff --git a/test/integration/fixtures/TestObjectStorageGlobalQuotas_List.yaml b/test/integration/fixtures/TestObjectStorageGlobalQuotas_List.yaml new file mode 100644 index 000000000..85812c720 --- /dev/null +++ b/test/integration/fixtures/TestObjectStorageGlobalQuotas_List.yaml @@ -0,0 +1,68 @@ +--- +version: 1 +interactions: +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/object-storage/global-quotas?page=1 + method: GET + response: + body: '{"data": [{"quota_id": "keys", "quota_name": "Number of Access Keys", "quota_type": + "keys", "description": "Current number of access keys per account", "quota_limit": + 100, "resource_metric": "key", "has_usage": true}], "page": 1, "pages": 1, "results": + 1}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Akamai-Internal-Account: + - '*' + Cache-Control: + - max-age=0, no-cache, no-store + Connection: + - keep-alive + Content-Length: + - "255" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Expires: + - Wed, 18 Feb 2026 07:24:08 GMT + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - object_storage:read_only + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "1840" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" diff --git a/test/integration/fixtures/TestObjectStorageQuotas_Get.yaml b/test/integration/fixtures/TestObjectStorageQuotas_Get.yaml index 0da3e1d1f..ee0134099 100644 --- a/test/integration/fixtures/TestObjectStorageQuotas_Get.yaml +++ b/test/integration/fixtures/TestObjectStorageQuotas_Get.yaml @@ -17,7 +17,8 @@ interactions: body: '{"quota_id": "obj-objects-us-ord-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "us-ord-1.linodeobjects.com", "description": "Maximum number of objects this customer is allowed to have on this endpoint", - "quota_limit": 100000000, "resource_metric": "object"}' + "quota_limit": 100000000, "resource_metric": "object", "quota_type": "obj-objects", + "has_usage": true}' headers: Access-Control-Allow-Credentials: - "true" diff --git a/test/integration/fixtures/TestObjectStorageQuotas_List.yaml b/test/integration/fixtures/TestObjectStorageQuotas_List.yaml index 36c050a78..7941017e8 100644 --- a/test/integration/fixtures/TestObjectStorageQuotas_List.yaml +++ b/test/integration/fixtures/TestObjectStorageQuotas_List.yaml @@ -14,218 +14,307 @@ interactions: url: https://api.linode.com/v4beta/object-storage/quotas?page=1 method: GET response: - body: '{"data": [{"quota_id": "obj-buckets-br-gru-1.linodeobjects.com", "quota_name": - "max_buckets", "endpoint_type": "E1", "s3_endpoint": "br-gru-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-br-gru-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "br-gru-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-br-gru-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "br-gru-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-us-iad-10.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "us-iad-10.linodeobjects.com", "description": "Maximum - number of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-us-iad-10.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "us-iad-10.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-us-iad-10.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "us-iad-10.linodeobjects.com", "description": "Maximum - number of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-nl-ams-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-nl-ams-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-nl-ams-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-us-east-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E0", "s3_endpoint": "us-east-1.linodeobjects.com", "description": "Maximum - number of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-us-east-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E0", "s3_endpoint": "us-east-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 5368709120, "resource_metric": "byte"}, {"quota_id": - "obj-objects-us-east-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E0", "s3_endpoint": "us-east-1.linodeobjects.com", "description": "Maximum - number of objects this customer is allowed to have on this endpoint", "quota_limit": - 50000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-us-mia-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-us-mia-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-us-mia-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-us-lax-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "us-lax-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-us-lax-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "us-lax-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-us-lax-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "us-lax-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-es-mad-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "es-mad-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-es-mad-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "es-mad-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-es-mad-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "es-mad-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-us-southeast-1.linodeobjects.com", "quota_name": "max_buckets", - "endpoint_type": "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com", "description": - "Maximum number of buckets this customer is allowed to have on this endpoint", - "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-us-southeast-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 5368709120, "resource_metric": "byte"}, {"quota_id": - "obj-objects-us-southeast-1.linodeobjects.com", "quota_name": "max_objects", - "endpoint_type": "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com", "description": - "Maximum number of objects this customer is allowed to have on this endpoint", - "quota_limit": 50000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-ap-south-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-ap-south-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", "description": "Maximum - number of bytes this customer is allowed to have on this endpoint", "quota_limit": - 5368709120, "resource_metric": "byte"}, {"quota_id": "obj-objects-ap-south-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 50000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-gb-lon-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-gb-lon-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 536870912000, "resource_metric": "byte"}, {"quota_id": - "obj-objects-gb-lon-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 500000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-us-ord-10.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-us-ord-10.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", "description": "Maximum - number of bytes this customer is allowed to have on this endpoint", "quota_limit": - 536870912000, "resource_metric": "byte"}, {"quota_id": "obj-objects-us-ord-10.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 500000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-fr-par-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-fr-par-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-fr-par-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-us-ord-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "us-ord-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-us-ord-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "us-ord-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-us-ord-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "us-ord-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-in-maa-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-in-maa-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-in-maa-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-se-sto-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-se-sto-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-se-sto-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-it-mil-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "it-mil-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-it-mil-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "it-mil-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-it-mil-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "it-mil-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-eu-central-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-eu-central-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", "description": "Maximum - number of bytes this customer is allowed to have on this endpoint", "quota_limit": - 5368709120, "resource_metric": "byte"}, {"quota_id": "obj-objects-eu-central-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 50000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-us-sea-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "us-sea-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-us-sea-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "us-sea-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-us-sea-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "us-sea-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}, {"quota_id": "obj-buckets-id-cgk-1.linodeobjects.com", - "quota_name": "max_buckets", "endpoint_type": "E1", "s3_endpoint": "id-cgk-1.linodeobjects.com", - "description": "Maximum number of buckets this customer is allowed to have on - this endpoint", "quota_limit": 1000, "resource_metric": "bucket"}, {"quota_id": - "obj-bytes-id-cgk-1.linodeobjects.com", "quota_name": "max_bytes", "endpoint_type": - "E1", "s3_endpoint": "id-cgk-1.linodeobjects.com", "description": "Maximum number - of bytes this customer is allowed to have on this endpoint", "quota_limit": - 107374182400, "resource_metric": "byte"}, {"quota_id": "obj-objects-id-cgk-1.linodeobjects.com", - "quota_name": "max_objects", "endpoint_type": "E1", "s3_endpoint": "id-cgk-1.linodeobjects.com", - "description": "Maximum number of objects this customer is allowed to have on - this endpoint", "quota_limit": 100000000, "resource_metric": "object"}, {"quota_id": - "obj-buckets-jp-osa-1.linodeobjects.com", "quota_name": "max_buckets", "endpoint_type": - "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", "description": "Maximum number - of buckets this customer is allowed to have on this endpoint", "quota_limit": - 1000, "resource_metric": "bucket"}, {"quota_id": "obj-bytes-jp-osa-1.linodeobjects.com", - "quota_name": "max_bytes", "endpoint_type": "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", - "description": "Maximum number of bytes this customer is allowed to have on - this endpoint", "quota_limit": 107374182400, "resource_metric": "byte"}, {"quota_id": - "obj-objects-jp-osa-1.linodeobjects.com", "quota_name": "max_objects", "endpoint_type": - "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", "description": "Maximum number - of objects this customer is allowed to have on this endpoint", "quota_limit": - 100000000, "resource_metric": "object"}], "page": 1, "pages": 1, "results": - 60}' + body: '{"data": [{"quota_id": "obj-bytes-br-gru-1.linodeobjects.com", "quota_name": + "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "br-gru-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-br-gru-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "br-gru-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-br-gru-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "br-gru-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-us-sea-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "us-sea-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-us-sea-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "us-sea-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-us-sea-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "us-sea-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-id-cgk-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "id-cgk-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-id-cgk-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "id-cgk-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-id-cgk-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "id-cgk-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-us-iad-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "us-iad-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-us-iad-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "us-iad-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-us-iad-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "us-iad-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-es-mad-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "es-mad-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-es-mad-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "es-mad-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-es-mad-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "es-mad-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-no-osl-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E2", "s3_endpoint": + "no-osl-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-no-osl-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E2", "s3_endpoint": + "no-osl-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-no-osl-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E2", "s3_endpoint": + "no-osl-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-us-ord-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "us-ord-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-us-ord-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "us-ord-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-us-ord-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "us-ord-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-us-lax-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "us-lax-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-us-lax-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "us-lax-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-us-lax-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "us-lax-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-it-mil-1.linodeobjects.com", "quota_name": "Total + Capacity", "quota_type": "obj-bytes", "endpoint_type": "E1", "s3_endpoint": + "it-mil-1.linodeobjects.com", "description": "Current total capacity per account, + per endpoint", "quota_limit": 109951162777600, "resource_metric": "byte", "has_usage": + true}, {"quota_id": "obj-objects-it-mil-1.linodeobjects.com", "quota_name": + "Number of Objects", "quota_type": "obj-objects", "endpoint_type": "E1", "s3_endpoint": + "it-mil-1.linodeobjects.com", "description": "Current number of objects per + account, per endpoint", "quota_limit": 100000000, "resource_metric": "object", + "has_usage": true}, {"quota_id": "obj-buckets-it-mil-1.linodeobjects.com", "quota_name": + "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": "E1", "s3_endpoint": + "it-mil-1.linodeobjects.com", "description": "Current number of buckets per + account, per endpoint", "quota_limit": 1000, "resource_metric": "bucket", "has_usage": + true}, {"quota_id": "obj-bytes-us-southeast-1.linodeobjects.com", "quota_name": + "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": "E0", "s3_endpoint": + "us-southeast-1.linodeobjects.com", "description": "Current total capacity per + account, per endpoint", "quota_limit": 5497558138880, "resource_metric": "byte", + "has_usage": true}, {"quota_id": "obj-objects-us-southeast-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com", "description": "Current + number of objects per account, per endpoint", "quota_limit": 50000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-us-southeast-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E0", "s3_endpoint": "us-southeast-1.linodeobjects.com", "description": "Current + number of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-ap-south-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", "description": "Current + total capacity per account, per endpoint", "quota_limit": 5497558138880, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-ap-south-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", "description": "Current + number of objects per account, per endpoint", "quota_limit": 50000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-ap-south-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E0", "s3_endpoint": "ap-south-1.linodeobjects.com", "description": "Current + number of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-jp-osa-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-jp-osa-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-jp-osa-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "jp-osa-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-us-east-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E0", "s3_endpoint": "us-east-1.linodeobjects.com", "description": "Current + total capacity per account, per endpoint", "quota_limit": 5497558138880, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-us-east-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E0", "s3_endpoint": "us-east-1.linodeobjects.com", "description": "Current + number of objects per account, per endpoint", "quota_limit": 50000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-us-east-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E0", "s3_endpoint": "us-east-1.linodeobjects.com", "description": "Current + number of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-fr-par-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-fr-par-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-fr-par-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "fr-par-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-se-sto-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-se-sto-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-se-sto-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "se-sto-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-nl-ams-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-nl-ams-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-nl-ams-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "nl-ams-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-gb-lon-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 549755813888000, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-gb-lon-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 500000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-gb-lon-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E3", "s3_endpoint": "gb-lon-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-au-mel-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E2", "s3_endpoint": "au-mel-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-au-mel-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E2", "s3_endpoint": "au-mel-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-au-mel-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E2", "s3_endpoint": "au-mel-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-in-maa-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-in-maa-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-in-maa-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "in-maa-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-jp-tyo-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E2", "s3_endpoint": "jp-tyo-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-jp-tyo-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E2", "s3_endpoint": "jp-tyo-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-jp-tyo-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E2", "s3_endpoint": "jp-tyo-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-us-lax-4.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E3", "s3_endpoint": "us-lax-4.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 549755813888000, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-us-lax-4.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E3", "s3_endpoint": "us-lax-4.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 500000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-us-lax-4.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E3", "s3_endpoint": "us-lax-4.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-us-mia-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 109951162777600, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-us-mia-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 100000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-us-mia-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E1", "s3_endpoint": "us-mia-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-sg-sin-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E3", "s3_endpoint": "sg-sin-1.linodeobjects.com", "description": "Current total + capacity per account, per endpoint", "quota_limit": 549755813888000, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-sg-sin-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E3", "s3_endpoint": "sg-sin-1.linodeobjects.com", "description": "Current number + of objects per account, per endpoint", "quota_limit": 500000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-sg-sin-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E3", "s3_endpoint": "sg-sin-1.linodeobjects.com", "description": "Current number + of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-eu-central-1.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", "description": "Current + total capacity per account, per endpoint", "quota_limit": 5497558138880, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-eu-central-1.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", "description": "Current + number of objects per account, per endpoint", "quota_limit": 50000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-eu-central-1.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E0", "s3_endpoint": "eu-central-1.linodeobjects.com", "description": "Current + number of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}, {"quota_id": "obj-bytes-us-ord-10.linodeobjects.com", + "quota_name": "Total Capacity", "quota_type": "obj-bytes", "endpoint_type": + "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", "description": "Current + total capacity per account, per endpoint", "quota_limit": 549755813888000, "resource_metric": + "byte", "has_usage": true}, {"quota_id": "obj-objects-us-ord-10.linodeobjects.com", + "quota_name": "Number of Objects", "quota_type": "obj-objects", "endpoint_type": + "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", "description": "Current + number of objects per account, per endpoint", "quota_limit": 500000000, "resource_metric": + "object", "has_usage": true}, {"quota_id": "obj-buckets-us-ord-10.linodeobjects.com", + "quota_name": "Number of Buckets", "quota_type": "obj-buckets", "endpoint_type": + "E3", "s3_endpoint": "us-ord-10.linodeobjects.com", "description": "Current + number of buckets per account, per endpoint", "quota_limit": 1000, "resource_metric": + "bucket", "has_usage": true}], "page": 1, "pages": 1, "results": 75}' headers: Access-Control-Allow-Credentials: - "true" @@ -248,7 +337,7 @@ interactions: Content-Type: - application/json Expires: - - Thu, 24 Apr 2025 17:38:47 GMT + - Mon, 23 Feb 2026 20:13:34 GMT Pragma: - no-cache Strict-Transport-Security: @@ -267,7 +356,7 @@ interactions: X-Oauth-Scopes: - '*' X-Ratelimit-Limit: - - "400" + - "1840" X-Xss-Protection: - 1; mode=block status: 200 OK diff --git a/test/integration/object_storage_global_quota_test.go b/test/integration/object_storage_global_quota_test.go new file mode 100644 index 000000000..3fb1a25fc --- /dev/null +++ b/test/integration/object_storage_global_quota_test.go @@ -0,0 +1,91 @@ +package integration + +import ( + "context" + "testing" + + "github.com/linode/linodego" + "github.com/stretchr/testify/assert" +) + +func TestObjectStorageGlobalQuotas_List(t *testing.T) { + client, teardown := createTestClient(t, "fixtures/TestObjectStorageGlobalQuotas_List") + defer teardown() + + quotas, err := client.ListObjectStorageGlobalQuotas(context.Background(), &linodego.ListOptions{}) + assert.NoError(t, err, "Error listing ObjectStorageGlobalQuotas") + + // Just verify we got results and check structure of first quota if available + if len(quotas) > 0 { + firstQuota := quotas[0] + assert.NotEmpty(t, firstQuota.QuotaID) + assert.NotEmpty(t, firstQuota.QuotaName) + assert.NotEmpty(t, firstQuota.QuotaType) + assert.NotEmpty(t, firstQuota.Description) + assert.NotEmpty(t, firstQuota.ResourceMetric) + assert.Greater(t, firstQuota.QuotaLimit, 0) + // HasUsage can be true or false, just check it's a valid field + } +} + +func TestObjectStorageGlobalQuotas_Get(t *testing.T) { + client, teardown := createTestClient(t, "fixtures/TestObjectStorageGlobalQuotas_Get") + defer teardown() + + // First list to get a valid quota ID + quotas, err := client.ListObjectStorageGlobalQuotas(context.Background(), &linodego.ListOptions{}) + assert.NoError(t, err) + + if len(quotas) == 0 { + t.Skip("No global quotas available to test Get") + } + + // Use the first quota ID from the list + quotaID := quotas[0].QuotaID + + quota, err := client.GetObjectStorageGlobalQuota(context.Background(), quotaID) + assert.NoError(t, err) + + // Verify response structure + assert.Equal(t, quotaID, quota.QuotaID) + assert.NotEmpty(t, quota.QuotaName) + assert.NotEmpty(t, quota.QuotaType) + assert.NotEmpty(t, quota.Description) + assert.NotEmpty(t, quota.ResourceMetric) + assert.Greater(t, quota.QuotaLimit, 0) +} + +func TestObjectStorageGlobalQuotaUsage_Get(t *testing.T) { + client, teardown := createTestClient(t, "fixtures/TestObjectStorageGlobalQuotaUsage_Get") + defer teardown() + + // First list to get a quota with usage support + quotas, err := client.ListObjectStorageGlobalQuotas(context.Background(), &linodego.ListOptions{}) + assert.NoError(t, err) + + if len(quotas) == 0 { + t.Skip("No global quotas available to test Usage") + } + + // Find a quota that has usage support + var quotaWithUsage *linodego.ObjectStorageGlobalQuota + for _, q := range quotas { + if q.HasUsage { + quotaWithUsage = &q + break + } + } + + if quotaWithUsage == nil { + t.Skip("No global quotas with usage support available") + } + + quotaUsage, err := client.GetObjectStorageGlobalQuotaUsage(context.Background(), quotaWithUsage.QuotaID) + assert.NoError(t, err) + + // Verify response structure + assert.Greater(t, quotaUsage.QuotaLimit, 0) + if quotaUsage.Usage != nil { + assert.GreaterOrEqual(t, *quotaUsage.Usage, 0) + } +} diff --git a/test/integration/object_storage_quota_test.go b/test/integration/object_storage_quota_test.go index 03f7a6002..bd1e9d512 100644 --- a/test/integration/object_storage_quota_test.go +++ b/test/integration/object_storage_quota_test.go @@ -12,26 +12,19 @@ func TestObjectStorageQuotas_Get(t *testing.T) { client, teardown := createTestClient(t, "fixtures/TestObjectStorageQuotas_Get") defer teardown() - quota, err := client.GetObjectStorageQuota(context.Background(), "obj-objects-us-ord-1.linodeobjects.com") + targetQuotaID := "obj-objects-us-ord-1.linodeobjects.com" + quota, err := client.GetObjectStorageQuota(context.Background(), targetQuotaID) assert.NoError(t, err) - expected := linodego.ObjectStorageQuota{ - QuotaID: "obj-objects-us-ord-1.linodeobjects.com", - QuotaName: "max_objects", - EndpointType: "E1", - S3Endpoint: "us-ord-1.linodeobjects.com", - Description: "Maximum number of objects this customer is allowed to have on this endpoint", - QuotaLimit: 100000000, - ResourceMetric: "object", - } - - assert.Equal(t, expected.QuotaID, quota.QuotaID) - assert.Equal(t, expected.QuotaName, quota.QuotaName) - assert.Equal(t, expected.EndpointType, quota.EndpointType) - assert.Equal(t, expected.S3Endpoint, quota.S3Endpoint) - assert.Equal(t, expected.Description, quota.Description) - assert.Equal(t, expected.QuotaLimit, quota.QuotaLimit) - assert.Equal(t, expected.ResourceMetric, quota.ResourceMetric) + assert.Equal(t, targetQuotaID, quota.QuotaID) + assert.NotEmpty(t, quota.QuotaName) + assert.NotEmpty(t, quota.EndpointType) + assert.NotEmpty(t, quota.S3Endpoint) + assert.NotEmpty(t, quota.Description) + assert.Greater(t, quota.QuotaLimit, 0) + assert.NotEmpty(t, quota.ResourceMetric) + assert.NotEmpty(t, quota.QuotaType) + assert.True(t, quota.HasUsage) } func TestObjectStorageQuotas_List(t *testing.T) { @@ -52,23 +45,15 @@ func TestObjectStorageQuotas_List(t *testing.T) { } if assert.NotNil(t, foundQuota, "Expected quota_id %q not found", targetQuotaID) { - expected := linodego.ObjectStorageQuota{ - QuotaID: "obj-buckets-us-mia-1.linodeobjects.com", - QuotaName: "max_buckets", - EndpointType: "E1", - S3Endpoint: "us-mia-1.linodeobjects.com", - Description: "Maximum number of buckets this customer is allowed to have on this endpoint", - QuotaLimit: 1000, - ResourceMetric: "bucket", - } - - assert.Equal(t, expected.QuotaID, foundQuota.QuotaID) - assert.Equal(t, expected.QuotaName, foundQuota.QuotaName) - assert.Equal(t, expected.EndpointType, foundQuota.EndpointType) - assert.Equal(t, expected.S3Endpoint, foundQuota.S3Endpoint) - assert.Equal(t, expected.Description, foundQuota.Description) - assert.Equal(t, expected.QuotaLimit, foundQuota.QuotaLimit) - assert.Equal(t, expected.ResourceMetric, foundQuota.ResourceMetric) + assert.Equal(t, targetQuotaID, foundQuota.QuotaID) + assert.NotEmpty(t, foundQuota.QuotaName) + assert.NotEmpty(t, foundQuota.EndpointType) + assert.NotEmpty(t, foundQuota.S3Endpoint) + assert.NotEmpty(t, foundQuota.Description) + assert.Greater(t, foundQuota.QuotaLimit, 0) + assert.NotEmpty(t, foundQuota.ResourceMetric) + assert.NotEmpty(t, foundQuota.QuotaType) + assert.True(t, foundQuota.HasUsage) } }