Skip to content

/AWS1/CL_DET=>CREATEMEMBERS()

About CreateMembers

CreateMembers is used to send invitations to accounts. For the organization behavior graph, the Detective administrator account uses CreateMembers to enable organization accounts as member accounts.

For invited accounts, CreateMembers sends a request to invite the specified Amazon Web Services accounts to be member accounts in the behavior graph. This operation can only be called by the administrator account for a behavior graph.

CreateMembers verifies the accounts and then invites the verified accounts. The administrator can optionally specify to not send invitation emails to the member accounts. This would be used when the administrator manages their member accounts centrally.

For organization accounts in the organization behavior graph, CreateMembers attempts to enable the accounts. The organization accounts do not receive invitations.

The request provides the behavior graph ARN and the list of accounts to invite or to enable.

The response separates the requested accounts into two lists:

  • The accounts that CreateMembers was able to process. For invited accounts, includes member accounts that are being verified, that have passed verification and are to be invited, and that have failed verification. For organization accounts in the organization behavior graph, includes accounts that can be enabled and that cannot be enabled.

  • The accounts that CreateMembers was unable to process. This list includes accounts that were already invited to be member accounts in the behavior graph.

Method Signature

IMPORTING

Required arguments:

iv_grapharn TYPE /AWS1/DETGRAPHARN /AWS1/DETGRAPHARN

The ARN of the behavior graph.

it_accounts TYPE /AWS1/CL_DETACCOUNT=>TT_ACCOUNTLIST TT_ACCOUNTLIST

The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.

Optional arguments:

iv_message TYPE /AWS1/DETEMAILMESSAGE /AWS1/DETEMAILMESSAGE

Customized message text to include in the invitation email message to the invited member accounts.

iv_disableemailnotification TYPE /AWS1/DETBOOLEAN /AWS1/DETBOOLEAN

if set to true, then the invited accounts do not receive email notifications. By default, this is set to false, and the invited accounts receive email notifications.

Organization accounts in the organization behavior graph do not receive email notifications.

RETURNING

oo_output TYPE REF TO /aws1/cl_detcreatemembersrsp /AWS1/CL_DETCREATEMEMBERSRSP

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->/aws1/if_det~createmembers(
  it_accounts = VALUE /aws1/cl_detaccount=>tt_accountlist(
    (
      new /aws1/cl_detaccount(
        iv_accountid = |string|
        iv_emailaddress = |string|
      )
    )
  )
  iv_disableemailnotification = ABAP_TRUE
  iv_grapharn = |string|
  iv_message = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_members( ) into lo_row.
  lv_accountid = lo_row_1->get_accountid( ).
  lv_emailaddress = lo_row_1->get_emailaddress( ).
  lv_grapharn = lo_row_1->get_grapharn( ).
  lv_accountid = lo_row_1->get_masterid( ).
  lv_accountid = lo_row_1->get_administratorid( ).
  lv_memberstatus = lo_row_1->get_status( ).
  lv_memberdisabledreason = lo_row_1->get_disabledreason( ).
  lv_timestamp = lo_row_1->get_invitedtime( ).
  lv_timestamp = lo_row_1->get_updatedtime( ).
  lv_bytevalue = lo_row_1->get_volumeusageinbytes( ).
  lv_timestamp = lo_row_1->get_volumeusageupdatedtime( ).
  lv_percentage = lo_row_1->get_percentofgraphutilizat00( ).
  lv_timestamp = lo_row_1->get_percentofgraphutilizat01( ).
  lv_invitationtype = lo_row_1->get_invitationtype( ).
  LOOP AT lo_row_1->get_volusagebydatasrcpackage( ) into ls_row_2.
    lv_key = ls_row_2-key.
    lv_bytevalue = lo_value->get_volumeusageinbytes( ).
    lv_timestamp = lo_value->get_volumeusageupdatetime( ).
  ENDLOOP.
  LOOP AT lo_row_1->get_datasrcpackageingestst00( ) into ls_row_3.
    lv_key = ls_row_3-key.
    lv_datasourcepackageingest = lo_value_1->get_value( ).
  ENDLOOP.
ENDLOOP.
LOOP AT lo_result->get_unprocessedaccounts( ) into lo_row_4.
  lv_accountid = lo_row_5->get_accountid( ).
  lv_unprocessedreason = lo_row_5->get_reason( ).
ENDLOOP.