You can call this operation to create a YARN resource pool.

Request parameters

Name Type Required Example Description
Active Boolean Yes true Indicates whether the resource pool is activated.
ClusterId String Yes C-0E995C0EE7E5ECB3 The cluster ID.
Name String Yes default The name of the resource pool.
PoolType String Yes CAPACITY_SCHEDULER The type of the resource pool. Valid values: CAPACITY_SCHEDULER and FAIR_SCHEDULER.
RegionId String Yes cn-hangzhou The region location ID.
AccessKeyId String No xxx The AccessKey ID.
Config.N.Category String No DEFAULT_SETTINGS The type of the configuration type. 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 No capacity The key of the configuration item.
Config.N.ConfigValue String No 100 The key of the configuration item.
Config.N.Note String No capacity weight The note of the configuration item.
Config.N.TargetId String No test The parameter is disused. The value cannot be empty.
Config.N.configType String No RESOURCE_POOL_CONFIG The type of the configuration item. Enter RESOURCE_POOL_CONFIG.
Note String No default resource pool The notes.
YarnSiteConfig String No configList The configuration item in the yarn-site file.

Response parameters

Name Type Example Description
RequestId String A544317F-4A60-4532-AC96-191B9D80420AF The request ID.

Examples

  • Sample requests
    /? Active=true
    &ClusterId=C-0E995C0EE7E5ECB3
    &Name=default
    &PoolType=CAPACITY_SCHEDULER
    &RegionId=cn-hangzhou
    &AccessKeyId=xxx
    &Note=default resource pool
    &YarnSiteConfig=
    &Config. 1. Category=DEFAULT_SETTINGS
    &Config. 1. ConfigKey=capacity
    &Config. 1.configType=RESOURCE_POOL_CONFIG
    &Config. 1. ConfigValue=100
    &Config. 1.1ote=capacity weight
    &Config. 1. TargetId=
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"code":"200",
    	"requestId":"A544317F-4A60-4532-AC96-191B9D80420A",
    	"successResponse":true
    }
  • Error response examples
    JSON format
    {
    	"code":"AuthRealNameNotPass",
    	"message":"User real name authenticate failed!",
    	"requestId":"A544317F-4A60-4532-AC96-191B9D80420AF",
    	"successResponse":false
    }

Error codes

View error codes.