getEnvironment method
Retrieves information about an environment. An environment is a deployment
group of AppConfig applications, such as applications in a
Production environment or in an EU_Region
environment. Each configuration deployment targets an environment. You can
enable one or more Amazon CloudWatch alarms for an environment. If an
alarm is triggered during a deployment, AppConfig roles back the
configuration.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
Parameter applicationId :
The ID of the application that includes the environment you want to get.
Parameter environmentId :
The ID of the environment that you want to get.
Implementation
Future<Environment> getEnvironment({
required String applicationId,
required String environmentId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/environments/${Uri.encodeComponent(environmentId)}',
exceptionFnMap: _exceptionFns,
);
return Environment.fromJson(response);
}