From a8ffeefe9ffabca7a4908d28df8ebbe85b3345f1 Mon Sep 17 00:00:00 2001 From: Alex Noyes Date: Tue, 28 Nov 2023 12:29:01 +0000 Subject: [PATCH] update fromID() construct reference --- site/content/docs/cli/constructs-reference.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/site/content/docs/cli/constructs-reference.md b/site/content/docs/cli/constructs-reference.md index 48dab7a5d..096cc9b30 100644 --- a/site/content/docs/cli/constructs-reference.md +++ b/site/content/docs/cli/constructs-reference.md @@ -363,14 +363,21 @@ property of a Project, CheckGroup or Check. ### Using `fromId()` to reference an existing channel You can reference an existing alert channel in your Checkly account using the `fromId()` method on any `AlertChannel` -class. This enables you to share an alert channel resource between different projects living in different code repositories. +class. When your CLI project is responsible for creating and managing alert channels, it integrates seamlessly with Checkly's deployment control mechanisms. This ensures that any changes made are thoroughly validated. + +For users with multiple Checkly CLI projects: +- Alert channels can be set up through the Checkly UI or any other method, ensuring they remain intact and unaffected by individual CLI project operations. + +For users managing a single Checkly CLI project: +- The entire process of creating and subscribing to alert channels can be handled within that single project. This is made possible because the project references the logical ID of the alert channel, rather than an ID generated post-deployment. + +> If you attempt to deploy a project that references alert channels which have been removed or are no longer valid, the deployment process will not proceed. This feature helps maintain the integrity and reliability of your monitoring and alerting setup. + ```ts export const emailChannel = EmailAlertChannel.fromId(20) ``` - -You can fetch the ID for your alert channel from web UI or using our REST API. - +You can obtain the ID for your alert channel either from the Checkly web UI or by utilizing our [REST API](https://developers.checklyhq.com/reference/getv1alertchannels). ![email channel id](/docs/images/cli/constructs_email_id@2x.jpg)