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.apigateway.CfnAuthorizer
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IAuthorizerRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:39:57.223Z")
@Stability(Stable)
public class CfnAuthorizer
extends CfnResource
implements IInspectable, IAuthorizerRef
The
AWS::ApiGateway::Authorizer resource creates an authorization layer that API Gateway activates for methods that have authorization enabled.
API Gateway activates the authorizer when a client calls those methods.
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.apigateway.*;
CfnAuthorizer cfnAuthorizer = CfnAuthorizer.Builder.create(this, "MyCfnAuthorizer")
.name("name")
.restApiId("restApiId")
.type("type")
// the properties below are optional
.authorizerCredentials("authorizerCredentials")
.authorizerResultTtlInSeconds(123)
.authorizerUri("authorizerUri")
.authType("authType")
.identitySource("identitySource")
.identityValidationExpression("identityValidationExpression")
.providerArns(List.of("providerArns"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigateway.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) -
Method Summary
Modifier and TypeMethodDescriptionThe ID for the authorizer.Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.A reference to a Authorizer resource.The TTL in seconds of cached authorizer results.Specifies the authorizer's Uniform Resource Identifier (URI).Optional customer-defined field, used in OpenAPI imports and exports without functional impact.The identity source for which authorization is requested.A validation expression for the incoming identity token.getName()The name of the authorizer.A list of the Amazon Cognito user pool ARNs for theCOGNITO_USER_POOLSauthorizer.The string identifier of the associated RestApi.getType()The authorizer type.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAuthorizerCredentials(String value) Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.voidThe TTL in seconds of cached authorizer results.voidsetAuthorizerUri(String value) Specifies the authorizer's Uniform Resource Identifier (URI).voidsetAuthType(String value) Optional customer-defined field, used in OpenAPI imports and exports without functional impact.voidsetIdentitySource(String value) The identity source for which authorization is requested.voidA validation expression for the incoming identity token.voidThe name of the authorizer.voidsetProviderArns(List<String> value) A list of the Amazon Cognito user pool ARNs for theCOGNITO_USER_POOLSauthorizer.voidsetRestApiId(String value) The string identifier of the associated RestApi.voidThe authorizer type.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.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) - 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 ID for the authorizer.For example:
abc123. -
getAuthorizerRef
A reference to a Authorizer resource.- Specified by:
getAuthorizerRefin interfaceIAuthorizerRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getName
The name of the authorizer. -
setName
The name of the authorizer. -
getRestApiId
The string identifier of the associated RestApi. -
setRestApiId
The string identifier of the associated RestApi. -
getType
The authorizer type. -
setType
The authorizer type. -
getAuthorizerCredentials
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. -
setAuthorizerCredentials
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. -
getAuthorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. -
setAuthorizerResultTtlInSeconds
The TTL in seconds of cached authorizer results. -
getAuthorizerUri
Specifies the authorizer's Uniform Resource Identifier (URI). -
setAuthorizerUri
Specifies the authorizer's Uniform Resource Identifier (URI). -
getAuthType
Optional customer-defined field, used in OpenAPI imports and exports without functional impact. -
setAuthType
Optional customer-defined field, used in OpenAPI imports and exports without functional impact. -
getIdentitySource
The identity source for which authorization is requested. -
setIdentitySource
The identity source for which authorization is requested. -
getIdentityValidationExpression
A validation expression for the incoming identity token. -
setIdentityValidationExpression
A validation expression for the incoming identity token. -
getProviderArns
A list of the Amazon Cognito user pool ARNs for theCOGNITO_USER_POOLSauthorizer. -
setProviderArns
A list of the Amazon Cognito user pool ARNs for theCOGNITO_USER_POOLSauthorizer.
-