aws.apigatewayv2.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 System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ApiGatewayV2.RouteResponse("example", new()
{
ApiId = aws_apigatewayv2_api.Example.Id,
RouteId = aws_apigatewayv2_route.Example.Id,
RouteResponseKey = "$default",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/apigatewayv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigatewayv2.NewRouteResponse(ctx, "example", &apigatewayv2.RouteResponseArgs{
ApiId: pulumi.Any(aws_apigatewayv2_api.Example.Id),
RouteId: pulumi.Any(aws_apigatewayv2_route.Example.Id),
RouteResponseKey: pulumi.String("$default"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigatewayv2.RouteResponse;
import com.pulumi.aws.apigatewayv2.RouteResponseArgs;
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 RouteResponse("example", RouteResponseArgs.builder()
.apiId(aws_apigatewayv2_api.example().id())
.routeId(aws_apigatewayv2_route.example().id())
.routeResponseKey("$default")
.build());
}
}
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",
});
resources:
example:
type: aws:apigatewayv2:RouteResponse
properties:
apiId: ${aws_apigatewayv2_api.example.id}
routeId: ${aws_apigatewayv2_route.example.id}
routeResponseKey: $default
Create RouteResponse Resource
new RouteResponse(name: string, args: RouteResponseArgs, opts?: CustomResourceOptions);
@overload
def RouteResponse(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_id: Optional[str] = None,
model_selection_expression: Optional[str] = None,
response_models: Optional[Mapping[str, str]] = None,
route_id: Optional[str] = None,
route_response_key: Optional[str] = None)
@overload
def RouteResponse(resource_name: str,
args: RouteResponseArgs,
opts: Optional[ResourceOptions] = None)
func NewRouteResponse(ctx *Context, name string, args RouteResponseArgs, opts ...ResourceOption) (*RouteResponse, error)
public RouteResponse(string name, RouteResponseArgs args, CustomResourceOptions? opts = null)
public RouteResponse(String name, RouteResponseArgs args)
public RouteResponse(String name, RouteResponseArgs args, CustomResourceOptions options)
type: aws:apigatewayv2:RouteResponse
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args RouteResponseArgs
- 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 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.
- name String
- The unique name of the resource.
- args RouteResponseArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The RouteResponse resource accepts the following input properties:
- Api
Id string API identifier.
- Route
Id string Identifier of the
aws.apigatewayv2.Route
.- Route
Response stringKey Route response key.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models Dictionary<string, string> Response models for the route response.
- Api
Id string API identifier.
- Route
Id string Identifier of the
aws.apigatewayv2.Route
.- Route
Response stringKey Route response key.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models map[string]string Response models for the route response.
- api
Id String API identifier.
- route
Id String Identifier of the
aws.apigatewayv2.Route
.- route
Response StringKey Route response key.
- model
Selection StringExpression The model selection expression for the route response.
- response
Models Map<String,String> Response models for the route response.
- api
Id string API identifier.
- route
Id string Identifier of the
aws.apigatewayv2.Route
.- route
Response stringKey Route response key.
- model
Selection stringExpression The model selection expression for the route response.
- response
Models {[key: string]: string} Response models for the route response.
- api_
id str API identifier.
- route_
id str Identifier of the
aws.apigatewayv2.Route
.- route_
response_ strkey Route response key.
- model_
selection_ strexpression The model selection expression for the route response.
- response_
models Mapping[str, str] Response models for the route response.
- api
Id String API identifier.
- route
Id String Identifier of the
aws.apigatewayv2.Route
.- route
Response StringKey Route response key.
- model
Selection StringExpression The model selection expression for the route response.
- response
Models Map<String> 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:
- 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 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): RouteResponse
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_id: Optional[str] = None,
model_selection_expression: Optional[str] = None,
response_models: Optional[Mapping[str, str]] = None,
route_id: Optional[str] = None,
route_response_key: Optional[str] = None) -> RouteResponse
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)
public static RouteResponse get(String name, Output<String> id, RouteResponseState 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.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models Dictionary<string, string> Response models for the route response.
- Route
Id string Identifier of the
aws.apigatewayv2.Route
.- Route
Response stringKey Route response key.
- Api
Id string API identifier.
- Model
Selection stringExpression The model selection expression for the route response.
- Response
Models map[string]string Response models for the route response.
- Route
Id string Identifier of the
aws.apigatewayv2.Route
.- Route
Response stringKey Route response key.
- api
Id String API identifier.
- model
Selection StringExpression The model selection expression for the route response.
- response
Models Map<String,String> Response models for the route response.
- route
Id String Identifier of the
aws.apigatewayv2.Route
.- route
Response StringKey Route response key.
- api
Id string API identifier.
- model
Selection stringExpression The model selection expression for the route response.
- response
Models {[key: string]: string} Response models for the route response.
- route
Id string Identifier of the
aws.apigatewayv2.Route
.- route
Response stringKey Route response key.
- api_
id str API identifier.
- model_
selection_ strexpression The model selection expression for the route response.
- response_
models Mapping[str, str] Response models for the route response.
- route_
id str Identifier of the
aws.apigatewayv2.Route
.- route_
response_ strkey Route response key.
- api
Id String API identifier.
- model
Selection StringExpression The model selection expression for the route response.
- response
Models Map<String> Response models for the route response.
- route
Id String Identifier of the
aws.apigatewayv2.Route
.- route
Response StringKey Route response key.
Import
aws_apigatewayv2_route_response
can be imported by using the API identifier, route identifier and route response identifier, e.g.,
$ pulumi import aws:apigatewayv2/routeResponse:RouteResponse example aabbccddee/1122334/998877
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.