# HttpAuthorizerAttributes

Reference to an http authorizer.

Used as argument in: [HttpAuthorizer.fromHttpAuthorizerAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.HttpAuthorizer.html#fromhttpauthorizerattributes)

- Source: [`aws-apigatewayv2/lib/http/authorizer.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts#L131)
- Type last changed: v2.112.0 · 1 Dec 2023

## Example

TypeScript:

```ts
import { HttpAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2';
import { Fn } from 'aws-cdk-lib'

const authorizerId = Fn.importValue('authorizerId');
const authorizerType = Fn.importValue('authorizerType');

const authorizer = HttpAuthorizer.fromHttpAuthorizerAttributes(this, 'HttpAuthorizer', {
    authorizerId,
    authorizerType
});
```

Python:

```python
from aws_cdk.aws_apigatewayv2 import HttpAuthorizer
from aws_cdk import Fn

authorizer_id = Fn.import_value("authorizerId")
authorizer_type = Fn.import_value("authorizerType")

authorizer = HttpAuthorizer.from_http_authorizer_attributes(self, "HttpAuthorizer",
    authorizer_id=authorizer_id,
    authorizer_type=authorizer_type
)
```

Java:

```java
import software.amazon.awscdk.services.apigatewayv2.HttpAuthorizer;
import software.amazon.awscdk.Fn;

String authorizerId = Fn.importValue("authorizerId");
String authorizerType = Fn.importValue("authorizerType");

IHttpRouteAuthorizer authorizer = HttpAuthorizer.fromHttpAuthorizerAttributes(this, "HttpAuthorizer", HttpAuthorizerAttributes.builder()
        .authorizerId(authorizerId)
        .authorizerType(authorizerType)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.Apigatewayv2;
using Amazon.CDK;

var authorizerId = Fn.ImportValue("authorizerId");
var authorizerType = Fn.ImportValue("authorizerType");

var authorizer = HttpAuthorizer.FromHttpAuthorizerAttributes(this, "HttpAuthorizer", new HttpAuthorizerAttributes {
    AuthorizerId = authorizerId,
    AuthorizerType = authorizerType
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

authorizerId := awscdk.Fn_ImportValue(jsii.String("authorizerId"))
authorizerType := awscdk.Fn_ImportValue(jsii.String("authorizerType"))

authorizer := awscdk.HttpAuthorizer_FromHttpAuthorizerAttributes(this, jsii.String("HttpAuthorizer"), &HttpAuthorizerAttributes{
	AuthorizerId: jsii.String(AuthorizerId),
	AuthorizerType: jsii.String(AuthorizerType),
})
```

## Properties

- `authorizerId`: string (required) — Id of the Authorizer.

- `authorizerType`: string (required) — Type of authorizer.

  Possible values are:
  - JWT - JSON Web Token Authorizer
  - CUSTOM - Lambda Authorizer
  - NONE - No Authorization
