Updated on 2025-12-09 GMT+08:00

Modifying an Agent Job

Function

This API is used to modify an agent job for a DB instance.

Authorization Information

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

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/db-jobs/{job_id}

  • 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

Table 2 Parameters

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

Error Code

For details, see Error Codes.