Skip to content

/AWS1/CL_PIP=>GETTHIRDPARTYJOBDETAILS()

About GetThirdPartyJobDetails

Requests the details of a job for a third party action. Used for partner actions only.

When this API is called, CodePipeline returns temporary credentials for the S3 bucket used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts. This API also returns any secret values defined for the action.

Method Signature

IMPORTING

Required arguments:

iv_jobid TYPE /AWS1/PIPTHIRDPARTYJOBID /AWS1/PIPTHIRDPARTYJOBID

The unique system-generated ID used for identifying the job.

iv_clienttoken TYPE /AWS1/PIPCLIENTTOKEN /AWS1/PIPCLIENTTOKEN

The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

RETURNING

oo_output TYPE REF TO /aws1/cl_pipgetthirdpartyjob01 /AWS1/CL_PIPGETTHIRDPARTYJOB01

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->/aws1/if_pip~getthirdpartyjobdetails(
  iv_clienttoken = |string|
  iv_jobid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_thirdpartyjobdetails = lo_result->get_jobdetails( ).
  IF lo_thirdpartyjobdetails IS NOT INITIAL.
    lv_thirdpartyjobid = lo_thirdpartyjobdetails->get_id( ).
    lo_thirdpartyjobdata = lo_thirdpartyjobdetails->get_data( ).
    IF lo_thirdpartyjobdata IS NOT INITIAL.
      lo_actiontypeid = lo_thirdpartyjobdata->get_actiontypeid( ).
      IF lo_actiontypeid IS NOT INITIAL.
        lv_actioncategory = lo_actiontypeid->get_category( ).
        lv_actionowner = lo_actiontypeid->get_owner( ).
        lv_actionprovider = lo_actiontypeid->get_provider( ).
        lv_version = lo_actiontypeid->get_version( ).
      ENDIF.
      lo_actionconfiguration = lo_thirdpartyjobdata->get_actionconfiguration( ).
      IF lo_actionconfiguration IS NOT INITIAL.
        LOOP AT lo_actionconfiguration->get_configuration( ) into ls_row.
          lv_key = ls_row-key.
          lo_value = ls_row-value.
          IF lo_value IS NOT INITIAL.
            lv_actionconfigurationvalu = lo_value->get_value( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_pipelinecontext = lo_thirdpartyjobdata->get_pipelinecontext( ).
      IF lo_pipelinecontext IS NOT INITIAL.
        lv_pipelinename = lo_pipelinecontext->get_pipelinename( ).
        lo_stagecontext = lo_pipelinecontext->get_stage( ).
        IF lo_stagecontext IS NOT INITIAL.
          lv_stagename = lo_stagecontext->get_name( ).
        ENDIF.
        lo_actioncontext = lo_pipelinecontext->get_action( ).
        IF lo_actioncontext IS NOT INITIAL.
          lv_actionname = lo_actioncontext->get_name( ).
          lv_actionexecutionid = lo_actioncontext->get_actionexecutionid( ).
        ENDIF.
        lv_pipelinearn = lo_pipelinecontext->get_pipelinearn( ).
        lv_pipelineexecutionid = lo_pipelinecontext->get_pipelineexecutionid( ).
      ENDIF.
      LOOP AT lo_thirdpartyjobdata->get_inputartifacts( ) into lo_row_1.
        lo_row_2 = lo_row_1.
        IF lo_row_2 IS NOT INITIAL.
          lv_artifactname = lo_row_2->get_name( ).
          lv_revision = lo_row_2->get_revision( ).
          lo_artifactlocation = lo_row_2->get_location( ).
          IF lo_artifactlocation IS NOT INITIAL.
            lv_artifactlocationtype = lo_artifactlocation->get_type( ).
            lo_s3artifactlocation = lo_artifactlocation->get_s3location( ).
            IF lo_s3artifactlocation IS NOT INITIAL.
              lv_s3bucketname = lo_s3artifactlocation->get_bucketname( ).
              lv_s3objectkey = lo_s3artifactlocation->get_objectkey( ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      LOOP AT lo_thirdpartyjobdata->get_outputartifacts( ) into lo_row_1.
        lo_row_2 = lo_row_1.
        IF lo_row_2 IS NOT INITIAL.
          lv_artifactname = lo_row_2->get_name( ).
          lv_revision = lo_row_2->get_revision( ).
          lo_artifactlocation = lo_row_2->get_location( ).
          IF lo_artifactlocation IS NOT INITIAL.
            lv_artifactlocationtype = lo_artifactlocation->get_type( ).
            lo_s3artifactlocation = lo_artifactlocation->get_s3location( ).
            IF lo_s3artifactlocation IS NOT INITIAL.
              lv_s3bucketname = lo_s3artifactlocation->get_bucketname( ).
              lv_s3objectkey = lo_s3artifactlocation->get_objectkey( ).
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      lo_awssessioncredentials = lo_thirdpartyjobdata->get_artifactcredentials( ).
      IF lo_awssessioncredentials IS NOT INITIAL.
        lv_accesskeyid = lo_awssessioncredentials->get_accesskeyid( ).
        lv_secretaccesskey = lo_awssessioncredentials->get_secretaccesskey( ).
        lv_sessiontoken = lo_awssessioncredentials->get_sessiontoken( ).
      ENDIF.
      lv_continuationtoken = lo_thirdpartyjobdata->get_continuationtoken( ).
      lo_encryptionkey = lo_thirdpartyjobdata->get_encryptionkey( ).
      IF lo_encryptionkey IS NOT INITIAL.
        lv_encryptionkeyid = lo_encryptionkey->get_id( ).
        lv_encryptionkeytype = lo_encryptionkey->get_type( ).
      ENDIF.
    ENDIF.
    lv_nonce = lo_thirdpartyjobdetails->get_nonce( ).
  ENDIF.
ENDIF.