Skip to content

SFNClient

Index > SFN > SFNClient

Auto-generated documentation for SFN type annotations stubs module types-aiobotocore-stepfunctions.

SFNClient

Type annotations and code completion for session.client("stepfunctions") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_stepfunctions.client import SFNClient

session = Session()
async with session.client("stepfunctions") as client:
    client: SFNClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("stepfunctions").exceptions structure.

Usage example
async with session.client("stepfunctions") as client:
    try:
        do_something(client)
    except (
            client.ActivityDoesNotExist,
        client.ActivityLimitExceeded,
        client.ActivityWorkerLimitExceeded,
        client.ClientError,
        client.ExecutionAlreadyExists,
        client.ExecutionDoesNotExist,
        client.ExecutionLimitExceeded,
        client.InvalidArn,
        client.InvalidDefinition,
        client.InvalidExecutionInput,
        client.InvalidLoggingConfiguration,
        client.InvalidName,
        client.InvalidOutput,
        client.InvalidToken,
        client.InvalidTracingConfiguration,
        client.MissingRequiredParameter,
        client.ResourceNotFound,
        client.StateMachineAlreadyExists,
        client.StateMachineDeleting,
        client.StateMachineDoesNotExist,
        client.StateMachineLimitExceeded,
        client.StateMachineTypeNotSupported,
        client.TaskDoesNotExist,
        client.TaskTimedOut,
        client.TooManyTags,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_stepfunctions.client import Exceptions

def handle_error(exc: Exceptions.ActivityDoesNotExist) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("stepfunctions").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("stepfunctions").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

create_activity

Creates an activity.

Type annotations and code completion for session.client("stepfunctions").create_activity method. boto3 documentation

Method definition
await def create_activity(
    self,
    *,
    name: str,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateActivityOutputTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateActivityOutputTypeDef
Usage example with kwargs
kwargs: CreateActivityInputRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_activity(**kwargs)
  1. See CreateActivityInputRequestTypeDef

create_state_machine

Creates a state machine.

Type annotations and code completion for session.client("stepfunctions").create_state_machine method. boto3 documentation

Method definition
await def create_state_machine(
    self,
    *,
    name: str,
    definition: str,
    roleArn: str,
    type: StateMachineTypeType = ...,  # (1)
    loggingConfiguration: LoggingConfigurationTypeDef = ...,  # (2)
    tags: Sequence[TagTypeDef] = ...,  # (3)
    tracingConfiguration: TracingConfigurationTypeDef = ...,  # (4)
) -> CreateStateMachineOutputTypeDef:  # (5)
    ...
  1. See StateMachineTypeType
  2. See LoggingConfigurationTypeDef
  3. See TagTypeDef
  4. See TracingConfigurationTypeDef
  5. See CreateStateMachineOutputTypeDef
Usage example with kwargs
kwargs: CreateStateMachineInputRequestTypeDef = {  # (1)
    "name": ...,
    "definition": ...,
    "roleArn": ...,
}

parent.create_state_machine(**kwargs)
  1. See CreateStateMachineInputRequestTypeDef

delete_activity

Deletes an activity.

Type annotations and code completion for session.client("stepfunctions").delete_activity method. boto3 documentation

Method definition
await def delete_activity(
    self,
    *,
    activityArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteActivityInputRequestTypeDef = {  # (1)
    "activityArn": ...,
}

parent.delete_activity(**kwargs)
  1. See DeleteActivityInputRequestTypeDef

delete_state_machine

Deletes a state machine.

Type annotations and code completion for session.client("stepfunctions").delete_state_machine method. boto3 documentation

Method definition
await def delete_state_machine(
    self,
    *,
    stateMachineArn: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteStateMachineInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.delete_state_machine(**kwargs)
  1. See DeleteStateMachineInputRequestTypeDef

describe_activity

Describes an activity.

Type annotations and code completion for session.client("stepfunctions").describe_activity method. boto3 documentation

Method definition
await def describe_activity(
    self,
    *,
    activityArn: str,
) -> DescribeActivityOutputTypeDef:  # (1)
    ...
  1. See DescribeActivityOutputTypeDef
Usage example with kwargs
kwargs: DescribeActivityInputRequestTypeDef = {  # (1)
    "activityArn": ...,
}

parent.describe_activity(**kwargs)
  1. See DescribeActivityInputRequestTypeDef

describe_execution

Describes an execution.

Type annotations and code completion for session.client("stepfunctions").describe_execution method. boto3 documentation

Method definition
await def describe_execution(
    self,
    *,
    executionArn: str,
) -> DescribeExecutionOutputTypeDef:  # (1)
    ...
  1. See DescribeExecutionOutputTypeDef
Usage example with kwargs
kwargs: DescribeExecutionInputRequestTypeDef = {  # (1)
    "executionArn": ...,
}

parent.describe_execution(**kwargs)
  1. See DescribeExecutionInputRequestTypeDef

describe_state_machine

Describes a state machine.

Type annotations and code completion for session.client("stepfunctions").describe_state_machine method. boto3 documentation

Method definition
await def describe_state_machine(
    self,
    *,
    stateMachineArn: str,
) -> DescribeStateMachineOutputTypeDef:  # (1)
    ...
  1. See DescribeStateMachineOutputTypeDef
Usage example with kwargs
kwargs: DescribeStateMachineInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.describe_state_machine(**kwargs)
  1. See DescribeStateMachineInputRequestTypeDef

describe_state_machine_for_execution

Describes the state machine associated with a specific execution.

Type annotations and code completion for session.client("stepfunctions").describe_state_machine_for_execution method. boto3 documentation

Method definition
await def describe_state_machine_for_execution(
    self,
    *,
    executionArn: str,
) -> DescribeStateMachineForExecutionOutputTypeDef:  # (1)
    ...
  1. See DescribeStateMachineForExecutionOutputTypeDef
Usage example with kwargs
kwargs: DescribeStateMachineForExecutionInputRequestTypeDef = {  # (1)
    "executionArn": ...,
}

parent.describe_state_machine_for_execution(**kwargs)
  1. See DescribeStateMachineForExecutionInputRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("stepfunctions").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_activity_task

Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine.

Type annotations and code completion for session.client("stepfunctions").get_activity_task method. boto3 documentation

Method definition
await def get_activity_task(
    self,
    *,
    activityArn: str,
    workerName: str = ...,
) -> GetActivityTaskOutputTypeDef:  # (1)
    ...
  1. See GetActivityTaskOutputTypeDef
Usage example with kwargs
kwargs: GetActivityTaskInputRequestTypeDef = {  # (1)
    "activityArn": ...,
}

parent.get_activity_task(**kwargs)
  1. See GetActivityTaskInputRequestTypeDef

get_execution_history

Returns the history of the specified execution as a list of events.

Type annotations and code completion for session.client("stepfunctions").get_execution_history method. boto3 documentation

Method definition
await def get_execution_history(
    self,
    *,
    executionArn: str,
    maxResults: int = ...,
    reverseOrder: bool = ...,
    nextToken: str = ...,
    includeExecutionData: bool = ...,
) -> GetExecutionHistoryOutputTypeDef:  # (1)
    ...
  1. See GetExecutionHistoryOutputTypeDef
Usage example with kwargs
kwargs: GetExecutionHistoryInputRequestTypeDef = {  # (1)
    "executionArn": ...,
}

parent.get_execution_history(**kwargs)
  1. See GetExecutionHistoryInputRequestTypeDef

list_activities

Lists the existing activities.

Type annotations and code completion for session.client("stepfunctions").list_activities method. boto3 documentation

Method definition
await def list_activities(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListActivitiesOutputTypeDef:  # (1)
    ...
  1. See ListActivitiesOutputTypeDef
Usage example with kwargs
kwargs: ListActivitiesInputRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_activities(**kwargs)
  1. See ListActivitiesInputRequestTypeDef

list_executions

Lists the executions of a state machine that meet the filtering criteria.

Type annotations and code completion for session.client("stepfunctions").list_executions method. boto3 documentation

Method definition
await def list_executions(
    self,
    *,
    stateMachineArn: str,
    statusFilter: ExecutionStatusType = ...,  # (1)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListExecutionsOutputTypeDef:  # (2)
    ...
  1. See ExecutionStatusType
  2. See ListExecutionsOutputTypeDef
Usage example with kwargs
kwargs: ListExecutionsInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.list_executions(**kwargs)
  1. See ListExecutionsInputRequestTypeDef

list_state_machines

Lists the existing state machines.

Type annotations and code completion for session.client("stepfunctions").list_state_machines method. boto3 documentation

Method definition
await def list_state_machines(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListStateMachinesOutputTypeDef:  # (1)
    ...
  1. See ListStateMachinesOutputTypeDef
Usage example with kwargs
kwargs: ListStateMachinesInputRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_state_machines(**kwargs)
  1. See ListStateMachinesInputRequestTypeDef

list_tags_for_resource

List tags for a given resource.

Type annotations and code completion for session.client("stepfunctions").list_tags_for_resource method. boto3 documentation

Method definition
await def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceOutputTypeDef:  # (1)
    ...
  1. See ListTagsForResourceOutputTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceInputRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceInputRequestTypeDef

send_task_failure

Used by activity workers and task states using the callback_ pattern to report that the task identified by the taskToken failed.

Type annotations and code completion for session.client("stepfunctions").send_task_failure method. boto3 documentation

Method definition
await def send_task_failure(
    self,
    *,
    taskToken: str,
    error: str = ...,
    cause: str = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: SendTaskFailureInputRequestTypeDef = {  # (1)
    "taskToken": ...,
}

parent.send_task_failure(**kwargs)
  1. See SendTaskFailureInputRequestTypeDef

send_task_heartbeat

Used by activity workers and task states using the callback_ pattern to report to Step Functions that the task represented by the specified taskToken is still making progress.

Type annotations and code completion for session.client("stepfunctions").send_task_heartbeat method. boto3 documentation

Method definition
await def send_task_heartbeat(
    self,
    *,
    taskToken: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: SendTaskHeartbeatInputRequestTypeDef = {  # (1)
    "taskToken": ...,
}

parent.send_task_heartbeat(**kwargs)
  1. See SendTaskHeartbeatInputRequestTypeDef

send_task_success

Used by activity workers and task states using the callback_ pattern to report that the task identified by the taskToken completed successfully.

Type annotations and code completion for session.client("stepfunctions").send_task_success method. boto3 documentation

Method definition
await def send_task_success(
    self,
    *,
    taskToken: str,
    output: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: SendTaskSuccessInputRequestTypeDef = {  # (1)
    "taskToken": ...,
    "output": ...,
}

parent.send_task_success(**kwargs)
  1. See SendTaskSuccessInputRequestTypeDef

start_execution

Starts a state machine execution.

Type annotations and code completion for session.client("stepfunctions").start_execution method. boto3 documentation

Method definition
await def start_execution(
    self,
    *,
    stateMachineArn: str,
    name: str = ...,
    input: str = ...,
    traceHeader: str = ...,
) -> StartExecutionOutputTypeDef:  # (1)
    ...
  1. See StartExecutionOutputTypeDef
Usage example with kwargs
kwargs: StartExecutionInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.start_execution(**kwargs)
  1. See StartExecutionInputRequestTypeDef

start_sync_execution

Starts a Synchronous Express state machine execution.

Type annotations and code completion for session.client("stepfunctions").start_sync_execution method. boto3 documentation

Method definition
await def start_sync_execution(
    self,
    *,
    stateMachineArn: str,
    name: str = ...,
    input: str = ...,
    traceHeader: str = ...,
) -> StartSyncExecutionOutputTypeDef:  # (1)
    ...
  1. See StartSyncExecutionOutputTypeDef
Usage example with kwargs
kwargs: StartSyncExecutionInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.start_sync_execution(**kwargs)
  1. See StartSyncExecutionInputRequestTypeDef

stop_execution

Stops an execution.

Type annotations and code completion for session.client("stepfunctions").stop_execution method. boto3 documentation

Method definition
await def stop_execution(
    self,
    *,
    executionArn: str,
    error: str = ...,
    cause: str = ...,
) -> StopExecutionOutputTypeDef:  # (1)
    ...
  1. See StopExecutionOutputTypeDef
Usage example with kwargs
kwargs: StopExecutionInputRequestTypeDef = {  # (1)
    "executionArn": ...,
}

parent.stop_execution(**kwargs)
  1. See StopExecutionInputRequestTypeDef

tag_resource

Add a tag to a Step Functions resource.

Type annotations and code completion for session.client("stepfunctions").tag_resource method. boto3 documentation

Method definition
await def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceInputRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceInputRequestTypeDef

untag_resource

Remove a tag from a Step Functions resource See also: AWS API Documentation.

Type annotations and code completion for session.client("stepfunctions").untag_resource method. boto3 documentation

Method definition
await def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceInputRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceInputRequestTypeDef

update_state_machine

Updates an existing state machine by modifying its definition , roleArn , or loggingConfiguration.

Type annotations and code completion for session.client("stepfunctions").update_state_machine method. boto3 documentation

Method definition
await def update_state_machine(
    self,
    *,
    stateMachineArn: str,
    definition: str = ...,
    roleArn: str = ...,
    loggingConfiguration: LoggingConfigurationTypeDef = ...,  # (1)
    tracingConfiguration: TracingConfigurationTypeDef = ...,  # (2)
) -> UpdateStateMachineOutputTypeDef:  # (3)
    ...
  1. See LoggingConfigurationTypeDef
  2. See TracingConfigurationTypeDef
  3. See UpdateStateMachineOutputTypeDef
Usage example with kwargs
kwargs: UpdateStateMachineInputRequestTypeDef = {  # (1)
    "stateMachineArn": ...,
}

parent.update_state_machine(**kwargs)
  1. See UpdateStateMachineInputRequestTypeDef

__aenter__

Type annotations and code completion for session.client("stepfunctions").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> SFNClient:
    ...

__aexit__

Type annotations and code completion for session.client("stepfunctions").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator

Type annotations and code completion for session.client("stepfunctions").get_paginator method with overloads.