Skip to content

get_change_set

get_change_set(
    change_set_id: ChangeSetId,
    agent_context_id: AgentContextIdentifier,
    *,
    config_overrides: Optional[ContextClientConfig] = None,
) -> GetChangeSetResponse

Returns one change set's metadata: its status and the other fields of the change set, without its operations. To see what the change set wrote, list its operations with ListChangeSetOperations. For changeSetId, pass a change set's id from ListChangeSets.

Parameters:

  • change_set_id (ChangeSetId) –

    The change set to fetch, by its opaque instance ID.

  • agent_context_id (AgentContextIdentifier) –

    The agent context that owns the change set, by its ID or ARN.

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:

Get a change set The following example returns the metadata of a change set that ontology grounding produced and that a curation policy holds for review, including the changeSetVersion to pass to UpdateChangeSet.

>>> client.get_change_set(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', change_set_id='cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b')
Source code in docs_src/capo_context/_services/context.py
def get_change_set(
    self,
    change_set_id: "capo_context.types.change_set_id.ChangeSetId",
    agent_context_id: "capo_context.types.agent_context_identifier.AgentContextIdentifier",
    *,
    config_overrides: Optional[ContextClientConfig] = None,
) -> "capo_context.types.get_change_set_response.GetChangeSetResponse":
    """<p>Returns one change set's metadata: its <code>status</code> and the other fields of the change set, without its operations. To see what the change set wrote, list its operations with ListChangeSetOperations. For <code>changeSetId</code>, pass a change set's <code>id</code> from ListChangeSets.</p>

    Args:
        change_set_id: <p>The change set to fetch, by its opaque instance ID.</p>
        agent_context_id: <p>The agent context that owns the change set, by its ID or ARN.</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:
        Get a change set
        The following example returns the metadata of a change set that ontology grounding produced and that a curation policy holds for review, including the changeSetVersion to pass to UpdateChangeSet.

        >>> client.get_change_set(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', change_set_id='cs-6d8f0b2c4e1a4c7d9f3b5e7a9c1d3f5b')
    """

    def _handler(
        req: "OperationRequest[capo_context.types.get_change_set_request.GetChangeSetRequest]",
    ) -> OperationResponse[
        "capo_context.types.get_change_set_response.GetChangeSetResponse"
    ]:
        import capo_context._operations.context.get_change_set

        output, http_response = (
            capo_context._operations.context.get_change_set.get_change_set(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetChangeSet")
    )
    input_: capo_context.types.get_change_set_request.GetChangeSetRequest = {
        "change_set_id": change_set_id,
        "agent_context_id": agent_context_id,
    }

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