- Function Overview
- What's New
- Service Overview
- Getting Started
-
User Guide
- Configuration Management
- HTTP Proxy
- Commonly Used Commands
-
Options
- Option Overview
- Printing Help Information
- Printing Debugging Information
- Generating API Input Parameter Skeleton in JSON Format
- Checking Command
- Specifying Region
- Calling APIs with AK/SK in Non-configuration Mode
- Specifying Account ID
- Specifying Profile
- Specifying Authentication Mode
- Specifying Output Format
- Passing API Parameters with JSON File
- Specifying Request Timeouts
- Specifying Retry Count
- Skipping HTTPS Request Certificate Verification
- Specifying a Domain Name
- Polling Results
- Obtaining CLI Examples on API Explorer
- Using KooCLI in Non-configuration Mode
- Online Experience
- Obtaining Authentication Information
-
FAQs
- Overview
- Authentication
- Profiles
- Metadata Cache
- Logs
- Network Connections
- Cloud Services
- Cloud Service APIs
- Regions
-
Parameters
- What Are KooCLI System Parameters?
- Why Am I Seeing a Message Indicating an Invalid Parameter?
- Why Are Old and New KooCLI System Parameters (Such as region and cli-region) Available? Which Parameters Are Recommended?
- Why Am I Seeing a Message Indicating a Duplicate Parameter?
- How Do I Use cli-jsonInput?
- When Can I Use cli-jsonInput?
- Why Am I Seeing a Message Indicating an Unsupported Parameter Position or Type?
- How Do I Leave a Body Parameter Empty for Cloud Service APIs?
- Interactive Mode and Autocomplete
-
Output Formats
- What Output Formats Are Supported by KooCLI?
- How Do I Define a JMESPath Expression?
- Which KooCLI System Parameters Are Related to Data Output? Which Ones Are Recommended?
- How Do I Use cli-output, cli-query, and cli-output-num?
- How Do I Use cli-output-rows, cli-output-cols, and cli-output-num? What Are the Precautions?
- How Do I Use cli-json-filter? What Are the Precautions?
- Other
- Videos
- General Reference
Show all
Copied.
Logging In via SSO
The SSO login command of KooCLI stores users' authentication information in the configuration file, eliminating the need for frequently entering the information during operations. Run the following command to implement SSO login:
hcloud configure sso
After pressing Enter, enter an SSO profile name (name of the profile to save after SSO login, required), SSO start URL (portal URL, required), SSO region (region where the IAM Identity Center instance is enabled, required), and Region (default or common cloud service region, optional) as prompted.
hcloud configure sso ? Input SSO profile name [required]: sso ? Input SSO start URL [required]: https://idcenter.huaweicloud.com/d-3********6/portal ? Input SSO region [required]: ap-southeast-1 ? Input Region: ap-southeast-1 Browser opened. Log in via SSO... ? Choose account name: ACCOUNT_01 ? Choose permission set name: PERMISSION_01 SSO login successful.
- The SSO login page cannot be automatically displayed in environments without a browser, such as Linux. In this case, open the printed URL with a browser in another environment.
- After web page login, use the up and down arrow buttons to select an account name and permission set name, or enter a keyword, and press Enter.
- After SSO login, you can only call APIs of the specified services.
After the login is complete, run the following command to view the saved authentication information and its expiration time:
hcloud configure show --cli-profile=${profileName}
hcloud configure show --cli-profile=sso { "name": "sso", "mode": "SSO", "accessKeyId": "", "secretAccessKey": "", "securityToken": "", "region": "ap-southeast-1", "projectId": "", "domainId": "", "skipSecureVerify": "false", "readTimeout": 10, "connectTimeout": 5, "retryCount": 0, "ssoParam": { "startUrl": "https://idcenter.huaweicloud.com/d-3********6/portal", "ssoRegion": "ap-southeast-1" }, "ssoAuth": { "accessTokenResult": { "accessToken": "****", "expiresAt": "2024-05-08 00:52:50" }, "accountId": "0cb8************************c3a0", "agencyUrn": "iam::0cb8************************c3a0:agency:Sys**********_*******_dc************e8" } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot