我正在尝试使用 java SDK 使用用户数据脚本启动 linux 实例但我收到此错误:
Forbidden.RiskControl, This operation is forbidden by Aliyun RiskControl system
任何想法?
这是我的代码:
CommonRequest commonRequest = new CommonRequest();
commonRequest.setDomain("ecs.aliyuncs.com");
commonRequest.setMethod(MethodType.POST);
commonRequest.setVersion("2014-05-26");
commonRequest.setAction("RunInstances");
commonRequest.setRegionId("us-west-1");
commonRequest.putBodyParameter("ImageId", "centos_6_09_64_20G_alibase_20180326.vhd");
commonRequest.putBodyParameter("InstanceType", "ecs.sn1.medium");
commonRequest.putBodyParameter("SecurityGroupId", "sg-1234");
commonRequest.putBodyParameter("VSwitchId", "vsw-1234");
commonRequest.putBodyParameter("KeyPairName", "key-pair");
commonRequest.putBodyParameter("InternetMaxBandwidthOut", 1);
commonRequest.putBodyParameter("UserData", "IyEvYmluL2Jhc2gNCg0KZWNobyAiaGVsbG8iID4gL3RtcC9maWxlMS50eHQNCmVjaG8gImhlbGxvIiA+IGZpbGUxLnR4dA==");
CommonResponse commonResponse = client2.getCommonResponse(commonRequest);