/AWS1/IF_GUS=>CREATESCAN()¶
About CreateScan¶
Use to create a scan using code uploaded to an Amazon S3 bucket.
Method Signature¶
METHODS /AWS1/IF_GUS~CREATESCAN
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/GUSCLIENTTOKEN OPTIONAL
    !IO_RESOURCEID TYPE REF TO /AWS1/CL_GUSRESOURCEID OPTIONAL
    !IV_SCANNAME TYPE /AWS1/GUSSCANNAME OPTIONAL
    !IV_SCANTYPE TYPE /AWS1/GUSSCANTYPE OPTIONAL
    !IV_ANALYSISTYPE TYPE /AWS1/GUSANALYSISTYPE OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_GUSTAGMAP_W=>TT_TAGMAP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_guscreatescanresponse
  RAISING
    /AWS1/CX_GUSACCESSDENIEDEX
    /AWS1/CX_GUSCONFLICTEXCEPTION
    /AWS1/CX_GUSINTERNALSERVEREX
    /AWS1/CX_GUSRESOURCENOTFOUNDEX
    /AWS1/CX_GUSTHROTTLINGEX
    /AWS1/CX_GUSVALIDATIONEX
    /AWS1/CX_GUSCLIENTEXC
    /AWS1/CX_GUSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_resourceid TYPE REF TO /AWS1/CL_GUSRESOURCEID /AWS1/CL_GUSRESOURCEID¶
The identifier for the resource object to be scanned.
iv_scanname TYPE /AWS1/GUSSCANNAME /AWS1/GUSSCANNAME¶
The unique name that CodeGuru Security uses to track revisions across multiple scans of the same resource. Only allowed for a
STANDARDscan type.
Optional arguments:¶
iv_clienttoken TYPE /AWS1/GUSCLIENTTOKEN /AWS1/GUSCLIENTTOKEN¶
The idempotency token for the request. Amazon CodeGuru Security uses this value to prevent the accidental creation of duplicate scans if there are failures and retries.
iv_scantype TYPE /AWS1/GUSSCANTYPE /AWS1/GUSSCANTYPE¶
The type of scan, either
StandardorExpress. Defaults toStandardtype if missing.
Expressscans run on limited resources and use a limited set of detectors to analyze your code in near-real time.Standardscans have standard resource limits and use the full set of detectors to analyze your code.
iv_analysistype TYPE /AWS1/GUSANALYSISTYPE /AWS1/GUSANALYSISTYPE¶
The type of analysis you want CodeGuru Security to perform in the scan, either
SecurityorAll. TheSecuritytype only generates findings related to security. TheAlltype generates both security findings and quality findings. Defaults toSecuritytype if missing.
it_tags TYPE /AWS1/CL_GUSTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
An array of key-value pairs used to tag a scan. A tag is a custom attribute label with two parts:
A tag key. For example,
CostCenter,Environment, orSecret. Tag keys are case sensitive.
An optional tag value field. For example,
111122223333,Production, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_guscreatescanresponse /AWS1/CL_GUSCREATESCANRESPONSE¶
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->createscan(
  io_resourceid = new /aws1/cl_gusresourceid( |string| )
  it_tags = VALUE /aws1/cl_gustagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_gustagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_gustagmap_w( |string| )
      )
    )
  )
  iv_analysistype = |string|
  iv_clienttoken = |string|
  iv_scanname = |string|
  iv_scantype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_scanname = lo_result->get_scanname( ).
  lv_uuid = lo_result->get_runid( ).
  lo_resourceid = lo_result->get_resourceid( ).
  IF lo_resourceid IS NOT INITIAL.
    lv_uuid = lo_resourceid->get_codeartifactid( ).
  ENDIF.
  lv_scanstate = lo_result->get_scanstate( ).
  lv_scannamearn = lo_result->get_scannamearn( ).
ENDIF.