All Products
Search
Document Center

ApsaraDB RDS:ModifyHASwitchConfig

Last Updated:Jul 05, 2024

Enables or disables the automatic primary/secondary switchover feature for an instance.

Operation description

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5xxxxxxxxxx
HAConfigstringNo

The mode of the automatic primary/secondary switchover feature. Valid values:

  • Auto: The automatic primary/secondary switchover feature is enabled. The system automatically switches your workloads over from the instance to its secondary instance in the event of a fault.
  • Manual: The automatic primary/secondary switchover feature is disabled. You must manually switch your workloads over from the instance to its secondary instance in the event of a fault.

Default value: Auto.

Note If you set this parameter to Manual, you must specify the ManualHATime parameter.
Manual
ManualHATimestringNo

The time to disable the automatic primary/secondary switchover feature. The time can range from the current time to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note This parameter takes effect only when you set the HAConfig parameter to Manual.
2019-08-29T15:00:00Z
RegionIdstringYes

The region ID. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

B6AE1448-D846-4831-B1C7-CFF3E99D5470

Examples

Sample success responses

JSONformat

{
  "RequestId": "B6AE1448-D846-4831-B1C7-CFF3E99D5470"
}

Error codes

HTTP status codeError codeError messageDescription
400HaConfig.FormatThe value of HaConfig must be auto or manualThe value of the HASwitchConfig parameter must be Auto or Manual.
400HaConfigIsNullHaConfig is null.The value of the HASwitchConfig parameter is null.
400ManualHATime.FormatInvalid format of ManualHATime.-
400ManualHATimeIsNullManualHATime can not be null when the value of haConfig is Manual.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-08The Error code has changedView Change Details
2022-09-01The Error code has changedView Change Details