Class: Telnyx::Resources::Storage::MigrationSources
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::MigrationSources
- Defined in:
- lib/telnyx/resources/storage/migration_sources.rb
Overview
Migrate data from an external provider into Telnyx Cloud Storage
Instance Method Summary collapse
-
#create(bucket_name:, provider:, provider_auth:, source_region: nil, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceCreateResponse
Some parameter documentations has been truncated, see Models::Storage::MigrationSourceCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceDeleteResponse
Delete a Migration Source.
-
#initialize(client:) ⇒ MigrationSources
constructor
private
A new instance of MigrationSources.
-
#list(request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceListResponse
List all Migration Sources.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceRetrieveResponse
Get a Migration Source.
Constructor Details
#initialize(client:) ⇒ MigrationSources
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 MigrationSources.
100 101 102 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 100 def initialize(client:) @client = client end |
Instance Method Details
#create(bucket_name:, provider:, provider_auth:, source_region: nil, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceCreateResponse
Some parameter documentations has been truncated, see Models::Storage::MigrationSourceCreateParams for more details.
Create a source from which data can be migrated from.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 28 def create(params) parsed, = Telnyx::Storage::MigrationSourceCreateParams.dump_request(params) @client.request( method: :post, path: "storage/migration_sources", body: parsed, model: Telnyx::Models::Storage::MigrationSourceCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceDeleteResponse
Delete a Migration Source
88 89 90 91 92 93 94 95 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 88 def delete(id, params = {}) @client.request( method: :delete, path: ["storage/migration_sources/%1$s", id], model: Telnyx::Models::Storage::MigrationSourceDeleteResponse, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceListResponse
List all Migration Sources
68 69 70 71 72 73 74 75 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 68 def list(params = {}) @client.request( method: :get, path: "storage/migration_sources", model: Telnyx::Models::Storage::MigrationSourceListResponse, options: params[:request_options] ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceRetrieveResponse
Get a Migration Source
50 51 52 53 54 55 56 57 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 50 def retrieve(id, params = {}) @client.request( method: :get, path: ["storage/migration_sources/%1$s", id], model: Telnyx::Models::Storage::MigrationSourceRetrieveResponse, options: params[:request_options] ) end |