GetResourceGroupMachineGroup

Updated at:

Retrieves the details of a machine 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:GetResourceGroupMachineGroup

get

*MachineGroup

acs:pai:{#regionId}:{#accountId}:resourcegroup/{#ResourceGroupId}/machinegroup/{#MachineGroupId}

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

MachineGroupID

string

Yes

The ID of the machine group.

mgmioirqjgw6c5lg

ResourceGroupID

string

Yes

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

rgf0zhfqn1d4ity2

Request parameters

Parameter

Type

Required

Description

Example

Tag

array<object>

No

The list of tags to add. You can specify up to 20 tags.

object

No

Key

string

No

The key of the tag. Valid values of N: 1 to 20.

TestKey

Value

string

No

The value of the tag. Valid values of N: 1 to 20.

TestValue

Response elements

Element

Type

Description

Example

object

Schema of Response

MachineGroupID

string

The ID of the machine group.

mgmioirqjgw6c5lg

ResourceGroupID

string

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

rgf0zhfqn1d4ity2

Status

string

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

PaymentType

string

The billing method.

PREPAY

PaymentDurationUnit

string

The billing duration unit of the machine group.

Month

PaymentDuration

string

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

The ECS instance type.

ecs.c6.large

EcsCount

integer

The number of ECS instances.

1

GmtCreatedTime

string

The time when the machine group was created.

2023-06-22T00:00:00Z

GmtModifiedTime

string

The time when the machine group was updated.

2023-06-22T00:00:00Z

GmtStartedTime

string

The time when the machine group was started.

2023-06-22T00:00:00Z

GmtExpiredTime

string

The expiration time of the machine group.

2023-06-22T00:00:00Z

RequestId

string

The ID of the request.

18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E

Cpu

string

The total number of CPU cores on each machine in the machine group.

2

Gpu

string

The number of GPU cores on each machine in the machine group.

8

GpuType

string

The GPU type of each machine in the machine group.

A100

Memory

string

The memory size of each machine in the machine group.

64

SupportedDrivers

array

The GPU driver versions supported by nodes in the machine group.

string

535,550

535,550

DefaultDriver

string

The default GPU driver version of each machine in the machine group.

535

Name

string

The name of the machine group.

testMachineGroup

Tags

array<object>

The list of tags to query. The value is a JSON string that contains up to 20 tags.

object

The label array. The number of array element N ranges from 1 to 20.

TagKey

string

The key of the tag. Valid values of N: 1 to 20.

TestKey

TagValue

string

The value of the tag. Valid values of N: 1 to 20.

TestValue

AllocatableCpu

string

The number of allocatable CPU cores on each machine in the machine group.

2

AllocatableMemory

string

The allocatable memory size on each machine in the machine group.

55

SystemReservedCpu

string

The number of system-reserved CPU cores on each machine in the machine group.

0

SystemReservedMemory

string

The size of system-reserved memory on each machine in the machine group.

9

Examples

Success response

JSON format

{
  "MachineGroupID": "mgmioirqjgw6c5lg",
  "ResourceGroupID": "rgf0zhfqn1d4ity2",
  "Status": "Ready",
  "PaymentType": "PREPAY",
  "PaymentDurationUnit": "Month",
  "PaymentDuration": "1",
  "EcsSpec": "ecs.c6.large",
  "EcsCount": 1,
  "GmtCreatedTime": "2023-06-22T00:00:00Z",
  "GmtModifiedTime": "2023-06-22T00:00:00Z",
  "GmtStartedTime": "2023-06-22T00:00:00Z",
  "GmtExpiredTime": "2023-06-22T00:00:00Z\n",
  "RequestId": "18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E",
  "Cpu": "2",
  "Gpu": "8",
  "GpuType": "A100",
  "Memory": "64",
  "SupportedDrivers": [
    "535,550"
  ],
  "DefaultDriver": "535",
  "Name": "testMachineGroup",
  "Tags": [
    {
      "TagKey": "TestKey",
      "TagValue": "TestValue"
    }
  ],
  "AllocatableCpu": "2",
  "AllocatableMemory": "55",
  "SystemReservedCpu": "0",
  "SystemReservedMemory": "9"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.