调用ModifyDBProxyEndpoint接口修改RDS实例数据库代理终端设置。
已调用ModifyDBProxy接口开通数据库代理。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ModifyDBProxyEndpoint |
系统规定参数。取值:ModifyDBProxyEndpoint。 |
DBInstanceId | String | 是 | rm-bp145737x5bi6**** |
RDS实例ID。可调用DescribeDBInstances接口查询。 |
DBProxyEndpointId | String | 是 | gos787jog2wk0y**** |
代理连接地址ID。可以通过接口DescribeDBProxyEndpoint查看。 说明
|
ConfigDBProxyFeatures | String | 否 | ReadWriteSpliting:1;ConnectionPersist:0 |
设置代理连接地址想要开通的独享代理功能,各功能之间以英文分号(;)隔开。格式: 功能取值:
开通情况取值:
说明 RDS PostgreSQL仅支持设置ReadWriteSpliting。
|
RegionId | String | 否 | cn-hangzhou |
地域ID,可以通过接口DescribeRegions查看地域ID。 |
ReadOnlyInstanceMaxDelayTime | String | 否 | 30 |
读写分离中只读实例的最大延迟阈值,当只读实例延迟时间超过该值时,读取流量不发往该实例,单位:秒。不传该参数则保持原值。取值:30~3600。默认值:30。 说明 开通读写分离时才需要传入该参数。
|
ReadOnlyInstanceDistributionType | String | 否 | Standard |
读权重分配模式。取值:
说明 开通读写分离时才需要传入该参数。
权限分配模式的详细信息,MySQL请参见读权重分配,PostgreSQL请参见开通并配置数据库代理服务。 |
ReadOnlyInstanceWeight | String | 否 | {"rm-uf6wjk5xxxx":"500","rr-tfhfgk5xxx":"200"...} |
自定义读权重分配,即传入主实例和只读实例的读请求权重。以100递增,最大值为10000,格式: 说明 当ReadOnlyInstanceDistributionType取值为Custom时,您需要传入本参数。
|
DbEndpointOperator | String | 否 | Modify |
操作类型,取值:
|
DbEndpointAliases | String | 否 | test-proxy |
代理终端的备注信息。 |
DbEndpointType | String | 否 | RWSplit |
代理终端的类型,保留参数,无需设置。 |
DbEndpointReadWriteMode | String | 否 | ReadWrite |
读写类型,取值:
说明
|
DBProxyEngineType | String | 否 | normal |
内部参数,无需传入值。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 6B50D92C-1960-4D4F-A290-AFADD6B1A5C8 |
请求ID。 |
示例
请求示例
http(s)://rds.aliyuncs.com/?Action=ModifyDBProxyEndpoint
&DBInstanceId=rm-bp145737x5bi6****
&DBProxyEndpointId=gos787jog2wk0y****
&ConfigDBProxyFeatures=ReadWriteSpliting:1;ConnectionPersist:1;
&ReadOnlyInstanceMaxDelayTime=30
&ReadOnlyInstanceDistributionType=Standard
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBProxyEndpointResponse>
<RequestId>6B50D92C-1960-4D4F-A290-AFADD6B1A5C8</RequestId>
</ModifyDBProxyEndpointResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6B50D92C-1960-4D4F-A290-AFADD6B1A5C8"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidVpcInstanceId | The specified VPC instance ID is invalid. | 操作失败,当前VPC instance ID无效。 |
400 | InvalidEndPoint.Format | The specified EndPoint is not valid. | 独享代理连接地址ID(DBProxyEndpointId)未传,查询不存在, 请检查Endpoint参数。 |
400 | InvalidEndpointType.Format | The specified EndpointType is invalid. | 指定的EndpointType无效,请检查参数正确性。 |
400 | IncorrectDBInstanceNetType | The current database instance network type does not support the operation. | 操作失败,数据库实例网络类型不支持此操作。 |
400 | EndpointNum.Error | The number of endpoint is invalid. | 当前终端数量不符合要求,请检查支持的终端数量。 |
400 | EndpointTypeOperation.NotSupport | The endpoint type does not support the operation. | 当前终端类型不支持此操作,请检查代理终端类型。 |
400 | InvalidDBInstanceName | Specified parameter DBInstanceName is not valid. | 指定的实例名称(DBInstanceName)无效,请检查参数值是否为null或空字符串。 |
400 | ClusterEndpoint.StatusNotValid | The cluster endpoint status is invalid. | 集群endpoint 状态无效。 |
403 | MaxScaleLevel.NotSupport | The current maxscale ins_num does not support this operation. | 操作失败,当前数据库代理规格不支持此操作。 |
403 | ReadDBInstance.NotFound | The current database instance does not contain any read only instance. | 当前数据库实例没有只读实例。 |
403 | IncorrectKindCode | The current KindCode of the custins does not support the operation. | 操作失败,当前实例所属环境类型不支持,请检查接口支持的实例类型。 |
403 | IncorrectDBInstanceState | The current database instance state does not support the operation. | 操作失败,数据库状态不支持此操作。请查看数据库信息,确保数据库状态为运行中。 |
404 | EndpointConfig.Invalid | Please check the endpoint config parameter. | 代理终端配置不正确。请检查参数是否正确。 |
404 | Readins.NotFound | The current instance does not contain any read only instance. The operation is not supported. | 操作失败,当前实例不存在只读实例。 |
404 | Endpoint.NotFound | Specified endpoint is not found. | 未找到指定独享代理连接地址的端口。 |
404 | EndpointType.NotFound | The specified endpoint type is not found. | 操作失败,未知的代理终端类型,请检查终端类型。 |
404 | InvalidReadDBInstance.NotFound | The specified read only database instance does not exist. | 只读实例未创建或请求实例参数有误。 |
404 | InvalidParam | The specified Weight is invalid. | 权重无效。 |
访问错误中心查看更多错误码。