Table of Contents

Class ProxyResource

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

Defines a {proxy+} greedy resource and an ANY method on a route.

public class ProxyResource : Resource, IResource, IResource, IConstruct, IConstruct, IDependable
Inheritance
ProxyResource
Implements
IResource
IConstruct
IConstruct
IDependable
Inherited Members

Examples

Resource resource;
             Function handler;

             var proxy = resource.AddProxy(new ProxyResourceOptions {
                 DefaultIntegration = new LambdaIntegration(handler),

                 // "false" will require explicitly adding methods on the `proxy` resource
                 AnyMethod = true
             });

Remarks

Constructors

ProxyResource(Construct, string, IProxyResourceProps)

public ProxyResource(Construct scope, string id, IProxyResourceProps props)

Parameters

scope Construct
id string
props IProxyResourceProps

Properties

AnyMethod

If props.anyMethod is true, this will be the reference to the 'ANY' method associated with this proxy resource.

public virtual Method? AnyMethod { get; }

Property Value

Method

Methods

AddMethod(string, Integration?, IMethodOptions?)

Defines a new method for this resource.

public override Method AddMethod(string httpMethod, Integration? integration = null, IMethodOptions? options = null)

Parameters

httpMethod string
integration Integration
options IMethodOptions

Returns

Method