描述
当实例在混访模式下(同时包含VPC和经典网络两种网络类型的实例),可修改经典网络使用期限。
输入参数
返回参数
示例
- [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]{
- [backcolor=transparent] [backcolor=transparent]ModifyDBInstanceNetExpireTimeRequest[backcolor=transparent] request [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]new[backcolor=transparent] [backcolor=transparent]ModifyDBInstanceNetExpireTimeRequest[backcolor=transparent]();
- [backcolor=transparent] request[backcolor=transparent].[backcolor=transparent]setClassicExpiredDays[backcolor=transparent]([backcolor=transparent]3[backcolor=transparent]);
- [backcolor=transparent] request[backcolor=transparent].[backcolor=transparent]setConnectionString[backcolor=transparent]([backcolor=transparent]"<链接字符串>"[backcolor=transparent]);
- [backcolor=transparent] request[backcolor=transparent].[backcolor=transparent]setDBInstanceId[backcolor=transparent]([backcolor=transparent]"<实例Id>"[backcolor=transparent]);
- [backcolor=transparent] [backcolor=transparent]IClientProfile[backcolor=transparent] profile
- [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],
- [backcolor=transparent] [backcolor=transparent]"<你的sk>"[backcolor=transparent]);
- [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]);
- [backcolor=transparent] [backcolor=transparent]try[backcolor=transparent] [backcolor=transparent]{
- [backcolor=transparent] [backcolor=transparent]ModifyDBInstanceNetExpireTimeResponse[backcolor=transparent] response
- [backcolor=transparent] [backcolor=transparent]=[backcolor=transparent] client[backcolor=transparent].[backcolor=transparent]getAcsResponse[backcolor=transparent]([backcolor=transparent]request[backcolor=transparent]);
- [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]());
- [backcolor=transparent] [backcolor=transparent]}[backcolor=transparent]catch[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]ServerException[backcolor=transparent] e[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
- [backcolor=transparent] e[backcolor=transparent].[backcolor=transparent]printStackTrace[backcolor=transparent]();
- [backcolor=transparent] [backcolor=transparent]}
- [backcolor=transparent] [backcolor=transparent]catch[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]ClientException[backcolor=transparent] e[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]{
- [backcolor=transparent] e[backcolor=transparent].[backcolor=transparent]printStackTrace[backcolor=transparent]();
- [backcolor=transparent] [backcolor=transparent]}
- [backcolor=transparent] [backcolor=transparent]}