Updated on 2023-10-31 GMT+08:00

Importing and Exporting Assets

SecMaster allows you to import assets outside the cloud. After the import, the security status of the assets can be displayed. You can also export asset information.

This section describes how to import and export assets.

Limitations and Constraints

Only .xlsx files no larger than 20 MB can be imported.

Importing Assets

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Security > SecMaster.
  3. In the navigation pane, choose Workspaces > Management. In the workspace list, click the name of the target workspace.

    Figure 1 Management

  4. In the navigation pane on the left, choose Resource Manager > Resource Manager.

    Figure 2 Resource Manager

  5. On the Resource Manager page, click a tab corresponding to the type of the resources you want to import.
  6. In the upper left corner of the asset list, click Import.
  7. In the Import dialog box, click Download Template. Then, fill information about the resource to be imported in the template.

  8. After the template is filled, click Select File in the Import dialog box and select the Excel file you want to import.
  9. Click OK.

Asset Import Template Parameters

You can use a template to import assets in batches. For details about the parameters in the asset import template, view the following tables:

Do not modify the table heads when you use the template.

Table 1 Servers

Parameter

Type

Mandatory

Description

id

String

Yes

Asset ID, which contains 2 to 36 characters.

name

String

Yes

Asset name, which contains 2 to 512 characters.

protected_status

String

No

Whether HSS is enabled

  • OPEN: HSS is enabled.
  • CLOSE: HSS is disabled.

description

String

No

ECS description

status

String

No

ECS status

The value can be any of the following:

ACTIVE, BUILD, ERROR, HARD_REBOOT, MIGRATING, REBOOT, REBUILD, RESIZE, REVERT_RESIZE, SHUTOFF, VERIFY_RESIZE, DELETED.

host_id

String

No

ID of the server where the ECS is deployed.

host_name

String

No

Name of the server where the ECS is deployed.

host_status

String

No

Status of the server where the ECS is deployed. The value can be any of the following:

  • UP: The server is running properly.
  • UNKNOWN: The server status is unknown.
  • DOWN: The server is abnormal.
  • MAINTENANCE: The server is under maintenance.
  • Null: The ECS does not have host information.

version

String

No

IP address version

  • 4: IPv4
  • 6: IPv6

addr

String

No

IP address

type

String

No

IP address type

fixed: private IP address

floating: floating IP address

mac_addr

String

No

MAC address

port_id

String

No

ID of the port bound to the IP address

vpc_id

String

No

ID of the VPC to which the ECS belongs

image_type

String

No

Image class. The following classes are supported:

  • gold: Public image
  • private: Private image
  • shared: Shared image

image_name

String

No

Image name of the ECS

os_type

String

No

OS type. The value can be Linux or Windows.

os_bit

String

No

OS architecture, 32 bit or 64 bit.

resource_spec_code

String

No

Resource specifications of the ECS

vendor_type

String

Yes

Environment supplier

domain_id

String

Yes

ID of the tenant to which the asset belongs.

region_id

String

Yes

Asset region.

project_id

String

Yes

ID of the project to which the asset belongs.

ep_id

String

No

ID of the enterprise project to which the asset belongs.

ep_name

String

No

Name of the enterprise project to which the asset belongs.

vendor_name

String

Yes

Asset probes or asset providers

idc_id

String

Yes

ID of the on-premises equipment room

idc_name

String

Yes

Name of the on-premises equipment room

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Table 2 Websites

Parameter

Type

Mandatory

Description

value

String

Yes

Website name

domain_name

String

Yes

Domain name

name_server

String

No

DNS servers. Use commas (,) to separate IP addresses, for example, 192.168.25.106,192.168.25.124.

protected_status

String

No

Whether WAF is enabled.

  • OPEN: WAF is enabled.
  • CLOSE: WAF is disabled.

If this parameter left blank, the default value CLOSE will be used.

idc_id

String

Yes

ID of the on-premises data center

idc_name

String

Yes

Name of the on-premises data center

vendor_name

String

Yes

Asset provider

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Table 3 Databases

Parameter

Type

Mandatory

Description

id

String

Yes

Instance ID

name

String

Yes

Instance name

status

String

Yes

Instance status. The value can be any of the following:

  • BUILD: The instance is being created.
  • ACTIVE: The instance is running properly.
  • FAILED: The instance is abnormal.
  • FROZEN: The instance is frozen.
  • MODIFYING: The instance is being scaled up.
  • REBOOTING: The instance is being restarted.
  • RESTORING: The instance is being restored.
  • MODIFYING INSTANCE TYPE: The instance is changing to the active/standby deployment.
  • SWITCHOVER: The instance is performing an active/standby switchover.
  • MIGRATING: The instance is being migrated.
  • BACKING UP: The instance is being backed up.
  • MODIFYING DATABASE PORT: The database port of the instance is being changed.
  • STORAGE FULL: The instance disk is full.

private_ips

String

Yes

Private IP addresses. Use commas (,) to separate IP addresses, for example, 192.168.25.106,192.168.25.124.

port

Integer

Yes

Database port number

  • An RDS for MySQL database can use ports 1024 to 65535, excluding 12017 and 33071, which are reserved for RDS system use.
  • An RDS for PostgreSQL database can use ports 2100 to 9500.
  • An RDS for SQL Server DB instance port is 1433 or any value from 2100 to 9500 (excluding 5355 and 5985). For Microsoft SQL Server 2017 Enterprise, Standard, and Web editions, the database port cannot be 5050, 5353, or 5986.

enable_ssl

Boolean

Yes

Whether SSL is enabled

  • true: SSL is enabled for the instance.
  • false: SSL is disabled for the instance.

type

String

Yes

Instance type. The value can be any of the following:

  • Single: single-node instance
  • Ha: Instance in active/standby deployment
  • Replica: read replica instance
  • Enterprise: distributed instance (enterprise edition)

region

String

Yes

Region to which the asset belongs

db_user_name

String

Yes

Default username

vpc_id

String

Yes

VPC ID

subnet_id

String

Yes

Network ID of the subnet

cpu

String

Yes

Number of CPUs.

mem

String

Yes

Memory size in GB

vendor_type

String

Yes

Environment supplier

domain_id

String

Yes

ID of the tenant to which the asset belongs.

region_id

String

Yes

Asset region.

project_id

String

Yes

ID of the project to which the asset belongs.

ep_id

String

No

ID of the enterprise project to which the asset belongs.

ep_name

String

No

Name of the enterprise project to which the asset belongs.

vendor_name

String

Yes

Asset probes or asset providers

idc_id

String

Yes

ID of the on-premises equipment room

idc_name

String

Yes

Name of the on-premises equipment room

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Table 4 VPC

Parameter

Type

Mandatory

Description

id

String

Yes

VPC ID

name

String

Yes

VPC name

protected_status

String

No

Security status. The value can be OPEN (protection enabled) or CLOSE (protection disabled).

description

String

No

Description about the VPC

cidr

String

Yes

Range of available subnets in the VPC

status

String

Yes

VPC status. The options are as follows:

  • PENDING: The VPC is being created.
  • ACTIVE: The VPC is created.

vendor_type

String

Yes

Provider type

domain_id

String

Yes

ID of the tenant to which the asset belongs.

region_id

String

Yes

ID of the asset region.

project_id

String

Yes

ID of the project to which the asset belongs.

ep_id

String

No

ID of the enterprise project to which the asset belongs.

ep_name

String

No

Name of the enterprise project to which the asset belongs.

vendor_name

String

Yes

Asset probes or asset providers

idc_id

String

Yes

ID of the on-premises equipment room

idc_name

String

Yes

Name of the on-premises equipment room

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Table 5 EIP

Parameter

Type

Mandatory

Description

id

String

Yes

Unique ID

alias

String

No

EIP Name

description

String

No

Description about the EIP

protected_status

String

No

Anti-DDoS or CFW status. The value can be OPEN (the function is enabled) or CLOSE (the function is disabled).

project_id

String

Yes

Project ID

ip_version

Integer

Yes

IP address version The options are as follows:

  • 4
  • 6

public_ip_address

String

Yes

IP Address

publicip_pool_name

String

Yes

Network type of an EIP, including public EIP pool (for example, 5_bgp or 5_sbgp) and dedicated EIP pool.

status

String

Yes

EIP status. The options are as follows:

  • FREEZED: The EIP is frozen.
  • BIND_ERROR: The EIP fails to be bound.
  • BINDING: The EIP is being bound.
  • PENDING_DELETE: The EIP is being released.
  • PENDING_CREATE: The EIP is being created.
  • NOTIFYING: The EIP is being created.
  • NOTIFY_DELETE: The EIP is being released.
  • PENDING_UPDATE: The EIP is being updated.
  • DOWN: The EIP has not been bound.
  • ACTIVE: The EIP has been bound.
  • ELB: The EIP has been bound to an ELB load balancer.
  • VPN: The EIP has been bound to a VPN.
  • ERROR: The EIP is failed.

associate_instance_type

String

Yes

Type of the instance to which the EIP address is bound. The options are as follows:

  • PORT
  • NATGW
  • ELB
  • ELBV1
  • VPN
  • null

associate_instance_id

String

Yes

ID of the instance to which the EIP address is bound

create_time

String

Yes

UTC time when a resource is created

ISO8601 format: YYYY-MM-DDTHH:mm:ss.ms+timezone

vendor_type

String

Yes

Provider type

domain_id

String

Yes

ID of the tenant to which the asset belongs.

region_id

String

Yes

ID of the asset region.

project_id

String

Yes

ID of the project to which the asset belongs.

ep_id

String

No

ID of the enterprise project to which the asset belongs.

ep_name

String

No

Name of the enterprise project to which the asset belongs.

vendor_name

String

Yes

Asset probes or asset providers

idc_id

String

Yes

ID of the on-premises equipment room

idc_name

String

Yes

Name of the on-premises equipment room

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Table 6 IP addresses

Parameter

Type

Mandatory

Description

value

String

Yes

Asset value

version

String

Yes

Asset Type

  • ipv4
  • ipv6

relative_value

String

No

Opposite value. For example, if the IP address is an IPv4 address, the value is ipv6.

network_public

Boolean

Yes

External network or internal network

network_partition

String

No

Network partition: OM/PSZ/DMZ

network_partition

String

No

Network plane code

network_vxlan_id

String

No

Virtual network ID

remark

String

No

Asset remarks

name

String

No

Asset name. The default value is the asset value.

latitude

Float

No

Latitude

longitude

Float

No

Longitude

city_code

String

Yes

City code. Set this parameter based on the standard city code.

country_code

String

Yes

Country code. Set this parameter based on the international standard country code.

server_room

String

Yes

Equipment room

server_rack

String

Yes

Cabinet

mac_addr

String

No

MAC address

important

String

Yes

Severity

  • 0: minor
  • 1: major

idc_id

String

Yes

ID of the on-premises data center

idc_name

String

Yes

Name of the on-premises data center

vendor_name

String

Yes

Asset provider

department_name

String

No

Name of the department to which the asset belongs

business_name

String

No

Name of the service system

business_owner

String

No

Owner of the service system

governance_user_type

String

No

Type of the asset governance owner

governance_user_name

String

No

Name of the asset governance owner

Exporting Assets

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Security > SecMaster.
  3. In the navigation pane, choose Workspaces > Management. In the workspace list, click the name of the target workspace.

    Figure 3 Management

  4. In the navigation pane on the left, choose Resource Manager > Resource Manager.

    Figure 4 Resource Manager

  5. On the asset management page, click the corresponding asset tab.
  6. On the asset page, select the assets to be exported and click in the upper right corner of the list.
  7. In the Export dialog box, set asset parameters.

    Table 7 Exporting assets

    Parameter

    Description

    Format

    By default, the asset list is exported into an Excel.

    Columns

    Select the parameters to be exported.

  8. Click OK.

    The system automatically downloads the Excel to your local PC.