getSegmentVersion method
Retrieves information about the configuration, dimension, and other settings for a specific version of a segment that's associated with 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.
Parameter segmentId
:
The unique identifier for the segment.
Parameter version
:
The unique version number (Version property) for the campaign version.
Implementation
Future<GetSegmentVersionResponse> getSegmentVersion({
required String applicationId,
required String segmentId,
required String version,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(segmentId, 'segmentId');
ArgumentError.checkNotNull(version, 'version');
final response = await _protocol.sendRaw(
payload: null,
method: 'GET',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/segments/${Uri.encodeComponent(segmentId)}/versions/${Uri.encodeComponent(version)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return GetSegmentVersionResponse(
segmentResponse: SegmentResponse.fromJson($json),
);
}