Interface IRestApi.Jsii$Default

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default, IResource, IResource.Jsii$Default, IRestApi,
All Known Implementing Classes:
Enclosing interface:

@Internal public static interface IRestApi.Jsii$Default extends IRestApi, IResource.Jsii$Default
Internal default implementation for IRestApi.
  • Method Details

    • getNode

      @Stability(Stable) @NotNull default 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
    • getEnv

      @Stability(Stable) @NotNull default 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
    • getStack

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

      @Stability(Stable) @NotNull default String getRestApiId()
      The ID of this API Gateway RestApi.
      Specified by:
      getRestApiId in interface IRestApi
    • getRestApiName

      @Stability(Stable) @NotNull default String getRestApiName()
      The name of this API Gateway RestApi.
      Specified by:
      getRestApiName in interface IRestApi
    • getRestApiRootResourceId

      @Stability(Stable) @NotNull default String getRestApiRootResourceId()
      The resource ID of the root resource.
      Specified by:
      getRestApiRootResourceId in interface IRestApi
    • getRoot

      @Stability(Stable) @NotNull default IResource getRoot()
      Represents the root resource ("/") of this API. Use it to define the API model:.

      api.root.addMethod('ANY', redirectToHomePage); // "ANY /" api.root.addResource('friends').addMethod('GET', getFriendsHandler); // "GET /friends"

      Specified by:
      getRoot in interface IRestApi
    • getLatestDeployment

      @Stability(Stable) @Nullable default Deployment getLatestDeployment()
      API Gateway deployment that represents the latest changes of the API.

      This resource will be automatically updated every time the REST API model changes. undefined when no deployment is configured.

      Specified by:
      getLatestDeployment in interface IRestApi
    • getDeploymentStage

      @Stability(Stable) @NotNull default Stage getDeploymentStage()
      API Gateway stage that points to the latest deployment (if defined).
      Specified by:
      getDeploymentStage in interface IRestApi
    • setDeploymentStage

      @Stability(Stable) default void setDeploymentStage(@NotNull Stage value)
      API Gateway stage that points to the latest deployment (if defined).
      Specified by:
      setDeploymentStage in interface IRestApi
    • applyRemovalPolicy

      @Stability(Stable) default 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
      policy - This parameter is required.
    • arnForExecuteApi

      @Stability(Stable) @NotNull default String arnForExecuteApi(@Nullable String method, @Nullable String path, @Nullable String stage)
      Gets the "execute-api" ARN.

      Default: "*" returns the execute API ARN for all methods/resources in this API.

      Specified by:
      arnForExecuteApi in interface IRestApi
      method - The method (default *).
      path - The resource path.
      stage - The stage (default *).
      The "execute-api" ARN.