interface IntegrationConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGateway.IntegrationConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#IntegrationConfig |
Java | software.amazon.awscdk.services.apigateway.IntegrationConfig |
Python | aws_cdk.aws_apigateway.IntegrationConfig |
TypeScript (source) | aws-cdk-lib » aws_apigateway » IntegrationConfig |
Obtainable from
Aws
.bind()
, Integration
.bind()
, Lambda
.bind()
, Sagemaker
.bind()
Result of binding an Integration to a Method.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const role: iam.Role;
declare const vpcLink: apigateway.VpcLink;
const integrationConfig: apigateway.IntegrationConfig = {
type: apigateway.IntegrationType.AWS,
// the properties below are optional
deploymentToken: 'deploymentToken',
integrationHttpMethod: 'integrationHttpMethod',
options: {
cacheKeyParameters: ['cacheKeyParameters'],
cacheNamespace: 'cacheNamespace',
connectionType: apigateway.ConnectionType.INTERNET,
contentHandling: apigateway.ContentHandling.CONVERT_TO_BINARY,
credentialsPassthrough: false,
credentialsRole: role,
integrationResponses: [{
statusCode: 'statusCode',
// the properties below are optional
contentHandling: apigateway.ContentHandling.CONVERT_TO_BINARY,
responseParameters: {
responseParametersKey: 'responseParameters',
},
responseTemplates: {
responseTemplatesKey: 'responseTemplates',
},
selectionPattern: 'selectionPattern',
}],
passthroughBehavior: apigateway.PassthroughBehavior.WHEN_NO_MATCH,
requestParameters: {
requestParametersKey: 'requestParameters',
},
requestTemplates: {
requestTemplatesKey: 'requestTemplates',
},
timeout: cdk.Duration.minutes(30),
vpcLink: vpcLink,
},
uri: 'uri',
};
Properties
Name | Type | Description |
---|---|---|
type | Integration | Specifies an API method integration type. |
deployment | string | This value is included in computing the Deployment's fingerprint. |
integration | string | The integration's HTTP method type. |
options? | Integration | Integration options. |
uri? | string | The Uniform Resource Identifier (URI) for the integration. |
type
Type:
Integration
Specifies an API method integration type.
deploymentToken?
Type:
string
(optional, default: undefined deployments are not triggered for any change to this integration.)
This value is included in computing the Deployment's fingerprint.
When the fingerprint changes, a new deployment is triggered. This property should contain values associated with the Integration that upon changing should trigger a fresh the Deployment needs to be refreshed.
integrationHttpMethod?
Type:
string
(optional, default: no integration method specified.)
The integration's HTTP method type.
Required unless you use a MOCK integration.
options?
Type:
Integration
(optional, default: no integration options)
Integration options.
uri?
Type:
string
(optional, default: no URI. Usually applies to MOCK integration)
The Uniform Resource Identifier (URI) for the integration.
See also: https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri