updateProfile method

Future<UpdateProfileResponse> updateProfile({
  1. required String profileId,
  2. List<String>? certificateIds,
})

Updates some of the parameters for an existing profile. Provide the ProfileId for the profile that you want to update, along with the new values for the parameters to update.

May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter profileId : The identifier of the profile object that you are updating.

Parameter certificateIds : An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.

Implementation

Future<UpdateProfileResponse> updateProfile({
  required String profileId,
  List<String>? certificateIds,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'TransferService.UpdateProfile'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProfileId': profileId,
      if (certificateIds != null) 'CertificateIds': certificateIds,
    },
  );

  return UpdateProfileResponse.fromJson(jsonResponse.body);
}