describe_environment_resources

describe_environment_resources(**kwargs)

Returns AWS resources for this environment.

See also: AWS API Documentation

Request Syntax

response = client.describe_environment_resources(
    EnvironmentId='string',
    EnvironmentName='string'
)
Parameters
  • EnvironmentId (string) --

    The ID of the environment to retrieve AWS resource usage data.

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

  • EnvironmentName (string) --

    The name of the environment to retrieve AWS resource usage data.

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

Return type

dict

Returns

Response Syntax

{
    'EnvironmentResources': {
        'EnvironmentName': 'string',
        'AutoScalingGroups': [
            {
                'Name': 'string'
            },
        ],
        'Instances': [
            {
                'Id': 'string'
            },
        ],
        'LaunchConfigurations': [
            {
                'Name': 'string'
            },
        ],
        'LaunchTemplates': [
            {
                'Id': 'string'
            },
        ],
        'LoadBalancers': [
            {
                'Name': 'string'
            },
        ],
        'Triggers': [
            {
                'Name': 'string'
            },
        ],
        'Queues': [
            {
                'Name': 'string',
                'URL': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Result message containing a list of environment resource descriptions.

    • EnvironmentResources (dict) --

      A list of EnvironmentResourceDescription.

      • EnvironmentName (string) --

        The name of the environment.

      • AutoScalingGroups (list) --

        The AutoScalingGroups used by this environment.

        • (dict) --

          Describes an Auto Scaling launch configuration.

          • Name (string) --

            The name of the AutoScalingGroup .

      • Instances (list) --

        The Amazon EC2 instances used by this environment.

        • (dict) --

          The description of an Amazon EC2 instance.

          • Id (string) --

            The ID of the Amazon EC2 instance.

      • LaunchConfigurations (list) --

        The Auto Scaling launch configurations in use by this environment.

        • (dict) --

          Describes an Auto Scaling launch configuration.

          • Name (string) --

            The name of the launch configuration.

      • LaunchTemplates (list) --

        The Amazon EC2 launch templates in use by this environment.

        • (dict) --

          Describes an Amazon EC2 launch template.

          • Id (string) --

            The ID of the launch template.

      • LoadBalancers (list) --

        The LoadBalancers in use by this environment.

        • (dict) --

          Describes a LoadBalancer.

          • Name (string) --

            The name of the LoadBalancer.

      • Triggers (list) --

        The AutoScaling triggers in use by this environment.

        • (dict) --

          Describes a trigger.

          • Name (string) --

            The name of the trigger.

      • Queues (list) --

        The queues used by this environment.

        • (dict) --

          Describes a queue.

          • Name (string) --

            The name of the queue.

          • URL (string) --

            The URL of the queue.

Exceptions

  • ElasticBeanstalk.Client.exceptions.InsufficientPrivilegesException

Examples

The following operation retrieves information about resources in an environment named my-env:

response = client.describe_environment_resources(
    EnvironmentName='my-env',
)

print(response)

Expected Output:

{
    'EnvironmentResources': {
        'AutoScalingGroups': [
            {
                'Name': 'awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingGroup-QSB2ZO88SXZT',
            },
        ],
        'EnvironmentName': 'my-env',
        'Instances': [
            {
                'Id': 'i-0c91c786',
            },
        ],
        'LaunchConfigurations': [
            {
                'Name': 'awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingLaunchConfiguration-1UUVQIBC96TQ2',
            },
        ],
        'LoadBalancers': [
            {
                'Name': 'awseb-e-q-AWSEBLoa-1EEPZ0K98BIF0',
            },
        ],
        'Queues': [
        ],
        'Triggers': [
        ],
    },
    'ResponseMetadata': {
        '...': '...',
    },
}