Class: Telnyx::Resources::Storage::Cloudfs
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::Cloudfs
- Defined in:
- lib/telnyx/resources/storage/cloudfs.rb,
lib/telnyx/resources/storage/cloudfs/actions.rb,
sig/telnyx/resources/storage/cloudfs.rbs,
sig/telnyx/resources/storage/cloudfs/actions.rbs
Overview
Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
Defined Under Namespace
Classes: Actions
Instance Attribute Summary collapse
-
#actions ⇒ Telnyx::Resources::Storage::Cloudfs::Actions
readonly
Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage.
Instance Method Summary collapse
-
#create(name:, region:, idempotency_key:, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper
Some parameter documentations has been truncated, see Models::Storage::CloudfCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Permanently deletes a CloudFS filesystem, removing its S3 bucket and its metadata database.
-
#initialize(client:) ⇒ Cloudfs
constructor
private
A new instance of Cloudfs.
-
#list(filter_name: nil, filter_region: nil, filter_status: nil, page_after: nil, page_before: nil, page_limit: nil, sort: nil, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfListResponse
Some parameter documentations has been truncated, see Models::Storage::CloudfListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Retrieves a CloudFS filesystem by its ID.
-
#update(id, name: nil, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Some parameter documentations has been truncated, see Models::Storage::CloudfUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Cloudfs
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 Cloudfs.
180 181 182 183 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 180 def initialize(client:) @client = client @actions = Telnyx::Resources::Storage::Cloudfs::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::Storage::Cloudfs::Actions (readonly)
Manage CloudFS filesystems — JuiceFS-compatible filesystems backed by Telnyx Cloud Storage
12 13 14 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 12 def actions @actions end |
Instance Method Details
#create(name:, region:, idempotency_key:, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemResponseWrapper
Some parameter documentations has been truncated, see Models::Storage::CloudfCreateParams for more details.
Creates a CloudFS filesystem. Provisioning is synchronous — typically a few
seconds, up to a few minutes — and the filesystem is returned with status
ready, together with its S3 bucket and metadata connection details. This
response is the only time the filesystem's meta_token — and the
credential-bearing meta_url — are returned; store them securely. If the token
is lost, issue a new one with the rotate-meta-token action. Names are unique
within your organization: creating with an existing name returns a 422.
Requests are idempotent: retrying with the same Idempotency-Key within 24
hours replays the original response instead of creating another filesystem.
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 40 def create(params) parsed, = Telnyx::Storage::CloudfCreateParams.dump_request(params) header_params = {idempotency_key: "idempotency-key"} @client.request( method: :post, path: "storage/cloudfs", headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Telnyx::Storage::CloudfsFilesystemResponseWrapper, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Permanently deletes a CloudFS filesystem, removing its S3 bucket and its
metadata database. Deletion is synchronous: the response returns the
filesystem's final state with status deleted. There is no restore. A
filesystem that is still provisioning returns a 409. If the filesystem still
contains data, the request may be rejected with a 409 — drain the bucket and
retry.
168 169 170 171 172 173 174 175 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 168 def delete(id, params = {}) @client.request( method: :delete, path: ["storage/cloudfs/%1$s", id], model: Telnyx::Storage::CloudfsFilesystemDetailResponseWrapper, options: params[:request_options] ) end |
#list(filter_name: nil, filter_region: nil, filter_status: nil, page_after: nil, page_before: nil, page_limit: nil, sort: nil, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfListResponse
Some parameter documentations has been truncated, see Models::Storage::CloudfListParams for more details.
Lists the CloudFS filesystems for the authenticated user's organization. Results
use cursor-based pagination: fetch the next page by passing meta.cursors.after
as page[after], or follow the meta.next URL.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 133 def list(params = {}) parsed, = Telnyx::Storage::CloudfListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "storage/cloudfs", query: query.transform_keys( filter_name: "filter[name]", filter_region: "filter[region]", filter_status: "filter[status]", page_after: "page[after]", page_before: "page[before]", page_limit: "page[limit]" ), model: Telnyx::Models::Storage::CloudfListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Retrieves a CloudFS filesystem by its ID. The returned meta_url omits the
credential — the metadata token is only ever returned by create and
rotate-meta-token. A filesystem whose last lifecycle action failed includes a
customer-safe error message.
67 68 69 70 71 72 73 74 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 67 def retrieve(id, params = {}) @client.request( method: :get, path: ["storage/cloudfs/%1$s", id], model: Telnyx::Storage::CloudfsFilesystemDetailResponseWrapper, options: params[:request_options] ) end |
#update(id, name: nil, request_options: {}) ⇒ Telnyx::Models::Storage::CloudfsFilesystemDetailResponseWrapper
Some parameter documentations has been truncated, see Models::Storage::CloudfUpdateParams for more details.
Updates a CloudFS filesystem. Only name can be changed; other fields are
immutable and unknown fields are rejected with a 400. Renaming to a name that
already exists in your organization returns a 422.
94 95 96 97 98 99 100 101 102 103 |
# File 'lib/telnyx/resources/storage/cloudfs.rb', line 94 def update(id, params = {}) parsed, = Telnyx::Storage::CloudfUpdateParams.dump_request(params) @client.request( method: :patch, path: ["storage/cloudfs/%1$s", id], body: parsed, model: Telnyx::Storage::CloudfsFilesystemDetailResponseWrapper, options: ) end |