Skip to content

/AWS1/IF_KFK=>CREATEREPLICATOR()

About CreateReplicator

Creates the replicator.

Method Signature

METHODS /AWS1/IF_KFK~CREATEREPLICATOR
  IMPORTING
    !IV_DESCRIPTION TYPE /AWS1/KFK__STRINGMAX1024 OPTIONAL
    !IT_KAFKACLUSTERS TYPE /AWS1/CL_KFKKAFKACLUSTER=>TT___LISTOFKAFKACLUSTER OPTIONAL
    !IT_REPLICATIONINFOLIST TYPE /AWS1/CL_KFKREPLICATIONINFO=>TT___LISTOFREPLICATIONINFO OPTIONAL
    !IV_REPLICATORNAME TYPE /AWS1/KFK__STRMIN1MAX128PAT000 OPTIONAL
    !IV_SERVICEEXECUTIONROLEARN TYPE /AWS1/KFK__STRING OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_KFK__MAPOF__STRING_W=>TT___MAPOF__STRING OPTIONAL
    !IO_LOGDELIVERY TYPE REF TO /AWS1/CL_KFKLOGDELIVERY OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_kfkcreaterpltorrsp
  RAISING
    /AWS1/CX_KFKBADREQUESTEX
    /AWS1/CX_KFKCONFLICTEXCEPTION
    /AWS1/CX_KFKFORBIDDENEXCEPTION
    /AWS1/CX_KFKINTERNALSERVERER00
    /AWS1/CX_KFKNOTFOUNDEXCEPTION
    /AWS1/CX_KFKSERVICEUNAVAILEX
    /AWS1/CX_KFKTOOMANYREQUESTSEX
    /AWS1/CX_KFKUNAUTHORIZEDEX
    /AWS1/CX_KFKCLIENTEXC
    /AWS1/CX_KFKSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_kafkaclusters TYPE /AWS1/CL_KFKKAFKACLUSTER=>TT___LISTOFKAFKACLUSTER TT___LISTOFKAFKACLUSTER

Kafka Clusters to use in setting up sources / targets for replication.

it_replicationinfolist TYPE /AWS1/CL_KFKREPLICATIONINFO=>TT___LISTOFREPLICATIONINFO TT___LISTOFREPLICATIONINFO

A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.

iv_replicatorname TYPE /AWS1/KFK__STRMIN1MAX128PAT000 /AWS1/KFK__STRMIN1MAX128PAT000

The name of the replicator. Alpha-numeric characters with '-' are allowed.

iv_serviceexecutionrolearn TYPE /AWS1/KFK__STRING /AWS1/KFK__STRING

The ARN of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)

Optional arguments:

iv_description TYPE /AWS1/KFK__STRINGMAX1024 /AWS1/KFK__STRINGMAX1024

A summary description of the replicator.

it_tags TYPE /AWS1/CL_KFK__MAPOF__STRING_W=>TT___MAPOF__STRING TT___MAPOF__STRING

List of tags to attach to created Replicator.

io_logdelivery TYPE REF TO /AWS1/CL_KFKLOGDELIVERY /AWS1/CL_KFKLOGDELIVERY

Configuration for delivering replicator logs to customer destinations.

RETURNING

oo_output TYPE REF TO /aws1/cl_kfkcreaterpltorrsp /AWS1/CL_KFKCREATERPLTORRSP

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->createreplicator(
  io_logdelivery = new /aws1/cl_kfklogdelivery(
    io_replicatorlogdelivery = new /aws1/cl_kfkreplctrlogdelivery(
      io_cloudwatchlogs = new /aws1/cl_kfkreplcloudwatchlogs(
        iv_enabled = ABAP_TRUE
        iv_loggroup = |string|
      )
      io_firehose = new /aws1/cl_kfkreplicatorfirehose(
        iv_deliverystream = |string|
        iv_enabled = ABAP_TRUE
      )
      io_s3 = new /aws1/cl_kfkreplicators3(
        iv_bucket = |string|
        iv_enabled = ABAP_TRUE
        iv_prefix = |string|
      )
    )
  )
  it_kafkaclusters = VALUE /aws1/cl_kfkkafkacluster=>tt___listofkafkacluster(
    (
      new /aws1/cl_kfkkafkacluster(
        io_amazonmskcluster = new /aws1/cl_kfkamazonmskcluster( |string| )
        io_apachekafkacluster = new /aws1/cl_kfkapachekafkacluster(
          iv_apachekafkaclusterid = |string|
          iv_bootstrapbrokerstring = |string|
        )
        io_clientauthentication = new /aws1/cl_kfkkafkaclstcliauthn(
          io_saslscram = new /aws1/cl_kfkkafkaclstsaslscr00(
            iv_mechanism = |string|
            iv_secretarn = |string|
          )
        )
        io_encryptionintransit = new /aws1/cl_kfkkafkaclstencintran(
          iv_encryptiontype = |string|
          iv_rootcacertificate = |string|
        )
        io_vpcconfig = new /aws1/cl_kfkkafkaclstclivpccfg(
          it_securitygroupids = VALUE /aws1/cl_kfk__listof__string_w=>tt___listof__string(
            ( new /aws1/cl_kfk__listof__string_w( |string| ) )
          )
          it_subnetids = VALUE /aws1/cl_kfk__listof__string_w=>tt___listof__string(
            ( new /aws1/cl_kfk__listof__string_w( |string| ) )
          )
        )
      )
    )
  )
  it_replicationinfolist = VALUE /aws1/cl_kfkreplicationinfo=>tt___listofreplicationinfo(
    (
      new /aws1/cl_kfkreplicationinfo(
        io_consumergroupreplication = new /aws1/cl_kfkconsumergrouprepl(
          it_consumergroupstoexclude = VALUE /aws1/cl_kfk__lstof__strmax200=>tt___listof__stringmax256(
            ( new /aws1/cl_kfk__lstof__strmax200( |string| ) )
          )
          it_consumergroupstoreplicate = VALUE /aws1/cl_kfk__lstof__strmax200=>tt___listof__stringmax256(
            ( new /aws1/cl_kfk__lstof__strmax200( |string| ) )
          )
          iv_consgroupoffsetsyncmode = |string|
          iv_detectandcopynewconsgrps = ABAP_TRUE
          iv_synchroniseconsgroupoffs = ABAP_TRUE
        )
        io_topicreplication = new /aws1/cl_kfktopicreplication(
          io_startingposition = new /aws1/cl_kfkreplstrtingposit00( |string| )
          io_topicnameconfiguration = new /aws1/cl_kfkrepltopicnameconf( |string| )
          it_topicstoexclude = VALUE /aws1/cl_kfk__lstof__strmax201=>tt___listof__stringmax249(
            ( new /aws1/cl_kfk__lstof__strmax201( |string| ) )
          )
          it_topicstoreplicate = VALUE /aws1/cl_kfk__lstof__strmax201=>tt___listof__stringmax249(
            ( new /aws1/cl_kfk__lstof__strmax201( |string| ) )
          )
          iv_copyaccctllistsfortopics = ABAP_TRUE
          iv_copytopicconfigurations = ABAP_TRUE
          iv_detectandcopynewtopics = ABAP_TRUE
        )
        iv_sourcekafkaclusterarn = |string|
        iv_sourcekafkaclusterid = |string|
        iv_targetcompressiontype = |string|
        iv_targetkafkaclusterarn = |string|
        iv_targetkafkaclusterid = |string|
      )
    )
  )
  it_tags = VALUE /aws1/cl_kfk__mapof__string_w=>tt___mapof__string(
    (
      VALUE /aws1/cl_kfk__mapof__string_w=>ts___mapof__string_maprow(
        key = |string|
        value = new /aws1/cl_kfk__mapof__string_w( |string| )
      )
    )
  )
  iv_description = |string|
  iv_replicatorname = |string|
  iv_serviceexecutionrolearn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv___string = lo_result->get_replicatorarn( ).
  lv___string = lo_result->get_replicatorname( ).
  lv_replicatorstate = lo_result->get_replicatorstate( ).
ENDIF.