Class CfnAuthorizer
The AWS::ApiGatewayV2::Authorizer resource creates an authorizer for a WebSocket API or an HTTP API.
Inherited Members
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAuthorizer : CfnResource, IInspectable, IAuthorizerRef, IConstruct, IDependableSyntax (vb)
Public Class CfnAuthorizer Inherits CfnResource Implements IInspectable, IAuthorizerRef, IConstruct, IDependableRemarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
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.AWS.Apigatewayv2;
             var cfnAuthorizer = new CfnAuthorizer(this, "MyCfnAuthorizer", new CfnAuthorizerProps {
                 ApiId = "apiId",
                 AuthorizerType = "authorizerType",
                 Name = "name",
                 // the properties below are optional
                 AuthorizerCredentialsArn = "authorizerCredentialsArn",
                 AuthorizerPayloadFormatVersion = "authorizerPayloadFormatVersion",
                 AuthorizerResultTtlInSeconds = 123,
                 AuthorizerUri = "authorizerUri",
                 EnableSimpleResponses = false,
                 IdentitySource = new [] { "identitySource" },
                 IdentityValidationExpression = "identityValidationExpression",
                 JwtConfiguration = new JWTConfigurationProperty {
                     Audience = new [] { "audience" },
                     Issuer = "issuer"
                 }
             });Synopsis
Constructors
| CfnAuthorizer(Construct, string, ICfnAuthorizerProps) | The  | 
Properties
| ApiId | The API identifier. | 
| AttrAuthorizerId | The authorizer ID. | 
| AuthorizerCredentialsArn | Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. | 
| AuthorizerPayloadFormatVersion | Specifies the format of the payload sent to an HTTP API Lambda authorizer. | 
| AuthorizerRef | A reference to a Authorizer resource. | 
| AuthorizerResultTtlInSeconds | The time to live (TTL) for cached authorizer results, in seconds. | 
| AuthorizerType | The authorizer type. | 
| AuthorizerUri | The authorizer's Uniform Resource Identifier (URI). | 
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. | 
| CfnProperties | The  | 
| EnableSimpleResponses | Specifies whether a Lambda authorizer returns a response in a simple format. | 
| IdentitySource | The identity source for which authorization is requested. | 
| IdentityValidationExpression | This parameter is not used. | 
| JwtConfiguration | The  | 
| Name | The name of the authorizer. | 
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. | 
| RenderProperties(IDictionary<string, object>) | The  | 
Constructors
CfnAuthorizer(Construct, string, ICfnAuthorizerProps)
The AWS::ApiGatewayV2::Authorizer resource creates an authorizer for a WebSocket API or an HTTP API.
public CfnAuthorizer(Construct scope, string id, ICfnAuthorizerProps props)Parameters
- scope Construct
- Scope in which this resource is defined. 
- id string
- Construct identifier for this resource (unique in its scope). 
- props ICfnAuthorizerProps
- Resource properties. 
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
Properties
ApiId
The API identifier.
public virtual string ApiId { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AttrAuthorizerId
The authorizer ID.
public virtual string AttrAuthorizerId { get; }Property Value
Remarks
CloudformationAttribute: AuthorizerId
AuthorizerCredentialsArn
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.
public virtual string? AuthorizerCredentialsArn { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AuthorizerPayloadFormatVersion
Specifies the format of the payload sent to an HTTP API Lambda authorizer.
public virtual string? AuthorizerPayloadFormatVersion { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AuthorizerRef
A reference to a Authorizer resource.
public virtual IAuthorizerReference AuthorizerRef { get; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AuthorizerResultTtlInSeconds
The time to live (TTL) for cached authorizer results, in seconds.
public virtual double? AuthorizerResultTtlInSeconds { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AuthorizerType
The authorizer type.
public virtual string AuthorizerType { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
AuthorizerUri
The authorizer's Uniform Resource Identifier (URI).
public virtual string? AuthorizerUri { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::ApiGatewayV2::Authorizer resource creates an authorizer for a WebSocket API or an HTTP API.
protected override IDictionary<string, object> CfnProperties { get; }Property Value
Overrides
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
EnableSimpleResponses
Specifies whether a Lambda authorizer returns a response in a simple format.
public virtual object? EnableSimpleResponses { get; set; }Property Value
Remarks
Type union: either bool or IResolvable
IdentitySource
The identity source for which authorization is requested.
public virtual string[]? IdentitySource { get; set; }Property Value
string[]
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
IdentityValidationExpression
This parameter is not used.
public virtual string? IdentityValidationExpression { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
JwtConfiguration
The JWTConfiguration property specifies the configuration of a JWT authorizer.
public virtual object? JwtConfiguration { get; set; }Property Value
Remarks
Type union: either IResolvable or CfnAuthorizer.IJWTConfigurationProperty
Name
The name of the authorizer.
public virtual string Name { get; set; }Property Value
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes. 
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::ApiGatewayV2::Authorizer resource creates an authorizer for a WebSocket API or an HTTP API.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
CloudformationResource: AWS::ApiGatewayV2::Authorizer
ExampleMetadata: fixture=_generated