Skip to content

Commit

Permalink
feat(client-swf): This release adds a new API parameter to exclude ol…
Browse files Browse the repository at this point in the history
…d history events from decision tasks.
  • Loading branch information
awstools committed May 10, 2023
1 parent 6be4ce4 commit 235f75d
Show file tree
Hide file tree
Showing 16 changed files with 638 additions and 609 deletions.
2 changes: 0 additions & 2 deletions clients/client-swf/README.md
Expand Up @@ -13,11 +13,9 @@ coordinate work across distributed components. In Amazon SWF, a <i>task</i>
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.</p>

<p>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.</p>

<p>This documentation serves as reference only. For a broader overview of the Amazon SWF
programming model, see the <i>
<a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/">Amazon SWF Developer Guide</a>
Expand Down
3 changes: 0 additions & 3 deletions clients/client-swf/src/SWF.ts
Expand Up @@ -828,17 +828,14 @@ export interface SWF {
/**
* @public
* <fullname>Amazon Simple Workflow Service</fullname>
*
* <p>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 <i>task</i>
* 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.</p>
*
* <p>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.</p>
*
* <p>This documentation serves as reference only. For a broader overview of the Amazon SWF
* programming model, see the <i>
* <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/">Amazon SWF Developer Guide</a>
Expand Down
3 changes: 0 additions & 3 deletions clients/client-swf/src/SWFClient.ts
Expand Up @@ -427,17 +427,14 @@ export interface SWFClientResolvedConfig extends SWFClientResolvedConfigType {}
/**
* @public
* <fullname>Amazon Simple Workflow Service</fullname>
*
* <p>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 <i>task</i>
* 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.</p>
*
* <p>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.</p>
*
* <p>This documentation serves as reference only. For a broader overview of the Amazon SWF
* programming model, see the <i>
* <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/">Amazon SWF Developer Guide</a>
Expand Down
Expand Up @@ -95,6 +95,7 @@ export interface PollForDecisionTaskCommandOutput extends DecisionTask, __Metada
* nextPageToken: "STRING_VALUE",
* maximumPageSize: Number("int"),
* reverseOrder: true || false,
* startAtPreviousStartedEvent: true || false,
* };
* const command = new PollForDecisionTaskCommand(input);
* const response = await client.send(command);
Expand Down
Expand Up @@ -39,13 +39,11 @@ export interface RequestCancelWorkflowExecutionCommandOutput extends __MetadataB
* workflow execution identified by the given domain, workflowId, and runId. This logically
* requests the cancellation of the workflow execution as a whole. It is up to the decider to
* take appropriate actions when it receives an execution history with this event.</p>
*
* <note>
* <p>If the runId isn't specified, the <code>WorkflowExecutionCancelRequested</code> event
* is recorded in the history of the current open workflow execution with the specified
* workflowId in the domain.</p>
* </note>
*
* <note>
* <p>Because this action allows the workflow to properly clean up and gracefully close, it
* should be used instead of <a>TerminateWorkflowExecution</a> when
Expand Down
Expand Up @@ -35,22 +35,18 @@ export interface RespondActivityTaskCanceledCommandOutput extends __MetadataBear
* <p>Used by workers to tell the service that the <a>ActivityTask</a> identified
* by the <code>taskToken</code> was successfully canceled. Additional <code>details</code> can
* be provided using the <code>details</code> argument.</p>
*
* <p>These <code>details</code> (if provided) appear in the
* <code>ActivityTaskCanceled</code> event added to the workflow history.</p>
*
* <important>
* <p>Only use this operation if the <code>canceled</code> flag of a <a>RecordActivityTaskHeartbeat</a> request returns <code>true</code> and if the
* activity can be safely undone or abandoned.</p>
* </important>
*
* <p>A task is considered open from the time that it is scheduled until it is closed.
* Therefore a task is reported as open while a worker is processing it. A task is closed after
* it has been specified in a call to <a>RespondActivityTaskCompleted</a>,
* RespondActivityTaskCanceled, <a>RespondActivityTaskFailed</a>, or the task has
* <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types">timed
* out</a>.</p>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
Expand Up @@ -39,19 +39,16 @@ export interface RespondActivityTaskCompletedCommandOutput extends __MetadataBea
* by the <code>taskToken</code> completed successfully with a <code>result</code> (if provided).
* The <code>result</code> appears in the <code>ActivityTaskCompleted</code> event in the
* workflow history.</p>
*
* <important>
* <p>If the requested task doesn't complete successfully, use <a>RespondActivityTaskFailed</a> instead. If the worker finds that the task is
* canceled through the <code>canceled</code> flag returned by <a>RecordActivityTaskHeartbeat</a>, it should cancel the task, clean up and then call
* <a>RespondActivityTaskCanceled</a>.</p>
* </important>
*
* <p>A task is considered open from the time that it is scheduled until it is closed.
* Therefore a task is reported as open while a worker is processing it. A task is closed after
* it has been specified in a call to RespondActivityTaskCompleted, <a>RespondActivityTaskCanceled</a>, <a>RespondActivityTaskFailed</a>, or the
* task has <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types">timed
* out</a>.</p>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
Expand Up @@ -36,12 +36,10 @@ export interface RespondActivityTaskFailedCommandOutput extends __MetadataBearer
* by the <code>taskToken</code> has failed with <code>reason</code> (if specified). The
* <code>reason</code> and <code>details</code> appear in the <code>ActivityTaskFailed</code>
* event added to the workflow history.</p>
*
* <p>A task is considered open from the time that it is scheduled until it is closed.
* Therefore a task is reported as open while a worker is processing it. A task is closed after
* it has been specified in a call to <a>RespondActivityTaskCompleted</a>, <a>RespondActivityTaskCanceled</a>, RespondActivityTaskFailed, or the task has <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dg-basic.html#swf-dev-timeout-types">timed
* out</a>.</p>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
Expand Up @@ -38,15 +38,12 @@ export interface RespondDecisionTaskCompletedCommandOutput extends __MetadataBea
* <p>Used by deciders to tell the service that the <a>DecisionTask</a> identified
* by the <code>taskToken</code> has successfully completed. The <code>decisions</code> argument
* specifies the list of decisions made while processing the task.</p>
*
* <p>A <code>DecisionTaskCompleted</code> event is added to the workflow history. The
* <code>executionContext</code> specified is attached to the event in the workflow execution
* history.</p>
*
* <p>
* <b>Access Control</b>
* </p>
*
* <p>If an IAM policy grants permission to use <code>RespondDecisionTaskCompleted</code>, it
* can express permissions for the list of decisions in the <code>decisions</code> parameter.
* Each of the decisions has one or more parameters, much like a regular API call. To allow for
Expand Down
Expand Up @@ -36,18 +36,15 @@ export interface SignalWorkflowExecutionCommandOutput extends __MetadataBearer {
* history and creates a decision task for the workflow execution identified by the given domain,
* workflowId and runId. The event is recorded with the specified user defined signalName and
* input (if provided).</p>
*
* <note>
* <p>If a runId isn't specified, then the <code>WorkflowExecutionSignaled</code> event is
* recorded in the history of the current open workflow with the matching workflowId in the
* domain.</p>
* </note>
*
* <note>
* <p>If the specified workflow execution isn't open, this method fails with
* <code>UnknownResource</code>.</p>
* </note>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
Expand Up @@ -34,9 +34,7 @@ export interface StartWorkflowExecutionCommandOutput extends Run, __MetadataBear
* @public
* <p>Starts an execution of the workflow type in the specified domain using the provided
* <code>workflowId</code> and input data.</p>
*
* <p>This action returns the newly started workflow execution.</p>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
Expand Up @@ -36,23 +36,19 @@ export interface TerminateWorkflowExecutionCommandOutput extends __MetadataBeare
* workflow execution identified by the given domain, runId, and workflowId. The child policy,
* registered with the workflow type or specified when starting this execution, is applied to any
* open child workflow executions of this workflow execution.</p>
*
* <important>
* <p>If the identified workflow execution was in progress, it is terminated
* immediately.</p>
* </important>
*
* <note>
* <p>If a runId isn't specified, then the <code>WorkflowExecutionTerminated</code> event
* is recorded in the history of the current open workflow with the matching workflowId in the
* domain.</p>
* </note>
*
* <note>
* <p>You should consider using <a>RequestCancelWorkflowExecution</a> action
* instead because it allows the workflow to gracefully close while <a>TerminateWorkflowExecution</a> doesn't.</p>
* </note>
*
* <p>
* <b>Access Control</b>
* </p>
Expand Down
2 changes: 1 addition & 1 deletion clients/client-swf/src/endpoint/EndpointParameters.ts
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
47 changes: 23 additions & 24 deletions clients/client-swf/src/endpoint/ruleset.ts
Expand Up @@ -6,28 +6,27 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/swf.json */

const u="fn",
v="argv",
w="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h="getAttr",
i="stringEquals",
j={"required":true,"default":false,"type":"Boolean"},
k={[w]:"Region"},
l={[w]:"Endpoint"},
m={[u]:"booleanEquals",[v]:[{[w]:"UseFIPS"},true]},
n={[u]:"booleanEquals",[v]:[{[w]:"UseDualStack"},true]},
o={},
p={[u]:"booleanEquals",[v]:[true,{[u]:h,[v]:[{[w]:d},"supportsFIPS"]}]},
q={[w]:d},
r={[u]:"booleanEquals",[v]:[true,{[u]:h,[v]:[q,"supportsDualStack"]}]},
s=[m],
t=[n];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:j,UseFIPS:j,Endpoint:{required:b,type:c}},rules:[{conditions:[{[u]:"aws.partition",[v]:[k],assign:d}],type:e,rules:[{conditions:[{[u]:"isSet",[v]:[l]}],type:e,rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:l,properties:o,headers:o},type:g}]}]},{conditions:[m,n],type:e,rules:[{conditions:[p,r],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:s,type:e,rules:[{conditions:[p],type:e,rules:[{type:e,rules:[{conditions:[{[u]:i,[v]:["aws-us-gov",{[u]:h,[v]:[q,"name"]}]}],endpoint:{url:"https://swf.{Region}.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:t,type:e,rules:[{conditions:[r],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{conditions:[{[u]:i,[v]:[k,"us-gov-east-1"]}],endpoint:{url:"https://swf.us-gov-east-1.amazonaws.com",properties:o,headers:o},type:g},{conditions:[{[u]:i,[v]:[k,"us-gov-west-1"]}],endpoint:{url:"https://swf.us-gov-west-1.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://swf.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:g}]}]}]};
const s="required",
t="fn",
u="argv",
v="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="getAttr",
g={[s]:false,"type":"String"},
h={[s]:true,"default":false,"type":"Boolean"},
i={[v]:"Endpoint"},
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
l={},
m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]},
n={[v]:e},
o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
p=[j],
q=[k],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://swf.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://swf-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://swf.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;

0 comments on commit 235f75d

Please sign in to comment.