aws_sdk_devopsagent/client/update_approval_action.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`UpdateApprovalAction`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`agent_space_id(impl Into<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::agent_space_id) / [`set_agent_space_id(Option<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_agent_space_id):<br>required: **true**<br><p>The agent space identifier — multi-tenant workspace scope. Bound from the request URI.</p><br>
7 /// - [`approval_id(impl Into<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::approval_id) / [`set_approval_id(Option<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_approval_id):<br>required: **true**<br><p>Identifier of the approval request being resolved. A UUID. Bound from the request URI.</p><br>
8 /// - [`action(ApprovalActionType)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::action) / [`set_action(Option<ApprovalActionType>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_action):<br>required: **true**<br><p>The action to take on the approval request — APPROVED or REJECTED.</p><br>
9 /// - [`final_pattern(ApprovalPattern)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::final_pattern) / [`set_final_pattern(Option<ApprovalPattern>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_final_pattern):<br>required: **false**<br><p>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.</p><br>
10 /// - [`reason(impl Into<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::reason) / [`set_reason(Option<String>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_reason):<br>required: **false**<br><p>Optional free-text rationale for the decision. Permitted when `action` is REJECTED; ignored when `action` is APPROVED.</p><br>
11 /// - [`ttl_seconds(i32)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::ttl_seconds) / [`set_ttl_seconds(Option<i32>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_ttl_seconds):<br>required: **false**<br><p>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).</p><br>
12 /// - [`single_use(bool)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::single_use) / [`set_single_use(Option<bool>)`](crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::set_single_use):<br>required: **false**<br><p>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.</p><br>
13 /// - On success, responds with [`UpdateApprovalActionOutput`](crate::operation::update_approval_action::UpdateApprovalActionOutput) with field(s):
14 /// - [`approval_id(String)`](crate::operation::update_approval_action::UpdateApprovalActionOutput::approval_id): <p>Identifier of the approval request that was resolved. Echoed back so the client can correlate the response with the request.</p>
15 /// - [`status(ApprovalStatus)`](crate::operation::update_approval_action::UpdateApprovalActionOutput::status): <p>Lifecycle status of the approval request immediately after submission. Expected post-submission states are APPROVED (when the action is APPROVED) or REJECTED (when the action is REJECTED); PENDING is not returned from this operation, and REVOKED and REDEEMED are reachable only via subsequent reads.</p>
16 /// - [`expires_at(Option<DateTime>)`](crate::operation::update_approval_action::UpdateApprovalActionOutput::expires_at): <p>Absolute timestamp at which the approval expires. Set when status is APPROVED (computed as the submission time plus ttlSeconds); absent when status is REJECTED.</p>
17 /// - On failure, responds with [`SdkError<UpdateApprovalActionError>`](crate::operation::update_approval_action::UpdateApprovalActionError)
18 pub fn update_approval_action(&self) -> crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder {
19 crate::operation::update_approval_action::builders::UpdateApprovalActionFluentBuilder::new(self.handle.clone())
20 }
21}