Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(scheduler-alpha): minor doc updates #31939

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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