/AWS1/IF_R5G=>CREATEFIREWALLRULE()¶
About CreateFirewallRule¶
Creates a DNS firewall rule. Firewall rules define actions (ALLOW, BLOCK, or ALERT) to take on DNS queries that match specified domain lists, managed domain lists, or advanced threat protections.
Method Signature¶
METHODS /AWS1/IF_R5G~CREATEFIREWALLRULE
IMPORTING
!IV_ACTION TYPE /AWS1/R5GFIREWALLRULEACTION OPTIONAL
!IV_BLOCKOVERRIDEDNSTYPE TYPE /AWS1/R5GBLOCKOVRDDNSQUERYTYPE OPTIONAL
!IV_BLOCKOVERRIDEDOMAIN TYPE /AWS1/R5GDOMAIN OPTIONAL
!IV_BLOCKOVERRIDETTL TYPE /AWS1/R5GBLOCKOVERRIDETTL OPTIONAL
!IV_BLOCKRESPONSE TYPE /AWS1/R5GFIREWALLBLOCKRESPONSE OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/R5GCLIENTTOKEN OPTIONAL
!IV_CONFIDENCETHRESHOLD TYPE /AWS1/R5GCONFIDENCETHRESHOLD OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/R5GRESOURCEDESCRIPTION OPTIONAL
!IV_DNSADVANCEDPROTECTION TYPE /AWS1/R5GDNSADVANCEDPROTECTION OPTIONAL
!IV_FIREWALLDOMAINLISTID TYPE /AWS1/R5GRESOURCEID OPTIONAL
!IV_NAME TYPE /AWS1/R5GRESOURCENAME OPTIONAL
!IV_PRIORITY TYPE /AWS1/R5GFIREWALLRULEPRIORITY OPTIONAL
!IV_DNSVIEWID TYPE /AWS1/R5GRESOURCEID OPTIONAL
!IV_QTYPE TYPE /AWS1/R5GDNSQUERYTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r5gcreatefwallruleout
RAISING
/AWS1/CX_R5GACCESSDENIEDEX
/AWS1/CX_R5GCONFLICTEXCEPTION
/AWS1/CX_R5GINTERNALSERVEREX
/AWS1/CX_R5GRESOURCENOTFOUNDEX
/AWS1/CX_R5GSERVICEQUOTAEXCDEX
/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:¶
iv_action TYPE /AWS1/R5GFIREWALLRULEACTION /AWS1/R5GFIREWALLRULEACTION¶
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list:
ALLOW- Permit the request to go through.
ALERT- Permit the request and send metrics and logs to CloudWatch.
BLOCK- Disallow the request. This option requires additional details in the rule'sBlockResponse.
iv_name TYPE /AWS1/R5GRESOURCENAME /AWS1/R5GRESOURCENAME¶
A descriptive name for the firewall rule.
iv_dnsviewid TYPE /AWS1/R5GRESOURCEID /AWS1/R5GRESOURCEID¶
The ID of the DNS view to associate with this firewall rule.
Optional arguments:¶
iv_blockoverridednstype TYPE /AWS1/R5GBLOCKOVRDDNSQUERYTYPE /AWS1/R5GBLOCKOVRDDNSQUERYTYPE¶
The DNS record's type. This determines the format of the record value that you provided in
BlockOverrideDomain. Used for the rule actionBLOCKwith aBlockResponsesetting ofOVERRIDE.This setting is required if the
BlockResponsesetting isOVERRIDE.
iv_blockoverridedomain TYPE /AWS1/R5GDOMAIN /AWS1/R5GDOMAIN¶
The custom DNS record to send back in response to the query. Used for the rule action
BLOCKwith aBlockResponsesetting ofOVERRIDE.This setting is required if the
BlockResponsesetting isOVERRIDE.
iv_blockoverridettl TYPE /AWS1/R5GBLOCKOVERRIDETTL /AWS1/R5GBLOCKOVERRIDETTL¶
The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Used for the rule action
BLOCKwith aBlockResponsesetting ofOVERRIDE.This setting is required if the
BlockResponsesetting isOVERRIDE.
iv_blockresponse TYPE /AWS1/R5GFIREWALLBLOCKRESPONSE /AWS1/R5GFIREWALLBLOCKRESPONSE¶
The response to return when the action is BLOCK. Valid values are NXDOMAIN (domain does not exist), NODATA (domain exists but no records), or OVERRIDE (return custom response).
iv_clienttoken TYPE /AWS1/R5GCLIENTTOKEN /AWS1/R5GCLIENTTOKEN¶
A unique, case-sensitive identifier to ensure idempotency. This means that making the same request multiple times with the same
clientTokenhas the same result every time.
iv_confidencethreshold TYPE /AWS1/R5GCONFIDENCETHRESHOLD /AWS1/R5GCONFIDENCETHRESHOLD¶
The confidence threshold for advanced threat detection. Valid values are HIGH, MEDIUM, or LOW, indicating the accuracy level required for threat detection.
iv_description TYPE /AWS1/R5GRESOURCEDESCRIPTION /AWS1/R5GRESOURCEDESCRIPTION¶
An optional description for the firewall rule.
iv_dnsadvancedprotection TYPE /AWS1/R5GDNSADVANCEDPROTECTION /AWS1/R5GDNSADVANCEDPROTECTION¶
Whether to enable advanced DNS threat protection for this rule. Advanced protection can detect and block DNS tunneling and Domain Generation Algorithm (DGA) threats.
iv_firewalldomainlistid TYPE /AWS1/R5GRESOURCEID /AWS1/R5GRESOURCEID¶
The ID of the firewall domain list to use in this rule.
iv_priority TYPE /AWS1/R5GFIREWALLRULEPRIORITY /AWS1/R5GFIREWALLRULEPRIORITY¶
The priority of this rule. Rules are evaluated in priority order, with lower numbers having higher priority. When a DNS query matches multiple rules, the rule with the highest priority (lowest number) is applied.
iv_qtype TYPE /AWS1/R5GDNSQUERYTYPE /AWS1/R5GDNSQUERYTYPE¶
The DNS query type to match for this rule. Examples include A (IPv4 address), AAAA (IPv6 address), MX (mail exchange), or TXT (text record).
RETURNING¶
oo_output TYPE REF TO /aws1/cl_r5gcreatefwallruleout /AWS1/CL_R5GCREATEFWALLRULEOUT¶
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->createfirewallrule(
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.
lv_firewallruleaction = lo_result->get_action( ).
lv_blockoverridednsqueryty = lo_result->get_blockoverridednstype( ).
lv_domain = lo_result->get_blockoverridedomain( ).
lv_blockoverridettl = lo_result->get_blockoverridettl( ).
lv_firewallblockresponse = lo_result->get_blockresponse( ).
lv_confidencethreshold = lo_result->get_confidencethreshold( ).
lv_iso8601timestring = lo_result->get_createdat( ).
lv_resourcedescription = lo_result->get_description( ).
lv_dnsadvancedprotection = lo_result->get_dnsadvancedprotection( ).
lv_resourceid = lo_result->get_firewalldomainlistid( ).
lv_resourceid = lo_result->get_id( ).
lv_resourcename = lo_result->get_name( ).
lv_firewallrulepriority = lo_result->get_priority( ).
lv_resourceid = lo_result->get_dnsviewid( ).
lv_dnsquerytype = lo_result->get_querytype( ).
lv_crresourcestatus = lo_result->get_status( ).
lv_iso8601timestring = lo_result->get_updatedat( ).
ENDIF.