|
| 1 | +/** |
| 2 | + * The type of predefined worker that is allocated when a job runs. |
| 3 | + * |
| 4 | + * If you need to use a WorkerType that doesn't exist as a static member, you |
| 5 | + * can instantiate a `WorkerType` object, e.g: `WorkerType.of('other type')` |
| 6 | + */ |
| 7 | +export enum WorkerType { |
| 8 | + /** |
| 9 | + * Standard Worker Type |
| 10 | + * 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. |
| 11 | + */ |
| 12 | + STANDARD = 'Standard', |
| 13 | + |
| 14 | + /** |
| 15 | + * G.1X Worker Type |
| 16 | + * 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs. |
| 17 | + */ |
| 18 | + G_1X = 'G.1X', |
| 19 | + |
| 20 | + /** |
| 21 | + * G.2X Worker Type |
| 22 | + * 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. Suitable for memory-intensive jobs. |
| 23 | + */ |
| 24 | + G_2X = 'G.2X', |
| 25 | + |
| 26 | + /** |
| 27 | + * G.4X Worker Type |
| 28 | + * 4 DPU (16 vCPU, 64 GB of memory, 256 GB disk), and provides 1 executor per worker. |
| 29 | + * We recommend this worker type for jobs whose workloads contain your most demanding transforms, |
| 30 | + * aggregations, joins, and queries. This worker type is available only for AWS Glue version 3.0 or later jobs. |
| 31 | + */ |
| 32 | + G_4X = 'G.4X', |
| 33 | + |
| 34 | + /** |
| 35 | + * G.8X Worker Type |
| 36 | + * 8 DPU (32 vCPU, 128 GB of memory, 512 GB disk), and provides 1 executor per worker. We recommend this worker |
| 37 | + * type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. |
| 38 | + * This worker type is available only for AWS Glue version 3.0 or later jobs. |
| 39 | + */ |
| 40 | + G_8X = 'G.8X', |
| 41 | + |
| 42 | + /** |
| 43 | + * G.025X Worker Type |
| 44 | + * 0.25 DPU (2 vCPU, 4 GB of memory, 64 GB disk), and provides 1 executor per worker. Suitable for low volume streaming jobs. |
| 45 | + */ |
| 46 | + G_025X = 'G.025X', |
| 47 | + |
| 48 | + /** |
| 49 | + * Z.2X Worker Type |
| 50 | + */ |
| 51 | + Z_2X = 'Z.2X', |
| 52 | +} |
| 53 | + |
| 54 | +/** |
| 55 | + * The number of workers of a defined workerType that are allocated when a job runs. |
| 56 | + * |
| 57 | + * @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html |
| 58 | + */ |
| 59 | + |
| 60 | +/** |
| 61 | + * Job states emitted by Glue to CloudWatch Events. |
| 62 | + * |
| 63 | + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types for more information. |
| 64 | + */ |
| 65 | +export enum JobState { |
| 66 | + /** |
| 67 | + * State indicating job run succeeded |
| 68 | + */ |
| 69 | + SUCCEEDED = 'SUCCEEDED', |
| 70 | + |
| 71 | + /** |
| 72 | + * State indicating job run failed |
| 73 | + */ |
| 74 | + FAILED = 'FAILED', |
| 75 | + |
| 76 | + /** |
| 77 | + * State indicating job run timed out |
| 78 | + */ |
| 79 | + TIMEOUT = 'TIMEOUT', |
| 80 | + |
| 81 | + /** |
| 82 | + * State indicating job is starting |
| 83 | + */ |
| 84 | + STARTING = 'STARTING', |
| 85 | + |
| 86 | + /** |
| 87 | + * State indicating job is running |
| 88 | + */ |
| 89 | + RUNNING = 'RUNNING', |
| 90 | + |
| 91 | + /** |
| 92 | + * State indicating job is stopping |
| 93 | + */ |
| 94 | + STOPPING = 'STOPPING', |
| 95 | + |
| 96 | + /** |
| 97 | + * State indicating job stopped |
| 98 | + */ |
| 99 | + STOPPED = 'STOPPED', |
| 100 | +} |
| 101 | + |
| 102 | +/** |
| 103 | + * The Glue CloudWatch metric type. |
| 104 | + * |
| 105 | + * @see https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html |
| 106 | + */ |
| 107 | +export enum MetricType { |
| 108 | + /** |
| 109 | + * A value at a point in time. |
| 110 | + */ |
| 111 | + GAUGE = 'gauge', |
| 112 | + |
| 113 | + /** |
| 114 | + * An aggregate number. |
| 115 | + */ |
| 116 | + COUNT = 'count', |
| 117 | +} |
| 118 | + |
| 119 | +/** |
| 120 | + * The ExecutionClass whether the job is run with a standard or flexible execution class. |
| 121 | + * |
| 122 | + * @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html#aws-glue-api-jobs-job-Job |
| 123 | + * @see https://docs.aws.amazon.com/glue/latest/dg/add-job.html |
| 124 | + */ |
| 125 | +export enum ExecutionClass { |
| 126 | + /** |
| 127 | + * The flexible execution class is appropriate for time-insensitive jobs whose start |
| 128 | + * and completion times may vary. |
| 129 | + */ |
| 130 | + FLEX = 'FLEX', |
| 131 | + |
| 132 | + /** |
| 133 | + * The standard execution class is ideal for time-sensitive workloads that require fast job |
| 134 | + * startup and dedicated resources. |
| 135 | + */ |
| 136 | + STANDARD = 'STANDARD', |
| 137 | +} |
| 138 | + |
| 139 | +/** |
| 140 | + * AWS Glue version determines the versions of Apache Spark and Python that are available to the job. |
| 141 | + * |
| 142 | + * @see https://docs.aws.amazon.com/glue/latest/dg/add-job.html. |
| 143 | + */ |
| 144 | +export enum GlueVersion { |
| 145 | + /** |
| 146 | + * Glue version using Spark 2.2.1 and Python 2.7 |
| 147 | + */ |
| 148 | + V0_9 = '0.9', |
| 149 | + |
| 150 | + /** |
| 151 | + * Glue version using Spark 2.4.3, Python 2.7 and Python 3.6 |
| 152 | + */ |
| 153 | + V1_0 = '1.0', |
| 154 | + |
| 155 | + /** |
| 156 | + * Glue version using Spark 2.4.3 and Python 3.7 |
| 157 | + */ |
| 158 | + V2_0 = '2.0', |
| 159 | + |
| 160 | + /** |
| 161 | + * Glue version using Spark 3.1.1 and Python 3.7 |
| 162 | + */ |
| 163 | + V3_0 = '3.0', |
| 164 | + |
| 165 | + /** |
| 166 | + * Glue version using Spark 3.3.0 and Python 3.10 |
| 167 | + */ |
| 168 | + V4_0 = '4.0', |
| 169 | + |
| 170 | + /** |
| 171 | + * Glue version using Spark 3.3.0 and Python 3.10 |
| 172 | + */ |
| 173 | + V5_0 = '5.0', |
| 174 | + |
| 175 | +} |
| 176 | + |
| 177 | +/** |
| 178 | + * Runtime language of the Glue job |
| 179 | + */ |
| 180 | +export enum JobLanguage { |
| 181 | + /** |
| 182 | + * Scala |
| 183 | + */ |
| 184 | + SCALA = 'scala', |
| 185 | + |
| 186 | + /** |
| 187 | + * Python |
| 188 | + */ |
| 189 | + PYTHON = 'python', |
| 190 | +} |
| 191 | + |
| 192 | +/** |
| 193 | + * Python version |
| 194 | + */ |
| 195 | +export enum PythonVersion { |
| 196 | + /** |
| 197 | + * Python 2 (the exact version depends on GlueVersion and JobCommand used) |
| 198 | + */ |
| 199 | + TWO = '2', |
| 200 | + |
| 201 | + /** |
| 202 | + * Python 3 (the exact version depends on GlueVersion and JobCommand used) |
| 203 | + */ |
| 204 | + THREE = '3', |
| 205 | + |
| 206 | + /** |
| 207 | + * Python 3.9 (the exact version depends on GlueVersion and JobCommand used) |
| 208 | + */ |
| 209 | + THREE_NINE = '3.9', |
| 210 | + |
| 211 | +} |
| 212 | + |
| 213 | +/** |
| 214 | + * AWS Glue runtime determines the runtime engine of the job. |
| 215 | + * |
| 216 | + */ |
| 217 | +export enum Runtime { |
| 218 | + /** |
| 219 | + * Runtime for a Glue for Ray 2.4. |
| 220 | + */ |
| 221 | + RAY_TWO_FOUR = 'Ray2.4', |
| 222 | +} |
| 223 | + |
| 224 | +/** |
| 225 | + * The job type. |
| 226 | + * |
| 227 | + * If you need to use a JobType that doesn't exist as a static member, you |
| 228 | + * can instantiate a `JobType` object, e.g: `JobType.of('other name')`. |
| 229 | + */ |
| 230 | +export enum JobType { |
| 231 | + /** |
| 232 | + * Command for running a Glue Spark job. |
| 233 | + */ |
| 234 | + ETL = 'glueetl', |
| 235 | + |
| 236 | + /** |
| 237 | + * Command for running a Glue Spark streaming job. |
| 238 | + */ |
| 239 | + STREAMING = 'gluestreaming', |
| 240 | + |
| 241 | + /** |
| 242 | + * Command for running a Glue python shell job. |
| 243 | + */ |
| 244 | + PYTHON_SHELL = 'pythonshell', |
| 245 | + |
| 246 | + /** |
| 247 | + * Command for running a Glue Ray job. |
| 248 | + */ |
| 249 | + RAY = 'glueray', |
| 250 | + |
| 251 | +} |
| 252 | + |
| 253 | +/** |
| 254 | + * The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. |
| 255 | + */ |
| 256 | +export enum MaxCapacity { |
| 257 | + |
| 258 | + /** |
| 259 | + * DPU value of 1/16th |
| 260 | + */ |
| 261 | + DPU_1_16TH = 0.0625, |
| 262 | + |
| 263 | + /** |
| 264 | + * DPU value of 1 |
| 265 | + */ |
| 266 | + DPU_1 = 1, |
| 267 | +} |
| 268 | + |
| 269 | +/* |
| 270 | + * Represents the logical operator for combining multiple conditions in the Glue Trigger API. |
| 271 | + */ |
| 272 | +export enum PredicateLogical { |
| 273 | + /** |
| 274 | + * All conditions must be true for the predicate to be true. |
| 275 | + */ |
| 276 | + AND = 'AND', |
| 277 | + |
| 278 | + /** |
| 279 | + * At least one condition must be true for the predicate to be true. |
| 280 | + */ |
| 281 | + ANY = 'ANY', |
| 282 | +} |
| 283 | + |
| 284 | +/** |
| 285 | + * Represents the logical operator for evaluating a single condition in the Glue Trigger API. |
| 286 | + */ |
| 287 | +export enum ConditionLogicalOperator { |
| 288 | + /** The condition is true if the values are equal. */ |
| 289 | + EQUALS = 'EQUALS', |
| 290 | +} |
| 291 | + |
| 292 | +/** |
| 293 | + * Represents the state of a crawler for a condition in the Glue Trigger API. |
| 294 | + */ |
| 295 | +export enum CrawlerState { |
| 296 | + /** The crawler is currently running. */ |
| 297 | + RUNNING = 'RUNNING', |
| 298 | + |
| 299 | + /** The crawler is in the process of being cancelled. */ |
| 300 | + CANCELLING = 'CANCELLING', |
| 301 | + |
| 302 | + /** The crawler has been cancelled. */ |
| 303 | + CANCELLED = 'CANCELLED', |
| 304 | + |
| 305 | + /** The crawler has completed its operation successfully. */ |
| 306 | + SUCCEEDED = 'SUCCEEDED', |
| 307 | + |
| 308 | + /** The crawler has failed to complete its operation. */ |
| 309 | + FAILED = 'FAILED', |
| 310 | + |
| 311 | + /** The crawler encountered an error during its operation. */ |
| 312 | + ERROR = 'ERROR', |
| 313 | +} |
0 commit comments