DescribeEnvironments - AWS Elastic Beanstalk

DescribeEnvironments

Returns descriptions for existing environments.

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 the DescribeEnvironments 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.

Note

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 AWS 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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ApplicationName

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: No

EnvironmentIds.member.N

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

Type: Array of strings

Required: No

EnvironmentNames.member.N

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

Type: Array of strings

Length Constraints: Minimum length of 4. Maximum length of 40.

Required: No

IncludedDeletedBackTo

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

Type: Timestamp

Required: No

IncludeDeleted

Indicates whether to include deleted environments:

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

false: Do not include deleted environments.

Type: Boolean

Required: No

MaxRecords

For a paginated request. Specify a maximum number of environments to include in each response.

If no MaxRecords is specified, all available environments are retrieved in a single response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No

NextToken

For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.

If no NextToken is specified, the first page is retrieved.

Type: String

Required: No

VersionLabel

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: No

Response Elements

The following elements are returned by the service.

Environments.member.N

Returns an EnvironmentDescription list.

Type: Array of EnvironmentDescription objects

NextToken

In a paginated request, the token that you can pass in a subsequent request to get the next response page.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

Examples

Example

This example illustrates one usage of DescribeEnvironments.

Sample Request

https://elasticbeanstalk.us-west-2.amazonaws.com/?ApplicationName=SampleApp &IncludeDeleted=true &IncludedDeletedBackTo=2008-11-05T06%3A00%3A00Z &Operation=DescribeEnvironments &AuthParams

Sample Response

<DescribeEnvironmentsResponse xmlns="https://elasticbeanstalk.amazonaws.com/docs/2010-12-01/"> <DescribeEnvironmentsResult> <Environments> <member> <VersionLabel>Version1</VersionLabel> <Status>Available</Status> <ApplicationName>SampleApp</ApplicationName> <EndpointURL>elasticbeanstalk-SampleApp-1394386994.us-east-1.elb.amazonaws.com</EndpointURL> <CNAME>SampleApp-jxb293wg7n.elasticbeanstalk.amazonaws.com</CNAME> <Health>Green</Health> <EnvironmentId>e-icsgecu3wf</EnvironmentId> <DateUpdated>2010-11-17T04:01:40.668Z</DateUpdated> <SolutionStackName>32bit Amazon Linux running Tomcat 7</SolutionStackName> <Description>EnvDescrip</Description> <EnvironmentName>SampleApp</EnvironmentName> <DateCreated>2010-11-17T03:59:33.520Z</DateCreated> </member> </Environments> </DescribeEnvironmentsResult> <ResponseMetadata> <RequestId>44790c68-f260-11df-8a78-9f77047e0d0c</RequestId> </ResponseMetadata> </DescribeEnvironmentsResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: