UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

37 lines (36 loc) 1.09 kB
import type { Construct } from 'constructs'; import { AuthorizationType } from './method'; import type { IRestApi } from './restapi'; import type { ResourceProps } from '../../core'; import { Resource } from '../../core'; /** * Base class for all custom authorizers */ export declare abstract class Authorizer extends Resource implements IAuthorizer { /** * Return whether the given object is an Authorizer. */ static isAuthorizer(x: any): x is Authorizer; abstract readonly authorizerId: string; readonly authorizationType?: AuthorizationType; constructor(scope: Construct, id: string, props?: ResourceProps); /** * Called when the authorizer is used from a specific REST API. * @internal */ abstract _attachToApi(restApi: IRestApi): void; } /** * Represents an API Gateway authorizer. */ export interface IAuthorizer { /** * The authorizer ID. * @attribute */ readonly authorizerId: string; /** * The authorization type of this authorizer. */ readonly authorizationType?: AuthorizationType; }