Alibaba Cloud CLI provides command-line options that override default command behaviors or enable specific features.
Syntax
Append options to an API command:
aliyun <Command> <SubCommand> --options [optionParams]
-
Separate options and parameters with spaces. If an option has a
subfield, use thesubfield=valueformat. Parameter formats.
Available options
|
Option |
Description |
|
--profile,-p |
Specifies a configuration profile. The specified profile overrides the default credential and environment variable settings. Example: Call the
|
|
--region |
Use Example: Call the ECS
|
|
--endpoint |
Specifies an endpoint. Find supported endpoints in Developer Reference > API Reference > Endpoints of each service. Example: Call the CloudMonitor
|
|
--endpoint-type |
Specifies the endpoint type. Valid values: vpc (VPC access) and empty (public access, default). Example: Call the
|
|
--version |
Specifies an API version. Must be used with the Example: Call the CloudMonitor
|
|
--header |
Adds a request header. Use this option multiple times to add multiple headers. Example: Add the
|
|
--body |
Adds a string as the request body for ROA API calls. Example: Call the
|
|
--body-file |
Adds a file as the request body for RPC API calls. Takes precedence over Example: Call the
|
|
--read-timeout |
Specifies the I/O timeout in seconds. Overrides the default I/O timeout in credential settings. Example: Set the I/O timeout to 20 seconds.
|
|
--connect-timeout |
Specifies the connection timeout in seconds. Overrides the default connection timeout in credential settings. Example: Set the connection timeout to 20 seconds.
|
|
--retry-count |
Specifies the maximum number of retries. Overrides the default retry count in credential settings. Example: Set the retry count to 5.
|
|
--secure |
Forces HTTPS for the request. Fails if the API operation does not support HTTPS. Note
Alibaba Cloud CLI uses HTTPS by default. |
|
--insecure |
Forces HTTP for the request. Fails if the API operation does not support HTTP. |
|
--quiet,-q |
Suppresses API return results in the output. |
|
--help |
Use |
|
--output,-o |
Extracts fields from the OpenAPI response and displays them in a table. |
|
--pager |
Retrieves all results from a paginated API without manual pagination. |
|
--force |
Forcibly calls API operations and allows parameters not in the metadata list. |
|
--waiter |
Polls API results until a specified field reaches a target value. |
|
--dryrun |
Simulates an API call and returns the result without performing actual operations on cloud resources. |