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.97.0 (build 729de35)", date="2024-04-18T17:54:11.763Z") @Stability(Stable) public class CfnAuthorizer extends CfnResource implements IInspectable
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:
  • 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 ID for the authorizer.

      For example: abc123 .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • 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.
    • getRestApiId

      @Stability(Stable) @NotNull public String getRestApiId()
      The string identifier of the associated RestApi.
    • setRestApiId

      @Stability(Stable) public void setRestApiId(@NotNull String value)
      The string identifier of the associated RestApi.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The authorizer type.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The authorizer type.
    • getAuthorizerCredentials

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

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

      @Stability(Stable) @Nullable public Number getAuthorizerResultTtlInSeconds()
      The TTL in seconds of cached authorizer results.
    • setAuthorizerResultTtlInSeconds

      @Stability(Stable) public void setAuthorizerResultTtlInSeconds(@Nullable Number value)
      The TTL in seconds of cached authorizer results.
    • getAuthorizerUri

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

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

      @Stability(Stable) @Nullable public String getAuthType()
      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.
    • setAuthType

      @Stability(Stable) public void setAuthType(@Nullable String value)
      Optional customer-defined field, used in OpenAPI imports and exports without functional impact.
    • getIdentitySource

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

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

      @Stability(Stable) @Nullable public String getIdentityValidationExpression()
      A validation expression for the incoming identity token.
    • setIdentityValidationExpression

      @Stability(Stable) public void setIdentityValidationExpression(@Nullable String value)
      A validation expression for the incoming identity token.
    • getProviderArns

      @Stability(Stable) @Nullable public List<String> getProviderArns()
      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer.
    • setProviderArns

      @Stability(Stable) public void setProviderArns(@Nullable List<String> value)
      A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer.