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
-
IResourceIConstructIConstructIDependable
- 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
See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html
ExampleMetadata: infused
Constructors
ProxyResource(Construct, string, IProxyResourceProps)
public ProxyResource(Construct scope, string id, IProxyResourceProps props)
Parameters
scope
Constructid
stringprops
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
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
stringintegration
Integrationoptions
IMethodOptions