GetResourceGroupMachineGroup

Updated at:

Call GetResourceGroupMachineGroup to retrieve 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 globally unique ID of the resource group. You can use this ID to retrieve details about the group.

rgf0zhfqn1d4ity2

Request parameters

Parameter

Type

Required

Description

Example

Tag

array<object>

No

A list of up to 20 tags.

object

No

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

Response elements

Element

Type

Description

Example

object

Response schema

MachineGroupID

string

The ID of the machine group.

mgmioirqjgw6c5lg

ResourceGroupID

string

The ID of the resource group. This ID is globally unique and can be used to retrieve information about the resource group.

rgf0zhfqn1d4ity2

Status

string

The status of the machine group. Valid values: Creating: The machine group is being created. Ready: The machine group is running. Expiring: The machine group is about to expire. Expired: The machine group has expired. Stopping: The machine group is being stopped. Stopped: The machine group has been stopped.

Ready

PaymentType

string

The payment type.

PREPAY

PaymentDurationUnit

string

The unit of the billing cycle for the machine group.

Month

PaymentDuration

string

The payment duration. When 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 spec.

ecs.c6.large

EcsCount

integer

The number of ECS instances.

1

GmtCreatedTime

string

The creation time of the machine group.

2023-06-22T00:00:00Z

GmtModifiedTime

string

The last modification time of the machine group.

2023-06-22T00:00:00Z

GmtStartedTime

string

The start time of the machine group.

2023-06-22T00:00:00Z

GmtExpiredTime

string

The expiration time of the machine group.

2023-06-22T00:00:00Z

RequestId

string

The request ID.

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

Cpu

string

The total number of CPU cores per machine in the machine group.

2

Gpu

string

The number of GPUs per machine in the machine group.

8

GpuType

string

The GPU type per machine in the machine group.

A100

Memory

string

The amount of memory per machine in the machine group.

64

SupportedDrivers

array

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

string

A supported GPU driver version.

535,550

DefaultDriver

string

The default GPU driver version per machine in the machine group.

535

Name

string

The name of the machine group.

testMachineGroup

Tags

array<object>

The list of tags attached to the machine group.

object

A tag object.

TagKey

string

The tag key.

TestKey

TagValue

string

The tag value.

TestValue

AllocatableCpu

string

AllocatableMemory

string

SystemReservedCpu

string

SystemReservedMemory

string

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": "",
  "AllocatableMemory": "",
  "SystemReservedCpu": "",
  "SystemReservedMemory": ""
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.