@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class LambdaAuthorizerConfig extends Object implements Serializable, Cloneable, StructuredPojo
A LambdaAuthorizerConfig specifies how to authorize AppSync API access when using the
AWS_LAMBDA authorizer mode. Be aware that an AppSync API can have only one Lambda authorizer configured
at a time.
| Constructor and Description |
|---|
LambdaAuthorizerConfig() |
| Modifier and Type | Method and Description |
|---|---|
LambdaAuthorizerConfig |
clone() |
boolean |
equals(Object obj) |
Integer |
getAuthorizerResultTtlInSeconds()
The number of seconds a response should be cached for.
|
String |
getAuthorizerUri()
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization.
|
String |
getIdentityValidationExpression()
A regular expression for validation of tokens before the Lambda function is called.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setAuthorizerResultTtlInSeconds(Integer authorizerResultTtlInSeconds)
The number of seconds a response should be cached for.
|
void |
setAuthorizerUri(String authorizerUri)
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization.
|
void |
setIdentityValidationExpression(String identityValidationExpression)
A regular expression for validation of tokens before the Lambda function is called.
|
String |
toString()
Returns a string representation of this object.
|
LambdaAuthorizerConfig |
withAuthorizerResultTtlInSeconds(Integer authorizerResultTtlInSeconds)
The number of seconds a response should be cached for.
|
LambdaAuthorizerConfig |
withAuthorizerUri(String authorizerUri)
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization.
|
LambdaAuthorizerConfig |
withIdentityValidationExpression(String identityValidationExpression)
A regular expression for validation of tokens before the Lambda function is called.
|
public void setAuthorizerResultTtlInSeconds(Integer authorizerResultTtlInSeconds)
The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda
function can override this by returning a ttlOverride key in its response. A value of 0 disables
caching of responses.
authorizerResultTtlInSeconds - The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda
function can override this by returning a ttlOverride key in its response. A value of 0
disables caching of responses.public Integer getAuthorizerResultTtlInSeconds()
The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda
function can override this by returning a ttlOverride key in its response. A value of 0 disables
caching of responses.
ttlOverride key in its response. A value of 0
disables caching of responses.public LambdaAuthorizerConfig withAuthorizerResultTtlInSeconds(Integer authorizerResultTtlInSeconds)
The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda
function can override this by returning a ttlOverride key in its response. A value of 0 disables
caching of responses.
authorizerResultTtlInSeconds - The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda
function can override this by returning a ttlOverride key in its response. A value of 0
disables caching of responses.public void setAuthorizerUri(String authorizerUri)
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard
Lambda ARN, a version ARN (.../v3), or an alias ARN.
Note: 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:
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
authorizerUri - The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a
standard Lambda ARN, a version ARN (.../v3), or an alias ARN.
Note: 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:
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
public String getAuthorizerUri()
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard
Lambda ARN, a version ARN (.../v3), or an alias ARN.
Note: 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:
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
.../v3), or an alias ARN.
Note: 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:
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
public LambdaAuthorizerConfig withAuthorizerUri(String authorizerUri)
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard
Lambda ARN, a version ARN (.../v3), or an alias ARN.
Note: 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:
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
authorizerUri - The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a
standard Lambda ARN, a version ARN (.../v3), or an alias ARN.
Note: 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:
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
public void setIdentityValidationExpression(String identityValidationExpression)
A regular expression for validation of tokens before the Lambda function is called.
identityValidationExpression - A regular expression for validation of tokens before the Lambda function is called.public String getIdentityValidationExpression()
A regular expression for validation of tokens before the Lambda function is called.
public LambdaAuthorizerConfig withIdentityValidationExpression(String identityValidationExpression)
A regular expression for validation of tokens before the Lambda function is called.
identityValidationExpression - A regular expression for validation of tokens before the Lambda function is called.public String toString()
toString in class ObjectObject.toString()public LambdaAuthorizerConfig clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2022. All rights reserved.