Class CfnAuthorizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:02.126Z") @Stability(Stable) public class CfnAuthorizer extends CfnResource implements IInspectable
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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAuthorizerId

      @Stability(Stable) @NotNull public String getAttrAuthorizerId()
      The authorizer ID.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getApiId

      @Stability(Stable) @NotNull public String getApiId()
      The API identifier.
    • setApiId

      @Stability(Stable) public void setApiId(@NotNull String value)
      The API identifier.
    • getAuthorizerType

      @Stability(Stable) @NotNull public String getAuthorizerType()
      The authorizer type.
    • setAuthorizerType

      @Stability(Stable) public void setAuthorizerType(@NotNull String value)
      The authorizer type.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the authorizer.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the authorizer.
    • getAuthorizerCredentialsArn

      @Stability(Stable) @Nullable public String getAuthorizerCredentialsArn()
      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.
    • setAuthorizerCredentialsArn

      @Stability(Stable) public void setAuthorizerCredentialsArn(@Nullable String value)
      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer.
    • getAuthorizerPayloadFormatVersion

      @Stability(Stable) @Nullable public String getAuthorizerPayloadFormatVersion()
      Specifies the format of the payload sent to an HTTP API Lambda authorizer.
    • setAuthorizerPayloadFormatVersion

      @Stability(Stable) public void setAuthorizerPayloadFormatVersion(@Nullable String value)
      Specifies the format of the payload sent to an HTTP API Lambda authorizer.
    • getAuthorizerResultTtlInSeconds

      @Stability(Stable) @Nullable public Number getAuthorizerResultTtlInSeconds()
      The time to live (TTL) for cached authorizer results, in seconds.
    • setAuthorizerResultTtlInSeconds

      @Stability(Stable) public void setAuthorizerResultTtlInSeconds(@Nullable Number value)
      The time to live (TTL) for cached authorizer results, in seconds.
    • getAuthorizerUri

      @Stability(Stable) @Nullable public String getAuthorizerUri()
      The authorizer's Uniform Resource Identifier (URI).
    • setAuthorizerUri

      @Stability(Stable) public void setAuthorizerUri(@Nullable String value)
      The authorizer's Uniform Resource Identifier (URI).
    • getEnableSimpleResponses

      @Stability(Stable) @Nullable public Object getEnableSimpleResponses()
      Specifies whether a Lambda authorizer returns a response in a simple format.
    • setEnableSimpleResponses

      @Stability(Stable) public void setEnableSimpleResponses(@Nullable Boolean value)
      Specifies whether a Lambda authorizer returns a response in a simple format.
    • setEnableSimpleResponses

      @Stability(Stable) public void setEnableSimpleResponses(@Nullable IResolvable value)
      Specifies whether a Lambda authorizer returns a response in a simple format.
    • getIdentitySource

      @Stability(Stable) @Nullable public List<String> getIdentitySource()
      The identity source for which authorization is requested.
    • setIdentitySource

      @Stability(Stable) public void setIdentitySource(@Nullable List<String> value)
      The identity source for which authorization is requested.
    • getIdentityValidationExpression

      @Stability(Stable) @Nullable public String getIdentityValidationExpression()
      This parameter is not used.
    • setIdentityValidationExpression

      @Stability(Stable) public void setIdentityValidationExpression(@Nullable String value)
      This parameter is not used.
    • getJwtConfiguration

      @Stability(Stable) @Nullable public Object getJwtConfiguration()
      The JWTConfiguration property specifies the configuration of a JWT authorizer.
    • setJwtConfiguration

      @Stability(Stable) public void setJwtConfiguration(@Nullable IResolvable value)
      The JWTConfiguration property specifies the configuration of a JWT authorizer.
    • setJwtConfiguration

      @Stability(Stable) public void setJwtConfiguration(@Nullable CfnAuthorizer.JWTConfigurationProperty value)
      The JWTConfiguration property specifies the configuration of a JWT authorizer.