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

Batch Modifying Publications

Function

This API is used to batch modify publications 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

  • 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

Request Parameters

Table 2 Parameters

Parameter

Mandatory

Type

Description

publication_ids

Yes

Array of String

Definition

IDs of publications to modify.

Constraints

N/A

Range

N/A

Default Value

N/A

job_schedule

Yes

Object

Definition

Snapshot schedule. For details, see Table 3 job_schedule parameters.

Constraints

N/A

Table 3 job_schedule parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Definition

Schedule ID.

Constraints

N/A

Range

N/A

Default Value

N/A

job_schedule_type

No

String

Definition

Agent schedule type.

Constraints

N/A

Range

  • automatically: The task starts when the SQL Server Agent is started.
  • cpu_idle: The task starts when the CPU is idle.
  • recurring: The task is executed repeatedly.
  • one_time: The task is executed only once.

Default Value

recurring

one_time_occurrence

No

Object

Definition

Execution time when the task is executed only once.

For details, see Table 4 one_time_occurrence parameters.

Constraints

N/A

frequency

No

Object

Definition

Interval of the schedule.

For details, see Table 5 frequency parameters.

Constraints

This parameter is mandatory only when the schedule ID is empty.

daily_frequency

No

Object

Definition

Daily frequency of the schedule.

For details, see Table 6 daily_frequency parameters.

Constraints

This parameter is mandatory only when the schedule ID is empty.

duration

No

Object

Definition

Validity period of the schedule.

For details, see Table 7 duration parameters.

Constraints

This parameter is mandatory only when the schedule ID is empty.

Table 4 one_time_occurrence parameters

Parameter

Mandatory

Type

Description

active_start_date

No

Boolean

Definition

Execution date, in the format of yyyy-MM-dd.

Constraints

N/A

Range

1990-01-01 to 2099-12-31

Default Value

N/A

active_start_time

No

Boolean

Definition

Execution time, in the format of HH:mm:ss.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 5 frequency parameters

Parameter

Mandatory

Type

Description

freq_type

No

String

Definition

Frequency type of the schedule.

Constraints

N/A

Range

  • daily: by day
  • weekly: by week
  • monthly_day: by month and by day in each month
  • monthly_week: by month and by week in each month

Default Value

N/A

freq_interval

No

String

Definition

Execution interval.

Constraints

N/A

Range

1–99

Default Value

N/A

freq_interval_weekly

No

Array of String

Definition

Days in a week when the task is executed.

Constraints

This parameter is mandatory when freq_type is set to weekly. If freq_type is not set to weekly, this parameter does not take effect.

Range

Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday

Default Value

N/A

freq_interval_day_monthly

No

Integer

Definition

Monthly execution dates.

Constraints

This parameter is mandatory when freq_type is set to monthly_day. If freq_type is not set to monthly_day, this parameter does not take effect.

Range

1 to the total number of days in the month, for example, 1 to 31

Default Value

N/A

freq_interval_monthly

No

String

Definition

Days in a week when the task is executed in the current month.

Constraints

This parameter is mandatory when freq_type is set to monthly_week. If freq_type is not set to monthly_week, this parameter does not take effect.

Range

Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, day, weekday, weekend

Default Value

N/A

freq_relative_interval_monthly

No

String

Definition

Week in a month when the task is executed.

Constraints

This parameter is mandatory when freq_type is set to monthly_week. If freq_type is not set to monthly_week, this parameter does not take effect.

Range

first, second, third, fourth, last

Default Value

N/A

Table 6 daily_frequency parameters

Parameter

Mandatory

Type

Description

freq_subday_type

No

String

Definition

Daily frequency type.

Constraints

N/A

Range

  • once: once a day
  • multiple: multiple times a day

Default Value

N/A

active_start_time

No

String

Definition

Time of the first execution on each day. If freq_subday_type is set to once, the task is executed only once a day. The value is in HH:mm:ss format.

Constraints

N/A

Range

N/A

Default Value

N/A

active_end_time

No

String

Definition

Last execution time, in the format of HH:mm:ss.

Constraints

This parameter is mandatory when the task is executed multiple times a day. It does not take effect when the task is executed only once a day.

Range

N/A

Default Value

N/A

freq_subday_interval

No

Integer

Definition

Execution interval.

Constraints

This parameter is mandatory when the task is executed multiple times a day. It does not take effect when the task is executed only once a day.

Range

1–99

Default Value

N/A

freq_interval_unit

No

String

Definition

Execution interval unit.

Constraints

This parameter is mandatory when the task is executed multiple times a day. It does not take effect when the task is executed only once a day.

Range

  • second
  • minute
  • hour

Default Value

N/A

Table 7 duration parameters

Parameter

Mandatory

Type

Description

active_start_date

No

String

Definition

First execution date, in the format of yyyy-MM-dd.

Constraints

N/A

Range

1990-01-01 to 2099-12-31

Default Value

N/A

active_end_date

No

String

Definition

Last execution date, in the format of yyyy-MM-dd. If this parameter is not specified, the execution does not end.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Batch modify publications for a DB instance.
PUT https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/72ee4cc4607347049df9ad50f615bbd8in04/replication/publications
{
      "publication_ids": [
        "959d6fd2-c32f-47fe-a209-7fb6b261a6bb"
      ],
      "job_schedule": {
        "id": "569d69c2-53e5-4bef-a356-d7ea2ff6fa04",
        "user_defined": false,
        "schedule_type": "snapshot",
        "job_schedule_type": "recurring",
        "one_time_occurrence": {},
        "frequency": {
          "freq_type": "daily",
          "freq_interval": 1
        },
        "daily_frequency": {
          "freq_subday_type": "once",
          "active_start_time": "02:00:00"
        },
        "duration": {
          "active_start_date": "1990-01-01",
          "active_end_date": "2099-12-31"
        }
      }
}

Response

  • Normal response
    Table 8 Parameters

    Parameter

    Type

    Description

    publications

    Array of Object

    Definition

    Results of batch modifying publications. For details, see Table 9.

    Table 9 publications parameters

    Parameter

    Type

    Description

    id

    String

    Definition

    Publication ID.

    Range

    N/A

    result

    String

    Definition

    Execution result.

    Range

    • success
    • failure

    error_message

    String

    Definition

    Error information returned when the execution fails.

    Range

    N/A

  • Example normal response
    {
        "subscriptions":[
          {
            "id":"a59096a6-143c-4478-bec6-92b6b516d138",
             "result":"success "              
          }
         ]
    }

Status Code

Error Code

For details, see Error Codes.