IntegrationResponse
Manages an Amazon API Gateway Version 2 integration response. More information can be found in the Amazon API Gateway Developer Guide.
Example Usage
Basic
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.ApiGatewayV2.IntegrationResponse("example", new Aws.ApiGatewayV2.IntegrationResponseArgs
{
ApiId = aws_apigatewayv2_api.Example.Id,
IntegrationId = aws_apigatewayv2_integration.Example.Id,
IntegrationResponseKey = "/200/",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigatewayv2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigatewayv2.NewIntegrationResponse(ctx, "example", &apigatewayv2.IntegrationResponseArgs{
ApiId: pulumi.String(aws_apigatewayv2_api.Example.Id),
IntegrationId: pulumi.String(aws_apigatewayv2_integration.Example.Id),
IntegrationResponseKey: pulumi.String("/200/"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.IntegrationResponse("example",
api_id=aws_apigatewayv2_api["example"]["id"],
integration_id=aws_apigatewayv2_integration["example"]["id"],
integration_response_key="/200/")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigatewayv2.IntegrationResponse("example", {
apiId: aws_apigatewayv2_api_example.id,
integrationId: aws_apigatewayv2_integration_example.id,
integrationResponseKey: "/200/",
});Create a IntegrationResponse Resource
new IntegrationResponse(name: string, args: IntegrationResponseArgs, opts?: CustomResourceOptions);def IntegrationResponse(resource_name, opts=None, api_id=None, content_handling_strategy=None, integration_id=None, integration_response_key=None, response_templates=None, template_selection_expression=None, __props__=None);func NewIntegrationResponse(ctx *Context, name string, args IntegrationResponseArgs, opts ...ResourceOption) (*IntegrationResponse, error)public IntegrationResponse(string name, IntegrationResponseArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
IntegrationResponse Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The IntegrationResponse resource accepts the following input properties:
- Api
Id string The API identifier.
- Integration
Id string The identifier of the
aws.apigatewayv2.Integration.- Integration
Response stringKey The 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> A 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 The API identifier.
- Integration
Id string The identifier of the
aws.apigatewayv2.Integration.- Integration
Response stringKey The 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 A 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 The API identifier.
- integration
Id string The identifier of the
aws.apigatewayv2.Integration.- integration
Response stringKey The 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} A 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 The API identifier.
- integration_
id str The identifier of the
aws.apigatewayv2.Integration.- integration_
response_ strkey The integration response key.
- content_
handling_ strstrategy How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY,CONVERT_TO_TEXT.- response_
templates Dict[str, str] A 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the IntegrationResponse resource produces the following output properties:
Look up an 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): IntegrationResponsestatic get(resource_name, id, opts=None, api_id=None, content_handling_strategy=None, integration_id=None, integration_response_key=None, response_templates=None, template_selection_expression=None, __props__=None);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)- 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.
The following state arguments are supported:
- Api
Id string The API identifier.
- Content
Handling stringStrategy How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY,CONVERT_TO_TEXT.- Integration
Id string The identifier of the
aws.apigatewayv2.Integration.- Integration
Response stringKey The integration response key.
- Response
Templates Dictionary<string, string> A 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 The API identifier.
- Content
Handling stringStrategy How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY,CONVERT_TO_TEXT.- Integration
Id string The identifier of the
aws.apigatewayv2.Integration.- Integration
Response stringKey The integration response key.
- Response
Templates map[string]string A 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 The API identifier.
- content
Handling stringStrategy How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY,CONVERT_TO_TEXT.- integration
Id string The identifier of the
aws.apigatewayv2.Integration.- integration
Response stringKey The integration response key.
- response
Templates {[key: string]: string} A 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 The API identifier.
- content_
handling_ strstrategy How to handle response payload content type conversions. Valid values:
CONVERT_TO_BINARY,CONVERT_TO_TEXT.- integration_
id str The identifier of the
aws.apigatewayv2.Integration.- integration_
response_ strkey The integration response key.
- response_
templates Dict[str, str] A 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.