AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ProxyResource

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

Import

import { ProxyResource } from 'aws-cdk-lib/aws-apigateway';

Or use the module namespace:

import * as apigateway from 'aws-cdk-lib/aws-apigateway';
// apigateway.ProxyResource

Properties

Configuration passed to the constructor as ProxyResourceProps.

parentRequired
IResource

The parent resource of this resource. You can either pass another `Resource` object or a `RestApi` object here.

1 property inherited from ProxyResourceOptions
anyMethodOptionalinherited from ProxyResourceOptions
boolean

Adds an "ANY" method to this resource. If set to `false`, you will have to explicitly add methods to this resource after it's created.

Default: true

3 properties inherited from ResourceOptions
defaultCorsPreflightOptionsOptionalinherited from ResourceOptions
CorsOptions

Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level using `addCorsPreflight`.

Default: - CORS is disabled

defaultIntegrationOptionalinherited from ResourceOptions
Integration

An integration to use as a default for all methods created within this API unless an integration is specified.

Default: - Inherited from parent.

defaultMethodOptionsOptionalinherited from ResourceOptions
MethodOptions

Method options to use as a default for all methods created within this API unless custom options are specified.

Default: - Inherited from parent.

Get the Amazon API Gateway Cheat Sheet

Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.

Download Free Infographic