ListResourceGroupMachineGroups

Updated at:

Queries the machine groups in a specified resource group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

pai:ListResourceGroupMachineGroups

list

*All Resource

*

None None

Request syntax

GET /api/v1/resources/{ResourceGroupID}/machinegroups HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ResourceGroupID

string

No

The ID of the resource group. Each resource group has a globally unique ID. You can use the resource group ID to retrieve resource group information.

rgf0zhfqn1d4ity2

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the machine group.

test

CreatorID

string

No

The user ID of the machine group creator.

1612285282502326

PaymentType

string

No

The billing method.

PREPAY

PaymentDurationUnit

string

No

The billing duration unit of the machine group.

Month

PaymentDuration

string

No

The billing duration. If PaymentDurationUnit is set to Month, valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

1

EcsSpec

string

No

The ECS instance type.

ecs.c6.large

PageNumber

integer

No

The page number.

2

PageSize

integer

No

The number of entries per page.

10

Order

string

No

The sort order. Valid values:

  • Asc: Ascending order.

  • Desc: Descending order.

DESC

SortBy

string

No

The sort field.

GmtCreatedTime

Status

string

No

The instance status. Valid values:

  • Creating: The instance is being created.

  • Ready: The instance is running.

  • Expiring: The instance is about to expire.

  • Expired: The instance has expired.

  • Stopping: The instance is being stopped.

  • Stopped: The instance is stopped.

Ready

OrderInstanceId

string

No

The purchased instance ID.

236553689400333

MachineGroupIDs

string

No

The IDs of the machine groups. Separate multiple IDs with commas.

mg105ecqwfe49hwb

DiskPL

string

No

The cloud disk performance level for filtering.

PL2

Response elements

Element

Type

Description

Example

object

Schema of Response

MachineGroups

array

The list of machine groups.

MachineGroup

The machine group.

TotalCount

string

The total number of machine groups.

4

RequestId

string

The request ID.

E7C42CC7-2E85-508A-84F4-923B605FD10F

Examples

Success response

JSON format

{
  "MachineGroups": [
    {
      "Status": "Success",
      "EcsCount": 1,
      "GmtStartedTime": "2023-06-22T00:00:00Z",
      "ResourceGroupID": "rgf0zhfqn1d4ity2",
      "GmtCreatedTime": "2023-06-22T00:00:00Z",
      "CreatorID": "1612285282502324",
      "ReasonMessage": "“”",
      "PaymentDurationUnit": "Monthly",
      "EcsSpec": "ecs.c6.large",
      "SupportedDrivers": [
        "470.199.02"
      ],
      "PaymentDuration": "2",
      "ReasonCode": "“”",
      "GmtModifiedTime": "2023-06-22T00:00:00Z",
      "DiskCapacity": 0,
      "GmtExpiredTime": "2023-08-22T00:00:00Z\n",
      "OrderInstanceId": "“”",
      "DefaultDriver": "470.199.02",
      "MachineGroupID": "mg1",
      "PaymentType": "PREPAY",
      "DiskPL": "",
      "Cpu": 0,
      "Gpu": 0,
      "GpuMemory": 0,
      "GpuType": "",
      "Memory": 0,
      "ResourceType": "",
      "AllocatableCpu": 0,
      "AllocatableMemory": 0,
      "SystemReservedCpu": 0,
      "SystemReservedMemory": 0
    }
  ],
  "TotalCount": "4",
  "RequestId": "E7C42CC7-2E85-508A-84F4-923B605FD10F"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.