send_task_success
async
¶
send_task_success(
task_token: TaskToken,
output: SensitiveData,
*,
config_overrides: Optional[AsyncSFNClientConfig] = None,
) -> SendTaskSuccessOutput
Used by activity workers, Task states using the callback pattern, and optionally Task states using the job run pattern to report that the task identified by the taskToken completed successfully.
Parameters:
-
task_token(TaskToken) –The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the context object when a workflow enters a task state. See GetActivityTaskOutput$taskToken.
-
output(SensitiveData) –The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.
Raises:
-
InvalidOutput–The provided JSON output data is not valid.
-
InvalidToken–The provided token 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. -
TaskDoesNotExist–The activity does not exist.
-
TaskTimedOut–The task token has either expired or the task associated with the token has already been closed.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sfn/_services/async_sfn.py
1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 | |