Skip to content

get_agreement_request

get_agreement_request(
    agreement_request_id: AgreementRequestId,
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
) -> GetAgreementRequestOutput

Retrieves detailed information about a specific agreement request, including its status, intent, approval requirement, and charges. The acceptor, or the management account or a delegated administrator of the acceptor's AWS organization, can call this operation.

Parameters:

  • agreement_request_id (AgreementRequestId) –

    The unique identifier of the agreement request.

Raises:

Examples:

Get an agreement request

>>> client.get_agreement_request(agreement_request_id='ar-EXAMPLE4a539b123d4EXAMPLE78')
Source code in docs_src/capo_marketplace_agreement/_services/marketplace_agreement.py
def get_agreement_request(
    self,
    agreement_request_id: "capo_marketplace_agreement.types.agreement_request_id.AgreementRequestId",
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
) -> "capo_marketplace_agreement.types.get_agreement_request_output.GetAgreementRequestOutput":
    """<p>Retrieves detailed information about a specific agreement request, including its status, intent, approval requirement, and charges. The acceptor, or the management account or a delegated administrator of the acceptor's AWS organization, can call this operation.</p>

    Args:
        agreement_request_id: <p>The unique identifier of the agreement request.</p>

    Raises:
        capo_marketplace_agreement.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_marketplace_agreement.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_marketplace_agreement.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_marketplace_agreement.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_marketplace_agreement.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_marketplace_agreement.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Get an agreement request

        >>> client.get_agreement_request(agreement_request_id='ar-EXAMPLE4a539b123d4EXAMPLE78')
    """

    def _handler(
        req: "OperationRequest[capo_marketplace_agreement.types.get_agreement_request_input.GetAgreementRequestInput]",
    ) -> OperationResponse[
        "capo_marketplace_agreement.types.get_agreement_request_output.GetAgreementRequestOutput"
    ]:
        if req.options.protocol == "awsJson1_0":
            import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.get_agreement_request

            output, http_response = (
                capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.aws_json1_0.get_agreement_request.get_agreement_request(
                    req.options, req.input
                )
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.get_agreement_request

            output, http_response = (
                capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.rpcv2_cbor.get_agreement_request.get_agreement_request(
                    req.options, req.input
                )
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAgreementRequest")
    )
    input_: capo_marketplace_agreement.types.get_agreement_request_input.GetAgreementRequestInput = {
        "agreement_request_id": agreement_request_id
    }

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