Updated on 2024-11-14 GMT+08:00

Searching for ECSs

Scenarios

After purchasing an ECS, you can use the search function on the management console to search for ECSs in the current region. You can search for ECSs by name, ID, AZ, status, flavor name, image ID, EIP, private IP address, creation time, billing mode, VPC ID, enterprise project, or resource tag.

Search Syntax

A variety of ECS search types are available. For details, see Table 1.

  • For certain properties, if you enter complete values, the system can automatically identity the property type and search for them.
  • The following properties only support exact search and you need to enter complete values: ID, image ID, EIP, VPC ID, and enterprise project.
  • When you use multiple properties including the private IP address for search, you need to enter complete values of the IP address.
  • The private IP address must be in the following CIDR blocks: 10.0.0.0/8-24, 172.16.0.0/12-24, and 192.168.0.0/16-24.
  • You can search by tag key or key-value pair. You can add one or more tags. If keys are different, the tags are automatically joined with AND. If the keys are the same but the values are different, the tags are also automatically joined with AND.
  • Tags do not support multi-value search if no property is selected.
  • You cannot use both the private IP address and EIP for a combination of search.
Table 1 Search syntax

Search Type

Supported Property

Format

Example

Description

Property value

Automatic property matching

ID

Flavor name

EIP

Private IP address

Complete property value

ID: 4a79dfec-f0d8-4181-9bef-495b8b7220e1

Flavor Name: s2.xlarge.4

Private IP Address: 192.168.99.231

When you search by keyword, enter a complete property value instead of selecting a property. The system can automatically match the property type for search.

Separate every two values with a comma (,). Otherwise, only the last value will be used for the search. Multiple property values are in OR relationship.

Property value

Fuzzy search

Name

Private IP address

Flavor name

Incomplete property value

Name: ecs-c

Flavor name: s7n

Private IP address: 192.168.0

Select a property, and enter or choose the corresponding property value.

Single property

All properties on the console

Property: Value

Private IP Address: 192.168.99.231

Select a property, and enter or choose the corresponding property value.

The following properties only support exact search and you need to enter complete values for them: ID, EIP, image ID, and VPC ID.

Multiple properties

All properties on the console

Property 1: Value Property 2: Value

Private IP Address: 192.168.99.231 Name: ecs-c

You can search by multiple properties and the properties are in AND relationship.

The following properties only support exact search and you need to enter complete values for them: ID, EIP, image ID, and VPC ID.

Single property with multiple values

ID

Flavor name

EIP

Property: Value 1,Value 2

ID: 624eda28-6bd9-402a-934b-26c8969f7169,bf6c0281-f749-42d7-b732-23ac69d80ebe

Flavor Name: s2,s3

Select a property and enter or choose multiple values. The values are in OR relationship.

The ID only supports exact search. You need to enter a complete ECS ID for search.

Status

Billing mode

Property: Value 1 Property: Value 2

Status: Running Status: Stopped

Select a property and choose multiple values. The values are in OR relationship.

Multiple properties with multiple values

ID, flavor name, status, EIP, billing mode, and private IP address

Property1: Value 1,Value 2 Property 2: Value 1,Value 2

ID:

624eda28-6bd9-402a-934b-26c8969f7169,bf6c0281-f749-42d7-b732-23ac69d80ebe Flavor Name: s2,s3

Multi-property and multi-value search

  • Multiple properties are in AND relationship.
  • Multiple values of the same property are in OR relationship.

The ID only supports exact search. You need to enter a complete ECS ID for search.

You can use vertical bars (|) to separate values of the following properties: status and billing mode. Alternatively, you can directly select the properties and corresponding values.

Procedure

  1. Log in to the management console.
  2. Click . Under Compute, click Elastic Cloud Server.

    The ECS console is displayed.

  3. In the search box, specify search criteria.

    You can use either of the following methods:

    • Directly enter a property value for search.
    • Select a property first and specify the property value for search.
      1. Click the search box and select a property.
        Figure 1 Selecting a property
      2. Specify a property value and press Enter to search.

Example 1: Searching by Property Value

After you enter a complete property value, the system automatically identifies the property type and search for it. Separate every two values with a comma (,). Otherwise, only the last value is used for the search. Multiple property values are in OR relationship.

  • Searching by a single value

    Enter a complete ECS ID and press Enter to search.

    Figure 2 Entering a complete ECS ID
    Figure 3 Automatic property matching
  • Searching by multiple values
    Enter multiple complete flavor names and press Enter to search.
    Figure 4 Entering multiple complete flavor names
    Figure 5 Automatic property matching for search

Example 2: Searching by a Single Property

Select a property, and enter or choose the corresponding property value.

The following properties only support exact search and you need to enter complete values for them: ID, EIP, image ID, and VPC ID.

  • Fuzzy search by private IP address
    1. Select Private IP Address in the search box.
    2. Enter a private IP address and press Enter to search. Private IP addresses can be used for fuzzy search. For example, you can enter 192.168.0 to search for all ECSs that use the 192.168.0 IP address.
      Figure 6 Searching by private IP address
  • Exact search by ID
    1. Select ID in the search box.
    2. Enter a complete ECS ID and press Enter to search.
      Figure 7 Searching for an ECS by ID

Example 3: Searching by Multiple Properties

You can search by multiple properties and the properties are in AND relationship.

The following properties only support exact search and you need to enter complete values for them: ID, EIP, image ID, and VPC ID.

In this example, use Name and Private IP Address for a combination of search.

  1. Select Name and enter an ECS name in the search box for fuzzy search.
  2. Select Private IP Address and enter a private IP address for fuzzy search.
    Figure 8 Searching by name and private IP address

Example 4: Searching by a Single Property with Multiple Values

You can choose from the following properties: status, ID, flavor name, private IP address, EIP, billing mode, and tag.

The following properties only support exact search and you need to enter complete values for them: ID, private IP address, and EIP.

Select a property and enter multiple values. The values are in OR relationship.

  • Fuzzy search
    1. Select Flavor Name in the search box.
    2. Enter multiple flavor names and separate them with commas (,).
      Figure 9 Searching by flavor name
  • Exact search
    1. Select Private IP Address in the search box.
    2. Enter multiple complete private IP addresses and separate them with commas (,).
      Figure 10 Searching by private IP address

Example 5: Searching by Multiple Properties with Multiple Values

You can choose from the following properties to search by properties with multiple values: ID, flavor name, status, billing mode, and EIP.

Multi-property, multi-value search

  • Multiple properties are in AND relationship.
  • Multiple values of the same property are in OR relationship.

The ID only supports exact search. You need to enter a complete ECS ID for search.

  • Fuzzy search
    1. Select Status in the search box and choose Running and Stopped.
    2. Add Flavor Name, enter multiple flavors, and separate them with commas (,).
      Figure 11 Searching by status and flavor name
  • Exact search
    1. Select Status in the search box and choose Running and Stopped.
    2. Add ID, enter multiple IDs, and separate them with commas (,).
      Figure 12 Searching by status and ID

Example 6: Searching by Tags

You can search by tag key or key-value pair.

You can add one or more tags. If keys are different, the tags are automatically joined with AND.

If the keys are the same but the values are different, the tags are also automatically joined with AND.

  • Searching by a single tag

    In the search box, select a tag key under Resource Tag and then a tag value, and press Enter.

    Figure 13 Searching by tag
  • Searching by multiple tags

    In the search box, select multiple tag key-value pairs for search.

    If you search by multiple tags, the tags are in the AND relationship.

    Figure 14 Searching by tag