Show / Hide Table of Contents

Class MethodResponse

Inheritance
System.Object
MethodResponse
Implements
IMethodResponse
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MethodResponse : Object, IMethodResponse
Syntax (vb)
Public Class MethodResponse
    Inherits Object
    Implements IMethodResponse
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;

Model model;

var methodResponse = new MethodResponse {
    StatusCode = "statusCode",

    // the properties below are optional
    ResponseModels = new Dictionary<string, IModel> {
        { "responseModelsKey", model }
    },
    ResponseParameters = new Dictionary<string, boolean> {
        { "responseParametersKey", false }
    }
};

Synopsis

Constructors

MethodResponse()

Properties

ResponseModels

The resources used for the response's content type.

ResponseParameters

Response parameters that API Gateway sends to the client that called a method.

StatusCode

The method response's status code, which you map to an IntegrationResponse.

Constructors

MethodResponse()

public MethodResponse()

Properties

ResponseModels

The resources used for the response's content type.

public IDictionary<string, IModel> ResponseModels { get; set; }
Property Value

System.Collections.Generic.IDictionary<System.String, IModel>

Remarks

Specify response models as key-value pairs (string-to-string maps), with a content type as the key and a Model resource name as the value.

Default: None

ResponseParameters

Response parameters that API Gateway sends to the client that called a method.

public IDictionary<string, bool> ResponseParameters { get; set; }
Property Value

System.Collections.Generic.IDictionary<System.String, System.Boolean>

Remarks

Specify response parameters as key-value pairs (string-to-Boolean maps), with a destination as the key and a Boolean as the value. Specify the destination using the following pattern: method.response.header.name, where the name is a valid, unique header name. The Boolean specifies whether a parameter is required.

Default: None

StatusCode

The method response's status code, which you map to an IntegrationResponse.

public string StatusCode { get; set; }
Property Value

System.String

Remarks

Required.

Implements

IMethodResponse
Back to top Generated by DocFX