/AWS1/IF_MPG=>SEARCHAGREEMENTS()¶
About 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:
-
PartyTypeasProposer+AgreementType+ResourceIdentifier -
PartyTypeasProposer+AgreementType+OfferId -
PartyTypeasProposer+AgreementType+AcceptorAccountId -
PartyTypeasProposer+AgreementType+Status -
PartyTypeasProposer+AgreementType+ResourceIdentifier+Status -
PartyTypeasProposer+AgreementType+OfferId+Status -
PartyTypeasProposer+AgreementType+AcceptorAccountId+Status -
PartyTypeasProposer+AgreementType+ResourceType+Status -
PartyTypeasProposer+AgreementType+AcceptorAccountId+ResourceType+Status -
PartyTypeasProposer+AgreementType+AcceptorAccountId+OfferId -
PartyTypeasProposer+AgreementType+AcceptorAccountId+OfferId+Status -
PartyTypeasProposer+AgreementType+AcceptorAccountId+ResourceIdentifier -
PartyTypeasProposer+AgreementType+AcceptorAccountId+ResourceIdentifier+Status -
PartyTypeasProposer+AgreementType+AcceptorAccountId+ResourceType
Method Signature¶
METHODS /AWS1/IF_MPG~SEARCHAGREEMENTS
IMPORTING
!IV_CATALOG TYPE /AWS1/MPGCATALOG OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_MPGFILTER=>TT_FILTERLIST OPTIONAL
!IO_SORT TYPE REF TO /AWS1/CL_MPGSORT OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/MPGMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/MPGNEXTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgsrchagreementsout
RAISING
/AWS1/CX_MPGACCESSDENIEDEX
/AWS1/CX_MPGINTERNALSERVEREX
/AWS1/CX_MPGTHROTTLINGEX
/AWS1/CX_MPGVALIDATIONEX
/AWS1/CX_MPGCLIENTEXC
/AWS1/CX_MPGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_catalog TYPE /AWS1/MPGCATALOG /AWS1/MPGCATALOG¶
The catalog in which the agreement was created.
it_filters TYPE /AWS1/CL_MPGFILTER=>TT_FILTERLIST TT_FILTERLIST¶
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, orSaaSProduct).
PartyType– The party type (eitherAcceptororProposer) of the caller. For agreements where the caller is the proposer, use theProposerfilter. For agreements where the caller is the acceptor, use theAcceptorfilter.
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 includeACTIVE,ARCHIVED,CANCELLED,EXPIRED,RENEWED,REPLACED, andTERMINATED.
BeforeEndTime– A date used to filter agreements with a date before theendTimeof an agreement.
AfterEndTime– A date used to filter agreements with a date after theendTimeof an agreement.
AgreementType– The type of agreement. Values includePurchaseAgreementorVendorInsightsAgreement.
io_sort TYPE REF TO /AWS1/CL_MPGSORT /AWS1/CL_MPGSORT¶
An object that contains the
SortByandSortOrderattributes.
iv_maxresults TYPE /AWS1/MPGMAXRESULTS /AWS1/MPGMAXRESULTS¶
The maximum number of agreements to return in the response.
iv_nexttoken TYPE /AWS1/MPGNEXTTOKEN /AWS1/MPGNEXTTOKEN¶
A token to specify where to start pagination.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpgsrchagreementsout /AWS1/CL_MPGSRCHAGREEMENTSOUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->searchagreements(
io_sort = new /aws1/cl_mpgsort(
iv_sortby = |string|
iv_sortorder = |string|
)
it_filters = VALUE /aws1/cl_mpgfilter=>tt_filterlist(
(
new /aws1/cl_mpgfilter(
it_values = VALUE /aws1/cl_mpgfiltervaluelist_w=>tt_filtervaluelist(
( new /aws1/cl_mpgfiltervaluelist_w( |string| ) )
)
iv_name = |string|
)
)
)
iv_catalog = |string|
iv_maxresults = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_agreementviewsummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_resourceid = lo_row_1->get_agreementid( ).
lv_timestamp = lo_row_1->get_acceptancetime( ).
lv_timestamp = lo_row_1->get_starttime( ).
lv_timestamp = lo_row_1->get_endtime( ).
lv_agreementtype = lo_row_1->get_agreementtype( ).
lo_acceptor = lo_row_1->get_acceptor( ).
IF lo_acceptor IS NOT INITIAL.
lv_awsaccountid = lo_acceptor->get_accountid( ).
ENDIF.
lo_proposer = lo_row_1->get_proposer( ).
IF lo_proposer IS NOT INITIAL.
lv_awsaccountid = lo_proposer->get_accountid( ).
ENDIF.
lo_proposalsummary = lo_row_1->get_proposalsummary( ).
IF lo_proposalsummary IS NOT INITIAL.
LOOP AT lo_proposalsummary->get_resources( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_resourceid = lo_row_3->get_id( ).
lv_agreementresourcetype = lo_row_3->get_type( ).
ENDIF.
ENDLOOP.
lv_offerid = lo_proposalsummary->get_offerid( ).
ENDIF.
lv_agreementstatus = lo_row_1->get_status( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.