Interface IRestApi
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public interface IRestApi : IResource, IConstruct, IDependable
Syntax (vb)
Public Interface IRestApi
Inherits IResource, IConstruct, IConstruct, IDependable
Synopsis
Properties
DeploymentStage | API Gateway stage that points to the latest deployment (if defined). |
LatestDeployment | API Gateway deployment that represents the latest changes of the API. |
RestApiId | The ID of this API Gateway RestApi. |
RestApiRootResourceId | The resource ID of the root resource. |
Root | Represents the root resource ("/") of this API. Use it to define the API model:. |
Methods
ArnForExecuteApi(String, String, String) | Gets the "execute-api" ARN. |
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.
virtual 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
System.String
Remarks
Attribute: true
RestApiRootResourceId
The resource ID of the root resource.
string RestApiRootResourceId { get; }
Property Value
System.String
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 System.String
The method (default
*
).- path System.String
The resource path.
- stage System.String
The stage (default
*
).
Returns
System.String
The "execute-api" ARN.
Remarks
Default: "*" returns the execute API ARN for all methods/resources in this API.