createCampaign method
Creates a campaign for the specified Amazon Connect account. This API is idempotent.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Implementation
Future<CreateCampaignResponse> createCampaign({
required String connectInstanceId,
required DialerConfig dialerConfig,
required String name,
required OutboundCallConfig outboundCallConfig,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'connectInstanceId': connectInstanceId,
'dialerConfig': dialerConfig,
'name': name,
'outboundCallConfig': outboundCallConfig,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/campaigns',
exceptionFnMap: _exceptionFns,
);
return CreateCampaignResponse.fromJson(response);
}