@Stability(value=Stable) public static final class CfnAuthorizer.Builder extends Object implements software.amazon.jsii.Builder<CfnAuthorizer>
CfnAuthorizer.| Modifier and Type | Method and Description |
|---|---|
CfnAuthorizer.Builder |
authorizerCredentials(String authorizerCredentials)
The credentials that are required for the authorizer.
|
CfnAuthorizer.Builder |
authorizerResultTtlInSeconds(Number authorizerResultTtlInSeconds)
The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches authorizer results.
|
CfnAuthorizer.Builder |
authorizerUri(String authorizerUri)
The authorizer's Uniform Resource Identifier (URI).
|
CfnAuthorizer.Builder |
authType(String authType)
An optional customer-defined field that's used in OpenApi imports and exports without functional impact.
|
CfnAuthorizer |
build() |
static CfnAuthorizer.Builder |
create(software.constructs.Construct scope,
String id) |
CfnAuthorizer.Builder |
identitySource(String identitySource)
The source of the identity in an incoming request.
|
CfnAuthorizer.Builder |
identityValidationExpression(String identityValidationExpression)
A validation expression for the incoming identity.
|
CfnAuthorizer.Builder |
name(String name)
The name of the authorizer.
|
CfnAuthorizer.Builder |
providerArns(List<String> providerArns)
A list of the Amazon Cognito user pool Amazon Resource Names (ARNs) to associate with this authorizer.
|
CfnAuthorizer.Builder |
restApiId(String restApiId)
The ID of the `RestApi` resource that API Gateway creates the authorizer in.
|
CfnAuthorizer.Builder |
type(String type)
The type of authorizer.
|
@Stability(value=Stable) public static CfnAuthorizer.Builder create(software.constructs.Construct scope, String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.CfnAuthorizer.Builder.@Stability(value=Stable) public CfnAuthorizer.Builder name(String name)
name - The name of the authorizer. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder restApiId(String restApiId)
restApiId - The ID of the `RestApi` resource that API Gateway creates the authorizer in. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder type(String type)
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.type - The type of authorizer. Valid values include:. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder authorizerCredentials(String authorizerCredentials)
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.
authorizerCredentials - The credentials that are required for the authorizer. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder authorizerResultTtlInSeconds(Number authorizerResultTtlInSeconds)
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.
authorizerResultTtlInSeconds - The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches authorizer results. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder authorizerUri(String authorizerUri)
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.
authorizerUri - The authorizer's Uniform Resource Identifier (URI). This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder authType(String authType)
authType - An optional customer-defined field that's used in OpenApi imports and exports without functional impact. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder identitySource(String identitySource)
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 .
identitySource - The source of the identity in an incoming request. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder identityValidationExpression(String identityValidationExpression)
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.
identityValidationExpression - A validation expression for the incoming identity. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer.Builder providerArns(List<String> providerArns)
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 .
providerArns - A list of the Amazon Cognito user pool Amazon Resource Names (ARNs) to associate with this authorizer. This parameter is required.this@Stability(value=Stable) public CfnAuthorizer build()
build in interface software.amazon.jsii.Builder<CfnAuthorizer>Copyright © 2022. All rights reserved.