该接口用于修改实例的连接地址和端口。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:ModifyDBInstanceConnectionString | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DBInstanceId | string | 是 | 实例 ID。可调用 DescribeDBInstances 获取。 | rm-uf6wjk5**** |
CurrentConnectionString | string | 是 | 实例当前的某个连接地址,可以是内外网连接地址,或者混访模式下的经典网络连接地址。 说明
不支持修改读写分离连接地址。
| rm-uf6wjk5x****.mysql.rds.aliyuncs.com |
ConnectionStringPrefix | string | 是 | 目标连接地址的前缀,即只能修改 CurrentConnectionString 参数的前缀部分。 说明
长度 8~64,不能包含汉字和非法字符(~!#%^&*=+|{};:'",<>/?),建议由字母、数字、短横线(-)组成。
| rm-**** |
Port | string | 是 | 目标端口。 | 3306 |
BabelfishPort | string | 否 | Babelfish for RDS PostgreSQL TDS 端口号。 说明
该参数仅适用于 RDS PostgreSQL 实例,Babelfish for RDS PostgreSQL 的更多介绍,请参见 Babelfish 简介。
| 1433 |
GeneralGroupName | string | 否 | 专属集群 MySQL 通用版实例所属的组名。 | rgc-bp1tkv8**** |
PGBouncerPort | string | 否 | PgBouncer 端口号。 说明
该参数仅适用于 RDS PostgreSQL 实例,如果开启了 PgBouncer,则支持修改 PgBouncer 端口号。
| 6432 |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "65BDA532-28AF-4122-AA39-B382721EEE64"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | DnsConflict | Dns is conflict with other custins. | DNS与其他客户端冲突。 |
400 | InvalidConnectionString.Malformed | The specified parameter ConnectionStringPrefix is not valid. | - |
400 | OperationDenied.DBInstanceStatus | The operation is not permitted due to status of instance. | 操作失败,当前实例状态不支持此操作。 |
400 | InvalidConnectionString.NotFound | The specified connection string or network type is not found. | 连接串不存在。请检查连接串是否正确。 |
400 | MissingConnectionString | The request is missing a ConnectionString parameter. | 操作失败,请求缺少要延期的经典网络连接地址(ConnectionString)。 |
400 | OtherEndpoint.Exist | Other endpoint exist. | 外网连接地址的前缀已存在 |
400 | Endpoint.NotFound | Specified endpoint is not found. | 未找到指定独享代理连接地址的端口。 |
400 | InvalidPort.Format | Specified Port is not valid. | 指定的端口无效。 |
400 | Order.ComboInstanceNotAllowOperate | A package instance is not allowed to operate independently. | 套餐实例不允许单独操作。 |
400 | Price.PricingPlanResultNotFound | Pricing plan price result not found. | 定价计划价格结果没有找到。 |
400 | Order.NoRealNameAuthentication | You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. | 您还未通过实名认证,不符合购买条件,请登录用户中心进行实名认证。 |
400 | InsufficientAvailableQuota | Your account quota limit is less than 0, please recharge before trying to purchase. | 您的账户可用额度小于0,请先充值后再尝试购买。 |
400 | CommodityServiceCalling.Exception | Failed to call commodity service. | 调用商品服务返回失败。 |
404 | InvalidConnectionString.Duplicate | Specified connection string already exists in the Aliyun RDS. | 链接地址名重复,请重新设置连接字符串。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-03-14 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||
| ||||||||||||
2023-06-27 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 看变更集 | ||||||||||
| ||||||||||||
2022-09-01 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||
| ||||||||||||
2022-06-23 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||
| ||||||||||||
2022-04-25 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||
| ||||||||||||
2022-04-25 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 看变更集 | ||||||||||
|