Submits a serverless job to the E-HPC cluster.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The ID of the E-HPC cluster. You can call the ListClusters operation to query the cluster ID. | ehpc-hz-FYUr32**** |
JobName | string | Yes | The name of the serverless job. | testjob |
ArrayProperties | object | No | The configuration of the array job. Note
The value of an array job index is passed to a serverless job container through the environment variable EHPC_ARRAY_TASK_ID . Users can access the container from business programs.
| |
IndexStart | long | No | The start value of the array job index. Valid values: 0 to 4999. | 1 |
IndexEnd | long | No | The end value of the array job index. Valid values: 0 to 4999. The value must be greater than or equal to the value of IndexStart. | 5 |
IndexStep | long | No | The interval of the array job index. Note
If the array job property is IndexStart=1,IndexEnd=5, and IndexStep=2, the array job contains three subtasks. The values of the subtask indexes are 1,3, and 5.
| 2 |
JobPriority | long | No | The scheduling priority of the serverless job. Valid values: 0 to 999. A greater value indicates a higher priority. | 10 |
EphemeralStorage | integer | No | The size of the temporary storage that is added to the serverless job container. Unit: GiB. Note
By default, the serverless job container provides 30 GiB of free storage quota. If you require storage of more than 30 GiB, you can use this parameter to specify the temporary storage to add to the job container.
| 200 |
Timeout | long | No | The validity period of the serverless job. After the validity period expires, the job is forcibly terminated. Unit: seconds. | 3600 |
VSwitchId | array | No | The IDs of the vSwitches to which the serverless job container belongs. | |
string | No | The vSwitch ID. Note
E-HPC supports only VPC networks. You can call the DescribeVSwitches operation to query existing vSwitches.
| vsw-bp1gb5gf5546rn**** | |
InstanceType | array | No | The ECS instance types used by the serverless job container. | |
string | No | The specifications of the ECS instance. | ecs.g7.8xlarge | |
Cpu | float | No | The vCPU size of the serverless job container. Unit: cores. | 2 |
Memory | float | No | The memory size of the serverless job container. Unit: GiB. | 4 |
SpotStrategy | string | No | The bidding policy for the instance. Valid values:
Default value: NoSpot. | SpotWithPriceLimit |
SpotPriceLimit | float | No | The maximum hourly price of the preemptible instance. The value can contain up to three decimal places. If you set SpotStrategy to SpotWithPriceLimit, you must specify the SpotPriceLimit parameter. | 0.062 |
RamRoleName | string | No | The name of the RAM role that is associated with the serverless job container. | testRamRoleName |
Container | object | Yes | The properties of the serverless job container. | |
EnvironmentVar | object [] | No | The environment variable of the container. | |
Value | string | No | The value of the environment variable for the container. The value must be 0 to 256 characters in length. | /usr/local/bin |
WorkingDir | string | No | The working directory of the container. | /usr/local/ |
Image | string | Yes | The image of the container. | registry-vpc.cn-hangzhou.aliyuncs.com/ehpc/hpl:latest |
Command | array | No | The container startup commands. | |
string | No | The command that you run to start the container. | python3 | |
Arg | array | No | The arguments of the container startup command. You can specify up to 10 arguments. | |
string | No | The arguments that are passed to the container startup command. | hello.py | |
Gpu | integer | No | The number of GPUs of the container. | 1 |
VolumeMount | object [] | No | The data volumes mounted to the container. | |
MountPath | string | No | The directory to which the volume is mounted. Note
The data stored in this directory is overwritten by the data on the volume. Specify this parameter with caution.
| /data |
DependsOn | object [] | No | The serverless job dependencies. | |
JobId | string | No | The ID of the dependent job. | 10 |
Type | string | No | The type of the dependency. Valid values:
Default value: AfterSucceeded. | AfterAny |
Response parameters
Examples
Sample success responses
JSON
format
{
"JobId": "10",
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
400 | NotEnabled | You have not enabled this service | You have not enabled this service |
400 | InDebt | Your account has overdue payments. | Your account has overdue payments. |
403 | InvalidClusterStatus | The operation failed due to invalid cluster status. | The cluster status does not support the operation. |
403 | ConflictOpt | A conflicting operation is running. | A conflicting operation is running. Please try again later. |
404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
406 | EcsError | An error occurred while calling the ECS API operation. | An error occurred while calling the ECS API operation. |
406 | DbError | A database service error occurred. | Database request failed. |
406 | AliyunError | An Alibaba Cloud product error occurred. | An Alibaba Cloud product error occurred. |
406 | AgentError | The agent service request failed: %s | The agent request failed. |
406 | ServiceAPIError | Failed to call the operation. Cause:%s | An error occurred while calling the API. %s |
407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
409 | PartFailure | Part of the batch operation failed. | Part of the batch operation failed. |
500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-09-06 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||||||||
| ||||||||||||||||||||||||
2023-07-25 | The Error code has changed | see changesets | ||||||||||||||||||||||
| ||||||||||||||||||||||||
2023-07-21 | The Error code has changed | see changesets | ||||||||||||||||||||||
|