software.amazon.awssdk.services.sfn.SFNClient Maven / Gradle / Ivy
Show all versions of stepfunctions Show documentation
/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.sfn;
import java.util.function.Consumer;
import javax.annotation.Generated;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.exception.SdkServiceException;
import software.amazon.awssdk.core.regions.ServiceMetadata;
import software.amazon.awssdk.services.sfn.model.ActivityDoesNotExistException;
import software.amazon.awssdk.services.sfn.model.ActivityLimitExceededException;
import software.amazon.awssdk.services.sfn.model.ActivityWorkerLimitExceededException;
import software.amazon.awssdk.services.sfn.model.CreateActivityRequest;
import software.amazon.awssdk.services.sfn.model.CreateActivityResponse;
import software.amazon.awssdk.services.sfn.model.CreateStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.CreateStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.DeleteActivityRequest;
import software.amazon.awssdk.services.sfn.model.DeleteActivityResponse;
import software.amazon.awssdk.services.sfn.model.DeleteStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.DeleteStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.DescribeActivityRequest;
import software.amazon.awssdk.services.sfn.model.DescribeActivityResponse;
import software.amazon.awssdk.services.sfn.model.DescribeExecutionRequest;
import software.amazon.awssdk.services.sfn.model.DescribeExecutionResponse;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionRequest;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineForExecutionResponse;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.DescribeStateMachineResponse;
import software.amazon.awssdk.services.sfn.model.ExecutionAlreadyExistsException;
import software.amazon.awssdk.services.sfn.model.ExecutionDoesNotExistException;
import software.amazon.awssdk.services.sfn.model.ExecutionLimitExceededException;
import software.amazon.awssdk.services.sfn.model.GetActivityTaskRequest;
import software.amazon.awssdk.services.sfn.model.GetActivityTaskResponse;
import software.amazon.awssdk.services.sfn.model.GetExecutionHistoryRequest;
import software.amazon.awssdk.services.sfn.model.GetExecutionHistoryResponse;
import software.amazon.awssdk.services.sfn.model.InvalidArnException;
import software.amazon.awssdk.services.sfn.model.InvalidDefinitionException;
import software.amazon.awssdk.services.sfn.model.InvalidExecutionInputException;
import software.amazon.awssdk.services.sfn.model.InvalidNameException;
import software.amazon.awssdk.services.sfn.model.InvalidOutputException;
import software.amazon.awssdk.services.sfn.model.InvalidTokenException;
import software.amazon.awssdk.services.sfn.model.ListActivitiesRequest;
import software.amazon.awssdk.services.sfn.model.ListActivitiesResponse;
import software.amazon.awssdk.services.sfn.model.ListExecutionsRequest;
import software.amazon.awssdk.services.sfn.model.ListExecutionsResponse;
import software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest;
import software.amazon.awssdk.services.sfn.model.ListStateMachinesResponse;
import software.amazon.awssdk.services.sfn.model.MissingRequiredParameterException;
import software.amazon.awssdk.services.sfn.model.SFNException;
import software.amazon.awssdk.services.sfn.model.SendTaskFailureRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskFailureResponse;
import software.amazon.awssdk.services.sfn.model.SendTaskHeartbeatRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskHeartbeatResponse;
import software.amazon.awssdk.services.sfn.model.SendTaskSuccessRequest;
import software.amazon.awssdk.services.sfn.model.SendTaskSuccessResponse;
import software.amazon.awssdk.services.sfn.model.StartExecutionRequest;
import software.amazon.awssdk.services.sfn.model.StartExecutionResponse;
import software.amazon.awssdk.services.sfn.model.StateMachineAlreadyExistsException;
import software.amazon.awssdk.services.sfn.model.StateMachineDeletingException;
import software.amazon.awssdk.services.sfn.model.StateMachineDoesNotExistException;
import software.amazon.awssdk.services.sfn.model.StateMachineLimitExceededException;
import software.amazon.awssdk.services.sfn.model.StopExecutionRequest;
import software.amazon.awssdk.services.sfn.model.StopExecutionResponse;
import software.amazon.awssdk.services.sfn.model.TaskDoesNotExistException;
import software.amazon.awssdk.services.sfn.model.TaskTimedOutException;
import software.amazon.awssdk.services.sfn.model.UpdateStateMachineRequest;
import software.amazon.awssdk.services.sfn.model.UpdateStateMachineResponse;
import software.amazon.awssdk.services.sfn.paginators.GetExecutionHistoryPaginator;
import software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator;
import software.amazon.awssdk.services.sfn.paginators.ListExecutionsPaginator;
import software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator;
import software.amazon.awssdk.utils.SdkAutoCloseable;
/**
* Service client for accessing AWS SFN. This can be created using the static {@link #builder()} method.
*
* AWS Step Functions
*
* AWS Step Functions is a service that lets you coordinate the components of distributed applications and microservices
* using visual workflows.
*
*
* You can use Step Functions to build applications from individual components, each of which performs a discrete
* function, or task, allowing you to scale and change applications quickly. Step Functions provides a console
* that helps visualize the components of your application as a series of steps. Step Functions automatically triggers
* and tracks each step, and retries steps when there are errors, so your application executes predictably and in the
* right order every time. Step Functions logs the state of each step, so you can quickly diagnose and debug any issues.
*
*
* Step Functions manages operations and underlying infrastructure to ensure your application is available at any scale.
* You can run tasks on AWS, your own servers, or any system that has access to AWS. You can access and use Step
* Functions using the console, the AWS SDKs, or an HTTP API. For more information about Step Functions, see the AWS Step Functions Developer Guide .
*
*/
@Generated("software.amazon.awssdk:codegen")
public interface SFNClient extends SdkAutoCloseable {
String SERVICE_NAME = "states";
/**
* Create a {@link SFNClient} with the region loaded from the
* {@link software.amazon.awssdk.core.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from
* the {@link software.amazon.awssdk.core.auth.DefaultCredentialsProvider}.
*/
static SFNClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link SFNClient}.
*/
static SFNClientBuilder builder() {
return new DefaultSFNClientBuilder();
}
/**
*
* Creates an activity. An activity is a task which you write in any programming language and host on any machine
* which has access to AWS Step Functions. Activities must poll Step Functions using the
* GetActivityTask
API action and respond using SendTask*
API actions. This function lets
* Step Functions know the existence of your activity and returns an identifier for use in a state machine and when
* polling from the activity.
*
*
* @param createActivityRequest
* @return Result of the CreateActivity operation returned by the service.
* @throws ActivityLimitExceededException
* The maximum number of activities has been reached. Existing activities must be deleted before a new
* activity can be created.
* @throws InvalidNameException
* The provided name is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.CreateActivity
* @see AWS API
* Documentation
*/
default CreateActivityResponse createActivity(CreateActivityRequest createActivityRequest)
throws ActivityLimitExceededException, InvalidNameException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Creates an activity. An activity is a task which you write in any programming language and host on any machine
* which has access to AWS Step Functions. Activities must poll Step Functions using the
* GetActivityTask
API action and respond using SendTask*
API actions. This function lets
* Step Functions know the existence of your activity and returns an identifier for use in a state machine and when
* polling from the activity.
*
*
* @param createActivityRequest
* @return Result of the CreateActivity operation returned by the service.
* @throws ActivityLimitExceededException
* The maximum number of activities has been reached. Existing activities must be deleted before a new
* activity can be created.
* @throws InvalidNameException
* The provided name is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.CreateActivity
* @see AWS API
* Documentation
*/
default CreateActivityResponse createActivity(Consumer createActivityRequest)
throws ActivityLimitExceededException, InvalidNameException, SdkServiceException, SdkClientException, SFNException {
return createActivity(CreateActivityRequest.builder().apply(createActivityRequest).build());
}
/**
*
* Creates a state machine. A state machine consists of a collection of states that can do work (Task
* states), determine to which states to transition next (Choice
states), stop an execution with an
* error (Fail
states), and so on. State machines are specified using a JSON-based, structured
* language.
*
*
* @param createStateMachineRequest
* @return Result of the CreateStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidDefinitionException
* The provided Amazon States Language definition is invalid.
* @throws InvalidNameException
* The provided name is invalid.
* @throws StateMachineAlreadyExistsException
* A state machine with the same name but a different definition or role ARN already exists.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws StateMachineLimitExceededException
* The maximum number of state machines has been reached. Existing state machines must be deleted before a
* new state machine can be created.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.CreateStateMachine
* @see AWS API
* Documentation
*/
default CreateStateMachineResponse createStateMachine(CreateStateMachineRequest createStateMachineRequest)
throws InvalidArnException, InvalidDefinitionException, InvalidNameException, StateMachineAlreadyExistsException,
StateMachineDeletingException, StateMachineLimitExceededException, SdkServiceException, SdkClientException,
SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Creates a state machine. A state machine consists of a collection of states that can do work (Task
* states), determine to which states to transition next (Choice
states), stop an execution with an
* error (Fail
states), and so on. State machines are specified using a JSON-based, structured
* language.
*
*
* @param createStateMachineRequest
* @return Result of the CreateStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidDefinitionException
* The provided Amazon States Language definition is invalid.
* @throws InvalidNameException
* The provided name is invalid.
* @throws StateMachineAlreadyExistsException
* A state machine with the same name but a different definition or role ARN already exists.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws StateMachineLimitExceededException
* The maximum number of state machines has been reached. Existing state machines must be deleted before a
* new state machine can be created.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.CreateStateMachine
* @see AWS API
* Documentation
*/
default CreateStateMachineResponse createStateMachine(Consumer createStateMachineRequest)
throws InvalidArnException, InvalidDefinitionException, InvalidNameException, StateMachineAlreadyExistsException,
StateMachineDeletingException, StateMachineLimitExceededException, SdkServiceException, SdkClientException,
SFNException {
return createStateMachine(CreateStateMachineRequest.builder().apply(createStateMachineRequest).build());
}
/**
*
* Deletes an activity.
*
*
* @param deleteActivityRequest
* @return Result of the DeleteActivity operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DeleteActivity
* @see AWS API
* Documentation
*/
default DeleteActivityResponse deleteActivity(DeleteActivityRequest deleteActivityRequest) throws InvalidArnException,
SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Deletes an activity.
*
*
* @param deleteActivityRequest
* @return Result of the DeleteActivity operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DeleteActivity
* @see AWS API
* Documentation
*/
default DeleteActivityResponse deleteActivity(Consumer deleteActivityRequest)
throws InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return deleteActivity(DeleteActivityRequest.builder().apply(deleteActivityRequest).build());
}
/**
*
* Deletes a state machine. This is an asynchronous operation: It sets the state machine's status to
* DELETING
and begins the deletion process. Each state machine execution is deleted the next time it
* makes a state transition.
*
*
*
* The state machine itself is deleted after all executions are completed or deleted.
*
*
*
* @param deleteStateMachineRequest
* @return Result of the DeleteStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DeleteStateMachine
* @see AWS API
* Documentation
*/
default DeleteStateMachineResponse deleteStateMachine(DeleteStateMachineRequest deleteStateMachineRequest)
throws InvalidArnException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Deletes a state machine. This is an asynchronous operation: It sets the state machine's status to
* DELETING
and begins the deletion process. Each state machine execution is deleted the next time it
* makes a state transition.
*
*
*
* The state machine itself is deleted after all executions are completed or deleted.
*
*
*
* @param deleteStateMachineRequest
* @return Result of the DeleteStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DeleteStateMachine
* @see AWS API
* Documentation
*/
default DeleteStateMachineResponse deleteStateMachine(Consumer deleteStateMachineRequest)
throws InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return deleteStateMachine(DeleteStateMachineRequest.builder().apply(deleteStateMachineRequest).build());
}
/**
*
* Describes an activity.
*
*
* @param describeActivityRequest
* @return Result of the DescribeActivity operation returned by the service.
* @throws ActivityDoesNotExistException
* The specified activity does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeActivity
* @see AWS API
* Documentation
*/
default DescribeActivityResponse describeActivity(DescribeActivityRequest describeActivityRequest)
throws ActivityDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Describes an activity.
*
*
* @param describeActivityRequest
* @return Result of the DescribeActivity operation returned by the service.
* @throws ActivityDoesNotExistException
* The specified activity does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeActivity
* @see AWS API
* Documentation
*/
default DescribeActivityResponse describeActivity(Consumer describeActivityRequest)
throws ActivityDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return describeActivity(DescribeActivityRequest.builder().apply(describeActivityRequest).build());
}
/**
*
* Describes an execution.
*
*
* @param describeExecutionRequest
* @return Result of the DescribeExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeExecution
* @see AWS API
* Documentation
*/
default DescribeExecutionResponse describeExecution(DescribeExecutionRequest describeExecutionRequest)
throws ExecutionDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Describes an execution.
*
*
* @param describeExecutionRequest
* @return Result of the DescribeExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeExecution
* @see AWS API
* Documentation
*/
default DescribeExecutionResponse describeExecution(Consumer describeExecutionRequest)
throws ExecutionDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return describeExecution(DescribeExecutionRequest.builder().apply(describeExecutionRequest).build());
}
/**
*
* Describes a state machine.
*
*
* @param describeStateMachineRequest
* @return Result of the DescribeStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeStateMachine
* @see AWS
* API Documentation
*/
default DescribeStateMachineResponse describeStateMachine(DescribeStateMachineRequest describeStateMachineRequest)
throws InvalidArnException, StateMachineDoesNotExistException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Describes a state machine.
*
*
* @param describeStateMachineRequest
* @return Result of the DescribeStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeStateMachine
* @see AWS
* API Documentation
*/
default DescribeStateMachineResponse describeStateMachine(
Consumer describeStateMachineRequest) throws InvalidArnException,
StateMachineDoesNotExistException, SdkServiceException, SdkClientException, SFNException {
return describeStateMachine(DescribeStateMachineRequest.builder().apply(describeStateMachineRequest).build());
}
/**
*
* Describes the state machine associated with a specific execution.
*
*
* @param describeStateMachineForExecutionRequest
* @return Result of the DescribeStateMachineForExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeStateMachineForExecution
* @see AWS API Documentation
*/
default DescribeStateMachineForExecutionResponse describeStateMachineForExecution(
DescribeStateMachineForExecutionRequest describeStateMachineForExecutionRequest)
throws ExecutionDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Describes the state machine associated with a specific execution.
*
*
* @param describeStateMachineForExecutionRequest
* @return Result of the DescribeStateMachineForExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.DescribeStateMachineForExecution
* @see AWS API Documentation
*/
default DescribeStateMachineForExecutionResponse describeStateMachineForExecution(
Consumer describeStateMachineForExecutionRequest)
throws ExecutionDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return describeStateMachineForExecution(DescribeStateMachineForExecutionRequest.builder()
.apply(describeStateMachineForExecutionRequest).build());
}
/**
*
* Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a
* running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds
* as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the
* service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the
* poll returns a taskToken
with a null string.
*
*
*
* Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum
* time the service may hold the poll request).
*
*
*
* @param getActivityTaskRequest
* @return Result of the GetActivityTask operation returned by the service.
* @throws ActivityDoesNotExistException
* The specified activity does not exist.
* @throws ActivityWorkerLimitExceededException
* The maximum number of workers concurrently polling for activity tasks has been reached.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.GetActivityTask
* @see AWS API
* Documentation
*/
default GetActivityTaskResponse getActivityTask(GetActivityTaskRequest getActivityTaskRequest)
throws ActivityDoesNotExistException, ActivityWorkerLimitExceededException, InvalidArnException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a
* running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds
* as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the
* service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the
* poll returns a taskToken
with a null string.
*
*
*
* Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum
* time the service may hold the poll request).
*
*
*
* @param getActivityTaskRequest
* @return Result of the GetActivityTask operation returned by the service.
* @throws ActivityDoesNotExistException
* The specified activity does not exist.
* @throws ActivityWorkerLimitExceededException
* The maximum number of workers concurrently polling for activity tasks has been reached.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.GetActivityTask
* @see AWS API
* Documentation
*/
default GetActivityTaskResponse getActivityTask(Consumer getActivityTaskRequest)
throws ActivityDoesNotExistException, ActivityWorkerLimitExceededException, InvalidArnException, SdkServiceException,
SdkClientException, SFNException {
return getActivityTask(GetActivityTaskRequest.builder().apply(getActivityTaskRequest).build());
}
/**
*
* Returns the history of the specified execution as a list of events. By default, the results are returned in
* ascending order of the timeStamp
of the events. Use the reverseOrder
parameter to get
* the latest events first.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param getExecutionHistoryRequest
* @return Result of the GetExecutionHistory operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.GetExecutionHistory
* @see AWS API
* Documentation
*/
default GetExecutionHistoryResponse getExecutionHistory(GetExecutionHistoryRequest getExecutionHistoryRequest)
throws ExecutionDoesNotExistException, InvalidArnException, InvalidTokenException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Returns the history of the specified execution as a list of events. By default, the results are returned in
* ascending order of the timeStamp
of the events. Use the reverseOrder
parameter to get
* the latest events first.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param getExecutionHistoryRequest
* @return Result of the GetExecutionHistory operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.GetExecutionHistory
* @see AWS API
* Documentation
*/
default GetExecutionHistoryResponse getExecutionHistory(
Consumer getExecutionHistoryRequest) throws ExecutionDoesNotExistException,
InvalidArnException, InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
return getExecutionHistory(GetExecutionHistoryRequest.builder().apply(getExecutionHistoryRequest).build());
}
/**
*
* Returns the history of the specified execution as a list of events. By default, the results are returned in
* ascending order of the timeStamp
of the events. Use the reverseOrder
parameter to get
* the latest events first.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of
* {@link #getExecutionHistory(software.amazon.awssdk.services.sfn.model.GetExecutionHistoryRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.GetExecutionHistoryPaginator responses = client.getExecutionHistoryIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.GetExecutionHistoryPaginator responses = client
* .getExecutionHistoryIterable(request);
* for (software.amazon.awssdk.services.sfn.model.GetExecutionHistoryResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.GetExecutionHistoryPaginator responses = client.getExecutionHistoryIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #getExecutionHistory(software.amazon.awssdk.services.sfn.model.GetExecutionHistoryRequest)} operation.
*
*
* @param getExecutionHistoryRequest
* @return Result of the GetExecutionHistory operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.GetExecutionHistory
* @see AWS API
* Documentation
*/
default GetExecutionHistoryPaginator getExecutionHistoryIterable(GetExecutionHistoryRequest getExecutionHistoryRequest)
throws ExecutionDoesNotExistException, InvalidArnException, InvalidTokenException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing activities.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @return Result of the ListActivities operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListActivities
* @see #listActivities(ListActivitiesRequest)
* @see AWS API
* Documentation
*/
default ListActivitiesResponse listActivities() throws InvalidTokenException, SdkServiceException, SdkClientException,
SFNException {
return listActivities(ListActivitiesRequest.builder().build());
}
/**
*
* Lists the existing activities.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listActivitiesRequest
* @return Result of the ListActivities operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListActivities
* @see AWS API
* Documentation
*/
default ListActivitiesResponse listActivities(ListActivitiesRequest listActivitiesRequest) throws InvalidTokenException,
SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing activities.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listActivitiesRequest
* @return Result of the ListActivities operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListActivities
* @see AWS API
* Documentation
*/
default ListActivitiesResponse listActivities(Consumer listActivitiesRequest)
throws InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
return listActivities(ListActivitiesRequest.builder().apply(listActivitiesRequest).build());
}
/**
*
* Lists the existing activities.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of {@link #listActivities(software.amazon.awssdk.services.sfn.model.ListActivitiesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* for (software.amazon.awssdk.services.sfn.model.ListActivitiesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listActivities(software.amazon.awssdk.services.sfn.model.ListActivitiesRequest)} operation.
*
*
* @return Result of the ListActivities operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListActivities
* @see #listActivitiesIterable(ListActivitiesRequest)
* @see AWS API
* Documentation
*/
default ListActivitiesPaginator listActivitiesIterable() throws InvalidTokenException, SdkServiceException,
SdkClientException, SFNException {
return listActivitiesIterable(ListActivitiesRequest.builder().build());
}
/**
*
* Lists the existing activities.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of {@link #listActivities(software.amazon.awssdk.services.sfn.model.ListActivitiesRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* for (software.amazon.awssdk.services.sfn.model.ListActivitiesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListActivitiesPaginator responses = client.listActivitiesIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listActivities(software.amazon.awssdk.services.sfn.model.ListActivitiesRequest)} operation.
*
*
* @param listActivitiesRequest
* @return Result of the ListActivities operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListActivities
* @see AWS API
* Documentation
*/
default ListActivitiesPaginator listActivitiesIterable(ListActivitiesRequest listActivitiesRequest)
throws InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the executions of a state machine that meet the filtering criteria.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listExecutionsRequest
* @return Result of the ListExecutions operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListExecutions
* @see AWS API
* Documentation
*/
default ListExecutionsResponse listExecutions(ListExecutionsRequest listExecutionsRequest) throws InvalidArnException,
InvalidTokenException, StateMachineDoesNotExistException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the executions of a state machine that meet the filtering criteria.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listExecutionsRequest
* @return Result of the ListExecutions operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListExecutions
* @see AWS API
* Documentation
*/
default ListExecutionsResponse listExecutions(Consumer listExecutionsRequest)
throws InvalidArnException, InvalidTokenException, StateMachineDoesNotExistException, SdkServiceException,
SdkClientException, SFNException {
return listExecutions(ListExecutionsRequest.builder().apply(listExecutionsRequest).build());
}
/**
*
* Lists the executions of a state machine that meet the filtering criteria.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of {@link #listExecutions(software.amazon.awssdk.services.sfn.model.ListExecutionsRequest)}
* operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListExecutionsPaginator responses = client.listExecutionsIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.ListExecutionsPaginator responses = client.listExecutionsIterable(request);
* for (software.amazon.awssdk.services.sfn.model.ListExecutionsResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListExecutionsPaginator responses = client.listExecutionsIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listExecutions(software.amazon.awssdk.services.sfn.model.ListExecutionsRequest)} operation.
*
*
* @param listExecutionsRequest
* @return Result of the ListExecutions operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListExecutions
* @see AWS API
* Documentation
*/
default ListExecutionsPaginator listExecutionsIterable(ListExecutionsRequest listExecutionsRequest)
throws InvalidArnException, InvalidTokenException, StateMachineDoesNotExistException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing state machines.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @return Result of the ListStateMachines operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListStateMachines
* @see #listStateMachines(ListStateMachinesRequest)
* @see AWS API
* Documentation
*/
default ListStateMachinesResponse listStateMachines() throws InvalidTokenException, SdkServiceException, SdkClientException,
SFNException {
return listStateMachines(ListStateMachinesRequest.builder().build());
}
/**
*
* Lists the existing state machines.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listStateMachinesRequest
* @return Result of the ListStateMachines operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListStateMachines
* @see AWS API
* Documentation
*/
default ListStateMachinesResponse listStateMachines(ListStateMachinesRequest listStateMachinesRequest)
throws InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Lists the existing state machines.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
* @param listStateMachinesRequest
* @return Result of the ListStateMachines operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListStateMachines
* @see AWS API
* Documentation
*/
default ListStateMachinesResponse listStateMachines(Consumer listStateMachinesRequest)
throws InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
return listStateMachines(ListStateMachinesRequest.builder().apply(listStateMachinesRequest).build());
}
/**
*
* Lists the existing state machines.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of
* {@link #listStateMachines(software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client.listStateMachinesIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client
* .listStateMachinesIterable(request);
* for (software.amazon.awssdk.services.sfn.model.ListStateMachinesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client.listStateMachinesIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listStateMachines(software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest)} operation.
*
*
* @return Result of the ListStateMachines operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListStateMachines
* @see #listStateMachinesIterable(ListStateMachinesRequest)
* @see AWS API
* Documentation
*/
default ListStateMachinesPaginator listStateMachinesIterable() throws InvalidTokenException, SdkServiceException,
SdkClientException, SFNException {
return listStateMachinesIterable(ListStateMachinesRequest.builder().build());
}
/**
*
* Lists the existing state machines.
*
*
* If a nextToken
is returned by a previous call, there are more results available. To retrieve the
* next page of results, make the call again using the returned token in nextToken
. Keep all other
* arguments unchanged.
*
*
*
* This is a variant of
* {@link #listStateMachines(software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest)} operation. The
* return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
* making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client.listStateMachinesIterable(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client
* .listStateMachinesIterable(request);
* for (software.amazon.awssdk.services.sfn.model.ListStateMachinesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.sfn.paginators.ListStateMachinesPaginator responses = client.listStateMachinesIterable(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listStateMachines(software.amazon.awssdk.services.sfn.model.ListStateMachinesRequest)} operation.
*
*
* @param listStateMachinesRequest
* @return Result of the ListStateMachines operation returned by the service.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.ListStateMachines
* @see AWS API
* Documentation
*/
default ListStateMachinesPaginator listStateMachinesIterable(ListStateMachinesRequest listStateMachinesRequest)
throws InvalidTokenException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report that the task identified by the taskToken
failed.
*
*
* @param sendTaskFailureRequest
* @return Result of the SendTaskFailure operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskFailure
* @see AWS API
* Documentation
*/
default SendTaskFailureResponse sendTaskFailure(SendTaskFailureRequest sendTaskFailureRequest)
throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report that the task identified by the taskToken
failed.
*
*
* @param sendTaskFailureRequest
* @return Result of the SendTaskFailure operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskFailure
* @see AWS API
* Documentation
*/
default SendTaskFailureResponse sendTaskFailure(Consumer sendTaskFailureRequest)
throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkServiceException,
SdkClientException, SFNException {
return sendTaskFailure(SendTaskFailureRequest.builder().apply(sendTaskFailureRequest).build());
}
/**
*
* Used by workers to report to the service that the task represented by the specified taskToken
is
* still making progress. This action resets the Heartbeat
clock. The Heartbeat
threshold
* is specified in the state machine's Amazon States Language definition. This action does not in itself create an
* event in the execution history. However, if the task times out, the execution history contains an
* ActivityTimedOut
event.
*
*
*
* The Timeout
of a task, defined in the state machine's Amazon States Language definition, is its
* maximum allowed duration, regardless of the number of SendTaskHeartbeat requests received.
*
*
*
* This operation is only useful for long-lived tasks to report the liveliness of the task.
*
*
*
* @param sendTaskHeartbeatRequest
* @return Result of the SendTaskHeartbeat operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskHeartbeat
* @see AWS API
* Documentation
*/
default SendTaskHeartbeatResponse sendTaskHeartbeat(SendTaskHeartbeatRequest sendTaskHeartbeatRequest)
throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkServiceException,
SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report to the service that the task represented by the specified taskToken
is
* still making progress. This action resets the Heartbeat
clock. The Heartbeat
threshold
* is specified in the state machine's Amazon States Language definition. This action does not in itself create an
* event in the execution history. However, if the task times out, the execution history contains an
* ActivityTimedOut
event.
*
*
*
* The Timeout
of a task, defined in the state machine's Amazon States Language definition, is its
* maximum allowed duration, regardless of the number of SendTaskHeartbeat requests received.
*
*
*
* This operation is only useful for long-lived tasks to report the liveliness of the task.
*
*
*
* @param sendTaskHeartbeatRequest
* @return Result of the SendTaskHeartbeat operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskHeartbeat
* @see AWS API
* Documentation
*/
default SendTaskHeartbeatResponse sendTaskHeartbeat(Consumer sendTaskHeartbeatRequest)
throws TaskDoesNotExistException, InvalidTokenException, TaskTimedOutException, SdkServiceException,
SdkClientException, SFNException {
return sendTaskHeartbeat(SendTaskHeartbeatRequest.builder().apply(sendTaskHeartbeatRequest).build());
}
/**
*
* Used by workers to report that the task identified by the taskToken
completed successfully.
*
*
* @param sendTaskSuccessRequest
* @return Result of the SendTaskSuccess operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidOutputException
* The provided JSON output data is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskSuccess
* @see AWS API
* Documentation
*/
default SendTaskSuccessResponse sendTaskSuccess(SendTaskSuccessRequest sendTaskSuccessRequest)
throws TaskDoesNotExistException, InvalidOutputException, InvalidTokenException, TaskTimedOutException,
SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Used by workers to report that the task identified by the taskToken
completed successfully.
*
*
* @param sendTaskSuccessRequest
* @return Result of the SendTaskSuccess operation returned by the service.
* @throws TaskDoesNotExistException
* @throws InvalidOutputException
* The provided JSON output data is invalid.
* @throws InvalidTokenException
* The provided token is invalid.
* @throws TaskTimedOutException
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.SendTaskSuccess
* @see AWS API
* Documentation
*/
default SendTaskSuccessResponse sendTaskSuccess(Consumer sendTaskSuccessRequest)
throws TaskDoesNotExistException, InvalidOutputException, InvalidTokenException, TaskTimedOutException,
SdkServiceException, SdkClientException, SFNException {
return sendTaskSuccess(SendTaskSuccessRequest.builder().apply(sendTaskSuccessRequest).build());
}
/**
*
* Starts a state machine execution.
*
*
* @param startExecutionRequest
* @return Result of the StartExecution operation returned by the service.
* @throws ExecutionLimitExceededException
* The maximum number of running executions has been reached. Running executions must end or be stopped
* before a new execution can be started.
* @throws ExecutionAlreadyExistsException
* The execution has the same name
as another execution (but a different input
* ).
*
* Executions with the same name
and input
are considered idempotent.
*
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidExecutionInputException
* The provided JSON input data is invalid.
* @throws InvalidNameException
* The provided name is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.StartExecution
* @see AWS API
* Documentation
*/
default StartExecutionResponse startExecution(StartExecutionRequest startExecutionRequest)
throws ExecutionLimitExceededException, ExecutionAlreadyExistsException, InvalidArnException,
InvalidExecutionInputException, InvalidNameException, StateMachineDoesNotExistException,
StateMachineDeletingException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Starts a state machine execution.
*
*
* @param startExecutionRequest
* @return Result of the StartExecution operation returned by the service.
* @throws ExecutionLimitExceededException
* The maximum number of running executions has been reached. Running executions must end or be stopped
* before a new execution can be started.
* @throws ExecutionAlreadyExistsException
* The execution has the same name
as another execution (but a different input
* ).
*
* Executions with the same name
and input
are considered idempotent.
*
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidExecutionInputException
* The provided JSON input data is invalid.
* @throws InvalidNameException
* The provided name is invalid.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.StartExecution
* @see AWS API
* Documentation
*/
default StartExecutionResponse startExecution(Consumer startExecutionRequest)
throws ExecutionLimitExceededException, ExecutionAlreadyExistsException, InvalidArnException,
InvalidExecutionInputException, InvalidNameException, StateMachineDoesNotExistException,
StateMachineDeletingException, SdkServiceException, SdkClientException, SFNException {
return startExecution(StartExecutionRequest.builder().apply(startExecutionRequest).build());
}
/**
*
* Stops an execution.
*
*
* @param stopExecutionRequest
* @return Result of the StopExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.StopExecution
* @see AWS API
* Documentation
*/
default StopExecutionResponse stopExecution(StopExecutionRequest stopExecutionRequest) throws ExecutionDoesNotExistException,
InvalidArnException, SdkServiceException, SdkClientException, SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Stops an execution.
*
*
* @param stopExecutionRequest
* @return Result of the StopExecution operation returned by the service.
* @throws ExecutionDoesNotExistException
* The specified execution does not exist.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.StopExecution
* @see AWS API
* Documentation
*/
default StopExecutionResponse stopExecution(Consumer stopExecutionRequest)
throws ExecutionDoesNotExistException, InvalidArnException, SdkServiceException, SdkClientException, SFNException {
return stopExecution(StopExecutionRequest.builder().apply(stopExecutionRequest).build());
}
/**
*
* Updates an existing state machine by modifying its definition
and/or roleArn
. Running
* executions will continue to use the previous definition
and roleArn
.
*
*
*
* All StartExecution
calls within a few seconds will use the updated definition
and
* roleArn
. Executions started immediately after calling UpdateStateMachine
may use the
* previous state machine definition
and roleArn
. You must include at least one of
* definition
or roleArn
or you will receive a MissingRequiredParameter
* error.
*
*
*
* @param updateStateMachineRequest
* @return Result of the UpdateStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidDefinitionException
* The provided Amazon States Language definition is invalid.
* @throws MissingRequiredParameterException
* Request is missing a required parameter. This error occurs if both definition
and
* roleArn
are not specified.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.UpdateStateMachine
* @see AWS API
* Documentation
*/
default UpdateStateMachineResponse updateStateMachine(UpdateStateMachineRequest updateStateMachineRequest)
throws InvalidArnException, InvalidDefinitionException, MissingRequiredParameterException,
StateMachineDeletingException, StateMachineDoesNotExistException, SdkServiceException, SdkClientException,
SFNException {
throw new UnsupportedOperationException();
}
/**
*
* Updates an existing state machine by modifying its definition
and/or roleArn
. Running
* executions will continue to use the previous definition
and roleArn
.
*
*
*
* All StartExecution
calls within a few seconds will use the updated definition
and
* roleArn
. Executions started immediately after calling UpdateStateMachine
may use the
* previous state machine definition
and roleArn
. You must include at least one of
* definition
or roleArn
or you will receive a MissingRequiredParameter
* error.
*
*
*
* @param updateStateMachineRequest
* @return Result of the UpdateStateMachine operation returned by the service.
* @throws InvalidArnException
* The provided Amazon Resource Name (ARN) is invalid.
* @throws InvalidDefinitionException
* The provided Amazon States Language definition is invalid.
* @throws MissingRequiredParameterException
* Request is missing a required parameter. This error occurs if both definition
and
* roleArn
are not specified.
* @throws StateMachineDeletingException
* The specified state machine is being deleted.
* @throws StateMachineDoesNotExistException
* The specified state machine does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SFNException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SFNClient.UpdateStateMachine
* @see AWS API
* Documentation
*/
default UpdateStateMachineResponse updateStateMachine(Consumer updateStateMachineRequest)
throws InvalidArnException, InvalidDefinitionException, MissingRequiredParameterException,
StateMachineDeletingException, StateMachineDoesNotExistException, SdkServiceException, SdkClientException,
SFNException {
return updateStateMachine(UpdateStateMachineRequest.builder().apply(updateStateMachineRequest).build());
}
static ServiceMetadata serviceMetadata() {
return ServiceMetadata.of("states");
}
}