RouteResponse
Manages an Amazon API Gateway Version 2 route 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.RouteResponse("example", new Aws.ApiGatewayV2.RouteResponseArgs
{
ApiId = aws_apigatewayv2_api.Example.Id,
RouteId = aws_apigatewayv2_route.Example.Id,
RouteResponseKey = "$default",
});
}
}
package main
import (
"fmt"
"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.NewRouteResponse(ctx, "example", &apigatewayv2.RouteResponseArgs{
ApiId: pulumi.String(aws_apigatewayv2_api.Example.Id),
RouteId: pulumi.String(aws_apigatewayv2_route.Example.Id),
RouteResponseKey: pulumi.String(fmt.Sprintf("%v%v", "$", "default")),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.RouteResponse("example",
api_id=aws_apigatewayv2_api["example"]["id"],
route_id=aws_apigatewayv2_route["example"]["id"],
route_response_key="$default")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigatewayv2.RouteResponse("example", {
apiId: aws_apigatewayv2_api_example.id,
routeId: aws_apigatewayv2_route_example.id,
routeResponseKey: "$default",
});Create a RouteResponse Resource
new RouteResponse(name: string, args: RouteResponseArgs, opts?: CustomResourceOptions);def RouteResponse(resource_name, opts=None, api_id=None, model_selection_expression=None, response_models=None, route_id=None, route_response_key=None, __props__=None);func NewRouteResponse(ctx *Context, name string, args RouteResponseArgs, opts ...ResourceOption) (*RouteResponse, error)public RouteResponse(string name, RouteResponseArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RouteResponseArgs
- 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 RouteResponseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteResponseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RouteResponse Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RouteResponse resource accepts the following input properties:
- Api
Id string The API identifier.
- Route
Id string The identifier of the
aws.apigatewayv2.Route.- Route
Response stringKey The route response key.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models Dictionary<string, string> The response models for the route response.
- Api
Id string The API identifier.
- Route
Id string The identifier of the
aws.apigatewayv2.Route.- Route
Response stringKey The route response key.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models map[string]string The response models for the route response.
- api
Id string The API identifier.
- route
Id string The identifier of the
aws.apigatewayv2.Route.- route
Response stringKey The route response key.
- model
Selection stringExpression The model selection expression for the route response.
- response
Models {[key: string]: string} The response models for the route response.
- api_
id str The API identifier.
- route_
id str The identifier of the
aws.apigatewayv2.Route.- route_
response_ strkey The route response key.
- model_
selection_ strexpression The model selection expression for the route response.
- response_
models Dict[str, str] The response models for the route response.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteResponse resource produces the following output properties:
Look up an Existing RouteResponse Resource
Get an existing RouteResponse 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?: RouteResponseState, opts?: CustomResourceOptions): RouteResponsestatic get(resource_name, id, opts=None, api_id=None, model_selection_expression=None, response_models=None, route_id=None, route_response_key=None, __props__=None);func GetRouteResponse(ctx *Context, name string, id IDInput, state *RouteResponseState, opts ...ResourceOption) (*RouteResponse, error)public static RouteResponse Get(string name, Input<string> id, RouteResponseState? 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.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models Dictionary<string, string> The response models for the route response.
- Route
Id string The identifier of the
aws.apigatewayv2.Route.- Route
Response stringKey The route response key.
- Api
Id string The API identifier.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models map[string]string The response models for the route response.
- Route
Id string The identifier of the
aws.apigatewayv2.Route.- Route
Response stringKey The route response key.
- api
Id string The API identifier.
- model
Selection stringExpression The model selection expression for the route response.
- response
Models {[key: string]: string} The response models for the route response.
- route
Id string The identifier of the
aws.apigatewayv2.Route.- route
Response stringKey The route response key.
- api_
id str The API identifier.
- model_
selection_ strexpression The model selection expression for the route response.
- response_
models Dict[str, str] The response models for the route response.
- route_
id str The identifier of the
aws.apigatewayv2.Route.- route_
response_ strkey The route response key.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.