Try AWS Native preview for resources not in the classic version.
aws.apigatewayv2.IntegrationResponse
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages an Amazon API Gateway Version 2 integration response. More information can be found in the Amazon API Gateway Developer Guide.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigatewayv2.IntegrationResponse("example", {
apiId: exampleAwsApigatewayv2Api.id,
integrationId: exampleAwsApigatewayv2Integration.id,
integrationResponseKey: "/200/",
});
import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.IntegrationResponse("example",
api_id=example_aws_apigatewayv2_api["id"],
integration_id=example_aws_apigatewayv2_integration["id"],
integration_response_key="/200/")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigatewayv2.NewIntegrationResponse(ctx, "example", &apigatewayv2.IntegrationResponseArgs{
ApiId: pulumi.Any(exampleAwsApigatewayv2Api.Id),
IntegrationId: pulumi.Any(exampleAwsApigatewayv2Integration.Id),
IntegrationResponseKey: pulumi.String("/200/"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ApiGatewayV2.IntegrationResponse("example", new()
{
ApiId = exampleAwsApigatewayv2Api.Id,
IntegrationId = exampleAwsApigatewayv2Integration.Id,
IntegrationResponseKey = "/200/",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigatewayv2.IntegrationResponse;
import com.pulumi.aws.apigatewayv2.IntegrationResponseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new IntegrationResponse("example", IntegrationResponseArgs.builder()
.apiId(exampleAwsApigatewayv2Api.id())
.integrationId(exampleAwsApigatewayv2Integration.id())
.integrationResponseKey("/200/")
.build());
}
}
resources:
example:
type: aws:apigatewayv2:IntegrationResponse
properties:
apiId: ${exampleAwsApigatewayv2Api.id}
integrationId: ${exampleAwsApigatewayv2Integration.id}
integrationResponseKey: /200/
Create IntegrationResponse Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IntegrationResponse(name: string, args: IntegrationResponseArgs, opts?: CustomResourceOptions);
@overload
def IntegrationResponse(resource_name: str,
args: IntegrationResponseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IntegrationResponse(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_id: Optional[str] = None,
integration_id: Optional[str] = None,
integration_response_key: Optional[str] = None,
content_handling_strategy: Optional[str] = None,
response_templates: Optional[Mapping[str, str]] = None,
template_selection_expression: Optional[str] = None)
func NewIntegrationResponse(ctx *Context, name string, args IntegrationResponseArgs, opts ...ResourceOption) (*IntegrationResponse, error)
public IntegrationResponse(string name, IntegrationResponseArgs args, CustomResourceOptions? opts = null)
public IntegrationResponse(String name, IntegrationResponseArgs args)
public IntegrationResponse(String name, IntegrationResponseArgs args, CustomResourceOptions options)
type: aws:apigatewayv2:IntegrationResponse
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IntegrationResponseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IntegrationResponseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IntegrationResponseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IntegrationResponseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IntegrationResponseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsIntegrationResponseResource = new Aws.ApiGatewayV2.IntegrationResponse("awsIntegrationResponseResource", new()
{
ApiId = "string",
IntegrationId = "string",
IntegrationResponseKey = "string",
ContentHandlingStrategy = "string",
ResponseTemplates =
{
{ "string", "string" },
},
TemplateSelectionExpression = "string",
});
example, err := apigatewayv2.NewIntegrationResponse(ctx, "awsIntegrationResponseResource", &apigatewayv2.IntegrationResponseArgs{
ApiId: pulumi.String("string"),
IntegrationId: pulumi.String("string"),
IntegrationResponseKey: pulumi.String("string"),
ContentHandlingStrategy: pulumi.String("string"),
ResponseTemplates: pulumi.StringMap{
"string": pulumi.String("string"),
},
TemplateSelectionExpression: pulumi.String("string"),
})
var awsIntegrationResponseResource = new IntegrationResponse("awsIntegrationResponseResource", IntegrationResponseArgs.builder()
.apiId("string")
.integrationId("string")
.integrationResponseKey("string")
.contentHandlingStrategy("string")
.responseTemplates(Map.of("string", "string"))
.templateSelectionExpression("string")
.build());
aws_integration_response_resource = aws.apigatewayv2.IntegrationResponse("awsIntegrationResponseResource",
api_id="string",
integration_id="string",
integration_response_key="string",
content_handling_strategy="string",
response_templates={
"string": "string",
},
template_selection_expression="string")
const awsIntegrationResponseResource = new aws.apigatewayv2.IntegrationResponse("awsIntegrationResponseResource", {
apiId: "string",
integrationId: "string",
integrationResponseKey: "string",
contentHandlingStrategy: "string",
responseTemplates: {
string: "string",
},
templateSelectionExpression: "string",
});
type: aws:apigatewayv2:IntegrationResponse
properties:
apiId: string
contentHandlingStrategy: string
integrationId: string
integrationResponseKey: string
responseTemplates:
string: string
templateSelectionExpression: string
IntegrationResponse Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The IntegrationResponse resource accepts the following input properties:
- Api
Id string - API identifier.
- Integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - Integration
Response stringKey - Integration response key.
- Content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - Response
Templates Dictionary<string, string> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- Template
Selection stringExpression - The template selection expression for the integration response.
- Api
Id string - API identifier.
- Integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - Integration
Response stringKey - Integration response key.
- Content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - Response
Templates map[string]string - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- Template
Selection stringExpression - The template selection expression for the integration response.
- api
Id String - API identifier.
- integration
Id String - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response StringKey - Integration response key.
- content
Handling StringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - response
Templates Map<String,String> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection StringExpression - The template selection expression for the integration response.
- api
Id string - API identifier.
- integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response stringKey - Integration response key.
- content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - response
Templates {[key: string]: string} - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection stringExpression - The template selection expression for the integration response.
- api_
id str - API identifier.
- integration_
id str - Identifier of the
aws.apigatewayv2.Integration
. - integration_
response_ strkey - Integration response key.
- content_
handling_ strstrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - response_
templates Mapping[str, str] - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template_
selection_ strexpression - The template selection expression for the integration response.
- api
Id String - API identifier.
- integration
Id String - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response StringKey - Integration response key.
- content
Handling StringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - response
Templates Map<String> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection StringExpression - The template selection expression for the integration response.
Outputs
All input properties are implicitly available as output properties. Additionally, the IntegrationResponse resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing IntegrationResponse Resource
Get an existing IntegrationResponse resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IntegrationResponseState, opts?: CustomResourceOptions): IntegrationResponse
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_id: Optional[str] = None,
content_handling_strategy: Optional[str] = None,
integration_id: Optional[str] = None,
integration_response_key: Optional[str] = None,
response_templates: Optional[Mapping[str, str]] = None,
template_selection_expression: Optional[str] = None) -> IntegrationResponse
func GetIntegrationResponse(ctx *Context, name string, id IDInput, state *IntegrationResponseState, opts ...ResourceOption) (*IntegrationResponse, error)
public static IntegrationResponse Get(string name, Input<string> id, IntegrationResponseState? state, CustomResourceOptions? opts = null)
public static IntegrationResponse get(String name, Output<String> id, IntegrationResponseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Id string - API identifier.
- Content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - Integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - Integration
Response stringKey - Integration response key.
- Response
Templates Dictionary<string, string> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- Template
Selection stringExpression - The template selection expression for the integration response.
- Api
Id string - API identifier.
- Content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - Integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - Integration
Response stringKey - Integration response key.
- Response
Templates map[string]string - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- Template
Selection stringExpression - The template selection expression for the integration response.
- api
Id String - API identifier.
- content
Handling StringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - integration
Id String - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response StringKey - Integration response key.
- response
Templates Map<String,String> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection StringExpression - The template selection expression for the integration response.
- api
Id string - API identifier.
- content
Handling stringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - integration
Id string - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response stringKey - Integration response key.
- response
Templates {[key: string]: string} - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection stringExpression - The template selection expression for the integration response.
- api_
id str - API identifier.
- content_
handling_ strstrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - integration_
id str - Identifier of the
aws.apigatewayv2.Integration
. - integration_
response_ strkey - Integration response key.
- response_
templates Mapping[str, str] - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template_
selection_ strexpression - The template selection expression for the integration response.
- api
Id String - API identifier.
- content
Handling StringStrategy - How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY
,CONVERT_TO_TEXT
. - integration
Id String - Identifier of the
aws.apigatewayv2.Integration
. - integration
Response StringKey - Integration response key.
- response
Templates Map<String> - Map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
- template
Selection StringExpression - The template selection expression for the integration response.
Import
Using pulumi import
, import aws_apigatewayv2_integration_response
using the API identifier, integration identifier and integration response identifier. For example:
$ pulumi import aws:apigatewayv2/integrationResponse:IntegrationResponse example aabbccddee/1122334/998877
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.