fbpx
GEThttps://api.spotinst.io/aws/ec2/group/beanstalk/import?region={REGION}&environmentId={ENVIRONMENT_ID}&accountId={ACCOUNT_ID}

Get your Beanstalk environment configuration from AWS. This call is typically used as the initial step in importing your existing Beanstalk configuration to an Elastigroup.

Note: To optimize the availability of your Beanstalk workload on Elastigroup, instance types similar to those running in your existing configuration are automatically added to the response under instanceTypes. Should these instance types not meet your requirements you may remove them.

 

.

 

 

URL Parameters

Parameter Type Description
ENVIRONMENT_ID * String

The ASG name

Example: e-12345
REGION * String

The AWS region for the ASG

Example: us-east-1
ACCOUNT_ID String

Your account id in spotinst

Example: act-12345
Request

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
    "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "url": "/aws/ec2/group/beanstalk/import?region=us-west-2&environmentId=e-12345",
    "method": "GET"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:ec2:group",
    "items": [
      {
        "name": "e-12345 group",
        "description": "Linked to environment: e-12345",
        "capacity": {
          "minimum": 0,
          "maximum": 1,
          "target": 0
        },
        "strategy": {
          "risk": 100
        },
        "compute": {
          "instanceTypes": {
            "ondemand": "t2.micro",
            "spot": []
          },
          "availabilityZones": [
            {
              "name": "us-west-2a"
            },
            {
              "name": "us-west-2b"
            },
            {
              "name": "us-west-2c"
            }
          ],
          "launchSpecification": {
            "loadBalancersConfig": {
              "loadBalancers": [
                {
                  "name": "awseb-AWSEB-12345",
                  "arn": "arn:aws:elasticloadbalancing:us-west-2:842422002533:targetgroup/awseb-AWSEB-12345/245f20215d9ba7fc",
                  "type": "TARGET_GROUP"
                }
              ]
            },
            "healthCheckType": "EC2",
            "securityGroupIds": [
              "sg-12345"
            ],
            "monitoring": false,
            "imageId": "ami-12345",
            "iamRole": {
              "name": "aws-elasticbeanstalk-ec2-role"
            },
            "userData": "Q29udGVudC1UeXBlOiBtdWx0aXBhcnQv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NlTGF1bmNoV2FpdEhhbmRsZT9BV1NBY2Nlc3NLZXlJZD1BS0lBSVk1Uk00RFVYTVUyNUtOQSZFeHBpcmVzPTE1MTU1MTE1MDkmU2lnbmF0dXJlPWkydnFSekhLQkdXbWNkU2p5U0hpQlp5NU1QWSUzRCcgICAgJ2Fybjphd3M6Y2xvdWRmb3JtYXRpb246dXMtd2VzdC0yOjg0MjQyMjAwMjUzMzpzdGFjay9hd3NlYi1lLWhoc3R0Y2txOWEtc3RhY2svMWEyNTQ4MzAtZjQ4OC0xMWU3LThhMDEtNTAzYWM5ZWMyNGQxJyAgICAndXMtd2VzdC0yJyAgICAnMTljYWI5NDRiN2Y4JyAgICAnYzk4ZjliMmItYmExNy00MTdhLTljMGEtZTM1YmI2NjY3ZDc4JyAgICAnJyAgICAnbmdpbngnICAgICcnICAgICYmIAogICAgZXhpdCAwICAKICBmaSAKZG9uZQoKLS09PT09PT09PT09PT09PT01MTg5MDY1Mzc3MjIyODk4NDA3PT0tLSA=",
            "tags": [
              {
                "tagKey": "elasticbeanstalk:environment-id",
                "tagValue": "e-12345"
              },
              {
                "tagKey": "elasticbeanstalk:environment-name",
                "tagValue": "Beanstalk-test"
              }
            ]
          }
        },
        "scaling": {
          "up": [
            {
              "policyName": "awseb-e-12345-stack-AWSEBCloudwatchAlarmHigh-56QPITB3WUFM",
              "metricName": "NetworkOut",
              "statistic": "average",
              "unit": "bytes",
              "threshold": 6000000,
              "namespace": "AWS/EC2",
              "source": "cloudWatch",
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 360,
              "dimensions": [
                {
                  "name": "InstanceId"
                }
              ],
              "action": {
                "type": "adjustment",
                "adjustment": "1"
              },
              "operator": "gte"
            }
          ],
          "down": [
            {
              "policyName": "awseb-e-12345-stack-AWSEBCloudwatchAlarmLow-UNGVBRKT0EHP",
              "metricName": "NetworkOut",
              "statistic": "average",
              "unit": "bytes",
              "threshold": 2000000,
              "namespace": "AWS/EC2",
              "source": "cloudWatch",
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 360,
              "dimensions": [
                {
                  "name": "InstanceId"
                }
              ],
              "action": {
                "type": "adjustment",
                "adjustment": "1"
              },
              "operator": "lte"
            }
          ]
        },
        "thirdPartiesIntegration": {
          "elasticBeanstalk": {
            "environmentId": "e-12345"
          }
        }
      }
    ],
    "count": 1
  }
}