You can call CreateResourcePool to create a YARN resource pool.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateResourcePool |
The operation that you want to perform. Set the value to CreateResourcePool. |
Active | Boolean | Yes | true |
Whether to activate:
|
ClusterId | String | Yes | C-0E995C0EE7E5**** |
The ID of the cluster. You can call ListClusters You can call this operation to view the ID of a cluster. |
Config.N.Category | String | Yes | DEFAULT_SETTINGS |
The name of the parameter. Valid values: DEFAULT_SETTINGS, ACCESS_CONTROL_SETTINGS, QUEUE_RESOURCE_LIMIT, QUEUE_SCHEDULING_POLICY, QUEUE_PREEMPTION, QUEUE_SUBMISSION_ACCESS_CONTROL, and QUEUE_ADMINISTRATION_ACCESS_CONTROL. |
Config.N.ConfigKey | String | Yes | capacity |
The key of the parameter. |
Config.N.configType | String | Yes | RESOURCE_POOL_CONFIG |
Configuration type, filled in here RESOURCE_POOL_CONFIG . |
Config.N.ConfigValue | String | Yes | 100 |
The value of the parameter. |
Config.N.TargetId | String | Yes | test |
A parameter that no longer takes effect. You can specify any value for this parameter. |
Name | String | Yes | default |
The name of the resource pool. |
PoolType | String | Yes | CAPACITY_SCHEDULER |
The scheduler type of the resource pool. Valid values: CAPACITY_SCHEDULER and FAIR_SCHEDULER. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. |
Note | String | No | The default resource pool. |
The description of the resouce pool. |
YarnSiteConfig | String | No | configList |
The list of parameters that you specify in the yarn-site.xml configuration file. |
Config.N.Note | String | No | The capacity and weight of the queue |
The description of the parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | A544317F-4A60-4532-AC96-191B9D80420AF |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateResourcePool
&Active=true
&ClusterId=C-0E995C0EE7E5ECB3
&Config.1.Category=DEFAULT_SETTINGS
&Config.1.ConfigKey=capacity
&Config.1.configType=RESOURCE_POOL_CONFIG
&Config.1.ConfigValue=100
&Config.1.TargetId=test
&Name=default
&PoolType=CAPACITY_SCHEDULER
&RegionId=cn-hangzhou
&<common request parameters>
Sample success responses
XML
format
<code>200</code>
<requestId>A544317F-4A60-4532-AC96-191B9D80420A</requestId>
<successResponse>true</successResponse>
JSON
Syntax
{
"code":"200",
"requestId":"A544317F-4A60-4532-AC96-191B9D80420A",
"successResponse":true
}