Skip to content

/AWS1/CL_PIP=>CREATECUSTOMACTIONTYPE()

About CreateCustomActionType

Creates a new custom action that can be used in all pipelines associated with the Amazon Web Services account. Only used for custom actions.

Method Signature

IMPORTING

Required arguments:

iv_category TYPE /AWS1/PIPACTIONCATEGORY /AWS1/PIPACTIONCATEGORY

The category of the custom action, such as a build action or a test action.

iv_provider TYPE /AWS1/PIPACTIONPROVIDER /AWS1/PIPACTIONPROVIDER

The provider of the service used in the custom action, such as CodeDeploy.

iv_version TYPE /AWS1/PIPVERSION /AWS1/PIPVERSION

The version identifier of the custom action.

io_inputartifactdetails TYPE REF TO /AWS1/CL_PIPARTIFACTDETAILS /AWS1/CL_PIPARTIFACTDETAILS

The details of the input artifact for the action, such as its commit ID.

io_outputartifactdetails TYPE REF TO /AWS1/CL_PIPARTIFACTDETAILS /AWS1/CL_PIPARTIFACTDETAILS

The details of the output artifact of the action, such as its commit ID.

Optional arguments:

io_settings TYPE REF TO /AWS1/CL_PIPACTIONTYPESETTINGS /AWS1/CL_PIPACTIONTYPESETTINGS

URLs that provide users information about this custom action.

it_configurationproperties TYPE /AWS1/CL_PIPACTIONCONFPROPERTY=>TT_ACTIONCONFPROPERTYLIST TT_ACTIONCONFPROPERTYLIST

The configuration properties for the custom action.

You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.

it_tags TYPE /AWS1/CL_PIPTAG=>TT_TAGLIST TT_TAGLIST

The tags for the custom action.

RETURNING

oo_output TYPE REF TO /aws1/cl_pipcrecustacttypeout /AWS1/CL_PIPCRECUSTACTTYPEOUT

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~createcustomactiontype(
  io_inputartifactdetails = new /aws1/cl_pipartifactdetails(
    iv_maximumcount = 123
    iv_minimumcount = 123
  )
  io_outputartifactdetails = new /aws1/cl_pipartifactdetails(
    iv_maximumcount = 123
    iv_minimumcount = 123
  )
  io_settings = new /aws1/cl_pipactiontypesettings(
    iv_entityurltemplate = |string|
    iv_executionurltemplate = |string|
    iv_revisionurltemplate = |string|
    iv_thirdpartyconfurl = |string|
  )
  it_configurationproperties = VALUE /aws1/cl_pipactionconfproperty=>tt_actionconfpropertylist(
    (
      new /aws1/cl_pipactionconfproperty(
        iv_description = |string|
        iv_key = ABAP_TRUE
        iv_name = |string|
        iv_queryable = ABAP_TRUE
        iv_required = ABAP_TRUE
        iv_secret = ABAP_TRUE
        iv_type = |string|
      )
    )
  )
  it_tags = VALUE /aws1/cl_piptag=>tt_taglist(
    (
      new /aws1/cl_piptag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_category = |string|
  iv_provider = |string|
  iv_version = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_actiontype = lo_result->get_actiontype( ).
  IF lo_actiontype IS NOT INITIAL.
    lo_actiontypeid = lo_actiontype->get_id( ).
    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_actiontypesettings = lo_actiontype->get_settings( ).
    IF lo_actiontypesettings IS NOT INITIAL.
      lv_url = lo_actiontypesettings->get_thirdpartyconfurl( ).
      lv_urltemplate = lo_actiontypesettings->get_entityurltemplate( ).
      lv_urltemplate = lo_actiontypesettings->get_executionurltemplate( ).
      lv_urltemplate = lo_actiontypesettings->get_revisionurltemplate( ).
    ENDIF.
    LOOP AT lo_actiontype->get_actionconfproperties( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_actionconfigurationkey = lo_row_1->get_name( ).
        lv_boolean = lo_row_1->get_required( ).
        lv_boolean = lo_row_1->get_key( ).
        lv_boolean = lo_row_1->get_secret( ).
        lv_boolean = lo_row_1->get_queryable( ).
        lv_description = lo_row_1->get_description( ).
        lv_actionconfigurationprop = lo_row_1->get_type( ).
      ENDIF.
    ENDLOOP.
    lo_artifactdetails = lo_actiontype->get_inputartifactdetails( ).
    IF lo_artifactdetails IS NOT INITIAL.
      lv_minimumartifactcount = lo_artifactdetails->get_minimumcount( ).
      lv_maximumartifactcount = lo_artifactdetails->get_maximumcount( ).
    ENDIF.
    lo_artifactdetails = lo_actiontype->get_outputartifactdetails( ).
    IF lo_artifactdetails IS NOT INITIAL.
      lv_minimumartifactcount = lo_artifactdetails->get_minimumcount( ).
      lv_maximumartifactcount = lo_artifactdetails->get_maximumcount( ).
    ENDIF.
  ENDIF.
  LOOP AT lo_result->get_tags( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_tagkey = lo_row_3->get_key( ).
      lv_tagvalue = lo_row_3->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.