Interface IRestApi
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public interface IRestApi : IResource, IConstruct, IConstruct, IDependable
Properties
DeploymentStage
API Gateway stage that points to the latest deployment (if defined).
Stage DeploymentStage { get; set; }
Property Value
LatestDeployment
API Gateway deployment that represents the latest changes of the API.
Deployment? LatestDeployment { get; }
Property Value
Remarks
This resource will be automatically updated every time the REST API model changes.
undefined
when no deployment is configured.
RestApiId
The ID of this API Gateway RestApi.
string RestApiId { get; }
Property Value
Remarks
Attribute: true
RestApiRootResourceId
The resource ID of the root resource.
string RestApiRootResourceId { get; }
Property Value
Remarks
Attribute: true
Root
Represents the root resource ("/") of this API. Use it to define the API model:.
IResource Root { get; }
Property Value
Remarks
api.root.addMethod('ANY', redirectToHomePage); // "ANY /" api.root.addResource('friends').addMethod('GET', getFriendsHandler); // "GET /friends"
Methods
ArnForExecuteApi(string?, string?, string?)
Gets the "execute-api" ARN.
string ArnForExecuteApi(string? method = null, string? path = null, string? stage = null)
Parameters
method
stringThe method (default
*
).path
stringThe resource path.
stage
stringThe stage (default
*
).
Returns
- string
The "execute-api" ARN.
Remarks
Default: "*" returns the execute API ARN for all methods/resources in this API.