Skip to content
v2.275.0

ResourceOptions Struct ​

Example ​

ts
declare const resource: apigateway.Resource;

const subtree = resource.addResource('subtree', {
  defaultCorsPreflightOptions: {
    allowOrigins: [ 'https://amazon.com' ]
  }
});

Properties ​

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.