Skip to content

Commit 6d2f730

Browse files
feat(aws-android-sdk-lambda): update models to latest (#3341)
Co-authored-by: Erica Eaton <[email protected]>
1 parent 8887f19 commit 6d2f730

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

aws-android-sdk-lambda/src/main/java/com/amazonaws/services/lambda/AWSLambda.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ public interface AWSLambda {
290290
* @throws InvalidRuntimeException
291291
* @throws ResourceConflictException
292292
* @throws ResourceNotReadyException
293+
* @throws RecursiveInvocationException
293294
* @throws AmazonClientException If any internal errors are encountered
294295
* inside the client while attempting to make the request or
295296
* handle the response. For example if a network connection is

aws-android-sdk-lambda/src/main/java/com/amazonaws/services/lambda/AWSLambdaClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ private void init() {
449449
jsonErrorUnmarshallers.add(new KMSDisabledExceptionUnmarshaller());
450450
jsonErrorUnmarshallers.add(new KMSInvalidStateExceptionUnmarshaller());
451451
jsonErrorUnmarshallers.add(new KMSNotFoundExceptionUnmarshaller());
452+
jsonErrorUnmarshallers.add(new RecursiveInvocationExceptionUnmarshaller());
452453
jsonErrorUnmarshallers.add(new RequestTooLargeExceptionUnmarshaller());
453454
jsonErrorUnmarshallers.add(new ResourceConflictExceptionUnmarshaller());
454455
jsonErrorUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller());
@@ -576,6 +577,7 @@ private static ClientConfiguration adjustClientConfiguration(ClientConfiguration
576577
* @throws InvalidRuntimeException
577578
* @throws ResourceConflictException
578579
* @throws ResourceNotReadyException
580+
* @throws RecursiveInvocationException
579581
* @throws AmazonClientException If any internal errors are encountered
580582
* inside the client while attempting to make the request or
581583
* handle the response. For example if a network connection is
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Copyright 2010-2023 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+
package com.amazonaws.services.lambda.model;
17+
18+
import com.amazonaws.AmazonServiceException;
19+
20+
/**
21+
* <p>
22+
* Lambda has detected your function being invoked in a recursive loop with
23+
* other Amazon Web Services resources and stopped your function's invocation.
24+
* </p>
25+
*/
26+
public class RecursiveInvocationException extends AmazonServiceException {
27+
private static final long serialVersionUID = 1L;
28+
29+
/**
30+
* <p>
31+
* The exception type.
32+
* </p>
33+
*/
34+
private String type;
35+
36+
/**
37+
* Constructs a new RecursiveInvocationException with the specified error
38+
* message.
39+
*
40+
* @param message Describes the error encountered.
41+
*/
42+
public RecursiveInvocationException(String message) {
43+
super(message);
44+
}
45+
46+
/**
47+
* <p>
48+
* The exception type.
49+
* </p>
50+
*
51+
* @return <p>
52+
* The exception type.
53+
* </p>
54+
*/
55+
public String getType() {
56+
return type;
57+
}
58+
59+
/**
60+
* <p>
61+
* The exception type.
62+
* </p>
63+
*
64+
* @param type <p>
65+
* The exception type.
66+
* </p>
67+
*/
68+
public void setType(String type) {
69+
this.type = type;
70+
}
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2010-2023 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+
package com.amazonaws.services.lambda.model.transform;
17+
18+
import com.amazonaws.AmazonServiceException;
19+
import com.amazonaws.http.JsonErrorResponseHandler.JsonErrorResponse;
20+
import com.amazonaws.transform.JsonErrorUnmarshaller;
21+
import com.amazonaws.services.lambda.model.RecursiveInvocationException;
22+
23+
public class RecursiveInvocationExceptionUnmarshaller extends JsonErrorUnmarshaller {
24+
25+
public RecursiveInvocationExceptionUnmarshaller() {
26+
super(RecursiveInvocationException.class);
27+
}
28+
29+
@Override
30+
public boolean match(JsonErrorResponse error) throws Exception {
31+
return error.getErrorCode().equals("RecursiveInvocationException");
32+
}
33+
34+
@Override
35+
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
36+
37+
RecursiveInvocationException e = (RecursiveInvocationException) super.unmarshall(error);
38+
e.setErrorCode("RecursiveInvocationException");
39+
e.setType(String.valueOf(error.get("Type")));
40+
41+
return e;
42+
}
43+
}

0 commit comments

Comments
 (0)