Class IdentitySource

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.IdentitySource
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-21T06:34:02.601Z") @Stability(Stable) public class IdentitySource extends software.amazon.jsii.JsiiObject
Represents an identity source.

The source can be specified either as a literal value (e.g: Auth) which cannot be blank, or as an unresolved string token.

Example:

 Function authFn;
 Resource books;
 RequestAuthorizer auth = RequestAuthorizer.Builder.create(this, "booksAuthorizer")
         .handler(authFn)
         .identitySources(List.of(IdentitySource.header("Authorization")))
         .build();
 books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder()
         .authorizer(auth)
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    IdentitySource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    IdentitySource(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    context(String context)
    Provides a properly formatted request context identity source.
    static String
    header(String headerName)
    Provides a properly formatted header identity source.
    static String
    queryString(String queryString)
    Provides a properly formatted query string identity source.
    static String
    stageVariable(String stageVariable)
    Provides a properly formatted API Gateway stage variable identity source.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • IdentitySource

      protected IdentitySource(software.amazon.jsii.JsiiObjectRef objRef)
    • IdentitySource

      protected IdentitySource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • IdentitySource

      @Stability(Stable) public IdentitySource()
  • Method Details

    • context

      @Stability(Stable) @NotNull public static String context(@NotNull String context)
      Provides a properly formatted request context identity source.

      Parameters:
      context - the name of the context variable the IdentitySource will represent. This parameter is required.
      Returns:
      a request context identity source.
    • header

      @Stability(Stable) @NotNull public static String header(@NotNull String headerName)
      Provides a properly formatted header identity source.

      Parameters:
      headerName - the name of the header the IdentitySource will represent. This parameter is required.
      Returns:
      a header identity source.
    • queryString

      @Stability(Stable) @NotNull public static String queryString(@NotNull String queryString)
      Provides a properly formatted query string identity source.

      Parameters:
      queryString - the name of the query string the IdentitySource will represent. This parameter is required.
      Returns:
      a query string identity source.
    • stageVariable

      @Stability(Stable) @NotNull public static String stageVariable(@NotNull String stageVariable)
      Provides a properly formatted API Gateway stage variable identity source.

      Parameters:
      stageVariable - the name of the stage variable the IdentitySource will represent. This parameter is required.
      Returns:
      an API Gateway stage variable identity source.