Launch linux instance with user data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IvanH
    New Member
    • Nov 2017
    • 51

    Launch linux instance with user data

    Hi
    I'm trying to lauch linux instance with user data script using the java SDK
    But i'm getting this error: Forbidden.RiskC ontrol, This operation is forbidden by Aliyun RiskControl system
    Any idea?

    This is my code:

    CommonRequest commonRequest = new CommonRequest() ;
    commonRequest.s etDomain("ecs.a liyuncs.com");
    commonRequest.s etMethod(Method Type.POST);
    commonRequest.s etVersion("2014-05-26");
    commonRequest.s etAction("RunIn stances");
    commonRequest.s etRegionId("us-west-1");
    commonRequest.p utBodyParameter ("ImageId", "centos_6_09_64 _20G_alibase_20 180326.vhd");
    commonRequest.p utBodyParameter ("InstanceType" , "ecs.sn1.medium ");
    commonRequest.p utBodyParameter ("SecurityGroup Id", "sg-1234");
    commonRequest.p utBodyParameter ("VSwitchId" , "vsw-1234");
    commonRequest.p utBodyParameter ("KeyPairNam e", "key-pair");
    commonRequest.p utBodyParameter ("InternetMaxBa ndwidthOut", 1);
    commonRequest.p utBodyParameter ("UserData", "IyEvYmluL2Jhc2 gNCg0KZWNobyAia GVsbG8iID4gL3Rt cC9maWxlMS50eHQ NCmVjaG8gImhlbG xvIiA+IGZpbGUxL nR4dA==");

    CommonResponse commonResponse = client2.getComm onResponse(comm onRequest);
  • Andrea1701
    New Member
    • Nov 2017
    • 34

    #2
    Since you are writing code to launch instances, you appear to be a serious developer.

    A couple of suggestions:

    1) The support forums cannot help you with this type of issue.
    2) You have three free support tickets that you can open each month. For this issue, open a ticket.
    3) I highly recommend their developer support level. It is inexpensive for the quality of support that you receive.

    Comment

    Working...