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