Skip to content

Returns information about the overall health of the specified environment

Description

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

This action only returns information about environments that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of three environments. When the user calls this action, the response will only include the one environment that the user has permission to access instead of all three environments. If the user doesn’t have access to any of the environments an empty result is returned.

The AWSElasticBeanstalkReadOnly managed policy allows operators to view information about resources related to Elastic Beanstalk environments. For more information, see Managing Elastic Beanstalk user policies in the Elastic Beanstalk Developer Guide. For detailed instructions to attach a policy to a user or group, see the section Controlling access with managed policies in the same topic.

Usage

elasticbeanstalk_describe_environment_health(EnvironmentName,
  EnvironmentId, AttributeNames)

Arguments

  • EnvironmentName

    Specify the environment by name.

    You must specify either this or an EnvironmentName, or both.

  • EnvironmentId

    Specify the environment by ID.

    You must specify either this or an EnvironmentName, or both.

  • AttributeNames

    Specify the response elements to return. To retrieve all attributes, set to All. If no attribute names are specified, returns the name of the environment.

Value

A list with the following syntax:

list(
  EnvironmentName = "string",
  HealthStatus = "string",
  Status = "Green"|"Yellow"|"Red"|"Grey",
  Color = "string",
  Causes = list(
    "string"
  ),
  ApplicationMetrics = list(
    Duration = 123,
    RequestCount = 123,
    StatusCodes = list(
      Status2xx = 123,
      Status3xx = 123,
      Status4xx = 123,
      Status5xx = 123
    ),
    Latency = list(
      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 = list(
    NoData = 123,
    Unknown = 123,
    Pending = 123,
    Ok = 123,
    Info = 123,
    Warning = 123,
    Degraded = 123,
    Severe = 123
  ),
  RefreshedAt = as.POSIXct(
    "2015-01-01"
  )
)

Request syntax

svc$describe_environment_health(
  EnvironmentName = "string",
  EnvironmentId = "string",
  AttributeNames = list(
    "Status"|"Color"|"Causes"|"ApplicationMetrics"|"InstancesHealth"|"All"|"HealthStatus"|"RefreshedAt"
  )
)

Examples

# The following operation retrieves overall health information for an
# environment named my-env:
svc$describe_environment_health(
  AttributeNames = list(
    "All"
  ),
  EnvironmentName = "my-env"
)