deleteCampaign method
Removes a campaign by deleting the solution deployment. The solution that the campaign is based on is not deleted and can be redeployed when needed. A deleted campaign can no longer be specified in a GetRecommendations request. For more information on campaigns, see CreateCampaign.
May throw InvalidInputException. May throw ResourceNotFoundException. May throw ResourceInUseException.
Parameter campaignArn
:
The Amazon Resource Name (ARN) of the campaign to delete.
Implementation
Future<void> deleteCampaign({
required String campaignArn,
}) async {
ArgumentError.checkNotNull(campaignArn, 'campaignArn');
_s.validateStringLength(
'campaignArn',
campaignArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.DeleteCampaign'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'campaignArn': campaignArn,
},
);
}