getEnvironment method
Retrieve information about an environment. An environment is a logical
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 ResourceNotFoundException. May throw InternalServerException. May throw BadRequestException.
Parameter applicationId :
The ID of the application that includes the environment you want to get.
Parameter environmentId :
The ID of the environment you wnat to get.
Implementation
Future<Environment> getEnvironment({
required String applicationId,
required String environmentId,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(environmentId, 'environmentId');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/environments/${Uri.encodeComponent(environmentId)}',
exceptionFnMap: _exceptionFns,
);
return Environment.fromJson(response);
}