swf function

Amazon Simple Workflow Service

Amazon Simple Workflow Service

The Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications that use Amazon's cloud to coordinate work across distributed components. In Amazon SWF, a task represents a logical unit of work that is performed by a component of your workflow. Coordinating tasks in a workflow involves managing intertask dependencies, scheduling, and concurrency in accordance with the logical flow of the application.

Amazon SWF gives you full control over implementing tasks and coordinating them without worrying about underlying complexities such as tracking their progress and maintaining their state.

This documentation serves as reference only. For a broader overview of the Amazon SWF programming model, see the AmazonSWF Developer Guide .

swf(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Arguments

  • config: Optional configuration of credentials, endpoint, and/or region.

    • credentials :

      • creds :

        • access_key_id : AWS access key ID
        • secret_access_key : AWS secret access key
        • session_token : AWS temporary session token
      • profile : The name of a profile to use. If not given, then the default profile is used.

      • anonymous : Set anonymous credentials.

    • endpoint : The complete URL to use for the constructed client.

    • region : The AWS Region used in instantiating the client.

    • close_connection : Immediately close all HTTP connections.

    • timeout : The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

    • s3_force_path_style : Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

    • sts_regional_endpoint : Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

  • credentials: Optional credentials shorthand for the config parameter

    • creds :

      • access_key_id : AWS access key ID
      • secret_access_key : AWS secret access key
      • session_token : AWS temporary session token
    • profile : The name of a profile to use. If not given, then the default profile is used.

    • anonymous : Set anonymous credentials.

  • endpoint: Optional shorthand for complete URL to use for the constructed client.

  • region: Optional shorthand for AWS Region used in instantiating the client.

Returns

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- swf(
  config = list(
    credentials = list(
 creds = list(
   access_key_id = "string",
   secret_access_key = "string",
   session_token = "string"
 ),
 profile = "string",
 anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
 access_key_id = "string",
 secret_access_key = "string",
 session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

count_closed_workflow_executionsReturns the number of closed workflow executions within the given domain that meet the specified filtering criteria
count_open_workflow_executionsReturns the number of open workflow executions within the given domain that meet the specified filtering criteria
count_pending_activity_tasksReturns the estimated number of activity tasks in the specified task list
count_pending_decision_tasksReturns the estimated number of decision tasks in the specified task list
delete_activity_typeDeletes the specified activity type
delete_workflow_typeDeletes the specified workflow type
deprecate_activity_typeDeprecates the specified activity type
deprecate_domainDeprecates the specified domain
deprecate_workflow_typeDeprecates the specified workflow type
describe_activity_typeReturns information about the specified activity type
describe_domainReturns information about the specified domain, including description and status
describe_workflow_executionReturns information about the specified workflow execution including its type and some statistics
describe_workflow_typeReturns information about the specified workflow type
get_workflow_execution_historyReturns the history of the specified workflow execution
list_activity_typesReturns information about all activities registered in the specified domain that match the specified name and registration status
list_closed_workflow_executionsReturns a list of closed workflow executions in the specified domain that meet the filtering criteria
list_domainsReturns the list of domains registered in the account
list_open_workflow_executionsReturns a list of open workflow executions in the specified domain that meet the filtering criteria
list_tags_for_resourceList tags for a given domain
list_workflow_typesReturns information about workflow types in the specified domain
poll_for_activity_taskUsed by workers to get an ActivityTask from the specified activity taskList
poll_for_decision_taskUsed by deciders to get a DecisionTask from the specified decision taskList
record_activity_task_heartbeatUsed by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progress
register_activity_typeRegisters a new activity type along with its configuration settings in the specified domain
register_domainRegisters a new domain
register_workflow_typeRegisters a new workflow type and its configuration settings in the specified domain
request_cancel_workflow_executionRecords a WorkflowExecutionCancelRequested event in the currently running workflow execution identified by the given domain, workflowId, and runId
respond_activity_task_canceledUsed by workers to tell the service that the ActivityTask identified by the taskToken was successfully canceled
respond_activity_task_completedUsed by workers to tell the service that the ActivityTask identified by the taskToken completed successfully with a result (if provided)
respond_activity_task_failedUsed by workers to tell the service that the ActivityTask identified by the taskToken has failed with reason (if specified)
respond_decision_task_completedUsed by deciders to tell the service that the DecisionTask identified by the taskToken has successfully completed
signal_workflow_executionRecords a WorkflowExecutionSignaled event in the workflow execution history and creates a decision task for the workflow execution identified by the given domain, workflowId and runId
start_workflow_executionStarts an execution of the workflow type in the specified domain using the provided workflowId and input data
tag_resourceAdd a tag to a Amazon SWF domain
terminate_workflow_executionRecords a WorkflowExecutionTerminated event and forces closure of the workflow execution identified by the given domain, runId, and workflowId
undeprecate_activity_typeUndeprecates a previously deprecated activity type
undeprecate_domainUndeprecates a previously deprecated domain
undeprecate_workflow_typeUndeprecates a previously deprecated workflow type
untag_resourceRemove a tag from a Amazon SWF domain

Examples

## Not run: svc <- swf() svc$count_closed_workflow_executions( Foo = 123 ) ## End(Not run)
  • Maintainer: Dyfan Jones
  • License: Apache License (>= 2.0)
  • Last published: 2025-03-17