You can call the ModifyDBInstanceProxyConfiguration operation to configure the database proxy for an instance.
Operation Description
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:ModifyDBInstanceProxyConfiguration | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. | rm-uf6wjk5xxxxxxxxxx |
ProxyConfigurationKey | string | Yes | The key of the configuration item for the database proxy. Valid values:
| TransparentSwitch |
ProxyConfigurationValue | string | Yes | The value of the configuration item for the database proxy. Valid values:
In this case, the return value is a JSON string. Example:
Description and valid values:
check_interval_seconds: 30 to 600. Unit: seconds. max_failed_login_attempts: 10 to 5000. Unit: number of times. blocking_seconds: 30 to 3600. Unit: seconds. | {"status":"Enable"} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "9705B5D2-C5B6-4526-B779-26D755EC1B8C"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ConnectionModeNotSupported | ConnectionMode specified cannot be replicate with the source DB Instance. | The operation failed. The connection mode that is specified by the ConnectionMode parameter cannot be replicated with the original RDS instance. |
400 | InvalidConfigurationValue.Malformed | Specified ConfigurationValue is not valid. | The operation failed. The values of some parameters are invalid. |
400 | InvalidConfigurationValueStatus.Malformed | Specified ProxyConfigurationValue (status) is not valid. | - |
400 | ProxyConnectionPersistExists | Specified same ProxyConnectionPersist already exists. | - |
400 | ProxyFailoverExists | Specified same ProxyFailoverExists already exists. | - |
403 | InvalidConfigurationValueOrther.Malformed | Specified ProxyConfigurationValue (check_interval_seconds or max_failed_login_attempts or blocking_seconds ) is not valid. | The value of the ProxyConfigurationValue parameter is invalid. Check the value of this parameter before you proceed. |
403 | ProxyConnectionPersist.NotFound | Specified ProxyConnectionPersist is not found. | - |
403 | ProxyConnectionPersistParametersInvalid | ProxyConnectionPersist parameter out of range. | - |
403 | InvalidConfigValue | ProxyConnectionPersist parameter config table not exits or data error. | - |
403 | InvalidDBInstance.NotFound | Specified instance does not exist or not support. | The RDS instance cannot be found, is deleted, or does not support the operation. |
403 | ProxyFailover.NotFound | Specified ProxyFailover is not found. | - |
404 | EngineVersionNotSupported | EngineVersion specified cannot be replicate with the source DB Instance. | Instance cloning is not supported for the database engine version of the current instance. |
404 | EngineNotSupported | Engine specified cannot be supported the operation. | The operation failed. This operation is not supported for the database engine version of the RDS instance. Update the minor engine version of the RDS instance. |
For a list of error codes, visit the Service error codes.