describeEnvironmentHealth method
Future<DescribeEnvironmentHealthResult>
describeEnvironmentHealth({
- List<
EnvironmentHealthAttribute> ? attributeNames, - String? environmentId,
- String? environmentName,
Returns information about the overall health of the specified environment. The DescribeEnvironmentHealth operation is only available with AWS Elastic Beanstalk Enhanced Health.
May throw InvalidRequestException. May throw ElasticBeanstalkServiceException.
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 {
_s.validateStringLength(
'environmentName',
environmentName,
4,
40,
);
final $request = <String, dynamic>{};
attributeNames?.also((arg) =>
$request['AttributeNames'] = arg.map((e) => e.toValue()).toList());
environmentId?.also((arg) => $request['EnvironmentId'] = arg);
environmentName?.also((arg) => $request['EnvironmentName'] = arg);
final $result = await _protocol.send(
$request,
action: 'DescribeEnvironmentHealth',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeEnvironmentHealthRequest'],
shapes: shapes,
resultWrapper: 'DescribeEnvironmentHealthResult',
);
return DescribeEnvironmentHealthResult.fromXml($result);
}