@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.094Z") @Stability(value=Stable) public interface CfnAuthorizerProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
CfnAuthorizerProps cfnAuthorizerProps = CfnAuthorizerProps.builder()
.name("name")
.restApiId("restApiId")
.type("type")
// the properties below are optional
.authorizerCredentials("authorizerCredentials")
.authorizerResultTtlInSeconds(123)
.authorizerUri("authorizerUri")
.authType("authType")
.identitySource("identitySource")
.identityValidationExpression("identityValidationExpression")
.providerArns(List.of("providerArns"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnAuthorizerProps.Builder
A builder for
CfnAuthorizerProps |
static class |
CfnAuthorizerProps.Jsii$Proxy
An implementation for
CfnAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnAuthorizerProps.Builder |
builder() |
default String |
getAuthorizerCredentials()
The credentials that are required for the authorizer.
|
default Number |
getAuthorizerResultTtlInSeconds()
The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches authorizer results.
|
default String |
getAuthorizerUri()
The authorizer's Uniform Resource Identifier (URI).
|
default String |
getAuthType()
An optional customer-defined field that's used in OpenApi imports and exports without functional impact.
|
default String |
getIdentitySource()
The source of the identity in an incoming request.
|
default String |
getIdentityValidationExpression()
A validation expression for the incoming identity.
|
String |
getName()
The name of the authorizer.
|
default List<String> |
getProviderArns()
A list of the Amazon Cognito user pool Amazon Resource Names (ARNs) to associate with this authorizer.
|
String |
getRestApiId()
The ID of the `RestApi` resource that API Gateway creates the authorizer in.
|
String |
getType()
The type of authorizer.
|
@Stability(value=Stable) @NotNull String getName()
@Stability(value=Stable) @NotNull String getRestApiId()
@Stability(value=Stable) @NotNull String getType()
TOKEN : A custom authorizer that uses a Lambda function.COGNITO_USER_POOLS : An authorizer that uses Amazon Cognito user pools.REQUEST : An authorizer that uses a Lambda function using incoming request parameters.@Stability(value=Stable) @Nullable default String getAuthorizerCredentials()
To specify an IAM role that API Gateway assumes, specify the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
@Stability(value=Stable) @Nullable default Number getAuthorizerResultTtlInSeconds()
If you specify a value greater than 0, API Gateway caches the authorizer responses. By default, API Gateway sets this property to 300. The maximum value is 3600, or 1 hour.
@Stability(value=Stable) @Nullable default String getAuthorizerUri()
If you specify TOKEN for the authorizer's Type property, specify a Lambda function URI that has the form arn:aws:apigateway: *region* :lambda:path/ *path* . The path usually has the form /2015-03-31/functions/ LambdaFunctionARN /invocations.
@Stability(value=Stable) @Nullable default String getAuthType()
@Stability(value=Stable) @Nullable default String getIdentitySource()
If you specify TOKEN or COGNITO_USER_POOLS for the Type property, this property is required. Specify a header mapping expression using the form method.request.header. *name* , where name is the name of a custom authorization header that clients submit as part of their requests.
If you specify REQUEST for the Type property, this property is required when authorization caching is enabled. Specify a comma-separated string of one or more mapping expressions of the specified request parameter using the form method.request.parameter. *name* . For supported parameter types, see Configure Lambda Authorizer Using the API Gateway Console in the API Gateway Developer Guide .
@Stability(value=Stable) @Nullable default String getIdentityValidationExpression()
If you specify TOKEN for the authorizer's Type property, specify a regular expression. API Gateway uses the expression to attempt to match the incoming client token, and proceeds if the token matches. If the token doesn't match, API Gateway responds with a 401 (unauthorized request) error code.
@Stability(value=Stable) @Nullable default List<String> getProviderArns()
Required if you specify COGNITO_USER_POOLS as the authorizer Type . For more information, see Use Amazon Cognito User Pools in the API Gateway Developer Guide .
@Stability(value=Stable) static CfnAuthorizerProps.Builder builder()
CfnAuthorizerProps.Builder of CfnAuthorizerPropsCopyright © 2022. All rights reserved.