R/swf_service.R

Defines functions service swf

Documented in swf

# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config merge_config
NULL

#' Amazon Simple Workflow Service
#'
#' @description
#' 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 *\href{https://docs.aws.amazon.com/amazonswf/latest/developerguide/}{Amazon SWF Developer Guide}* .
#'
#' @param
#' config
#' Optional configuration of credentials, endpoint, and/or region.
#' \itemize{
#' \item{\strong{credentials}:} {\itemize{
#' \item{\strong{creds}:} {\itemize{
#' \item{\strong{access_key_id}:} {AWS access key ID}
#' \item{\strong{secret_access_key}:} {AWS secret access key}
#' \item{\strong{session_token}:} {AWS temporary session token}
#' }}
#' \item{\strong{profile}:} {The name of a profile to use. If not given, then the default profile is used.}
#' \item{\strong{anonymous}:} {Set anonymous credentials.}
#' \item{\strong{endpoint}:} {The complete URL to use for the constructed client.}
#' \item{\strong{region}:} {The AWS Region used in instantiating the client.}
#' }}
#' \item{\strong{close_connection}:} {Immediately close all HTTP connections.}
#' \item{\strong{timeout}:} {The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.}
#' \item{\strong{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`.}
#' \item{\strong{sts_regional_endpoint}:} {Set sts regional endpoint resolver to regional or legacy \url{https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html}}
#' }
#' @param
#' credentials
#' Optional credentials shorthand for the config parameter
#' \itemize{
#' \item{\strong{creds}:} {\itemize{
#' \item{\strong{access_key_id}:} {AWS access key ID}
#' \item{\strong{secret_access_key}:} {AWS secret access key}
#' \item{\strong{session_token}:} {AWS temporary session token}
#' }}
#' \item{\strong{profile}:} {The name of a profile to use. If not given, then the default profile is used.}
#' \item{\strong{anonymous}:} {Set anonymous credentials.}
#' }
#' @param
#' endpoint
#' Optional shorthand for complete URL to use for the constructed client.
#' @param
#' region
#' Optional shorthand for AWS Region used in instantiating the client.
#'
#' @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"
#' )
#' ```
#'
#' @examples
#' \dontrun{
#' svc <- swf()
#' svc$count_closed_workflow_executions(
#'   Foo = 123
#' )
#' }
#'
#' @section Operations:
#' \tabular{ll}{
#'  \link[=swf_count_closed_workflow_executions]{count_closed_workflow_executions} \tab Returns the number of closed workflow executions within the given domain that meet the specified filtering criteria\cr
#'  \link[=swf_count_open_workflow_executions]{count_open_workflow_executions} \tab Returns the number of open workflow executions within the given domain that meet the specified filtering criteria\cr
#'  \link[=swf_count_pending_activity_tasks]{count_pending_activity_tasks} \tab Returns the estimated number of activity tasks in the specified task list\cr
#'  \link[=swf_count_pending_decision_tasks]{count_pending_decision_tasks} \tab Returns the estimated number of decision tasks in the specified task list\cr
#'  \link[=swf_deprecate_activity_type]{deprecate_activity_type} \tab Deprecates the specified activity type\cr
#'  \link[=swf_deprecate_domain]{deprecate_domain} \tab Deprecates the specified domain\cr
#'  \link[=swf_deprecate_workflow_type]{deprecate_workflow_type} \tab Deprecates the specified workflow type\cr
#'  \link[=swf_describe_activity_type]{describe_activity_type} \tab Returns information about the specified activity type\cr
#'  \link[=swf_describe_domain]{describe_domain} \tab Returns information about the specified domain, including description and status\cr
#'  \link[=swf_describe_workflow_execution]{describe_workflow_execution} \tab Returns information about the specified workflow execution including its type and some statistics\cr
#'  \link[=swf_describe_workflow_type]{describe_workflow_type} \tab Returns information about the specified workflow type\cr
#'  \link[=swf_get_workflow_execution_history]{get_workflow_execution_history} \tab Returns the history of the specified workflow execution\cr
#'  \link[=swf_list_activity_types]{list_activity_types} \tab Returns information about all activities registered in the specified domain that match the specified name and registration status\cr
#'  \link[=swf_list_closed_workflow_executions]{list_closed_workflow_executions} \tab Returns a list of closed workflow executions in the specified domain that meet the filtering criteria\cr
#'  \link[=swf_list_domains]{list_domains} \tab Returns the list of domains registered in the account\cr
#'  \link[=swf_list_open_workflow_executions]{list_open_workflow_executions} \tab Returns a list of open workflow executions in the specified domain that meet the filtering criteria\cr
#'  \link[=swf_list_tags_for_resource]{list_tags_for_resource} \tab List tags for a given domain\cr
#'  \link[=swf_list_workflow_types]{list_workflow_types} \tab Returns information about workflow types in the specified domain\cr
#'  \link[=swf_poll_for_activity_task]{poll_for_activity_task} \tab Used by workers to get an ActivityTask from the specified activity taskList\cr
#'  \link[=swf_poll_for_decision_task]{poll_for_decision_task} \tab Used by deciders to get a DecisionTask from the specified decision taskList\cr
#'  \link[=swf_record_activity_task_heartbeat]{record_activity_task_heartbeat} \tab Used by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progress\cr
#'  \link[=swf_register_activity_type]{register_activity_type} \tab Registers a new activity type along with its configuration settings in the specified domain\cr
#'  \link[=swf_register_domain]{register_domain} \tab Registers a new domain\cr
#'  \link[=swf_register_workflow_type]{register_workflow_type} \tab Registers a new workflow type and its configuration settings in the specified domain\cr
#'  \link[=swf_request_cancel_workflow_execution]{request_cancel_workflow_execution} \tab Records a WorkflowExecutionCancelRequested event in the currently running workflow execution identified by the given domain, workflowId, and runId\cr
#'  \link[=swf_respond_activity_task_canceled]{respond_activity_task_canceled} \tab Used by workers to tell the service that the ActivityTask identified by the taskToken was successfully canceled\cr
#'  \link[=swf_respond_activity_task_completed]{respond_activity_task_completed} \tab Used by workers to tell the service that the ActivityTask identified by the taskToken completed successfully with a result (if provided)\cr
#'  \link[=swf_respond_activity_task_failed]{respond_activity_task_failed} \tab Used by workers to tell the service that the ActivityTask identified by the taskToken has failed with reason (if specified)\cr
#'  \link[=swf_respond_decision_task_completed]{respond_decision_task_completed} \tab Used by deciders to tell the service that the DecisionTask identified by the taskToken has successfully completed\cr
#'  \link[=swf_signal_workflow_execution]{signal_workflow_execution} \tab Records 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\cr
#'  \link[=swf_start_workflow_execution]{start_workflow_execution} \tab Starts an execution of the workflow type in the specified domain using the provided workflowId and input data\cr
#'  \link[=swf_tag_resource]{tag_resource} \tab Add a tag to a Amazon SWF domain\cr
#'  \link[=swf_terminate_workflow_execution]{terminate_workflow_execution} \tab Records a WorkflowExecutionTerminated event and forces closure of the workflow execution identified by the given domain, runId, and workflowId\cr
#'  \link[=swf_undeprecate_activity_type]{undeprecate_activity_type} \tab Undeprecates a previously deprecated activity type\cr
#'  \link[=swf_undeprecate_domain]{undeprecate_domain} \tab Undeprecates a previously deprecated domain\cr
#'  \link[=swf_undeprecate_workflow_type]{undeprecate_workflow_type} \tab Undeprecates a previously deprecated workflow type\cr
#'  \link[=swf_untag_resource]{untag_resource} \tab Remove a tag from a Amazon SWF domain
#' }
#'
#' @return
#' 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.
#'
#' @rdname swf
#' @export
swf <- function(config = list(), credentials = list(), endpoint = NULL, region = NULL) {
  config <- merge_config(
    config,
    list(
      credentials = credentials,
      endpoint = endpoint,
      region = region
    )
  )
  svc <- .swf$operations
  svc <- set_config(svc, config)
  return(svc)
}

# Private API objects: metadata, handlers, interfaces, etc.
.swf <- list()

.swf$operations <- list()

.swf$metadata <- list(
  service_name = "swf",
  endpoints = list("*" = list(endpoint = "swf.{region}.amazonaws.com", global = FALSE), "cn-*" = list(endpoint = "swf.{region}.amazonaws.com.cn", global = FALSE), "us-iso-*" = list(endpoint = "swf.{region}.c2s.ic.gov", global = FALSE), "us-isob-*" = list(endpoint = "swf.{region}.sc2s.sgov.gov", global = FALSE)),
  service_id = "SWF",
  api_version = "2012-01-25",
  signing_name = "swf",
  json_version = "1.0",
  target_prefix = "SimpleWorkflowService"
)

.swf$service <- function(config = list()) {
  handlers <- new_handlers("jsonrpc", "v4")
  new_service(.swf$metadata, handlers, config)
}

Try the paws.application.integration package in your browser

Any scripts or data that you put into this service are public.

paws.application.integration documentation built on Sept. 12, 2023, 1:18 a.m.