Este conteúdo foi traduzido por máquina para sua conveniência e a Huawei Cloud não pode garantir que o conteúdo foi traduzido com precisão. Para exibir o conteúdo original, use o link no canto superior direito para mudar para a página em inglês.
Central de ajuda/ Elastic IP/ Referência de API/ APIs/ EIP Tag Management/ Querying EIP Tags in a Specified Project
Atualizado em 2024-09-25 GMT+08:00

Querying EIP Tags in a Specified Project

Function

This API is used to query all EIP tags of a tenant in a specified region.

URI

GET /v2.0/{project_id}/publicips/tags

Tabela 1 describes the parameters.

Tabela 1 Parameter description

Name

Mandatory

Description

project_id

Yes

Specifies the project ID.

Request Message

  • Request parameter
    Tabela 2 Request header parameter

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    Specifies the user token. The token can be obtained by calling the IAM API used for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

  • Example request
    GET /v2.0/{project_id}/publicips/tags

Response Message

  • Response parameter
    Tabela 3 Response parameter

    Parameter

    Type

    Description

    tags

    Array of tag objects

    Specifies the tag object list. For details, see Tabela 4.

    Tabela 4 Descrição do campo de tag

    Nome

    Tipo

    Descrição

    key

    String

    Especifica a chave de tag.

    • Não pode ser deixada em branco.
    • Pode conter no máximo 36 caracteres.
    • Pode conter letras, dígitos, sublinhados (_) e hifens (-).

    valores

    Array of strings

    Especifica a lista dos valores da tag.

    • Pode conter no máximo 43 caracteres.
    • Pode conter letras, dígitos, sublinhados (_), pontos (.) e hifens (-).
  • Example response
    {
        "tags": [
            {
                "key": "key1",
                "values": [
                    "value1",
                    "value2"
                ]
            },
            {
                "key": "key2",
                "values": [
                    "value1",
                    "value2"
                ]
            }
        ]
    }