Returns Amazon Web Services resources for this environment.
Parameters:
-
environment_id
(Optional[EnvironmentId], default:
None
)
–
The ID of the environment to retrieve Amazon Web Services resource usage data.
Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns MissingRequiredParameter error.
-
environment_name
(Optional[EnvironmentName], default:
None
)
–
The name of the environment to retrieve Amazon Web Services resource usage data.
Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns MissingRequiredParameter error.
Raises:
Examples:
To view information about the AWS resources in your environment
The following operation retrieves information about resources in an environment named my-env:
>>> client.describe_environment_resources(environment_name='my-env')
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
| def describe_environment_resources(
self,
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
environment_id: Optional[
"capo_elastic_beanstalk.types.environment_id.EnvironmentId"
] = None,
environment_name: Optional[
"capo_elastic_beanstalk.types.environment_name.EnvironmentName"
] = None,
) -> "capo_elastic_beanstalk.types.environment_resource_descriptions_message.EnvironmentResourceDescriptionsMessage":
"""<p>Returns Amazon Web Services resources for this environment.</p>
Args:
environment_id: <p>The ID of the environment to retrieve Amazon Web Services resource usage data.</p> <p> Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns <code>MissingRequiredParameter</code> error. </p>
environment_name: <p>The name of the environment to retrieve Amazon Web Services resource usage data.</p> <p> Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns <code>MissingRequiredParameter</code> error. </p>
Raises:
capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To view information about the AWS resources in your environment
The following operation retrieves information about resources in an environment named my-env:
>>> client.describe_environment_resources(environment_name='my-env')
"""
def _handler(
req: "OperationRequest[capo_elastic_beanstalk.types.describe_environment_resources_message.DescribeEnvironmentResourcesMessage]",
) -> OperationResponse[
"capo_elastic_beanstalk.types.environment_resource_descriptions_message.EnvironmentResourceDescriptionsMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.describe_environment_resources
output, http_response = (
capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.describe_environment_resources.describe_environment_resources(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeEnvironmentResources")
)
input_: capo_elastic_beanstalk.types.describe_environment_resources_message.DescribeEnvironmentResourcesMessage = {}
if environment_id is not None:
input_["environment_id"] = environment_id
if environment_name is not None:
input_["environment_name"] = environment_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|