ProxyResourceOptions Struct
Example
ts
declare const resource: apigateway.Resource;
declare const handler: lambda.Function;
const proxy = resource.addProxy({
defaultIntegration: new apigateway.LambdaIntegration(handler),
// "false" will require explicitly adding methods on the `proxy` resource
anyMethod: true // "true" is the default
});
Properties
anyMethodoptionalbooleanany_methodoptionalboolanyMethodoptionalBooleanAnyMethodoptionalboolAnyMethodoptional*bool= true#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.
defaultCorsPreflightOptionsoptionalCorsOptionsdefault_cors_preflight_optionsoptionalCorsOptionsdefaultCorsPreflightOptionsoptionalCorsOptionsDefaultCorsPreflightOptionsoptionalCorsOptionsDefaultCorsPreflightOptionsoptionalCorsOptions#Adds a CORS preflight OPTIONS method to this resource and all child resources.
Default: CORS is disabled
You can add CORS at the resource-level using addCorsPreflight.
defaultIntegrationoptionalIntegrationdefault_integrationoptionalIntegrationdefaultIntegrationoptionalIntegrationDefaultIntegrationoptionalIntegrationDefaultIntegrationoptionalIntegration#An integration to use as a default for all methods created within this API unless an integration is specified.
Default: Inherited from parent.
defaultMethodOptionsoptionalMethodOptionsdefault_method_optionsoptionalMethodOptionsdefaultMethodOptionsoptionalMethodOptionsDefaultMethodOptionsoptionalMethodOptionsDefaultMethodOptionsoptionalMethodOptions#Method options to use as a default for all methods created within this API unless custom options are specified.
Default: Inherited from parent.