Struct aws_sdk_swf::client::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon Simple Workflow Service

Client for invoking operations on Amazon Simple Workflow Service. Each operation on Amazon Simple Workflow Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_swf::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_swf::config::Builder::from(&shared_config)
  .retry_config(RetryConfig::disabled())
  .build();
let client = aws_sdk_swf::Client::from_conf(config);

Implementations§

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the CountClosedWorkflowExecutions operation.

Constructs a fluent builder for the CountOpenWorkflowExecutions operation.

Constructs a fluent builder for the CountPendingActivityTasks operation.

Constructs a fluent builder for the CountPendingDecisionTasks operation.

Constructs a fluent builder for the DeprecateActivityType operation.

Constructs a fluent builder for the DeprecateDomain operation.

Constructs a fluent builder for the DeprecateWorkflowType operation.

Constructs a fluent builder for the DescribeActivityType operation.

Constructs a fluent builder for the DescribeDomain operation.

Constructs a fluent builder for the DescribeWorkflowExecution operation.

Constructs a fluent builder for the DescribeWorkflowType operation.

Constructs a fluent builder for the GetWorkflowExecutionHistory operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListActivityTypes operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListClosedWorkflowExecutions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDomains operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListOpenWorkflowExecutions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTagsForResource operation.

Constructs a fluent builder for the ListWorkflowTypes operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the PollForActivityTask operation.

Constructs a fluent builder for the PollForDecisionTask operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • domain(impl Into<String>) / set_domain(Option<String>):

      The name of the domain containing the task lists to poll.

    • task_list(TaskList) / set_task_list(Option<TaskList>):

      Specifies the task list to poll for decision tasks.

      The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.

    • identity(impl Into<String>) / set_identity(Option<String>):

      Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.

    • next_page_token(impl Into<String>) / set_next_page_token(Option<String>):

      If NextPageToken is returned there are more results available. The value of NextPageToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 60 seconds. Using an expired pagination token will return a 400 error: “Specified token has exceeded its maximum lifetime”.

      The configured maximumPageSize determines how many results can be returned in a single call.

      The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken doesn’t return a new decision task.

    • maximum_page_size(i32) / set_maximum_page_size(i32):

      The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.

      This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.

    • reverse_order(bool) / set_reverse_order(bool):

      When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.

  • On success, responds with PollForDecisionTaskOutput with field(s):
    • task_token(Option<String>):

      The opaque string used as a handle on the task. This token is used by workers to communicate progress and response information back to the system about the task.

    • started_event_id(i64):

      The ID of the DecisionTaskStarted event recorded in the history.

    • workflow_execution(Option<WorkflowExecution>):

      The workflow execution for which this decision task was created.

    • workflow_type(Option<WorkflowType>):

      The type of the workflow execution for which this decision task was created.

    • events(Option<Vec<HistoryEvent>>):

      A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.

    • next_page_token(Option<String>):

      If a NextPageToken was 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 nextPageToken. Keep all other arguments unchanged.

      The configured maximumPageSize determines how many results can be returned in a single call.

    • previous_started_event_id(i64):

      The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.

  • On failure, responds with SdkError<PollForDecisionTaskError>

Constructs a fluent builder for the RecordActivityTaskHeartbeat operation.

Constructs a fluent builder for the RegisterActivityType operation.

Constructs a fluent builder for the RegisterDomain operation.

Constructs a fluent builder for the RegisterWorkflowType operation.

  • The fluent builder is configurable:
    • domain(impl Into<String>) / set_domain(Option<String>):

      The name of the domain in which to register the workflow type.

    • name(impl Into<String>) / set_name(Option<String>):

      The name of the workflow type.

      The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.

    • version(impl Into<String>) / set_version(Option<String>):

      The version of the workflow type.

      The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.

      The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.

    • description(impl Into<String>) / set_description(Option<String>):

      Textual description of the workflow type.

    • default_task_start_to_close_timeout(impl Into<String>) / set_default_task_start_to_close_timeout(Option<String>):

      If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution Decision.

      The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.

    • default_execution_start_to_close_timeout(impl Into<String>) / set_default_execution_start_to_close_timeout(Option<String>):

      If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution Action or StartChildWorkflowExecution Decision.

      The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of “NONE” for defaultExecutionStartToCloseTimeout; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit always causes the workflow execution to time out.

    • default_task_list(TaskList) / set_default_task_list(Option<TaskList>):

      If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list isn’t provided when starting the execution through the StartWorkflowExecution Action or StartChildWorkflowExecution Decision.

    • default_task_priority(impl Into<String>) / set_default_task_priority(Option<String>):

      The default task priority to assign to the workflow type. If not assigned, then 0 is used. Valid values are integers that range from Java’s Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.

      For more information about setting task priority, see Setting Task Priority in the Amazon SWF Developer Guide.

    • default_child_policy(ChildPolicy) / set_default_child_policy(Option<ChildPolicy>):

      If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution Decision.

      The supported child policies are:

      • TERMINATE – The child executions are terminated.

      • REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.

      • ABANDON – No action is taken. The child executions continue to run.

    • default_lambda_role(impl Into<String>) / set_default_lambda_role(Option<String>):

      The default IAM role attached to this workflow type.

      Executions of this workflow type need IAM roles to invoke Lambda functions. If you don’t specify an IAM role when you start this workflow type, the default Lambda role is attached to the execution. For more information, see https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html in the Amazon SWF Developer Guide.

  • On success, responds with RegisterWorkflowTypeOutput
  • On failure, responds with SdkError<RegisterWorkflowTypeError>

Constructs a fluent builder for the RequestCancelWorkflowExecution operation.

Constructs a fluent builder for the RespondActivityTaskCanceled operation.

Constructs a fluent builder for the RespondActivityTaskCompleted operation.

Constructs a fluent builder for the RespondActivityTaskFailed operation.

Constructs a fluent builder for the RespondDecisionTaskCompleted operation.

Constructs a fluent builder for the SignalWorkflowExecution operation.

Constructs a fluent builder for the StartWorkflowExecution operation.

  • The fluent builder is configurable:
    • domain(impl Into<String>) / set_domain(Option<String>):

      The name of the domain in which the workflow execution is created.

    • workflow_id(impl Into<String>) / set_workflow_id(Option<String>):

      The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time within the same domain.

      The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.

    • workflow_type(WorkflowType) / set_workflow_type(Option<WorkflowType>):

      The type of the workflow to start.

    • task_list(TaskList) / set_task_list(Option<TaskList>):

      The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.

      A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault is returned.

      The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.

    • task_priority(impl Into<String>) / set_task_priority(Option<String>):

      The task priority to use for this workflow execution. This overrides any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type is used. Valid values are integers that range from Java’s Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority.

      For more information about setting task priority, see Setting Task Priority in the Amazon SWF Developer Guide.

    • input(impl Into<String>) / set_input(Option<String>):

      The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.

    • execution_start_to_close_timeout(impl Into<String>) / set_execution_start_to_close_timeout(Option<String>):

      The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.

      The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit causes the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of “NONE” for this timeout; there is a one-year max limit on the time that a workflow execution can run.

      An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.

    • tag_list(Vec<String>) / set_tag_list(Option<Vec<String>>):

      The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter.

    • task_start_to_close_timeout(impl Into<String>) / set_task_start_to_close_timeout(Option<String>):

      Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType.

      The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.

      A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault is returned.

    • child_policy(ChildPolicy) / set_child_policy(Option<ChildPolicy>):

      If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType.

      The supported child policies are:

      • TERMINATE – The child executions are terminated.

      • REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.

      • ABANDON – No action is taken. The child executions continue to run.

      A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.

    • lambda_role(impl Into<String>) / set_lambda_role(Option<String>):

      The IAM role to attach to this workflow execution.

      Executions of this workflow type need IAM roles to invoke Lambda functions. If you don’t attach an IAM role, any attempt to schedule a Lambda task fails. This results in a ScheduleLambdaFunctionFailed history event. For more information, see https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html in the Amazon SWF Developer Guide.

  • On success, responds with StartWorkflowExecutionOutput with field(s):
    • run_id(Option<String>):

      The runId of a workflow execution. This ID is generated by the service and can be used to uniquely identify the workflow execution within a domain.

  • On failure, responds with SdkError<StartWorkflowExecutionError>

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the TerminateWorkflowExecution operation.

Constructs a fluent builder for the UndeprecateActivityType operation.

Constructs a fluent builder for the UndeprecateDomain operation.

Constructs a fluent builder for the UndeprecateWorkflowType operation.

Constructs a fluent builder for the UntagResource operation.

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more