diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 91feef13f27ce..02b0ed08152d8 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -42,7 +42,7 @@ export interface IProject extends IResource, iam.IGrantable, ec2.IConnectable { * * @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html */ - onEvent(id: string, options: events.OnEventOptions): events.Rule; + onEvent(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines a CloudWatch event rule triggered when the build project state @@ -69,7 +69,7 @@ export interface IProject extends IResource, iam.IGrantable, ec2.IConnectable { * * @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html */ - onStateChange(id: string, options: events.OnEventOptions): events.Rule; + onStateChange(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines a CloudWatch event rule that triggers upon phase change of this @@ -77,22 +77,22 @@ export interface IProject extends IResource, iam.IGrantable, ec2.IConnectable { * * @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html */ - onPhaseChange(id: string, options: events.OnEventOptions): events.Rule; + onPhaseChange(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines an event rule which triggers when a build starts. */ - onBuildStarted(id: string, options: events.OnEventOptions): events.Rule; + onBuildStarted(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines an event rule which triggers when a build fails. */ - onBuildFailed(id: string, options: events.OnEventOptions): events.Rule; + onBuildFailed(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines an event rule which triggers when a build completes successfully. */ - onBuildSucceeded(id: string, options: events.OnEventOptions): events.Rule; + onBuildSucceeded(id: string, options?: events.OnEventOptions): events.Rule; /** * @returns a CloudWatch metric associated with this build project. diff --git a/packages/@aws-cdk/aws-config/lib/rule.ts b/packages/@aws-cdk/aws-config/lib/rule.ts index 8d076e6365b0c..57261c543531c 100644 --- a/packages/@aws-cdk/aws-config/lib/rule.ts +++ b/packages/@aws-cdk/aws-config/lib/rule.ts @@ -19,17 +19,17 @@ export interface IRule extends IResource { * Defines a CloudWatch event rule which triggers for rule events. Use * `rule.addEventPattern(pattern)` to specify a filter. */ - onEvent(id: string, options: events.OnEventOptions): events.Rule; + onEvent(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines a CloudWatch event rule which triggers for rule compliance events. */ - onComplianceChange(id: string, options: events.OnEventOptions): events.Rule; + onComplianceChange(id: string, options?: events.OnEventOptions): events.Rule; /** * Defines a CloudWatch event rule which triggers for rule re-evaluation status events. */ - onReEvaluationStatus(id: string, options: events.OnEventOptions): events.Rule; + onReEvaluationStatus(id: string, options?: events.OnEventOptions): events.Rule; } /** diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index e542888b2a76a..0574d8150f947 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -53,7 +53,7 @@ export interface IDatabaseInstance extends IResource, ec2.IConnectable, secretsm * Defines a CloudWatch event rule which triggers for instance events. Use * `rule.addEventPattern(pattern)` to specify a filter. */ - onEvent(id: string, options: events.OnEventOptions): events.Rule; + onEvent(id: string, options?: events.OnEventOptions): events.Rule; } /** diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 2607167c38e05..75d85f2ad3a83 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -174,7 +174,7 @@ export interface IBucket extends IResource { * @param id The id of the rule * @param options Options for adding the rule */ - onCloudTrailEvent(id: string, options: OnCloudTrailBucketEventOptions): events.Rule; + onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): events.Rule; /** * Defines an AWS CloudWatch event rule that can trigger a target when an image is pushed to this @@ -186,7 +186,7 @@ export interface IBucket extends IResource { * @param id The id of the rule * @param options Options for adding the rule */ - onCloudTrailPutObject(id: string, options: OnCloudTrailBucketEventOptions): events.Rule; + onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): events.Rule; } /**