Class: Telnyx::Resources::Storage::Buckets::Usage
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::Buckets::Usage
- Defined in:
- lib/telnyx/resources/storage/buckets/usage.rb
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.
59 60 61 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 59 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.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 25 def get_api_usage(bucket_name, params) parsed, = Telnyx::Storage::Buckets::UsageGetAPIUsageParams.dump_request(params) @client.request( method: :get, path: ["storage/buckets/%1$s/usage/api", bucket_name], query: parsed, 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.
47 48 49 50 51 52 53 54 |
# File 'lib/telnyx/resources/storage/buckets/usage.rb', line 47 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 |