Stop a Migration
POST
/
storage
/
migrations
/
{id}
/
actions
/
stop
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.storage.migrations.actions.stop('');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.storage.migrations.actions.stop(
"",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Storage.Migrations.Actions.Stop(context.TODO(), "")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.storage.migrations.actions.ActionStopParams;
import com.telnyx.sdk.models.storage.migrations.actions.ActionStopResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionStopResponse response = client.storage().migrations().actions().stop("");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.storage.migrations.actions.stop("")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->storage->migrations->actions->stop('');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:migrations:actions stop \
--api-key 'My API Key' \
--id ''curl --request POST \
--url https://api.telnyx.com/v2/storage/migrations/{id}/actions/stop \
--header 'Authorization: Bearer <token>'{
"data": {
"source_id": "<string>",
"target_bucket_name": "<string>",
"target_region": "<string>",
"id": "<string>",
"refresh": true,
"last_copy": "2020-01-01T00:00:00Z",
"bytes_to_migrate": 123,
"bytes_migrated": 123,
"speed": 123,
"eta": "2020-01-01T00:00:00Z",
"created_at": "2020-01-01T00:00:00Z"
}
}Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.storage.migrations.actions.stop('');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.storage.migrations.actions.stop(
"",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Storage.Migrations.Actions.Stop(context.TODO(), "")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.storage.migrations.actions.ActionStopParams;
import com.telnyx.sdk.models.storage.migrations.actions.ActionStopResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionStopResponse response = client.storage().migrations().actions().stop("");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.storage.migrations.actions.stop("")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->storage->migrations->actions->stop('');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:migrations:actions stop \
--api-key 'My API Key' \
--id ''curl --request POST \
--url https://api.telnyx.com/v2/storage/migrations/{id}/actions/stop \
--header 'Authorization: Bearer <token>'{
"data": {
"source_id": "<string>",
"target_bucket_name": "<string>",
"target_region": "<string>",
"id": "<string>",
"refresh": true,
"last_copy": "2020-01-01T00:00:00Z",
"bytes_to_migrate": 123,
"bytes_migrated": 123,
"speed": 123,
"eta": "2020-01-01T00:00:00Z",
"created_at": "2020-01-01T00:00:00Z"
}
}