Skip to content

/AWS1/IF_R5G=>CREATEACCESSSOURCE()

About CreateAccessSource

Creates an access source for a DNS view. Access sources define IP addresses or CIDR ranges that are allowed to send DNS queries to the Route 53 Global Resolver, along with the permitted DNS protocols.

Method Signature

METHODS /AWS1/IF_R5G~CREATEACCESSSOURCE
  IMPORTING
    !IV_CIDR TYPE /AWS1/R5GCIDR OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/R5GCLIENTTOKEN OPTIONAL
    !IV_IPADDRESSTYPE TYPE /AWS1/R5GIPADDRESSTYPE OPTIONAL
    !IV_NAME TYPE /AWS1/R5GRESOURCENAMESHORT OPTIONAL
    !IV_DNSVIEWID TYPE /AWS1/R5GRESOURCEID OPTIONAL
    !IV_PROTOCOL TYPE /AWS1/R5GDNSPROTOCOL OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_R5GTAGS_W=>TT_TAGS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_r5gcreateaccsourceout
  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_cidr TYPE /AWS1/R5GCIDR /AWS1/R5GCIDR

The IP address or CIDR range that is allowed to send DNS queries to the Route 53 Global Resolver.

iv_dnsviewid TYPE /AWS1/R5GRESOURCEID /AWS1/R5GRESOURCEID

The ID of the DNS view to associate with this access source.

iv_protocol TYPE /AWS1/R5GDNSPROTOCOL /AWS1/R5GDNSPROTOCOL

The DNS protocol that is permitted for this access source. Valid values are Do53 (DNS over port 53), DoT (DNS over TLS), and DoH (DNS over HTTPS).

Optional arguments:

iv_clienttoken TYPE /AWS1/R5GCLIENTTOKEN /AWS1/R5GCLIENTTOKEN

A unique string that identifies the request and ensures idempotency.

iv_ipaddresstype TYPE /AWS1/R5GIPADDRESSTYPE /AWS1/R5GIPADDRESSTYPE

The IP address type for this access source. Valid values are IPv4 and IPv6 (if the Route 53 Global Resolver supports dual-stack).

iv_name TYPE /AWS1/R5GRESOURCENAMESHORT /AWS1/R5GRESOURCENAMESHORT

A descriptive name for the access source.

it_tags TYPE /AWS1/CL_R5GTAGS_W=>TT_TAGS TT_TAGS

Tags to associate with the access source.

RETURNING

oo_output TYPE REF TO /aws1/cl_r5gcreateaccsourceout /AWS1/CL_R5GCREATEACCSOURCEOUT

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->createaccesssource(
  it_tags = VALUE /aws1/cl_r5gtags_w=>tt_tags(
    (
      VALUE /aws1/cl_r5gtags_w=>ts_tags_maprow(
        key = |string|
        value = new /aws1/cl_r5gtags_w( |string| )
      )
    )
  )
  iv_cidr = |string|
  iv_clienttoken = |string|
  iv_dnsviewid = |string|
  iv_ipaddresstype = |string|
  iv_name = |string|
  iv_protocol = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_resourcearn = lo_result->get_arn( ).
  lv_cidr = lo_result->get_cidr( ).
  lv_iso8601timestring = lo_result->get_createdat( ).
  lv_resourceid = lo_result->get_id( ).
  lv_ipaddresstype = lo_result->get_ipaddresstype( ).
  lv_resourcenameshort = lo_result->get_name( ).
  lv_resourceid = lo_result->get_dnsviewid( ).
  lv_dnsprotocol = lo_result->get_protocol( ).
  lv_crresourcestatus = lo_result->get_status( ).
  lv_iso8601timestring = lo_result->get_updatedat( ).
ENDIF.

CreateAccessSource example

CreateAccessSource example

DATA(lo_result) = lo_client->createaccesssource(
  it_tags = VALUE /aws1/cl_r5gtags_w=>tt_tags(
    (
      VALUE /aws1/cl_r5gtags_w=>ts_tags_maprow(
        key = |Key1|
        value = new /aws1/cl_r5gtags_w( |Value1| )
      )
    )
  )
  iv_cidr = |85.90.183.3/30|
  iv_clienttoken = |9fas9-9usdfa-xbi8-kco|
  iv_dnsviewid = |dnsv-123456789|
  iv_ipaddresstype = |IPV4|
  iv_name = |My Access Source|
  iv_protocol = |DO53|
).