describeEnvironmentHealth method
Returns information about the overall health of the specified environment. The DescribeEnvironmentHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.
May throw ElasticBeanstalkServiceException.
May throw InvalidRequestException.
Parameter 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.
Parameter environmentId :
Specify the environment by ID.
You must specify either this or an EnvironmentName, or both.
Parameter environmentName :
Specify the environment by name.
You must specify either this or an EnvironmentName, or both.
Implementation
Future<DescribeEnvironmentHealthResult> describeEnvironmentHealth({
List<EnvironmentHealthAttribute>? attributeNames,
String? environmentId,
String? environmentName,
}) async {
final $request = <String, String>{
if (attributeNames != null)
if (attributeNames.isEmpty)
'AttributeNames': ''
else
for (var i1 = 0; i1 < attributeNames.length; i1++)
'AttributeNames.member.${i1 + 1}': attributeNames[i1].value,
if (environmentId != null) 'EnvironmentId': environmentId,
if (environmentName != null) 'EnvironmentName': environmentName,
};
final $result = await _protocol.send(
$request,
action: 'DescribeEnvironmentHealth',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeEnvironmentHealthResult',
);
return DescribeEnvironmentHealthResult.fromXml($result);
}