Table of Contents

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

Stage

LatestDeployment

API Gateway deployment that represents the latest changes of the API.

Deployment? LatestDeployment { get; }

Property Value

Deployment

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

string

Remarks

Attribute: true

RestApiRootResourceId

The resource ID of the root resource.

string RestApiRootResourceId { get; }

Property Value

string

Remarks

Attribute: true

Root

Represents the root resource ("/") of this API. Use it to define the API model:.

IResource Root { get; }

Property Value

IResource

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 string

The method (default *).

path string

The resource path.

stage string

The stage (default *).

Returns

string

The "execute-api" ARN.

Remarks

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