# HttpAlbIntegrationProps

Properties to initialize `HttpAlbIntegration`.

Extends: [HttpPrivateIntegrationOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2_integrations.HttpPrivateIntegrationOptions.html)
Used as props by: [HttpAlbIntegration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2_integrations.HttpAlbIntegration.html)

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

## Example

TypeScript:

```ts
import { HttpAlbIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';

declare const lb: elbv2.ApplicationLoadBalancer;
const listener = lb.addListener('listener', { port: 80 });
listener.addTargets('target', {
  port: 80,
});

const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
  defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
    parameterMapping: new apigwv2.ParameterMapping().custom('myKey', 'myValue'),
  }),
});
```

Python:

```python
from aws_cdk.aws_apigatewayv2_integrations import HttpAlbIntegration

# lb: elbv2.ApplicationLoadBalancer

listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
    port=80
)

http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
    default_integration=HttpAlbIntegration("DefaultIntegration", listener,
        parameter_mapping=apigwv2.ParameterMapping().custom("myKey", "myValue")
    )
)
```

Java:

```java
import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpAlbIntegration;

ApplicationLoadBalancer lb;

ApplicationListener listener = lb.addListener("listener", BaseApplicationListenerProps.builder().port(80).build());
listener.addTargets("target", AddApplicationTargetsProps.builder()
        .port(80)
        .build());

HttpApi httpEndpoint = HttpApi.Builder.create(this, "HttpProxyPrivateApi")
        .defaultIntegration(HttpAlbIntegration.Builder.create("DefaultIntegration", listener)
                .parameterMapping(new ParameterMapping().custom("myKey", "myValue"))
                .build())
        .build();
```

C# / .NET:

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

ApplicationLoadBalancer lb;

var listener = lb.AddListener("listener", new BaseApplicationListenerProps { Port = 80 });
listener.AddTargets("target", new AddApplicationTargetsProps {
    Port = 80
});

var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
    DefaultIntegration = new HttpAlbIntegration("DefaultIntegration", listener, new HttpAlbIntegrationProps {
        ParameterMapping = new ParameterMapping().Custom("myKey", "myValue")
    })
});
```

Golang:

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

var lb ApplicationLoadBalancer

listener := lb.AddListener(jsii.String("listener"), &BaseApplicationListenerProps{
	Port: jsii.Number(80),
})
listener.AddTargets(jsii.String("target"), &AddApplicationTargetsProps{
	Port: jsii.Number(80),
})

httpEndpoint := apigwv2.NewHttpApi(this, jsii.String("HttpProxyPrivateApi"), &HttpApiProps{
	DefaultIntegration: awscdk.NewHttpAlbIntegration(jsii.String("DefaultIntegration"), listener, &HttpAlbIntegrationProps{
		ParameterMapping: apigwv2.NewParameterMapping().Custom(jsii.String("myKey"), jsii.String("myValue")),
	}),
})
```

## Properties

- `method`: [HttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.HttpMethod.html) = HttpMethod.ANY — The HTTP method that must be used to invoke the underlying HTTP proxy.

- `parameterMapping`: [ParameterMapping](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.ParameterMapping.html) — Specifies how to transform HTTP requests before sending them to the backend.

  **Default:** undefined requests are sent to the backend unmodified

- `secureServerName`: string — Specifies the server name to verified by HTTPS when calling the backend integration.

  **Default:** undefined private integration traffic will use HTTP protocol

- `timeout`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.seconds(29) — The maximum amount of time an integration will run before it returns without a response.

  Must be between 50 milliseconds and 29 seconds.

- `vpcLink`: [IVpcLink](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.IVpcLink.html) — The vpc link to be used for the private integration.

  **Default:** a new VpcLink is created
