deleteSolution method
Deletes all versions of a solution and the Solution
object
itself. Before deleting a solution, you must delete all campaigns based on
the solution. To determine what campaigns are using the solution, call
ListCampaigns and supply the Amazon Resource Name (ARN) of the
solution. You can't delete a solution if an associated
SolutionVersion
is in the CREATE PENDING or IN PROGRESS
state. For more information on solutions, see CreateSolution.
May throw InvalidInputException. May throw ResourceNotFoundException. May throw ResourceInUseException.
Parameter solutionArn
:
The ARN of the solution to delete.
Implementation
Future<void> deleteSolution({
required String solutionArn,
}) async {
ArgumentError.checkNotNull(solutionArn, 'solutionArn');
_s.validateStringLength(
'solutionArn',
solutionArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.DeleteSolution'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'solutionArn': solutionArn,
},
);
}