Class: Telnyx::Resources::Storage::MigrationSources

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/storage/migration_sources.rb

Overview

Migrate data from an external provider into Telnyx Cloud Storage

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/telnyx/resources/storage/migration_sources.rb', line 28

def create(params)
  parsed, options = Telnyx::Storage::MigrationSourceCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "storage/migration_sources",
    body: parsed,
    model: Telnyx::Models::Storage::MigrationSourceCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationSourceDeleteResponse

Delete a Migration Source

Parameters:

  • id (String)

    Unique identifier for the data migration source.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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

Parameters:

Returns:

See Also:



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

Parameters:

  • id (String)

    Unique identifier for the data migration source.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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