Class IResource.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.IResource.Jsii$Proxy
All Implemented Interfaces:
IResource, IResource.Jsii$Default, IResource, IResource.Jsii$Default, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default
Enclosing interface:
IResource

@Internal public static final class IResource.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IResource.Jsii$Default
A proxy class which represents a concrete javascript instance of this type.
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
  • Method Details

    • getNode

      @Stability(Stable) @NotNull public final software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface software.constructs.IConstruct
      Specified by:
      getNode in interface software.constructs.IConstruct.Jsii$Default
      Specified by:
      getNode in interface IResource.Jsii$Default
      Specified by:
      getNode in interface IResource.Jsii$Default
    • getEnv

      @Stability(Stable) @NotNull public final ResourceEnvironment getEnv()
      The environment this resource belongs to.

      For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

      Specified by:
      getEnv in interface IResource
      Specified by:
      getEnv in interface IResource.Jsii$Default
      Specified by:
      getEnv in interface IResource.Jsii$Default
    • getStack

      @Stability(Stable) @NotNull public final Stack getStack()
      The stack in which this resource is defined.
      Specified by:
      getStack in interface IResource
      Specified by:
      getStack in interface IResource.Jsii$Default
      Specified by:
      getStack in interface IResource.Jsii$Default
    • getApi

      @Stability(Stable) @NotNull public final IRestApi getApi()
      The rest API that this resource is part of.

      The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.

      Specified by:
      getApi in interface IResource
      Specified by:
      getApi in interface IResource.Jsii$Default
    • getPath

      @Stability(Stable) @NotNull public final String getPath()
      The full path of this resource.
      Specified by:
      getPath in interface IResource
      Specified by:
      getPath in interface IResource.Jsii$Default
    • getResourceId

      @Stability(Stable) @NotNull public final String getResourceId()
      The ID of the resource.
      Specified by:
      getResourceId in interface IResource
      Specified by:
      getResourceId in interface IResource.Jsii$Default
    • getDefaultCorsPreflightOptions

      @Stability(Stable) @Nullable public final CorsOptions getDefaultCorsPreflightOptions()
      Default options for CORS preflight OPTIONS method.
      Specified by:
      getDefaultCorsPreflightOptions in interface IResource
      Specified by:
      getDefaultCorsPreflightOptions in interface IResource.Jsii$Default
    • getDefaultIntegration

      @Stability(Stable) @Nullable public final Integration getDefaultIntegration()
      An integration to use as a default for all methods created within this API unless an integration is specified.
      Specified by:
      getDefaultIntegration in interface IResource
      Specified by:
      getDefaultIntegration in interface IResource.Jsii$Default
    • getDefaultMethodOptions

      @Stability(Stable) @Nullable public final MethodOptions getDefaultMethodOptions()
      Method options to use as a default for all methods created within this API unless custom options are specified.
      Specified by:
      getDefaultMethodOptions in interface IResource
      Specified by:
      getDefaultMethodOptions in interface IResource.Jsii$Default
    • getParentResource

      @Stability(Stable) @Nullable public final IResource getParentResource()
      The parent of this resource or undefined for the root resource.
      Specified by:
      getParentResource in interface IResource
      Specified by:
      getParentResource in interface IResource.Jsii$Default
    • applyRemovalPolicy

      @Stability(Stable) public final void applyRemovalPolicy(@NotNull RemovalPolicy policy)
      Apply the given removal policy to this resource.

      The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

      The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

      Specified by:
      applyRemovalPolicy in interface IResource
      Specified by:
      applyRemovalPolicy in interface IResource.Jsii$Default
      Specified by:
      applyRemovalPolicy in interface IResource.Jsii$Default
      Parameters:
      policy - This parameter is required.
    • addCorsPreflight

      @Stability(Stable) @NotNull public final Method addCorsPreflight(@NotNull CorsOptions options)
      Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.

      Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.

      Specified by:
      addCorsPreflight in interface IResource
      Specified by:
      addCorsPreflight in interface IResource.Jsii$Default
      Parameters:
      options - CORS options. This parameter is required.
      Returns:
      a Method object
      See Also:
    • addMethod

      @Stability(Stable) @NotNull public final Method addMethod(@NotNull String httpMethod, @Nullable Integration target, @Nullable MethodOptions options)
      Defines a new method for this resource.

      Specified by:
      addMethod in interface IResource
      Specified by:
      addMethod in interface IResource.Jsii$Default
      Parameters:
      httpMethod - The HTTP method. This parameter is required.
      target - The target backend integration for this method.
      options - Method options, such as authentication.
      Returns:
      The newly created Method object.
    • addMethod

      @Stability(Stable) @NotNull public final Method addMethod(@NotNull String httpMethod, @Nullable Integration target)
      Defines a new method for this resource.

      Specified by:
      addMethod in interface IResource
      Parameters:
      httpMethod - The HTTP method. This parameter is required.
      target - The target backend integration for this method.
      Returns:
      The newly created Method object.
    • addMethod

      @Stability(Stable) @NotNull public final Method addMethod(@NotNull String httpMethod)
      Defines a new method for this resource.

      Specified by:
      addMethod in interface IResource
      Parameters:
      httpMethod - The HTTP method. This parameter is required.
      Returns:
      The newly created Method object.
    • addProxy

      @Stability(Stable) @NotNull public final ProxyResource addProxy(@Nullable ProxyResourceOptions options)
      Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.

      Specified by:
      addProxy in interface IResource
      Specified by:
      addProxy in interface IResource.Jsii$Default
      Parameters:
      options - Default integration and method options.
    • addProxy

      @Stability(Stable) @NotNull public final ProxyResource addProxy()
      Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
      Specified by:
      addProxy in interface IResource
    • addResource

      @Stability(Stable) @NotNull public final Resource addResource(@NotNull String pathPart, @Nullable ResourceOptions options)
      Defines a new child resource where this resource is the parent.

      Specified by:
      addResource in interface IResource
      Specified by:
      addResource in interface IResource.Jsii$Default
      Parameters:
      pathPart - The path part for the child resource. This parameter is required.
      options - Resource options.
      Returns:
      A Resource object
    • addResource

      @Stability(Stable) @NotNull public final Resource addResource(@NotNull String pathPart)
      Defines a new child resource where this resource is the parent.

      Specified by:
      addResource in interface IResource
      Parameters:
      pathPart - The path part for the child resource. This parameter is required.
      Returns:
      A Resource object
    • getResource

      @Stability(Stable) @Nullable public final IResource getResource(@NotNull String pathPart)
      Retrieves a child resource by path part.

      Specified by:
      getResource in interface IResource
      Specified by:
      getResource in interface IResource.Jsii$Default
      Parameters:
      pathPart - The path part of the child resource. This parameter is required.
      Returns:
      the child resource or undefined if not found
    • resourceForPath

      @Stability(Stable) @NotNull public final Resource resourceForPath(@NotNull String path)
      Gets or create all resources leading up to the specified path.

      • Path may only start with "/" if this method is called on the root resource.
      • All resources are created using default options.

      Specified by:
      resourceForPath in interface IResource
      Specified by:
      resourceForPath in interface IResource.Jsii$Default
      Parameters:
      path - The relative path. This parameter is required.
      Returns:
      a new or existing resource.