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

fix(scheduler-targets-alpha): update inspector target to use IAssessmentTemplate instead of CfnAssessmentTemplate #33682

Merged
merged 4 commits into from
Mar 5, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update readme example
  • Loading branch information
gracelu0 committed Mar 4, 2025
commit 8092d55877a0b3f76c87dd2c3742c21ee39df52c
6 changes: 4 additions & 2 deletions packages/@aws-cdk/aws-scheduler-targets-alpha/README.md
Original file line number Diff line number Diff line change
@@ -222,7 +222,9 @@ called every hour by EventBridge Scheduler.
```ts
import * as inspector from 'aws-cdk-lib/aws-inspector';

declare const assessmentTemplate: inspector.CfnAssessmentTemplate;
declare const cfnAssessmentTemplate: inspector.CfnAssessmentTemplate;

const assessmentTemplate = inspector.AssessmentTemplate.fromCfnAssessmentTemplate(this, 'MyAssessmentTemplate', cfnAssessmentTemplate);

new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(60)),
@@ -316,7 +318,7 @@ new Schedule(this, 'Schedule', {

## Invoke a wider set of AWS API

Use the `Universal` target to invoke AWS API. See https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html
Use the `Universal` target to invoke AWS API. See <https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html>

The code snippet below creates an event rule with AWS API as the target which is
called at midnight every day by EventBridge Scheduler.