createEventStream method
Creates an event stream, which is a subscription to real-time events, such as when profiles are created and updated through Connect Customer Customer Profiles.
Each event stream can be associated with only one Kinesis Data Stream destination in the same region and Amazon Web Services account as the customer profiles domain
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter eventStreamName :
The name of the event stream.
Parameter uri :
The StreamARN of the destination to deliver profile events to. For
example, arn:aws:kinesis:region:account-id:stream/stream-name
Parameter tags :
The tags used to organize, track, or control access for this resource.
Implementation
Future<CreateEventStreamResponse> createEventStream({
required String domainName,
required String eventStreamName,
required String uri,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Uri': uri,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/domains/${Uri.encodeComponent(domainName)}/event-streams/${Uri.encodeComponent(eventStreamName)}',
exceptionFnMap: _exceptionFns,
);
return CreateEventStreamResponse.fromJson(response);
}