This topic describes the command-line options provided by Alibaba Cloud CLI. You can use the command-line options to change the default behaviors of commands or implement specific features of commands.
Syntax
You can append the options parameter to an API command in the following syntax:
aliyun <Command> <SubCommand> --options [optionParams]Use space characters to separate an option and its parameters. If an option has a
subfield, specify the field and its value in the format ofsubfield=value. For more information, see Parameter formats.
Available options
Option | Description |
--profile,-p | You can use the --profile or -p option to specify a configuration profile. After you specify a valid configuration profile, Alibaba Cloud CLI ignores the default identity credential and environment variable configurations and uses the configurations that you specify to run commands. Example: Call the |
--region | You can use the Example: Call the |
--endpoint | You can use the --endpoint option to specify an endpoint. For information about the endpoints supported by an Alibaba Cloud service, see the Endpoints topic in the Developer Reference > API Reference section in the documentation of the service. Example: Call the |
--version | You can use the --version option to specify an API version. This option must be used together with the Example: Call the |
--header | You can use the --header option to add a request header. You can repeatedly use the option to add multiple request headers. Example: Add the |
--body | You can use the --body option to add a string as the request body when you call a resource-oriented architecture (ROA) API operation. Example: Call the |
--body-file | You can use the --body-file option to add a file as the request body when you call a remote procedure call (RPC) API operation. This option takes precedence over the Example: Call the |
--read-timeout | You can use the --read-timeout option to specify the I/O timeout period in seconds. After you specify a valid I/O timeout period, Alibaba Cloud CLI ignores the I/O timeout period in the default identity credential configurations and uses the I/O timeout period that you specify to run commands. Example: Specify the I/O timeout period as 20 seconds. |
--connect-timeout | You can use the --connect-timeout option to specify the connection timeout period in seconds. After you specify a valid connection timeout period, Alibaba Cloud CLI ignores the connection timeout period in the default identity credential configurations and uses the connection timeout period that you specify to run commands. Example: Specify the connection timeout period as 20 seconds. |
--retry-count | You can use the --retry-count option to specify the allowed number of retries. After you specify a valid number, Alibaba Cloud CLI ignores the relevant retry configuration in the default identity credential configurations and uses the number of retries that you specify to run commands. Example: Specify the allowed number of retries as 5. |
--secure | You can use the --secure option to enable the HTTPS mode. However, if the API operation does not support HTTPS, the request fails. Note By default, Alibaba Cloud CLI calls API operations over HTTPS. |
--insecure | You can use the --insecure option to enable the HTTP mode. However, if the API operation does not support HTTP, the request fails. |
--quiet,-q | You can use the --quiet option to disable the output of return results. |
--help | You can use the For more information, see Use the help command. |
--output,-o | You can use the --output option to specify the fields to return in the form of a table. For more information, see Extract parameters and tabulate output. |
--pager | You can use the --pager option to specify to return aggregated results of a paging API operation. For more information, see Aggregate the results of paging operations. |
--force | You can use the --force option to specify to forcibly call API operations and use parameters that are not in the metadata list. For more information, see Forcibly call an API operation. |
--waiter | You can use the --waiter option to specify to poll return results and return data when a field changes to a specific value. For more information, see Poll the return results. |
--dryrun | You can use the --dryrun option to specify to simulate a call to the server and return the simulation results without performing actual operations on cloud resources. For more information, see Simulate a call. |