Skip to content
v2.278.0

ContentHandling Enum ​

Example ​

ts
declare const getBookHandler: lambda.Function;
declare const getBookIntegration: apigateway.LambdaIntegration;

const getBookIntegration = new apigateway.LambdaIntegration(getBookHandler, {
  contentHandling: apigateway.ContentHandling.CONVERT_TO_TEXT, // convert to base64
  credentialsPassthrough: true, // use caller identity to invoke the function
});
python
# get_book_handler: lambda.Function
# get_book_integration: apigateway.LambdaIntegration


get_book_integration = apigateway.LambdaIntegration(get_book_handler,
    content_handling=apigateway.ContentHandling.CONVERT_TO_TEXT,  # convert to base64
    credentials_passthrough=True
)
java
Function getBookHandler;
LambdaIntegration getBookIntegration;


LambdaIntegration getBookIntegration = LambdaIntegration.Builder.create(getBookHandler)
        .contentHandling(ContentHandling.CONVERT_TO_TEXT) // convert to base64
        .credentialsPassthrough(true)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Function getBookHandler;
LambdaIntegration getBookIntegration;


var getBookIntegration = new LambdaIntegration(getBookHandler, new LambdaIntegrationOptions {
    ContentHandling = ContentHandling.CONVERT_TO_TEXT,  // convert to base64
    CredentialsPassthrough = true
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var getBookHandler Function
var getBookIntegration LambdaIntegration


getBookIntegration := apigateway.NewLambdaIntegration(getBookHandler, &LambdaIntegrationOptions{
	ContentHandling: apigateway.ContentHandling_CONVERT_TO_TEXT,
	 // convert to base64
	CredentialsPassthrough: jsii.Boolean(true),
})

Members ​

MemberDescription
CONVERT_TO_BINARYConverts a request payload from a base64-encoded string to a binary blob.
CONVERT_TO_TEXTConverts a request payload from a binary blob to a base64-encoded string.

Referenced by ​

  • IntegrationOptions.contentHandlingcontent_handlingcontentHandlingContentHandlingContentHandling
  • IntegrationResponse.contentHandlingcontent_handlingcontentHandlingContentHandlingContentHandling