Error creating Farm Role using API2

43 views
Skip to first unread message

Chidambar Kulkarni

unread,
Jul 29, 2016, 12:28:26 AM7/29/16
to scalr-...@googlegroups.com
Hi,

I am getting an error while trying to automate using Scalr API2. I get an error message "API Error (InvalidStructure): You must describe a VPC Router" HTTP bad request when I am trying to create Farm Role using the API "POST /api/v1beta0/user/<env_id>/farms/<farm_id>/farm-roles/". Below is the JSON request body that is being posted to the API as mentioned in the API2 documentation here: https://api-explorer.scalr.com/user/farms/farm-roles/post.html,
Note: Subnet id specified below is a private subnet.

{'role': {'id': 83190}, 'scaling': {'maxInstances': '2', 'enabled': True, 'minInstances': '1'}, 'instance': {instanceType': {'id': 'm3.xlarge'}, 'instanceConfigurationType': 'AwsInstanceConfiguration'}, 'platform': 'ec', 'placement': {'region': 'us-east-1', 'subnets': [{'id': 'subnet-7bb1ef22'}], 'placementConfigurationType': 'AwsVpcPlacementConfiguration'}, 'alias': 'auto-micro-dcs-webportal'}

I am able to automate most of the other things that include creating roles, scripts, orchestration rules, images, global variables, farm etc. except farm role as stated above. I would appreciate any help in this regard.

Thanks,
Chidambar

Marc O'Brien

unread,
Aug 9, 2016, 12:17:46 PM8/9/16
to scalr-discuss
Hi Chidambar,

I received word that you had asked this question at the end of our recent APIv2 webinar.  As we had answered there, this issue appears to be related to a farm role validation problem that was resolved in our latest Open Source Scalr release.  If you have not already done so, please update to latest and test once more for issue resolution.

Many thanks,
Wm. Marc O'Brien
Scalr Technical Support

Chidambar Kulkarni

unread,
Aug 10, 2016, 3:05:46 AM8/10/16
to scalr-discuss
That solves the issue. Thanks Marc.
Reply all
Reply to author
Forward
0 new messages