Todos os produtos
Search
Central de documentação

:Use the help command

Última atualização: Jul 04, 2026

O Alibaba Cloud CLI integra-se aos serviços da Alibaba Cloud e às informações de suas APIs. Adicione a opção --help no Alibaba Cloud CLI para obter informações de ajuda.

Consultar serviços disponíveis e opções globais

Adicione a opção --help ao comando aliyun para consultar opções comuns de comando e serviços compatíveis.

  1. Execute o seguinte comando:

    aliyun --help
  2. Exemplo de resposta (parcial):

    shell@Alicloud:~$ aliyun --help
    Alibaba Cloud CLI 3.0.276
    
    Usage:
      aliyun <product> <operation> [--parameter1 value1 --parameter2 value2 ...]
    
    Flags:
      --mode                    Use `--mode {AK|StsToken|RamRoleArn|EcsRamRole|RsaKeyPair|RamRoleArnWithRoleName}` to specify an authentication method.
      --profile,-p              Use `--profile <profileName>` to specify a profile.
      ...
      --help                    Print the help information.
    
    Sample:
      aliyun ecs DescribeRegions
    
    Products:
      actiontrail                  ActionTrail
      adb                          AnalyticDB for MySQL
      adcp                         Distributed Cloud Container Platform for Kubernetes
      ...

    Exemplo em inglês

    shell@Alicloud:~$ aliyun --help
    Alibab Cloud Command Line Interface Version 3.0.276
    
    Usage:
      aliyun <product> <operation> [--parameter1 value1 --parameter2 value2 ...]
      
    Flags:
      --mode                    use `--mode {AK|StsToken|RamRoleArn|EcsRamRole|RsaKeyPair|RamRoleArnWithRoleName}` to assign authenticate mode
      --profile,-p              use `--profile <profileName>` to select profile
      ...
      --help                    print help
      
    Sample:
      aliyun ecs DescribeRegions
    
    Products:
      actiontrail                  ActionTrail
      adb                          AnalyticDB for MySQL
      adcp                         Alibaba Cloud Distributed Cloud Container Platform
      ...

Consultar operações de API disponíveis para um serviço

Adicione a opção --help após o código do serviço para listar as operações de API disponíveis. O sistema exibe as descrições das operações de API no estilo chamada de procedimento remoto (RPC) e os endpoints das operações no estilo arquitetura orientada a recursos (ROA).

Nota

O Alibaba Cloud CLI usa os seguintes indicadores antes da descrição da operação para sinalizar status ou características:

  • [Anonymous]: indica uma operação anônima, acionável sem autenticação. Para chamar esse tipo de operação, consulte Chamadas genéricas.

  • [Deprecated]: sinaliza que a operação está obsoleta. Recomendamos migrar para uma versão mais recente.

RPC

  1. Execute o comando abaixo para consultar as operações de API disponíveis no Elastic Compute Service (ECS):

    aliyun ecs --help
  2. Resposta esperada:

    shell@Alicloud:~$ aliyun ecs --help
    Alibaba Cloud CLI 3.0.276
    
    Usage:
      aliyun ecs <ApiName> --parameter1 value1 --parameter2 value2 ...
    
    Product: Ecs (ECS)
    Version: 2014-05-26 
    
    Available Api List: 
      AcceptInquiredSystemEvent                          Accepts and authorizes operations on system events. For system events in the Inquiring state, this operation accepts the default operations for the system events and authorizes the system to perform the default operations. 
      ActivateRouterInterface                            [Deprecated] Activates inactive router interfaces. 
      AddBandwidthPackageIps                             [Deprecated]
      AddTags                                            Adds or overwrites one or more tags for ECS resources. You can add tags to ECS resources such as instances, disks, snapshots, images, and security groups for easy management. 
      ...

    Exemplo em inglês

    shell@Alicloud:~$ aliyun ecs --help
    Alibaba Cloud Command Line Interface Version 3.0.276
    
    Usage:
      aliyun ecs <ApiName> --parameter1 value1 --parameter2 value2 ...
    
    Product: Ecs (Elastic Compute Service)
    Version: 2014-05-26 
    
    Available Api List: 
      AcceptInquiredSystemEvent                          Accepts the default operation for a system event in the Inquiring state and authorizes the system to perform the default operation.
      ActivateRouterInterface                            [Deprecated]
      AddBandwidthPackageIps                             [Deprecated]
      AddTags                                            Adds tags to Elastic Compute Service (ECS) resources, or overwrites tags of ECS resources. You can add tags to ECS resources such as instances, disks, snapshots, images, and security groups for easy management.
      ...

ROA

  1. Execute o comando a seguir para consultar as operações de API disponíveis no Container Service for Kubernetes (ACK):

    aliyun cs --help
  2. Resposta esperada:

    shell@Alicloud:~$ aliyun cs --help
    Alibaba Cloud CLI 3.0.276
    
    Usage 1:
      aliyun cs [GET|PUT|POST|DELETE] <PathPattern> --body "..." 
    
    Usage 2 (For API with NO PARAMS in PathPattern only.):
      aliyun cs <ApiName> --parameter1 value1 --parameter2 value2 ... --body "..."
    
    Product: CS (ACK)
    Version: 2015-12-15 
    
    Available Api List: 
      AttachInstances                         : POST /clusters/[ClusterId]/attach
      AttachInstancesToNodePool               : POST /clusters/[ClusterId]/nodepools/[NodepoolId]/attach
      CancelClusterUpgrade                    : POST /api/v2/clusters/[ClusterId]/upgrade/cancel
      CancelComponentUpgrade                  : POST /clusters/[clusterId]/components/[componentId]/cancel
      ...

    Exemplo de resposta em inglês:

    shell@Alicloud:~$ aliyun cs --help
    Alibaba Cloud Command Line Interface Version 3.0.276
    
    Usage 1:
      aliyun cs [GET|PUT|POST|DELETE] <PathPattern> --body "..." 
    
    Usage 2 (For API with NO PARAMS in PathPattern only.):
      aliyun cs <ApiName> --parameter1 value1 --parameter2 value2 ... --body "..."
    
    Product: CS (Container Service for Kubernetes)
    Version: 2015-12-15 
    
    Available Api List: 
      AttachInstances                         : POST /clusters/[ClusterId]/attach
      AttachInstancesToNodePool               : POST /clusters/[ClusterId]/nodepools/[NodepoolId]/attach
      CancelClusterUpgrade                    : POST /api/v2/clusters/[ClusterId]/upgrade/cancel
      CancelComponentUpgrade                  : POST /clusters/[clusterId]/components/[componentId]/cancel
      ...

Consultar detalhes dos parâmetros da API

Adicione a opção --help após uma operação de API para consultar detalhes dos parâmetros, como nome e tipo. A saída também exibe o método de solicitação e o endpoint de operações de API no estilo ROA.

RPC

  1. Execute o comando a seguir para consultar os detalhes dos parâmetros da operação DescribeRegions do Elastic Compute Service:

    aliyun ecs DescribeRegions --help
  2. Resposta esperada:

    shell@Alicloud:~$ aliyun ecs DescribeRegions --help
    Alibaba Cloud CLI 3.0.276
    
    Product: Ecs (ECS)
    
    Parameters:
      --AcceptLanguage String  Optional
    
      The natural language that is used to filter responses. For more information, see RFC7231 at https://tools.ietf.org/html/rfc7231. Valid values:   
               
      - zh-CN: Chinese 
      - en-US: English. 
      - ja: Japanses 
      
      Default value: zh-CN. 
    
      --InstanceChargeType String  Optional
    
      The billing method of the instance. For more information, see Billing overview. Valid values: 
      
      - PrePaid: subscription. If you set this parameter to PrePaid, make sure that you have sufficient balance or credits in your account. Otherwise, the InvalidPayMethod error code is returned. 
      - PostPaid: pay-as-you-go. 
      
      Default value: PostPaid. 
    
      --ResourceType String  Optional
    
      The type of the resource. Valid values:
      -  instance: ECS instance
      -  disk: disk
      -  reservedinstance: reserved instance
      -  scu: storage capacity unit (SCU)
      
      Default value: instance

    Exemplo em inglês

    shell@Alicloud:~$ aliyun ecs DescribeRegions --help
    Alibaba Cloud Command Line Interface Version 3.0.276
    
    Product: Ecs (Elastic Compute Service)
    
    Parameters:
      --AcceptLanguage String  Optional
    
      The natural language that is used to filter responses. For more information, visit [RFC 7231](https://tools.ietf.org/html/rfc7231). Valid values:
      
      *   zh-CN: Chinese
      *   en-US: English
      *   ja: Japanese
      
      Default value: zh-CN.
    
      --InstanceChargeType String  Optional
    
      The billing method of the instance. For more information, see [Billing overview](~~25398~~). Valid values:
      
      *   PrePaid: subscription. If this parameter is set to PrePaid, make sure that you have sufficient balance or credits in your account. Otherwise, the InvalidPayMethod error code is returned.
      *   PostPaid: pay-as-you-go.
      
      Default value: PostPaid.
    
      --ResourceType String  Optional
    
      The type of the resource. Valid values:
      
      *   instance: Elastic Compute Service (ECS) instance
      *   disk: disk
      *   reservedinstance: reserved instance
      *   scu: storage capacity unit (SCU)
      
      Default value: instance.

ROA

  1. Execute o comando a seguir para consultar os detalhes dos parâmetros da operação AttachInstances do Container Service for Kubernetes:

    aliyun cs AttachInstances --help
  2. Resposta esperada:

    shell@Alicloud:~$ aliyun cs AttachInstances --help
    Alibaba Cloud CLI 3.0.276
    
    Product:     CS (ACK)
    Method:      POST
    PathPattern: /clusters/[ClusterId]/attach
    
    Parameters:
      --ClusterId String  Required
    
      The ID of the cluster. 
    
      --body Struct  Optional
    
      The request body parameters.

    Exemplo de resposta em inglês:

    shell@Alicloud:~$ aliyun cs AttachInstances --help
    Alibaba Cloud Command Line Interface Version 3.0.276
    
    Product:     CS (Container Service for Kubernetes)
    Method:      POST
    PathPattern: /clusters/[ClusterId]/attach
    
    Parameters:
      --ClusterId String  Required
    
      The cluster ID.
    
      --body Struct  Optional
    
      The request body.