Yandex Managed Service for MySQL® cluster maintenance
You can manage maintenance of a Managed Service for MySQL® cluster.
Getting a list of maintenance jobs
For Managed Service for MySQL®, you can get a list of maintenance jobs in:
Getting a list of maintenance jobs in a cloud
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.List method, e.g., via the following cURL
request:curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances?cloudId=<cloud_ID>'Learn how to get a cloud ID in this guide.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.List method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cloud_id": "<cloud_ID>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.ListLearn how to get a cloud ID in this guide.
-
Check the server response to make sure your request was successful.
Getting a list of maintenance jobs in a folder
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.List method, e.g., via the following cURL
request:curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances?folderId=<folder_ID>'You can get the folder ID with the list of folders in the cloud.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.List method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "folder_id": "<folder_ID>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.ListYou can get the folder ID with the list of folders in the cloud.
-
Check the server response to make sure your request was successful.
Getting a list of maintenance jobs in a cluster
-
In the management console
, select the folder containing the cluster. -
Navigate
to Managed Service for MySQL. -
Select your cluster and open the
Maintenance tab.To view maintenance jobs with a specific status, select the status you want from the Status field above the list of maintenance jobs. You can also find a maintenance job by its ID or name using the search field above the list.
Click an ID to see how the maintenance job affects cluster availability. Look up Task details to see how the maintenance job affects users.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.List method, e.g., via the following cURL
request:curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances?resourceId=<cluster_ID>'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.List method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "resource_id": "<cluster_ID>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.ListYou can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
Getting maintenance job details
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.Get method, e.g., via the following cURL
request:curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances/<maintenance_job_ID>'You can get the maintenance job ID with the list of maintenance jobs.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.Get method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "maintenance_id": "<maintenance_job_ID>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.GetYou can get the maintenance job ID with the list of maintenance jobs.
-
Check the server response to make sure your request was successful.
Getting cluster maintenance logs
- In the management console
, select the folder containing the cluster. - Navigate
to Managed Service for MySQL. - Select your cluster and open the
Maintenance tab. - Select a maintenance job.
- Click Task logs.
Moving scheduled maintenance
Maintenance with the Planned status is scheduled for the date and time specified in the Start date column. You can postpone such maintenance for a maximum of two weeks from the original scheduled date and time.
To postpone scheduled maintenance:
-
In the management console
, select the folder containing the cluster. -
Navigate
to Managed Service for MySQL. -
Select your cluster and open the
Maintenance tab. -
Click
next to the maintenance with the Planned status and select Postpone. -
Select the rescheduling type:
-
Next window: Postpone maintenance until the next available window.
-
Choose date (UTC): Reschedule maintenance for a new date and time:
For this option, select a date and UTC time interval.
-
-
Click Reschedule.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
To postpone scheduled maintenance:
-
See the description of the CLI command for rescheduling maintenance :
yc managed-mysql cluster reschedule-maintenance --help -
Run this command to reschedule the maintenance job:
yc managed-mysql cluster reschedule-maintenance <cluster_name_or_ID> \ --reschedule-type <reschedule_type> \ --delayed-until <timestamp>Where:
-
<cluster_name_or_ID>: Cluster name or ID which you can get with the list of clusters in the folder. -
--reschedule-type: Rescheduling type. The possible values are:next-available-window: Postpone maintenance until the next available window.specific-time: Reschedule maintenance for a new date and time.
-
--delayed-until: Timestamp for thespecific-timetype.The timestamp may be in one of the following formats:
- RFC-3339
- HH:MM:SS
- Maintenance time offset in hours and minutes
Here are some examples:
2006-01-02T15:04:05Z,15:04:05,2h,3h30m ago. - RFC-3339
-
You can reschedule a scheduled maintenance job using one of these methods:
To postpone a scheduled maintenance job using the Cluster.RescheduleMaintenance method:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Cluster.RescheduleMaintenance method, e.g., via the following cURL
request:curl \ --request POST \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/<cluster_ID>:rescheduleMaintenance' \ --data '{ "rescheduleType": "<reschedule_type>", "delayedUntil": "<timestamp>" }'Where:
-
<cluster_ID>: Cluster ID which you can get with the list of clusters in the folder. -
rescheduleType: Rescheduling type. The possible values are:NEXT_AVAILABLE_WINDOW: Postpone maintenance until the next available window.SPECIFIC_TIME: Reschedule maintenance for a new date and time.
-
delayedUntil: Timestamp for theSPECIFIC_TIMEtype in RFC-3339 format.Example:
2006-01-02T15:04:05Z.
-
-
Check the server response to make sure your request was successful.
To postpone a scheduled maintenance job using the Maintenance.Reschedule method:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.Reschedule method, e.g., via the following cURL
request:curl \ --request POST \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances/<maintenance_job_ID>:reschedule' \ --data '{ "rescheduleType": "<reschedule_type>", "scheduledAt": "<timestamp>" }'Where:
-
<maintenance_job_ID>: Maintenance job ID you can get with the list of maintenance jobs. -
rescheduleType: Rescheduling type. The possible values are:NEXT_AVAILABLE_WINDOW: Postpone maintenance until the next available window.SPECIFIC_TIME: Reschedule maintenance for a new date and time.
-
scheduledAt: Timestamp for theSPECIFIC_TIMEtype in RFC-3339 format.Example:
2006-01-02T15:04:05Z.
-
-
Check the server response to make sure your request was successful.
You can reschedule a scheduled maintenance job using one of these calls:
To postpone a scheduled maintenance job using the ClusterService.RescheduleMaintenance call:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the ClusterService.RescheduleMaintenance method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "reschedule_type": "<reschedule_type>", "delayed_until": "<timestamp>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.ClusterService.RescheduleMaintenanceWhere:
-
cluster_id: Cluster ID which you can get with the list of clusters in the folder. -
reschedule_type: Rescheduling type. The possible values are:NEXT_AVAILABLE_WINDOW: Postpone maintenance until the next available window.SPECIFIC_TIME: Reschedule maintenance for a new date and time.
-
delayed_until: Timestamp for theSPECIFIC_TIMEtype in RFC-3339 format.Example:
2006-01-02T15:04:05Z.
-
-
Check the server response to make sure your request was successful.
To postpone a scheduled maintenance job using the MaintenanceService.Reschedule call:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.Reschedule method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "maintenance_id": "<maintenance_job_ID>", "reschedule_type": "<reschedule_type>", "scheduled_at": "<timestamp>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.RescheduleWhere:
-
maintenance_id: Maintenance job ID you can get with the list of maintenance jobs. -
reschedule_type: Rescheduling type. The possible values are:NEXT_AVAILABLE_WINDOW: Postpone maintenance until the next available window.SPECIFIC_TIME: Reschedule maintenance for a new date and time.
-
scheduled_at: Timestamp for theSPECIFIC_TIMEtype in RFC-3339 format.Example:
2006-01-02T15:04:05Z.
-
-
Check the server response to make sure your request was successful.
Starting scheduled maintenance immediately
If you need to, you can perform a maintenance with the Planned status immediately without waiting for the time specified in the Start date column.
To run a scheduled cluster maintenance job immediately:
- In the management console
, select the folder containing the cluster. - Navigate
to Managed Service for MySQL. - Select your cluster and open the
Maintenance tab. - In the maintenance row, click
and select Carry out now.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
To run a scheduled cluster maintenance job immediately:
-
View the description of the CLI command for running a maintenance job:
yc managed-mysql cluster reschedule-maintenance --help -
Run this command to run the scheduled maintenance job:
yc managed-mysql cluster reschedule-maintenance <cluster_name_or_ID> \ --reschedule-type immediateYou can get the cluster name and ID with the list of clusters in the folder.
You can run a scheduled maintenance job immediately using one of these methods:
To run a scheduled maintenance job immediately using the Cluster.RescheduleMaintenance method:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Cluster.RescheduleMaintenance method, e.g., via the following cURL
request:curl \ --request POST \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/<cluster_ID>:rescheduleMaintenance' \ --data '{ "rescheduleType": "IMMEDIATE" }'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
To run a scheduled maintenance job immediately using the Maintenance.Reschedule method:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Maintenance.Reschedule method, e.g., via the following cURL
request:curl \ --request POST \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/maintenances/<maintenance_job_ID>:reschedule' \ --data '{ "rescheduleType": "IMMEDIATE" }'You can get the maintenance job ID with the list of maintenance jobs.
-
Check the server response to make sure your request was successful.
You can run a scheduled maintenance job immediately using one of these calls:
To run a scheduled maintenance job immediately using the ClusterService.RescheduleMaintenance call:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the ClusterService.RescheduleMaintenance method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "reschedule_type": "IMMEDIATE" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.ClusterService.RescheduleMaintenanceYou can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
To run a scheduled maintenance job immediately using the MaintenanceService.Reschedule call:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the MaintenanceService.Reschedule method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/maintenance_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "maintenance_id": "<maintenance_job_ID>", "reschedule_type": "IMMEDIATE" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.MaintenanceService.RescheduleYou can get the maintenance job ID with the list of maintenance jobs.
-
Check the server response to make sure your request was successful.
Configuring a maintenance window
-
In the management console
, select the folder containing the cluster. -
Navigate
to Managed Service for MySQL. -
Select your cluster and open the
Maintenance tab. -
Click
Configure the maintenance window in the top-right corner of the page. -
Set up the maintenance time for your cluster:
- To allow maintenance at any time, select At any time (default).
- To specify the preferred maintenance start time, select By schedule and specify the day of the week and the UTC time interval. For example, you can choose the cluster's least busy time.
Both active and stopped clusters are subject to maintenance operations. Maintenance operations may include DBMS version upgrades, patches, etc.
-
Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.
If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
To configure a maintenance window:
-
See the description of the CLI command for updating cluster settings:
yc managed-mysql cluster update --help -
Run this command to configure the maintenance window:
yc managed-mysql cluster update <cluster_name_or_ID> \ --maintenance-window type=<maintenance_type>,` `day=<day_of_week>,` `hour=<sequence_number_of_hour_interval>Where:
-
<cluster_name_or_ID>: Cluster name or ID which you can get with the list of clusters in the folder. -
--maintenance-window: Maintenance window settings that apply to both running and stopped clusters. Thetypesetting defines the maintenance type:-
anytime: Any time (default). -
weekly: On a schedule. For this value, also specify the following:-
day: Day of week, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN. -
hour: UTC hour interval, from1to24.For example,
1stands for the interval from00:00to01:00, and5, from04:00to05:00.
-
-
-
-
Open the current Terraform configuration file with the infrastructure plan.
To learn how to create this file, refer to Creating a MySQL® cluster.
-
To set up the maintenance window that will also apply to stopped clusters, add the
maintenance_windowsection to the cluster description:resource "yandex_mdb_mysql_cluster" "<cluster_name>" { ... maintenance_window { type = "<maintenance_type>" day = "<day_of_week>" hour = <sequence_number_of_hour_interval> } ... }Where:
-
type: Maintenance type. The possible values include:ANYTIME: Any time (default).WEEKLY: On a schedule.
-
day: Day of week for theWEEKLYtype, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN. -
hour: Sequence number of UTC hour interval for theWEEKLYtype, from1to24.For example,
1stands for the interval from00:00to01:00, and5, from04:00to05:00.
For more information about the
yandex_mdb_mysql_clusterresource, see this Terraform provider guide. -
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the intended changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Timeouts
The Terraform provider sets the following timeouts for Managed Service for MySQL® cluster operations:
- Creating a cluster, including by restoring it from a backup: 15 minutes.
- Updating a cluster, including the MySQL® version update: 60 minutes.
- Deleting a cluster: 15 minutes.
Operations exceeding the timeout are aborted.
How do I change these limits?
Add the
timeoutssection to the cluster description, such as the following:resource "yandex_mdb_mysql_cluster" "<cluster_name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } } -
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Cluster.Update method, e.g., via the following cURL
request:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-mysql/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "maintenanceWindow", "maintenanceWindow": { "weeklyMaintenanceWindow": { "day": "<day_of_week>", "hour": "<sequence_number_of_hour_interval>" } } }'Where:
-
<cluster_ID>: Cluster ID which you can get with the list of clusters in the folder. -
updateMask: Comma-separated string of settings to update.In this example, only the
maintenanceWindowsetting is provided.Warning
All settings of the cluster object you are modifying will be reset to their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter.
-
maintenanceWindow: Maintenance window settings (including for disabled clusters). Provide one of these parameters:-
anytime: Maintenance takes place at any time. This is the default value. -
weeklyMaintenanceWindow: Scheduled maintenance:-
day: Day of week (MON,TUE,WED,THU,FRI,SAT,SUN). -
hour: UTC hour interval, from1to24.For example,
1stands for the interval from00:00to01:00, and5, from04:00to05:00.
-
-
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the ClusterService.Update method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/mysql/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "maintenance_window" ] }, "maintenance_window": { "weekly_maintenance_window": { "day": "<day_of_week>", "hour": "<sequence_number_of_hour_interval>" } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.mysql.v1.ClusterService.UpdateWhere:
-
cluster_id: Cluster ID which you can get with the list of clusters in the folder. -
update_mask: List of settings to update as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }In this example, only the
maintenance_windowsetting is provided.Warning
All settings of the cluster object you are modifying will be reset to their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter.
-
maintenance_window: Maintenance window settings (including for disabled clusters). Provide one of these parameters:-
anytime: Maintenance takes place at any time. This is the default value. -
weeklyMaintenanceWindow: Scheduled maintenance:-
day: Day of week (MON,TUE,WED,THU,FRI,SAT,SUN). -
hour: UTC hour interval, from1to24.For example,
1stands for the interval from00:00to01:00, and5, from04:00to05:00.
-
-
-
-
Check the server response to make sure your request was successful.