Skip to content

Commit 6548a95

Browse files
Added SerializedRequestEntityTooLargeException to Lambda Invoke API
1 parent ad54268 commit 6548a95

17 files changed

+511
-44
lines changed

generator/ServiceModels/lambda/lambda-2015-03-31.api.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@
611611
{"shape":"RequestTooLargeException"},
612612
{"shape":"KMSDisabledException"},
613613
{"shape":"UnsupportedMediaTypeException"},
614+
{"shape":"SerializedRequestEntityTooLargeException"},
614615
{"shape":"InvalidRuntimeException"},
615616
{"shape":"EC2UnexpectedException"},
616617
{"shape":"InvalidSubnetIDException"},
@@ -671,6 +672,7 @@
671672
{"shape":"RequestTooLargeException"},
672673
{"shape":"KMSDisabledException"},
673674
{"shape":"UnsupportedMediaTypeException"},
675+
{"shape":"SerializedRequestEntityTooLargeException"},
674676
{"shape":"InvalidRuntimeException"},
675677
{"shape":"EC2UnexpectedException"},
676678
{"shape":"InvalidSubnetIDException"},
@@ -4348,6 +4350,18 @@
43484350
"type":"string",
43494351
"sensitive":true
43504352
},
4353+
"SerializedRequestEntityTooLargeException":{
4354+
"type":"structure",
4355+
"members":{
4356+
"Type":{"shape":"String"},
4357+
"message":{"shape":"String"}
4358+
},
4359+
"error":{
4360+
"httpStatusCode":413,
4361+
"senderFault":true
4362+
},
4363+
"exception":true
4364+
},
43514365
"ServiceException":{
43524366
"type":"structure",
43534367
"members":{

generator/ServiceModels/lambda/lambda-2015-03-31.docs.json

Lines changed: 13 additions & 7 deletions
Large diffs are not rendered by default.

generator/ServiceModels/lambda/lambda-2015-03-31.normal.json

Lines changed: 25 additions & 7 deletions
Large diffs are not rendered by default.

generator/ServiceModels/lambda/lambda-2015-03-31.smoke2.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"version" : 2,
33
"testCases" : [ {
4-
"id" : "ListFunctionsSuccess",
5-
"operationName" : "ListFunctions",
6-
"input" : { },
4+
"id" : "ErrorInvalidFunctionName",
5+
"operationName" : "Invoke",
6+
"input" : {
7+
"FunctionName" : "bogus-function"
8+
},
79
"expectation" : {
8-
"success" : { }
10+
"failure" : {
11+
"errorId" : "ResourceNotFoundException"
12+
}
913
},
1014
"config" : {
1115
"region" : "us-west-2",
@@ -14,15 +18,11 @@
1418
"useAccountIdRouting" : true
1519
}
1620
}, {
17-
"id" : "ErrorInvalidFunctionName",
18-
"operationName" : "Invoke",
19-
"input" : {
20-
"FunctionName" : "bogus-function"
21-
},
21+
"id" : "ListFunctionsSuccess",
22+
"operationName" : "ListFunctions",
23+
"input" : { },
2224
"expectation" : {
23-
"failure" : {
24-
"errorId" : "ResourceNotFoundException"
25-
}
25+
"success" : { }
2626
},
2727
"config" : {
2828
"region" : "us-west-2",

sdk/src/Services/Lambda/Generated/Model/AddPermissionRequest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ internal bool IsSetFunctionUrlAuthType()
176176
/// <summary>
177177
/// Gets and sets the property InvokedViaFunctionUrl.
178178
/// <para>
179-
/// Restricts the <c>lambda:InvokeFunction</c> action to calls coming from a function
180-
/// URL. When set to <c>true</c>, this prevents the principal from invoking the function
181-
/// by any means other than the function URL. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html">Control
179+
/// Restricts the <c>lambda:InvokeFunction</c> action to function URL calls. When set
180+
/// to <c>true</c>, this prevents the principal from invoking the function by any means
181+
/// other than the function URL. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html">Control
182182
/// access to Lambda function URLs</a>.
183183
/// </para>
184184
/// </summary>

sdk/src/Services/Lambda/Generated/Model/DeleteFunctionRequest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ namespace Amazon.Lambda.Model
3535
/// parameter. Otherwise, all versions and aliases are deleted. This doesn't require the
3636
/// user to have explicit permissions for <a>DeleteAlias</a>.
3737
///
38-
///
38+
/// <note>
39+
/// <para>
40+
/// A deleted Lambda function cannot be recovered. Ensure that you specify the correct
41+
/// function name and version before deleting.
42+
/// </para>
43+
/// </note>
3944
/// <para>
4045
/// To delete Lambda event source mappings that invoke a function, use <a>DeleteEventSourceMapping</a>.
4146
/// For Amazon Web Services services and resources that invoke your function directly,

sdk/src/Services/Lambda/Generated/Model/Internal/MarshallTransformations/InvokeResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
175175
{
176176
return ResourceNotReadyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
177177
}
178+
if (errorResponse.Code != null && errorResponse.Code.Equals("SerializedRequestEntityTooLargeException"))
179+
{
180+
return SerializedRequestEntityTooLargeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
181+
}
178182
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceException"))
179183
{
180184
return ServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);

sdk/src/Services/Lambda/Generated/Model/Internal/MarshallTransformations/InvokeWithResponseStreamResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ public override AmazonServiceException UnmarshallException(JsonUnmarshallerConte
169169
{
170170
return ResourceNotReadyExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
171171
}
172+
if (errorResponse.Code != null && errorResponse.Code.Equals("SerializedRequestEntityTooLargeException"))
173+
{
174+
return SerializedRequestEntityTooLargeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
175+
}
172176
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceException"))
173177
{
174178
return ServiceExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse, ref readerCopy);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the lambda-2015-03-31.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Net;
24+
using System.Text;
25+
using System.Xml.Serialization;
26+
27+
using Amazon.Lambda.Model;
28+
using Amazon.Runtime;
29+
using Amazon.Runtime.Internal;
30+
using Amazon.Runtime.Internal.Transform;
31+
using Amazon.Runtime.Internal.Util;
32+
using System.Text.Json;
33+
using Amazon.Util;
34+
#pragma warning disable CS0612,CS0618
35+
namespace Amazon.Lambda.Model.Internal.MarshallTransformations
36+
{
37+
/// <summary>
38+
/// Response Unmarshaller for SerializedRequestEntityTooLargeException Object
39+
/// </summary>
40+
public class SerializedRequestEntityTooLargeExceptionUnmarshaller : IJsonErrorResponseUnmarshaller<SerializedRequestEntityTooLargeException, JsonUnmarshallerContext>
41+
{
42+
/// <summary>
43+
/// Unmarshaller the response from the service to the response class.
44+
/// </summary>
45+
/// <param name="context"></param>
46+
/// <param name="reader"></param>
47+
/// <returns></returns>
48+
public SerializedRequestEntityTooLargeException Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
49+
{
50+
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse(), ref reader);
51+
}
52+
53+
/// <summary>
54+
/// Unmarshaller the response from the service to the response class.
55+
/// </summary>
56+
/// <param name="context"></param>
57+
/// <param name="errorResponse"></param>
58+
/// <param name="reader"></param>
59+
/// <returns></returns>
60+
public SerializedRequestEntityTooLargeException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse, ref StreamingUtf8JsonReader reader)
61+
{
62+
if (context.Stream.Length > 0)
63+
{
64+
context.Read(ref reader);
65+
}
66+
67+
SerializedRequestEntityTooLargeException unmarshalledObject = new SerializedRequestEntityTooLargeException(errorResponse.Message, errorResponse.InnerException,
68+
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
69+
70+
int targetDepth = context.CurrentDepth;
71+
if (context.Stream.Length > 0)
72+
{
73+
while (context.ReadAtDepth(targetDepth, ref reader))
74+
{
75+
if (context.TestExpression("Type", targetDepth))
76+
{
77+
var unmarshaller = StringUnmarshaller.Instance;
78+
unmarshalledObject.Type = unmarshaller.Unmarshall(context, ref reader);
79+
continue;
80+
}
81+
}
82+
}
83+
84+
return unmarshalledObject;
85+
}
86+
87+
private static SerializedRequestEntityTooLargeExceptionUnmarshaller _instance = new SerializedRequestEntityTooLargeExceptionUnmarshaller();
88+
89+
/// <summary>
90+
/// Gets the singleton.
91+
/// </summary>
92+
public static SerializedRequestEntityTooLargeExceptionUnmarshaller Instance
93+
{
94+
get
95+
{
96+
return _instance;
97+
}
98+
}
99+
}
100+
}

sdk/src/Services/Lambda/Generated/Model/InvokeRequest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ namespace Amazon.Lambda.Model
3939
///
4040
///
4141
/// <para>
42+
/// For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations,
43+
/// the maximum payload size is 1 MB.
44+
/// </para>
45+
///
46+
/// <para>
4247
/// For <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html">synchronous
4348
/// invocation</a>, details about the function response, including errors, are included
4449
/// in the response body and headers. For either invocation type, you can find more information
@@ -217,7 +222,8 @@ internal bool IsSetLogType()
217222
/// <summary>
218223
/// Gets and sets the property PayloadStream.
219224
/// <para>
220-
/// The JSON that you want to provide to your Lambda function as input.
225+
/// The JSON that you want to provide to your Lambda function as input. The maximum payload
226+
/// size is 6 MB for synchronous invocations and 1 MB for asynchronous invocations.
221227
/// </para>
222228
///
223229
/// <para>

0 commit comments

Comments
 (0)