Skip to content

create_contractual_investment_attestation

create_contractual_investment_attestation(
    contract_arn: ArnString,
    investment_summary_id: IdentifierString,
    investment_id: IdentifierString,
    contract_document_id: ContractDocumentId,
    approver_details: ApproverDetails,
    attestation_details: AttestationDetails,
    *,
    config_overrides: Optional[BillingClientConfig] = None,
    investment_disbursed_at: Optional[datetime] = None,
    additional_recipients: Optional[AdditionalRecipients] = None,
    client_token: Optional[AttestationClientToken] = None,
) -> CreateContractualInvestmentAttestationResponse

Creates an attestation that claims an investment award for a completed milestone or outcome within a private pricing contract. Supply a clientToken to make the request idempotent so a safe retry does not create a duplicate attestation. This operation starts an asynchronous review and returns an attestationId while the attestation is pending.

Parameters:

  • contract_arn (ArnString) –

    The Amazon Resource Name (ARN) of the contract that contains the investment being attested.

  • investment_summary_id (IdentifierString) –

    The identifier of the investment summary being attested. This is the parent to the investmentId.

  • investment_id (IdentifierString) –

    The identifier of the investment (outcome) being attested.

  • contract_document_id (ContractDocumentId) –

    The contract ID from the contract document, located in the top-right corner of the private pricing contract pages. This value confirms that you have access to the contract.

  • approver_details (ApproverDetails) –

    The details of the executive who authorized the attestation, under the terms of the private pricing contract. The executive receives a click-to-accept email to confirm the attestation.

  • investment_disbursed_at (Optional[datetime], default: None ) –

    The date on which the investment is disbursed to the investment accounts. The disbursement date is subject to review timelines.

  • attestation_details (AttestationDetails) –

    The details of the attestation, including the value being claimed and how the resulting investment is distributed across investment accounts.

  • additional_recipients (Optional[AdditionalRecipients], default: None ) –

    The email addresses to copy as viewers on the executive approval request.

  • client_token (Optional[AttestationClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry completes without performing any further actions.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action.

  • ConflictException –

    The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

  • InternalServerException –

    The request processing failed because of an unknown error, exception, or failure.

  • ResourceNotFoundException –

    The specified ARN in the request doesn't exist.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

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

Examples:

Invoke CreateContractualInvestmentAttestation with a direct amount

>>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationAmount': {'currencyCode': 'USD', 'currencyAmount': '1.00'}}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '1.00'}}]}, investment_disbursed_at=1199923200, additional_recipients=[{'email': '[email protected]'}], client_token='c0ffee00-1234-4abc-9def-0123456789ab')
Invoke CreateContractualInvestmentAttestation with a flat rate multiplier
>>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationQuantities': [{'attestationVolume': '3', 'attestationUnit': 'Example attestation unit'}]}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '1500.00'}}]}, investment_disbursed_at=1199923200, client_token='c0ffee00-1234-4abc-9def-0123456789ac')
Invoke CreateContractualInvestmentAttestation with a percentage multiplier
>>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationQuantities': [{'attestationVolume': '1000', 'attestationUnit': 'Example attestation unit'}]}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '150.00'}}]}, investment_disbursed_at=1199923200, client_token='c0ffee00-1234-4abc-9def-0123456789ad')
Source code in docs_src/capo_billing/_services/billing.py
def create_contractual_investment_attestation(
    self,
    contract_arn: "capo_billing.types.arn_string.ArnString",
    investment_summary_id: "capo_billing.types.identifier_string.IdentifierString",
    investment_id: "capo_billing.types.identifier_string.IdentifierString",
    contract_document_id: "capo_billing.types.contract_document_id.ContractDocumentId",
    approver_details: "capo_billing.types.approver_details.ApproverDetails",
    attestation_details: "capo_billing.types.attestation_details.AttestationDetails",
    *,
    config_overrides: Optional[BillingClientConfig] = None,
    investment_disbursed_at: Optional[datetime.datetime] = None,
    additional_recipients: Optional[
        "capo_billing.types.additional_recipients.AdditionalRecipients"
    ] = None,
    client_token: Optional[
        "capo_billing.types.attestation_client_token.AttestationClientToken"
    ] = None,
) -> "capo_billing.types.create_contractual_investment_attestation_response.CreateContractualInvestmentAttestationResponse":
    """<p>Creates an attestation that claims an investment award for a completed milestone or outcome within a private pricing contract. Supply a <code>clientToken</code> to make the request idempotent so a safe retry does not create a duplicate attestation. This operation starts an asynchronous review and returns an <code>attestationId</code> while the attestation is pending.</p>

    Args:
        contract_arn: <p>The Amazon Resource Name (ARN) of the contract that contains the investment being attested.</p>
        investment_summary_id: <p>The identifier of the investment summary being attested. This is the parent to the investmentId.</p>
        investment_id: <p>The identifier of the investment (outcome) being attested.</p>
        contract_document_id: <p>The contract ID from the contract document, located in the top-right corner of the private pricing contract pages. This value confirms that you have access to the contract.</p>
        approver_details: <p>The details of the executive who authorized the attestation, under the terms of the private pricing contract. The executive receives a click-to-accept email to confirm the attestation.</p>
        investment_disbursed_at: <p>The date on which the investment is disbursed to the investment accounts. The disbursement date is subject to review timelines.</p>
        attestation_details: <p>The details of the attestation, including the value being claimed and how the resulting investment is distributed across investment accounts.</p>
        additional_recipients: <p>The email addresses to copy as viewers on the executive approval request.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry completes without performing any further actions.</p>

    Raises:
        capo_billing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_billing.errors.conflict_exception.ConflictException: <p> The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
        capo_billing.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an unknown error, exception, or failure. </p>
        capo_billing.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
        capo_billing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billing.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_billing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke CreateContractualInvestmentAttestation with a direct amount

        >>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationAmount': {'currencyCode': 'USD', 'currencyAmount': '1.00'}}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '1.00'}}]}, investment_disbursed_at=1199923200, additional_recipients=[{'email': '[email protected]'}], client_token='c0ffee00-1234-4abc-9def-0123456789ab')
        Invoke CreateContractualInvestmentAttestation with a flat rate multiplier

        >>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationQuantities': [{'attestationVolume': '3', 'attestationUnit': 'Example attestation unit'}]}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '1500.00'}}]}, investment_disbursed_at=1199923200, client_token='c0ffee00-1234-4abc-9def-0123456789ac')
        Invoke CreateContractualInvestmentAttestation with a percentage multiplier

        >>> client.create_contractual_investment_attestation(contract_arn='arn:aws:billing::123456789012:contract/1a2b3c4d-5e6f-7a8b-9c0d-111122223333', investment_summary_id='Example-Investment-Summary-Id', investment_id='Investment-Id', contract_document_id='CC OTH XXXXXXXX XXXX TR', approver_details={'name': 'First-Name Last-Name', 'title': 'Title', 'email': '[email protected]'}, attestation_details={'attestationValue': {'attestationQuantities': [{'attestationVolume': '1000', 'attestationUnit': 'Example attestation unit'}]}, 'investmentDistributions': [{'accountId': '123456789012', 'investmentAmount': {'currencyCode': 'USD', 'currencyAmount': '150.00'}}]}, investment_disbursed_at=1199923200, client_token='c0ffee00-1234-4abc-9def-0123456789ad')
    """

    def _handler(
        req: "OperationRequest[capo_billing.types.create_contractual_investment_attestation_request.CreateContractualInvestmentAttestationRequest]",
    ) -> OperationResponse[
        "capo_billing.types.create_contractual_investment_attestation_response.CreateContractualInvestmentAttestationResponse"
    ]:
        import capo_billing._operations.aws_billing.create_contractual_investment_attestation

        output, http_response = (
            capo_billing._operations.aws_billing.create_contractual_investment_attestation.create_contractual_investment_attestation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_billing.types.create_contractual_investment_attestation_request.CreateContractualInvestmentAttestationRequest",
    ) -> dict[str, Any]:
        import capo_billing.types.create_contractual_investment_attestation_request

        return capo_billing.types.create_contractual_investment_attestation_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateContractualInvestmentAttestation", redact_input=_redact_input
        ),
    )
    input_: capo_billing.types.create_contractual_investment_attestation_request.CreateContractualInvestmentAttestationRequest = {
        "contract_arn": contract_arn,
        "investment_summary_id": investment_summary_id,
        "investment_id": investment_id,
        "contract_document_id": contract_document_id,
        "approver_details": approver_details,
        "attestation_details": attestation_details,
    }
    if investment_disbursed_at is not None:
        input_["investment_disbursed_at"] = investment_disbursed_at
    if additional_recipients is not None:
        input_["additional_recipients"] = additional_recipients
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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