updatePolicyEngine method

Future<UpdatePolicyEngineResponse> updatePolicyEngine({
  1. required String policyEngineId,
  2. UpdatedDescription? description,
})

Updates an existing policy engine within the AgentCore Policy system. This operation allows modification of the policy engine description while maintaining its identity. 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 updated.

Parameter description : The new description for the policy engine.

Implementation

Future<UpdatePolicyEngineResponse> updatePolicyEngine({
  required String policyEngineId,
  UpdatedDescription? description,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/policy-engines/${Uri.encodeComponent(policyEngineId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePolicyEngineResponse.fromJson(response);
}