Importing a Flink Job
Function
This API is used to import Flink job data.
Authorization
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see the required permissions in Introduction.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependency
dli:jobs:create
write
jobs *
-
-
-
-
-
-
URI
- URI format
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain a project ID, see Obtaining a Project ID.
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| zip_file | Yes | String | Path of the job ZIP file imported from OBS. You can enter a folder path to import all ZIP files in the folder. NOTE: The folder can contain only .zip files. |
| is_cover | No | Boolean | Whether to overwrite an existing job if the name of the imported job is the same as that of the existing job in the service. |
Response Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_success | No | String | Whether the request was successfully executed. true indicates that the request was successfully executed. |
| message | No | String | System prompt. If the execution succeeded, this parameter may be left blank. |
| job_mapping | No | Array of objects | Information about the imported job. For details, see Table 4. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| old_job_id | No | Long | ID of a job before being imported. |
| new_job_id | No | Long | ID of a job after being imported. If is_cover is set to false and a job with the same name exists in the service, the returned value of this parameter is -1. |
| remark | No | String | Results about an imported job. |
Example Request
Whether to overwrite the existing job if the name of the imported job is the same as that of an existing job when Flink job data is imported from OBS.
{
"zip_file": "test/ggregate_1582677879475.zip",
"is_cover": true
} Example Response
{
"is_success": "true",
"message": "The job is successfully imported.",
"job_mapping": [
{
"old_job_id": 100,
"new_job_id": 200,
"remark": "Job successfully created"
}
]
} Status Codes
Table 5 describes status codes.
Error Codes
If an error occurs when this API is called, the system does not return the result similar to the preceding example, but returns an error code and error message. For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot