HttpUserPoolAuthorizerProps Struct
Properties to initialize HttpUserPoolAuthorizer.
| Source | aws-apigatewayv2-authorizers/lib/http/user-pool.ts |
|---|---|
| Type last changed | v2.114.0 · 5 Dec 2023 |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2_authorizers as apigatewayv2_authorizers } from 'aws-cdk-lib';
import { aws_cognito as cognito } from 'aws-cdk-lib';
declare const userPoolClient: cognito.UserPoolClient;
const httpUserPoolAuthorizerProps: apigatewayv2_authorizers.HttpUserPoolAuthorizerProps = {
authorizerName: 'authorizerName',
identitySource: ['identitySource'],
userPoolClients: [userPoolClient],
userPoolRegion: 'userPoolRegion',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigatewayv2_authorizers as apigatewayv2_authorizers
from aws_cdk import aws_cognito as cognito
# user_pool_client: cognito.UserPoolClient
http_user_pool_authorizer_props = apigatewayv2_authorizers.HttpUserPoolAuthorizerProps(
authorizer_name="authorizerName",
identity_source=["identitySource"],
user_pool_clients=[user_pool_client],
user_pool_region="userPoolRegion"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.aws_apigatewayv2_authorizers.*;
import software.amazon.awscdk.services.cognito.*;
UserPoolClient userPoolClient;
HttpUserPoolAuthorizerProps httpUserPoolAuthorizerProps = HttpUserPoolAuthorizerProps.builder()
.authorizerName("authorizerName")
.identitySource(List.of("identitySource"))
.userPoolClients(List.of(userPoolClient))
.userPoolRegion("userPoolRegion")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AwsApigatewayv2Authorizers;
using Amazon.CDK.AWS.Cognito;
UserPoolClient userPoolClient;
var httpUserPoolAuthorizerProps = new HttpUserPoolAuthorizerProps {
AuthorizerName = "authorizerName",
IdentitySource = new [] { "identitySource" },
UserPoolClients = new [] { userPoolClient },
UserPoolRegion = "userPoolRegion"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var userPoolClient UserPoolClient
httpUserPoolAuthorizerProps := &HttpUserPoolAuthorizerProps{
AuthorizerName: jsii.String("authorizerName"),
IdentitySource: []*string{
jsii.String("identitySource"),
},
UserPoolClients: []IUserPoolClient{
userPoolClient,
},
UserPoolRegion: jsii.String("userPoolRegion"),
}
Properties
authorizerName?optionalstringauthorizer_name?optionalstrauthorizerName?optionalStringAuthorizerName?optionalstringAuthorizerName?optional*string #Friendly name of the authorizer.
Default: same value as id passed in the constructor
identitySource?optionalstring[]identity_source?optionaltyping.List[str]identitySource?optionalList<String>IdentitySource?optionalstring[]IdentitySource?optional*[]*string #The identity source for which authorization is requested.
Default: ['$request.header.Authorization']
userPoolClients?optionalIUserPoolClient[]user_pool_clients?optionaltyping.List[IUserPoolClient]userPoolClients?optionalList<IUserPoolClient>UserPoolClients?optionalIUserPoolClient[]UserPoolClients?optional*[]IUserPoolClient #The user pool clients that should be used to authorize requests with the user pool.
Default: a new client will be created for the given user pool
userPoolRegion?optionalstringuser_pool_region?optionalstruserPoolRegion?optionalStringUserPoolRegion?optionalstringUserPoolRegion?optional*string #The AWS region in which the user pool is present.
Default: same region as the Route the authorizer is attached to.