Skip to content

update_act

update_act(
    workflow_definition_name: WorkflowDefinitionName,
    workflow_run_id: UuidString,
    session_id: UuidString,
    act_id: UuidString,
    status: ActStatus,
    *,
    config_overrides: Optional[NovaActClientConfig] = None,
    error: Optional[ActError] = None,
) -> UpdateActResponse

Updates an existing act's configuration, status, or error information.

Parameters:

  • workflow_definition_name (WorkflowDefinitionName) –

    The name of the workflow definition containing the act.

  • workflow_run_id (UuidString) –

    The unique identifier of the workflow run containing the act.

  • session_id (UuidString) –

    The unique identifier of the session containing the act.

  • act_id (UuidString) –

    The unique identifier of the act to update.

  • status (ActStatus) –

    The new status to set for the act.

  • error (Optional[ActError], default: None ) –

    Error information to associate with the act, if applicable.

Raises:

Source code in docs_src/capo_nova_act/_services/nova_act.py
def update_act(
    self,
    workflow_definition_name: "capo_nova_act.types.workflow_definition_name.WorkflowDefinitionName",
    workflow_run_id: "capo_nova_act.types.uuid_string.UuidString",
    session_id: "capo_nova_act.types.uuid_string.UuidString",
    act_id: "capo_nova_act.types.uuid_string.UuidString",
    status: "capo_nova_act.types.act_status.ActStatus",
    *,
    config_overrides: Optional[NovaActClientConfig] = None,
    error: Optional["capo_nova_act.types.act_error.ActError"] = None,
) -> "capo_nova_act.types.update_act_response.UpdateActResponse":
    """<p>Updates an existing act's configuration, status, or error information.</p>

    Args:
        workflow_definition_name: <p>The name of the workflow definition containing the act.</p>
        workflow_run_id: <p>The unique identifier of the workflow run containing the act.</p>
        session_id: <p>The unique identifier of the session containing the act.</p>
        act_id: <p>The unique identifier of the act to update.</p>
        status: <p>The new status to set for the act.</p>
        error: <p>Error information to associate with the act, if applicable.</p>

    Raises:
        capo_nova_act.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        capo_nova_act.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
        capo_nova_act.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Please try again later.</p>
        capo_nova_act.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_nova_act.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please try again later.</p>
        capo_nova_act.errors.validation_exception.ValidationException: <p>The input parameters for the request are invalid.</p>
        capo_nova_act.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_nova_act.types.update_act_request.UpdateActRequest]",
    ) -> OperationResponse[
        "capo_nova_act.types.update_act_response.UpdateActResponse"
    ]:
        import capo_nova_act._operations.amazon_nova_agents_data_plane.update_act

        output, http_response = (
            capo_nova_act._operations.amazon_nova_agents_data_plane.update_act.update_act(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_nova_act.types.update_act_request.UpdateActRequest",
    ) -> dict[str, Any]:
        import capo_nova_act.types.update_act_request

        return capo_nova_act.types.update_act_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAct", redact_input=_redact_input)
    )
    input_: capo_nova_act.types.update_act_request.UpdateActRequest = {
        "workflow_definition_name": workflow_definition_name,
        "workflow_run_id": workflow_run_id,
        "session_id": session_id,
        "act_id": act_id,
        "status": status,
    }
    if error is not None:
        input_["error"] = error

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output