Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/awscli/customizations/emr/argumentschema.py
2624 views
1
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License"). You
4
# may not use this file except in compliance with the License. A copy of
5
# the License is located at
6
#
7
# http://aws.amazon.com/apache2.0/
8
#
9
# or in the "license" file accompanying this file. This file is
10
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
# ANY KIND, either express or implied. See the License for the specific
12
# language governing permissions and limitations under the License.
13
14
from awscli.customizations.emr import helptext
15
from awscli.customizations.emr.createdefaultroles import EC2_ROLE_NAME
16
17
CONFIGURATIONS_PROPERTIES_SCHEMA = {
18
"type": "map",
19
"key": {"type": "string", "description": "Configuration key"},
20
"value": {"type": "string", "description": "Configuration value"},
21
"description": "Application configuration properties",
22
}
23
24
CONFIGURATIONS_CLASSIFICATION_SCHEMA = {
25
"type": "string",
26
"description": "Application configuration classification name",
27
}
28
29
INNER_CONFIGURATIONS_SCHEMA = {
30
"type": "array",
31
"items": {
32
"type": "object",
33
"properties": {
34
"Classification": CONFIGURATIONS_CLASSIFICATION_SCHEMA,
35
"Properties": CONFIGURATIONS_PROPERTIES_SCHEMA,
36
},
37
},
38
"description": "Instance group application configurations.",
39
}
40
41
OUTER_CONFIGURATIONS_SCHEMA = {
42
"type": "array",
43
"items": {
44
"type": "object",
45
"properties": {
46
"Classification": CONFIGURATIONS_CLASSIFICATION_SCHEMA,
47
"Properties": CONFIGURATIONS_PROPERTIES_SCHEMA,
48
"Configurations": INNER_CONFIGURATIONS_SCHEMA,
49
},
50
},
51
"description": "Instance group application configurations.",
52
}
53
54
ONDEMAND_CAPACITY_RESERVATION_OPTIONS_SCHEMA = {
55
"type": "object",
56
"properties": {
57
"UsageStrategy": {
58
"type": "string",
59
"description": "The strategy of whether to use available capacity reservations to fulfill On-Demand capacity.",
60
"enum": ["use-capacity-reservations-first"],
61
},
62
"CapacityReservationPreference": {
63
"type": "string",
64
"description": "The preference of the capacity reservation of the instance.",
65
"enum": ["open", "none"],
66
},
67
"CapacityReservationResourceGroupArn": {
68
"type": "string",
69
"description": "The ARN of the capacity reservation resource group in which to run the instance.",
70
},
71
},
72
}
73
74
SPOT_ALLOCATION_STRATEGY_SCHEMA = {
75
"type": "string",
76
"description": "The strategy to use to launch Spot instance fleets.",
77
"enum": [
78
"capacity-optimized",
79
"price-capacity-optimized",
80
"lowest-price",
81
"diversified",
82
"capacity-optimized-prioritized",
83
],
84
}
85
86
ONDEMAND_ALLOCATION_STRATEGY_SCHEMA = {
87
"type": "string",
88
"description": "The strategy to use to launch On-Demand instance fleets.",
89
"enum": ["lowest-price", "prioritized"],
90
}
91
92
INSTANCE_GROUPS_SCHEMA = {
93
"type": "array",
94
"items": {
95
"type": "object",
96
"properties": {
97
"Name": {
98
"type": "string",
99
"description": "Friendly name given to the instance group.",
100
},
101
"InstanceGroupType": {
102
"type": "string",
103
"description": "The type of the instance group in the cluster.",
104
"enum": ["MASTER", "CORE", "TASK"],
105
"required": True,
106
},
107
"BidPrice": {
108
"type": "string",
109
"description": "Bid price for each Amazon EC2 instance in the "
110
"instance group when launching nodes as Spot Instances, "
111
"expressed in USD.",
112
},
113
"InstanceType": {
114
"type": "string",
115
"description": "The Amazon EC2 instance type for all instances "
116
"in the instance group.",
117
"required": True,
118
},
119
"InstanceCount": {
120
"type": "integer",
121
"description": "Target number of Amazon EC2 instances "
122
"for the instance group",
123
"required": True,
124
},
125
"CustomAmiId": {
126
"type": "string",
127
"description": "The AMI ID of a custom AMI to use when Amazon EMR provisions EC2 instances.",
128
},
129
"EbsConfiguration": {
130
"type": "object",
131
"description": "EBS configuration that will be associated with the instance group.",
132
"properties": {
133
"EbsOptimized": {
134
"type": "boolean",
135
"description": "Boolean flag used to tag EBS-optimized instances.",
136
},
137
"EbsBlockDeviceConfigs": {
138
"type": "array",
139
"items": {
140
"type": "object",
141
"properties": {
142
"VolumeSpecification": {
143
"type": "object",
144
"description": "The EBS volume specification that will be created and attached to every instance in this instance group.",
145
"properties": {
146
"VolumeType": {
147
"type": "string",
148
"description": "The EBS volume type that is attached to all the instances in the instance group. Valid types are: gp2, io1, and standard.",
149
"required": True,
150
},
151
"SizeInGB": {
152
"type": "integer",
153
"description": "The EBS volume size, in GB, that is attached to all the instances in the instance group.",
154
"required": True,
155
},
156
"Iops": {
157
"type": "integer",
158
"description": "The IOPS of the EBS volume that is attached to all the instances in the instance group.",
159
},
160
"Throughput": {
161
"type": "integer",
162
"description": "The throughput of the EBS volume that is attached to all the instances in the instance group.",
163
},
164
},
165
},
166
"VolumesPerInstance": {
167
"type": "integer",
168
"description": "The number of EBS volumes that will be created and attached to each instance in the instance group.",
169
},
170
},
171
},
172
},
173
},
174
},
175
"AutoScalingPolicy": {
176
"type": "object",
177
"description": "Auto Scaling policy that will be associated with the instance group.",
178
"properties": {
179
"Constraints": {
180
"type": "object",
181
"description": "The Constraints that will be associated to an Auto Scaling policy.",
182
"properties": {
183
"MinCapacity": {
184
"type": "integer",
185
"description": "The minimum value for the instances to scale in"
186
" to in response to scaling activities.",
187
},
188
"MaxCapacity": {
189
"type": "integer",
190
"description": "The maximum value for the instances to scale out to in response"
191
" to scaling activities",
192
},
193
},
194
},
195
"Rules": {
196
"type": "array",
197
"description": "The Rules associated to an Auto Scaling policy.",
198
"items": {
199
"type": "object",
200
"properties": {
201
"Name": {
202
"type": "string",
203
"description": "Name of the Auto Scaling rule.",
204
},
205
"Description": {
206
"type": "string",
207
"description": "Description of the Auto Scaling rule.",
208
},
209
"Action": {
210
"type": "object",
211
"description": "The Action associated to an Auto Scaling rule.",
212
"properties": {
213
"Market": { # Required for Instance Fleets
214
"type": "string",
215
"description": "Market type of the Amazon EC2 instances used to create a "
216
"cluster node by Auto Scaling action.",
217
"enum": ["ON_DEMAND", "SPOT"],
218
},
219
"SimpleScalingPolicyConfiguration": {
220
"type": "object",
221
"description": "The Simple scaling configuration that will be associated"
222
"to Auto Scaling action.",
223
"properties": {
224
"AdjustmentType": {
225
"type": "string",
226
"description": "Specifies how the ScalingAdjustment parameter is "
227
"interpreted.",
228
"enum": [
229
"CHANGE_IN_CAPACITY",
230
"PERCENT_CHANGE_IN_CAPACITY",
231
"EXACT_CAPACITY",
232
],
233
},
234
"ScalingAdjustment": {
235
"type": "integer",
236
"description": "The amount by which to scale, based on the "
237
"specified adjustment type.",
238
},
239
"CoolDown": {
240
"type": "integer",
241
"description": "The amount of time, in seconds, after a scaling "
242
"activity completes and before the next scaling "
243
"activity can start.",
244
},
245
},
246
},
247
},
248
},
249
"Trigger": {
250
"type": "object",
251
"description": "The Trigger associated to an Auto Scaling rule.",
252
"properties": {
253
"CloudWatchAlarmDefinition": {
254
"type": "object",
255
"description": "The Alarm to be registered with CloudWatch, to trigger"
256
" scaling activities.",
257
"properties": {
258
"ComparisonOperator": {
259
"type": "string",
260
"description": "The arithmetic operation to use when comparing the"
261
" specified Statistic and Threshold.",
262
},
263
"EvaluationPeriods": {
264
"type": "integer",
265
"description": "The number of periods over which data is compared"
266
" to the specified threshold.",
267
},
268
"MetricName": {
269
"type": "string",
270
"description": "The name for the alarm's associated metric.",
271
},
272
"Namespace": {
273
"type": "string",
274
"description": "The namespace for the alarm's associated metric.",
275
},
276
"Period": {
277
"type": "integer",
278
"description": "The period in seconds over which the specified "
279
"statistic is applied.",
280
},
281
"Statistic": {
282
"type": "string",
283
"description": "The statistic to apply to the alarm's associated "
284
"metric.",
285
},
286
"Threshold": {
287
"type": "double",
288
"description": "The value against which the specified statistic is "
289
"compared.",
290
},
291
"Unit": {
292
"type": "string",
293
"description": "The statistic's unit of measure.",
294
},
295
"Dimensions": {
296
"type": "array",
297
"description": "The dimensions for the alarm's associated metric.",
298
"items": {
299
"type": "object",
300
"properties": {
301
"Key": {
302
"type": "string",
303
"description": "Dimension Key.",
304
},
305
"Value": {
306
"type": "string",
307
"description": "Dimension Value.",
308
},
309
},
310
},
311
},
312
},
313
}
314
},
315
},
316
},
317
},
318
},
319
},
320
},
321
"Configurations": OUTER_CONFIGURATIONS_SCHEMA,
322
},
323
},
324
}
325
326
INSTANCE_FLEETS_SCHEMA = {
327
"type": "array",
328
"items": {
329
"type": "object",
330
"properties": {
331
"Name": {
332
"type": "string",
333
"description": "Friendly name given to the instance fleet.",
334
},
335
"InstanceFleetType": {
336
"type": "string",
337
"description": "The type of the instance fleet in the cluster.",
338
"enum": ["MASTER", "CORE", "TASK"],
339
"required": True,
340
},
341
"TargetOnDemandCapacity": {
342
"type": "integer",
343
"description": "Target on-demand capacity for the instance fleet.",
344
},
345
"TargetSpotCapacity": {
346
"type": "integer",
347
"description": "Target spot capacity for the instance fleet.",
348
},
349
"InstanceTypeConfigs": {
350
"type": "array",
351
"items": {
352
"type": "object",
353
"properties": {
354
"InstanceType": {
355
"type": "string",
356
"description": "The Amazon EC2 instance type for the instance fleet.",
357
"required": True,
358
},
359
"WeightedCapacity": {
360
"type": "integer",
361
"description": "The weight assigned to an instance type, which will impact the overall fulfillment of the capacity.",
362
},
363
"BidPrice": {
364
"type": "string",
365
"description": "Bid price for each Amazon EC2 instance in the "
366
"instance fleet when launching nodes as Spot Instances, "
367
"expressed in USD.",
368
},
369
"BidPriceAsPercentageOfOnDemandPrice": {
370
"type": "double",
371
"description": "Bid price as percentage of on-demand price.",
372
},
373
"CustomAmiId": {
374
"type": "string",
375
"description": "The AMI ID of a custom AMI to use when Amazon EMR provisions EC2 instances.",
376
},
377
"Priority": {
378
"type": "double",
379
"description": "The priority at which Amazon EMR launches the EC2 instances with this instance type. "
380
"Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.",
381
},
382
"EbsConfiguration": {
383
"type": "object",
384
"description": "EBS configuration that is associated with the instance group.",
385
"properties": {
386
"EbsOptimized": {
387
"type": "boolean",
388
"description": "Boolean flag used to tag EBS-optimized instances.",
389
},
390
"EbsBlockDeviceConfigs": {
391
"type": "array",
392
"items": {
393
"type": "object",
394
"properties": {
395
"VolumeSpecification": {
396
"type": "object",
397
"description": "The EBS volume specification that is created "
398
"and attached to each instance in the instance group.",
399
"properties": {
400
"VolumeType": {
401
"type": "string",
402
"description": "The EBS volume type that is attached to all "
403
"the instances in the instance group. Valid types are: "
404
"gp2, io1, and standard.",
405
"required": True,
406
},
407
"SizeInGB": {
408
"type": "integer",
409
"description": "The EBS volume size, in GB, that is attached "
410
"to all the instances in the instance group.",
411
"required": True,
412
},
413
"Iops": {
414
"type": "integer",
415
"description": "The IOPS of the EBS volume that is attached to "
416
"all the instances in the instance group.",
417
},
418
"Throughput": {
419
"type": "integer",
420
"description": "The throughput of the EBS volume that is attached to "
421
"all the instances in the instance group.",
422
},
423
},
424
},
425
"VolumesPerInstance": {
426
"type": "integer",
427
"description": "The number of EBS volumes that will be created and "
428
"attached to each instance in the instance group.",
429
},
430
},
431
},
432
},
433
},
434
},
435
"Configurations": OUTER_CONFIGURATIONS_SCHEMA,
436
},
437
},
438
},
439
"LaunchSpecifications": {
440
"type": "object",
441
"properties": {
442
"OnDemandSpecification": {
443
"type": "object",
444
"properties": {
445
"AllocationStrategy": ONDEMAND_ALLOCATION_STRATEGY_SCHEMA,
446
"CapacityReservationOptions": ONDEMAND_CAPACITY_RESERVATION_OPTIONS_SCHEMA,
447
},
448
},
449
"SpotSpecification": {
450
"type": "object",
451
"properties": {
452
"TimeoutDurationMinutes": {
453
"type": "integer",
454
"description": "The time, in minutes, after which the action specified in TimeoutAction field will be performed if requested resources are unavailable.",
455
},
456
"TimeoutAction": {
457
"type": "string",
458
"description": "The action that is performed after TimeoutDurationMinutes.",
459
"enum": [
460
"TERMINATE_CLUSTER",
461
"SWITCH_TO_ONDEMAND",
462
],
463
},
464
"BlockDurationMinutes": {
465
"type": "integer",
466
"description": "Block duration in minutes.",
467
},
468
"AllocationStrategy": SPOT_ALLOCATION_STRATEGY_SCHEMA,
469
},
470
},
471
},
472
},
473
"ResizeSpecifications": {
474
"type": "object",
475
"properties": {
476
"SpotResizeSpecification": {
477
"type": "object",
478
"properties": {
479
"TimeoutDurationMinutes": {
480
"type": "integer",
481
"description": "The time, in minutes, after which the resize will be stopped if requested resources are unavailable.",
482
},
483
"AllocationStrategy": SPOT_ALLOCATION_STRATEGY_SCHEMA,
484
},
485
},
486
"OnDemandResizeSpecification": {
487
"type": "object",
488
"properties": {
489
"TimeoutDurationMinutes": {
490
"type": "integer",
491
"description": "The time, in minutes, after which the resize will be stopped if requested resources are unavailable.",
492
},
493
"AllocationStrategy": ONDEMAND_ALLOCATION_STRATEGY_SCHEMA,
494
"CapacityReservationOptions": ONDEMAND_CAPACITY_RESERVATION_OPTIONS_SCHEMA,
495
},
496
},
497
},
498
},
499
"Context": {"type": "string", "description": "Reserved."},
500
},
501
},
502
}
503
504
EC2_ATTRIBUTES_SCHEMA = {
505
"type": "object",
506
"properties": {
507
"KeyName": {
508
"type": "string",
509
"description": "The name of the Amazon EC2 key pair that can "
510
"be used to ssh to the master node as the user 'hadoop'.",
511
},
512
"SubnetId": {
513
"type": "string",
514
"description": "To launch the cluster in Amazon "
515
"Virtual Private Cloud (Amazon VPC), set this parameter to "
516
"the identifier of the Amazon VPC subnet where you want "
517
"the cluster to launch. If you do not specify this value, "
518
"the cluster is launched in the normal Amazon Web Services "
519
"cloud, outside of an Amazon VPC. ",
520
},
521
"SubnetIds": {
522
"type": "array",
523
"description": "List of SubnetIds.",
524
"items": {"type": "string"},
525
},
526
"AvailabilityZone": {
527
"type": "string",
528
"description": "The Availability Zone the cluster will run in.",
529
},
530
"AvailabilityZones": {
531
"type": "array",
532
"description": "List of AvailabilityZones.",
533
"items": {"type": "string"},
534
},
535
"InstanceProfile": {
536
"type": "string",
537
"description": "An IAM role for the cluster. The EC2 instances of the cluster"
538
" assume this role. The default role is "
539
+ EC2_ROLE_NAME
540
+ ". In order to use the default"
541
" role, you must have already created it using the "
542
"<code>create-default-roles</code> command. ",
543
},
544
"EmrManagedMasterSecurityGroup": {
545
"type": "string",
546
"description": helptext.EMR_MANAGED_MASTER_SECURITY_GROUP,
547
},
548
"EmrManagedSlaveSecurityGroup": {
549
"type": "string",
550
"description": helptext.EMR_MANAGED_SLAVE_SECURITY_GROUP,
551
},
552
"ServiceAccessSecurityGroup": {
553
"type": "string",
554
"description": helptext.SERVICE_ACCESS_SECURITY_GROUP,
555
},
556
"AdditionalMasterSecurityGroups": {
557
"type": "array",
558
"description": helptext.ADDITIONAL_MASTER_SECURITY_GROUPS,
559
"items": {"type": "string"},
560
},
561
"AdditionalSlaveSecurityGroups": {
562
"type": "array",
563
"description": helptext.ADDITIONAL_SLAVE_SECURITY_GROUPS,
564
"items": {"type": "string"},
565
},
566
},
567
}
568
569
570
APPLICATIONS_SCHEMA = {
571
"type": "array",
572
"items": {
573
"type": "object",
574
"properties": {
575
"Name": {
576
"type": "string",
577
"description": "Application name.",
578
"enum": [
579
"MapR",
580
"HUE",
581
"HIVE",
582
"PIG",
583
"HBASE",
584
"IMPALA",
585
"GANGLIA",
586
"HADOOP",
587
"SPARK",
588
],
589
"required": True,
590
},
591
"Args": {
592
"type": "array",
593
"description": "A list of arguments to pass to the application.",
594
"items": {"type": "string"},
595
},
596
},
597
},
598
}
599
600
BOOTSTRAP_ACTIONS_SCHEMA = {
601
"type": "array",
602
"items": {
603
"type": "object",
604
"properties": {
605
"Name": {"type": "string", "default": "Bootstrap Action"},
606
"Path": {
607
"type": "string",
608
"description": "Location of the script to run during a bootstrap action. "
609
"Can be either a location in Amazon S3 or "
610
"on a local file system.",
611
"required": True,
612
},
613
"Args": {
614
"type": "array",
615
"description": "A list of command line arguments to pass to "
616
"the bootstrap action script",
617
"items": {"type": "string"},
618
},
619
},
620
},
621
}
622
623
624
STEPS_SCHEMA = {
625
"type": "array",
626
"items": {
627
"type": "object",
628
"properties": {
629
"Type": {
630
"type": "string",
631
"description": "The type of a step to be added to the cluster.",
632
"default": "custom_jar",
633
"enum": ["CUSTOM_JAR", "STREAMING", "HIVE", "PIG", "IMPALA"],
634
},
635
"Name": {
636
"type": "string",
637
"description": "The name of the step. ",
638
},
639
"ActionOnFailure": {
640
"type": "string",
641
"description": "The action to take if the cluster step fails.",
642
"enum": ["TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"],
643
"default": "CONTINUE",
644
},
645
"Jar": {
646
"type": "string",
647
"description": "A path to a JAR file run during the step.",
648
},
649
"Args": {
650
"type": "array",
651
"description": "A list of command line arguments to pass to the step.",
652
"items": {"type": "string"},
653
},
654
"MainClass": {
655
"type": "string",
656
"description": "The name of the main class in the specified "
657
"Java file. If not specified, the JAR file should "
658
"specify a Main-Class in its manifest file.",
659
},
660
"Properties": {
661
"type": "string",
662
"description": "A list of Java properties that are set when the step "
663
"runs. You can use these properties to pass key value "
664
"pairs to your main function.",
665
},
666
"LogUri": {
667
"type": "string",
668
"description": "The Amazon S3 destination URI for log publishing. If "
669
"not specified, the cluster logging location is used.",
670
},
671
"EncryptionKeyArn": {
672
"type": "string",
673
"description": "The KMS key ARN to encrypt the logs published to the "
674
"given Amazon S3 destination. If not specified, the "
675
"cluster KMS key is used.",
676
},
677
},
678
},
679
}
680
681
HBASE_RESTORE_FROM_BACKUP_SCHEMA = {
682
"type": "object",
683
"properties": {
684
"Dir": {"type": "string", "description": helptext.HBASE_BACKUP_DIR},
685
"BackupVersion": {
686
"type": "string",
687
"description": helptext.HBASE_BACKUP_VERSION,
688
},
689
},
690
}
691
692
EMR_FS_SCHEMA = {
693
"type": "object",
694
"properties": {
695
"Consistent": {
696
"type": "boolean",
697
"description": "Enable EMRFS consistent view.",
698
},
699
"SSE": {
700
"type": "boolean",
701
"description": "Enable Amazon S3 server-side encryption on files "
702
"written to S3 by EMRFS.",
703
},
704
"RetryCount": {
705
"type": "integer",
706
"description": "The maximum number of times to retry upon S3 inconsistency.",
707
},
708
"RetryPeriod": {
709
"type": "integer",
710
"description": "The amount of time (in seconds) until the first "
711
"retry. Subsequent retries use an exponential "
712
"back-off.",
713
},
714
"Args": {
715
"type": "array",
716
"description": "A list of arguments to pass for additional "
717
"EMRFS configuration.",
718
"items": {"type": "string"},
719
},
720
"Encryption": {
721
"type": "string",
722
"description": "EMRFS encryption type.",
723
"enum": ["SERVERSIDE", "CLIENTSIDE"],
724
},
725
"ProviderType": {
726
"type": "string",
727
"description": "EMRFS client-side encryption provider type.",
728
"enum": ["KMS", "CUSTOM"],
729
},
730
"KMSKeyId": {
731
"type": "string",
732
"description": "AWS KMS's customer master key identifier",
733
},
734
"CustomProviderLocation": {
735
"type": "string",
736
"description": "Custom encryption provider JAR location.",
737
},
738
"CustomProviderClass": {
739
"type": "string",
740
"description": "Custom encryption provider full class name.",
741
},
742
},
743
}
744
745
TAGS_SCHEMA = {"type": "array", "items": {"type": "string"}}
746
747
KERBEROS_ATTRIBUTES_SCHEMA = {
748
"type": "object",
749
"properties": {
750
"Realm": {
751
"type": "string",
752
"description": "The name of Kerberos realm.",
753
},
754
"KdcAdminPassword": {
755
"type": "string",
756
"description": "The password of Kerberos administrator.",
757
},
758
"CrossRealmTrustPrincipalPassword": {
759
"type": "string",
760
"description": "The password to establish cross-realm trusts.",
761
},
762
"ADDomainJoinUser": {
763
"type": "string",
764
"description": "The name of the user with privileges to join instances to Active Directory.",
765
},
766
"ADDomainJoinPassword": {
767
"type": "string",
768
"description": "The password of the user with privileges to join instances to Active Directory.",
769
},
770
},
771
}
772
773
MANAGED_SCALING_POLICY_SCHEMA = {
774
"type": "object",
775
"properties": {
776
"ComputeLimits": {
777
"type": "object",
778
"description": "The EC2 unit limits for a managed scaling policy. "
779
"The managed scaling activity of a cluster is not allowed to go above "
780
"or below these limits. The limits apply to CORE and TASK groups "
781
"and exclude the capacity of the MASTER group.",
782
"properties": {
783
"MinimumCapacityUnits": {
784
"type": "integer",
785
"description": "The lower boundary of EC2 units. It is measured through "
786
"VCPU cores or instances for instance groups and measured "
787
"through units for instance fleets. Managed scaling "
788
"activities are not allowed beyond this boundary.",
789
"required": True,
790
},
791
"MaximumCapacityUnits": {
792
"type": "integer",
793
"description": "The upper boundary of EC2 units. It is measured through "
794
"VCPU cores or instances for instance groups and measured "
795
"through units for instance fleets. Managed scaling "
796
"activities are not allowed beyond this boundary.",
797
"required": True,
798
},
799
"MaximumOnDemandCapacityUnits": {
800
"type": "integer",
801
"description": "The upper boundary of on-demand EC2 units. It is measured through "
802
"VCPU cores or instances for instance groups and measured "
803
"through units for instance fleets. The on-demand units are not "
804
"allowed to scale beyond this boundary. "
805
"This value must be lower than MaximumCapacityUnits.",
806
},
807
"UnitType": {
808
"type": "string",
809
"description": "The unit type used for specifying a managed scaling policy.",
810
"enum": ["VCPU", "Instances", "InstanceFleetUnits"],
811
"required": True,
812
},
813
"MaximumCoreCapacityUnits": {
814
"type": "integer",
815
"description": "The upper boundary of EC2 units for core node type in a cluster. "
816
"It is measured through VCPU cores or instances for instance groups "
817
"and measured through units for instance fleets. "
818
"The core units are not allowed to scale beyond this boundary. "
819
"The parameter is used to split capacity allocation between core and task nodes.",
820
},
821
},
822
},
823
"ScalingStrategy": {
824
"type": "string",
825
"enum": ["DEFAULT", "ADVANCED"],
826
"description": "Determines whether a custom scaling utilization performance index can be set. "
827
"Possible values include ADVANCED or DEFAULT.",
828
},
829
"UtilizationPerformanceIndex": {
830
"type": "integer",
831
"description": "An integer value that represents an advanced scaling strategy. "
832
"Setting a higher value optimizes for performance. "
833
"Setting a lower value optimizes for resource conservation. "
834
"Setting the value to 50 balances performance and resource conservation. "
835
"Possible values are 1, 25, 50, 75, and 100.",
836
},
837
},
838
}
839
840
PLACEMENT_GROUP_CONFIGS_SCHEMA = {
841
"type": "array",
842
"items": {
843
"type": "object",
844
"properties": {
845
"InstanceRole": {
846
"type": "string",
847
"description": "Role of the instance in the cluster.",
848
"enum": ["MASTER", "CORE", "TASK"],
849
"required": True,
850
},
851
"PlacementStrategy": {
852
"type": "string",
853
"description": "EC2 Placement Group strategy associated "
854
"with instance role.",
855
"enum": ["SPREAD", "PARTITION", "CLUSTER", "NONE"],
856
},
857
},
858
},
859
}
860
861
AUTO_TERMINATION_POLICY_SCHEMA = {
862
"type": "object",
863
"properties": {
864
"IdleTimeout": {
865
"type": "long",
866
"description": "Specifies the amount of idle time in seconds after which the cluster automatically terminates. "
867
"You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).",
868
}
869
},
870
}
871
872
MONITORING_CONFIGURATION_SCHEMA = {
873
"type": "object",
874
"properties": {
875
"CloudWatchLogConfiguration": {
876
"type": "object",
877
"description": "CloudWatch log configuration settings and metadata that specify settings like log files to monitor and where to send them.",
878
"properties": {
879
"Enabled": {
880
"type": "boolean",
881
"description": "Specifies if CloudWatch logging is enabled.",
882
"required": True
883
},
884
"LogGroupName": {
885
"type": "string",
886
"description": "The name of the CloudWatch log group where logs are published."
887
},
888
"LogStreamNamePrefix": {
889
"type": "string",
890
"description": "The prefix of the log stream name."
891
},
892
"EncryptionKeyArn": {
893
"type": "string",
894
"description": "The ARN of the encryption key used to encrypt the logs."
895
},
896
"LogTypes": {
897
"type": "map",
898
"key": {
899
"type": "string",
900
"description": "Log type category"
901
},
902
"value": {
903
"type": "array",
904
"items": {
905
"type": "string"
906
},
907
"description": "File names (STDOUT or STDERR) for the log type"
908
},
909
"description": "A map of log types to file names for publishing logs to the standard output or standard error streams for CloudWatch. Valid log types include STEP_LOGS, SPARK_DRIVER, and SPARK_EXECUTOR. Valid file names for each type include STDOUT and STDERR."
910
}
911
}
912
}
913
}
914
}
915
916