该接口用于为RDS MySQL集群系列实例创建Endpoint的外网连接地址。
接口说明
适用引擎
RDS MySQL
注意事项
- 创建Endpoint的外网连接地址,在一个Endpoint没有外网地址时,才可以创建该Endpoint外网地址。
- 流量分配权重等配置与该Endpoint的内网地址的配置一致。每一个Endpoint只能有一个外网地址和内网地址。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI
Explorer可以自动生成SDK代码示例。
调试调试
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:CreateDBInstanceEndpointAddress | Write |
|
|
无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
ClientToken | string | 否 |
该参数用于保证请求的幂等性,防止重复提交请求。参数值由客户端生成,保证在不同请求间唯一。 该参数值由ASCII字符组成,最长不超过64个字符,不能包含非ASCII字符。 |
6000170000591aed949d0f**** |
DBInstanceId | string | 是 |
实例ID。可调用DescribeDBInstances查询。 |
rm-**** |
DBInstanceEndpointId | string | 是 |
实例的Endpoint ID。可调用DescribeDBInstanceEndpoints查询。 |
ep-**** |
ConnectionStringPrefix | string | 是 |
外网连接地址的前缀。 |
rm-**** |
Port | string | 是 |
外网连接地址端口号。 |
3306 |
IpType | string | 是 |
连接地址的网络类型,仅支持外网类型,取值为Public。 |
Public |
ResourceGroupId | string | 否 |
资源组ID。可调用DescribeDBInstanceAttribute获取。 |
rg-acfmy**** |
返回参数
名称 | 类型 | 描述 | 示例值 |
---|---|---|---|
object |
返回参数详情。 |
||
Data | object |
返回字段列表。 |
|
DBInstanceName | string |
实例ID。 |
rm-**** |
DBInstanceEndpointId | string |
实例的Endpoint ID。 |
ep-**** |
ConnectionString | string |
外网连接地址。 |
rm-****.mysql.rds.aliyuncs.com |
RequestId | string |
请求ID。 |
08A3B71B-FE08-4B03-974F-CC7EA6DB1828 |
示例
正常返回示例
JSON
格式
{
"Data": {
"DBInstanceName": "rm-****",
"DBInstanceEndpointId": "ep-****",
"ConnectionString": "rm-****.mysql.rds.aliyuncs.com"
},
"RequestId": "08A3B71B-FE08-4B03-974F-CC7EA6DB1828"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidSourceCategory | specified source category is invalid. | 指定的源类别无效。 |
400 | InvalidDBInstanceConnType.Format | Specified DB instance conn type is not valid. | 操作失败,当前数据库实例的连接类型不支持此操作。 |
400 | IncorrectDBInstanceNetType | Current DB instance net type does not support this operation. | 操作失败,实例网络类型不支持。 |
400 | EndpointType.NotSupport | Current db type is not support specified endpoint type. | 不支持传入的Endpoint的类型。 |
400 | APICallingFailed | Meta db calling failed. | API调用异常。 |
400 | EngineNotSupported | The engine does not support the operation. | 当前引擎不支持此操作。 |
400 | InvalidEngineVersion.NotSupport | The specified parameter “EngineVersion” is not valid. | 无效的引擎版本参数。请重新设置:MySQL:5.5/5.6/5.7;SQLServer:2008r2/2012;PostgreSQL:9.4;PPAS:9.3。 |
400 | InvalidBizType.Format | Specified biz type is not valid. | 当前业务类型不支持该操作。 |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | 当前实例状态不支持此操作。 |
403 | NetTypeExists | Specified net type already existed. | 网络类型切换失败,当前网络类型已经存在。 |
404 | InvalidDBInstanceName.NotFound | Invalid DBInstanceId NotFound. | 数据库实例ID不存在,请检查。 |
404 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | 操作失败,实例处于锁定状态。 |
404 | InvalidConnectionString.Duplicate | Specified connection string already exists in the Aliyun RDS. | 链接地址名重复,请重新设置连接字符串。 |
404 | Endpoint.NotFound | Specified endpoint is not existed. | 目标的endpoint不存在。 |
404 | InvalidDBInstance.NotFound | Specified instance does not exist or not support. | 指定的实例不存在指定的实例被删除或者实例不支持当前操作。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-06-27 | OpenAPI 错误码发生变更,OpenAPI 入参发生变更 | 看变更集 | ||||||||||||
|
||||||||||||||
2023-06-12 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
|
||||||||||||||
2023-05-09 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
|
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/156487.html