Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Setting System Parameters in a Profile

Updated on 2024-08-20 GMT+08:00

The following are examples of setting system parameters in a profile.

  • Adding a profile

    When adding a profile, use --cli-profile to declare the profile name. For example:

    • Add a profile with AK/SK authentication mode. Authentication parameters: permanent AK (cli-access-key) and SK (cli-secret-key).
      hcloud configure set --cli-profile=testAKSK --cli-mode=AKSK --cli-region=ap-southeast-1 --cli-access-key=******** --cli-secret-key=******** --cli-project-id=068119468****************af89d2e --cli-domain-id=094518e46****************cfbc4c0 --cli-read-timeout=10 --cli-connect-timeout=5
    • Add a profile with AK/SK authentication mode. Authentication parameters: temporary AK (cli-access-key), SK (cli-secret-key), and SecurityToken (cli-security-token).
      hcloud configure set --cli-profile=testAKSKST --cli-mode=AKSK --cli-region=ap-southeast-1 --cli-access-key=******** --cli-secret-key=******** --cli-security-token=******** --cli-project-id=068119468****************af89d2e --cli-domain-id=094518e46****************cfbc4c0 --cli-read-timeout=10 --cli-connect-timeout=5

      For a profile with AK/SK authentication mode, if the cli-security-token parameter is configured in the profile, cli-access-key and cli-secret-key are temporary AK/SK. Otherwise, they are permanent AK/SK.

    • Add a profile with ecsAgency authentication mode. No authentication parameters are required.
      hcloud configure set --cli-profile=testEcsAgency --cli-mode=ecsAgency --cli-region=ap-southeast-1 --cli-read-timeout=10 --cli-connect-timeout=5

      When you use KooCLI to call cloud service APIs on an ECS, the CLI automatically obtains temporary authentication information based on the ECS agency.

    • Add a profile with SSO authentication mode. Authentication parameters: user portal URL (cli-sso-start-url), region of an IAM Identity Center instance (cli-sso-region), account name (cli-sso-account-name), and permission set name (cli-sso-permission-set-name). cli-sso-account-name and cli-sso-permission-set-name are optional.
      1. Create a profile that uses SSO authentication.
        hcloud configure set --cli-profile=testSSO --cli-mode=SSO --cli-region=ap-southeast-1 --cli-sso-start-url=https://idcenter.huaweicloud.com/d-3********6/portal --cli-sso-region=ap-southeast-1 --cli-sso-account-name=ACCOUNT_01 --cli-sso-permission-set-name=PERMISSION_01
      2. Log in with SSO. You will be prompted to enter an account name and permission set name if cli-sso-account-name and cli-sso-permission-set-name are not set in step 1.
        hcloud configure sso --cli-profile=testSSO
  • Changing the default profile
    If you have configured multiple profiles, you can run the following command to change the default profile:
    hcloud configure set --cli-profile=test
  • Changing the language
    This change will take effect for all profiles. Run the following command to change the language:
    hcloud configure set --cli-lang=cn
  • Switching between online and offline modes

    This change will take effect for all profiles. Run the following command to switch to the online mode:

    hcloud configure set --cli-offline=false
  • Configuring whether to display warnings

    This change will take effect for all profiles. Disabling warnings can avoid interfering with result resolution during command execution with automation scripts. To disable warnings, run the following command:

    hcloud configure set --cli-warning=false
  • Agreeing to the privacy statement

    This change will take effect for all profiles. When using KooCLI for the first time, you will be prompted to read and agree to the privacy statement. In some special scenarios such as command execution with automation scripts, run the following command to agree to the privacy statement:

    hcloud configure set --cli-agree-privacy-statement=true
  • Configuring whether to encrypt authentication information in the configuration file before storage

    This change will take effect for all profiles. Run the following command to skip encrypting authentication information in the configuration file before storage:

    hcloud configure set --cli-auth-encrypt=false
  • Changing the authentication mode of a profile
    A profile can contain parameters of multiple authentication modes. Run the following command to specify which authentication mode in a profile is to be used:
    hcloud configure set --cli-profile=test --cli-mode=AKSK
  • Changing the region of a profile
    hcloud configure set --cli-profile=test --cli-region=ap-southeast-1
  • Modifying the AK/SK of a profile

    AK and SK must be modified at the same time.

    hcloud configure set --cli-profile=test --cli-access-key=******** --cli-secret-key=********
  • Changing the project ID of a profile

    A project ID must be specified when you call the APIs of certain cloud services. To call these APIs, obtain project IDs and add those you will often use to a profile.

    hcloud configure set --cli-profile=test --cli-project-id=068119468****************af89d2e
  • Modifying the request connection timeout of a profile
    hcloud configure set --cli-profile=test --cli-connect-timeout=5
  • Modifying the I/O timeout of a profile
    hcloud configure set --cli-profile=test --cli-read-timeout=10
  • Modifying the maximum number of connection attempts of a profile
    hcloud configure set --cli-profile=test --cli-retry-count=3
    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.

  • Changing the configuration of skipping HTTPS certificate verification in a profile
    hcloud configure set --cli-profile=test --cli-skip-secure-verify=true
NOTE:

You can modify multiple parameters of a profile at a time. For example, to modify cli-project-id and cli-region, run the following command:

hcloud configure set --cli-profile=test --cli-project-id=0681194*******************f89d2e --cli-region=ap-southeast-1

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback