updateApplication method

Future<void> updateApplication({
  1. String? applicationName,
  2. String? newApplicationName,
})

Changes the name of an application.

May throw ApplicationNameRequiredException. May throw InvalidApplicationNameException. May throw ApplicationAlreadyExistsException. May throw ApplicationDoesNotExistException.

Parameter applicationName : The current name of the application you want to change.

Parameter newApplicationName : The new name to give the application.

Implementation

Future<void> updateApplication({
  String? applicationName,
  String? newApplicationName,
}) async {
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    100,
  );
  _s.validateStringLength(
    'newApplicationName',
    newApplicationName,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.UpdateApplication'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (applicationName != null) 'applicationName': applicationName,
      if (newApplicationName != null)
        'newApplicationName': newApplicationName,
    },
  );
}