Skip to content

Commit 92bfb59

Browse files
authored
chore(scheduler-targets-alpha): readme updates (#32123)
### Issue # (if applicable) Tracking: #31785 ### Reason for this change Improve README quality. ### Description of changes Mostly grammar and formatting fixes. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5d499dc commit 92bfb59

File tree

2 files changed

+39
-46
lines changed

2 files changed

+39
-46
lines changed

packages/@aws-cdk/aws-scheduler-alpha/README.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
<!--END STABILITY BANNER-->
1717

1818
[Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
19-
that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens
20-
of millions of tasks across many AWS services without provisioning or managing underlying infrastructure.
19+
that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure.
2120

2221
1. **Schedule**: A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler. Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. When you create a schedule, you configure a target for the schedule to invoke.
2322
2. **Target**: A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler
@@ -28,12 +27,8 @@ more than 6,000 API operations across over 270 AWS services.
2827
3. **Schedule Group**: A schedule group is an Amazon EventBridge Scheduler resource that you use to organize your schedules. Your AWS account comes
2928
with a default scheduler group. A new schedule will always be added to a scheduling group. If you do not provide a scheduling group to add to, it
3029
will be added to the default scheduling group. You can create up to 500 schedule groups in your AWS account. Groups can be used to organize the
31-
schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Scheduling groups support tagging:
32-
with EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources.
33-
34-
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. It allows you to define Event Bridge Schedules.
35-
36-
> This module is in active development. Some features may not be implemented yet.
30+
schedules logically, access the schedule metrics and manage permissions at group granularity (see details below). Schedule groups support tagging.
31+
With EventBridge Scheduler, you apply tags to schedule groups, not to individual schedules to organize your resources.
3732

3833
## Defining a schedule
3934

@@ -49,7 +44,7 @@ const target = new targets.LambdaInvoke(fn, {
4944
const schedule = new Schedule(this, 'Schedule', {
5045
schedule: ScheduleExpression.rate(Duration.minutes(10)),
5146
target,
52-
description: 'This is a test schedule that invokes lambda function every 10 minutes.',
47+
description: 'This is a test schedule that invokes a lambda function every 10 minutes.',
5348
});
5449
```
5550

@@ -167,7 +162,7 @@ A list of supported targets can be found at `@aws-cdk/aws-scheduler-targets-alph
167162

168163
### Input
169164

170-
Targets can be invoked with a custom input. The `ScheduleTargetInput`class supports free-form text input and JSON-formatted object input:
165+
Targets can be invoked with a custom input. The `ScheduleTargetInput` class supports free-form text input and JSON-formatted object input:
171166

172167
```ts
173168
const input = ScheduleTargetInput.fromObject({
@@ -180,9 +175,9 @@ its respective value and deliver it to the target. See
180175
[full list of supported context attributes](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html):
181176

182177
1. `ContextAttribute.scheduleArn()` – The ARN of the schedule.
183-
2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, for example, 2022-03-22T18:59:43Z.
184-
3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, for example, d32c5kddcf5bb8c3.
185-
4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, for example, 1.
178+
2. `ContextAttribute.scheduledTime()` – The time you specified for the schedule to invoke its target, e.g., 2022-03-22T18:59:43Z.
179+
3. `ContextAttribute.executionId()` – The unique ID that EventBridge Scheduler assigns for each attempted invocation of a target, e.g., d32c5kddcf5bb8c3.
180+
4. `ContextAttribute.attemptNumber()` – A counter that identifies the attempt number for the current invocation, e.g., 1.
186181

187182
```ts
188183
const text = `Attempt number: ${ContextAttribute.attemptNumber}`;
@@ -195,7 +190,7 @@ An execution role is an IAM role that EventBridge Scheduler assumes in order to
195190

196191
The classes for templated schedule targets automatically create an IAM role with all the minimum necessary
197192
permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets
198-
will grant minimal required permissions. For example, the target `LambdaInvoke` will grant the
193+
will grant minimal required permissions. For example, the `LambdaInvoke` target will grant the
199194
IAM execution role `lambda:InvokeFunction` permission to invoke the Lambda function.
200195

201196
```ts
@@ -239,12 +234,12 @@ const schedule = new Schedule(this, 'Schedule', {
239234
});
240235
```
241236

242-
> Visit [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details.
237+
> See [Data protection in Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/data-protection.html) for more details.
243238
244239
## Configuring flexible time windows
245240

246241
You can configure flexible time windows by specifying the `timeWindow` property.
247-
Flexible time windows is disabled by default.
242+
Flexible time windows are disabled by default.
248243

249244
```ts
250245
declare const target: targets.LambdaInvoke;
@@ -256,7 +251,7 @@ const schedule = new Schedule(this, 'Schedule', {
256251
});
257252
```
258253

259-
> Visit [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details.
254+
> See [Configuring flexible time windows](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-flexible-time-windows.html) for more details.
260255
261256
## Error-handling
262257

@@ -295,8 +290,7 @@ EventBridge Scheduler publishes additional metrics when your schedule exhausts i
295290

296291
### Metrics for all schedules
297292

298-
Class `Schedule` provides static methods for accessing all schedules metrics with default configuration,
299-
such as `metricAllErrors` for viewing errors when executing targets.
293+
The `Schedule` class provides static methods for accessing all schedules metrics with default configuration, such as `metricAllErrors` for viewing errors when executing targets.
300294

301295
```ts
302296
new cloudwatch.Alarm(this, 'SchedulesErrorAlarm', {
@@ -332,4 +326,4 @@ new cloudwatch.Alarm(this, 'DefaultGroupErrorAlarm', {
332326

333327
See full list of metrics and their description at
334328
[Monitoring Using CloudWatch Metrics](https://docs.aws.amazon.com/scheduler/latest/UserGuide/monitoring-cloudwatch.html)
335-
in the *AWS Event Bridge Scheduler User Guide*.
329+
in the *AWS EventBridge Scheduler User Guide*.

packages/@aws-cdk/aws-scheduler-targets-alpha/README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,21 @@
1616
<!--END STABILITY BANNER-->
1717

1818
[Amazon EventBridge Scheduler](https://aws.amazon.com/blogs/compute/introducing-amazon-eventbridge-scheduler/) is a feature from Amazon EventBridge
19-
that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule one-time or recurrently tens
20-
of millions of tasks across many AWS services without provisioning or managing underlying infrastructure.
19+
that allows you to create, run, and manage scheduled tasks at scale. With EventBridge Scheduler, you can schedule millions of one-time or recurring tasks across various AWS services without provisioning or managing underlying infrastructure.
2120

2221
This library contains integration classes for Amazon EventBridge Scheduler to call any
23-
number of supported AWS Services.
22+
number of supported AWS Services.
2423

2524
The following targets are supported:
2625

27-
1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function))
26+
1. `targets.LambdaInvoke`: [Invoke an AWS Lambda function](#invoke-a-lambda-function)
2827
2. `targets.StepFunctionsStartExecution`: [Start an AWS Step Function](#start-an-aws-step-function)
2928
3. `targets.CodeBuildStartBuild`: [Start a CodeBuild job](#start-a-codebuild-job)
30-
4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-sqs-queue)
29+
4. `targets.SqsSendMessage`: [Send a Message to an Amazon SQS Queue](#send-a-message-to-an-sqs-queue)
3130
5. `targets.SnsPublish`: [Publish messages to an Amazon SNS topic](#publish-messages-to-an-amazon-sns-topic)
3231
6. `targets.EventBridgePutEvents`: [Put Events on EventBridge](#send-events-to-an-eventbridge-event-bus)
3332
7. `targets.InspectorStartAssessmentRun`: [Start an Amazon Inspector assessment run](#start-an-amazon-inspector-assessment-run)
34-
8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Streams](#put-a-record-to-an-amazon-kinesis-data-streams)
33+
8. `targets.KinesisStreamPutRecord`: [Put a record to an Amazon Kinesis Data Stream](#put-a-record-to-an-amazon-kinesis-data-stream)
3534
9. `targets.KinesisDataFirehosePutRecord`: [Put a record to a Kinesis Data Firehose](#put-a-record-to-a-kinesis-data-firehose)
3635
10. `targets.CodePipelineStartPipelineExecution`: [Start a CodePipeline execution](#start-a-codepipeline-execution)
3736
11. `targets.SageMakerStartPipelineExecution`: [Start a SageMaker pipeline execution](#start-a-sagemaker-pipeline-execution)
@@ -41,7 +40,7 @@ The following targets are supported:
4140
Use the `LambdaInvoke` target to invoke a lambda function.
4241

4342
The code snippet below creates an event rule with a Lambda function as a target
44-
called every hour by Event Bridge Scheduler with custom payload. You can optionally attach a
43+
called every hour by EventBridge Scheduler with a custom payload. You can optionally attach a
4544
[dead letter queue](https://docs.aws.amazon.com/eventbridge/latest/userguide/rule-dlq.html).
4645

4746
```ts
@@ -77,7 +76,7 @@ const schedule = new Schedule(this, 'Schedule', {
7776
Use the `StepFunctionsStartExecution` target to start a new execution on a StepFunction.
7877

7978
The code snippet below creates an event rule with a Step Function as a target
80-
called every hour by Event Bridge Scheduler with a custom payload.
79+
called every hour by EventBridge Scheduler with a custom payload.
8180

8281
```ts
8382
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
@@ -117,7 +116,7 @@ new Schedule(this, 'Schedule', {
117116
Use the `CodeBuildStartBuild` target to start a new build run on a CodeBuild project.
118117

119118
The code snippet below creates an event rule with a CodeBuild project as target which is
120-
called every hour by Event Bridge Scheduler.
119+
called every hour by EventBridge Scheduler.
121120

122121
```ts
123122
import * as codebuild from 'aws-cdk-lib/aws-codebuild';
@@ -130,12 +129,12 @@ new Schedule(this, 'Schedule', {
130129
});
131130
```
132131

133-
## Send A Message To SQS Queue
132+
## Send a Message To an SQS Queue
134133

135-
Use the `SqsSendMessage` target to send a message to SQS Queue.
134+
Use the `SqsSendMessage` target to send a message to an SQS Queue.
136135

137-
The code snippet below creates an event rule with a SQS Queue as a target
138-
called every hour by Event Bridge Scheduler with a custom payload.
136+
The code snippet below creates an event rule with an SQS Queue as a target
137+
called every hour by EventBridge Scheduler with a custom payload.
139138

140139
Contains the `messageGroupId` to use when the target is a FIFO queue. If you specify
141140
a FIFO queue as a target, the queue must have content-based deduplication enabled.
@@ -164,7 +163,7 @@ new Schedule(this, 'Schedule', {
164163
Use the `SnsPublish` target to publish messages to an Amazon SNS topic.
165164

166165
The code snippets below create an event rule with a Amazon SNS topic as a target.
167-
It's called every hour by Amazon Event Bridge Scheduler with custom payload.
166+
It's called every hour by Amazon EventBridge Scheduler with a custom payload.
168167

169168
```ts
170169
import * as sns from 'aws-cdk-lib/aws-sns';
@@ -190,7 +189,7 @@ new Schedule(this, 'Schedule', {
190189
Use the `EventBridgePutEvents` target to send events to an EventBridge event bus.
191190

192191
The code snippet below creates an event rule with an EventBridge event bus as a target
193-
called every hour by Event Bridge Scheduler with a custom event payload.
192+
called every hour by EventBridge Scheduler with a custom event payload.
194193

195194
```ts
196195
import * as events from 'aws-cdk-lib/aws-events';
@@ -216,8 +215,8 @@ new Schedule(this, 'Schedule', {
216215

217216
Use the `InspectorStartAssessmentRun` target to start an Inspector assessment run.
218217

219-
The code snippet below creates an event rule with an assessment template as target which is
220-
called every hour by Event Bridge Scheduler.
218+
The code snippet below creates an event rule with an assessment template as the target which is
219+
called every hour by EventBridge Scheduler.
221220

222221
```ts
223222
import * as inspector from 'aws-cdk-lib/aws-inspector';
@@ -230,12 +229,12 @@ new Schedule(this, 'Schedule', {
230229
});
231230
```
232231

233-
## Put a record to an Amazon Kinesis Data Streams
232+
## Put a record to an Amazon Kinesis Data Stream
234233

235-
Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Streams.
234+
Use the `KinesisStreamPutRecord` target to put a record to an Amazon Kinesis Data Stream.
236235

237-
The code snippet below creates an event rule with a stream as target which is
238-
called every hour by Event Bridge Scheduler.
236+
The code snippet below creates an event rule with a stream as the target which is
237+
called every hour by EventBridge Scheduler.
239238

240239
```ts
241240
import * as kinesis from 'aws-cdk-lib/aws-kinesis';
@@ -255,7 +254,7 @@ new Schedule(this, 'Schedule', {
255254
Use the `KinesisDataFirehosePutRecord` target to put a record to a Kinesis Data Firehose delivery stream.
256255

257256
The code snippet below creates an event rule with a delivery stream as a target
258-
called every hour by Event Bridge Scheduler with a custom payload.
257+
called every hour by EventBridge Scheduler with a custom payload.
259258

260259
```ts
261260
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
@@ -277,8 +276,8 @@ new Schedule(this, 'Schedule', {
277276

278277
Use the `CodePipelineStartPipelineExecution` target to start a new execution for a CodePipeline pipeline.
279278

280-
The code snippet below creates an event rule with a CodePipeline pipeline as target which is
281-
called every hour by Event Bridge Scheduler.
279+
The code snippet below creates an event rule with a CodePipeline pipeline as the target which is
280+
called every hour by EventBridge Scheduler.
282281

283282
```ts
284283
import * as codepipeline from 'aws-cdk-lib/aws-codepipeline';
@@ -295,8 +294,8 @@ new Schedule(this, 'Schedule', {
295294

296295
Use the `SageMakerStartPipelineExecution` target to start a new execution for a SageMaker pipeline.
297296

298-
The code snippet below creates an event rule with a SageMaker pipeline as target which is
299-
called every hour by Event Bridge Scheduler.
297+
The code snippet below creates an event rule with a SageMaker pipeline as the target which is
298+
called every hour by EventBridge Scheduler.
300299

301300
```ts
302301
import * as sagemaker from 'aws-cdk-lib/aws-sagemaker';

0 commit comments

Comments
 (0)