/AWS1/IF_MBC=>CREATEACCESSOR()¶
About CreateAccessor¶
Creates a new accessor for use with Amazon Managed Blockchain service that supports token based access. The accessor contains information required for token based access.
Method Signature¶
METHODS /AWS1/IF_MBC~CREATEACCESSOR
  IMPORTING
    !IV_CLIENTREQUESTTOKEN TYPE /AWS1/MBCCLIENTREQTOKENSTRING OPTIONAL
    !IV_ACCESSORTYPE TYPE /AWS1/MBCACCESSORTYPE OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_MBCINPUTTAGMAP_W=>TT_INPUTTAGMAP OPTIONAL
    !IV_NETWORKTYPE TYPE /AWS1/MBCACCESSORNETWORKTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mbccreateaccoroutput
  RAISING
    /AWS1/CX_MBCACCESSDENIEDEX
    /AWS1/CX_MBCINTERNALSVCERROREX
    /AWS1/CX_MBCINVALIDREQUESTEX
    /AWS1/CX_MBCRESRCALRDYEXISTSEX
    /AWS1/CX_MBCRESRCLIMITEXCDEX
    /AWS1/CX_MBCTHROTTLINGEX
    /AWS1/CX_MBCTOOMANYTAGSEX
    /AWS1/CX_MBCCLIENTEXC
    /AWS1/CX_MBCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_clientrequesttoken TYPE /AWS1/MBCCLIENTREQTOKENSTRING /AWS1/MBCCLIENTREQTOKENSTRING¶
This is a unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the Amazon Web Services CLI.
iv_accessortype TYPE /AWS1/MBCACCESSORTYPE /AWS1/MBCACCESSORTYPE¶
The type of accessor.
Currently, accessor type is restricted to
BILLING_TOKEN.
Optional arguments:¶
it_tags TYPE /AWS1/CL_MBCINPUTTAGMAP_W=>TT_INPUTTAGMAP TT_INPUTTAGMAP¶
Tags to assign to the Accessor.
Each tag consists of a key and an optional value. You can specify multiple key-value pairs in a single request with an overall maximum of 50 tags allowed per resource.
For more information about tags, see Tagging Resources in the Amazon Managed Blockchain Ethereum Developer Guide, or Tagging Resources in the Amazon Managed Blockchain Hyperledger Fabric Developer Guide.
iv_networktype TYPE /AWS1/MBCACCESSORNETWORKTYPE /AWS1/MBCACCESSORNETWORKTYPE¶
The blockchain network that the
Accessortoken is created for.
Use the actual
networkTypevalue for the blockchain network that you are creating theAccessortoken for.
With the shut down of the Ethereum Goerli and Polygon Mumbai Testnet networks the following
networkTypevalues are no longer available for selection and use.
ETHEREUM_MAINNET_AND_GOERLI
ETHEREUM_GOERLI
POLYGON_MUMBAIHowever, your existing
Accessortokens with thesenetworkTypevalues will remain unchanged.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mbccreateaccoroutput /AWS1/CL_MBCCREATEACCOROUTPUT¶
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->createaccessor(
  it_tags = VALUE /aws1/cl_mbcinputtagmap_w=>tt_inputtagmap(
    (
      VALUE /aws1/cl_mbcinputtagmap_w=>ts_inputtagmap_maprow(
        value = new /aws1/cl_mbcinputtagmap_w( |string| )
        key = |string|
      )
    )
  )
  iv_accessortype = |string|
  iv_clientrequesttoken = |string|
  iv_networktype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_resourceidstring = lo_result->get_accessorid( ).
  lv_accessorbillingtokenstr = lo_result->get_billingtoken( ).
  lv_accessornetworktype = lo_result->get_networktype( ).
ENDIF.