Class: Telnyx::Resources::Storage::MigrationSources
- Inherits:
-
Object
- Object
- Telnyx::Resources::Storage::MigrationSources
- Defined in:
- lib/telnyx/resources/storage/migration_sources.rb
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.
99 100 101 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 99 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.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 27 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
87 88 89 90 91 92 93 94 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 87 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
67 68 69 70 71 72 73 74 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 67 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
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 49 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 |