-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathstatus-page-service.ts
More file actions
67 lines (56 loc) · 1.57 KB
/
status-page-service.ts
File metadata and controls
67 lines (56 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { Construct } from './construct'
import { Session } from './project'
export interface StatusPageServiceProps {
/**
* The name of the service.
*/
name: string
}
/**
* Creates a reference to an existing Status Page Service.
*
* References link existing resources to a project without managing them.
*/
export class StatusPageServiceRef extends Construct {
constructor (logicalId: string, physicalId: string | number) {
super(StatusPageService.__checklyType, logicalId, physicalId, false)
Session.registerConstruct(this)
}
describe (): string {
return `StatusPageServiceRef:${this.logicalId}`
}
synthesize () {
return null
}
}
/**
* Creates a Service for Status Pages
*/
export class StatusPageService extends Construct {
name: string
static readonly __checklyType = 'status-page-service'
/**
* Constructs the Status Page Service instance
*
* @param logicalId unique project-scoped resource name identification
* @param props status page service configuration properties
*
* {@link https://www.checklyhq.com/docs/constructs/status-page-service/ Read more in the docs}
*/
constructor (logicalId: string, props: StatusPageServiceProps) {
super(StatusPageService.__checklyType, logicalId)
this.name = props.name
Session.registerConstruct(this)
}
describe (): string {
return `StatusPageService:${this.logicalId}`
}
static fromId (id: string) {
return new StatusPageServiceRef(`status-page-service-${id}`, id)
}
synthesize (): any | null {
return {
name: this.name,
}
}
}