How to use the @aws-cdk/aws-events.EventField.fromPath function in @aws-cdk/aws-events

To help you get started, we’ve selected a few @aws-cdk/aws-events examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_project_target.ts View on Github external
sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
            artifactsOverride: { type: 'NO_ARTIFACTS' },
            environmentVariablesOverride: [
                {
                    name: 'pullRequestId',
                    value: EventField.fromPath('$.detail.pullRequestId'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'repositoryName',
                    value: EventField.fromPath('$.detail.repositoryNames[0]'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'sourceCommit',
                    value: EventField.fromPath('$.detail.sourceCommit'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'destinationCommit',
                    value: EventField.fromPath('$.detail.destinationCommit'),
                    type: 'PLAINTEXT',
                },
            ],
        });

        return {
            ...super.bind(_rule),
            input,
        };
    }
}
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
],
                    },
                },
            },
        );

        rule.addTarget(new LambdaFunction(pullRequestFunction));
        rule.addTarget(
            new CodeBuildProject(pullRequestProject, {
                event: RuleTargetInput.fromObject({
                    sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
                    artifactsOverride: { type: 'NO_ARTIFACTS' },
                    environmentVariablesOverride: [
                        {
                            name: 'pullRequestId',
                            value: EventField.fromPath(
                                '$.detail.pullRequestId',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'repositoryName',
                            value: EventField.fromPath(
                                '$.detail.repositoryNames[0]',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'sourceCommit',
                            value: EventField.fromPath('$.detail.sourceCommit'),
                            type: 'PLAINTEXT',
                        },
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_project_target.ts View on Github external
public bind(_rule: IRule): RuleTargetConfig {
        const input = RuleTargetInput.fromObject({
            sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
            artifactsOverride: { type: 'NO_ARTIFACTS' },
            environmentVariablesOverride: [
                {
                    name: 'pullRequestId',
                    value: EventField.fromPath('$.detail.pullRequestId'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'repositoryName',
                    value: EventField.fromPath('$.detail.repositoryNames[0]'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'sourceCommit',
                    value: EventField.fromPath('$.detail.sourceCommit'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'destinationCommit',
                    value: EventField.fromPath('$.detail.destinationCommit'),
                    type: 'PLAINTEXT',
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
},
                        {
                            name: 'repositoryName',
                            value: EventField.fromPath(
                                '$.detail.repositoryNames[0]',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'sourceCommit',
                            value: EventField.fromPath('$.detail.sourceCommit'),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'destinationCommit',
                            value: EventField.fromPath(
                                '$.detail.destinationCommit',
                            ),
                            type: 'PLAINTEXT',
                        },
                    ],
                }),
            }),
        );
    }
}
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_project_target.ts View on Github external
value: EventField.fromPath('$.detail.pullRequestId'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'repositoryName',
                    value: EventField.fromPath('$.detail.repositoryNames[0]'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'sourceCommit',
                    value: EventField.fromPath('$.detail.sourceCommit'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'destinationCommit',
                    value: EventField.fromPath('$.detail.destinationCommit'),
                    type: 'PLAINTEXT',
                },
            ],
        });

        return {
            ...super.bind(_rule),
            input,
        };
    }
}
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
name: 'pullRequestId',
                            value: EventField.fromPath(
                                '$.detail.pullRequestId',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'repositoryName',
                            value: EventField.fromPath(
                                '$.detail.repositoryNames[0]',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'sourceCommit',
                            value: EventField.fromPath('$.detail.sourceCommit'),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'destinationCommit',
                            value: EventField.fromPath(
                                '$.detail.destinationCommit',
                            ),
                            type: 'PLAINTEXT',
                        },
                    ],
                }),
            }),
        );
    }
}
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
eventPattern: {
                    detail: {
                        event: [
                            'pullRequestSourceBranchUpdated',
                            'pullRequestCreated',
                        ],
                    },
                },
            },
        );

        rule.addTarget(new LambdaFunction(pullRequestFunction));
        rule.addTarget(
            new CodeBuildProject(pullRequestProject, {
                event: RuleTargetInput.fromObject({
                    sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
                    artifactsOverride: { type: 'NO_ARTIFACTS' },
                    environmentVariablesOverride: [
                        {
                            name: 'pullRequestId',
                            value: EventField.fromPath(
                                '$.detail.pullRequestId',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'repositoryName',
                            value: EventField.fromPath(
                                '$.detail.repositoryNames[0]',
                            ),
                            type: 'PLAINTEXT',
                        },
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_project_target.ts View on Github external
public bind(_rule: IRule): RuleTargetConfig {
        const input = RuleTargetInput.fromObject({
            sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
            artifactsOverride: { type: 'NO_ARTIFACTS' },
            environmentVariablesOverride: [
                {
                    name: 'pullRequestId',
                    value: EventField.fromPath('$.detail.pullRequestId'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'repositoryName',
                    value: EventField.fromPath('$.detail.repositoryNames[0]'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'sourceCommit',
                    value: EventField.fromPath('$.detail.sourceCommit'),
                    type: 'PLAINTEXT',
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_check.ts View on Github external
rule.addTarget(
            new CodeBuildProject(pullRequestProject, {
                event: RuleTargetInput.fromObject({
                    sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
                    artifactsOverride: { type: 'NO_ARTIFACTS' },
                    environmentVariablesOverride: [
                        {
                            name: 'pullRequestId',
                            value: EventField.fromPath(
                                '$.detail.pullRequestId',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'repositoryName',
                            value: EventField.fromPath(
                                '$.detail.repositoryNames[0]',
                            ),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'sourceCommit',
                            value: EventField.fromPath('$.detail.sourceCommit'),
                            type: 'PLAINTEXT',
                        },
                        {
                            name: 'destinationCommit',
                            value: EventField.fromPath(
                                '$.detail.destinationCommit',
                            ),
                            type: 'PLAINTEXT',
                        },
github cloudcomponents / cdk-components / packages / cdk-pull-request-check / src / pull_request_project_target.ts View on Github external
public bind(_rule: IRule): RuleTargetConfig {
        const input = RuleTargetInput.fromObject({
            sourceVersion: EventField.fromPath('$.detail.sourceCommit'),
            artifactsOverride: { type: 'NO_ARTIFACTS' },
            environmentVariablesOverride: [
                {
                    name: 'pullRequestId',
                    value: EventField.fromPath('$.detail.pullRequestId'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'repositoryName',
                    value: EventField.fromPath('$.detail.repositoryNames[0]'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'sourceCommit',
                    value: EventField.fromPath('$.detail.sourceCommit'),
                    type: 'PLAINTEXT',
                },
                {
                    name: 'destinationCommit',
                    value: EventField.fromPath('$.detail.destinationCommit'),
                    type: 'PLAINTEXT',
                },
            ],
        });

        return {