Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Response
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class Response : CustomResource

Constructors

View Source

Response(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 Source

ResponseParameters

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>>
View Source

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>>
View Source

ResponseType

The response type of the associated GatewayResponse.

Declaration
public Output<string> ResponseType { get; }
Property Value
Type Description
Output<System.String>
View Source

RestApiId

The string identifier of the associated REST API.

Declaration
public Output<string> RestApiId { get; }
Property Value
Type Description
Output<System.String>
View Source

StatusCode

The HTTP status code of the Gateway Response.

Declaration
public Output<string> StatusCode { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.