Lists the existing activities.
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
Parameters:
-
max_results
(Optional[PageSize], default:
None
)
–
The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.
This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
-
next_token
(Optional[PageToken], default:
None
)
–
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
Raises:
Source code in docs_src/capo_sfn/_services/async_sfn.py
| async def list_activities(
self,
*,
config_overrides: Optional[AsyncSFNClientConfig] = None,
max_results: Optional["capo_sfn.types.page_size.PageSize"] = None,
next_token: Optional["capo_sfn.types.page_token.PageToken"] = None,
) -> "capo_sfn.types.list_activities_output.ListActivitiesOutput":
"""<p>Lists the existing activities.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note>
Args:
max_results: <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
next_token: <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
Raises:
capo_sfn.errors.invalid_token.InvalidToken: <p>The provided token is not valid.</p>
capo_sfn.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sfn.types.list_activities_input.ListActivitiesInput]",
) -> AsyncOperationResponse[
"capo_sfn.types.list_activities_output.ListActivitiesOutput"
]:
import capo_sfn._operations.aws_step_functions.list_activities
(
output,
http_response,
) = await capo_sfn._operations.aws_step_functions.list_activities.async_list_activities(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListActivities")
)
input_: capo_sfn.types.list_activities_input.ListActivitiesInput = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|