updateEnvironment method
Updates an environment.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
Parameter applicationId :
The application ID.
Parameter environmentId :
The environment ID.
Parameter description :
A description of the environment.
Parameter monitors :
Amazon CloudWatch alarms to monitor during the deployment process.
Parameter name :
The name of the environment.
Implementation
Future<Environment> updateEnvironment({
required String applicationId,
required String environmentId,
String? description,
List<Monitor>? monitors,
String? name,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (monitors != null) 'Monitors': monitors,
if (name != null) 'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/environments/${Uri.encodeComponent(environmentId)}',
exceptionFnMap: _exceptionFns,
);
return Environment.fromJson(response);
}