updateEnvironmentTemplate method

Future<UpdateEnvironmentTemplateOutput> updateEnvironmentTemplate({
  1. required String name,
  2. String? description,
  3. String? displayName,
})

Update an environment template.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the environment template to update.

Parameter description : A description of the environment template update.

Parameter displayName : The name of the environment template to update as displayed in the developer interface.

Implementation

Future<UpdateEnvironmentTemplateOutput> updateEnvironmentTemplate({
  required String name,
  String? description,
  String? displayName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.UpdateEnvironmentTemplate'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name,
      if (description != null) 'description': description,
      if (displayName != null) 'displayName': displayName,
    },
  );

  return UpdateEnvironmentTemplateOutput.fromJson(jsonResponse.body);
}