Interface IRestApi
- All Superinterfaces:
software.constructs.IConstruct,software.constructs.IDependable,IEnvironmentAware,IResource,IRestApiRef,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IRestApi.Jsii$Default
- All Known Implementing Classes:
IRestApi.Jsii$Proxy,LambdaRestApi,RestApi,RestApiBase,SpecRestApi,StepFunctionsRestApi
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forIRestApi.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionGets the "execute-api" ARN.arnForExecuteApi(String method) Gets the "execute-api" ARN.arnForExecuteApi(String method, String path) Gets the "execute-api" ARN.arnForExecuteApi(String method, String path, String stage) Gets the "execute-api" ARN.API Gateway stage that points to the latest deployment (if defined).getEnv()The environment this resource belongs to.default DeploymentAPI Gateway deployment that represents the latest changes of the API.software.constructs.NodegetNode()The tree node.The ID of this API Gateway RestApi.The name of this API Gateway RestApi.The resource ID of the root resource.getRoot()Represents the root resource ("/") of this API.voidsetDeploymentStage(Stage value) API Gateway stage that points to the latest deployment (if defined).Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.interfaces.apigateway.IRestApiRef
getRestApiRefMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getRestApiId
The ID of this API Gateway RestApi. -
getRestApiName
The name of this API Gateway RestApi. -
getRestApiRootResourceId
The resource ID of the root resource. -
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
API Gateway deployment that represents the latest changes of the API.This resource will be automatically updated every time the REST API model changes.
undefinedwhen no deployment is configured. -
getDeploymentStage
API Gateway stage that points to the latest deployment (if defined). -
setDeploymentStage
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
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
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
Gets the "execute-api" ARN.Default: "*" returns the execute API ARN for all methods/resources in this API.
- Returns:
- The "execute-api" ARN.
-
getNode
@Stability(Stable) @NotNull software.constructs.Node getNode()The tree node.- Specified by:
getNodein interfacesoftware.constructs.IConstruct
-
getEnv
The environment this resource belongs to.For resources that are created and managed in a Stack (those created by creating new class instances like
new Role(),new Bucket(), etc.), this is always the same as the environment of the stack they belong to.For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(),Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.- Specified by:
getEnvin interfaceIEnvironmentAware
-