You can call this operation to add a service that is supported by the current E-MapReduce (EMR) version to a specified cluster.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description 
Action String Yes AddClusterService

The operation that you want to perform. Set the value to AddClusterService.

ClusterId String Yes C-F32FB31D82954C64

The ID of the cluster where the service is to be added.

RegionId String Yes cn-hangzhou

The ID of the region where your cluster resides.

AccessKeyId String No LTAI8ljWyu7y****

The AccessKey ID provided to you by Alibaba Cloud, which specifies the ID of the user.

Comment String No addService

The description of the service to be added.

Service. N. ServiceName String No HDFS

The name of the service to be added, such as HDFS and YARN.

Response parameters

Parameter Type Example Description
RequestId String EBB4D49C-4064-4818-B3AE-4C6BE5FC8264

The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=AddClusterService
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

HTTP status code Error code Error message Description 
403 Params.Illegal The specified parameters are wrongly formed.. The error message returned because the format of the specified parameters is invalid.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource The error message returned because you are not allowed to manage resources of other users.
403 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the Alibaba Cloud account is invalid.
403 JobId.Not.Exist Job [%s] does not exist or is deleted! The error message returned because the ID of the specified job does not exist. Enter a valid value.
403 Job. RegionId. Not. Match Specified job does not exist in this region[%s]! The error message returned because the specified job does not exist in the region in which your cluster resides. Enter a valid value.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred. Submit a ticket.

For a list of error codes, visit the API Error Center.