[ aws . elasticbeanstalk ]

retrieve-environment-info

Description

Retrieves the compiled information from a RequestEnvironmentInfo request.

Related Topics

  • RequestEnvironmentInfo

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  retrieve-environment-info
[--environment-id <value>]
[--environment-name <value>]
--info-type <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--environment-id (string)

The ID of the data’s environment.

If no such environment is found, 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.

--environment-name (string)

The name of the data’s environment.

If no such environment is found, 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.

--info-type (string)

The type of information to retrieve.

Possible values:

  • tail

  • bundle

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To retrieve tailed logs

The following command retrieves a link to logs from an environment named my-env:

aws elasticbeanstalk retrieve-environment-info --environment-name my-env --info-type tail

Output:

{
    "EnvironmentInfo": [
        {
            "SampleTimestamp": "2015-08-20T22:23:17.703Z",
            "Message": "https://elasticbeanstalk-us-west-2-0123456789012.s3.amazonaws.com/resources/environments/logs/tail/e-fyqyju3yjs/i-09c1c867/TailLogs-1440109397703.out?AWSAccessKeyId=AKGPT4J56IAJ2EUBL5CQ&Expires=1440195891&Signature=n%2BEalOV6A2HIOx4Rcfb7LT16bBM%3D",
            "InfoType": "tail",
            "Ec2InstanceId": "i-09c1c867"
        }
    ]
}

View the link in a browser. Prior to retrieval, logs must be requested with request-environment-info.

Output

EnvironmentInfo -> (list)

The EnvironmentInfoDescription of the environment.

(structure)

The information retrieved from the Amazon EC2 instances.

InfoType -> (string)

The type of information retrieved.

Ec2InstanceId -> (string)

The Amazon EC2 Instance ID for this information.

SampleTimestamp -> (timestamp)

The time stamp when this information was retrieved.

Message -> (string)

The retrieved information. Currently contains a presigned Amazon S3 URL. The files are deleted after 15 minutes.

Anyone in possession of this URL can access the files before they are deleted. Make the URL available only to trusted parties.