Class: Telnyx::Resources::Storage::Buckets::Usage
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::Buckets::Usage
- Defined in:
- lib/telnyx/resources/storage/buckets/usage.rb
Overview
Bucket Usage operations
Instance Method Summary collapse
-
#get_api_usage(bucket_name, filter:, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse
Some parameter documentations has been truncated, see Models::Storage::Buckets::UsageGetAPIUsageParams for more details.
-
#get_bucket_usage(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::UsageGetBucketUsageResponse
Returns the amount of storage space and number of files a bucket takes up.
-
#initialize(client:) ⇒ Usage
constructor
private
A new instance of Usage.
Constructor Details
#initialize(client:) ⇒ Usage
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Usage.
61 62 63 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#get_api_usage(bucket_name, filter:, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse
Some parameter documentations has been truncated, see Models::Storage::Buckets::UsageGetAPIUsageParams for more details.
Returns the detail on API usage on a bucket of a particular time period, group by method category.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 26 def get_api_usage(bucket_name, params) parsed, = Telnyx::Storage::Buckets::UsageGetAPIUsageParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["storage/buckets/%1$s/usage/api", bucket_name], query: query, model: Telnyx::Models::Storage::Buckets::UsageGetAPIUsageResponse, options: ) end |
#get_bucket_usage(bucket_name, request_options: {}) ⇒ Telnyx::Models::Storage::Buckets::UsageGetBucketUsageResponse
Returns the amount of storage space and number of files a bucket takes up.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 49 def get_bucket_usage(bucket_name, params = {}) @client.request( method: :get, path: ["storage/buckets/%1$s/usage/storage", bucket_name], model: Telnyx::Models::Storage::Buckets::UsageGetBucketUsageResponse, options: params[:request_options] ) end |