Skip to content

Latest commit

 

History

History
218 lines (175 loc) · 3.23 KB

group.md

File metadata and controls

218 lines (175 loc) · 3.23 KB

Group plugin API

API

Method Group.CommitGroup

Submits the configuration for a group. The Group plugin is responsible for making any changes necessary to effect the configuration.

Request

{
  "Spec": {
    "ID": "group_id",
    "Properties": {}
  },
  "Pretend": true
}

Parameters:

  • Spec: A Group Spec
  • Pretend: Whether to actually perform the change. If false, the request will have no side-effects.

Response

{
  "Details": "human readable text"
}

Fields:

  • Details: A human-readable description of the commit action, or proposed action if Pretend was true.

Method Group.FreeGroup

Removes a Group from active management. This operation is non-destructive - it will not destroy or modify any resources associated with the Group. However, the Plugin will no longer attempt to maintain the state of the Group.

Request

{
  "ID": "group_id"
}

Parameters:

Response

{
  "OK": true
}

Fields:

  • OK: Whether the operation succeeded.

Method Group.DescribeGroup

Fetches details about the current status of a Group.

Request

{
  "ID": "group_Id"
}

Parameters:

Response

{
  "Description": {
    "Instances": [
      {
        "ID": "instance_id",
        "LogicalID": "logical_id",
        "Tags": {
          "tag_key": "tag_value"
        }
      }
    ],
    "Converged": true
  }
}

Fields:

Method Group.DestroyGroup

Request

{
  "ID": "group_Id"
}

Parameters:

Response

{
  "OK": true
}

Fields:

  • OK: Whether the operation succeeded.

Method Group.InspectGroups

Fetches details about the state associated with a Group.

Request

{}

Parameters: None

Response

{
  "Groups": [
    {
      "ID": "group_id",
      "Properties": {}
    }
  ]
}

Fields:

Method Group.DestroyInstances

Destroy instances identified from the given group. Returns error if any of the given are not found in the group or if the destroy fails.

Request

{
  "ID" : "group_id",
  "Instances" : [
     "instance-id1",
     "instance-id2",
     "instance-id3"
  ]
}

Parameters: None

Fields:

  • ID: The group id.
  • Instances : An array of Instance IDs

Response

{
  "ID": "group_id"
}

Method Group.Size

Returns the desired / target size of the group. This may not match the size of the list from DescribeGroup()

Request

{
  "ID" : "group_id"
}

Parameters: None

Fields:

  • ID: The group id.

Response

{
  "ID": "group_id"
  "Size": 100
}

Method Group.SetSize

Sets the desired / target size of the group. This is the same as editing the config and call commit.

Request

{
  "ID" : "group_id",
  "Size" : 100
}

Parameters: None

Fields:

  • ID: The group id.
  • Size: The group target size.

Response

{
  "ID" : "group_id"
}