diff --git a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts index 015ac2d500beb..fcdd5b911897c 100644 --- a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts +++ b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts @@ -326,6 +326,13 @@ export abstract class RestApiBase extends Resource implements IRestApi { return this._domainName; } + /** + * The deployed root URL of this REST API. + */ + public get url() { + return this.urlForPath(); + } + /** * The ID of this API Gateway RestApi. */ @@ -837,13 +844,6 @@ export class RestApi extends RestApiBase { this.node.addValidation({ validate: () => this.validateRestApi() }); } - /** - * The deployed root URL of this REST API. - */ - public get url() { - return this.urlForPath(); - } - /** * Adds a new model. */