/AWS1/CL_BDK=>LSTFNDATIONMDELAGREEMENTOF00()
¶
About ListFoundationModelAgreementOffers¶
Get the offers associated with the specified model.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_modelid
TYPE /AWS1/BDKBEDROCKMODELID
/AWS1/BDKBEDROCKMODELID
¶
Model Id of the foundation model.
Optional arguments:¶
iv_offertype
TYPE /AWS1/BDKOFFERTYPE
/AWS1/BDKOFFERTYPE
¶
Type of offer associated with the model.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_bdklstfndationmdela01
/AWS1/CL_BDKLSTFNDATIONMDELA01
¶
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->/aws1/if_bdk~lstfndationmdelagreementof00(
iv_modelid = |string|
iv_offertype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_bedrockmodelid = lo_result->get_modelid( ).
LOOP AT lo_result->get_offers( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_offerid = lo_row_1->get_offerid( ).
lv_offertoken = lo_row_1->get_offertoken( ).
lo_termdetails = lo_row_1->get_termdetails( ).
IF lo_termdetails IS NOT INITIAL.
lo_pricingterm = lo_termdetails->get_usagebasedpricingterm( ).
IF lo_pricingterm IS NOT INITIAL.
LOOP AT lo_pricingterm->get_ratecard( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_dimension( ).
lv_string = lo_row_3->get_price( ).
lv_string = lo_row_3->get_description( ).
lv_string = lo_row_3->get_unit( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_legalterm = lo_termdetails->get_legalterm( ).
IF lo_legalterm IS NOT INITIAL.
lv_string = lo_legalterm->get_url( ).
ENDIF.
lo_supportterm = lo_termdetails->get_supportterm( ).
IF lo_supportterm IS NOT INITIAL.
lv_string = lo_supportterm->get_refundpolicydescription( ).
ENDIF.
lo_validityterm = lo_termdetails->get_validityterm( ).
IF lo_validityterm IS NOT INITIAL.
lv_string = lo_validityterm->get_agreementduration( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.