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.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.973Z")
@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
ConstructorsModifierConstructorDescriptionprotectedIdentitySource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedIdentitySource(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringProvides a properly formatted request context identity source.static StringProvides a properly formatted header identity source.static StringqueryString(String queryString) Provides a properly formatted query string identity source.static StringstageVariable(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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Provides a properly formatted request context identity source.- Parameters:
context- the name of the context variable theIdentitySourcewill represent. This parameter is required.- Returns:
- a request context identity source.
-
header
Provides a properly formatted header identity source.- Parameters:
headerName- the name of the header theIdentitySourcewill represent. This parameter is required.- Returns:
- a header identity source.
-
queryString
Provides a properly formatted query string identity source.- Parameters:
queryString- the name of the query string theIdentitySourcewill represent. This parameter is required.- Returns:
- a query string identity source.
-
stageVariable
Provides a properly formatted API Gateway stage variable identity source.- Parameters:
stageVariable- the name of the stage variable theIdentitySourcewill represent. This parameter is required.- Returns:
- an API Gateway stage variable identity source.
-