You can call the AddClusterService operation to add a service that is supported by the current EMR version to a specified cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

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-F32FB31D8295****

The ID of the cluster to which you want to add the service.

RegionId String Yes cn-hangzhou

The ID of the region where your cluster resides.

Service.N.ServiceName String Yes HDFS

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

Comment String No addService

The comment for the service you want to add.

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddClusterService
&ClusterId=C-F32FB31D82954C64
&RegionId=cn-hangzhou
&Service.1.ServiceName=HDFS
&<common request parameters>

Sample success responses

XML format

<AddClusterServiceResponse>
      <requestId>EBB4D49C-4064-4818-B3AE-4C6BE5FC8264</requestId>
</AddClusterServiceResponse>

JSON Syntax

{
   "requestId":"EBB4D49C-4064-4818-B3AE-4C6BE5FC8264"
}

Error codes

HttpCode 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 authorized to manage the resources of other users.
403 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the Apsara Stack tenant account is out of service.
403 JobId.Not.Exist Job [%s] does not exist or is deleted! The error message returned because the specified job ID 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. Enter a valid value.
500 InternalError The request processing has failed due to some unknown error. The error message returned because the request processing has failed due to an internal error. Submit a ticket.

The port number of a client that accesses a Error CenterFor more information, see error codes.