Skip to content

/AWS1/IF_MPC=>DESCRIBEASSESSMENT()

About DescribeAssessment

Returns the metadata and detailed results of a single assessment, including the framework that was evaluated, the overall assessment result, and a paginated list of individual control evaluation results.

To list available assessments before describing one, use the ListAssessments action.

Method Signature

METHODS /AWS1/IF_MPC~DESCRIBEASSESSMENT
  IMPORTING
    !IV_CATALOG TYPE /AWS1/MPCCATALOG OPTIONAL
    !IV_ASSESSMENTIDENTIFIER TYPE /AWS1/MPCASSESSMENTIDENTIFIER OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/MPCDESCRASSMNTMAXRSLTINT OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/MPCNEXTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpcdescrassmntrsp
  RAISING
    /AWS1/CX_MPCACCESSDENIEDEX
    /AWS1/CX_MPCINTERNALSERVICEEX
    /AWS1/CX_MPCRESOURCENOTFOUNDEX
    /AWS1/CX_MPCTHROTTLINGEX
    /AWS1/CX_MPCVALIDATIONEX
    /AWS1/CX_MPCCLIENTEXC
    /AWS1/CX_MPCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/MPCCATALOG /AWS1/MPCCATALOG

The catalog related to the request. Fixed value: AWSMarketplace

iv_assessmentidentifier TYPE /AWS1/MPCASSESSMENTIDENTIFIER /AWS1/MPCASSESSMENTIDENTIFIER

The unique identifier of the assessment to describe. You can provide either the assessment ID (for example, assessment-12345) or the full assessment ARN (for example, arn:aws:aws-marketplace:us-east-1::AWSMarketplace/Assessment/assessment-12345).

Optional arguments:

iv_maxresults TYPE /AWS1/MPCDESCRASSMNTMAXRSLTINT /AWS1/MPCDESCRASSMNTMAXRSLTINT

Specifies the upper limit of ControlAssessment elements returned on a single page. If a value isn't provided, the default value is 50. Valid values range from 1 to 100.

iv_nexttoken TYPE /AWS1/MPCNEXTTOKEN /AWS1/MPCNEXTTOKEN

The value of the next token, if it exists. null if there are no more results.

RETURNING

oo_output TYPE REF TO /aws1/cl_mpcdescrassmntrsp /AWS1/CL_MPCDESCRASSMNTRSP

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->describeassessment(
  iv_assessmentidentifier = |string|
  iv_catalog = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_assessmentarn( ).
  lv_resourceid = lo_result->get_assessmentid( ).
  lv_versionedframeworkid = lo_result->get_frameworkid( ).
  lo_assessmenttargetsummary = lo_result->get_assessmenttargetsummary( ).
  IF lo_assessmenttargetsummary IS NOT INITIAL.
    lv_resourceid = lo_assessmenttargetsummary->get_entityid( ).
    lv_resourceid = lo_assessmenttargetsummary->get_changesetid( ).
  ENDIF.
  lo_frameworksummary = lo_result->get_frameworksummary( ).
  IF lo_frameworksummary IS NOT INITIAL.
    lo_amisecuritysummary = lo_frameworksummary->get_amisecuritysummary( ).
    IF lo_amisecuritysummary IS NOT INITIAL.
      lv_resourceid = lo_amisecuritysummary->get_deliveryoptionid( ).
    ENDIF.
    lo_containersecuritysummar = lo_frameworksummary->get_containersecuritysummary( ).
    IF lo_containersecuritysummar IS NOT INITIAL.
      lv_resourceid = lo_containersecuritysummar->get_deliveryoptionid( ).
    ENDIF.
  ENDIF.
  lv_assessmentresult = lo_result->get_assessmentresult( ).
  lv_datetimeiso8601 = lo_result->get_createdat( ).
  lv_datetimeiso8601 = lo_result->get_expiresat( ).
  LOOP AT lo_result->get_controlassessments( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_resourceid = lo_row_1->get_controlid( ).
      lv_controlassessmentresult = lo_row_1->get_controlassessmentresult( ).
      LOOP AT lo_row_1->get_errors( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_errorcode = lo_row_3->get_code( ).
          lv_errormessage = lo_row_3->get_message( ).
          LOOP AT lo_row_3->get_scope( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              lv_scopename = lo_row_5->get_name( ).
              lv_scopevalue = lo_row_5->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.