开发者社区> 问答> 正文

怎样修改连接地址过期时间


描述


当实例在混访模式下(同时包含VPC和经典网络两种网络类型的实例),可修改经典网络使用期限。

输入参数

名称类型是否必须描述
ActionString系统规定参数,取值:ModifyDBInstanceNetworkExpireTime。
DBInstanceIdString实例ID。
ConnectionStringString要延期的经典网络连接串,经典网络字符串有两种:当前实例的经典网络字符串,读写分离的经典网络字符串。
ClassicExpiredDaysInteger经典网络字符串保留天数[1-120]。


返回参数

名称类型描述
<公共返回参数>详见公共参数


示例

  1. [backcolor=transparent]public[backcolor=transparent] [backcolor=transparent]static[backcolor=transparent] [backcolor=transparent]void[backcolor=transparent] main[backcolor=transparent]([backcolor=transparent]String[backcolor=transparent][][backcolor=transparent] args[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
  2. [backcolor=transparent]        [backcolor=transparent]ModifyDBInstanceNetExpireTimeRequest[backcolor=transparent] request [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]new[backcolor=transparent] [backcolor=transparent]ModifyDBInstanceNetExpireTimeRequest[backcolor=transparent]();
  3. [backcolor=transparent]        request[backcolor=transparent].[backcolor=transparent]setClassicExpiredDays[backcolor=transparent]([backcolor=transparent]3[backcolor=transparent]);
  4. [backcolor=transparent]        request[backcolor=transparent].[backcolor=transparent]setConnectionString[backcolor=transparent]([backcolor=transparent]"<链接字符串>"[backcolor=transparent]);
  5. [backcolor=transparent]        request[backcolor=transparent].[backcolor=transparent]setDBInstanceId[backcolor=transparent]([backcolor=transparent]"<实例Id>"[backcolor=transparent]);
  6. [backcolor=transparent]        [backcolor=transparent]IClientProfile[backcolor=transparent] profile
  7. [backcolor=transparent]                [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]DefaultProfile[backcolor=transparent].[backcolor=transparent]getProfile[backcolor=transparent]([backcolor=transparent]"cn-qingdao"[backcolor=transparent],[backcolor=transparent] [backcolor=transparent]"<你的ak>"[backcolor=transparent],
  8. [backcolor=transparent]                [backcolor=transparent]"<你的sk>"[backcolor=transparent]);
  9. [backcolor=transparent]        [backcolor=transparent]IAcsClient[backcolor=transparent] client [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]new[backcolor=transparent] [backcolor=transparent]DefaultAcsClient[backcolor=transparent]([backcolor=transparent]profile[backcolor=transparent]);
  10. [backcolor=transparent]        [backcolor=transparent]try[backcolor=transparent] [backcolor=transparent]{
  11. [backcolor=transparent]            [backcolor=transparent]ModifyDBInstanceNetExpireTimeResponse[backcolor=transparent] response
  12. [backcolor=transparent]                    [backcolor=transparent]=[backcolor=transparent] client[backcolor=transparent].[backcolor=transparent]getAcsResponse[backcolor=transparent]([backcolor=transparent]request[backcolor=transparent]);
  13. [backcolor=transparent]            [backcolor=transparent]System[backcolor=transparent].[backcolor=transparent]out[backcolor=transparent].[backcolor=transparent]println[backcolor=transparent]([backcolor=transparent]response[backcolor=transparent].[backcolor=transparent]getRequestId[backcolor=transparent]());
  14. [backcolor=transparent]        [backcolor=transparent]}[backcolor=transparent]catch[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]ServerException[backcolor=transparent] e[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
  15. [backcolor=transparent]            e[backcolor=transparent].[backcolor=transparent]printStackTrace[backcolor=transparent]();
  16. [backcolor=transparent]        [backcolor=transparent]}
  17. [backcolor=transparent]        [backcolor=transparent]catch[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]ClientException[backcolor=transparent] e[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
  18. [backcolor=transparent]            e[backcolor=transparent].[backcolor=transparent]printStackTrace[backcolor=transparent]();
  19. [backcolor=transparent]        [backcolor=transparent]}
  20. [backcolor=transparent]    [backcolor=transparent]}

展开
收起
云栖大讲堂 2017-10-19 09:55:51 1736 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
探索连接的最后十秒”落时”的网关 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载