Table of Contents

Class ProxyResourceOptions

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll
public class ProxyResourceOptions : IProxyResourceOptions, IResourceOptions
Inheritance
ProxyResourceOptions
Implements
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

ExampleMetadata: infused

Constructors

ProxyResourceOptions()

public ProxyResourceOptions()

Properties

AnyMethod

Adds an "ANY" method to this resource.

public bool? AnyMethod { get; set; }

Property Value

bool?

Remarks

If set to false, you will have to explicitly add methods to this resource after it's created.

Default: true

DefaultCorsPreflightOptions

Adds a CORS preflight OPTIONS method to this resource and all child resources.

public ICorsOptions? DefaultCorsPreflightOptions { get; set; }

Property Value

ICorsOptions

Remarks

You can add CORS at the resource-level using addCorsPreflight.

Default: - CORS is disabled

DefaultIntegration

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

public Integration? DefaultIntegration { get; set; }

Property Value

Integration

Remarks

Default: - Inherited from parent.

DefaultMethodOptions

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

public IMethodOptions? DefaultMethodOptions { get; set; }

Property Value

IMethodOptions

Remarks

Default: - Inherited from parent.