Interface IHttpAuthorizerProps
Properties to initialize an instance of HttpAuthorizer
.
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHttpAuthorizerProps
Syntax (vb)
Public Interface IHttpAuthorizerProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Apigatewayv2;
HttpApi httpApi;
var httpAuthorizerProps = new HttpAuthorizerProps {
HttpApi = httpApi,
IdentitySource = new [] { "identitySource" },
Type = HttpAuthorizerType.IAM,
// the properties below are optional
AuthorizerName = "authorizerName",
AuthorizerUri = "authorizerUri",
EnableSimpleResponses = false,
JwtAudience = new [] { "jwtAudience" },
JwtIssuer = "jwtIssuer",
PayloadFormatVersion = AuthorizerPayloadVersion.VERSION_1_0,
ResultsCacheTtl = Duration.Minutes(30)
};
Synopsis
Properties
AuthorizerName | Name of the authorizer. |
AuthorizerUri | The authorizer's Uniform Resource Identifier (URI). |
EnableSimpleResponses | Specifies whether a Lambda authorizer returns a response in a simple format. |
HttpApi | HTTP Api to attach the authorizer to. |
IdentitySource | The identity source for which authorization is requested. |
JwtAudience | A list of the intended recipients of the JWT. |
JwtIssuer | The base domain of the identity provider that issues JWT. |
PayloadFormatVersion | Specifies the format of the payload sent to an HTTP API Lambda authorizer. |
ResultsCacheTtl | How long APIGateway should cache the results. |
Type | The type of authorizer. |
Properties
AuthorizerName
Name of the authorizer.
virtual string AuthorizerName { get; }
Property Value
System.String
Remarks
Default: - id of the HttpAuthorizer construct.
AuthorizerUri
The authorizer's Uniform Resource Identifier (URI).
virtual string AuthorizerUri { get; }
Property Value
System.String
Remarks
For REQUEST authorizers, this must be a well-formed Lambda function URI.
Default: - required for Request authorizer types
EnableSimpleResponses
Specifies whether a Lambda authorizer returns a response in a simple format.
virtual Nullable<bool> EnableSimpleResponses { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy.
Default: - The lambda authorizer must return an IAM policy as its response
HttpApi
IdentitySource
The identity source for which authorization is requested.
string[] IdentitySource { get; }
Property Value
System.String[]
Remarks
JwtAudience
A list of the intended recipients of the JWT.
virtual string[] JwtAudience { get; }
Property Value
System.String[]
Remarks
A valid JWT must provide an aud that matches at least one entry in this list.
Default: - required for JWT authorizer typess.
JwtIssuer
The base domain of the identity provider that issues JWT.
virtual string JwtIssuer { get; }
Property Value
System.String
Remarks
Default: - required for JWT authorizer types.
PayloadFormatVersion
Specifies the format of the payload sent to an HTTP API Lambda authorizer.
virtual Nullable<AuthorizerPayloadVersion> PayloadFormatVersion { get; }
Property Value
System.Nullable<AuthorizerPayloadVersion>
Remarks
Default: AuthorizerPayloadVersion.VERSION_2_0 if the authorizer type is HttpAuthorizerType.LAMBDA
ResultsCacheTtl
How long APIGateway should cache the results.
virtual Duration ResultsCacheTtl { get; }
Property Value
Remarks
Max 1 hour.
Default: - API Gateway will not cache authorizer responses