agreements
Creates, updates, deletes, gets or lists an agreements resource.
Overview
| Name | agreements |
| Type | Resource |
| Id | aws.marketplace_agreement.agreements |
Fields
The following fields are returned by SELECT queries:
- describe_agreement
- search_agreements
| Name | Datatype | Description |
|---|---|---|
acceptance_time | string (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). |
acceptor | object | The details of the party accepting the agreement terms. This is commonly the buyer for PurchaseAgreement. |
agreement_id | string | The unique identifier of the agreement. (pattern: <code>[A-Za-z0-9_/-]+</code>) |
agreement_type | string | The type of agreement. Values are PurchaseAgreement or VendorInsightsAgreement. (pattern: <code>[A-Za-z]+</code>) |
end_time | string (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_charges | object | The estimated cost of the agreement. |
proposal_summary | object | A summary of the proposal received from the proposer. |
proposer | object | The details of the party proposing the agreement terms. This is commonly the seller for PurchaseAgreement. |
start_time | string (date-time) | The date and time when the agreement starts. |
status | string | The 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) |
| Name | Datatype | Description |
|---|---|---|
acceptance_time | string (date-time) | The date and time that the agreement was accepted. |
acceptor | object | Details of the party accepting the agreement terms. This is commonly the buyer for PurchaseAgreement. |
agreement_id | string | The unique identifier of the agreement. (pattern: <code>[A-Za-z0-9_/-]+</code>) |
agreement_type | string | The type of agreement. (pattern: <code>[A-Za-z]+</code>) |
end_time | string (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. |
entitlements | array | A list of entitlements associated with the agreement. |
proposal_summary | object | A summary of the proposal |
proposer | object | Details of the party proposing the agreement terms, most commonly the seller for PurchaseAgreement. |
start_time | string (date-time) | The date and time when the agreement starts. |
status | string | The current status of the agreement. (ACTIVE, ARCHIVED, CANCELLED, EXPIRED, RENEWED, REPLACED, ROLLED_BACK, SUPERSEDED, TERMINATED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_agreement | select | region | Provides details about an agreement, such as the proposer, acceptor, start date, and end date. | |
search_agreements | select | region | Searches 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_request | insert | region, intent, requestedTerms | 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. | |
accept_agreement_cancellation_request | exec | region, agreementId, agreementCancellationRequestId | 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. | |
accept_agreement_payment_request | exec | region, paymentRequestId, agreementId | Allows 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_request | exec | region, agreementRequestId | Accepts an agreement request to finalize the agreement. The acceptor can optionally provide purchase orders to associate with the agreement charges. | |
cancel_agreement | exec | region, agreementId | Allows 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_request | exec | region, agreementId, agreementCancellationRequestId, cancellationReason | Allows 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_request | exec | region, paymentRequestId, agreementId | Allows 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_request | exec | region, agreementId, agreementCancellationRequestId, rejectionReason | Allows 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_request | exec | region, paymentRequestId, agreementId | Allows 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_request | exec | region, agreementId, reasonCode | Allows 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_request | exec | region, agreementId, termId, name, chargeAmount | Allows 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_agreement
- search_agreements
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
;
Searches 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
SELECT
acceptance_time,
acceptor,
agreement_id,
agreement_type,
end_time,
entitlements,
proposal_summary,
proposer,
start_time,
status
FROM aws.marketplace_agreement.agreements
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_agreement_request
- Manifest
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
;
# Description fields are for documentation purposes
- name: agreements
props:
- name: region
value: "{{ region }}"
description: Required parameter for the agreements resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
- name: intent
value: "{{ intent }}"
description: |
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.
valid_values: ['NEW', 'AMEND', 'REPLACE']
- name: requestedTerms
description: |
A list of terms that define what is being accepted as part of the agreement. Some terms require configuration.
value:
- id: "{{ id }}"
configuration:
configurableUpfrontPricingTermConfiguration:
selectorValue: "{{ selectorValue }}"
dimensions:
- dimensionKey: "{{ dimensionKey }}"
dimensionValue: {{ dimensionValue }}
renewalTermConfiguration:
enableAutoRenew: {{ enableAutoRenew }}
variablePaymentTermConfiguration:
paymentRequestApprovalStrategy: "{{ paymentRequestApprovalStrategy }}"
expirationDuration: "{{ expirationDuration }}"
- name: sourceAgreementIdentifier
value: "{{ sourceAgreementIdentifier }}"
description: |
The agreement's identifier that the request acts upon. This parameter is required for all non-NEW intents (i.e., AMEND or REPLACE). Don't provide this parameter if the intent is NEW.
- name: agreementProposalIdentifier
value: "{{ agreementProposalIdentifier }}"
description: |
The agreement proposal signed by the proposer. The proposal includes the requested resources and the terms that outline an agreement outcome. This parameter is required if the intent is not AMEND.
- name: taxConfiguration
description: |
Configuration for tax estimation in the agreement request response.
value:
taxEstimation: "{{ taxEstimation }}"
Lifecycle Methods
- accept_agreement_cancellation_request
- accept_agreement_payment_request
- accept_agreement_request
- cancel_agreement
- cancel_agreement_cancellation_request
- cancel_agreement_payment_request
- reject_agreement_cancellation_request
- reject_agreement_payment_request
- send_agreement_cancellation_request
- send_agreement_payment_request
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 }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.accept_agreement_payment_request
@region='{{ region }}' --required
@@json=
'{
"paymentRequestId": "{{ paymentRequestId }}",
"agreementId": "{{ agreementId }}",
"purchaseOrderReference": "{{ purchaseOrderReference }}"
}'
;
Accepts an agreement request to finalize the agreement. The acceptor can optionally provide purchase orders to associate with the agreement charges.
EXEC aws.marketplace_agreement.agreements.accept_agreement_request
@region='{{ region }}' --required
@@json=
'{
"agreementRequestId": "{{ agreementRequestId }}",
"purchaseOrders": "{{ purchaseOrders }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.cancel_agreement
@region='{{ region }}' --required
@@json=
'{
"agreementId": "{{ agreementId }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.cancel_agreement_cancellation_request
@region='{{ region }}' --required
@@json=
'{
"agreementId": "{{ agreementId }}",
"agreementCancellationRequestId": "{{ agreementCancellationRequestId }}",
"cancellationReason": "{{ cancellationReason }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.cancel_agreement_payment_request
@region='{{ region }}' --required
@@json=
'{
"paymentRequestId": "{{ paymentRequestId }}",
"agreementId": "{{ agreementId }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.reject_agreement_cancellation_request
@region='{{ region }}' --required
@@json=
'{
"agreementId": "{{ agreementId }}",
"agreementCancellationRequestId": "{{ agreementCancellationRequestId }}",
"rejectionReason": "{{ rejectionReason }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.reject_agreement_payment_request
@region='{{ region }}' --required
@@json=
'{
"paymentRequestId": "{{ paymentRequestId }}",
"agreementId": "{{ agreementId }}",
"rejectionReason": "{{ rejectionReason }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.send_agreement_cancellation_request
@region='{{ region }}' --required
@@json=
'{
"agreementId": "{{ agreementId }}",
"reasonCode": "{{ reasonCode }}",
"clientToken": "{{ clientToken }}",
"description": "{{ description }}"
}'
;
Allows 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.
EXEC aws.marketplace_agreement.agreements.send_agreement_payment_request
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}",
"agreementId": "{{ agreementId }}",
"termId": "{{ termId }}",
"name": "{{ name }}",
"chargeAmount": "{{ chargeAmount }}",
"description": "{{ description }}"
}'
;