Skip to content

/AWS1/IF_WKR=>CREATENETWORK()

About CreateNetwork

Creates a new Wickr network with specified access level and configuration. This operation provisions a new communication network for your organization.

Method Signature

METHODS /AWS1/IF_WKR~CREATENETWORK
  IMPORTING
    !IV_NETWORKNAME TYPE /AWS1/WKRGENERICSTRING OPTIONAL
    !IV_ACCESSLEVEL TYPE /AWS1/WKRACCESSLEVEL OPTIONAL
    !IV_ENABLEPREMIUMFREETRIAL TYPE /AWS1/WKRBOOLEAN OPTIONAL
    !IV_ENCRYPTIONKEYARN TYPE /AWS1/WKRGENERICSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wkrcreatenetworkrsp
  RAISING
    /AWS1/CX_WKRBADREQUESTERROR
    /AWS1/CX_WKRFORBIDDENERROR
    /AWS1/CX_WKRINTSERVERERROR
    /AWS1/CX_WKRRATELIMITERROR
    /AWS1/CX_WKRRESNOTFOUNDERROR
    /AWS1/CX_WKRUNAUTHORIZEDERROR
    /AWS1/CX_WKRVALIDATIONERROR
    /AWS1/CX_WKRCLIENTEXC
    /AWS1/CX_WKRSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_networkname TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING

The name for the new network. Must be between 1 and 20 characters.

iv_accesslevel TYPE /AWS1/WKRACCESSLEVEL /AWS1/WKRACCESSLEVEL

The access level for the network. Valid values are STANDARD or PREMIUM, which determine the features and capabilities available to network members.

Optional arguments:

iv_enablepremiumfreetrial TYPE /AWS1/WKRBOOLEAN /AWS1/WKRBOOLEAN

Specifies whether to enable a premium free trial for the network. It is optional and has a default value as false. When set to true, the network starts with premium features for a limited trial period.

iv_encryptionkeyarn TYPE /AWS1/WKRGENERICSTRING /AWS1/WKRGENERICSTRING

The ARN of the Amazon Web Services KMS customer managed key to use for encrypting sensitive data in the network.

RETURNING

oo_output TYPE REF TO /aws1/cl_wkrcreatenetworkrsp /AWS1/CL_WKRCREATENETWORKRSP

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->createnetwork(
  iv_accesslevel = |string|
  iv_enablepremiumfreetrial = ABAP_TRUE
  iv_encryptionkeyarn = |string|
  iv_networkname = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_networkid = lo_result->get_networkid( ).
  lv_genericstring = lo_result->get_networkname( ).
  lv_genericstring = lo_result->get_encryptionkeyarn( ).
ENDIF.

Create network successfully

Create network successfully

DATA(lo_result) = lo_client->createnetwork(
  iv_accesslevel = |PREMIUM|
  iv_enablepremiumfreetrial = ABAP_FALSE
  iv_networkname = |Production Network|
).

Create network with free trial

Create network with free trial

DATA(lo_result) = lo_client->createnetwork(
  iv_accesslevel = |PREMIUM|
  iv_enablepremiumfreetrial = ABAP_TRUE
  iv_networkname = |Trial Network|
).

Create network - invalid name

Create network - invalid name

DATA(lo_result) = lo_client->createnetwork(
  iv_accesslevel = |STANDARD|
  iv_networkname = |This network name is way too long|
).