start_sync_execution
async
¶
start_sync_execution(
state_machine_arn: Arn,
*,
config_overrides: Optional[AsyncSFNClientConfig] = None,
name: Optional[Name] = None,
input: Optional[SensitiveData] = None,
trace_header: Optional[TraceHeader] = None,
included_data: Optional[IncludedData] = None,
) -> StartSyncExecutionOutput
Starts a Synchronous Express state machine execution. StartSyncExecution is not available for STANDARD workflows.
StartSyncExecution will return a 200 OK response, even if your execution fails, because the status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your execution from running, such as permissions errors, limit errors, or issues with your state machine code and configuration.
Parameters:
-
state_machine_arn(Arn) –The Amazon Resource Name (ARN) of the state machine to execute.
-
name(Optional[Name], default:None) –The name of the execution.
-
input(Optional[SensitiveData], default:None) –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(Optional[TraceHeader], default:None) –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-Idheader from the HTTP request. Using the header is the preferred mechanism to identify a trace.StartExecutionandStartSyncExecutionAPI operations can also usetraceHeaderfrom the body of the request payload. If both sources are provided, Step Functions will use the header value (preferred) over the value in the request body. -
included_data(Optional[IncludedData], default:None) –If your state machine definition is encrypted with a KMS key, callers must have
kms:Decryptpermission to decrypt the definition. Alternatively, you can call the API withincludedData = METADATA_ONLYto get a successful response without the encrypted definition.
Raises:
-
InvalidArn–The provided Amazon Resource Name (ARN) is not valid.
-
InvalidExecutionInput–The provided JSON input data is not valid.
-
InvalidName–The provided name is not valid.
-
KmsAccessDeniedException–Either your KMS key policy or API caller does not have the required permissions.
-
KmsInvalidStateException–The KMS key is not in valid state, for example: Disabled or Deleted.
-
KmsThrottlingException–Received when KMS returns
ThrottlingExceptionfor a KMS call that Step Functions makes on behalf of the caller. -
StateMachineDeleting–The specified state machine is being deleted.
-
StateMachineDoesNotExist–The specified state machine does not exist.
-
StateMachineTypeNotSupported–State machine type is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sfn/_services/async_sfn.py
2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 | |