StepFunctionsClient.start_execution
rboto-sfn==0.4.0 · Service index · Types
Model summary (excerpt): Starts a state machine execution. 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 mapStateLabel in a state machine named myStateMachine...
Install and imports
Signature
async def start_execution(
*,
state_machine_arn: str,
name: str | None = None,
input: str | None = None,
trace_header: str | None = None,
) -> StartExecutionOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
state_machine_arn |
Yes | The Amazon Resource Name (ARN) of the state machine to execute. The stateMachineArn parameter accepts one of the following inputs: An unqualified state machine ARN – Refers to a state machine ARN that isn't qualified with a version or alias ARN. The following is an example of an unqualified state machine ARN. arn: :states: : :stateMachine: Step Functions doesn't associate state machine... |
name |
No | Optional name of the execution. For STANDARD workflows, this name must be unique for your Amazon Web Services account, region, and state machine. If a previous execution with the same name exists, you can reuse the name 90 days after it closes. For EXPRESS workflows, execution names can be reused immediately. For more information, see Limits Related to State Machine Executions in the Step... |
input |
No | The string that contains the JSON input data for the execution, for example: "{\"first_name\" : \"Alejandro\"}" If you don't include any JSON input data, you still must include the two braces, for example: "{}" Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding. |
trace_header |
No | Passes the X-Ray trace header. The trace header can also be passed in the request payload. For X-Ray traces, all Amazon Web Services services use the X-Amzn-Trace-Id header from the HTTP request. Using the header is the preferred mechanism to identify a trace. StartExecution and StartSyncExecution API operations can also use traceHeader from the body of the request payload. If both sources are... |
Output
StartExecutionOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
execution_arn |
str |
Always present | — |
start_date |
str |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_sfn.exceptions:
ExecutionAlreadyExistsError, ExecutionLimitExceededError, InvalidArnError, InvalidExecutionInputError, InvalidNameError, KmsAccessDeniedError, KmsInvalidStateError, KmsThrottlingError, StateMachineDeletingError, StateMachineDoesNotExistError, ValidationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.
Example
Complete, type-checked service example. Replace its placeholders and configure credentials before running it.
import asyncio
from rboto import StepFunctionsClient
async def main() -> None:
client = StepFunctionsClient(region="us-east-1")
response = await client.start_execution(
state_machine_arn="arn:aws:states:us-east-1:123456789012:stateMachine:example",
input='{"order_id":"123"}',
)
print(response.execution_arn)
if __name__ == "__main__":
asyncio.run(main())