Skip to content

get_curation_proposal

get_curation_proposal(
    agent_context_id: AgentContextIdentifier,
    curation_proposal_id: CurationProposalId,
    *,
    config_overrides: Optional[ContextClientConfig] = None,
) -> GetCurationProposalResponse

Returns a curation proposal and a summary of the change that it holds for review. ListChangeSetOperations returns the change's individual operations.

Parameters:

  • agent_context_id (AgentContextIdentifier) –

    The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with ResourceNotFoundException.

  • curation_proposal_id (CurationProposalId) –

    The proposal to fetch, by its opaque instance ID.

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 curation proposal The following example returns a curation proposal that a curation policy held for review, including the revisionId to pass when you accept or reject it.

>>> client.get_curation_proposal(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', curation_proposal_id='cp-dc0af01d4ca5847e27d63a3e30a0c9c6')
Source code in docs_src/capo_context/_services/context.py
def get_curation_proposal(
    self,
    agent_context_id: "capo_context.types.agent_context_identifier.AgentContextIdentifier",
    curation_proposal_id: "capo_context.types.curation_proposal_id.CurationProposalId",
    *,
    config_overrides: Optional[ContextClientConfig] = None,
) -> (
    "capo_context.types.get_curation_proposal_response.GetCurationProposalResponse"
):
    """<p>Returns a curation proposal and a summary of the change that it holds for review. ListChangeSetOperations returns the change's individual operations.</p>

    Args:
        agent_context_id: <p>The agent context that the proposal belongs to, by its ID or ARN. If the proposal belongs to another agent context, the request fails with <code>ResourceNotFoundException</code>.</p>
        curation_proposal_id: <p>The proposal to fetch, by its opaque instance ID.</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 curation proposal
        The following example returns a curation proposal that a curation policy held for review, including the revisionId to pass when you accept or reject it.

        >>> client.get_curation_proposal(agent_context_id='ac-4f2a9c1e7b3d4a6f8e0c2b5d7a9f1e3c', curation_proposal_id='cp-dc0af01d4ca5847e27d63a3e30a0c9c6')
    """

    def _handler(
        req: "OperationRequest[capo_context.types.get_curation_proposal_request.GetCurationProposalRequest]",
    ) -> OperationResponse[
        "capo_context.types.get_curation_proposal_response.GetCurationProposalResponse"
    ]:
        import capo_context._operations.context.get_curation_proposal

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCurationProposal")
    )
    input_: capo_context.types.get_curation_proposal_request.GetCurationProposalRequest = {
        "agent_context_id": agent_context_id,
        "curation_proposal_id": curation_proposal_id,
    }

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