Skip to content

Commit a0ad49d

Browse files
authored
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*
1 parent 96bb8ce commit a0ad49d

14 files changed

+1088
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
schema {
2+
query: Query
3+
mutation: Mutation
4+
}
5+
6+
type Query {
7+
event(id:ID!): Event
8+
}
9+
10+
type Mutation {
11+
emitEvent(id: ID!, name: String): PutEventsResult!
12+
}
13+
14+
type Event {
15+
id: ID!
16+
name: String!
17+
}
18+
19+
type Entry {
20+
ErrorCode: String
21+
ErrorMessage: String
22+
EventId: String
23+
}
24+
25+
type PutEventsResult {
26+
Entries: [Entry!]
27+
FailedEntry: Int
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5+
"source": {
6+
"path": "apiDefaultTestDeployAssert018781F2.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"Parameters": {
3+
"BootstrapVersion": {
4+
"Type": "AWS::SSM::Parameter::Value<String>",
5+
"Default": "/cdk-bootstrap/hnb659fds/version",
6+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7+
}
8+
},
9+
"Rules": {
10+
"CheckBootstrapVersion": {
11+
"Assertions": [
12+
{
13+
"Assert": {
14+
"Fn::Not": [
15+
{
16+
"Fn::Contains": [
17+
[
18+
"1",
19+
"2",
20+
"3",
21+
"4",
22+
"5"
23+
],
24+
{
25+
"Ref": "BootstrapVersion"
26+
}
27+
]
28+
}
29+
]
30+
},
31+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32+
}
33+
]
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"31.0.0"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "31.0.0",
3+
"testCases": {
4+
"api/DefaultTest": {
5+
"stacks": [
6+
"stack"
7+
],
8+
"assertionStack": "api/DefaultTest/DeployAssert",
9+
"assertionStackName": "apiDefaultTestDeployAssert018781F2"
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
{
2+
"version": "31.0.0",
3+
"artifacts": {
4+
"stack.assets": {
5+
"type": "cdk:asset-manifest",
6+
"properties": {
7+
"file": "stack.assets.json",
8+
"requiresBootstrapStackVersion": 6,
9+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
10+
}
11+
},
12+
"stack": {
13+
"type": "aws:cloudformation:stack",
14+
"environment": "aws://unknown-account/unknown-region",
15+
"properties": {
16+
"templateFile": "stack.template.json",
17+
"validateOnSynth": false,
18+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
19+
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f.json",
21+
"requiresBootstrapStackVersion": 6,
22+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
23+
"additionalDependencies": [
24+
"stack.assets"
25+
],
26+
"lookupRole": {
27+
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
28+
"requiresBootstrapStackVersion": 8,
29+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
30+
}
31+
},
32+
"dependencies": [
33+
"stack.assets"
34+
],
35+
"metadata": {
36+
"/stack/EventBridgeApi/Resource": [
37+
{
38+
"type": "aws:cdk:logicalId",
39+
"data": "EventBridgeApi398AE60D"
40+
}
41+
],
42+
"/stack/EventBridgeApi/Schema": [
43+
{
44+
"type": "aws:cdk:logicalId",
45+
"data": "EventBridgeApiSchema535E9664"
46+
}
47+
],
48+
"/stack/EventBridgeApi/DefaultApiKey": [
49+
{
50+
"type": "aws:cdk:logicalId",
51+
"data": "EventBridgeApiDefaultApiKeyC757E0EA"
52+
}
53+
],
54+
"/stack/EventBridgeApi/EventBridgeDs/ServiceRole/Resource": [
55+
{
56+
"type": "aws:cdk:logicalId",
57+
"data": "EventBridgeApiEventBridgeDsServiceRoleF433388F"
58+
}
59+
],
60+
"/stack/EventBridgeApi/EventBridgeDs/ServiceRole/DefaultPolicy/Resource": [
61+
{
62+
"type": "aws:cdk:logicalId",
63+
"data": "EventBridgeApiEventBridgeDsServiceRoleDefaultPolicyF1047C06"
64+
}
65+
],
66+
"/stack/EventBridgeApi/EventBridgeDs/Resource": [
67+
{
68+
"type": "aws:cdk:logicalId",
69+
"data": "EventBridgeApiEventBridgeDs3E3BC289"
70+
}
71+
],
72+
"/stack/EventBridgeApi/EventResolver/Resource": [
73+
{
74+
"type": "aws:cdk:logicalId",
75+
"data": "EventBridgeApiEventResolverD968F6C6"
76+
}
77+
],
78+
"/stack/DestinationEventBus/Resource": [
79+
{
80+
"type": "aws:cdk:logicalId",
81+
"data": "DestinationEventBus776315F0"
82+
}
83+
],
84+
"/stack/BootstrapVersion": [
85+
{
86+
"type": "aws:cdk:logicalId",
87+
"data": "BootstrapVersion"
88+
}
89+
],
90+
"/stack/CheckBootstrapVersion": [
91+
{
92+
"type": "aws:cdk:logicalId",
93+
"data": "CheckBootstrapVersion"
94+
}
95+
]
96+
},
97+
"displayName": "stack"
98+
},
99+
"apiDefaultTestDeployAssert018781F2.assets": {
100+
"type": "cdk:asset-manifest",
101+
"properties": {
102+
"file": "apiDefaultTestDeployAssert018781F2.assets.json",
103+
"requiresBootstrapStackVersion": 6,
104+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
105+
}
106+
},
107+
"apiDefaultTestDeployAssert018781F2": {
108+
"type": "aws:cloudformation:stack",
109+
"environment": "aws://unknown-account/unknown-region",
110+
"properties": {
111+
"templateFile": "apiDefaultTestDeployAssert018781F2.template.json",
112+
"validateOnSynth": false,
113+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
114+
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
115+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
116+
"requiresBootstrapStackVersion": 6,
117+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
118+
"additionalDependencies": [
119+
"apiDefaultTestDeployAssert018781F2.assets"
120+
],
121+
"lookupRole": {
122+
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
123+
"requiresBootstrapStackVersion": 8,
124+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
125+
}
126+
},
127+
"dependencies": [
128+
"apiDefaultTestDeployAssert018781F2.assets"
129+
],
130+
"metadata": {
131+
"/api/DefaultTest/DeployAssert/BootstrapVersion": [
132+
{
133+
"type": "aws:cdk:logicalId",
134+
"data": "BootstrapVersion"
135+
}
136+
],
137+
"/api/DefaultTest/DeployAssert/CheckBootstrapVersion": [
138+
{
139+
"type": "aws:cdk:logicalId",
140+
"data": "CheckBootstrapVersion"
141+
}
142+
]
143+
},
144+
"displayName": "api/DefaultTest/DeployAssert"
145+
},
146+
"Tree": {
147+
"type": "cdk:tree",
148+
"properties": {
149+
"file": "tree.json"
150+
}
151+
}
152+
}
153+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "31.0.0",
3+
"files": {
4+
"48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f": {
5+
"source": {
6+
"path": "stack.template.json",
7+
"packaging": "file"
8+
},
9+
"destinations": {
10+
"current_account-current_region": {
11+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12+
"objectKey": "48b6d0709cf46b7d6a28cd05baf38e498017a3fc758be4af72c8dd16419baa5f.json",
13+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14+
}
15+
}
16+
}
17+
},
18+
"dockerImages": {}
19+
}

0 commit comments

Comments
 (0)