Skip to content

/AWS1/IF_AAN=>CREATESERVICELINKEDANALYZER()

About CreateServiceLinkedAnalyzer

Creates a service-linked analyzer managed by an Amazon Web Services service. This operation can only be invoked by authorized Amazon Web Services services. Direct customer invocation returns AccessDeniedException.

Service-linked analyzers enable Amazon Web Services services to create and manage analyzers on behalf of customers. The lifecycle of these analyzers is managed by the calling service.

Method Signature

METHODS /AWS1/IF_AAN~CREATESERVICELINKEDANALYZER
  IMPORTING
    !IV_TYPE TYPE /AWS1/AANTYPE OPTIONAL
    !IT_ARCHIVERULES TYPE /AWS1/CL_AANINLINEARCHIVERULE=>TT_INLINEARCHIVERULESLIST OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/AANSTRING OPTIONAL
    !IO_CONFIGURATION TYPE REF TO /AWS1/CL_AANANALYZERCONF OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_aancresvclnkanlyzrrsp
  RAISING
    /AWS1/CX_AANACCESSDENIEDEX
    /AWS1/CX_AANCONFLICTEXCEPTION
    /AWS1/CX_AANINTERNALSERVEREX
    /AWS1/CX_AANSERVICEQUOTAEXCDEX
    /AWS1/CX_AANTHROTTLINGEX
    /AWS1/CX_AANVALIDATIONEX
    /AWS1/CX_AANCLIENTEXC
    /AWS1/CX_AANSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_type TYPE /AWS1/AANTYPE /AWS1/AANTYPE

The type of analyzer to create. Valid values are ACCOUNT_UNUSED_ACCESS and ORGANIZATION_UNUSED_ACCESS.

Optional arguments:

it_archiverules TYPE /AWS1/CL_AANINLINEARCHIVERULE=>TT_INLINEARCHIVERULESLIST TT_INLINEARCHIVERULESLIST

Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.

iv_clienttoken TYPE /AWS1/AANSTRING /AWS1/AANSTRING

A client token.

io_configuration TYPE REF TO /AWS1/CL_AANANALYZERCONF /AWS1/CL_AANANALYZERCONF

Specifies the configuration of the analyzer. The specified scope of unused access is used for the configuration.

RETURNING

oo_output TYPE REF TO /aws1/cl_aancresvclnkanlyzrrsp /AWS1/CL_AANCRESVCLNKANLYZRRSP

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->createservicelinkedanalyzer(
  io_configuration = new /aws1/cl_aananalyzerconf(
    io_internalaccess = new /aws1/cl_aaninternalaccessconf(
      io_analysisrule = new /aws1/cl_aaninternalaccalyrule(
        it_inclusions = VALUE /aws1/cl_aaninternalaccalyrl00=>tt_internalaccalyrulecritlist(
          (
            new /aws1/cl_aaninternalaccalyrl00(
              it_accountids = VALUE /aws1/cl_aanaccountidslist_w=>tt_accountidslist(
                ( new /aws1/cl_aanaccountidslist_w( |string| ) )
              )
              it_resourcearns = VALUE /aws1/cl_aanresourcearnslist_w=>tt_resourcearnslist(
                ( new /aws1/cl_aanresourcearnslist_w( |string| ) )
              )
              it_resourcetypes = VALUE /aws1/cl_aanresourcetypelist_w=>tt_resourcetypelist(
                ( new /aws1/cl_aanresourcetypelist_w( |string| ) )
              )
            )
          )
        )
      )
    )
    io_unusedaccess = new /aws1/cl_aanunusedaccessconf(
      io_analysisrule = new /aws1/cl_aananalysisrule(
        it_exclusions = VALUE /aws1/cl_aanalyrulecriteria=>tt_analysisrulecriterialist(
          (
            new /aws1/cl_aanalyrulecriteria(
              it_accountids = VALUE /aws1/cl_aanaccountidslist_w=>tt_accountidslist(
                ( new /aws1/cl_aanaccountidslist_w( |string| ) )
              )
              it_resourcetags = VALUE /aws1/cl_aantagsmap_w=>tt_tagslist(
                (
                  VALUE /aws1/cl_aantagsmap_w=>tt_tagsmap(
                    (
                      VALUE /aws1/cl_aantagsmap_w=>ts_tagsmap_maprow(
                        key = |string|
                        value = new /aws1/cl_aantagsmap_w( |string| )
                      )
                    )
                  )
                )
              )
            )
          )
        )
      )
      iv_unusedaccessage = 123
    )
  )
  it_archiverules = VALUE /aws1/cl_aaninlinearchiverule=>tt_inlinearchiveruleslist(
    (
      new /aws1/cl_aaninlinearchiverule(
        it_filter = VALUE /aws1/cl_aancriterion=>tt_filtercriteriamap(
          (
            VALUE /aws1/cl_aancriterion=>ts_filtercriteriamap_maprow(
              key = |string|
              value = new /aws1/cl_aancriterion(
                it_contains = VALUE /aws1/cl_aanvaluelist_w=>tt_valuelist(
                  ( new /aws1/cl_aanvaluelist_w( |string| ) )
                )
                it_eq = VALUE /aws1/cl_aanvaluelist_w=>tt_valuelist(
                  ( new /aws1/cl_aanvaluelist_w( |string| ) )
                )
                it_neq = VALUE /aws1/cl_aanvaluelist_w=>tt_valuelist(
                  ( new /aws1/cl_aanvaluelist_w( |string| ) )
                )
                iv_exists = ABAP_TRUE
              )
            )
          )
        )
        iv_rulename = |string|
      )
    )
  )
  iv_clienttoken = |string|
  iv_type = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_analyzerarn = lo_result->get_arn( ).
ENDIF.