AWS Elastic Beanstalk

2015/08/12 - AWS Elastic Beanstalk - 2 new 4 updated api methods

DescribeInstancesHealth (new) Link ¶

Returns more detailed information about the health of the specified instances (for example, CPU utilization, load average, and causes). The DescribeInstancesHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.

Request Syntax

client.describe_instances_health(
    EnvironmentName='string',
    EnvironmentId='string',
    AttributeNames=[
        'HealthStatus'|'Color'|'Causes'|'ApplicationMetrics'|'RefreshedAt'|'LaunchedAt'|'System'|'All',
    ],
    NextToken='string'
)
type EnvironmentName

string

param EnvironmentName

Specifies the AWS Elastic Beanstalk environment name.

type EnvironmentId

string

param EnvironmentId

Specifies the AWS Elastic Beanstalk environment ID.

type AttributeNames

list

param AttributeNames

Specifies the response elements you wish to receive. If no attribute names are specified, AWS Elastic Beanstalk returns all response elements.

  • (string) --

type NextToken

string

param NextToken

Specifies the next token of the request.

rtype

dict

returns

Response Syntax

{
    'InstanceHealthList': [
        {
            'InstanceId': 'string',
            'HealthStatus': 'string',
            'Color': 'string',
            'Causes': [
                'string',
            ],
            'LaunchedAt': datetime(2015, 1, 1),
            'ApplicationMetrics': {
                'Duration': 123,
                'RequestCount': 123,
                'StatusCodes': {
                    'Status2xx': 123,
                    'Status3xx': 123,
                    'Status4xx': 123,
                    'Status5xx': 123
                },
                'Latency': {
                    'P999': 123.0,
                    'P99': 123.0,
                    'P95': 123.0,
                    'P90': 123.0,
                    'P85': 123.0,
                    'P75': 123.0,
                    'P50': 123.0,
                    'P10': 123.0
                }
            },
            'System': {
                'CPUUtilization': {
                    'User': 123.0,
                    'Nice': 123.0,
                    'System': 123.0,
                    'Idle': 123.0,
                    'IOWait': 123.0,
                    'IRQ': 123.0,
                    'SoftIRQ': 123.0
                },
                'LoadAverage': [
                    123.0,
                ]
            }
        },
    ],
    'RefreshedAt': datetime(2015, 1, 1),
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    See the example below for a sample response.

    • InstanceHealthList (list) --

      Contains the response body with information about the health of the instance.

      • (dict) --

        Represents health information from the specified instance that belongs to the AWS Elastic Beanstalk environment. Use the InstanceId property to specify the application instance for which you'd like to return data.

        • InstanceId (string) --

          The ID of the Amazon EC2 instance.

        • HealthStatus (string) --

          Returns the health status of the specified instance. For more information, see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html.

        • Color (string) --

          Represents the color indicator that gives you information about the health of the EC2 instance. For more information, see Health Colors and Statuses.

        • Causes (list) --

          Represents the causes, which provide more information about the current health status.

          • (string) --

        • LaunchedAt (datetime) --

          The time at which the EC2 instance was launched.

        • ApplicationMetrics (dict) --

          Represents the application metrics for a specified environment.

          • Duration (integer) --

            The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests ( request_count ) within the most recent time slice of 10 seconds ( duration ).

          • RequestCount (integer) --

            Average number of requests handled by the web server per second over the last 10 seconds.

          • StatusCodes (dict) --

            Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.

            • Status2xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 2xx (200, 201, etc.) status code.

            • Status3xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 3xx (300, 301, etc.) status code.

            • Status4xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 4xx (400, 401, etc.) status code.

            • Status5xx (integer) --

              The percentage of requests over the last 10 seconds that resulted in a 5xx (500, 501, etc.) status code.

          • Latency (dict) --

            Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.

            • P999 (float) --

              The average latency for the slowest 0.1 percent of requests over the last 10 seconds.

            • P99 (float) --

              The average latency for the slowest 1 percent of requests over the last 10 seconds.

            • P95 (float) --

              The average latency for the slowest 5 percent of requests over the last 10 seconds.

            • P90 (float) --

              The average latency for the slowest 10 percent of requests over the last 10 seconds.

            • P85 (float) --

              The average latency for the slowest 15 percent of requests over the last 10 seconds.

            • P75 (float) --

              The average latency for the slowest 25 percent of requests over the last 10 seconds.

            • P50 (float) --

              The average latency for the slowest 50 percent of requests over the last 10 seconds.

            • P10 (float) --

              The average latency for the slowest 90 percent of requests over the last 10 seconds.

        • System (dict) --

          Represents CPU utilization and load average information for applications running in the specified environment.

          • CPUUtilization (dict) --

            Represents CPU utilization information from the specified instance that belongs to the AWS Elastic Beanstalk environment. Use the instanceId property to specify the application instance for which you'd like to return data.

            • User (float) --

              Percentage of time that the CPU has spent in the User state over the last 10 seconds.

            • Nice (float) --

              Percentage of time that the CPU has spent in the Nice state over the last 10 seconds.

            • System (float) --

              Percentage of time that the CPU has spent in the System state over the last 10 seconds.

            • Idle (float) --

              Percentage of time that the CPU has spent in the Idle state over the last 10 seconds.

            • IOWait (float) --

              Percentage of time that the CPU has spent in the I/O Wait state over the last 10 seconds.

            • IRQ (float) --

              Percentage of time that the CPU has spent in the IRQ state over the last 10 seconds.

            • SoftIRQ (float) --

              Percentage of time that the CPU has spent in the SoftIRQ state over the last 10 seconds.

          • LoadAverage (list) --

            Load average in the last 1-minute and 5-minute periods. For more information, see Operating System Metrics.

            • (float) --

    • RefreshedAt (datetime) --

      The date and time the information was last refreshed.

    • NextToken (string) --

      The next token.

DescribeEnvironmentHealth (new) Link ¶

Returns information about the overall health of the specified environment. The DescribeEnvironmentHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.

Request Syntax

client.describe_environment_health(
    EnvironmentName='string',
    EnvironmentId='string',
    AttributeNames=[
        'Status'|'Color'|'Causes'|'ApplicationMetrics'|'InstancesHealth'|'All'|'HealthStatus'|'RefreshedAt',
    ]
)
type EnvironmentName

string

param EnvironmentName

Specifies the AWS Elastic Beanstalk environment name.

type EnvironmentId

string

param EnvironmentId

Specifies the AWS Elastic Beanstalk environment ID.

type AttributeNames

list

param AttributeNames

Specifies the response elements you wish to receive. If no attribute names are specified, AWS Elastic Beanstalk returns all response elements.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'EnvironmentName': 'string',
    'HealthStatus': 'string',
    'Status': 'Green'|'Yellow'|'Red'|'Grey',
    'Color': 'string',
    'Causes': [
        'string',
    ],
    'ApplicationMetrics': {
        'Duration': 123,
        'RequestCount': 123,
        'StatusCodes': {
            'Status2xx': 123,
            'Status3xx': 123,
            'Status4xx': 123,
            'Status5xx': 123
        },
        'Latency': {
            'P999': 123.0,
            'P99': 123.0,
            'P95': 123.0,
            'P90': 123.0,
            'P85': 123.0,
            'P75': 123.0,
            'P50': 123.0,
            'P10': 123.0
        }
    },
    'InstancesHealth': {
        'NoData': 123,
        'Unknown': 123,
        'Pending': 123,
        'Ok': 123,
        'Info': 123,
        'Warning': 123,
        'Degraded': 123,
        'Severe': 123
    },
    'RefreshedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    See the example below for a sample response.

    • EnvironmentName (string) --

      The AWS Elastic Beanstalk environment name.

    • HealthStatus (string) --

      Contains the response body with information about the health of the environment.

    • Status (string) --

      Returns the health status value of the environment. For more information, see Health Colors and Statuses.

    • Color (string) --

      Returns the color indicator that tells you information about the health of the environment. For more information, see Health Colors and Statuses.

    • Causes (list) --

      Returns potential causes for the reported status.

      • (string) --

    • ApplicationMetrics (dict) --

      Represents the application metrics for a specified environment.

      • Duration (integer) --

        The amount of time that the metrics cover (usually 10 seconds). For example, you might have 5 requests ( request_count ) within the most recent time slice of 10 seconds ( duration ).

      • RequestCount (integer) --

        Average number of requests handled by the web server per second over the last 10 seconds.

      • StatusCodes (dict) --

        Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response.

        • Status2xx (integer) --

          The percentage of requests over the last 10 seconds that resulted in a 2xx (200, 201, etc.) status code.

        • Status3xx (integer) --

          The percentage of requests over the last 10 seconds that resulted in a 3xx (300, 301, etc.) status code.

        • Status4xx (integer) --

          The percentage of requests over the last 10 seconds that resulted in a 4xx (400, 401, etc.) status code.

        • Status5xx (integer) --

          The percentage of requests over the last 10 seconds that resulted in a 5xx (500, 501, etc.) status code.

      • Latency (dict) --

        Represents the average latency for the slowest X percent of requests over the last 10 seconds. Latencies are in seconds with one milisecond resolution.

        • P999 (float) --

          The average latency for the slowest 0.1 percent of requests over the last 10 seconds.

        • P99 (float) --

          The average latency for the slowest 1 percent of requests over the last 10 seconds.

        • P95 (float) --

          The average latency for the slowest 5 percent of requests over the last 10 seconds.

        • P90 (float) --

          The average latency for the slowest 10 percent of requests over the last 10 seconds.

        • P85 (float) --

          The average latency for the slowest 15 percent of requests over the last 10 seconds.

        • P75 (float) --

          The average latency for the slowest 25 percent of requests over the last 10 seconds.

        • P50 (float) --

          The average latency for the slowest 50 percent of requests over the last 10 seconds.

        • P10 (float) --

          The average latency for the slowest 90 percent of requests over the last 10 seconds.

    • InstancesHealth (dict) --

      Represents summary information about the health of an instance. For more information, see Health Colors and Statuses.

      • NoData (integer) --

        Grey. AWS Elastic Beanstalk and the health agent are reporting no data on an instance.

      • Unknown (integer) --

        Grey. AWS Elastic Beanstalk and the health agent are reporting an insufficient amount of data on an instance.

      • Pending (integer) --

        Grey. An operation is in progress on an instance within the command timeout.

      • Ok (integer) --

        Green. An instance is passing health checks and the health agent is not reporting any problems.

      • Info (integer) --

        Green. An operation is in progress on an instance.

      • Warning (integer) --

        Yellow. The health agent is reporting a moderate number of request failures or other issues for an instance or environment.

      • Degraded (integer) --

        Red. The health agent is reporting a high number of request failures or other issues for an instance or environment.

      • Severe (integer) --

        Red. The health agent is reporting a very high number of request failures or other issues for an instance or environment.

    • RefreshedAt (datetime) --

      The date and time the information was last refreshed.

CreateEnvironment (updated) Link ¶
Changes (response)
{'HealthStatus': 'NoData | Unknown | Pending | Ok | Info | Warning | Degraded '
                 '| Severe'}

Launches an environment for the specified application using the specified configuration.

Request Syntax

client.create_environment(
    ApplicationName='string',
    EnvironmentName='string',
    Description='string',
    CNAMEPrefix='string',
    Tier={
        'Name': 'string',
        'Type': 'string',
        'Version': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    VersionLabel='string',
    TemplateName='string',
    SolutionStackName='string',
    OptionSettings=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string',
            'Value': 'string'
        },
    ],
    OptionsToRemove=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string'
        },
    ]
)
type ApplicationName

string

param ApplicationName

[REQUIRED]

The name of the application that contains the version to be deployed.

If no application is found with this name, CreateEnvironment returns an InvalidParameterValue error.

type EnvironmentName

string

param EnvironmentName

[REQUIRED]

A unique name for the deployment environment. Used in the application URL.

Constraint: Must be from 4 to 23 characters in length. The name can contain only letters, numbers, and hyphens. It cannot start or end with a hyphen. This name must be unique in your account. If the specified name already exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Default: If the CNAME parameter is not specified, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.

type Description

string

param Description

Describes this environment.

type CNAMEPrefix

string

param CNAMEPrefix

If specified, the environment attempts to use this value as the prefix for the CNAME. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.

type Tier

dict

param Tier

This specifies the tier to use for creating this environment.

  • Name (string) --

    The name of this environment tier.

  • Type (string) --

    The type of this environment tier.

  • Version (string) --

    The version of this environment tier.

type Tags

list

param Tags

This specifies the tags applied to resources in the environment.

  • (dict) --

    Describes a tag applied to a resource in an environment.

    • Key (string) --

      The key of the tag.

    • Value (string) --

      The value of the tag.

type VersionLabel

string

param VersionLabel

The name of the application version to deploy.

If the specified application has no associated application versions, AWS Elastic Beanstalk UpdateEnvironment returns an InvalidParameterValue error.

Default: If not specified, AWS Elastic Beanstalk attempts to launch the sample application in the container.

type TemplateName

string

param TemplateName

The name of the configuration template to use in deployment. If no configuration template is found with this name, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this parameter or a SolutionStackName , but not both. If you specify both, AWS Elastic Beanstalk returns an InvalidParameterCombination error. If you do not specify either, AWS Elastic Beanstalk returns a MissingRequiredParameter error.

type SolutionStackName

string

param SolutionStackName

This is an alternative to specifying a configuration name. If specified, AWS Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack.

Condition: You must specify either this or a TemplateName , but not both. If you specify both, AWS Elastic Beanstalk returns an InvalidParameterCombination error. If you do not specify either, AWS Elastic Beanstalk returns a MissingRequiredParameter error.

type OptionSettings

list

param OptionSettings

If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.

  • (dict) --

    A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .

    • ResourceName (string) --

      A unique resource name for a time-based scaling configuration option.

    • Namespace (string) --

      A unique namespace identifying the option's associated AWS resource.

    • OptionName (string) --

      The name of the configuration option.

    • Value (string) --

      The current value for the configuration option.

type OptionsToRemove

list

param OptionsToRemove

A list of custom user-defined configuration options to remove from the configuration set for this new environment.

  • (dict) --

    A specification identifying an individual configuration option.

    • ResourceName (string) --

      A unique resource name for a time-based scaling configuration option.

    • Namespace (string) --

      A unique namespace identifying the option's associated AWS resource.

    • OptionName (string) --

      The name of the configuration option.

rtype

dict

returns

Response Syntax

{
    'EnvironmentName': 'string',
    'EnvironmentId': 'string',
    'ApplicationName': 'string',
    'VersionLabel': 'string',
    'SolutionStackName': 'string',
    'TemplateName': 'string',
    'Description': 'string',
    'EndpointURL': 'string',
    'CNAME': 'string',
    'DateCreated': datetime(2015, 1, 1),
    'DateUpdated': datetime(2015, 1, 1),
    'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
    'AbortableOperationInProgress': True|False,
    'Health': 'Green'|'Yellow'|'Red'|'Grey',
    'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
    'Resources': {
        'LoadBalancer': {
            'LoadBalancerName': 'string',
            'Domain': 'string',
            'Listeners': [
                {
                    'Protocol': 'string',
                    'Port': 123
                },
            ]
        }
    },
    'Tier': {
        'Name': 'string',
        'Type': 'string',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    Describes the properties of an environment.

    • EnvironmentName (string) --

      The name of this environment.

    • EnvironmentId (string) --

      The ID of this environment.

    • ApplicationName (string) --

      The name of the application associated with this environment.

    • VersionLabel (string) --

      The application version deployed in this environment.

    • SolutionStackName (string) --

      The name of the SolutionStack deployed with this environment.

    • TemplateName (string) --

      The name of the configuration template used to originally launch this environment.

    • Description (string) --

      Describes this environment.

    • EndpointURL (string) --

      For load-balanced, autoscaling environments, the URL to the LoadBalancer. For single-instance environments, the IP address of the instance.

    • CNAME (string) --

      The URL to the CNAME for this environment.

    • DateCreated (datetime) --

      The creation date for this environment.

    • DateUpdated (datetime) --

      The last modified date for this environment.

    • Status (string) --

      The current operational status of the environment:

      • Launching : Environment is in the process of initial deployment.

      • Updating : Environment is in the process of updating its configuration settings or application version.

      • Ready : Environment is available to have an action performed on it, such as update or terminate.

      • Terminating : Environment is in the shut-down process.

      • Terminated : Environment is not running.

    • AbortableOperationInProgress (boolean) --

      Indicates if there is an in-progress environment configuration update or application version deployment that you can cancel.

      true: There is an update in progress.

      false: There are no updates currently in progress.

    • Health (string) --

      Describes the health status of the environment. AWS Elastic Beanstalk indicates the failure levels for a running environment:

      Red : Indicates the environment is not working.

      Yellow : Indicates that something is wrong, the application might not be available, but the instances appear running.

      Green : Indicates the environment is healthy and fully functional.

      • Red : Indicates the environment is not responsive. Occurs when three or more consecutive failures occur for an environment.

      • Yellow : Indicates that something is wrong. Occurs when two consecutive failures occur for an environment.

      • Green : Indicates the environment is healthy and fully functional.

      • Grey : Default health for a new environment. The environment is not fully launched and health checks have not started or health checks are suspended during an UpdateEnvironment or RestartEnvironement request.

      Default: Grey

    • HealthStatus (string) --

      Returns the health status of the application running in your environment. For more information, see Health Colors and Statuses.

    • Resources (dict) --

      The description of the AWS resources used by this environment.

      • LoadBalancer (dict) --

        Describes the LoadBalancer.

        • LoadBalancerName (string) --

          The name of the LoadBalancer.

        • Domain (string) --

          The domain name of the LoadBalancer.

        • Listeners (list) --

          A list of Listeners used by the LoadBalancer.

          • (dict) --

            Describes the properties of a Listener for the LoadBalancer.

            • Protocol (string) --

              The protocol that is used by the Listener.

            • Port (integer) --

              The port that is used by the Listener.

    • Tier (dict) --

      Describes the current tier of this environment.

      • Name (string) --

        The name of this environment tier.

      • Type (string) --

        The type of this environment tier.

      • Version (string) --

        The version of this environment tier.

DescribeEnvironments (updated) Link ¶
Changes (response)
{'Environments': {'HealthStatus': 'NoData | Unknown | Pending | Ok | Info | '
                                  'Warning | Degraded | Severe'}}

Returns descriptions for existing environments.

Request Syntax

client.describe_environments(
    ApplicationName='string',
    VersionLabel='string',
    EnvironmentIds=[
        'string',
    ],
    EnvironmentNames=[
        'string',
    ],
    IncludeDeleted=True|False,
    IncludedDeletedBackTo=datetime(2015, 1, 1)
)
type ApplicationName

string

param ApplicationName

If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

type VersionLabel

string

param VersionLabel

If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.

type EnvironmentIds

list

param EnvironmentIds

If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.

  • (string) --

type EnvironmentNames

list

param EnvironmentNames

If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.

  • (string) --

type IncludeDeleted

boolean

param IncludeDeleted

Indicates whether to include deleted environments:

true : Environments that have been deleted after IncludedDeletedBackTo are displayed.

false : Do not include deleted environments.

type IncludedDeletedBackTo

datetime

param IncludedDeletedBackTo

If specified when IncludeDeleted is set to true , then environments deleted after this date are displayed.

rtype

dict

returns

Response Syntax

{
    'Environments': [
        {
            'EnvironmentName': 'string',
            'EnvironmentId': 'string',
            'ApplicationName': 'string',
            'VersionLabel': 'string',
            'SolutionStackName': 'string',
            'TemplateName': 'string',
            'Description': 'string',
            'EndpointURL': 'string',
            'CNAME': 'string',
            'DateCreated': datetime(2015, 1, 1),
            'DateUpdated': datetime(2015, 1, 1),
            'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
            'AbortableOperationInProgress': True|False,
            'Health': 'Green'|'Yellow'|'Red'|'Grey',
            'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
            'Resources': {
                'LoadBalancer': {
                    'LoadBalancerName': 'string',
                    'Domain': 'string',
                    'Listeners': [
                        {
                            'Protocol': 'string',
                            'Port': 123
                        },
                    ]
                }
            },
            'Tier': {
                'Name': 'string',
                'Type': 'string',
                'Version': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    Result message containing a list of environment descriptions.

    • Environments (list) --

      Returns an EnvironmentDescription list.

      • (dict) --

        Describes the properties of an environment.

        • EnvironmentName (string) --

          The name of this environment.

        • EnvironmentId (string) --

          The ID of this environment.

        • ApplicationName (string) --

          The name of the application associated with this environment.

        • VersionLabel (string) --

          The application version deployed in this environment.

        • SolutionStackName (string) --

          The name of the SolutionStack deployed with this environment.

        • TemplateName (string) --

          The name of the configuration template used to originally launch this environment.

        • Description (string) --

          Describes this environment.

        • EndpointURL (string) --

          For load-balanced, autoscaling environments, the URL to the LoadBalancer. For single-instance environments, the IP address of the instance.

        • CNAME (string) --

          The URL to the CNAME for this environment.

        • DateCreated (datetime) --

          The creation date for this environment.

        • DateUpdated (datetime) --

          The last modified date for this environment.

        • Status (string) --

          The current operational status of the environment:

          • Launching : Environment is in the process of initial deployment.

          • Updating : Environment is in the process of updating its configuration settings or application version.

          • Ready : Environment is available to have an action performed on it, such as update or terminate.

          • Terminating : Environment is in the shut-down process.

          • Terminated : Environment is not running.

        • AbortableOperationInProgress (boolean) --

          Indicates if there is an in-progress environment configuration update or application version deployment that you can cancel.

          true: There is an update in progress.

          false: There are no updates currently in progress.

        • Health (string) --

          Describes the health status of the environment. AWS Elastic Beanstalk indicates the failure levels for a running environment:

          Red : Indicates the environment is not working.

          Yellow : Indicates that something is wrong, the application might not be available, but the instances appear running.

          Green : Indicates the environment is healthy and fully functional.

          • Red : Indicates the environment is not responsive. Occurs when three or more consecutive failures occur for an environment.

          • Yellow : Indicates that something is wrong. Occurs when two consecutive failures occur for an environment.

          • Green : Indicates the environment is healthy and fully functional.

          • Grey : Default health for a new environment. The environment is not fully launched and health checks have not started or health checks are suspended during an UpdateEnvironment or RestartEnvironement request.

          Default: Grey

        • HealthStatus (string) --

          Returns the health status of the application running in your environment. For more information, see Health Colors and Statuses.

        • Resources (dict) --

          The description of the AWS resources used by this environment.

          • LoadBalancer (dict) --

            Describes the LoadBalancer.

            • LoadBalancerName (string) --

              The name of the LoadBalancer.

            • Domain (string) --

              The domain name of the LoadBalancer.

            • Listeners (list) --

              A list of Listeners used by the LoadBalancer.

              • (dict) --

                Describes the properties of a Listener for the LoadBalancer.

                • Protocol (string) --

                  The protocol that is used by the Listener.

                • Port (integer) --

                  The port that is used by the Listener.

        • Tier (dict) --

          Describes the current tier of this environment.

          • Name (string) --

            The name of this environment tier.

          • Type (string) --

            The type of this environment tier.

          • Version (string) --

            The version of this environment tier.

TerminateEnvironment (updated) Link ¶
Changes (response)
{'HealthStatus': 'NoData | Unknown | Pending | Ok | Info | Warning | Degraded '
                 '| Severe'}

Terminates the specified environment.

Request Syntax

client.terminate_environment(
    EnvironmentId='string',
    EnvironmentName='string',
    TerminateResources=True|False
)
type EnvironmentId

string

param EnvironmentId

The ID of the environment to terminate.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

type EnvironmentName

string

param EnvironmentName

The name of the environment to terminate.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

type TerminateResources

boolean

param TerminateResources

Indicates whether the associated AWS resources should shut down when the environment is terminated:

true : (default) The user AWS resources (for example, the Auto Scaling group, LoadBalancer, etc.) are terminated along with the environment.

false : The environment is removed from the AWS Elastic Beanstalk but the AWS resources continue to operate.

  • true : The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.

  • false : AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.

For more information, see the AWS Elastic Beanstalk User Guide.

Default: true

Valid Values: true | false

rtype

dict

returns

Response Syntax

{
    'EnvironmentName': 'string',
    'EnvironmentId': 'string',
    'ApplicationName': 'string',
    'VersionLabel': 'string',
    'SolutionStackName': 'string',
    'TemplateName': 'string',
    'Description': 'string',
    'EndpointURL': 'string',
    'CNAME': 'string',
    'DateCreated': datetime(2015, 1, 1),
    'DateUpdated': datetime(2015, 1, 1),
    'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
    'AbortableOperationInProgress': True|False,
    'Health': 'Green'|'Yellow'|'Red'|'Grey',
    'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
    'Resources': {
        'LoadBalancer': {
            'LoadBalancerName': 'string',
            'Domain': 'string',
            'Listeners': [
                {
                    'Protocol': 'string',
                    'Port': 123
                },
            ]
        }
    },
    'Tier': {
        'Name': 'string',
        'Type': 'string',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    Describes the properties of an environment.

    • EnvironmentName (string) --

      The name of this environment.

    • EnvironmentId (string) --

      The ID of this environment.

    • ApplicationName (string) --

      The name of the application associated with this environment.

    • VersionLabel (string) --

      The application version deployed in this environment.

    • SolutionStackName (string) --

      The name of the SolutionStack deployed with this environment.

    • TemplateName (string) --

      The name of the configuration template used to originally launch this environment.

    • Description (string) --

      Describes this environment.

    • EndpointURL (string) --

      For load-balanced, autoscaling environments, the URL to the LoadBalancer. For single-instance environments, the IP address of the instance.

    • CNAME (string) --

      The URL to the CNAME for this environment.

    • DateCreated (datetime) --

      The creation date for this environment.

    • DateUpdated (datetime) --

      The last modified date for this environment.

    • Status (string) --

      The current operational status of the environment:

      • Launching : Environment is in the process of initial deployment.

      • Updating : Environment is in the process of updating its configuration settings or application version.

      • Ready : Environment is available to have an action performed on it, such as update or terminate.

      • Terminating : Environment is in the shut-down process.

      • Terminated : Environment is not running.

    • AbortableOperationInProgress (boolean) --

      Indicates if there is an in-progress environment configuration update or application version deployment that you can cancel.

      true: There is an update in progress.

      false: There are no updates currently in progress.

    • Health (string) --

      Describes the health status of the environment. AWS Elastic Beanstalk indicates the failure levels for a running environment:

      Red : Indicates the environment is not working.

      Yellow : Indicates that something is wrong, the application might not be available, but the instances appear running.

      Green : Indicates the environment is healthy and fully functional.

      • Red : Indicates the environment is not responsive. Occurs when three or more consecutive failures occur for an environment.

      • Yellow : Indicates that something is wrong. Occurs when two consecutive failures occur for an environment.

      • Green : Indicates the environment is healthy and fully functional.

      • Grey : Default health for a new environment. The environment is not fully launched and health checks have not started or health checks are suspended during an UpdateEnvironment or RestartEnvironement request.

      Default: Grey

    • HealthStatus (string) --

      Returns the health status of the application running in your environment. For more information, see Health Colors and Statuses.

    • Resources (dict) --

      The description of the AWS resources used by this environment.

      • LoadBalancer (dict) --

        Describes the LoadBalancer.

        • LoadBalancerName (string) --

          The name of the LoadBalancer.

        • Domain (string) --

          The domain name of the LoadBalancer.

        • Listeners (list) --

          A list of Listeners used by the LoadBalancer.

          • (dict) --

            Describes the properties of a Listener for the LoadBalancer.

            • Protocol (string) --

              The protocol that is used by the Listener.

            • Port (integer) --

              The port that is used by the Listener.

    • Tier (dict) --

      Describes the current tier of this environment.

      • Name (string) --

        The name of this environment tier.

      • Type (string) --

        The type of this environment tier.

      • Version (string) --

        The version of this environment tier.

UpdateEnvironment (updated) Link ¶
Changes (response)
{'HealthStatus': 'NoData | Unknown | Pending | Ok | Info | Warning | Degraded '
                 '| Severe'}

Updates the environment description, deploys a new application version, updates the configuration settings to an entirely new configuration template, or updates select configuration option values in the running environment.

Attempting to update both the release and configuration is not allowed and AWS Elastic Beanstalk returns an InvalidParameterCombination error.

When updating the configuration settings to a new template or individual settings, a draft configuration is created and DescribeConfigurationSettings for this environment returns two setting descriptions with different DeploymentStatus values.

Request Syntax

client.update_environment(
    EnvironmentId='string',
    EnvironmentName='string',
    Description='string',
    Tier={
        'Name': 'string',
        'Type': 'string',
        'Version': 'string'
    },
    VersionLabel='string',
    TemplateName='string',
    SolutionStackName='string',
    OptionSettings=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string',
            'Value': 'string'
        },
    ],
    OptionsToRemove=[
        {
            'ResourceName': 'string',
            'Namespace': 'string',
            'OptionName': 'string'
        },
    ]
)
type EnvironmentId

string

param EnvironmentId

The ID of the environment to update.

If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

type EnvironmentName

string

param EnvironmentName

The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an InvalidParameterValue error.

Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns MissingRequiredParameter error.

type Description

string

param Description

If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.

type Tier

dict

param Tier

This specifies the tier to use to update the environment.

Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns InvalidParameterValue error.

  • Name (string) --

    The name of this environment tier.

  • Type (string) --

    The type of this environment tier.

  • Version (string) --

    The version of this environment tier.

type VersionLabel

string

param VersionLabel

If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an InvalidParameterValue error.

type TemplateName

string

param TemplateName

If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue error.

type SolutionStackName

string

param SolutionStackName

This specifies the platform version that the environment will run after the environment is updated.

type OptionSettings

list

param OptionSettings

If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value.

  • (dict) --

    A specification identifying an individual configuration option along with its current value. For a list of possible option values, go to Option Values in the AWS Elastic Beanstalk Developer Guide .

    • ResourceName (string) --

      A unique resource name for a time-based scaling configuration option.

    • Namespace (string) --

      A unique namespace identifying the option's associated AWS resource.

    • OptionName (string) --

      The name of the configuration option.

    • Value (string) --

      The current value for the configuration option.

type OptionsToRemove

list

param OptionsToRemove

A list of custom user-defined configuration options to remove from the configuration set for this environment.

  • (dict) --

    A specification identifying an individual configuration option.

    • ResourceName (string) --

      A unique resource name for a time-based scaling configuration option.

    • Namespace (string) --

      A unique namespace identifying the option's associated AWS resource.

    • OptionName (string) --

      The name of the configuration option.

rtype

dict

returns

Response Syntax

{
    'EnvironmentName': 'string',
    'EnvironmentId': 'string',
    'ApplicationName': 'string',
    'VersionLabel': 'string',
    'SolutionStackName': 'string',
    'TemplateName': 'string',
    'Description': 'string',
    'EndpointURL': 'string',
    'CNAME': 'string',
    'DateCreated': datetime(2015, 1, 1),
    'DateUpdated': datetime(2015, 1, 1),
    'Status': 'Launching'|'Updating'|'Ready'|'Terminating'|'Terminated',
    'AbortableOperationInProgress': True|False,
    'Health': 'Green'|'Yellow'|'Red'|'Grey',
    'HealthStatus': 'NoData'|'Unknown'|'Pending'|'Ok'|'Info'|'Warning'|'Degraded'|'Severe',
    'Resources': {
        'LoadBalancer': {
            'LoadBalancerName': 'string',
            'Domain': 'string',
            'Listeners': [
                {
                    'Protocol': 'string',
                    'Port': 123
                },
            ]
        }
    },
    'Tier': {
        'Name': 'string',
        'Type': 'string',
        'Version': 'string'
    }
}

Response Structure

  • (dict) --

    Describes the properties of an environment.

    • EnvironmentName (string) --

      The name of this environment.

    • EnvironmentId (string) --

      The ID of this environment.

    • ApplicationName (string) --

      The name of the application associated with this environment.

    • VersionLabel (string) --

      The application version deployed in this environment.

    • SolutionStackName (string) --

      The name of the SolutionStack deployed with this environment.

    • TemplateName (string) --

      The name of the configuration template used to originally launch this environment.

    • Description (string) --

      Describes this environment.

    • EndpointURL (string) --

      For load-balanced, autoscaling environments, the URL to the LoadBalancer. For single-instance environments, the IP address of the instance.

    • CNAME (string) --

      The URL to the CNAME for this environment.

    • DateCreated (datetime) --

      The creation date for this environment.

    • DateUpdated (datetime) --

      The last modified date for this environment.

    • Status (string) --

      The current operational status of the environment:

      • Launching : Environment is in the process of initial deployment.

      • Updating : Environment is in the process of updating its configuration settings or application version.

      • Ready : Environment is available to have an action performed on it, such as update or terminate.

      • Terminating : Environment is in the shut-down process.

      • Terminated : Environment is not running.

    • AbortableOperationInProgress (boolean) --

      Indicates if there is an in-progress environment configuration update or application version deployment that you can cancel.

      true: There is an update in progress.

      false: There are no updates currently in progress.

    • Health (string) --

      Describes the health status of the environment. AWS Elastic Beanstalk indicates the failure levels for a running environment:

      Red : Indicates the environment is not working.

      Yellow : Indicates that something is wrong, the application might not be available, but the instances appear running.

      Green : Indicates the environment is healthy and fully functional.

      • Red : Indicates the environment is not responsive. Occurs when three or more consecutive failures occur for an environment.

      • Yellow : Indicates that something is wrong. Occurs when two consecutive failures occur for an environment.

      • Green : Indicates the environment is healthy and fully functional.

      • Grey : Default health for a new environment. The environment is not fully launched and health checks have not started or health checks are suspended during an UpdateEnvironment or RestartEnvironement request.

      Default: Grey

    • HealthStatus (string) --

      Returns the health status of the application running in your environment. For more information, see Health Colors and Statuses.

    • Resources (dict) --

      The description of the AWS resources used by this environment.

      • LoadBalancer (dict) --

        Describes the LoadBalancer.

        • LoadBalancerName (string) --

          The name of the LoadBalancer.

        • Domain (string) --

          The domain name of the LoadBalancer.

        • Listeners (list) --

          A list of Listeners used by the LoadBalancer.

          • (dict) --

            Describes the properties of a Listener for the LoadBalancer.

            • Protocol (string) --

              The protocol that is used by the Listener.

            • Port (integer) --

              The port that is used by the Listener.

    • Tier (dict) --

      Describes the current tier of this environment.

      • Name (string) --

        The name of this environment tier.

      • Type (string) --

        The type of this environment tier.

      • Version (string) --

        The version of this environment tier.