SearchAgreements - AWS Marketplace

SearchAgreements

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:

  • PartyType as Proposer + AgreementType + ResourceIdentifier

  • PartyType as Proposer + AgreementType + OfferId

  • PartyType as Proposer + AgreementType + AcceptorAccountId

  • PartyType as Proposer + AgreementType + Status

  • PartyType as Proposer + AgreementType + ResourceIdentifier + Status

  • PartyType as Proposer + AgreementType + OfferId + Status

  • PartyType as Proposer + AgreementType + AcceptorAccountId + Status

  • PartyType as Proposer + AgreementType + ResourceType + Status

  • PartyType as Proposer + AgreementType + AcceptorAccountId + ResourceType + Status

  • PartyType as Proposer + AgreementType + AcceptorAccountId + OfferId

  • PartyType as Proposer + AgreementType + AcceptorAccountId + OfferId + Status

  • PartyType as Proposer + AgreementType + AcceptorAccountId + ResourceIdentifier

  • PartyType as Proposer + AgreementType + AcceptorAccountId + ResourceIdentifier + Status

  • PartyType as Proposer + AgreementType + AcceptorAccountId + ResourceType

Request Syntax

{ "catalog": "string", "filters": [ { "name": "string", "values": [ "string" ] } ], "maxResults": number, "nextToken": "string", "sort": { "sortBy": "string", "sortOrder": "string" } }

Request Parameters

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

catalog

The catalog in which the agreement was created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z]+$

Required: No

filters

The filter name and value pair used to return a specific list of results.

The following filters are supported:

  • ResourceIdentifier – The unique identifier of the resource.

  • ResourceType – Type of the resource, which is the product (AmiProduct, ContainerProduct, or SaaSProduct).

  • PartyType – The party type (either Acceptor or Proposer) of the caller. For agreements where the caller is the proposer, use the Proposer filter. For agreements where the caller is the acceptor, use the Acceptor filter.

  • AcceptorAccountId – The AWS account ID of the party accepting the agreement terms.

  • OfferId – The unique identifier of the offer in which the terms are registered in the agreement token.

  • Status – The current status of the agreement. Values include ACTIVE, ARCHIVED, CANCELLED, EXPIRED, RENEWED, REPLACED, and TERMINATED.

  • BeforeEndTime – A date used to filter agreements with a date before the endTime of an agreement.

  • AfterEndTime – A date used to filter agreements with a date after the endTime of an agreement.

  • AgreementType – The type of agreement. Values include PurchaseAgreement or VendorInsightsAgreement.

Type: Array of Filter objects

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Required: No

maxResults

The maximum number of agreements to return in the response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

nextToken

A token to specify where to start pagination.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 8192.

Pattern: ^[a-zA-Z0-9+/=]+$

Required: No

sort

An object that contains the SortBy and SortOrder attributes.

Type: Sort object

Required: No

Response Syntax

{ "agreementViewSummaries": [ { "acceptanceTime": number, "acceptor": { "accountId": "string" }, "agreementId": "string", "agreementType": "string", "endTime": number, "proposalSummary": { "offerId": "string", "resources": [ { "id": "string", "type": "string" } ] }, "proposer": { "accountId": "string" }, "startTime": number, "status": "string" } ], "nextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

agreementViewSummaries

A summary of the agreement, including top-level attributes (for example, the agreement ID, version, proposer, and acceptor).

Type: Array of AgreementViewSummary objects

nextToken

The token used for pagination. The field is null if there are no more results.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 8192.

Pattern: ^[a-zA-Z0-9+/=]+$

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

User does not have sufficient access to perform this action.

HTTP Status Code: 400

InternalServerException

Unexpected error during processing of request.

HTTP Status Code: 500

ThrottlingException

Request was denied due to request throttling.

HTTP Status Code: 400

ValidationException

The input fails to satisfy the constraints specified by the service.

HTTP Status Code: 400

Examples

Sample request

This example illustrates one usage of SearchAgreements.

{ "catalog": "AWSMarketplace", "filters": [ { "name": "PartyType", "values": ["Proposer"] }, { "name": "AfterEndTime", "values": ["2019-10-08T00:00:00.000Z"] }, { "name": "AcceptorAccountId", "values": ["123456789010"] } ] }

Sample response

This example illustrates one usage of SearchAgreements.

{ "agreementViewSummaries": [ { "agreementId": "fEXAMPLE-0aa6-4e42-8715-6a1EXAMPLE95", "acceptor": { "accountId": "123456789010" }, "proposer": { "accountId": "123456789010" }, "startTime": 2019-10-08T21:40:43.644Z, "endTime": 2023-10-08T21:40:43.644Z, "acceptanceTime": 2019-10-08T00:00:00.000Z, "agreementType": "PurchaseAgreement", "proposalSummary": { "resources": [ { "id": "0EXAMPLE-8ce8-4814-bcf1-636EXAMPLEb5", "type": "AmiProduct" } ], "offerId": "ABCDEFGHIJKLMNOP123" }, "status": "ACTIVE" } ], "nextToken": null }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: