HttpServiceDiscoveryIntegration

class aws_cdk.aws_apigatewayv2_integrations.HttpServiceDiscoveryIntegration(id, service, *, method=None, parameter_mapping=None, secure_server_name=None, timeout=None, vpc_link=None)

Bases: HttpRouteIntegration

The Service Discovery integration resource for HTTP API.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_servicediscovery as servicediscovery
from aws_cdk.aws_apigatewayv2_integrations import HttpServiceDiscoveryIntegration


vpc = ec2.Vpc(self, "VPC")
vpc_link = apigwv2.VpcLink(self, "VpcLink", vpc=vpc)
namespace = servicediscovery.PrivateDnsNamespace(self, "Namespace",
    name="boobar.com",
    vpc=vpc
)
service = namespace.create_service("Service")

http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi",
    default_integration=HttpServiceDiscoveryIntegration("DefaultIntegration", service,
        vpc_link=vpc_link
    )
)
Parameters:
  • id (str) – id of the underlying integration construct.

  • service (IService) – the service discovery resource to integrate with.

  • method (Optional[HttpMethod]) – The HTTP method that must be used to invoke the underlying HTTP proxy. Default: HttpMethod.ANY

  • parameter_mapping (Optional[ParameterMapping]) – Specifies how to transform HTTP requests before sending them to the backend. Default: undefined requests are sent to the backend unmodified

  • secure_server_name (Optional[str]) – Specifies the server name to verified by HTTPS when calling the backend integration. Default: undefined private integration traffic will use HTTP protocol

  • timeout (Optional[Duration]) – The maximum amount of time an integration will run before it returns without a response. Must be between 50 milliseconds and 29 seconds. Default: Duration.seconds(29)

  • vpc_link (Optional[IVpcLink]) – The vpc link to be used for the private integration. Default: - a new VpcLink is created

Methods

bind(*, route, scope)

Bind this integration to the route.

Parameters:
  • route (IHttpRoute) – The route to which this is being bound.

  • scope (Construct) – The current scope in which the bind is occurring. If the HttpRouteIntegration being bound creates additional constructs, this will be used as their parent scope.

Return type:

HttpRouteIntegrationConfig