Show / Hide Table of Contents

Class MethodResponse

Provides an HTTP Method Response for an API Gateway Resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var myDemoAPI = new Aws.ApiGateway.RestApi("myDemoAPI", new Aws.ApiGateway.RestApiArgs
    {
        Description = "This is my API for demonstration purposes",
    });
    var myDemoResource = new Aws.ApiGateway.Resource("myDemoResource", new Aws.ApiGateway.ResourceArgs
    {
        ParentId = myDemoAPI.RootResourceId,
        PathPart = "mydemoresource",
        RestApi = myDemoAPI.Id,
    });
    var myDemoMethod = new Aws.ApiGateway.Method("myDemoMethod", new Aws.ApiGateway.MethodArgs
    {
        Authorization = "NONE",
        HttpMethod = "GET",
        ResourceId = myDemoResource.Id,
        RestApi = myDemoAPI.Id,
    });
    var myDemoIntegration = new Aws.ApiGateway.Integration("myDemoIntegration", new Aws.ApiGateway.IntegrationArgs
    {
        HttpMethod = myDemoMethod.HttpMethod,
        ResourceId = myDemoResource.Id,
        RestApi = myDemoAPI.Id,
        Type = "MOCK",
    });
    var response200 = new Aws.ApiGateway.MethodResponse("response200", new Aws.ApiGateway.MethodResponseArgs
    {
        HttpMethod = myDemoMethod.HttpMethod,
        ResourceId = myDemoResource.Id,
        RestApi = myDemoAPI.Id,
        StatusCode = "200",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
MethodResponse
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 MethodResponse : CustomResource

Constructors

View Source

MethodResponse(String, MethodResponseArgs, CustomResourceOptions)

Create a MethodResponse resource with the given unique name, arguments, and options.

Declaration
public MethodResponse(string name, MethodResponseArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MethodResponseArgs 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

HttpMethod

The HTTP Method (GET, POST, PUT, DELETE, HEAD, OPTIONS, ANY)

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

ResourceId

The API resource ID

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

ResponseModels

A map of the API models used for the response's content type

Declaration
public Output<ImmutableDictionary<string, string>> ResponseModels { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

ResponseParameters

A map of response parameters that can be sent to the caller. For example: response_parameters = { &quot;method.response.header.X-Some-Header&quot; = true } would define that the header X-Some-Header can be provided on the response.

Declaration
public Output<ImmutableDictionary<string, bool>> ResponseParameters { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Boolean>>
View Source

RestApi

The ID of the associated REST API

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

StatusCode

The HTTP status code

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

Methods

View Source

Get(String, Input<String>, MethodResponseState, CustomResourceOptions)

Get an existing MethodResponse resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static MethodResponse Get(string name, Input<string> id, MethodResponseState 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.

MethodResponseState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
MethodResponse
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.