Skip to content

list_change_set_operations async

list_change_set_operations(
    change_set_id: ChangeSetId,
    agent_context_id: AgentContextIdentifier,
    *,
    config_overrides: Optional[AsyncContextClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListChangeSetOperationsResponse

Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order. This is the only read that returns a change set's contents.

Parameters:

  • change_set_id (ChangeSetId) –

    The change set whose operations to page through, by its opaque instance ID.

  • agent_context_id (AgentContextIdentifier) –

    The agent context that owns the change set, as an ID or ARN. Authorization is on this agent context's ARN, and a change set of another agent context is a ResourceNotFoundException.

  • max_results (Optional[MaxResults], default: None ) –

    Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with ValidationException.

  • next_token (Optional[PaginationToken], default: None ) –

    The pagination token from a previous response. Omit it for the first page.

    The request fails with ValidationException, and you must start again without a token, in these cases:

    • The token was issued before an UpdateChangeSet edit, and the change set is still PENDING.

    • The token was issued while an edited change set was PENDING, and the change set's status has since changed.

    • The token was issued to another end user or for another change set.

    On an ACL_RESTRICTED change set, AWS Context checks access before it reads the token, so a caller without access gets AccessDeniedException whatever token it sends. For an allowed end user, the token also carries the access decision, which expires after a few minutes. AWS Context then checks access again before it returns the page.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.

  • InternalServerException –

    The request failed because of an internal error. Retry the request.

  • ThrottlingException –

    The request was denied because it exceeded a request rate quota. Wait, then retry the request.

  • ValidationException –

    The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.

  • ResourceNotFoundException –

    The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

List the operations in a change set The following example returns the operations in a change set that ontology grounding produced for one table: a link from the table to an ontology class, and a link from each of two columns to an ontology property.

>>> await client.list_change_set_operations(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', change_set_id='cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b', max_results=25)
Source code in docs_src/capo_context/_services/async_context.py
async def list_change_set_operations(
    self,
    change_set_id: "capo_context.types.change_set_id.ChangeSetId",
    agent_context_id: "capo_context.types.agent_context_identifier.AgentContextIdentifier",
    *,
    config_overrides: Optional[AsyncContextClientConfig] = None,
    max_results: Optional["capo_context.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_context.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_context.types.list_change_set_operations_response.ListChangeSetOperationsResponse":
    """<p>Returns what one change set wrote: every operation it holds (the nodes and relationships it adds, updates, or deletes), one page at a time, in order. This is the only read that returns a change set's contents.</p>

    Args:
        change_set_id: <p>The change set whose operations to page through, by its opaque instance ID.</p>
        agent_context_id: <p>The agent context that owns the change set, as an ID or ARN. Authorization is on this agent context's ARN, and a change set of another agent context is a ResourceNotFoundException.</p>
        max_results: <p>Maximum number of operations per page (upper bound, not a target). Defaults to 50. A value outside 1–100 fails with <code>ValidationException</code>.</p>
        next_token: <p>The pagination token from a previous response. Omit it for the first page.</p> <p>The request fails with <code>ValidationException</code>, and you must start again without a token, in these cases:</p> <ul> <li> <p>The token was issued before an <code>UpdateChangeSet</code> edit, and the change set is still <code>PENDING</code>.</p> </li> <li> <p>The token was issued while an edited change set was <code>PENDING</code>, and the change set's status has since changed.</p> </li> <li> <p>The token was issued to another end user or for another change set.</p> </li> </ul> <p>On an <code>ACL_RESTRICTED</code> change set, AWS Context checks access before it reads the token, so a caller without access gets <code>AccessDeniedException</code> whatever token it sends. For an allowed end user, the token also carries the access decision, which expires after a few minutes. AWS Context then checks access again before it returns the page.</p>

    Raises:
        capo_context.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.</p>
        capo_context.errors.internal_server_exception.InternalServerException: <p>The request failed because of an internal error. Retry the request.</p>
        capo_context.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a request rate quota. Wait, then retry the request.</p>
        capo_context.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.</p>
        capo_context.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.</p>
        capo_context.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List the operations in a change set
        The following example returns the operations in a change set that ontology grounding produced for one table: a link from the table to an ontology class, and a link from each of two columns to an ontology property.

        >>> await client.list_change_set_operations(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', change_set_id='cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b', max_results=25)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_context.types.list_change_set_operations_request.ListChangeSetOperationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_context.types.list_change_set_operations_response.ListChangeSetOperationsResponse"
    ]:
        import capo_context._operations.context.list_change_set_operations

        (
            output,
            http_response,
        ) = await capo_context._operations.context.list_change_set_operations.async_list_change_set_operations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_context.types.list_change_set_operations_response.ListChangeSetOperationsResponse",
    ) -> dict[str, Any]:
        import capo_context.types.list_change_set_operations_response

        return (
            capo_context.types.list_change_set_operations_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListChangeSetOperations", redact_output=_redact_output),
    )
    input_: capo_context.types.list_change_set_operations_request.ListChangeSetOperationsRequest = {
        "change_set_id": change_set_id,
        "agent_context_id": agent_context_id,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output