AgreementService / Client / create_agreement_request

create_agreement_request

AgreementService.Client.create_agreement_request(**kwargs)

Creates an agreement request that acts as a quote for the terms you want to accept. The agreement request captures the requested terms, calculates charges, and returns a summary. Use AcceptAgreementRequest with the returned agreementRequestId to finalize the agreement.

See also: AWS API Documentation

Request Syntax

response = client.create_agreement_request(
    clientToken='string',
    intent='NEW'|'AMEND'|'REPLACE',
    requestedTerms=[
        {
            'id': 'string',
            'configuration': {
                'configurableUpfrontPricingTermConfiguration': {
                    'selectorValue': 'string',
                    'dimensions': [
                        {
                            'dimensionKey': 'string',
                            'dimensionValue': 123
                        },
                    ]
                },
                'renewalTermConfiguration': {
                    'enableAutoRenew': True|False
                },
                'variablePaymentTermConfiguration': {
                    'paymentRequestApprovalStrategy': 'AUTO_APPROVE_ON_EXPIRATION'|'WAIT_FOR_APPROVAL',
                    'expirationDuration': 'string'
                }
            }
        },
    ],
    sourceAgreementIdentifier='string',
    agreementProposalIdentifier='string',
    taxConfiguration={
        'taxEstimation': 'DISABLED'|'ENABLED'
    }
)
Parameters:
  • clientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  • intent (string) –

    [REQUIRED]

    The purpose and desired outcome of the agreement request. This is a required parameter that determines how the agreement request is processed.

    • NEW – Creates a new agreement for terms in the request.

    • AMEND – Modifies an existing agreement with terms that are accepted in the request.

    • REPLACE – Creates a new agreement with accepted terms and replaces the existing agreement.

  • requestedTerms (list) –

    [REQUIRED]

    A list of terms that define what is being accepted as part of the agreement. Some terms require configuration.

    • (dict) –

      Defines what is being accepted as part of the agreement creation or update request, and it includes their configurations.

      • id (string) – [REQUIRED]

        The unique identifier of the term in the agreement proposal.

      • configuration (dict) –

        Additional configuration for the requested terms. This configuration is applicable only to the terms that accept a customer-provided configuration, such as ConfigurableUpfrontPricingTerm.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: configurableUpfrontPricingTermConfiguration, renewalTermConfiguration, variablePaymentTermConfiguration.

        • configurableUpfrontPricingTermConfiguration (dict) –

          Defines a prepaid payment model that allows buyers to configure the entitlements they want to purchase and the duration.

          • selectorValue (string) – [REQUIRED]

            Defines the length of time for which the particular pricing/dimension is being purchased by the acceptor.

          • dimensions (list) – [REQUIRED]

            Defines the dimensions that the acceptor has purchased from the overall set of dimensions presented in the rate card.

            • (dict) –

              Defines the dimensions that the acceptor has purchased from the overall set of dimensions presented in the rate card.

              • dimensionKey (string) – [REQUIRED]

                The name of key value of the dimension.

              • dimensionValue (integer) – [REQUIRED]

                The number of units of the dimension the acceptor has purchased.

                Note

                For Agreements with ConfigurableUpfrontPricingTerm, the RateCard section will define the prices and dimensions defined by the seller (proposer), whereas the Configuration section will define the actual dimensions, prices, and units the buyer has chosen to accept.

        • renewalTermConfiguration (dict) –

          Additional parameters specified by the acceptor while accepting the term.

          • enableAutoRenew (boolean) – [REQUIRED]

            Defines whether the acceptor has chosen to auto-renew the agreement at the end of its lifecycle. Can be set to True or False.

        • variablePaymentTermConfiguration (dict) –

          Additional parameters specified by the acceptor while accepting the variable payment term.

          • paymentRequestApprovalStrategy (string) – [REQUIRED]

            Defines the strategy for approving payment requests. Values include AUTO_APPROVE_ON_EXPIRATION and WAIT_FOR_APPROVAL

          • expirationDuration (string) –

            Defines the duration after which a payment request is automatically approved if no further action is taken. This only applies when the payment request approval strategy is set to AUTO_APPROVE_ON_EXPIRATION. The duration is represented in the ISO_8601 format (e.g., P10D for 10 days).

  • sourceAgreementIdentifier (string) –

    The agreement’s identifier that the request acts upon.

    Warning

    This parameter is required for all non- NEW intents (i.e., AMEND or REPLACE). Don’t provide this parameter if the intent is NEW.

  • agreementProposalIdentifier (string) –

    The agreement proposal signed by the proposer. The proposal includes the requested resources and the terms that outline an agreement outcome.

    Warning

    This parameter is required if the intent is not AMEND.

  • taxConfiguration (dict) –

    Configuration for tax estimation in the agreement request response.

    • taxEstimation (string) –

      Toggle to estimate tax as part of the response. Values include ENABLED and DISABLED. Default is DISABLED.

Return type:

dict

Returns:

Response Syntax

{
    'agreementRequestId': 'string',
    'chargeSummary': {
        'currencyCode': 'string',
        'newAgreementValue': 'string',
        'newAgreementValueAfterTax': 'string',
        'expectedCharges': [
            {
                'id': 'string',
                'time': datetime(2015, 1, 1),
                'amount': 'string',
                'amountAfterTax': 'string',
                'timing': 'ON_ACCEPTANCE'|'SCHEDULED'|'BILLING_PERIOD',
                'estimatedTaxes': {
                    'breakdown': [
                        {
                            'amount': 'string',
                            'rate': 'string',
                            'type': 'string'
                        },
                    ],
                    'totalAmount': 'string'
                }
            },
        ],
        'estimatedTaxes': {
            'breakdown': [
                {
                    'amount': 'string',
                    'rate': 'string',
                    'type': 'string'
                },
            ],
            'totalAmount': 'string'
        },
        'itemizedCharges': [
            {
                'dimensionKey': 'string',
                'newQuantity': 123,
                'oldQuantity': 123,
                'chargeReference': 'string',
                'incrementalChargeAmount': 'string'
            },
        ],
        'invoicingEntity': {
            'legalName': 'string',
            'branchName': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • agreementRequestId (string) –

      The unique identifier of the agreement request created. Use this identifier with AcceptAgreementRequest to accept the agreement.

    • chargeSummary (dict) –

      Provides details of the charges associated with the agreement request. This is only applicable when a request is created for PurchaseAgreement.

      • currencyCode (string) –

        The three-letter currency code for all charges (e.g., USD).

      • newAgreementValue (string) –

        The total value of the agreement, which includes any amendments.

      • newAgreementValueAfterTax (string) –

        Expected new agreement value after estimated taxes are applied.

      • expectedCharges (list) –

        A list of expected charges for the agreement request.

        • (dict) –

          Estimated charge for the request.

          • id (string) –

            Unique identifier of the charge for a given agreement.

          • time (datetime) –

            The date and time when the charge is due to be invoiced. This is available only when the charge date is known.

          • amount (string) –

            The tax-exclusive amount of the charge. Only available when the charge amount is known.

          • amountAfterTax (string) –

            The tax-inclusive amount the acceptor has to pay. The amount is only present for fixed charges.

          • timing (string) –

            Indicates when the charge amount will be incurred. Values include ON_ACCEPTANCE (charged immediately when the agreement request is accepted), BILLING_PERIOD (charged on each billing period), and SCHEDULED (charged at a predetermined future date).

          • estimatedTaxes (dict) –

            Provides an aggregated view of estimated tax information for this specific charge.

            • breakdown (list) –

              A list of tax breakdown information.

              • (dict) –

                Represents a single tax breakdown entry with amount, rate, and type.

                • amount (string) –

                  The estimated tax amount.

                • rate (string) –

                  The tax rate, in decimals.

                • type (string) –

                  The type of tax (for example, VAT, ST, or GST).

            • totalAmount (string) –

              The total amount of tax aggregated from the tax breakdown.

      • estimatedTaxes (dict) –

        Provides an aggregated view of estimated tax information for the agreement.

        • breakdown (list) –

          A list of tax breakdown information.

          • (dict) –

            Represents a single tax breakdown entry with amount, rate, and type.

            • amount (string) –

              The estimated tax amount.

            • rate (string) –

              The tax rate, in decimals.

            • type (string) –

              The type of tax (for example, VAT, ST, or GST).

        • totalAmount (string) –

          The total amount of tax aggregated from the tax breakdown.

      • itemizedCharges (list) –

        An itemized list of charges for the agreement request.

        • (dict) –

          A breakdown of individual charges or line items within a billing or pricing context.

          • dimensionKey (string) –

            The dimension key as specified in the accepted term.

          • newQuantity (integer) –

            The requested quantity for this dimension.

          • oldQuantity (integer) –

            The existing quantity for this dimension from the source agreement. This value is 0 for NEW intent.

          • chargeReference (string) –

            The identifier of the expected charge that this itemized charge contributes to.

          • incrementalChargeAmount (string) –

            The total incremental charge amount for this dimension.

      • invoicingEntity (dict) –

        The entity responsible for issuing the invoice.

        • legalName (string) –

          Legal name of the entity issuing the invoice.

        • branchName (string) –

          The branch where the issuing entity is operating from.

Exceptions