# HttpUserPoolAuthorizerProps

Properties to initialize HttpUserPoolAuthorizer.

Used as props by: [HttpUserPoolAuthorizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2_authorizers.HttpUserPoolAuthorizer.html)

- Source: [`aws-apigatewayv2-authorizers/lib/http/user-pool.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/lib/http/user-pool.ts#L11)
- Type last changed: v2.114.0 · 5 Dec 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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`: string — Friendly name of the authorizer.

  **Default:** same value as `id` passed in the constructor

- `identitySource`: string[] — The identity source for which authorization is requested.

  **Default:** ['$request.header.Authorization']

- `userPoolClients`: [IUserPoolClient](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.IUserPoolClient.html)[] — 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`: string — The AWS region in which the user pool is present.

  **Default:** same region as the Route the authorizer is attached to.
