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
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

Creating a Host Group

Updated on 2024-04-12 GMT+08:00

Function

Create a host group.

URI

POST /v3/{project_id}/lts/host-group

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining the Account Tenant ID, Log Group ID, and Log Stream ID.

Default: None

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

Default: None

Minimum: 1000

Maximum: 2000

Content-Type

Yes

String

Set this parameter to application/json;charset=UTF-8.

Default: None

Minimum: 30

Maximum: 30

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

host_group_name

Yes

String

Host group name.

Minimum: 1

Maximum: 64

host_group_type

Yes

String

Host type. The value can be linux.

Enumeration values:

  • linux

host_id_list

No

Array of strings

List of host group IDs. The host type must be the same as the host group type.

Minimum: 36

Maximum: 36

Array Length: 1 - 1000

host_group_tag

No

Array of HostGroupTag objects

Tag information. You can add up to 20 tags. The tag key must be unique.

Array Length: 1 - 10

agent_access_type

No

String

Host group type.

Enumeration values:

  • LABEL

  • IP

labels

No

Array of strings

Tags.

Table 4 HostGroupTag

Parameter

Mandatory

Type

Description

key

No

String

Tag key.

Minimum: 1

Maximum: 36

value

No

String

Tag value.

Minimum: 1

Maximum: 36

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

host_group_id

String

Host group ID.

Minimum: 36

Maximum: 36

host_group_name

String

Host group name.

Minimum: 1

Maximum: 64

host_group_type

String

Host type. The value can be linux.

Enumeration values:

  • linux

host_id_list

Array of strings

Host ID list.

Minimum: 36

Maximum: 36

Array Length: 0 - 1000

host_group_tag

Array of HostGroupTag objects

Tags.

Array Length: 0 - 1000

create_time

Long

Creation time.

Minimum: 0

Maximum: 9999999999999

update_time

Long

Update time.

Minimum: 0

Maximum: 9999999999999

agent_access_type

String

Host group type.

Enumeration values:

  • LABEL

  • IP

labels

Array of strings

Tag.

Table 6 HostGroupTag

Parameter

Type

Description

key

String

Tag key.

Minimum: 1

Maximum: 36

value

String

Tag value.

Minimum: 1

Maximum: 36

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Create a host group.

POST https://{endpoint}/v3/{project_id}/lts/host-group

/v3/{project_id}/lts/host-group 
{
    "host_group_name" : "APIxx3",
    "host_group_type" : "linxx",
    "host_id_list" : ["dc1dab7e-b045-4e77xxd1bf7", "713a9fxx2df-24c4ca599def"]
}

Example Responses

Status code: 200

The host group is created.

{
  "agent_access_type" : "IP",
  "create_time" : 1684982746202,
  "host_group_id" : "xxxxx-abb8-4ec7-914c-25ce9ea10835",
  "host_group_name" : "lmy-test-0522-8",
  "host_group_tag" : [ ],
  "host_group_type" : "linux",
  "host_id_list" : [ "xxxx-e8ad-430c-ac12-46bac5e39fe6", "xxxxx-7179-463b-90b1-0c3261aedceb" ],
  "labels" : [ ],
  "update_time" : 1684982746202
}

Status code: 400

Invalid request. Modify the request based on the description in error_msg before a retry.

{
  "error_code" : "LTS.1807",
  "error_msg" : "Invalid host group id"
}

Status code: 500

The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.0010",
  "error_msg" : "The system encountered an internal error"
}

Status Codes

Status Code

Description

200

The host group is created.

400

Invalid request. Modify the request based on the description in error_msg before a retry.

500

The server has received the request but encountered an internal error.

Error Codes

See Error Codes.

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