GetMigrationTask

Updated at:

Retrieves a migration task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

apig:GetMigrationTask

get

*All Resource

*

None None

Request syntax

GET /v1/migration-tasks/{taskId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

taskId

string

No

The migration task ID.

mt-xxxxxxxx

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

Id of the request

42EAF9DB-9082-5F11-8EE1-C2357906DA0F

code

string

The response code.

200

message

string

The response message.

success

data

object

The response data.

taskId

string

The task ID.

mt-xxxxxxxx

userId

string

The ID of the user to whom the task belongs.

1234567890

gatewayId

string

The ID of the destination gateway.

gw-xxxx

gatewayName

string

The name of the destination gateway. If the query fails, a hyphen (-) is returned as a fallback without blocking the return of the main task information.

my-gateway

apiId

string

The ID of the associated HTTP API.

api-xxxx

apiName

string

The API name. This value may be empty.

ingress-api

envId

string

The ID of the destination environment.

env-xxxx

status

string

The task status.

Valid values:

  • FlowSwitchCompleted :

    Traffic switching in progress.

  • Failed :

    Migration failed.

  • Completed :

    Migration completed.

  • FlowSwitchPreCheck :

    Traffic switching in progress.

  • Initial :

    Route migration (wizard step 2).

  • FlowSwitch :

    Traffic switching in progress (wizard step 3).

  • FlowSwitchCheck :

    Traffic switching in progress.

FlowSwitch

clusterId

string

The ID of the source ACK cluster.

c-xxxxxx

clusterName

string

The name of the source cluster. The service source is looked up by gatewayId and clusterId. If the lookup fails, a hyphen (-) is returned as a fallback.

my-cluster

clusterNamespace

string

The namespace of the source cluster. This value is selected during SLB traffic switching.

default

slbId

string

The ID of the SLB instance used for traffic switching.

lb-bp1xxxx

virtualServices

array<object>

The list of SLB virtual server groups.

object

The list of SLB virtual server groups.

virtualServiceGroupId

string

The backend server group ID.

rsp-xxxx

virtualServiceGroupName

string

The name.

80-tcp

port

integer

The port.

80

protocol

string

The protocol. This parameter is required for CLB.

tcp

weight

integer

The weight of the APIG-side service in the legacy flow (0-100).

50

serviceName

string

The name of the selected SLB service.

nginx-ingress-lb

migrationType

string

The migration type. [_single.resp.200.props.data.migrationType.enum.Nginx Ingress]Nginx Ingress migration.

Valid values:

  • Nginx Ingress :

    Nginx Ingress 迁移

Nginx Ingress

switchType

string

The traffic switching method.

Valid values:

  • DNS :

    DNS-based traffic switching.

  • SLB :

    Traffic switching by reusing the SLB of the original cluster.

SLB

description

string

The task description.

workspace api monitor test

ingressConfig

object

The Ingress configuration.

ingressClass

string

The Ingress class to listen on.

nginx

watchNamespace

string

The namespace in which to listen for Ingress resources.

default

createTime

integer

The creation time, in seconds-level UNIX timestamp. Multiply by 1000 on the frontend before formatting.

1756262400

Examples

Success response

JSON format

{
  "requestId": "42EAF9DB-9082-5F11-8EE1-C2357906DA0F",
  "code": "200",
  "message": "success",
  "data": {
    "taskId": "mt-xxxxxxxx",
    "userId": "1234567890",
    "gatewayId": "gw-xxxx",
    "gatewayName": "my-gateway",
    "apiId": "api-xxxx",
    "apiName": "ingress-api",
    "envId": "env-xxxx",
    "status": "FlowSwitch",
    "clusterId": "c-xxxxxx",
    "clusterName": "my-cluster",
    "clusterNamespace": "default",
    "slbId": "lb-bp1xxxx",
    "virtualServices": [
      {
        "virtualServiceGroupId": "rsp-xxxx",
        "virtualServiceGroupName": "80-tcp",
        "port": 80,
        "protocol": "tcp"
      }
    ],
    "weight": 50,
    "serviceName": "nginx-ingress-lb",
    "migrationType": "Nginx Ingress",
    "switchType": "SLB",
    "description": "workspace api monitor test",
    "ingressConfig": {
      "ingressClass": "nginx",
      "watchNamespace": "default"
    },
    "createTime": 1756262400
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.