/
runtime-platform.ts
111 lines (95 loc) · 2.95 KB
/
runtime-platform.ts
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
* The CpuArchitecture for Fargate Runtime Platform.
*/
export class CpuArchitecture {
/**
* ARM64
*/
public static readonly ARM64 = CpuArchitecture.of('ARM64');
/**
* X86_64
*/
public static readonly X86_64 = CpuArchitecture.of('X86_64');
/**
* Other cpu architecture.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-runtimeplatform.html#cfn-ecs-taskdefinition-runtimeplatform-cpuarchitecture for all available cpu architecture.
*
* @param cpuArchitecture cpu architecture.
*
*/
public static of(cpuArchitecture: string) { return new CpuArchitecture(cpuArchitecture); }
/**
*
* @param _cpuArchitecture The CPU architecture.
*/
private constructor(public readonly _cpuArchitecture: string) { }
}
/**
* The operating system for Fargate Runtime Platform.
*/
export class OperatingSystemFamily {
/**
* LINUX
*/
public static readonly LINUX = OperatingSystemFamily.of('LINUX');
/**
* WINDOWS_SERVER_2004_CORE
*/
public static readonly WINDOWS_SERVER_2004_CORE = OperatingSystemFamily.of('WINDOWS_SERVER_2004_CORE');
/**
* WINDOWS_SERVER_2016_FULL
*/
public static readonly WINDOWS_SERVER_2016_FULL = OperatingSystemFamily.of('WINDOWS_SERVER_2016_FULL');
/**
* WINDOWS_SERVER_2019_CORE
*/
public static readonly WINDOWS_SERVER_2019_CORE = OperatingSystemFamily.of('WINDOWS_SERVER_2019_CORE');
/**
* WINDOWS_SERVER_2019_FULL
*/
public static readonly WINDOWS_SERVER_2019_FULL = OperatingSystemFamily.of('WINDOWS_SERVER_2019_FULL');
/**
* WINDOWS_SERVER_2022_CORE
*/
public static readonly WINDOWS_SERVER_2022_CORE = OperatingSystemFamily.of('WINDOWS_SERVER_2022_CORE');
/**
* WINDOWS_SERVER_2022_FULL
*/
public static readonly WINDOWS_SERVER_2022_FULL = OperatingSystemFamily.of('WINDOWS_SERVER_2022_FULL');
/**
* WINDOWS_SERVER_20H2_CORE
*/
public static readonly WINDOWS_SERVER_20H2_CORE = OperatingSystemFamily.of('WINDOWS_SERVER_20H2_CORE');
/**
* Other operating system family.
*
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-runtimeplatform.html#cfn-ecs-taskdefinition-runtimeplatform-operatingsystemfamily for all available operating system family.
*
* @param family operating system family.
*
*/
public static of(family: string) { return new OperatingSystemFamily(family); }
/**
*
* @param _operatingSystemFamily The operating system family.
*/
private constructor(public readonly _operatingSystemFamily: string) { }
}
/**
* The interface for Runtime Platform.
*/
export interface RuntimePlatform {
/**
* The CpuArchitecture for Fargate Runtime Platform.
*
* @default - Undefined.
*/
readonly cpuArchitecture?: CpuArchitecture,
/**
* The operating system for Fargate Runtime Platform.
*
* @default - Undefined.
*/
readonly operatingSystemFamily?: OperatingSystemFamily,
}