View the information of a machine group.

Request syntax

GET /machinegroups/{groupName} HTTP/1.1
Authorization: <AuthorizationString> 
Date: <GMT Date>
Host: <Project Endpoint>
x-log-apiversion: 0.6.0
x-log-signaturemethod: hmac-sha1

Request elements

  • Request headers

    The CreateMachineGroup API operation does not have operation-specific request headers. For information about the common request headers of Log Service API operations, see Common request headers.

  • Parameters
    Parameter Type Required Example Description
    groupName string Yes test-machine-group The name of the machine group.

Response parameters

  • Response headers

    The CreateMachineGroup API operation does not have operation-specific response headers. For information about common response headers of Log Service API operations, see Common response headers.

  • Response parameters
    The HTTP status code 200 indicates that the request is successful. The response body contains the information of the specified machine group. The following table lists the parameters in the response body.
    Parameter Type Example Description
    groupName string test-machine-group The name of the machine group. The name must be unique in a project.
    groupType string N/A The type of the machine group. Valid values: null and Armory. Default value: null.
    machineIdentifyType string ip The type of the machine group identifier. Valid values: ip and userdefined.
    groupAttribute json object N/A The attribute of the machine group. Default value: null.
    machineList json array 127.0.0.1,127.0.0.2 The list of machine identifiers, which can be IP addresses or userdefined identifiers.
    createTime int 1447178253 The time when the machine group was created.
    lastModifyTime int 1447178253 The time when the machine group was last updated.
    The groupAttribute parameter consists of the following parameters.
    Parameter Type Example Description
    groupTopic string testtopic The topic of the machine group.
    externalName string testgroup The identifier of the external management system (Armory) on which the machine group depends.

Examples

  • Sample requests
    GET /machinegroups/test-machine-group HTTP/1.1
    Header :
    {
        "x-log-apiversion": "0.6.0",
        "Authorization": "LOG <yourAccessKeyId>:<yourSignature>",
        "Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com",
        "Date": "Tue, 10 Nov 2015 18:15:24 GMT",
        "Content-Length": "0",
        "x-log-signaturemethod": "hmac-sha1",
        "User-Agent": "sls-java-sdk-v-0.6.0",
        "Content-Type": "application/x-protobuf",
        "x-log-bodyrawsize": "0"
    }
  • Sample success responses
    HTTP/1.1 200 OK
    Header :
    {
        "Date": "Tue, 10 Nov 2015 18:15:23 GMT",
        "Content-Length": "239",
        "x-log-requestid": "5642343B99248CB36D0060B8",
        "Connection": "close",
        "Content-Type": "application/json",
        "Server": "nginx/1.6.1"
    }
    Body :
    {
        "groupName": "test-machine-group",
        "groupType": "",
        "groupAttribute":     {
            "externalName": "testgroup",
            "groupTopic": "testtopic"
        },
        "machineIdentifyType": "ip",
        "machineList":     [
            "127.0.0.1",
            "127.0.0.2"
        ],
        "createTime": 1447178253,
        "lastModifyTime": 1447178253
    }

Error codes

HTTP status code Error code Error message Description
404 MachineGroupNotExist group {GroupName} does not exist The error message returned because the specified machine group does not exist.
500 InternalServerError internal server error The error message returned because an internal server error has occurred.

For more information about the error codes, see Common error codes.