Obtains the automatic master/slave switchover settings of an RDS instance.

After the switchover, the master instance becomes the slave instance. For more information, see Manually or automatically switch over services between the RDS for MySQL master and slave instances.

The RDS instance on which you call this API action must use the MySQL High-availability Edition.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

ID Type Required Example value Description
Action String Yes DescribeHASwitchConfig The name of this API action. Value: DescribeHASwitchConfig.
RegionId String Yes cn-hangzhou

The ID of the region to which the RDS instance belongs. You can call the DescribeRegions API action to obtain this region ID.

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the RDS instance.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID that Alibaba Cloud issues to a user for service access.

Response elements

ID Type Example value Description
HAConfig String Manual

The automatic switchover settings. Values:

  • Auto: The system automatically switches services over from the master instance to the slave instance in the event of a fault.
  • Manual: The system temporarily disables the automatic switchover function.
ManualHATime String 2019-08-29T15:00:00Z

The time when the period during which the automatic switchover function is temporarily disables elapses.

RequestId String 4FDF4B79-2741-4C5F-8C76-4B953FC5C2B1

The ID of the request.

Examples

Request example:


http(s)://rds.aliyuncs.com/? Action=DescribeHASwitchConfig
&RegionId=cn-hangzhou
&DBInstanceId=rm-uf6wjk5xxxxxxxxxx
&<Public request parameters>

Response example:

XML format:

<DescribeHASwitchConfigResponse>
  <ManualHATime>2019-08-29T15:00:00Z</ManualHATime>
	  <RequestId> 4FDF4B79-2741-4C5F-8C76-4B953FC5C2B1 </RequestId>
	  <HAConfig>Manual</HAConfig>
</DescribeHASwitchConfigResponse>

JSON format:

{
	"ManualHATime":"2019-08-29T15:00:00Z",
	"RequestId":"4FDF4B79-2741-4C5F-8C76-4B953FC5C2B1",
	"HAConfig":"Manual"
}

Errors

For a list of error codes, visit the API Error Center.