Lists aliases for a specified state machine ARN. Results are sorted by time, with the most recently created aliases listed first.
To list aliases that reference a state machine version, you can specify the version ARN in the stateMachineArn parameter.
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.
Related operations:
Parameters:
-
state_machine_arn
(Arn)
–
The Amazon Resource Name (ARN) of the state machine for which you want to list aliases.
If you specify a state machine version ARN, this API returns a list of aliases for that version.
-
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.
-
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.
Raises:
Source code in docs_src/capo_sfn/_services/sfn.py
| def list_state_machine_aliases(
self,
state_machine_arn: "capo_sfn.types.arn.Arn",
*,
config_overrides: Optional[SFNClientConfig] = None,
next_token: Optional["capo_sfn.types.page_token.PageToken"] = None,
max_results: Optional["capo_sfn.types.page_size.PageSize"] = None,
) -> (
"capo_sfn.types.list_state_machine_aliases_output.ListStateMachineAliasesOutput"
):
"""<p>Lists <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html">aliases</a> for a specified state machine ARN. Results are sorted by time, with the most recently created aliases listed first. </p> <p>To list aliases that reference a state machine <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-version.html">version</a>, you can specify the version ARN in the <code>stateMachineArn</code> parameter.</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> <p> <b>Related operations:</b> </p> <ul> <li> <p> <a>CreateStateMachineAlias</a> </p> </li> <li> <p> <a>DescribeStateMachineAlias</a> </p> </li> <li> <p> <a>UpdateStateMachineAlias</a> </p> </li> <li> <p> <a>DeleteStateMachineAlias</a> </p> </li> </ul>
Args:
state_machine_arn: <p>The Amazon Resource Name (ARN) of the state machine for which you want to list aliases.</p> <p>If you specify a state machine version ARN, this API returns a list of aliases for that version.</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>
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>
Raises:
capo_sfn.errors.invalid_arn.InvalidArn: <p>The provided Amazon Resource Name (ARN) is not valid.</p>
capo_sfn.errors.invalid_token.InvalidToken: <p>The provided token is not valid.</p>
capo_sfn.errors.resource_not_found.ResourceNotFound: <p>Could not find the referenced resource.</p>
capo_sfn.errors.state_machine_deleting.StateMachineDeleting: <p>The specified state machine is being deleted.</p>
capo_sfn.errors.state_machine_does_not_exist.StateMachineDoesNotExist: <p>The specified state machine does not exist.</p>
capo_sfn.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sfn.types.list_state_machine_aliases_input.ListStateMachineAliasesInput]",
) -> OperationResponse[
"capo_sfn.types.list_state_machine_aliases_output.ListStateMachineAliasesOutput"
]:
import capo_sfn._operations.aws_step_functions.list_state_machine_aliases
output, http_response = (
capo_sfn._operations.aws_step_functions.list_state_machine_aliases.list_state_machine_aliases(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListStateMachineAliases")
)
input_: capo_sfn.types.list_state_machine_aliases_input.ListStateMachineAliasesInput = {
"state_machine_arn": state_machine_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|