deletePolicyEngine method
Deletes an existing policy engine from the AgentCore Policy system. The
policy engine must not have any associated policies before deletion. Once
deleted, the policy engine and all its configurations become unavailable
for policy management and evaluation. This is an asynchronous operation.
Use the GetPolicyEngine operation to poll the
status field to track completion.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter policyEngineId :
The unique identifier of the policy engine to be deleted. This must be a
valid policy engine ID that exists within the account.
Implementation
Future<DeletePolicyEngineResponse> deletePolicyEngine({
required String policyEngineId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/policy-engines/${Uri.encodeComponent(policyEngineId)}',
exceptionFnMap: _exceptionFns,
);
return DeletePolicyEngineResponse.fromJson(response);
}