updateConfig method

Future<ConfigIdResponse> updateConfig({
  1. required ConfigTypeData configData,
  2. required String configId,
  3. required ConfigCapabilityType configType,
  4. required String name,
})

Updates the Config used when scheduling contacts.

Updating a Config will not update the execution parameters for existing future contacts scheduled with this Config.

May throw InvalidParameterException. May throw DependencyException. May throw ResourceNotFoundException.

Parameter configData : Parameters of a Config.

Parameter configId : UUID of a Config.

Parameter configType : Type of a Config.

Parameter name : Name of a Config.

Implementation

Future<ConfigIdResponse> updateConfig({
  required ConfigTypeData configData,
  required String configId,
  required ConfigCapabilityType configType,
  required String name,
}) async {
  ArgumentError.checkNotNull(configData, 'configData');
  ArgumentError.checkNotNull(configId, 'configId');
  ArgumentError.checkNotNull(configType, 'configType');
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    256,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'configData': configData,
    'name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/config/${Uri.encodeComponent(configType.toValue())}/${Uri.encodeComponent(configId)}',
    exceptionFnMap: _exceptionFns,
  );
  return ConfigIdResponse.fromJson(response);
}