updateJourney method
Future<UpdateJourneyResponse>
updateJourney({
- required String applicationId,
- required String journeyId,
- required WriteJourneyRequest writeJourneyRequest,
Updates the configuration and other settings for a journey.
May throw BadRequestException. May throw InternalServerErrorException. May throw PayloadTooLargeException. May throw ForbiddenException. May throw NotFoundException. May throw MethodNotAllowedException. May throw TooManyRequestsException. May throw ConflictException.
Parameter applicationId
:
The unique identifier for the application. This identifier is displayed as
the Project ID on the Amazon Pinpoint console.
Parameter journeyId
:
The unique identifier for the journey.
Implementation
Future<UpdateJourneyResponse> updateJourney({
required String applicationId,
required String journeyId,
required WriteJourneyRequest writeJourneyRequest,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(journeyId, 'journeyId');
ArgumentError.checkNotNull(writeJourneyRequest, 'writeJourneyRequest');
final response = await _protocol.sendRaw(
payload: writeJourneyRequest,
method: 'PUT',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/journeys/${Uri.encodeComponent(journeyId)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateJourneyResponse(
journeyResponse: JourneyResponse.fromJson($json),
);
}