Class CfnAuthorizer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.apigatewayv2.CfnAuthorizer
- All Implemented Interfaces:
IInspectable,IAuthorizerRef,IEnvironmentAware,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:13.802Z")
@Stability(Stable)
public class CfnAuthorizer
extends CfnResource
implements IInspectable, IAuthorizerRef
The
AWS::ApiGatewayV2::Authorizer resource creates an authorizer for a WebSocket API or an HTTP API.
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 .
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.apigatewayv2.*;
CfnAuthorizer cfnAuthorizer = CfnAuthorizer.Builder.create(this, "MyCfnAuthorizer")
.apiId("apiId")
.authorizerType("authorizerType")
.name("name")
// the properties below are optional
.authorizerCredentialsArn("authorizerCredentialsArn")
.authorizerPayloadFormatVersion("authorizerPayloadFormatVersion")
.authorizerResultTtlInSeconds(123)
.authorizerUri("authorizerUri")
.enableSimpleResponses(false)
.identitySource(List.of("identitySource"))
.identityValidationExpression("identityValidationExpression")
.jwtConfiguration(JWTConfigurationProperty.builder()
.audience(List.of("audience"))
.issuer("issuer")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnAuthorizer.static interfaceTheJWTConfigurationproperty specifies the configuration of a JWT authorizer.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.apigatewayv2.IAuthorizerRef
IAuthorizerRef.Jsii$Default, IAuthorizerRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) CfnAuthorizer(software.constructs.Construct scope, String id, CfnAuthorizerProps props) Create a newAWS::ApiGatewayV2::Authorizer. -
Method Summary
Modifier and TypeMethodDescriptiongetApiId()The API identifier.The authorizer ID.Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.Specifies the format of the payload sent to an HTTP API Lambda authorizer.A reference to a Authorizer resource.The time to live (TTL) for cached authorizer results, in seconds.The authorizer type.The authorizer's Uniform Resource Identifier (URI).Specifies whether a Lambda authorizer returns a response in a simple format.The identity source for which authorization is requested.This parameter is not used.TheJWTConfigurationproperty specifies the configuration of a JWT authorizer.getName()The name of the authorizer.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe API identifier.voidSpecifies the required credentials as an IAM role for API Gateway to invoke the authorizer.voidSpecifies the format of the payload sent to an HTTP API Lambda authorizer.voidThe time to live (TTL) for cached authorizer results, in seconds.voidsetAuthorizerType(String value) The authorizer type.voidsetAuthorizerUri(String value) The authorizer's Uniform Resource Identifier (URI).voidsetEnableSimpleResponses(Boolean value) Specifies whether a Lambda authorizer returns a response in a simple format.voidSpecifies whether a Lambda authorizer returns a response in a simple format.voidsetIdentitySource(List<String> value) The identity source for which authorization is requested.voidThis parameter is not used.voidsetJwtConfiguration(IResolvable value) TheJWTConfigurationproperty specifies the configuration of a JWT authorizer.voidTheJWTConfigurationproperty specifies the configuration of a JWT authorizer.voidThe name of the authorizer.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAuthorizer
protected CfnAuthorizer(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAuthorizer
protected CfnAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAuthorizer
@Stability(Stable) public CfnAuthorizer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAuthorizerProps props) Create a newAWS::ApiGatewayV2::Authorizer.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAuthorizerId
The authorizer ID. -
getAuthorizerRef
A reference to a Authorizer resource.- Specified by:
getAuthorizerRefin interfaceIAuthorizerRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getApiId
The API identifier. -
setApiId
The API identifier. -
getAuthorizerType
The authorizer type. -
setAuthorizerType
The authorizer type. -
getName
The name of the authorizer. -
setName
The name of the authorizer. -
getAuthorizerCredentialsArn
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. -
setAuthorizerCredentialsArn
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. -
getAuthorizerPayloadFormatVersion
Specifies the format of the payload sent to an HTTP API Lambda authorizer. -
setAuthorizerPayloadFormatVersion
Specifies the format of the payload sent to an HTTP API Lambda authorizer. -
getAuthorizerResultTtlInSeconds
The time to live (TTL) for cached authorizer results, in seconds. -
setAuthorizerResultTtlInSeconds
The time to live (TTL) for cached authorizer results, in seconds. -
getAuthorizerUri
The authorizer's Uniform Resource Identifier (URI). -
setAuthorizerUri
The authorizer's Uniform Resource Identifier (URI). -
getEnableSimpleResponses
Specifies whether a Lambda authorizer returns a response in a simple format.Returns union: either
BooleanorIResolvable -
setEnableSimpleResponses
Specifies whether a Lambda authorizer returns a response in a simple format. -
setEnableSimpleResponses
Specifies whether a Lambda authorizer returns a response in a simple format. -
getIdentitySource
The identity source for which authorization is requested. -
setIdentitySource
The identity source for which authorization is requested. -
getIdentityValidationExpression
This parameter is not used. -
setIdentityValidationExpression
This parameter is not used. -
getJwtConfiguration
TheJWTConfigurationproperty specifies the configuration of a JWT authorizer.Returns union: either
IResolvableorCfnAuthorizer.JWTConfigurationProperty -
setJwtConfiguration
TheJWTConfigurationproperty specifies the configuration of a JWT authorizer. -
setJwtConfiguration
@Stability(Stable) public void setJwtConfiguration(@Nullable CfnAuthorizer.JWTConfigurationProperty value) TheJWTConfigurationproperty specifies the configuration of a JWT authorizer.
-