- [HTTP request](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#body.request_body)
- [Response body](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#body.aspect)
- [SqlInstancesRescheduleMaintenanceRequestBody](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#SqlInstancesRescheduleMaintenanceRequestBody)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#SqlInstancesRescheduleMaintenanceRequestBody.SCHEMA_REPRESENTATION)
- [Reschedule](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#Reschedule)
  - [JSON representation](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#Reschedule.SCHEMA_REPRESENTATION)
- [RescheduleType](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#RescheduleType)
- [Examples](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#examples)
- [Try it!](https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#try-it)

Reschedules the maintenance on the given instance.

### HTTP request

`POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/rescheduleMaintenance`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` ID of the project that contains the instance. |
| `instance` | `string` Cloud SQL instance ID. This does not include the project ID. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#SqlInstancesRescheduleMaintenanceRequestBody`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloudsql`
- `
  https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/sqlservice.admin`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## SqlInstancesRescheduleMaintenanceRequestBody

Reschedule options for maintenance windows.

| JSON representation |
|---|
| ``` { "reschedule": { object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#Reschedule`) } } ``` |

| Fields ||
|---|---|
| `reschedule` | ``object (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#Reschedule`)`` Required. The type of the reschedule the user wants. |

## Reschedule

| JSON representation |
|---|
| ``` { "rescheduleType": enum (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#RescheduleType`), "scheduleTime": string } ``` |

| Fields ||
|---|---|
| `rescheduleType` | ``enum (`https://docs.cloud.google.com/sql/docs/postgres/admin-api/rest/v1/projects.instances/rescheduleMaintenance#RescheduleType`)`` Required. The type of the reschedule. |
| `scheduleTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Timestamp when the maintenance shall be rescheduled to if rescheduleType=SPECIFIC_TIME, in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## RescheduleType

| Enums ||
|---|---|
| `RESCHEDULE_TYPE_UNSPECIFIED` |   |
| `IMMEDIATE` | Reschedules maintenance to happen now (within 5 minutes). |
| `NEXT_AVAILABLE_WINDOW` | Reschedules maintenance to occur within one week from the originally scheduled day and time. |
| `SPECIFIC_TIME` | Reschedules maintenance to a specific time and day. |