Table of Contents

Class CfnGatewayResponse

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

A CloudFormation AWS::ApiGateway::GatewayResponse.

public class CfnGatewayResponse : CfnResource, IInspectable
Inheritance
CfnGatewayResponse
Implements
IInspectable

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;

             var cfnGatewayResponse = new CfnGatewayResponse(this, "MyCfnGatewayResponse", new CfnGatewayResponseProps {
                 ResponseType = "responseType",
                 RestApiId = "restApiId",

                 // the properties below are optional
                 ResponseParameters = new Dictionary<string, string> {
                     { "responseParametersKey", "responseParameters" }
                 },
                 ResponseTemplates = new Dictionary<string, string> {
                     { "responseTemplatesKey", "responseTemplates" }
                 },
                 StatusCode = "statusCode"
             });

Remarks

The AWS::ApiGateway::GatewayResponse resource creates a gateway response for your API. For more information, see API Gateway Responses in the API Gateway Developer Guide .

CloudformationResource: AWS::ApiGateway::GatewayResponse

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html

ExampleMetadata: fixture=_generated

Constructors

CfnGatewayResponse(Construct, string, ICfnGatewayResponseProps)

Create a new AWS::ApiGateway::GatewayResponse.

public CfnGatewayResponse(Construct scope, string id, ICfnGatewayResponseProps props)

Parameters

scope Construct
  • scope in which this resource is defined.
id string
  • scoped id of the resource.
props ICfnGatewayResponseProps
  • resource properties.

Properties

AttrId

The ID for the gateway response.

public virtual string AttrId { get; }

Property Value

string

Remarks

For example: abc123 .

CloudformationAttribute: Id

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }

Property Value

string

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }

Property Value

IDictionary<string, object>

ResponseParameters

Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.

public virtual object? ResponseParameters { get; set; }

Property Value

object

Remarks

ResponseTemplates

Response templates of the GatewayResponse as a string-to-string map of key-value pairs.

public virtual object? ResponseTemplates { get; set; }

Property Value

object

Remarks

ResponseType

The response type of the associated GatewayResponse.

public virtual string ResponseType { get; set; }

Property Value

string

Remarks

RestApiId

The string identifier of the associated RestApi.

public virtual string RestApiId { get; set; }

Property Value

string

Remarks

StatusCode

The HTTP status code for this GatewayResponse.

public virtual string? StatusCode { get; set; }

Property Value

string

Remarks

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)

Parameters

inspector TreeInspector
  • tree inspector to collect and process attributes.

RenderProperties(IDictionary<string, object>)

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)

Parameters

props IDictionary<string, object>

Returns

IDictionary<string, object>