/AWS1/CL_PIP=>POLLFORJOBS()
¶
About PollForJobs¶
Returns information about any jobs for CodePipeline to act on.
PollForJobs
is valid only for action types with "Custom" in the owner
field. If the action type contains AWS
or ThirdParty
in the
owner field, the PollForJobs
action returns an error.
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:¶
io_actiontypeid
TYPE REF TO /AWS1/CL_PIPACTIONTYPEID
/AWS1/CL_PIPACTIONTYPEID
¶
Represents information about an action type.
Optional arguments:¶
iv_maxbatchsize
TYPE /AWS1/PIPMAXBATCHSIZE
/AWS1/PIPMAXBATCHSIZE
¶
The maximum number of jobs to return in a poll for jobs call.
it_queryparam
TYPE /AWS1/CL_PIPQUERYPARAMMAP_W=>TT_QUERYPARAMMAP
TT_QUERYPARAMMAP
¶
A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_pippollforjobsoutput
/AWS1/CL_PIPPOLLFORJOBSOUTPUT
¶
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~pollforjobs(
io_actiontypeid = new /aws1/cl_pipactiontypeid(
iv_category = |string|
iv_owner = |string|
iv_provider = |string|
iv_version = |string|
)
it_queryparam = VALUE /aws1/cl_pipqueryparammap_w=>tt_queryparammap(
(
VALUE /aws1/cl_pipqueryparammap_w=>ts_queryparammap_maprow(
value = new /aws1/cl_pipqueryparammap_w( |string| )
key = |string|
)
)
)
iv_maxbatchsize = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_jobs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_jobid = lo_row_1->get_id( ).
lo_jobdata = lo_row_1->get_data( ).
IF lo_jobdata IS NOT INITIAL.
lo_actiontypeid = lo_jobdata->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_jobdata->get_actionconfiguration( ).
IF lo_actionconfiguration IS NOT INITIAL.
LOOP AT lo_actionconfiguration->get_configuration( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_actionconfigurationvalu = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_pipelinecontext = lo_jobdata->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_jobdata->get_inputartifacts( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_artifactname = lo_row_4->get_name( ).
lv_revision = lo_row_4->get_revision( ).
lo_artifactlocation = lo_row_4->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_jobdata->get_outputartifacts( ) into lo_row_3.
lo_row_4 = lo_row_3.
IF lo_row_4 IS NOT INITIAL.
lv_artifactname = lo_row_4->get_name( ).
lv_revision = lo_row_4->get_revision( ).
lo_artifactlocation = lo_row_4->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_jobdata->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_jobdata->get_continuationtoken( ).
lo_encryptionkey = lo_jobdata->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_row_1->get_nonce( ).
lv_accountid = lo_row_1->get_accountid( ).
ENDIF.
ENDLOOP.
ENDIF.