@aws-cdk_aws-apigatewayv2-alpha.HttpIntegration

class HttpIntegration (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.HttpIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#HttpIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.HttpIntegration
Pythonaws_cdk.aws_apigatewayv2_alpha.HttpIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป HttpIntegration

Implements IConstruct, IDependable, IResource, IHttpIntegration, IIntegration

The integration for an API route.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apigatewayv2_alpha from '@aws-cdk/aws-apigatewayv2-alpha';

declare const httpApi: apigatewayv2_alpha.HttpApi;
declare const integrationCredentials: apigatewayv2_alpha.IntegrationCredentials;
declare const parameterMapping: apigatewayv2_alpha.ParameterMapping;
declare const payloadFormatVersion: apigatewayv2_alpha.PayloadFormatVersion;
const httpIntegration = new apigatewayv2_alpha.HttpIntegration(this, 'MyHttpIntegration', {
  httpApi: httpApi,
  integrationType: apigatewayv2_alpha.HttpIntegrationType.HTTP_PROXY,

  // the properties below are optional
  connectionId: 'connectionId',
  connectionType: apigatewayv2_alpha.HttpConnectionType.VPC_LINK,
  credentials: integrationCredentials,
  integrationSubtype: apigatewayv2_alpha.HttpIntegrationSubtype.EVENTBRIDGE_PUT_EVENTS,
  integrationUri: 'integrationUri',
  method: apigatewayv2_alpha.HttpMethod.ANY,
  parameterMapping: parameterMapping,
  payloadFormatVersion: payloadFormatVersion,
  secureServerName: 'secureServerName',
});

Initializer

new HttpIntegration(scope: Construct, id: string, props: HttpIntegrationProps)

Parameters

  • scope Construct
  • id string
  • props HttpIntegrationProps

Construct Props

NameTypeDescription
httpApi๐Ÿ”นIHttpApiThe HTTP API to which this integration should be bound.
integrationType๐Ÿ”นHttpIntegrationTypeIntegration type.
connectionId?๐Ÿ”นstringThe ID of the VPC link for a private integration.
connectionType?๐Ÿ”นHttpConnectionTypeThe type of the network connection to the integration endpoint.
credentials?๐Ÿ”นIntegrationCredentialsThe credentials with which to invoke the integration.
integrationSubtype?๐Ÿ”นHttpIntegrationSubtypeIntegration subtype.
integrationUri?๐Ÿ”นstringIntegration URI.
method?๐Ÿ”นHttpMethodThe HTTP method to use when calling the underlying HTTP proxy.
parameterMapping?๐Ÿ”นParameterMappingSpecifies how to transform HTTP requests before sending them to the backend.
payloadFormatVersion?๐Ÿ”นPayloadFormatVersionThe version of the payload format.
secureServerName?๐Ÿ”นstringSpecifies the TLS configuration for a private integration.

httpApi๐Ÿ”น

Type: IHttpApi

The HTTP API to which this integration should be bound.


integrationType๐Ÿ”น

Type: HttpIntegrationType

Integration type.


connectionId?๐Ÿ”น

Type: string (optional, default: undefined)

The ID of the VPC link for a private integration.

Supported only for HTTP APIs.


connectionType?๐Ÿ”น

Type: HttpConnectionType (optional, default: HttpConnectionType.INTERNET)

The type of the network connection to the integration endpoint.


credentials?๐Ÿ”น

Type: IntegrationCredentials (optional, default: no credentials, use resource-based permissions on supported AWS services)

The credentials with which to invoke the integration.


integrationSubtype?๐Ÿ”น

Type: HttpIntegrationSubtype (optional, default: none, required if no integrationUri is defined.)

Integration subtype.

Used for AWS Service integrations, specifies the target of the integration.


integrationUri?๐Ÿ”น

Type: string (optional, default: none, required if no integrationSubtype is defined.)

Integration URI.

This will be the function ARN in the case of HttpIntegrationType.AWS_PROXY, or HTTP URL in the case of HttpIntegrationType.HTTP_PROXY.


method?๐Ÿ”น

Type: HttpMethod (optional, default: none. required if the integration type is HttpIntegrationType.HTTP_PROXY.)

The HTTP method to use when calling the underlying HTTP proxy.


parameterMapping?๐Ÿ”น

Type: ParameterMapping (optional, default: undefined requests are sent to the backend unmodified)

Specifies how to transform HTTP requests before sending them to the backend.

See also: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html


payloadFormatVersion?๐Ÿ”น

Type: PayloadFormatVersion (optional, default: defaults to latest in the case of HttpIntegrationType.AWS_PROXY`, irrelevant otherwise.)

The version of the payload format.

See also: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html


secureServerName?๐Ÿ”น

Type: string (optional, default: undefined private integration traffic will use HTTP protocol)

Specifies the TLS configuration for a private integration.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html

Properties

NameTypeDescription
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
httpApi๐Ÿ”นIHttpApiThe HTTP API associated with this integration.
integrationId๐Ÿ”นstringId of the integration.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

env๐Ÿ”น

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


httpApi๐Ÿ”น

Type: IHttpApi

The HTTP API associated with this integration.


integrationId๐Ÿ”น

Type: string

Id of the integration.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
toString()๐Ÿ”นReturns a string representation of this construct.

applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.