Updated on 2026-09-20 GMT+08:00

Importing a Template

This section describes how to add resources in batches using a template, then associate resources with agents and credentials.

Notes and Constraints

  • Only CSV files encoded in UTF-8 are supported. Each file cannot exceed 500 KB.
  • Up to 1000 resources can be imported at once.
  • If multiple resources have the same name, only the first one is imported.

Procedure

  1. Sign in to the MgC console. In the navigation pane, under Project, select your application migration project from the drop-down list.
  2. In the navigation pane, click Resource Survey.
  3. Click the Import tab. Then click the Import card.

    Figure 1 Import

  4. Select a resource type from the drop-down list.
  5. Click Download Template. Configure parameters by referring to Table 1, then save the file as a CSV file encoded using UTF-8.

    Table 1 Template parameters

    Parameter

    Description

    name

    (Mandatory) Server resource name. Max. characters: 64.

    access_ip

    (Mandatory) IPv4 address. Max. characters: 15.

    os_type

    (Mandatory) OS type. Max. characters: 8. Value: WINDOWS or LINUX (case-insensitive).

    port

    (Mandatory) Valid port. Max. characters: 5. Value range: 1–65535.

    mgc_agent_name

    (Optional) Agent name. Max. characters: 64.

    credential_name

    (Optional) Credential name. Max. characters: 64.

  6. Import the template. Files will be deleted from upload history once uploaded.
  7. (Optional) Select the application to be associated from the drop-down list. If no applications are available, click Create Application in the displayed dialog box. Keep the default application name or enter a new one, enter a description, select a business scenario, environment, and region, and click Create.
  8. Decide whether to select the checkbox I authorize MgC to collect and save the raw data for later analysis. Selecting it helps identify risks beforehand.

    • Deselected: MgC only performs deep collection.
    • Selected: MgC performs deep collection and identifies dependency risks. Click a server name to check the analysis result on the resource details page.

  9. Click Confirm. The Resource Survey page is displayed and the collection task is started.

    • If the task status is Succeeded, check the import result on the task details page.
    • If the task status is Failed, click the task name to check the data source that failed to be collected. Hover the cursor on the collection status to check the failure cause. Rectify the fault and import the file again.