/AWS1/IF_IMG=>CREATEWORKFLOW()¶
About CreateWorkflow¶
Create a new workflow or a new version of an existing workflow.
Method Signature¶
METHODS /AWS1/IF_IMG~CREATEWORKFLOW
IMPORTING
!IV_NAME TYPE /AWS1/IMGRESOURCENAME OPTIONAL
!IV_SEMANTICVERSION TYPE /AWS1/IMGVERSIONNUMBER OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IV_CHANGEDESCRIPTION TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IV_DATA TYPE /AWS1/IMGINLINEWORKFLOWDATA OPTIONAL
!IV_URI TYPE /AWS1/IMGURI OPTIONAL
!IV_KMSKEYID TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IMGTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/IMGCLIENTTOKEN OPTIONAL
!IV_TYPE TYPE /AWS1/IMGWORKFLOWTYPE OPTIONAL
!IV_DRYRUN TYPE /AWS1/IMGBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_imgcreateworkflowrsp
RAISING
/AWS1/CX_IMGCALLRLIMEXCEEDEDEX
/AWS1/CX_IMGCLIENTEXCEPTION
/AWS1/CX_IMGDRYRUNOPERATIONEX
/AWS1/CX_IMGFORBIDDENEXCEPTION
/AWS1/CX_IMGIDEMPOTENTPRMMIS00
/AWS1/CX_IMGINVPRMCOMBINATIO00
/AWS1/CX_IMGINVALIDREQUESTEX
/AWS1/CX_IMGINVALIDVRSNUMBEREX
/AWS1/CX_IMGRESOURCEINUSEEX
/AWS1/CX_IMGSERVICEEXCEPTION
/AWS1/CX_IMGSERVICEQUOTAEXCDEX
/AWS1/CX_IMGSERVICEUNAVAILEX
/AWS1/CX_IMGCLIENTEXC
/AWS1/CX_IMGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/IMGRESOURCENAME /AWS1/IMGRESOURCENAME¶
The name of the workflow to create.
iv_semanticversion TYPE /AWS1/IMGVERSIONNUMBER /AWS1/IMGVERSIONNUMBER¶
The semantic version of this workflow resource. The semantic version syntax adheres to the following rules.
The semantic version has four nodes:
. . / . You can assign values for the first three, and can filter on all of them. Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
iv_clienttoken TYPE /AWS1/IMGCLIENTTOKEN /AWS1/IMGCLIENTTOKEN¶
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
iv_type TYPE /AWS1/IMGWORKFLOWTYPE /AWS1/IMGWORKFLOWTYPE¶
The phase in the image build process for which the workflow resource is responsible.
Optional arguments:¶
iv_description TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
Describes the workflow.
iv_changedescription TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
Describes what change has been made in this version of the workflow, or what makes this version different from other versions of the workflow.
iv_data TYPE /AWS1/IMGINLINEWORKFLOWDATA /AWS1/IMGINLINEWORKFLOWDATA¶
Contains the UTF-8 encoded YAML document content for the workflow. Alternatively, you can specify the
uriof a YAML document file stored in Amazon S3. However, you cannot specify both properties.
iv_uri TYPE /AWS1/IMGURI /AWS1/IMGURI¶
The
uriof a YAML component document file. This must be an S3 URL (s3://bucket/key), and the requester must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota.Alternatively, you can specify the YAML document inline, using the component
dataproperty. You cannot specify both properties.
iv_kmskeyid TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this workflow resource. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.
it_tags TYPE /AWS1/CL_IMGTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
Tags that apply to the workflow resource.
iv_dryrun TYPE /AWS1/IMGBOOLEAN /AWS1/IMGBOOLEAN¶
Validates the required permissions for the operation and the request parameters, without actually making the request, and provides an error response. Upon a successful request, the error response is
DryRunOperationException.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_imgcreateworkflowrsp /AWS1/CL_IMGCREATEWORKFLOWRSP¶
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->createworkflow(
it_tags = VALUE /aws1/cl_imgtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_imgtagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_imgtagmap_w( |string| )
key = |string|
)
)
)
iv_changedescription = |string|
iv_clienttoken = |string|
iv_data = |string|
iv_description = |string|
iv_dryrun = ABAP_TRUE
iv_kmskeyid = |string|
iv_name = |string|
iv_semanticversion = |string|
iv_type = |string|
iv_uri = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_clienttoken = lo_result->get_clienttoken( ).
lv_workflowbuildversionarn = lo_result->get_workflowbuildversionarn( ).
lo_latestversionreferences = lo_result->get_latestversionreferences( ).
IF lo_latestversionreferences IS NOT INITIAL.
lv_imagebuilderarn = lo_latestversionreferences->get_latestversionarn( ).
lv_imagebuilderarn = lo_latestversionreferences->get_latestmajorversionarn( ).
lv_imagebuilderarn = lo_latestversionreferences->get_latestminorversionarn( ).
lv_imagebuilderarn = lo_latestversionreferences->get_latestpatchversionarn( ).
ENDIF.
ENDIF.