Skip to content

/AWS1/IF_R5G=>BATCHCREATEFIREWALLRULE()

About BatchCreateFirewallRule

Creates multiple DNS firewall rules in a single operation. This is more efficient than creating rules individually when you need to set up multiple rules at once.

Method Signature

METHODS /AWS1/IF_R5G~BATCHCREATEFIREWALLRULE
  IMPORTING
    !IT_FIREWALLRULES TYPE /AWS1/CL_R5GBTCCREFWRLINPITEM=>TT_BATCHCREFWALLRULEINPUTITEMS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r5gbtccrefwallruleout
  RAISING
    /AWS1/CX_R5GACCESSDENIEDEX
    /AWS1/CX_R5GINTERNALSERVEREX
    /AWS1/CX_R5GTHROTTLINGEX
    /AWS1/CX_R5GVLDTNEXCEPTION
    /AWS1/CX_R5GCLIENTEXC
    /AWS1/CX_R5GSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_firewallrules TYPE /AWS1/CL_R5GBTCCREFWRLINPITEM=>TT_BATCHCREFWALLRULEINPUTITEMS TT_BATCHCREFWALLRULEINPUTITEMS

The BatchCreateFirewallRuleInputItem objects contain the information for each Firewall rule.

RETURNING

oo_output TYPE REF TO /aws1/cl_r5gbtccrefwallruleout /AWS1/CL_R5GBTCCREFWALLRULEOUT

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->batchcreatefirewallrule(
  it_firewallrules = VALUE /aws1/cl_r5gbtccrefwrlinpitem=>tt_batchcrefwallruleinputitems(
    (
      new /aws1/cl_r5gbtccrefwrlinpitem(
        iv_action = |string|
        iv_blockoverridednstype = |string|
        iv_blockoverridedomain = |string|
        iv_blockoverridettl = 123
        iv_blockresponse = |string|
        iv_clienttoken = |string|
        iv_confidencethreshold = |string|
        iv_description = |string|
        iv_dnsadvancedprotection = |string|
        iv_dnsviewid = |string|
        iv_firewalldomainlistid = |string|
        iv_name = |string|
        iv_priority = 123
        iv_qtype = |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_failures( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lo_batchcreatefirewallrule = lo_row_1->get_firewallrule( ).
      IF lo_batchcreatefirewallrule IS NOT INITIAL.
        lv_firewallruleaction = lo_batchcreatefirewallrule->get_action( ).
        lv_blockoverridednsqueryty = lo_batchcreatefirewallrule->get_blockoverridednstype( ).
        lv_domain = lo_batchcreatefirewallrule->get_blockoverridedomain( ).
        lv_blockoverridettl = lo_batchcreatefirewallrule->get_blockoverridettl( ).
        lv_firewallblockresponse = lo_batchcreatefirewallrule->get_blockresponse( ).
        lv_clienttoken = lo_batchcreatefirewallrule->get_clienttoken( ).
        lv_confidencethreshold = lo_batchcreatefirewallrule->get_confidencethreshold( ).
        lv_iso8601timestring = lo_batchcreatefirewallrule->get_createdat( ).
        lv_resourcedescription = lo_batchcreatefirewallrule->get_description( ).
        lv_dnsadvancedprotection = lo_batchcreatefirewallrule->get_dnsadvancedprotection( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_firewalldomainlistid( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_id( ).
        lv_resourcename = lo_batchcreatefirewallrule->get_manageddomainlistname( ).
        lv_resourcename = lo_batchcreatefirewallrule->get_name( ).
        lv_firewallrulepriority = lo_batchcreatefirewallrule->get_priority( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_dnsviewid( ).
        lv_dnsquerytype = lo_batchcreatefirewallrule->get_querytype( ).
        lv_crresourcestatus = lo_batchcreatefirewallrule->get_status( ).
        lv_iso8601timestring = lo_batchcreatefirewallrule->get_updatedat( ).
      ENDIF.
      lv_integer = lo_row_1->get_code( ).
      lv_string = lo_row_1->get_message( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_successes( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lo_batchcreatefirewallrule = lo_row_1->get_firewallrule( ).
      IF lo_batchcreatefirewallrule IS NOT INITIAL.
        lv_firewallruleaction = lo_batchcreatefirewallrule->get_action( ).
        lv_blockoverridednsqueryty = lo_batchcreatefirewallrule->get_blockoverridednstype( ).
        lv_domain = lo_batchcreatefirewallrule->get_blockoverridedomain( ).
        lv_blockoverridettl = lo_batchcreatefirewallrule->get_blockoverridettl( ).
        lv_firewallblockresponse = lo_batchcreatefirewallrule->get_blockresponse( ).
        lv_clienttoken = lo_batchcreatefirewallrule->get_clienttoken( ).
        lv_confidencethreshold = lo_batchcreatefirewallrule->get_confidencethreshold( ).
        lv_iso8601timestring = lo_batchcreatefirewallrule->get_createdat( ).
        lv_resourcedescription = lo_batchcreatefirewallrule->get_description( ).
        lv_dnsadvancedprotection = lo_batchcreatefirewallrule->get_dnsadvancedprotection( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_firewalldomainlistid( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_id( ).
        lv_resourcename = lo_batchcreatefirewallrule->get_manageddomainlistname( ).
        lv_resourcename = lo_batchcreatefirewallrule->get_name( ).
        lv_firewallrulepriority = lo_batchcreatefirewallrule->get_priority( ).
        lv_resourceid = lo_batchcreatefirewallrule->get_dnsviewid( ).
        lv_dnsquerytype = lo_batchcreatefirewallrule->get_querytype( ).
        lv_crresourcestatus = lo_batchcreatefirewallrule->get_status( ).
        lv_iso8601timestring = lo_batchcreatefirewallrule->get_updatedat( ).
      ENDIF.
      lv_integer = lo_row_1->get_code( ).
      lv_string = lo_row_1->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.