Adds resources to an application group.

You can add a maximum of 1,000 instances to an application group at a time. You can add a maximum of 3,000 instances of an Alibaba Cloud service to an application group. The total number of instances that you can add to an application group is unlimited.

In this example, an Elastic Compute Service (ECS) instance in the China (Hangzhou) region is added to the 3607**** application group. The instance ID is i-2ze26xj5wwy12**** and the instance name is test-instance-ecs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateMonitorGroupInstances

The operation that you want to perform. Set the value to CreateMonitorGroupInstances.

GroupId String Yes 3607****

The ID of the application group.

Instances.N.InstanceName String Yes test-instance-ecs

The name of the instance.

Instances.N.Category String Yes ecs

The abbreviation of the Alibaba Cloud service name.

To obtain the abbreviation of an Alibaba Cloud service name, call the DescribeProjectMeta operation. The metricCategory tag in the Labels response parameter indicates the abbreviation of the Alibaba Cloud service name.

Instances.N.InstanceId String Yes i-2ze26xj5wwy12****

The ID of the instance.

Instances.N.RegionId String Yes cn-hangzhou

The region ID of the instance.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
Message String The Request is not authorization.

The error message.

RequestId String 1BC69FEB-56CD-4555-A0E2-02536A24A946

The ID of the request.

Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateMonitorGroupInstances
&GroupId=3607****
&Instances.1.Category=ecs
&Instances.1.InstanceId=i-2ze26xj5wwy12****
&Instances.1.InstanceName=test-instance-ecs
&Instances.1.RegionId= cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateMonitorGroupInstancesResponse>
    <RequestId>1BC69FEB-56CD-4555-A0E2-02536A24A946</RequestId>
    <Success>true</Success>
    <Code>200</Code>
</CreateMonitorGroupInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "1BC69FEB-56CD-4555-A0E2-02536A24A946",
  "Success" : true,
  "Code" : 200
}

Error codes

For a list of error codes, see Service error codes.