updateConfig method
Future<ConfigIdResponse>
updateConfig({
- required ConfigTypeData configData,
- required String configId,
- required ConfigCapabilityType configType,
- 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);
}