putEventStream method

Future<PutEventStreamResponse> putEventStream({
  1. required String applicationId,
  2. required WriteEventStream writeEventStream,
})

Creates a new event stream for an application or updates the settings of an existing event stream for an application.

May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException.

Parameter applicationId : The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Implementation

Future<PutEventStreamResponse> putEventStream({
  required String applicationId,
  required WriteEventStream writeEventStream,
}) async {
  ArgumentError.checkNotNull(applicationId, 'applicationId');
  ArgumentError.checkNotNull(writeEventStream, 'writeEventStream');
  final response = await _protocol.sendRaw(
    payload: writeEventStream,
    method: 'POST',
    requestUri: '/v1/apps/${Uri.encodeComponent(applicationId)}/eventstream',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return PutEventStreamResponse(
    eventStream: EventStream.fromJson($json),
  );
}