IntegrationProps

class aws_cdk.aws_apigateway.IntegrationProps(*, type, integration_http_method=None, options=None, uri=None)

Bases: object

Parameters:
  • type (IntegrationType) – Specifies an API method integration type.

  • integration_http_method (Optional[str]) – The integration’s HTTP method type. Required unless you use a MOCK integration.

  • options (Union[IntegrationOptions, Dict[str, Any], None]) – Integration options.

  • uri (Optional[Any]) – The Uniform Resource Identifier (URI) for the integration. - If you specify HTTP for the type property, specify the API endpoint URL. - If you specify MOCK for the type property, don’t specify this property. - If you specify AWS for the type property, specify an AWS service that follows this form: arn:partition:apigateway:region:subdomain.service|service:path|action/service_api. For example, a Lambda function URI follows this form: arn:partition:apigateway:region:lambda:path/path. The path is usually in the form /2015-03-31/functions/LambdaFunctionARN/invocations.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_elasticloadbalancingv2 as elbv2


vpc = ec2.Vpc(self, "VPC")
nlb = elbv2.NetworkLoadBalancer(self, "NLB",
    vpc=vpc
)
link = apigateway.VpcLink(self, "link",
    targets=[nlb]
)

integration = apigateway.Integration(
    type=apigateway.IntegrationType.HTTP_PROXY,
    integration_http_method="ANY",
    options=apigateway.IntegrationOptions(
        connection_type=apigateway.ConnectionType.VPC_LINK,
        vpc_link=link
    )
)

Attributes

integration_http_method

The integration’s HTTP method type.

Required unless you use a MOCK integration.

options

Integration options.

type

Specifies an API method integration type.

uri

The Uniform Resource Identifier (URI) for the integration.

  • If you specify HTTP for the type property, specify the API endpoint URL.

  • If you specify MOCK for the type property, don’t specify this property.

  • If you specify AWS for the type property, specify an AWS service that follows this form: arn:partition:apigateway:region:subdomain.service|service:path|action/service_api. For example, a Lambda function URI follows this form: arn:partition:apigateway:region:lambda:path/path. The path is usually in the form /2015-03-31/functions/LambdaFunctionARN/invocations.

See:

https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri