Class: Telnyx::Resources::Storage::Migrations

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/storage/migrations.rb,
lib/telnyx/resources/storage/migrations/actions.rb

Overview

Migrate data from an external provider into Telnyx Cloud Storage

Defined Under Namespace

Classes: Actions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Migrations

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 Migrations.

Parameters:



85
86
87
88
# File 'lib/telnyx/resources/storage/migrations.rb', line 85

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::Storage::Migrations::Actions.new(client: client)
end

Instance Attribute Details

#actionsTelnyx::Resources::Storage::Migrations::Actions (readonly)

Migrate data from an external provider into Telnyx Cloud Storage



10
11
12
# File 'lib/telnyx/resources/storage/migrations.rb', line 10

def actions
  @actions
end

Instance Method Details

#create(source_id:, target_bucket_name:, target_region:, refresh: nil, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationCreateResponse

Some parameter documentations has been truncated, see Models::Storage::MigrationCreateParams for more details.

Initiate a migration of data from an external provider into Telnyx Cloud Storage. Currently, only S3 is supported.

Parameters:

  • source_id (String)

    ID of the Migration Source from which to migrate data.

  • target_bucket_name (String)

    Bucket name to migrate the data into. Will default to the same name as the ‘sour

  • target_region (String)

    Telnyx Cloud Storage region to migrate the data to.

  • refresh (Boolean)

    If true, will continue to poll the source bucket to ensure new data is continual

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

Returns:

See Also:



33
34
35
36
37
38
39
40
41
42
# File 'lib/telnyx/resources/storage/migrations.rb', line 33

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

#list(request_options: {}) ⇒ Telnyx::Models::Storage::MigrationListResponse

List all Migrations

Parameters:

Returns:

See Also:



73
74
75
76
77
78
79
80
# File 'lib/telnyx/resources/storage/migrations.rb', line 73

def list(params = {})
  @client.request(
    method: :get,
    path: "storage/migrations",
    model: Telnyx::Models::Storage::MigrationListResponse,
    options: params[:request_options]
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::Storage::MigrationRetrieveResponse

Get a Migration

Parameters:

  • id (String)

    Unique identifier for the data migration.

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

Returns:

See Also:



55
56
57
58
59
60
61
62
# File 'lib/telnyx/resources/storage/migrations.rb', line 55

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["storage/migrations/%1$s", id],
    model: Telnyx::Models::Storage::MigrationRetrieveResponse,
    options: params[:request_options]
  )
end