GetResourceGroup

更新时间:
复制 MD 格式

GetResourceGroup retrieves details for a 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:GetResourceGroup

get

*ResourceGroup

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

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

ResourceGroupID

string

Yes

The globally unique ID of the resource group.

rgmhpp8ib5lprq9k

Request parameters

Parameter

Type

Required

Description

Example

IsAIWorkspaceDataEnabled

boolean

No

Optional. Defaults to true.

true

Tag

array<object>

No

A list of up to 20 tags to add to the instance.

object

No

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

Response elements

Element

Type

Description

Example

object

The response body.

GmtCreatedTime

string

The time when the resource group was created.

2023-06-22T00:00:00Z

GmtModifiedTime

string

The time when the resource group was last modified.

2023-06-22T00:00:00Z

RequestId

string

The request ID.

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

Name

string

The name of the resource group.

TestResourceGroup

CreatorID

string

The ID of the user who created the resource group.

1612285282502324

WorkspaceID

string

The workspace ID.

35201

Status

string

The status of the resource group.

Ready

UserVpc UserVpc

The details of the VPC connected to the resource group.

ComputingResourceProvider

string

The provider of computing resources for the resource group.

Valid values:

  • Ecs :

    ECS

  • Lingjun :

    Lingjun

ECS

ClusterID

string

The ID of the cluster to which the resource group belongs.

cb2c7bde30b774e46a329c

SupportRDMA

boolean

Indicates whether the resource group supports RDMA.

true

ResourceType

string

The type of computing resource for the resource group.

Ecs

Description

string

The description of the resource group.

testDescription

Tags

array<object>

A list of tags.

object

TagKey

string

The tag key.

testKey

TagValue

string

The tag value.

testValue

Version

string

Examples

Success response

JSON format

{
  "GmtCreatedTime": "2023-06-22T00:00:00Z\n",
  "GmtModifiedTime": "2023-06-22T00:00:00Z\n",
  "RequestId": "18D5A1C6-14B8-545E-8408-0A7DDB4C6B5E\n",
  "Name": "TestResourceGroup",
  "CreatorID": "1612285282502324",
  "WorkspaceID": "35201",
  "Status": "Ready",
  "UserVpc": {
    "VpcId": "vpc-abcdef****",
    "SwitchId": "vs-abcdef****",
    "SecurityGroupId": "sg-abcdef****",
    "ExtendedCIDRs": [
      "\"192.168.0.1/24\""
    ],
    "RoleArn": "acs:ram::25xxxx:role/AliyunPAIDLCDefaultRole",
    "DefaultRoute": "eth0",
    "DefaultForwardInfo": {
      "NatGatewayId": "nat-7j4mka9wguxj",
      "EipAllocationId": "eip-h29r78ieufbih"
    }
  },
  "ComputingResourceProvider": "ECS",
  "ClusterID": "cb2c7bde30b774e46a329c",
  "SupportRDMA": true,
  "ResourceType": "Ecs",
  "Description": "testDescription",
  "Tags": [
    {
      "TagKey": "testKey",
      "TagValue": "testValue"
    }
  ],
  "Version": ""
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.