-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(appsync): L2 construct for EventBridge DataSource. (#25369)
Adds an L2 EventBridge data source to AppSync. Closes #24809. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
14 changed files
with
1,088 additions
and
1 deletion.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/appsync.eventbridge.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
schema { | ||
query: Query | ||
mutation: Mutation | ||
} | ||
|
||
type Query { | ||
event(id:ID!): Event | ||
} | ||
|
||
type Mutation { | ||
emitEvent(id: ID!, name: String): PutEventsResult! | ||
} | ||
|
||
type Event { | ||
id: ID! | ||
name: String! | ||
} | ||
|
||
type Entry { | ||
ErrorCode: String | ||
ErrorMessage: String | ||
EventId: String | ||
} | ||
|
||
type PutEventsResult { | ||
Entries: [Entry!] | ||
FailedEntry: Int | ||
} |
19 changes: 19 additions & 0 deletions
19
...test/integ.appsync-eventbridge.js.snapshot/apiDefaultTestDeployAssert018781F2.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "31.0.0", | ||
"files": { | ||
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { | ||
"source": { | ||
"path": "apiDefaultTestDeployAssert018781F2.template.json", | ||
"packaging": "file" | ||
}, | ||
"destinations": { | ||
"current_account-current_region": { | ||
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", | ||
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" | ||
} | ||
} | ||
} | ||
}, | ||
"dockerImages": {} | ||
} |
36 changes: 36 additions & 0 deletions
36
...st/integ.appsync-eventbridge.js.snapshot/apiDefaultTestDeployAssert018781F2.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"Parameters": { | ||
"BootstrapVersion": { | ||
"Type": "AWS::SSM::Parameter::Value<String>", | ||
"Default": "/cdk-bootstrap/hnb659fds/version", | ||
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
} | ||
}, | ||
"Rules": { | ||
"CheckBootstrapVersion": { | ||
"Assertions": [ | ||
{ | ||
"Assert": { | ||
"Fn::Not": [ | ||
{ | ||
"Fn::Contains": [ | ||
[ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5" | ||
], | ||
{ | ||
"Ref": "BootstrapVersion" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
} | ||
] | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...sting/framework-integ/test/aws-appsync/test/integ.appsync-eventbridge.js.snapshot/cdk.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"31.0.0"} |
12 changes: 12 additions & 0 deletions
12
...ng/framework-integ/test/aws-appsync/test/integ.appsync-eventbridge.js.snapshot/integ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "31.0.0", | ||
"testCases": { | ||
"api/DefaultTest": { | ||
"stacks": [ | ||
"stack" | ||
], | ||
"assertionStack": "api/DefaultTest/DeployAssert", | ||
"assertionStackName": "apiDefaultTestDeployAssert018781F2" | ||
} | ||
} | ||
} |
153 changes: 153 additions & 0 deletions
153
...framework-integ/test/aws-appsync/test/integ.appsync-eventbridge.js.snapshot/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
{ | ||
"version": "31.0.0", | ||
"artifacts": { | ||
"stack.assets": { | ||
"type": "cdk:asset-manifest", | ||
"properties": { | ||
"file": "stack.assets.json", | ||
"requiresBootstrapStackVersion": 6, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" | ||
} | ||
}, | ||
"stack": { | ||
"type": "aws:cloudformation:stack", | ||
"environment": "aws://unknown-account/unknown-region", | ||
"properties": { | ||
"templateFile": "stack.template.json", | ||
"validateOnSynth": false, | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", | ||
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", | ||
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f.json", | ||
"requiresBootstrapStackVersion": 6, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", | ||
"additionalDependencies": [ | ||
"stack.assets" | ||
], | ||
"lookupRole": { | ||
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", | ||
"requiresBootstrapStackVersion": 8, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" | ||
} | ||
}, | ||
"dependencies": [ | ||
"stack.assets" | ||
], | ||
"metadata": { | ||
"/stack/EventBridgeApi/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApi398AE60D" | ||
} | ||
], | ||
"/stack/EventBridgeApi/Schema": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiSchema535E9664" | ||
} | ||
], | ||
"/stack/EventBridgeApi/DefaultApiKey": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiDefaultApiKeyC757E0EA" | ||
} | ||
], | ||
"/stack/EventBridgeApi/EventBridgeDs/ServiceRole/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiEventBridgeDsServiceRoleF433388F" | ||
} | ||
], | ||
"/stack/EventBridgeApi/EventBridgeDs/ServiceRole/DefaultPolicy/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiEventBridgeDsServiceRoleDefaultPolicyF1047C06" | ||
} | ||
], | ||
"/stack/EventBridgeApi/EventBridgeDs/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiEventBridgeDs3E3BC289" | ||
} | ||
], | ||
"/stack/EventBridgeApi/EventResolver/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "EventBridgeApiEventResolverD968F6C6" | ||
} | ||
], | ||
"/stack/DestinationEventBus/Resource": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "DestinationEventBus776315F0" | ||
} | ||
], | ||
"/stack/BootstrapVersion": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "BootstrapVersion" | ||
} | ||
], | ||
"/stack/CheckBootstrapVersion": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "CheckBootstrapVersion" | ||
} | ||
] | ||
}, | ||
"displayName": "stack" | ||
}, | ||
"apiDefaultTestDeployAssert018781F2.assets": { | ||
"type": "cdk:asset-manifest", | ||
"properties": { | ||
"file": "apiDefaultTestDeployAssert018781F2.assets.json", | ||
"requiresBootstrapStackVersion": 6, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" | ||
} | ||
}, | ||
"apiDefaultTestDeployAssert018781F2": { | ||
"type": "aws:cloudformation:stack", | ||
"environment": "aws://unknown-account/unknown-region", | ||
"properties": { | ||
"templateFile": "apiDefaultTestDeployAssert018781F2.template.json", | ||
"validateOnSynth": false, | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", | ||
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", | ||
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", | ||
"requiresBootstrapStackVersion": 6, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", | ||
"additionalDependencies": [ | ||
"apiDefaultTestDeployAssert018781F2.assets" | ||
], | ||
"lookupRole": { | ||
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", | ||
"requiresBootstrapStackVersion": 8, | ||
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" | ||
} | ||
}, | ||
"dependencies": [ | ||
"apiDefaultTestDeployAssert018781F2.assets" | ||
], | ||
"metadata": { | ||
"/api/DefaultTest/DeployAssert/BootstrapVersion": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "BootstrapVersion" | ||
} | ||
], | ||
"/api/DefaultTest/DeployAssert/CheckBootstrapVersion": [ | ||
{ | ||
"type": "aws:cdk:logicalId", | ||
"data": "CheckBootstrapVersion" | ||
} | ||
] | ||
}, | ||
"displayName": "api/DefaultTest/DeployAssert" | ||
}, | ||
"Tree": { | ||
"type": "cdk:tree", | ||
"properties": { | ||
"file": "tree.json" | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...ework-integ/test/aws-appsync/test/integ.appsync-eventbridge.js.snapshot/stack.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "31.0.0", | ||
"files": { | ||
"48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f": { | ||
"source": { | ||
"path": "stack.template.json", | ||
"packaging": "file" | ||
}, | ||
"destinations": { | ||
"current_account-current_region": { | ||
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", | ||
"objectKey": "48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f.json", | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" | ||
} | ||
} | ||
} | ||
}, | ||
"dockerImages": {} | ||
} |
Oops, something went wrong.