You need to enable JavaScript to run this app.
E-MapReduce

E-MapReduce

Copy page
Download PDF
Node group management
CreateNodeGroup - Create a node group
Copy page
Download PDF
CreateNodeGroup - Create a node group

Create a node group

Usage notes

Call CreateNodeGroup to create a node group for an E-MapReduce (EMR) cluster.

Important notes

You must have a Volcano Engine account and have enabled EMR permissions.

Request notes

Request method: POST
Request URL: https://emr.cn-beijing.volcengineapi.com/?Version=2023-08-15&Action=CreateNodeGroup

Debug

Request parameters

The table below lists only the request parameters specific to this API and some common parameters. For more information, see common parameters.

const columns = [ 
  { 
    width: '20%', 
title: 'Parameter', 
    dataIndex: 'Name', 
    className: 'openapi-doc-parameter-table-name' 
  }, 
  { 
    width: 130, 
title: 'Type', 
    dataIndex: 'DataType', 
    className: 'openapi-doc-parameter-table-type' 
  }, 
  { 
    width: 90, 
title: 'Required', 
    dataIndex: 'IsRequired', 
    className: 'openapi-doc-parameter-table-required' 
  }, 
  { 
    width: '20%', 
title: 'Example value', 
    dataIndex: 'Example', 
    className: 'openapi-doc-parameter-table-example' 
  }, 
  { 
title: 'Description', 
    dataIndex: 'Description', 
    className: 'openapi-doc-parameter-table-description' 
  }, 
]; 

const data = [ 
  { 
    rowKey: '->Action', 
    Name: 'Action', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"CreateNodeGroup"} />, 
Description: <RenderMd content={"The operation to be performed. Value: CreateNodeGroup."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->Version', 
    Name: 'Version', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"2023-08-15"} />, 
Description: <RenderMd content={"API version. Value: 2023-08-15."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->ClusterId', 
    Name: 'ClusterId', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"emr-xxx"} />, 
    Description: <RenderMd content={"ClusterId"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->ZoneId', 
    Name: 'ZoneId', 
    DataType: 'String', 
IsRequired: 'No', 
    Example: <RenderMd content={"cn-beijing-b"} />, 
Description: <RenderMd content={"zoneId. If empty, the cluster's zoneId is reused by default."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->NodeGroupName', 
    Name: 'NodeGroupName', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"test-group"} />, 
Description: <RenderMd content={"Node group name"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->NodeGroupType', 
    Name: 'NodeGroupType', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"TASK"} />, 
Description: <RenderMd content={"Node group type"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->NodeCount', 
    Name: 'NodeCount', 
    DataType: 'Integer', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"1"} />, 
Description: <RenderMd content={"Number of nodes. Value range: 1~1000."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->WithPublicIp', 
    Name: 'WithPublicIp', 
    DataType: 'Boolean', 
IsRequired: 'No', 
    Example: <RenderMd content={"false"} />, 
Description: <RenderMd content={"Whether the ECS instance is assigned a public IP address."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->ChargeType', 
    Name: 'ChargeType', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"POST"} />, 
Description: <RenderMd content={"Payment type"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->EcsInstanceTypes', 
    Name: 'EcsInstanceTypes', 
    DataType: 'Array of String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"["ecs.g3i.2xlarge"]"} />, 
Description: <RenderMd content={"List of ECS instance specifications."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->SubnetIds', 
    Name: 'SubnetIds', 
    DataType: 'Array of String', 
IsRequired: 'No', 
    Example: <RenderMd content={"["subnet-xxx"]"} />, 
Description: <RenderMd content={"List of subnet IDs."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->SystemDisk', 
    Name: 'SystemDisk', 
    DataType: 'Object', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"{\n        "VolumeType": "ESSD_FlexPL",\n        "Size": 80\n    }"} />, 
Description: <RenderMd content={"System disk"} />, 
    children: [ 
        { 
          rowKey: '->SystemDisk->PerformanceLevel', 
          Name: 'PerformanceLevel', 
          DataType: 'String', 
IsRequired: 'No', 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Disk performance type"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: '->SystemDisk->VolumeType', 
          Name: 'VolumeType', 
          DataType: 'String', 
IsRequired: 'No', 
Example: <RenderMd content={"ESSD_PL0 // Ultra-fast SSD_PL0\nESSD_PL1 // Ultra-fast SSD_PL1\nESSD_PL2 // Ultra-fast SSD_PL2\nESSD_PL3 // Ultra-fast SSD_PL3\nESSD_FLEXPL // Ultra-fast SSD_FlexPL\nULTRA_DISK // Efficient cloud disk\nPTSSD // Performance SSD\nSSD // General SSD\nEHDD // Efficient cloud disk\nZENYA_SSD // Zenya\nLOCAL_HDD // Big data HDD\nLOCAL_SSD // Local SSD\nLOCAL_SSD_SRIOV // Local SSD SRIOV"} />, 
Description: <RenderMd content={"Disk type"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: '->DataDisks', 
    Name: 'DataDisks', 
    DataType: 'Array of Object', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"[\n        {\n            "VolumeType": "ESSD_FlexPL",\n            "Size": 80,\n            "Count": 1\n        }\n    ]"} />, 
Description: <RenderMd content={"Data disk. For details, refer to the data disk constraints when creating a cluster."} />, 
    children: [ 
        { 
          rowKey: '->DataDisks->Size', 
          Name: 'Size', 
          DataType: 'Integer', 
IsRequired: 'Yes', 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Disk size. Default value: 80 GB. Minimum: 60 GB. Maximum: 2048 GB. Unit: GB."} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: '->DataDisks->Count', 
          Name: 'Count', 
          DataType: 'Integer', 
IsRequired: 'Yes', 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Number of disk blocks. Default value: 4. Maximum: 15. Minimum: 1."} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: '->DataDisks->VolumeType', 
          Name: 'VolumeType', 
          DataType: 'String', 
IsRequired: 'No', 
Example: <RenderMd content={"ESSD_PL0 // Ultra-fast SSD_PL0\nESSD_PL1 // Ultra-fast SSD_PL1\nESSD_PL2 // Ultra-fast SSD_PL2\nESSD_PL3 // Ultra-fast SSD_PL3\nESSD_FLEXPL // Ultra-fast SSD_FlexPL\nULTRA_DISK // Efficient cloud disk\nPTSSD // Performance SSD\nSSD // General SSD\nEHDD // Efficient cloud disk\nZENYA_SSD // Zenya\nLOCAL_HDD // Big data HDD\nLOCAL_SSD // Local SSD\nLOCAL_SSD_SRIOV // Local SSD SRIOV"} />, 
Description: <RenderMd content={"Disk type"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: '->ApplicationLayouts', 
    Name: 'ApplicationLayouts', 
    DataType: 'Array of Object', 
IsRequired: 'No', 
    Example: <RenderMd content={"[{\n    "ApplicationName": "HDFS",\n    "LayoutComponentNames": ["NMAENODE","DATANODE"]\n}]"} />, 
Description: <RenderMd content={"List of component names that can be deployed in the current node group."} />, 
    children: [ 
        { 
          rowKey: '->ApplicationLayouts->ApplicationName', 
          Name: 'ApplicationName', 
          DataType: 'String', 
IsRequired: 'Yes', 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Application name"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: '->ApplicationLayouts->LayoutComponentNames', 
          Name: 'LayoutComponentNames', 
          DataType: 'Array of String', 
IsRequired: 'No', 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"List of custom configuration parameters for components."} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: '->ClientToken', 
    Name: 'ClientToken', 
    DataType: 'String', 
IsRequired: 'No', 
    Example: <RenderMd content={"xxx"} />, 
Description: <RenderMd content={"A unique identifier generated by the caller for this request, used to ensure idempotency."} />, 
    children: [ 
    ] 
  }, 

]; 

return (<Table 
  rowKey="rowKey" 
  className="openapi-doc-parameter-table" 
  columns={columns} 
  data={data} 
  border={ { cell: true, wrapper: true } } 
  scroll={ { x: "auto" } } 
  pagination={false} 
/>);

Response parameters

The table below lists only the response parameters specific to this API. For more information, see response structure

Parameter
Type
Example value
Description
ClusterId
String

emr-xxx

Cluster ID

OperationId
String

Order7xxx

Cluster operation ID

Sample request

{ 
    "RequestId":null, 
    "RegionId":"cn-beijing", 
    "UserId":5xxx, 
    "AccountId":210xxx, 
    "ClusterId":"emr-xxx", 
    "NodeGroupName":"createNodeGroup-test", 
    "NodeGroupType":"TASK", 
    "ChargeType":"POST", 
    "EcsInstanceTypes":[ 
                "ecs.g2i.2xlarge" 
            ], 
    "SystemDisk":{ 
                "Size":120, 
                "VolumeType":"ESSD_PL0" 
    }, 
    "DataDisks":[ 
                { 
                    "Size":80, 
                    "VolumeType":"ESSD_PL0", 
                    "Count":1 
                } 
            ], 
    "NodeCount":1 
}

Sample response

{ 
    "ResponseMetadata": { 
        "RequestId": "202312042119240BF21498512xxx", 
        "Action": "CreateNodeGroup", 
        "Version": "2023-08-15", 
        "Service": "emr", 
        "Region": "cn-beijing", 
        "Error": null, 
        "Deprecated": false 
    }, 
    "Result": { 
        "OperateId": "xxx", 
        "ClusterId": "emr-xxx" 
    } 
}

Error codes

The table below lists the error codes related to the business logic of this API. For common error codes, see the common error codes documentation.

Status code
Error code
Error message
Description
400
InvalidRequest

Access Denied {clusterId}

No permission for this cluster.

400
InvalidClusterId

cluster id {clusterId} not found

Cluster does not exist.

Last updated: 2026.06.01 17:04:20