Skip to content

aws.marketplace_agreement.search_agreements

Example SQL Queries

SELECT * FROM
aws.marketplace_agreement.search_agreements;

Description

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

Table Definition

Column NameColumn Data Type
catalog Input Column

The catalog in which the agreement was created.

VARCHAR
filters Input Column

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.

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filters[]
Show child fields
filters[].name

The name of the filter.

filters[].values[]
max_results Input Column

The maximum number of agreements to return in the response.

BIGINT
next_token Input Column

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

VARCHAR
sort Input Column

An object that contains the SortBy and SortOrder attributes.

STRUCT(
"sort_by" VARCHAR,
"sort_order" VARCHAR
)
Show child fields
sort.sort_by

The attribute on which the data is grouped, which can be by StartTime and EndTime. The default value is EndTime.

sort.sort_order

The sorting order, which can be ASCENDING or DESCENDING. The default value is DESCENDING.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

agreement_view_summaries

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

STRUCT(
"acceptance_time" TIMESTAMP_S,
"acceptor" STRUCT(
"account_id" VARCHAR
),
"agreement_id" VARCHAR,
"agreement_type" VARCHAR,
"end_time" TIMESTAMP_S,
"proposal_summary" STRUCT(
"offer_id" VARCHAR,
"resources" STRUCT(
"id" VARCHAR,
"type" VARCHAR
)[]
),
"proposer" STRUCT(
"account_id" VARCHAR
),
"start_time" TIMESTAMP_S,
"status" VARCHAR
)[]
Show child fields
agreement_view_summaries[]
Show child fields
agreement_view_summaries[].acceptance_time

The date and time that the agreement was accepted.

agreement_view_summaries[].acceptor

Details of the party accepting the agreement terms. This is commonly the buyer for PurchaseAgreement.

Show child fields
agreement_view_summaries[].acceptor.account_id

The AWS account ID of the acceptor.

agreement_view_summaries[].agreement_id

The unique identifier of the agreement.

agreement_view_summaries[].agreement_type

The type of agreement. Values are PurchaseAgreement or VendorInsightsAgreement.

agreement_view_summaries[].end_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.

agreement_view_summaries[].proposal_summary

A summary of the proposal

Show child fields
agreement_view_summaries[].proposal_summary.offer_id

The unique identifier of the offer in AWS Marketplace.

agreement_view_summaries[].proposal_summary.resources[]
Show child fields
agreement_view_summaries[].proposal_summary.resources[].id

The unique identifier of the resource.

We mention the term resource, which is most commonly a product, so a resourceId is also a productId.

agreement_view_summaries[].proposal_summary.resources[].type

Type of the resource, which is the product. Values include SaaSProduct or AmiProduct.

agreement_view_summaries[].proposer

Details of the party proposing the agreement terms, most commonly the seller for PurchaseAgreement.

Show child fields
agreement_view_summaries[].proposer.account_id

The AWS account ID of the proposer.

agreement_view_summaries[].start_time

The date and time when the agreement starts.

agreement_view_summaries[].status

The current status of the agreement.