Skip to main content

agreements

Creates, updates, deletes, gets or lists an agreements resource.

Overview

Nameagreements
TypeResource
Idaws.marketplace_agreement.agreements

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
acceptance_timestring (date-time)The date and time the offer was accepted or the agreement was created. AcceptanceTime and StartTime can differ for future dated agreements (FDAs).
acceptorobjectThe details of the party accepting the agreement terms. This is commonly the buyer for PurchaseAgreement.
agreement_idstringThe unique identifier of the agreement. (pattern: <code>[A-Za-z0-9_/-]+</code>)
agreement_typestringThe type of agreement. Values are PurchaseAgreement or VendorInsightsAgreement. (pattern: <code>[A-Za-z]+</code>)
end_timestring (date-time)The date and time when the agreement ends. The field is null for pay-as-you-go agreements, which don’t have end dates.
estimated_chargesobjectThe estimated cost of the agreement.
proposal_summaryobjectA summary of the proposal received from the proposer.
proposerobjectThe details of the party proposing the agreement terms. This is commonly the seller for PurchaseAgreement.
start_timestring (date-time)The date and time when the agreement starts.
statusstringThe current status of the agreement. Statuses include: ACTIVE – The terms of the agreement are active. ARCHIVED – The agreement ended without a specified reason. CANCELLED – The acceptor ended the agreement before the defined end date. EXPIRED – The agreement ended on the defined end date. RENEWED – The agreement was renewed into a new agreement (for example, an auto-renewal). REPLACED – The agreement was replaced using an agreement replacement offer. TERMINATED – The agreement ended before the defined end date because of an AWS termination (for example, a payment failure). (ACTIVE, ARCHIVED, CANCELLED, EXPIRED, RENEWED, REPLACED, ROLLED_BACK, SUPERSEDED, TERMINATED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_agreementselectregionProvides details about an agreement, such as the proposer, acceptor, start date, and end date.
search_agreementsselectregionSearches across all agreements that a proposer or an acceptor has in AWS Marketplace. The search returns a list of agreements with basic agreement information. The following filter combinations are supported when the PartyType is Proposer: AgreementType AgreementType + EndTime AgreementType + ResourceType AgreementType + ResourceType + EndTime AgreementType + ResourceType + Status AgreementType + ResourceType + Status + EndTime AgreementType + ResourceIdentifier AgreementType + ResourceIdentifier + EndTime AgreementType + ResourceIdentifier + Status AgreementType + ResourceIdentifier + Status + EndTime AgreementType + AcceptorAccountId AgreementType + AcceptorAccountId + EndTime AgreementType + AcceptorAccountId + Status AgreementType + AcceptorAccountId + Status + EndTime AgreementType + AcceptorAccountId + OfferId AgreementType + AcceptorAccountId + OfferId + Status AgreementType + AcceptorAccountId + OfferId + EndTime AgreementType + AcceptorAccountId + OfferId + Status + EndTime AgreementType + AcceptorAccountId + ResourceIdentifier AgreementType + AcceptorAccountId + ResourceIdentifier + Status AgreementType + AcceptorAccountId + ResourceIdentifier + EndTime AgreementType + AcceptorAccountId + ResourceIdentifier + Status + EndTime AgreementType + AcceptorAccountId + ResourceType AgreementType + AcceptorAccountId + ResourceType + EndTime AgreementType + AcceptorAccountId + ResourceType + Status AgreementType + AcceptorAccountId + ResourceType + Status + EndTime AgreementType + Status AgreementType + Status + EndTime AgreementType + OfferId AgreementType + OfferId + EndTime AgreementType + OfferId + Status AgreementType + OfferId + Status + EndTime AgreementType + OfferSetId AgreementType + OfferSetId + EndTime AgreementType + OfferSetId + Status AgreementType + OfferSetId + Status + EndTime To filter by EndTime, you can use BeforeEndTime and/or AfterEndTime. Only EndTime is supported for sorting. The following filter combinations are supported when the PartyType is Acceptor: AgreementType AgreementType + Status AgreementType + EndTime AgreementType + Status + EndTime AgreementType + ResourceIdentifier AgreementType + ResourceIdentifier + EndTime AgreementType + ResourceIdentifier + Status AgreementType + ResourceIdentifier + Status + EndTime AgreementType + ResourceType AgreementType + ResourceType + EndTime AgreementType + OfferId AgreementType + OfferId + EndTime AgreementType + OfferId + Status AgreementType + OfferId + Status + EndTime AgreementType + OfferSetId AgreementType + OfferSetId + EndTime AgreementType + OfferSetId + Status AgreementType + OfferSetId + Status + EndTime
create_agreement_requestinsertregion, intent, requestedTermsCreates 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.
accept_agreement_cancellation_requestexecregion, agreementId, agreementCancellationRequestIdAllows buyers (acceptors) to accept a cancellation request that is in PENDING_APPROVAL status. Once accepted, the cancellation request transitions to APPROVED status and the agreement cancellation will be processed. Only cancellation requests in PENDING_APPROVAL status can be accepted. A ConflictException is thrown if the cancellation request is in any other status.
accept_agreement_payment_requestexecregion, paymentRequestId, agreementIdAllows buyers (acceptors) to accept a payment request that is in PENDING_APPROVAL status. Once accepted, the payment request transitions to APPROVED status and the charge will be processed. Buyers can optionally provide a purchase order reference for their internal tracking. Only payment requests in PENDING_APPROVAL status can be accepted. A ConflictException is thrown if the payment request is in any other status.
accept_agreement_requestexecregion, agreementRequestIdAccepts an agreement request to finalize the agreement. The acceptor can optionally provide purchase orders to associate with the agreement charges.
cancel_agreementexecregion, agreementIdAllows an acceptor to cancel an active agreement. Not all agreements are eligible for cancellation. Use the error response to determine why a cancellation request was rejected.
cancel_agreement_cancellation_requestexecregion, agreementId, agreementCancellationRequestId, cancellationReasonAllows sellers (proposers) to withdraw an existing agreement cancellation request that is in a pending state. Once cancelled, the cancellation request transitions to CANCELLED status and can no longer be approved or rejected by the buyer. Only cancellation requests in PENDING_APPROVAL status can be cancelled. A ConflictException is thrown if the cancellation request is in any other status.
cancel_agreement_payment_requestexecregion, paymentRequestId, agreementIdAllows sellers (proposers) to cancel a payment request that is in PENDING_APPROVAL status. Once cancelled, the payment request transitions to CANCELLED status and can no longer be accepted or rejected by the buyer. Only payment requests in PENDING_APPROVAL status can be cancelled. A ConflictException is thrown if the payment request is in any other status.
reject_agreement_cancellation_requestexecregion, agreementId, agreementCancellationRequestId, rejectionReasonAllows buyers (acceptors) to reject a cancellation request that is in PENDING_APPROVAL status. Once rejected, the cancellation request transitions to REJECTED status and the agreement remains active. Buyers must provide a reason for the rejection. Only cancellation requests in PENDING_APPROVAL status can be rejected. A ConflictException is thrown if the cancellation request is in any other status.
reject_agreement_payment_requestexecregion, paymentRequestId, agreementIdAllows buyers (acceptors) to reject a payment request that is in PENDING_APPROVAL status. Once rejected, the payment request transitions to REJECTED status and cannot be accepted. Buyers can optionally provide a reason for the rejection. Only payment requests in PENDING_APPROVAL status can be rejected. A ConflictException is thrown if the payment request is in any other status.
send_agreement_cancellation_requestexecregion, agreementId, reasonCodeAllows sellers (proposers) to submit a cancellation request for an active agreement. The cancellation request is created in PENDING_APPROVAL status, at which point the buyer can review it.
send_agreement_payment_requestexecregion, agreementId, termId, name, chargeAmountAllows sellers (proposers) to submit a payment request to buyers (acceptors) for a specific charge amount for an agreement that includes a VariablePaymentTerm. The payment request is created in PENDING_APPROVAL status, at which point the buyer can accept or reject it. The agreement must be active and have a VariablePaymentTerm to support payment requests. The chargeAmount must not exceed the remaining available balance under the VariablePaymentTerm maxTotalChargeAmount.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides details about an agreement, such as the proposer, acceptor, start date, and end date.

SELECT
acceptance_time,
acceptor,
agreement_id,
agreement_type,
end_time,
estimated_charges,
proposal_summary,
proposer,
start_time,
status
FROM aws.marketplace_agreement.agreements
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.marketplace_agreement.agreements (
clientToken,
intent,
requestedTerms,
sourceAgreementIdentifier,
agreementProposalIdentifier,
taxConfiguration,
region
)
SELECT
'{{ clientToken }}',
'{{ intent }}' /* required */,
'{{ requestedTerms }}' /* required */,
'{{ sourceAgreementIdentifier }}',
'{{ agreementProposalIdentifier }}',
'{{ taxConfiguration }}',
'{{ region }}'
RETURNING
agreement_request_id,
charge_summary
;

Lifecycle Methods

Allows buyers (acceptors) to accept a cancellation request that is in PENDING_APPROVAL status. Once accepted, the cancellation request transitions to APPROVED status and the agreement cancellation will be processed. Only cancellation requests in PENDING_APPROVAL status can be accepted. A ConflictException is thrown if the cancellation request is in any other status.

EXEC aws.marketplace_agreement.agreements.accept_agreement_cancellation_request
@region='{{ region }}' --required
@@json=
'{
"agreementId": "{{ agreementId }}",
"agreementCancellationRequestId": "{{ agreementCancellationRequestId }}"
}'
;