Class CreateAuthorizerResult
- All Implemented Interfaces:
Serializable
,Cloneable
Represents an authorization layer for methods. If enabled on a method, API Gateway will activate the authorizer when a client calls the method.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Specifies the credentials required for the authorizer, if any.The TTL in seconds of cached authorizer results.[Required] Specifies the authorizer's Uniform Resource Identifier (URI).Optional customer-defined field, used in Swagger imports/exports.getId()
The identifier for the authorizer resource.[Required] The source of the identity in an incoming request.A validation expression for the incoming identity.getName()
[Required] The name of the authorizer.getType()
[Required] The type of the authorizer.int
hashCode()
void
setAuthorizerCredentials
(String authorizerCredentials) Specifies the credentials required for the authorizer, if any.void
setAuthorizerResultTtlInSeconds
(Integer authorizerResultTtlInSeconds) The TTL in seconds of cached authorizer results.void
setAuthorizerUri
(String authorizerUri) [Required] Specifies the authorizer's Uniform Resource Identifier (URI).void
setAuthType
(String authType) Optional customer-defined field, used in Swagger imports/exports.void
The identifier for the authorizer resource.void
setIdentitySource
(String identitySource) [Required] The source of the identity in an incoming request.void
setIdentityValidationExpression
(String identityValidationExpression) A validation expression for the incoming identity.void
[Required] The name of the authorizer.void
setType
(AuthorizerType type) [Required] The type of the authorizer.void
[Required] The type of the authorizer.toString()
Returns a string representation of this object; useful for testing and debugging.withAuthorizerCredentials
(String authorizerCredentials) Specifies the credentials required for the authorizer, if any.withAuthorizerResultTtlInSeconds
(Integer authorizerResultTtlInSeconds) The TTL in seconds of cached authorizer results.withAuthorizerUri
(String authorizerUri) [Required] Specifies the authorizer's Uniform Resource Identifier (URI).withAuthType
(String authType) Optional customer-defined field, used in Swagger imports/exports.The identifier for the authorizer resource.withIdentitySource
(String identitySource) [Required] The source of the identity in an incoming request.withIdentityValidationExpression
(String identityValidationExpression) A validation expression for the incoming identity.[Required] The name of the authorizer.withType
(AuthorizerType type) [Required] The type of the authorizer.[Required] The type of the authorizer.
-
Constructor Details
-
CreateAuthorizerResult
public CreateAuthorizerResult()
-
-
Method Details
-
setId
The identifier for the authorizer resource.
- Parameters:
id
- The identifier for the authorizer resource.
-
getId
The identifier for the authorizer resource.
- Returns:
- The identifier for the authorizer resource.
-
withId
The identifier for the authorizer resource.
- Parameters:
id
- The identifier for the authorizer resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setName
[Required] The name of the authorizer.
- Parameters:
name
- [Required] The name of the authorizer.
-
getName
[Required] The name of the authorizer.
- Returns:
- [Required] The name of the authorizer.
-
withName
[Required] The name of the authorizer.
- Parameters:
name
- [Required] The name of the authorizer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setType
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- Parameters:
type
- [Required] The type of the authorizer. Currently, the only valid type is TOKEN.- See Also:
-
getType
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- Returns:
- [Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- See Also:
-
withType
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- Parameters:
type
- [Required] The type of the authorizer. Currently, the only valid type is TOKEN.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setType
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- Parameters:
type
- [Required] The type of the authorizer. Currently, the only valid type is TOKEN.- See Also:
-
withType
[Required] The type of the authorizer. Currently, the only valid type is TOKEN.
- Parameters:
type
- [Required] The type of the authorizer. Currently, the only valid type is TOKEN.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setAuthType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
- Parameters:
authType
- Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
-
getAuthType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
- Returns:
- Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
-
withAuthType
Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.
- Parameters:
authType
- Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations- Parameters:
authorizerUri
- [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a well-formed Lambda function URI. The URI should be of the formarn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
-
getAuthorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations- Returns:
- [Required] Specifies the authorizer's Uniform Resource Identifier
(URI). For TOKEN authorizers, this must be a well-formed Lambda
function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations
-
withAuthorizerUri
[Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a well-formed Lambda function URI. The URI should be of the form
arn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations- Parameters:
authorizerUri
- [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN authorizers, this must be a well-formed Lambda function URI. The URI should be of the formarn:aws:apigateway:{region}:lambda:path/{service_api}
.Region
is used to determine the right endpoint. In this case,path
is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial/
. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
- Parameters:
authorizerCredentials
- Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
-
getAuthorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
- Returns:
- Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
-
withAuthorizerCredentials
Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
- Parameters:
authorizerCredentials
- Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIdentitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
- Parameters:
identitySource
- [Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
-
getIdentitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
- Returns:
- [Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
-
withIdentitySource
[Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.
- Parameters:
identitySource
- [Required] The source of the identity in an incoming request. For TOKEN authorizers, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIdentityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
- Parameters:
identityValidationExpression
- A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
-
getIdentityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
- Returns:
- A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
-
withIdentityValidationExpression
A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.
- Parameters:
identityValidationExpression
- A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAuthorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
- Parameters:
authorizerResultTtlInSeconds
- The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
-
getAuthorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
- Returns:
- The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
-
withAuthorizerResultTtlInSeconds
public CreateAuthorizerResult withAuthorizerResultTtlInSeconds(Integer authorizerResultTtlInSeconds) The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.
- Parameters:
authorizerResultTtlInSeconds
- The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-