Skip to content

/AWS1/IF_DRS=>CREATESOURCENETWORK()

About CreateSourceNetwork

Create a new Source Network resource for a provided VPC ID.

Method Signature

METHODS /AWS1/IF_DRS~CREATESOURCENETWORK
  IMPORTING
    !IV_VPCID TYPE /AWS1/DRSVPCID OPTIONAL
    !IV_ORIGINACCOUNTID TYPE /AWS1/DRSACCOUNTID OPTIONAL
    !IV_ORIGINREGION TYPE /AWS1/DRSAWSREGION OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_DRSTAGSMAP_W=>TT_TAGSMAP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_drscresrcnetworkrsp
  RAISING
    /AWS1/CX_DRSCONFLICTEXCEPTION
    /AWS1/CX_DRSINTERNALSERVEREX
    /AWS1/CX_DRSRESOURCENOTFOUNDEX
    /AWS1/CX_DRSSERVICEQUOTAEXCDEX
    /AWS1/CX_DRSTHROTTLINGEX
    /AWS1/CX_DRSUNINITIALIZEDACEX
    /AWS1/CX_DRSVALIDATIONEX
    /AWS1/CX_DRSCLIENTEXC
    /AWS1/CX_DRSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_vpcid TYPE /AWS1/DRSVPCID /AWS1/DRSVPCID

Which VPC ID to protect.

iv_originaccountid TYPE /AWS1/DRSACCOUNTID /AWS1/DRSACCOUNTID

Account containing the VPC to protect.

iv_originregion TYPE /AWS1/DRSAWSREGION /AWS1/DRSAWSREGION

Region containing the VPC to protect.

Optional arguments:

it_tags TYPE /AWS1/CL_DRSTAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP

A set of tags to be associated with the Source Network resource.

RETURNING

oo_output TYPE REF TO /aws1/cl_drscresrcnetworkrsp /AWS1/CL_DRSCRESRCNETWORKRSP

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->createsourcenetwork(
  it_tags = VALUE /aws1/cl_drstagsmap_w=>tt_tagsmap(
    (
      VALUE /aws1/cl_drstagsmap_w=>ts_tagsmap_maprow(
        key = |string|
        value = new /aws1/cl_drstagsmap_w( |string| )
      )
    )
  )
  iv_originaccountid = |string|
  iv_originregion = |string|
  iv_vpcid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_sourcenetworkid = lo_result->get_sourcenetworkid( ).
ENDIF.