-
Notifications
You must be signed in to change notification settings - Fork 17
/
CfnInstanceFleetConfigProps.go
120 lines (117 loc) · 7.12 KB
/
CfnInstanceFleetConfigProps.go
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
112
113
114
115
116
117
118
119
package awsemr
// Properties for defining a `CfnInstanceFleetConfig`.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var configurationProperty_ configurationProperty
//
// cfnInstanceFleetConfigProps := &CfnInstanceFleetConfigProps{
// ClusterId: jsii.String("clusterId"),
// InstanceFleetType: jsii.String("instanceFleetType"),
//
// // the properties below are optional
// InstanceTypeConfigs: []interface{}{
// &InstanceTypeConfigProperty{
// InstanceType: jsii.String("instanceType"),
//
// // the properties below are optional
// BidPrice: jsii.String("bidPrice"),
// BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123),
// Configurations: []interface{}{
// &configurationProperty{
// Classification: jsii.String("classification"),
// ConfigurationProperties: map[string]*string{
// "configurationPropertiesKey": jsii.String("configurationProperties"),
// },
// Configurations: []interface{}{
// configurationProperty_,
// },
// },
// },
// CustomAmiId: jsii.String("customAmiId"),
// EbsConfiguration: &EbsConfigurationProperty{
// EbsBlockDeviceConfigs: []interface{}{
// &EbsBlockDeviceConfigProperty{
// VolumeSpecification: &VolumeSpecificationProperty{
// SizeInGb: jsii.Number(123),
// VolumeType: jsii.String("volumeType"),
//
// // the properties below are optional
// Iops: jsii.Number(123),
// Throughput: jsii.Number(123),
// },
//
// // the properties below are optional
// VolumesPerInstance: jsii.Number(123),
// },
// },
// EbsOptimized: jsii.Boolean(false),
// },
// WeightedCapacity: jsii.Number(123),
// },
// },
// LaunchSpecifications: &InstanceFleetProvisioningSpecificationsProperty{
// OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{
// AllocationStrategy: jsii.String("allocationStrategy"),
// },
// SpotSpecification: &SpotProvisioningSpecificationProperty{
// TimeoutAction: jsii.String("timeoutAction"),
// TimeoutDurationMinutes: jsii.Number(123),
//
// // the properties below are optional
// AllocationStrategy: jsii.String("allocationStrategy"),
// BlockDurationMinutes: jsii.Number(123),
// },
// },
// Name: jsii.String("name"),
// TargetOnDemandCapacity: jsii.Number(123),
// TargetSpotCapacity: jsii.Number(123),
// }
//
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html
//
type CfnInstanceFleetConfigProps struct {
// The unique identifier of the EMR cluster.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-clusterid
//
ClusterId *string `field:"required" json:"clusterId" yaml:"clusterId"`
// The node type that the instance fleet hosts.
//
// *Allowed Values* : TASK.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-instancefleettype
//
InstanceFleetType *string `field:"required" json:"instanceFleetType" yaml:"instanceFleetType"`
// `InstanceTypeConfigs` determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
//
// > The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-instancetypeconfigs
//
InstanceTypeConfigs interface{} `field:"optional" json:"instanceTypeConfigs" yaml:"instanceTypeConfigs"`
// The launch specification for the instance fleet.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-launchspecifications
//
LaunchSpecifications interface{} `field:"optional" json:"launchSpecifications" yaml:"launchSpecifications"`
// The friendly name of the instance fleet.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-name
//
Name *string `field:"optional" json:"name" yaml:"name"`
// The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
//
// When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by `InstanceTypeConfig` . Each instance configuration has a specified `WeightedCapacity` . When an On-Demand instance is provisioned, the `WeightedCapacity` units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a `WeightedCapacity` of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
//
// > If not specified or set to 0, only Spot instances are provisioned for the instance fleet using `TargetSpotCapacity` . At least one of `TargetSpotCapacity` and `TargetOnDemandCapacity` should be greater than 0. For a master instance fleet, only one of `TargetSpotCapacity` and `TargetOnDemandCapacity` can be specified, and its value must be 1.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-targetondemandcapacity
//
TargetOnDemandCapacity *float64 `field:"optional" json:"targetOnDemandCapacity" yaml:"targetOnDemandCapacity"`
// The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
//
// When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by `InstanceTypeConfig` . Each instance configuration has a specified `WeightedCapacity` . When a Spot instance is provisioned, the `WeightedCapacity` units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a `WeightedCapacity` of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
//
// > If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of `TargetSpotCapacity` and `TargetOnDemandCapacity` should be greater than 0. For a master instance fleet, only one of `TargetSpotCapacity` and `TargetOnDemandCapacity` can be specified, and its value must be 1.
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancefleetconfig.html#cfn-emr-instancefleetconfig-targetspotcapacity
//
TargetSpotCapacity *float64 `field:"optional" json:"targetSpotCapacity" yaml:"targetSpotCapacity"`
}