最近更新时间:2021-12-20 15:21:09
申请实例EIP,即提供公网IP,用以从公网访问。
注意1:
开启外网访问生效时间大概需要1分钟,启用成功后,您可以通过外网IP和端口访问KRDS。
通过外网IP访问KRDS前,需设置访问白名单后方可正常连接KRDS。
建议KRDS外网访问仅用于辅助管理数据库或开发,业务访问建议使用内网访问。
注意2:
关闭外网访问后无法再通过外网IP和端口访问KRDS,关闭外网访问生效时间大概需要1分钟,请确认您的业务系统没有使用外网访问地址,以免给您带来不必要的损失。
确认关闭外网访问后,建议及时删除安全组内的外网访问相关的白名单。
若再次开启外网服务,则外网IP、端口都会改变。
GET
英文名称 | 中文名称 | 类型 | 是否必须 | 备注 |
---|---|---|---|---|
Action | 调用接口名称 | String | 是 | 取固定值:AllocateDBInstanceEip |
Version | API版本号 | String | 是 | 取固定值:2016-07-01 |
DBInstanceIdentifier | 实例Id | String | 是 | 实例id |
Port | EIP端口号 | String | 否 | 固定取值:[10000,65500] 未指定则默认随机分配 |
英文名称 | 中文名称 | 类型 | 备注 |
---|---|---|---|
RequestId | 请求ID | String | – |
http://krds.{{region}}.api.ksyun.com/?Action=AllocateDBInstanceEip&Version=2016-07-01&DBInstanceIdentifier=4d97f65f-5603-4373-b870-48a280ecc464
{
"Data": {
"DBInstance": {
"DBInstanceClass": {
"Id": "RDSOpenAPI_a1c0d69af36b94bb",
"Iops": 2400,
"Vcpus": 1,
"Disk": 5,
"Ram": 2,
"Mem": 2,
"MaxConn": 400
},
"DBInstanceIdentifier": "4d97f65f-5603-4373-b870-48a280ecc464",
"DBInstanceName": "Kingsoft_test",
"DBInstanceStatus": "ACTIVE",
"DBInstanceType": "HRDS",
"DBParameterGroupId": "60c3de60-033f-4101-af78-24b12974ad78",
"PreferredBackupTime": "01:00-02:00",
"GroupId": "2d2e0aac-9127-4a8e-b5aa-c67d6c7ff1d5",
"SecurityGroupId": "64506",
"Vip": "10.0.1.56",
"Port": 3306,
"Engine": "mysql",
"EngineVersion": "5.7",
"InstanceCreateTime": "2021-08-04T16:21:50+0800",
"MasterUserName": "admin",
"DatastoreVersionId": "771a9409-56ae-4b55-87b4-e087a4a59437",
"VpcId": "6ae1b03b-182c-41ea-bba2-d8157fea129d",
"SubnetId": "782249ad-da15-4f81-99e4-708842bdd85d",
"PubliclyAccessible": true,
"BillType": "HourlyInstantSettlement",
"OrderType": "REGULAR",
"MultiAvailabilityZone": false,
"MasterAvailabilityZone": "cn-beijing-6a",
"SlaveAvailabilityZone": "cn-beijing-6a",
"AvailabilityZoneList": [
{
"MemberType": "master",
"AzCode": "cn-beijing-6a"
},
{
"MemberType": "standby",
"AzCode": "cn-beijing-6a"
}
],
"DiskUsed": 1.8320312,
"InnerAzCode": "cn-beijing-6a",
"Audit": false,
"ReadReplicaDBInstanceIdentifiers": [
{
"Vip": "10.0.1.35",
"ReadReplicaDBInstanceIdentifier": "0867719f-7283-4108-bf35-55f6e1ced549",
"id": "e74dcb07-0167-4beb-8e9c-5476ce4a1394"
},
{
"Vip": "10.0.1.72",
"ReadReplicaDBInstanceIdentifier": "57ee5746-88c8-47cc-8634-2efe4255ddd2",
"id": "0713a583-64da-4649-8655-8e70105c9ee9"
}
],
"ProductId": "e7b54d25-aa5e-497f-be77-1bac7d99755c",
"ProductWhat": 1,
"ProjectId": 0,
"ProjectName": "默认项目",
"Region": "cn-beijing-6",
"ServiceStartTime": "2021-08-04T16:21:50+0800",
"SubOrderId": "HRDS2S2108101421301413TYD8Y",
"SecurityGroups": [
{
"SecurityGroupId": "64506",
"SecurityGroupName": "Kingsoft_test",
"SecurityGroupType": "IPV4"
}
],
"SupportIPV6": false,
"BillTypeId": 87
}
},
"RequestId": "36df6bea-fe18-484d-b98b-9bc621f2fc53"
}
纯净模式