Show / Hide Table of Contents

Class GatewayResponseProps

Properties for a new gateway response.

Inheritance
object
GatewayResponseProps
Implements
IGatewayResponseProps
IGatewayResponseOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GatewayResponseProps : IGatewayResponseProps, IGatewayResponseOptions
Syntax (vb)
Public Class GatewayResponseProps Implements IGatewayResponseProps, IGatewayResponseOptions
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;

            ResponseType responseType;
            RestApi restApi;

            var gatewayResponseProps = new GatewayResponseProps {
                RestApi = restApi,
                Type = responseType,

                // the properties below are optional
                ResponseHeaders = new Dictionary<string, string> {
                    { "responseHeadersKey", "responseHeaders" }
                },
                StatusCode = "statusCode",
                Templates = new Dictionary<string, string> {
                    { "templatesKey", "templates" }
                }
            };

Synopsis

Constructors

GatewayResponseProps()

Properties for a new gateway response.

Properties

ResponseHeaders

Custom headers parameters for response.

RestApi

Rest api resource to target.

StatusCode

Http status code for response.

Templates

Custom templates to get mapped as response.

Type

Response type to associate with gateway response.

Constructors

GatewayResponseProps()

Properties for a new gateway response.

public GatewayResponseProps()
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;

            ResponseType responseType;
            RestApi restApi;

            var gatewayResponseProps = new GatewayResponseProps {
                RestApi = restApi,
                Type = responseType,

                // the properties below are optional
                ResponseHeaders = new Dictionary<string, string> {
                    { "responseHeadersKey", "responseHeaders" }
                },
                StatusCode = "statusCode",
                Templates = new Dictionary<string, string> {
                    { "templatesKey", "templates" }
                }
            };

Properties

ResponseHeaders

Custom headers parameters for response.

public IDictionary<string, string>? ResponseHeaders { get; set; }
Property Value

IDictionary<string, string>

Remarks

Default: - no headers

RestApi

Rest api resource to target.

public IRestApi RestApi { get; set; }
Property Value

IRestApi

Remarks

ExampleMetadata: fixture=_generated

StatusCode

Http status code for response.

public string? StatusCode { get; set; }
Property Value

string

Remarks

Default: - standard http status code for the response type.

Templates

Custom templates to get mapped as response.

public IDictionary<string, string>? Templates { get; set; }
Property Value

IDictionary<string, string>

Remarks

Default: - Response from api will be returned without applying any transformation.

Type

Response type to associate with gateway response.

public ResponseType_ Type { get; set; }
Property Value

ResponseType_

Remarks

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html

Implements

IGatewayResponseProps
IGatewayResponseOptions
Back to top Generated by DocFX