Class Response
Provides an API Gateway Gateway Response for a REST API Gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.ApiGateway.RestApi("main", new Aws.ApiGateway.RestApiArgs
{
});
var test = new Aws.ApiGateway.Response("test", new Aws.ApiGateway.ResponseArgs
{
ResponseParameters =
{
{ "gatewayresponse.header.Authorization", "'Basic'" },
},
ResponseTemplates =
{
{ "application/json", "{'message':$$context.error.messageString}" },
},
ResponseType = "UNAUTHORIZED",
RestApiId = main.Id,
StatusCode = "401",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class Response : CustomResource
Constructors
View SourceResponse(String, ResponseArgs, CustomResourceOptions)
Create a Response resource with the given unique name, arguments, and options.
Declaration
public Response(string name, ResponseArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ResponseArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceResponseParameters
A map specifying the parameters (paths, query strings and headers) of the Gateway Response.
Declaration
public Output<ImmutableDictionary<string, string>> ResponseParameters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
ResponseTemplates
A map specifying the templates used to transform the response body.
Declaration
public Output<ImmutableDictionary<string, string>> ResponseTemplates { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
ResponseType
The response type of the associated GatewayResponse.
Declaration
public Output<string> ResponseType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RestApiId
The string identifier of the associated REST API.
Declaration
public Output<string> RestApiId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StatusCode
The HTTP status code of the Gateway Response.
Declaration
public Output<string> StatusCode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ResponseState, CustomResourceOptions)
Get an existing Response resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Response Get(string name, Input<string> id, ResponseState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ResponseState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Response |