OnCloudTrailImagePushedOptions Struct
Options for the onCloudTrailImagePushed method.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr as ecr } from 'aws-cdk-lib';
import { aws_events as events } from 'aws-cdk-lib';
import * as constructs from 'constructs';
declare const construct: constructs.Construct;
declare const detail: any;
declare const ruleTarget: events.IRuleTarget;
const onCloudTrailImagePushedOptions: ecr.OnCloudTrailImagePushedOptions = {
crossStackScope: construct,
description: 'description',
eventPattern: {
account: ['account'],
detail: {
detailKey: detail,
},
detailType: ['detailType'],
id: ['id'],
region: ['region'],
resources: ['resources'],
source: ['source'],
time: ['time'],
version: ['version'],
},
imageTag: 'imageTag',
ruleName: 'ruleName',
target: ruleTarget,
};
Properties
crossStackScopeoptionalConstructcross_stack_scopeoptionalConstructcrossStackScopeoptionalConstructCrossStackScopeoptionalConstructCrossStackScopeoptionalConstruct#The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region).
Default: none (the main scope will be used, even for cross-stack Events)
This helps dealing with cycles that often arise in these situations.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#A description of the rule's purpose.
Default: No description
eventPatternoptionalEventPatternevent_patternoptionalEventPatterneventPatternoptionalEventPatternEventPatternoptionalEventPatternEventPatternoptionalEventPattern#Additional restrictions for the event to route to the specified target.
Default: No additional filtering based on an event pattern.
The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering.
imageTagoptionalstringimage_tagoptionalstrimageTagoptionalStringImageTagoptionalstringImageTagoptional*string#Only watch changes to this image tag.
Default: Watch changes to all tags
ruleNameoptionalstringrule_nameoptionalstrruleNameoptionalStringRuleNameoptionalstringRuleNameoptional*string#A name for the rule.
Default: AWS CloudFormation generates a unique physical ID.
targetoptionalIRuleTargettargetoptionalIRuleTargettargetoptionalIRuleTargetTargetoptionalIRuleTargetTargetoptionalIRuleTarget#The target to register for the event.
Default: No target is added to the rule. Use addTarget() to add a target.