/AWS1/IF_SFN=>UPDATESTATEMACHINE()¶
About UpdateStateMachine¶
Updates an existing state machine by modifying its definition,
roleArn, loggingConfiguration, or EncryptionConfiguration. Running executions will continue
to use the previous definition and roleArn. You must include at
least one of definition or roleArn or you will receive a
MissingRequiredParameter error.
A qualified state machine ARN refers to a Distributed Map state defined within a state machine. For example, the qualified state machine ARN arn:partition:states:region:account-id:stateMachine:stateMachineName/mapStateLabel refers to a Distributed Map state with a label mapStateLabel in the state machine named stateMachineName.
A qualified state machine ARN can either refer to a Distributed Map state defined within a state machine, a version ARN, or an alias ARN.
The following are some examples of qualified and unqualified state machine ARNs:
-
The following qualified state machine ARN refers to a Distributed Map state with a label
mapStateLabelin a state machine namedmyStateMachine.arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabelIf you provide a qualified state machine ARN that refers to a Distributed Map state, the request fails with
ValidationException. -
The following qualified state machine ARN refers to an alias named
PROD.arn::states: : :stateMachine: If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.
-
The following unqualified state machine ARN refers to a state machine named
myStateMachine.arn::states: : :stateMachine:
After you update your state machine, you can set the publish parameter to
true in the same action to publish a new version. This
way, you can opt-in to strict versioning of your state machine.
Step Functions assigns monotonically increasing integers for state machine versions, starting at version number 1.
All StartExecution calls within a few seconds use the updated
definition and roleArn. Executions started immediately after you
call UpdateStateMachine may use the previous state machine
definition and roleArn.
Method Signature¶
METHODS /AWS1/IF_SFN~UPDATESTATEMACHINE
IMPORTING
!IV_STATEMACHINEARN TYPE /AWS1/SFNARN OPTIONAL
!IV_DEFINITION TYPE /AWS1/SFNDEFINITION OPTIONAL
!IV_ROLEARN TYPE /AWS1/SFNARN OPTIONAL
!IO_LOGGINGCONFIGURATION TYPE REF TO /AWS1/CL_SFNLOGGINGCONF OPTIONAL
!IO_TRACINGCONFIGURATION TYPE REF TO /AWS1/CL_SFNTRACINGCONF OPTIONAL
!IV_PUBLISH TYPE /AWS1/SFNPUBLISH OPTIONAL
!IV_VERSIONDESCRIPTION TYPE /AWS1/SFNVERSIONDESCRIPTION OPTIONAL
!IO_ENCRYPTIONCONFIGURATION TYPE REF TO /AWS1/CL_SFNENCRYPTIONCONF OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sfnupdstatemachineout
RAISING
/AWS1/CX_SFNCONFLICTEXCEPTION
/AWS1/CX_SFNINVALIDARN
/AWS1/CX_SFNINVALIDDEFINITION
/AWS1/CX_SFNINVALIDENCCONF
/AWS1/CX_SFNINVALIDLOGGINGCONF
/AWS1/CX_SFNINVALIDTRACINGCONF
/AWS1/CX_SFNKMSACCESSDENIEDEX
/AWS1/CX_SFNKMSTHROTTLINGEX
/AWS1/CX_SFNMISSINGREQUIREDPRM
/AWS1/CX_SFNSERVICEQUOTAEXCDEX
/AWS1/CX_SFNSTATEMACHINEDELE00
/AWS1/CX_SFNSTATEMACHINEDOES00
/AWS1/CX_SFNVALIDATIONEX
/AWS1/CX_SFNCLIENTEXC
/AWS1/CX_SFNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_statemachinearn TYPE /AWS1/SFNARN /AWS1/SFNARN¶
The Amazon Resource Name (ARN) of the state machine.
Optional arguments:¶
iv_definition TYPE /AWS1/SFNDEFINITION /AWS1/SFNDEFINITION¶
The Amazon States Language definition of the state machine. See Amazon States Language.
iv_rolearn TYPE /AWS1/SFNARN /AWS1/SFNARN¶
The Amazon Resource Name (ARN) of the IAM role of the state machine.
io_loggingconfiguration TYPE REF TO /AWS1/CL_SFNLOGGINGCONF /AWS1/CL_SFNLOGGINGCONF¶
Use the
LoggingConfigurationdata type to set CloudWatch Logs options.
io_tracingconfiguration TYPE REF TO /AWS1/CL_SFNTRACINGCONF /AWS1/CL_SFNTRACINGCONF¶
Selects whether X-Ray tracing is enabled.
iv_publish TYPE /AWS1/SFNPUBLISH /AWS1/SFNPUBLISH¶
Specifies whether the state machine version is published. The default is
false. To publish a version after updating the state machine, setpublishtotrue.
iv_versiondescription TYPE /AWS1/SFNVERSIONDESCRIPTION /AWS1/SFNVERSIONDESCRIPTION¶
An optional description of the state machine version to publish.
You can only specify the
versionDescriptionparameter if you've setpublishtotrue.
io_encryptionconfiguration TYPE REF TO /AWS1/CL_SFNENCRYPTIONCONF /AWS1/CL_SFNENCRYPTIONCONF¶
Settings to configure server-side encryption.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sfnupdstatemachineout /AWS1/CL_SFNUPDSTATEMACHINEOUT¶
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->updatestatemachine(
io_encryptionconfiguration = new /aws1/cl_sfnencryptionconf(
iv_kmsdatakeyreuseperseconds = 123
iv_kmskeyid = |string|
iv_type = |string|
)
io_loggingconfiguration = new /aws1/cl_sfnloggingconf(
it_destinations = VALUE /aws1/cl_sfnlogdestination=>tt_logdestinationlist(
( new /aws1/cl_sfnlogdestination( new /aws1/cl_sfncloudwatchlogslo00( |string| ) ) )
)
iv_includeexecutiondata = ABAP_TRUE
iv_level = |string|
)
io_tracingconfiguration = new /aws1/cl_sfntracingconf( ABAP_TRUE )
iv_definition = |string|
iv_publish = ABAP_TRUE
iv_rolearn = |string|
iv_statemachinearn = |string|
iv_versiondescription = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_timestamp = lo_result->get_updatedate( ).
lv_revisionid = lo_result->get_revisionid( ).
lv_arn = lo_result->get_statemachineversionarn( ).
ENDIF.