Skip to content

Commit 9cd7f38

Browse files
authored
Multi: Reorganizing workflows as feature scenarios (#7195)
* Reorganizing workflows as feature scenarios. * Update dockerfile for tests. * Update linting settings.
1 parent 419f054 commit 9cd7f38

File tree

173 files changed

+359
-390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+359
-390
lines changed

.doc_gen/metadata/medical-imaging_metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ medical-imaging_Scenario_ImageSetsAndFrames:
11361136
title_abbrev: Get started with image sets and image frames
11371137
synopsis: >
11381138
import DICOM files and download image frames in &AHI;.</para>
1139-
<para>The implementation is structured as a workflow command-line
1139+
<para>The implementation is structured as a command-line
11401140
application.
11411141
synopsis_list:
11421142
- Set up resources for a DICOM import.

.doc_gen/metadata/s3_metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3447,7 +3447,7 @@ s3_Scenario_ObjectLock:
34473447
sdkguide:
34483448
excerpts:
34493449
- description: |
3450-
Entrypoint for the workflow (<noloc>index.js</noloc>). This orchestrates all of the steps.
3450+
Entrypoint for the scenario (<noloc>index.js</noloc>). This orchestrates all of the steps.
34513451
Visit GitHub to see the implementation details for Scenario, ScenarioInput, ScenarioOutput, and ScenarioAction.
34523452
snippet_files:
34533453
- javascriptv3/example_code/s3/scenarios/object-locking/index.js

.doc_gen/metadata/scheduler_metadata.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ scheduler_DeleteScheduleGroup:
156156
- python.example_code.scheduler.DeleteScheduleGroup
157157
services:
158158
scheduler: {DeleteScheduleGroup}
159-
scheduler_ScheduledEventsWorkflow:
160-
title: A complete &EVS; Scheduled Events workflow using an &AWS; SDK
161-
title_abbrev: Scheduled Events workflow
159+
scheduler_ScheduledEventsScenario:
160+
title: A complete &EVS; Scheduled Events scenario using an &AWS; SDK
161+
title_abbrev: Scheduled Events
162162
synopsis_list:
163163
- Deploy a &CFN; stack with required resources.
164164
- Create a &EVS; schedule group.
@@ -173,7 +173,7 @@ scheduler_ScheduledEventsWorkflow:
173173
- sdk_version: 2
174174
github: javav2/example_code/scheduler
175175
excerpts:
176-
- description: Run the workflow.
176+
- description: Run the scenario.
177177
genai: most
178178
snippet_tags:
179179
- scheduler.javav2.scenario.main
@@ -186,7 +186,7 @@ scheduler_ScheduledEventsWorkflow:
186186
- sdk_version: 3
187187
github: dotnetv3/EventBridge Scheduler
188188
excerpts:
189-
- description: Run the workflow.
189+
- description: Run the scenario.
190190
genai: most
191191
snippet_tags:
192192
- Scheduler.dotnetv3.SchedulerWorkflow

.doc_gen/metadata/sesv2_metadata.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -418,17 +418,17 @@ sesv2_DeleteEmailTemplate:
418418
services:
419419
sesv2: {DeleteEmailTemplate}
420420
sesv2_NewsletterWorkflow:
421-
title: A complete &SESv2; Newsletter workflow using an &AWS; SDK
422-
title_abbrev: Newsletter workflow
423-
synopsis: run the &SESv2; newsletter workflow.
421+
title: A complete &SESv2; Newsletter scenario using an &AWS; SDK
422+
title_abbrev: Newsletter scenario
423+
synopsis: run the &SESv2; newsletter scenario.
424424
category: Scenarios
425425
languages:
426426
.NET:
427427
versions:
428428
- sdk_version: 3
429429
github: dotnetv3/SESv2
430430
excerpts:
431-
- description: Run the workflow.
431+
- description: Run the scenario.
432432
genai: most
433433
snippet_tags:
434434
- SESWorkflow.dotnetv3.NewsletterWorkflow

.doc_gen/metadata/sqs_metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -989,10 +989,10 @@ sqs_Scenario_TopicsAndQueues:
989989
github: javascriptv3/example_code/cross-services/wkflw-topics-queues
990990
sdkguide:
991991
excerpts:
992-
- description: This is the entry point for this workflow.
992+
- description: This is the entry point for this scenario.
993993
snippet_tags:
994994
- javascript.v3.wkflw.topicsandqueues.index
995-
- description: The preceding code provides the necessary dependencies and starts the workflow. The next section
995+
- description: The preceding code provides the necessary dependencies and starts the scenario. The next section
996996
contains the bulk of the example.
997997
snippet_tags:
998998
- javascript.v3.wkflw.topicsandqueues.wrapper

.github/workflows/lint-javascript.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
sparse-checkout: |
1717
.github
1818
javascriptv3
19-
workflows
19+
scenarios
2020
- name: Get changed files
2121
id: changed-files
2222
uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275

.tools/ailly/dotnet-prompts.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ code:
152152
153153
'''
154154
/// <summary>
155-
/// Run the preparation step of the workflow. Should return successful.
155+
/// Run the preparation step of the scenario. Should return successful.
156156
/// </summary>
157157
/// <returns>Async task.</returns>
158158
[Fact]

aws-cfn/cross-service/resilient-workflow/resilient-service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Resources:
221221
sleep 30 # prevent "Error: Rpmdb changed underneath us"
222222
yum install python-pip -y
223223
python3 -m pip install boto3 ec2-metadata
224-
wget -O server.py https://raw.githubusercontent.com/awsdocs/aws-doc-sdk-examples/main/workflows/resilient_service/resources/server.py
224+
wget -O server.py https://raw.githubusercontent.com/awsdocs/aws-doc-sdk-examples/main/scenarios/features/resilient_service/resources/server.py
225225
python3 server.py 80
226226
227227
# 4. An Auto Scaling group that starts EC2 instances, one in each of three Availability Zones.

cpp/example_code/iot/things_and_shadows_workflow/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## AWS IoT Things and Shadows Workflow
1+
## AWS IoT Things and Shadows Scenario
22
This example demonstrates various interactions with the AWS Internet of things (IoT) Core service using the AWS SDK.
33
The program guides you through a series of steps, showcasing AWS IoT capabilities and providing a comprehensive example for developers.
44

55

66

7-
### Workflow Steps
7+
### Scenario Steps
88

99
#### Create an AWS IoT thing:
1010

cpp/example_code/medical-imaging/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This example shows you how to get started using HealthImaging.
9393
#### Get started with image sets and image frames
9494

9595
This example shows you how to import DICOM files and download image frames in HealthImaging.</para>
96-
<para>The implementation is structured as a workflow command-line
96+
<para>The implementation is structured as a command-line
9797
application.
9898

9999

@@ -141,4 +141,4 @@ This example shows you how to import DICOM files and download image frames in He
141141

142142
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
143143

144-
SPDX-License-Identifier: Apache-2.0
144+
SPDX-License-Identifier: Apache-2.0

cpp/example_code/medical-imaging/imaging_set_and_frames_workflow/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ This workflow runs as a command-line application prompting for user input.
1616
3. An Amazon S3 output bucket for a DICOM import job.
1717
4. An AWS Identity and Access Management (IAM) role with the appropriate permissions for a DICOM import job.
1818

19-
![CloudFormation stack diagram](../../../../workflows/healthimaging_image_sets/.images/cfn_stack.png)
19+
![CloudFormation stack diagram](../../../../scenarios/features/healthimaging_image_sets/.images/cfn_stack.png)
2020

2121
2. The user chooses a DICOM study to copy from the [National Cancer Institute Imaging Data Commons (IDC) Collections](https://registry.opendata.aws/nci-imaging-data-commons/)' public S3 bucket.
2222
3. The chosen study is copied to the user's input S3 bucket.
2323

24-
![DICOM copy diagram](../../../../workflows/healthimaging_image_sets/.images/copy_dicom.png)
24+
![DICOM copy diagram](../../../../scenarios/features/healthimaging_image_sets/.images/copy_dicom.png)
2525

2626
4. A HealthImaging DICOM import job is run.
2727

28-
![DICOM import diagram](../../../../workflows/healthimaging_image_sets/.images/dicom_import.png)
28+
![DICOM import diagram](../../../../scenarios/features/healthimaging_image_sets/.images/dicom_import.png)
2929

3030
5. The workflow retrieves the IDs for the HealthImaging image frames created by the DICOM import job.
3131

32-
![Image frame ID retrieval diagram](../../../../workflows/healthimaging_image_sets/.images/get_image_frame_ids.png)
32+
![Image frame ID retrieval diagram](../../../../scenarios/features/healthimaging_image_sets/.images/get_image_frame_ids.png)
3333

3434
6. The HealthImaging image frames are downloaded, decoded to a bitmap format, and verified using a CRC32 checksum.
3535
7. The created resources can then be deleted, if the user chooses.

dotnetv3/EventBridge Scheduler/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Code excerpts that show you how to call individual service functions.
4848
Code examples that show you how to accomplish a specific task by calling multiple
4949
functions within the same service.
5050

51-
- [Scheduled Events workflow](Scenarios/SchedulerWorkflow.cs)
51+
- [Scheduled Events](Scenarios/SchedulerWorkflow.cs)
5252

5353

5454
<!--custom.examples.start-->
@@ -85,7 +85,7 @@ This example shows you how to get started using EventBridge Scheduler.
8585

8686

8787

88-
#### Scheduled Events workflow
88+
#### Scheduled Events
8989

9090
This example shows you how to do the following:
9191

@@ -96,12 +96,12 @@ This example shows you how to do the following:
9696
- Delete EventBridge Scheduler the schedule and schedule group.
9797
- Clean up resources and delete the stack.
9898

99-
<!--custom.scenario_prereqs.scheduler_ScheduledEventsWorkflow.start-->
100-
<!--custom.scenario_prereqs.scheduler_ScheduledEventsWorkflow.end-->
99+
<!--custom.scenario_prereqs.scheduler_ScheduledEventsScenario.start-->
100+
<!--custom.scenario_prereqs.scheduler_ScheduledEventsScenario.end-->
101101

102102

103-
<!--custom.scenarios.scheduler_ScheduledEventsWorkflow.start-->
104-
<!--custom.scenarios.scheduler_ScheduledEventsWorkflow.end-->
103+
<!--custom.scenarios.scheduler_ScheduledEventsScenario.start-->
104+
<!--custom.scenarios.scheduler_ScheduledEventsScenario.end-->
105105

106106
### Tests
107107

@@ -129,4 +129,4 @@ in the `dotnetv3` folder.
129129

130130
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
131131

132-
SPDX-License-Identifier: Apache-2.0
132+
SPDX-License-Identifier: Apache-2.0

dotnetv3/EventBridge Scheduler/Scenarios/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This example shows how to use AWS SDKs to work with Amazon EventBridge Scheduler
55

66
The target SNS topic and the AWS Identity and Access Management (IAM) role used with the schedules are created as part of an AWS CloudFormation stack that is deployed at the start of the workflow, and deleted when the workflow is complete.
77

8-
![Object Lock Features](../../../workflows/eventbridge_scheduler/resources/scheduler-workflow.png)
8+
![Object Lock Features](../../../scenarios/features/eventbridge_scheduler/resources/scheduler-workflow.png)
99

1010
This workflow demonstrates the following steps and tasks:
1111

@@ -65,7 +65,7 @@ This workflow uses the following AWS services:
6565

6666
### Resources
6767

68-
The workflow scenario deploys the AWS CloudFormation stack with the required resources.
68+
The feature scenario deploys the AWS CloudFormation stack with the required resources.
6969

7070
### Instructions
7171

dotnetv3/EventBridge Scheduler/Scenarios/SchedulerWorkflow.cs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

44
// snippet-start:[Scheduler.dotnetv3.SchedulerWorkflow]
@@ -27,8 +27,8 @@ public class SchedulerWorkflow
2727
- Prompt the user for an email address to use for the subscription for the SNS topic subscription.
2828
- Prompt the user for a name for the Cloud Formation stack.
2929
- Deploy the Cloud Formation template in resources/cfn_template.yaml for resource creation.
30-
- Store the outputs of the stack into variables for use in the workflow.
31-
- Create a schedule group for all workflow schedules.
30+
- Store the outputs of the stack into variables for use in the scenario.
31+
- Create a schedule group for all schedules.
3232
3333
2. Create one-time Schedule:
3434
- Create a one-time schedule to send an initial event.
@@ -55,9 +55,9 @@ public class SchedulerWorkflow
5555
private static string _snsTopicArn = null!;
5656

5757
public static bool _interactive = true;
58-
private static string _stackName = "default-scheduler-workflow-stack-name";
59-
private static string _scheduleGroupName = "workflow-schedules-group";
60-
private static string _stackResourcePath = "../../../../../../workflows/eventbridge_scheduler/resources/cfn_template.yaml";
58+
private static string _stackName = "default-scheduler-scenario-stack-name";
59+
private static string _scheduleGroupName = "scenario-schedules-group";
60+
private static string _stackResourcePath = "../../../../../../scenarios/features/eventbridge_scheduler/resources/cfn_template.yaml";
6161

6262
public static async Task Main(string[] args)
6363
{
@@ -83,7 +83,7 @@ public static async Task Main(string[] args)
8383
}
8484

8585
Console.WriteLine(new string('-', 80));
86-
Console.WriteLine("Welcome to the Amazon EventBridge Scheduler Workflow.");
86+
Console.WriteLine("Welcome to the Amazon EventBridge Scheduler Scenario.");
8787
Console.WriteLine(new string('-', 80));
8888

8989
try
@@ -109,12 +109,12 @@ public static async Task Main(string[] args)
109109
}
110110
catch (Exception ex)
111111
{
112-
_logger.LogError(ex, "There was a problem with the workflow, initiating cleanup...");
112+
_logger.LogError(ex, "There was a problem with the scenario, initiating cleanup...");
113113
_interactive = false;
114114
await Cleanup();
115115
}
116116

117-
Console.WriteLine("Amazon EventBridge Scheduler workflow completed.");
117+
Console.WriteLine("Amazon EventBridge Scheduler scenario completed.");
118118
}
119119

120120
/// <summary>
@@ -141,7 +141,7 @@ public static async Task<bool> PrepareApplication()
141141

142142
if (deploySuccess)
143143
{
144-
// Create a schedule group for all workflow schedules
144+
// Create a schedule group for all schedules
145145
await _schedulerWrapper.CreateScheduleGroupAsync(_scheduleGroupName);
146146

147147
Console.WriteLine("Application preparation complete.");
@@ -414,14 +414,14 @@ public static async Task<bool> CreateRecurringSchedule()
414414
}
415415

416416
/// <summary>
417-
/// Cleans up the resources created during the workflow.
417+
/// Cleans up the resources created during the scenario.
418418
/// </summary>
419419
/// <returns>True if the cleanup was successful.</returns>
420420
public static async Task<bool> Cleanup()
421421
{
422422
// Prompt the user to confirm cleanup.
423423
var cleanup = !_interactive || GetYesNoResponse(
424-
"Do you want to delete all resources created by this workflow? (y/n) ");
424+
"Do you want to delete all resources created by this scenario? (y/n) ");
425425
if (cleanup)
426426
{
427427
try
@@ -441,7 +441,7 @@ public static async Task<bool> Cleanup()
441441
return false;
442442
}
443443
}
444-
_logger.LogInformation("EventBridge Scheduler workflow is complete.");
444+
_logger.LogInformation("EventBridge Scheduler scenario is complete.");
445445
return true;
446446
}
447447

dotnetv3/EventBridge Scheduler/Tests/SchedulerWorkflowTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

44
using Amazon.CloudFormation;
@@ -18,7 +18,7 @@ public class SchedulerWorkflowTests
1818
private SchedulerWrapper _schedulerWrapper = null!;
1919

2020
/// <summary>
21-
/// Verifies the workflow with an integration test. No errors should be logged.
21+
/// Verifies the scenario with an integration test. No errors should be logged.
2222
/// </summary>
2323
/// <returns>Async task.</returns>
2424
[Fact]

dotnetv3/S3/scenarios/S3ConditionalRequestsScenario/S3ConditionalRequestsTests/S3ConditionalRequestsScenarioTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

44
using Amazon.S3;
@@ -46,7 +46,7 @@ public S3ConditionalRequestsScenarioTests()
4646
}
4747

4848
/// <summary>
49-
/// Run the setup step of the workflow. Should return successful.
49+
/// Run the setup step of the scenario. Should return successful.
5050
/// </summary>
5151
/// <returns>Async task.</returns>
5252
[Fact]

dotnetv3/S3/scenarios/S3ObjectLockScenario/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This example shows how to use AWS SDKs to work with Amazon Simple Storage Servic
66

77
[Amazon S3 Object Lock](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html) can help prevent Amazon S3 objects from being deleted or overwritten for a fixed amount of time or indefinitely. Object Lock can help meet regulatory requirements or protect against object changes or deletion.
88

9-
![Object Lock Features](../../../../workflows/s3_object_lock/resources/Diagram_Amazon-S3-Object-Lock.png)
9+
![Object Lock Features](../../../../scenarios/features/s3_object_lock/resources/Diagram_Amazon-S3-Object-Lock.png)
1010

1111
This workflow demonstrates the following steps and tasks:
1212
1. Add object lock settings to both new and existing S3 buckets.
@@ -31,7 +31,7 @@ For general prerequisites, see the [README](../../../README.md) in the `dotnetv3
3131

3232
### Resources
3333

34-
The workflow scenario steps create the buckets and objects needed for the example. No additional resources are required.
34+
The feature scenario steps create the buckets and objects needed for the example. No additional resources are required.
3535

3636
This workflow includes an optional step to add a governance mode retention period of one day to objects in an S3 bucket. In order to delete these objects, you must have the `s3:BypassGovernanceRetention` permission. If you do not have this permission, you will be unable to delete these objects until the retention period has expired.
3737

dotnetv3/S3/scenarios/S3ObjectLockScenario/S3ObjectLockTests/S3ObjectLockScenarioTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

44
using Amazon.S3;
@@ -41,7 +41,7 @@ public S3ObjectLockScenarioTests()
4141
}
4242

4343
/// <summary>
44-
/// Run the setup step of the workflow. Should return successful.
44+
/// Run the setup step of the scenario. Should return successful.
4545
/// </summary>
4646
/// <returns>Async task.</returns>
4747
[Fact]
@@ -68,7 +68,7 @@ public async Task TestSetup()
6868
}
6969

7070
/// <summary>
71-
/// Run the list object step of the workflow. Should return successful.
71+
/// Run the list object step of the scenario. Should return successful.
7272
/// </summary>
7373
/// <returns>Async task.</returns>
7474
[Fact]
@@ -88,7 +88,7 @@ public async Task TestObjects()
8888

8989

9090
/// <summary>
91-
/// Run the cleanup step of the workflow. Should return successful.
91+
/// Run the cleanup step of the scenario. Should return successful.
9292
/// </summary>
9393
/// <returns>Async task.</returns>
9494
[Fact]

0 commit comments

Comments
 (0)