Specifying Retry Count
The cli-retry-count option specifies the number of connection attempts. The system retries automatically if a request times out due to a network connection problem. The value range of --cli-retry-count is 0 to 5, and the default value is 0.
- If a request fails due to abnormal network connection, the following information is displayed on Cloud CLI:cloud RDS ListInstances --cli-region="ru-moscow-1" --Content-Type="application/json" --project_id="2cc60****************caefa5019ef" --cli-retry-count=3[NETWORK_ERROR] Connection timed out 4 consecutive times (reconnection attempts: 3). Check network connectivity.
- If the network connection is normal, the following information is displayed:cloud RDS ListInstances --cli-region="ru-moscow-1" --Content-Type="application/json" --project_id="2cc60****************caefa5019ef" --cli-retry-count=3{"instances": [],"total_count": 0}Caution
Setting the retry count with --cli-retry-count may cause idempotence and cyclic API calls. Exercise caution when using this option for resource creation APIs.
Parent topic: Options