Modifying an Agent Job
Function
This API is used to modify an agent job for a DB instance.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- 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 |
Dependencies |
|---|---|---|---|---|---|
|
rds:instance:update |
write |
- |
- |
rds:instance:modify |
- |
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
job_id
Yes
Definition
Job ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
profile_id |
Yes |
String |
Definition Profile ID. Constraints N/A Range The value must be a numeric string. Default Value N/A |
Example Request
Modify an agent job for a DB instance.
PUT https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/72ee4cc4607347049df9ad50f615bbd8in04/db-jobs/0C6A3BC7-D2D5-41C2-BA3A-012DC43C4CD5
{
"profile_id": "10"
}
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
job_id
String
Definition
Job ID.
Range
N/A
job_name
String
Definition
Job name.
Range
N/A
is_enabled
Boolean
Definition
Whether the job is enabled.
Range
- true: enabled
- false: disabled
run_time
String
Definition
Latest execution time, in the format of yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
Range
N/A
run_status
String
Definition
Job execution status.
Range
- 0: failed
- 1: successful
- 2: retrying
- 3: canceled
- 4: Running
last_failure_time
String
Definition
Latest failure time, in the format of yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
Range
N/A
failure_count
Integer
Definition
Number of historical failures.
Range
N/A
agent_type
String
Definition
Job agent type.
Range
- snapshot: snapshot agent
- log_reader: log reader agent
- distribution: distribution agent
- merge: merge agent
- queue_reader: queue reader agent
profile_id
String
Definition
Profile ID.
Range
N/A
profile_name
String
Definition
Profile name.
Range
N/A
- Example normal response
{ "job_id": "B62A0ACC-1B87-48A4-9033-DEECE3CA15D7", "job_name": "MSSQL-4AE204B9\\MSSQL2-db01-pub01-192.168.0.135-11", "is_enabled": true, "run_time": "2025-11-04T03:33:43+0000", "run_status": "4", "failure_count": 0, "agent_type": "distribution", "profile_id": "10", "profile_name": "Windows Synchronization Manager profile" } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
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