Interface IRestApi

All Superinterfaces:
IConstruct, software.constructs.IConstruct, IDependable, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IRestApi.Jsii$Default
All Known Implementing Classes:
IRestApi.Jsii$Proxy, LambdaRestApi, RestApi, RestApiBase, SpecRestApi, StepFunctionsRestApi

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.954Z") @Stability(Stable) public interface IRestApi extends software.amazon.jsii.JsiiSerializable, IResource
  • Method Details

    • getRestApiId

      @Stability(Stable) @NotNull String getRestApiId()
      The ID of this API Gateway RestApi.
    • getRestApiRootResourceId

      @Stability(Stable) @NotNull String getRestApiRootResourceId()
      The resource ID of the root resource.
    • getRoot

      @Stability(Stable) @NotNull 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"

    • 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.

    • getDeploymentStage

      @Stability(Stable) @NotNull Stage getDeploymentStage()
      API Gateway stage that points to the latest deployment (if defined).
    • setDeploymentStage

      void setDeploymentStage(@NotNull Stage value)
      API Gateway stage that points to the latest deployment (if defined).
    • arnForExecuteApi

      @Stability(Stable) @NotNull 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.

      Parameters:
      method - The method (default *).
      path - The resource path.
      stage - The stage (default *).
      Returns:
      The "execute-api" ARN.
    • arnForExecuteApi

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

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

      Parameters:
      method - The method (default *).
      path - The resource path.
      Returns:
      The "execute-api" ARN.
    • arnForExecuteApi

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

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

      Parameters:
      method - The method (default *).
      Returns:
      The "execute-api" ARN.
    • arnForExecuteApi

      @Stability(Stable) @NotNull String arnForExecuteApi()
      Gets the "execute-api" ARN.

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

      Returns:
      The "execute-api" ARN.