Skip to content

Commit 2bb5b07

Browse files
Add data source support to Event APIs
1 parent 648fb8f commit 2bb5b07

22 files changed

+1341
-4
lines changed

generator/ServiceModels/appsync/appsync-2017-07-25.api.json

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,8 @@
15301530
"tags":{"shape":"TagMap"},
15311531
"channelNamespaceArn":{"shape":"String"},
15321532
"created":{"shape":"Timestamp"},
1533-
"lastModified":{"shape":"Timestamp"}
1533+
"lastModified":{"shape":"Timestamp"},
1534+
"handlerConfigs":{"shape":"HandlerConfigs"}
15341535
}
15351536
},
15361537
"ChannelNamespaces":{
@@ -1706,7 +1707,8 @@
17061707
"subscribeAuthModes":{"shape":"AuthModes"},
17071708
"publishAuthModes":{"shape":"AuthModes"},
17081709
"codeHandlers":{"shape":"Code"},
1709-
"tags":{"shape":"TagMap"}
1710+
"tags":{"shape":"TagMap"},
1711+
"handlerConfigs":{"shape":"HandlerConfigs"}
17101712
}
17111713
},
17121714
"CreateChannelNamespaceResponse":{
@@ -2959,13 +2961,46 @@
29592961
"type":"list",
29602962
"member":{"shape":"GraphqlApi"}
29612963
},
2964+
"HandlerBehavior":{
2965+
"type":"string",
2966+
"enum":[
2967+
"CODE",
2968+
"DIRECT"
2969+
]
2970+
},
2971+
"HandlerConfig":{
2972+
"type":"structure",
2973+
"required":[
2974+
"behavior",
2975+
"integration"
2976+
],
2977+
"members":{
2978+
"behavior":{"shape":"HandlerBehavior"},
2979+
"integration":{"shape":"Integration"}
2980+
}
2981+
},
2982+
"HandlerConfigs":{
2983+
"type":"structure",
2984+
"members":{
2985+
"onPublish":{"shape":"HandlerConfig"},
2986+
"onSubscribe":{"shape":"HandlerConfig"}
2987+
}
2988+
},
29622989
"HttpDataSourceConfig":{
29632990
"type":"structure",
29642991
"members":{
29652992
"endpoint":{"shape":"String"},
29662993
"authorizationConfig":{"shape":"AuthorizationConfig"}
29672994
}
29682995
},
2996+
"Integration":{
2997+
"type":"structure",
2998+
"required":["dataSourceName"],
2999+
"members":{
3000+
"dataSourceName":{"shape":"String"},
3001+
"lambdaConfig":{"shape":"LambdaConfig"}
3002+
}
3003+
},
29693004
"InternalFailureException":{
29703005
"type":"structure",
29713006
"members":{
@@ -2975,6 +3010,13 @@
29753010
"exception":true,
29763011
"fault":true
29773012
},
3013+
"InvokeType":{
3014+
"type":"string",
3015+
"enum":[
3016+
"REQUEST_RESPONSE",
3017+
"EVENT"
3018+
]
3019+
},
29783020
"LambdaAuthorizerConfig":{
29793021
"type":"structure",
29803022
"required":["authorizerUri"],
@@ -2984,6 +3026,12 @@
29843026
"identityValidationExpression":{"shape":"String"}
29853027
}
29863028
},
3029+
"LambdaConfig":{
3030+
"type":"structure",
3031+
"members":{
3032+
"invokeType":{"shape":"InvokeType"}
3033+
}
3034+
},
29873035
"LambdaConflictHandlerConfig":{
29883036
"type":"structure",
29893037
"members":{
@@ -4000,7 +4048,8 @@
40004048
},
40014049
"subscribeAuthModes":{"shape":"AuthModes"},
40024050
"publishAuthModes":{"shape":"AuthModes"},
4003-
"codeHandlers":{"shape":"Code"}
4051+
"codeHandlers":{"shape":"Code"},
4052+
"handlerConfigs":{"shape":"HandlerConfigs"}
40044053
}
40054054
},
40064055
"UpdateChannelNamespaceResponse":{

generator/ServiceModels/appsync/appsync-2017-07-25.docs.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,27 @@
12211221
"ListGraphqlApisResponse$graphqlApis": "<p>The <code>GraphqlApi</code> objects.</p>"
12221222
}
12231223
},
1224+
"HandlerBehavior": {
1225+
"base": null,
1226+
"refs": {
1227+
"HandlerConfig$behavior": "<p>The behavior for the handler.</p>"
1228+
}
1229+
},
1230+
"HandlerConfig": {
1231+
"base": "<p>The configuration for a handler.</p>",
1232+
"refs": {
1233+
"HandlerConfigs$onPublish": "<p>The configuration for the <code>OnPublish</code> handler.</p>",
1234+
"HandlerConfigs$onSubscribe": "<p>The configuration for the <code>OnSubscribe</code> handler.</p>"
1235+
}
1236+
},
1237+
"HandlerConfigs": {
1238+
"base": "<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>",
1239+
"refs": {
1240+
"ChannelNamespace$handlerConfigs": "<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>",
1241+
"CreateChannelNamespaceRequest$handlerConfigs": "<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>",
1242+
"UpdateChannelNamespaceRequest$handlerConfigs": "<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>"
1243+
}
1244+
},
12241245
"HttpDataSourceConfig": {
12251246
"base": "<p>Describes an HTTP data source configuration.</p>",
12261247
"refs": {
@@ -1229,11 +1250,23 @@
12291250
"UpdateDataSourceRequest$httpConfig": "<p>The new HTTP endpoint configuration.</p>"
12301251
}
12311252
},
1253+
"Integration": {
1254+
"base": "<p>The integration data source configuration for the handler.</p>",
1255+
"refs": {
1256+
"HandlerConfig$integration": "<p>The integration data source configuration for the handler.</p>"
1257+
}
1258+
},
12321259
"InternalFailureException": {
12331260
"base": "<p>An internal AppSync error occurred. Try your request again.</p>",
12341261
"refs": {
12351262
}
12361263
},
1264+
"InvokeType": {
1265+
"base": null,
1266+
"refs": {
1267+
"LambdaConfig$invokeType": "<p>The invocation type for a Lambda data source.</p>"
1268+
}
1269+
},
12371270
"LambdaAuthorizerConfig": {
12381271
"base": "<p>A <code>LambdaAuthorizerConfig</code> specifies how to authorize AppSync API access when using the <code>AWS_LAMBDA</code> authorizer mode. Be aware that an AppSync API can have only one Lambda authorizer configured at a time.</p>",
12391272
"refs": {
@@ -1244,6 +1277,12 @@
12441277
"UpdateGraphqlApiRequest$lambdaAuthorizerConfig": "<p>Configuration for Lambda function authorization.</p>"
12451278
}
12461279
},
1280+
"LambdaConfig": {
1281+
"base": "<p>The configuration for a Lambda data source.</p>",
1282+
"refs": {
1283+
"Integration$lambdaConfig": "<p>The configuration for a Lambda data source.</p>"
1284+
}
1285+
},
12471286
"LambdaConflictHandlerConfig": {
12481287
"base": "<p>The <code>LambdaConflictHandlerConfig</code> object when configuring <code>LAMBDA</code> as the Conflict Handler.</p>",
12491288
"refs": {
@@ -1955,6 +1994,7 @@
19551994
"GraphqlApi$owner": "<p>The account owner of the GraphQL API.</p>",
19561995
"GraphqlApi$ownerContact": "<p>The owner contact information for an API resource.</p> <p>This field accepts any string input with a length of 0 - 256 characters.</p>",
19571996
"HttpDataSourceConfig$endpoint": "<p>The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.</p>",
1997+
"Integration$dataSourceName": "<p>The unique name of the data source that has been configured on the API.</p>",
19581998
"InternalFailureException$message": null,
19591999
"LambdaAuthorizerConfig$authorizerUri": "<p>The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (<code>.../v3</code>), or an alias ARN. </p> <p> <b>Note</b>: This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:</p> <p> <code>aws lambda add-permission --function-name \"arn:aws:lambda:us-east-2:111122223333:function:my-function\" --statement-id \"appsync\" --principal appsync.amazonaws.com --action lambda:InvokeFunction</code> </p>",
19602000
"LambdaAuthorizerConfig$identityValidationExpression": "<p>A regular expression for validation of tokens before the Lambda function is called.</p>",

generator/ServiceModels/appsync/appsync-2017-07-25.normal.json

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,10 @@
17991799
"lastModified":{
18001800
"shape":"Timestamp",
18011801
"documentation":"<p>The date and time that the <code>ChannelNamespace</code> was last changed.</p>"
1802+
},
1803+
"handlerConfigs":{
1804+
"shape":"HandlerConfigs",
1805+
"documentation":"<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>"
18021806
}
18031807
},
18041808
"documentation":"<p>Describes a channel namespace associated with an <code>Api</code>. The <code>ChannelNamespace</code> contains the definitions for code handlers for the <code>Api</code>.</p>"
@@ -2077,7 +2081,11 @@
20772081
"shape":"Code",
20782082
"documentation":"<p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>"
20792083
},
2080-
"tags":{"shape":"TagMap"}
2084+
"tags":{"shape":"TagMap"},
2085+
"handlerConfigs":{
2086+
"shape":"HandlerConfigs",
2087+
"documentation":"<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>"
2088+
}
20812089
}
20822090
},
20832091
"CreateChannelNamespaceResponse":{
@@ -3978,6 +3986,45 @@
39783986
"type":"list",
39793987
"member":{"shape":"GraphqlApi"}
39803988
},
3989+
"HandlerBehavior":{
3990+
"type":"string",
3991+
"enum":[
3992+
"CODE",
3993+
"DIRECT"
3994+
]
3995+
},
3996+
"HandlerConfig":{
3997+
"type":"structure",
3998+
"required":[
3999+
"behavior",
4000+
"integration"
4001+
],
4002+
"members":{
4003+
"behavior":{
4004+
"shape":"HandlerBehavior",
4005+
"documentation":"<p>The behavior for the handler.</p>"
4006+
},
4007+
"integration":{
4008+
"shape":"Integration",
4009+
"documentation":"<p>The integration data source configuration for the handler.</p>"
4010+
}
4011+
},
4012+
"documentation":"<p>The configuration for a handler.</p>"
4013+
},
4014+
"HandlerConfigs":{
4015+
"type":"structure",
4016+
"members":{
4017+
"onPublish":{
4018+
"shape":"HandlerConfig",
4019+
"documentation":"<p>The configuration for the <code>OnPublish</code> handler.</p>"
4020+
},
4021+
"onSubscribe":{
4022+
"shape":"HandlerConfig",
4023+
"documentation":"<p>The configuration for the <code>OnSubscribe</code> handler.</p>"
4024+
}
4025+
},
4026+
"documentation":"<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>"
4027+
},
39814028
"HttpDataSourceConfig":{
39824029
"type":"structure",
39834030
"members":{
@@ -3992,6 +4039,21 @@
39924039
},
39934040
"documentation":"<p>Describes an HTTP data source configuration.</p>"
39944041
},
4042+
"Integration":{
4043+
"type":"structure",
4044+
"required":["dataSourceName"],
4045+
"members":{
4046+
"dataSourceName":{
4047+
"shape":"String",
4048+
"documentation":"<p>The unique name of the data source that has been configured on the API.</p>"
4049+
},
4050+
"lambdaConfig":{
4051+
"shape":"LambdaConfig",
4052+
"documentation":"<p>The configuration for a Lambda data source.</p>"
4053+
}
4054+
},
4055+
"documentation":"<p>The integration data source configuration for the handler.</p>"
4056+
},
39954057
"InternalFailureException":{
39964058
"type":"structure",
39974059
"members":{
@@ -4002,6 +4064,13 @@
40024064
"exception":true,
40034065
"fault":true
40044066
},
4067+
"InvokeType":{
4068+
"type":"string",
4069+
"enum":[
4070+
"REQUEST_RESPONSE",
4071+
"EVENT"
4072+
]
4073+
},
40054074
"LambdaAuthorizerConfig":{
40064075
"type":"structure",
40074076
"required":["authorizerUri"],
@@ -4021,6 +4090,16 @@
40214090
},
40224091
"documentation":"<p>A <code>LambdaAuthorizerConfig</code> specifies how to authorize AppSync API access when using the <code>AWS_LAMBDA</code> authorizer mode. Be aware that an AppSync API can have only one Lambda authorizer configured at a time.</p>"
40234092
},
4093+
"LambdaConfig":{
4094+
"type":"structure",
4095+
"members":{
4096+
"invokeType":{
4097+
"shape":"InvokeType",
4098+
"documentation":"<p>The invocation type for a Lambda data source.</p>"
4099+
}
4100+
},
4101+
"documentation":"<p>The configuration for a Lambda data source.</p>"
4102+
},
40244103
"LambdaConflictHandlerConfig":{
40254104
"type":"structure",
40264105
"members":{
@@ -5451,6 +5530,10 @@
54515530
"codeHandlers":{
54525531
"shape":"Code",
54535532
"documentation":"<p>The event handler functions that run custom business logic to process published events and subscribe requests.</p>"
5533+
},
5534+
"handlerConfigs":{
5535+
"shape":"HandlerConfigs",
5536+
"documentation":"<p>The configuration for the <code>OnPublish</code> and <code>OnSubscribe</code> handlers.</p>"
54545537
}
54555538
}
54565539
},

sdk/src/Services/AppSync/Generated/Model/ChannelNamespace.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public partial class ChannelNamespace
3939
private string _channelNamespaceArn;
4040
private string _codeHandlers;
4141
private DateTime? _created;
42+
private HandlerConfigs _handlerConfigs;
4243
private DateTime? _lastModified;
4344
private string _name;
4445
private List<AuthMode> _publishAuthModes = AWSConfigs.InitializeCollections ? new List<AuthMode>() : null;
@@ -119,6 +120,24 @@ internal bool IsSetCreated()
119120
return this._created.HasValue;
120121
}
121122

123+
/// <summary>
124+
/// Gets and sets the property HandlerConfigs.
125+
/// <para>
126+
/// The configuration for the <c>OnPublish</c> and <c>OnSubscribe</c> handlers.
127+
/// </para>
128+
/// </summary>
129+
public HandlerConfigs HandlerConfigs
130+
{
131+
get { return this._handlerConfigs; }
132+
set { this._handlerConfigs = value; }
133+
}
134+
135+
// Check to see if HandlerConfigs property is set
136+
internal bool IsSetHandlerConfigs()
137+
{
138+
return this._handlerConfigs != null;
139+
}
140+
122141
/// <summary>
123142
/// Gets and sets the property LastModified.
124143
/// <para>

sdk/src/Services/AppSync/Generated/Model/CreateChannelNamespaceRequest.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class CreateChannelNamespaceRequest : AmazonAppSyncRequest
3737
{
3838
private string _apiId;
3939
private string _codeHandlers;
40+
private HandlerConfigs _handlerConfigs;
4041
private string _name;
4142
private List<AuthMode> _publishAuthModes = AWSConfigs.InitializeCollections ? new List<AuthMode>() : null;
4243
private List<AuthMode> _subscribeAuthModes = AWSConfigs.InitializeCollections ? new List<AuthMode>() : null;
@@ -81,6 +82,24 @@ internal bool IsSetCodeHandlers()
8182
return this._codeHandlers != null;
8283
}
8384

85+
/// <summary>
86+
/// Gets and sets the property HandlerConfigs.
87+
/// <para>
88+
/// The configuration for the <c>OnPublish</c> and <c>OnSubscribe</c> handlers.
89+
/// </para>
90+
/// </summary>
91+
public HandlerConfigs HandlerConfigs
92+
{
93+
get { return this._handlerConfigs; }
94+
set { this._handlerConfigs = value; }
95+
}
96+
97+
// Check to see if HandlerConfigs property is set
98+
internal bool IsSetHandlerConfigs()
99+
{
100+
return this._handlerConfigs != null;
101+
}
102+
84103
/// <summary>
85104
/// Gets and sets the property Name.
86105
/// <para>

0 commit comments

Comments
 (0)