Skip to content

Commit

Permalink
chore(scheduler-alpha): minor doc updates (#31939)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Tracking #31785.

### Reason for this change

Updating doc for better clarity.

### Description of changes

Doc updates

### Description of how you validated changes

N/A

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
samson-keung authored Oct 30, 2024
1 parent bc67866 commit dae415e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
7 changes: 0 additions & 7 deletions packages/@aws-cdk/aws-scheduler-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ const cronBasedSchedule = new Schedule(this, 'Schedule', {
A one-time schedule is a schedule that invokes a target only once. You configure a one-time schedule when by specifying the time of the day, date,
and time zone in which EventBridge Scheduler evaluates the schedule.

[comment]: <> (TODO: Switch to `ts` once Schedule is implemented)

```ts
declare const target: targets.LambdaInvoke;

Expand Down Expand Up @@ -208,11 +206,6 @@ const target = new targets.LambdaInvoke(fn, {
});
```


### Cross-account and cross-region targets

Executing cross-account and cross-region targets are not supported yet.

### Specifying Encryption key

EventBridge Scheduler integrates with AWS Key Management Service (AWS KMS) to encrypt and decrypt your data using an AWS KMS key.
Expand Down
19 changes: 7 additions & 12 deletions packages/@aws-cdk/aws-scheduler-alpha/lib/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ import { DefaultTokenResolver, IResolveContext, Stack, StringConcat, Token, Toke
import { ISchedule } from './schedule';

/**
* The text, or well-formed JSON, passed to the target of the schedule.
* The text or well-formed JSON input passed to the target of the schedule.
* Tokens and ContextAttribute may be used in the input.
*/
export abstract class ScheduleTargetInput {
/**
* Pass text to the target, it is possible to embed `ContextAttributes`
* that will be resolved to actual values while the CloudFormation is
* deployed or cdk Tokens that will be resolved when the CloudFormation
* templates are generated by CDK.
*
* The target input value will be a single string that you pass.
* For passing complex values like JSON object to a target use method
* Pass simple text to the target. For passing complex values like JSON object to a target use method
* `ScheduleTargetInput.fromObject()` instead.
*
* @param text Text to use as the input for the target
Expand All @@ -22,8 +17,7 @@ export abstract class ScheduleTargetInput {
}

/**
* Pass a JSON object to the target, it is possible to embed `ContextAttributes` and other
* cdk references.
* Pass a JSON object to the target. The object will be transformed into a well-formed JSON string in the final template.
*
* @param obj object to use to convert to JSON to use as input for the target
*/
Expand Down Expand Up @@ -66,7 +60,8 @@ class FieldAwareEventInput extends ScheduleTargetInput {
}

/**
* Represents a field in the event pattern
* A set of convenient static methods representing the Scheduler Context Attributes.
* These Context Attributes keywords can be used inside a ScheduleTargetInput.
*
* @see https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-context-attributes.html
*/
Expand Down Expand Up @@ -103,7 +98,7 @@ export class ContextAttribute {
}

/**
* Escape hatch for other ContextAttribute that might be resolved in future.
* Escape hatch for other Context Attributes that may be added in the future
*
* @param name - name will replace xxx in <aws.scheduler.xxx>
*/
Expand Down

0 comments on commit dae415e

Please sign in to comment.