deleteCampaign method
Deletes a campaign 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 campaignId
:
The unique identifier for the campaign.
Implementation
Future<DeleteCampaignResponse> deleteCampaign({
required String applicationId,
required String campaignId,
}) async {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(campaignId, 'campaignId');
final response = await _protocol.sendRaw(
payload: null,
method: 'DELETE',
requestUri:
'/v1/apps/${Uri.encodeComponent(applicationId)}/campaigns/${Uri.encodeComponent(campaignId)}',
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return DeleteCampaignResponse(
campaignResponse: CampaignResponse.fromJson($json),
);
}