update_approval_action
async
¶
update_approval_action(
agent_space_id: AgentSpaceIdentifier,
approval_id: ApprovalId,
action: ApprovalActionType,
*,
config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
final_pattern: Optional[ApprovalPattern] = None,
reason: Optional[ApprovalReason] = None,
ttl_seconds: Optional[int] = None,
single_use: Optional[bool] = None,
) -> UpdateApprovalActionResponse
Updates an approval request with the terminal decision (APPROVED or REJECTED). A single operation handles both verbs via the action enum.
Parameters:
-
agent_space_id(AgentSpaceIdentifier) –The agent space identifier — multi-tenant workspace scope. Bound from the request URI.
-
approval_id(ApprovalId) –Identifier of the approval request being resolved. A UUID. Bound from the request URI.
-
action(ApprovalActionType) –The action to take on the approval request — APPROVED or REJECTED.
-
final_pattern(Optional[ApprovalPattern], default:None) –The finalized pattern (tool + argumentPins) that scopes the approval. Required when `action` is APPROVED; must be absent when `action` is REJECTED. The pattern narrows, and must not widen, the invocation originally requested by the agent. This cross-field invariant is enforced by service-side validation.
-
reason(Optional[ApprovalReason], default:None) –Optional free-text rationale for the decision. Permitted when `action` is REJECTED; ignored when `action` is APPROVED.
-
ttl_seconds(Optional[int], default:None) –Approval lifetime in seconds, starting from when the decision is submitted. Required when `action` is APPROVED AND `singleUse` is false; must be absent when `action` is REJECTED or when `singleUse` is true (a single-use approval backs one executed action and the redemption window collapses). Cross-field invariants are enforced by service-side validation; the @range bound here is the operation-boundary check that always applies (a maximum of 4 hours).
-
single_use(Optional[bool], default:None) –Whether the approved action backs a single executed tool call (true) or is reusable within ttlSeconds (false). Required when `action` is APPROVED; must be absent when `action` is REJECTED. When true, ttlSeconds must be absent (the redemption window collapses to the single use). When false, ttlSeconds is required and bounds the reuse window. Cross-field invariants are enforced by service-side validation.
Raises:
-
AccessDeniedException–Access to the requested resource is denied due to insufficient permissions.
-
ConflictException–The request conflicts with the current state of the resource.
-
ContentSizeExceededException–This exception is thrown when the content size exceeds the allowed limit.
-
InternalServerException–This exception is thrown when an unexpected error occurs in the processing of a request.
-
InvalidParameterException–One or more parameters provided in the request are invalid.
-
ResourceNotFoundException–The requested resource could not be found.
-
ServiceQuotaExceededException–The request would exceed the service quota limit.
-
ThrottlingException–The request was throttled due to too many requests. Please slow down and try again.
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_devops_agent/_services/async_dev_ops_agent.py
2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 | |