Class ProxyResource.Builder

java.lang.Object
software.amazon.awscdk.services.apigateway.ProxyResource.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ProxyResource>
Enclosing class:
ProxyResource

@Stability(Stable) public static final class ProxyResource.Builder extends Object implements software.amazon.jsii.Builder<ProxyResource>
A fluent builder for ProxyResource.
  • Method Details

    • create

      @Stability(Stable) public static ProxyResource.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ProxyResource.Builder.
    • defaultCorsPreflightOptions

      @Stability(Stable) public ProxyResource.Builder defaultCorsPreflightOptions(CorsOptions defaultCorsPreflightOptions)
      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

      Parameters:
      defaultCorsPreflightOptions - Adds a CORS preflight OPTIONS method to this resource and all child resources. This parameter is required.
      Returns:
      this
    • defaultIntegration

      @Stability(Stable) public ProxyResource.Builder defaultIntegration(Integration defaultIntegration)
      An integration to use as a default for all methods created within this API unless an integration is specified.

      Default: - Inherited from parent.

      Parameters:
      defaultIntegration - An integration to use as a default for all methods created within this API unless an integration is specified. This parameter is required.
      Returns:
      this
    • defaultMethodOptions

      @Stability(Stable) public ProxyResource.Builder defaultMethodOptions(MethodOptions defaultMethodOptions)
      Method options to use as a default for all methods created within this API unless custom options are specified.

      Default: - Inherited from parent.

      Parameters:
      defaultMethodOptions - Method options to use as a default for all methods created within this API unless custom options are specified. This parameter is required.
      Returns:
      this
    • anyMethod

      @Stability(Stable) public ProxyResource.Builder anyMethod(Boolean anyMethod)
      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

      Parameters:
      anyMethod - Adds an "ANY" method to this resource. This parameter is required.
      Returns:
      this
    • parent

      @Stability(Stable) public ProxyResource.Builder parent(IResource parent)
      The parent resource of this resource.

      You can either pass another Resource object or a RestApi object here.

      Parameters:
      parent - The parent resource of this resource. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ProxyResource build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ProxyResource>
      Returns:
      a newly built instance of ProxyResource.