Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

having issue creating AWS Elastic with VPC via API call

Ok  so here is my issue:

using Post Man i am try to write code that will 

Create elastic image configuration, it does work but i need to use a VPC when I spec out the VPC in subnets i get an error

 

This works:

{
  "configurationName": "Test-bill2",
  "configurationDescription": "AAP Test",
  "imageId": "ami-0ebba1413ed727061",
  "ebsEnabled": false,
  "instanceType": "M3Large",
  "product": "Linux/UNIX",
  "architecture": "x86_64",
  "region": "us-gov-west-1",
}
The problem is i use a VPC and I can't see where i set that so I tried:

{
  "configurationName": "Test-bill3",
  "configurationDescription": "AAP Test",
  "imageId": "ami-0ebba1413ed727061",
  "ebsEnabled": false,
  "instanceType": "M3Large",
  "product": "Linux/UNIX",
  "architecture": "x86_64",
  "region": "us-gov-west-1",
  "subnetIds": [
    "subnet-88c0f4ec"
  ]
}
and i get back
{
    "message": "Unrecognized field \"subnetIds\" (Class com.atlassian.bamboo.plugins.rest.model.elasticConfig.RestElasticImageConfig), not marked as ignorable\n at [Source: org.apache.catalina.connector.CoyoteInputStream@3fe18880; line: 10, column: 17] (through reference chain: com.atlassian.bamboo.plugins.rest.model.elasticConfig.RestElasticImageConfig[\"subnetIds\"])",
    "status-code": 400
}
i also tried setting the subnet to the VPC still no joy and cant find any examples
Thanks in advance

Bill

1 answer

1 accepted

1 vote
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 16, 2023 • edited

Hello @William Flow

There's a bug in the REST API documentation, please use "subnetId" instead (singular). It is also the case in "availabilityZone".

You always call a GET o the "/rest/api/latest/elasticConfiguration" endpoint to list all the available options and their format.

Thank you,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

no joy but get a different error body i sent

{
  "configurationName": "Test-bill67",
  "configurationDescription": "AAP Test",
  "imageId": "ami-0ebba1413ed727061",
  "ebsEnabled": false,
  "instanceType": "M3Large",
  "product": "Linux/UNIX",
  "architecture": "x86_64",
  "region": "us-gov-west-1",
  "subnetId": [
    "subnet-3ac9fd5e"
  ],
  "availabilityZone": [
    "us-gov-west-1a"
  ]
}
got back 
{
    "message": "Can not deserialize instance of java.lang.String out of START_ARRAY token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@3fe18880; line: 9, column: 28] (through reference chain: com.atlassian.bamboo.plugins.rest.model.elasticConfig.RestElasticImageConfig[\"subnetId\"])",
    "status-code": 400
}

never mind I fixed it this works

 

{
  "configurationName": "Test-bill68",
  "configurationDescription": "AAP Test",
  "imageId": "ami-0ebba1413ed727061",
  "ebsEnabled": false,
  "instanceType": "M3Large",
  "product": "Linux/UNIX",
  "architecture": "x86_64",
  "region": "us-gov-west-1",
  "availabilityZone": "us-gov-west-1a,us-gov-west-1b",
  "subnetId": "subnet-88c0f4ec,subnet-63764615"
}
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 17, 2023 • edited

Hello @William Flow 

Thanks for reporting that. We have opened a bug to track that fix. You can watch it to follow its progress.

Cheers,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events