deleteAutomatedReasoningPolicy method

Future<void> deleteAutomatedReasoningPolicy({
  1. required String policyArn,
  2. bool? force,
})

Deletes an Automated Reasoning policy or policy version. This operation is idempotent. If you delete a policy more than once, each call succeeds. Deleting a policy removes it permanently and cannot be undone.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter policyArn : The Amazon Resource Name (ARN) of the Automated Reasoning policy to delete.

Parameter force : Specifies whether to force delete the automated reasoning policy even if it has active resources. When false, Amazon Bedrock validates if all artifacts have been deleted (e.g. policy version, test case, test result) for a policy before deletion. When true, Amazon Bedrock will delete the policy and all its artifacts without validation. Default is false.

Implementation

Future<void> deleteAutomatedReasoningPolicy({
  required String policyArn,
  bool? force,
}) async {
  final $query = <String, List<String>>{
    if (force != null) 'force': [force.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/automated-reasoning-policies/${Uri.encodeComponent(policyArn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}