deleteSegment method
Deletes a segment from 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.
Implementation
Future<DeleteSegmentResponse> deleteSegment({
required String applicationId,
required String segmentId,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(segmentId, 'segmentId');
final response = await _protocol.sendRaw(
payload: null,
method: 'DELETE',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/segments/${Uri.encodeComponent(segmentId)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return DeleteSegmentResponse(
segmentResponse: SegmentResponse.fromJson($json),
);
}