Skip to content

/AWS1/IF_OUT=>CREATEQUOTE()

About CreateQuote

Creates a quote for an Outpost. A quote provides pricing and configuration options based on the requested capacity. You can optionally associate the quote with an existing Outpost or create a standalone quote by specifying only the country code and requested capacities.

Method Signature

METHODS /AWS1/IF_OUT~CREATEQUOTE
  IMPORTING
    !IV_OUTPOSTIDENTIFIER TYPE /AWS1/OUTOUTPOSTIDENTIFIER OPTIONAL
    !IV_COUNTRYCODE TYPE /AWS1/OUTCOUNTRYCODE OPTIONAL
    !IT_REQUESTEDCAPACITIES TYPE /AWS1/CL_OUTQUOTECAPACITY=>TT_QUOTECAPACITYLIST OPTIONAL
    !IT_REQUESTEDCONSTRAINTS TYPE /AWS1/CL_OUTQUOTECONSTRAINT=>TT_QUOTECONSTRAINTLIST OPTIONAL
    !IT_REQUESTEDPAYMENTOPTIONS TYPE /AWS1/CL_OUTPMNTOPTIONLIST_W=>TT_PAYMENTOPTIONLIST OPTIONAL
    !IT_REQUESTEDPAYMENTTERMS TYPE /AWS1/CL_OUTPAYMENTTERMLIST_W=>TT_PAYMENTTERMLIST OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/OUTQUOTEDESCRIPTION OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_outcreatequoteoutput
  RAISING
    /AWS1/CX_OUTACCESSDENIEDEX
    /AWS1/CX_OUTINTERNALSERVEREX
    /AWS1/CX_OUTNOTFOUNDEXCEPTION
    /AWS1/CX_OUTVALIDATIONEX
    /AWS1/CX_OUTCLIENTEXC
    /AWS1/CX_OUTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_countrycode TYPE /AWS1/OUTCOUNTRYCODE /AWS1/OUTCOUNTRYCODE

The country code for the Outpost site location.

it_requestedcapacities TYPE /AWS1/CL_OUTQUOTECAPACITY=>TT_QUOTECAPACITYLIST TT_QUOTECAPACITYLIST

The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.

Optional arguments:

iv_outpostidentifier TYPE /AWS1/OUTOUTPOSTIDENTIFIER /AWS1/OUTOUTPOSTIDENTIFIER

The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.

it_requestedconstraints TYPE /AWS1/CL_OUTQUOTECONSTRAINT=>TT_QUOTECONSTRAINTLIST TT_QUOTECONSTRAINTLIST

The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.

it_requestedpaymentoptions TYPE /AWS1/CL_OUTPMNTOPTIONLIST_W=>TT_PAYMENTOPTIONLIST TT_PAYMENTOPTIONLIST

The payment options to include in the quote pricing. If not specified, all available payment options are returned.

it_requestedpaymentterms TYPE /AWS1/CL_OUTPAYMENTTERMLIST_W=>TT_PAYMENTTERMLIST TT_PAYMENTTERMLIST

The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.

iv_description TYPE /AWS1/OUTQUOTEDESCRIPTION /AWS1/OUTQUOTEDESCRIPTION

A description for the quote.

RETURNING

oo_output TYPE REF TO /aws1/cl_outcreatequoteoutput /AWS1/CL_OUTCREATEQUOTEOUTPUT

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->createquote(
  it_requestedcapacities = VALUE /aws1/cl_outquotecapacity=>tt_quotecapacitylist(
    (
      new /aws1/cl_outquotecapacity(
        iv_quantity = '0.1'
        iv_quotecapacitytype = |string|
        iv_unit = |string|
      )
    )
  )
  it_requestedconstraints = VALUE /aws1/cl_outquoteconstraint=>tt_quoteconstraintlist(
    (
      new /aws1/cl_outquoteconstraint(
        iv_quoteconstrainttype = |string|
        iv_value = |string|
      )
    )
  )
  it_requestedpaymentoptions = VALUE /aws1/cl_outpmntoptionlist_w=>tt_paymentoptionlist(
    ( new /aws1/cl_outpmntoptionlist_w( |string| ) )
  )
  it_requestedpaymentterms = VALUE /aws1/cl_outpaymenttermlist_w=>tt_paymenttermlist(
    ( new /aws1/cl_outpaymenttermlist_w( |string| ) )
  )
  iv_countrycode = |string|
  iv_description = |string|
  iv_outpostidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_quote = lo_result->get_quote( ).
  IF lo_quote IS NOT INITIAL.
    lv_quoteid = lo_quote->get_quoteid( ).
    lv_accountid = lo_quote->get_accountid( ).
    lv_quotestatus = lo_quote->get_quotestatus( ).
    lv_statusmessage = lo_quote->get_statusmessage( ).
    lv_outpostarn = lo_quote->get_outpostarn( ).
    lv_countrycode = lo_quote->get_countrycode( ).
    LOOP AT lo_quote->get_requestedcapacities( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_quotecapacitytype = lo_row_1->get_quotecapacitytype( ).
        lv_string = lo_row_1->get_unit( ).
        lv_nullablefloat = lo_row_1->get_quantity( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_quote->get_requestedconstraints( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_quoteconstrainttype = lo_row_3->get_quoteconstrainttype( ).
        lv_constraintvalue = lo_row_3->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_quote->get_requestedpaymentoptions( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_paymentoption = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_quote->get_requestedpaymentterms( ) into lo_row_6.
      lo_row_7 = lo_row_6.
      IF lo_row_7 IS NOT INITIAL.
        lv_paymentterm = lo_row_7->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_quote->get_quoteoptions( ) into lo_row_8.
      lo_row_9 = lo_row_8.
      IF lo_row_9 IS NOT INITIAL.
        lv_quoteoptionidentifier = lo_row_9->get_quoteoptionidentifier( ).
        LOOP AT lo_row_9->get_capacities( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv_quotecapacitytype = lo_row_1->get_quotecapacitytype( ).
            lv_string = lo_row_1->get_unit( ).
            lv_nullablefloat = lo_row_1->get_quantity( ).
          ENDIF.
        ENDLOOP.
        lo_capacitysummary = lo_row_9->get_capacitysummary( ).
        IF lo_capacitysummary IS NOT INITIAL.
          LOOP AT lo_capacitysummary->get_existingcapacities( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_quotecapacitytype = lo_row_1->get_quotecapacitytype( ).
              lv_string = lo_row_1->get_unit( ).
              lv_nullablefloat = lo_row_1->get_quantity( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_capacitysummary->get_finalcapacities( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_quotecapacitytype = lo_row_1->get_quotecapacitytype( ).
              lv_string = lo_row_1->get_unit( ).
              lv_nullablefloat = lo_row_1->get_quantity( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_capacitysummary->get_capacitychange( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_quotecapacitytype = lo_row_1->get_quotecapacitytype( ).
              lv_string = lo_row_1->get_unit( ).
              lv_nullablefloat = lo_row_1->get_quantity( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
        LOOP AT lo_row_9->get_specifications( ) into lo_row_10.
          lo_row_11 = lo_row_10.
          IF lo_row_11 IS NOT INITIAL.
            lv_quotespecificationtype = lo_row_11->get_quotespecificationtype( ).
            lo_rackspecificationdetail = lo_row_11->get_existingrackspecdetails( ).
            IF lo_rackspecificationdetail IS NOT INITIAL.
              lv_rackid = lo_rackspecificationdetail->get_rackid( ).
              lv_quoterackusetype = lo_rackspecificationdetail->get_rackuse( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackpowerdrawkva( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackweightlbs( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackheightinches( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackwidthinches( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackdepthinches( ).
              lv_rackunitheight = lo_rackspecificationdetail->get_rackunitheight( ).
              LOOP AT lo_rackspecificationdetail->get_ec2capacities( ) into lo_row_12.
                lo_row_13 = lo_row_12.
                IF lo_row_13 IS NOT INITIAL.
                  lv_family = lo_row_13->get_family( ).
                  lv_maxsize = lo_row_13->get_maxsize( ).
                  lv_quantity = lo_row_13->get_quantity( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
            lo_rackspecificationdetail = lo_row_11->get_finalrackspecdetails( ).
            IF lo_rackspecificationdetail IS NOT INITIAL.
              lv_rackid = lo_rackspecificationdetail->get_rackid( ).
              lv_quoterackusetype = lo_rackspecificationdetail->get_rackuse( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackpowerdrawkva( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackweightlbs( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackheightinches( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackwidthinches( ).
              lv_nullablefloat = lo_rackspecificationdetail->get_rackdepthinches( ).
              lv_rackunitheight = lo_rackspecificationdetail->get_rackunitheight( ).
              LOOP AT lo_rackspecificationdetail->get_ec2capacities( ) into lo_row_12.
                lo_row_13 = lo_row_12.
                IF lo_row_13 IS NOT INITIAL.
                  lv_family = lo_row_13->get_family( ).
                  lv_maxsize = lo_row_13->get_maxsize( ).
                  lv_quantity = lo_row_13->get_quantity( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
            lo_serverspecificationdeta = lo_row_11->get_serverspecdetails( ).
            IF lo_serverspecificationdeta IS NOT INITIAL.
              lv_nullablefloat = lo_serverspecificationdeta->get_serverpowerdrawkva( ).
              lv_nullablefloat = lo_serverspecificationdeta->get_serverweightlbs( ).
              lv_nullablefloat = lo_serverspecificationdeta->get_serverheightinches( ).
              lv_nullablefloat = lo_serverspecificationdeta->get_serverwidthinches( ).
              lv_nullablefloat = lo_serverspecificationdeta->get_serverdepthinches( ).
              lv_rackunitheight = lo_serverspecificationdeta->get_rackunitheight( ).
              LOOP AT lo_serverspecificationdeta->get_ec2capacities( ) into lo_row_12.
                lo_row_13 = lo_row_12.
                IF lo_row_13 IS NOT INITIAL.
                  lv_family = lo_row_13->get_family( ).
                  lv_maxsize = lo_row_13->get_maxsize( ).
                  lv_quantity = lo_row_13->get_quantity( ).
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
        ENDLOOP.
        LOOP AT lo_row_9->get_pricingoptions( ) into lo_row_14.
          lo_row_15 = lo_row_14.
          IF lo_row_15 IS NOT INITIAL.
            lv_quotepricingtype = lo_row_15->get_pricingtype( ).
            lo_subscriptionpricingdeta = lo_row_15->get_subscrpricingdetails( ).
            IF lo_subscriptionpricingdeta IS NOT INITIAL.
              lv_paymentoption = lo_subscriptionpricingdeta->get_paymentoption( ).
              lv_paymentterm = lo_subscriptionpricingdeta->get_paymentterm( ).
              lv_nullablefloat = lo_subscriptionpricingdeta->get_upfrontprice( ).
              lv_nullablefloat = lo_subscriptionpricingdeta->get_monthlyrecurringprice( ).
              lv_currencycode = lo_subscriptionpricingdeta->get_currency( ).
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
    LOOP AT lo_quote->get_orderingrequirements( ) into lo_row_16.
      lo_row_17 = lo_row_16.
      IF lo_row_17 IS NOT INITIAL.
        lv_statusmessage = lo_row_17->get_statusmessage( ).
        lv_orderingrequirementtype = lo_row_17->get_orderingrequirementtype( ).
        lv_orderingrequirementstat = lo_row_17->get_status( ).
      ENDIF.
    ENDLOOP.
    lv_orderidentifier = lo_quote->get_submittedorderid( ).
    lv_iso8601timestamp = lo_quote->get_createddate( ).
    lv_iso8601timestamp = lo_quote->get_expirationdate( ).
    lv_quotedescription = lo_quote->get_description( ).
  ENDIF.
ENDIF.