-
Notifications
You must be signed in to change notification settings - Fork 17
/
awsstepfunctionstasks_EmrCreateCluster_InstancesConfigProperty.go
102 lines (99 loc) · 5.22 KB
/
awsstepfunctionstasks_EmrCreateCluster_InstancesConfigProperty.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
package awsstepfunctionstasks
// A specification of the number and type of Amazon EC2 instances.
//
// See the RunJobFlow API for complete documentation on input parameters.
//
// Example:
// clusterRole := iam.NewRole(this, jsii.String("ClusterRole"), &roleProps{
// assumedBy: iam.NewServicePrincipal(jsii.String("ec2.amazonaws.com")),
// })
//
// serviceRole := iam.NewRole(this, jsii.String("ServiceRole"), &roleProps{
// assumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
// })
//
// autoScalingRole := iam.NewRole(this, jsii.String("AutoScalingRole"), &roleProps{
// assumedBy: iam.NewServicePrincipal(jsii.String("elasticmapreduce.amazonaws.com")),
// })
//
// autoScalingRole.assumeRolePolicy.addStatements(
// iam.NewPolicyStatement(&policyStatementProps{
// effect: iam.effect_ALLOW,
// principals: []iPrincipal{
// iam.NewServicePrincipal(jsii.String("application-autoscaling.amazonaws.com")),
// },
// actions: []*string{
// jsii.String("sts:AssumeRole"),
// },
// }))
//
// tasks.NewEmrCreateCluster(this, jsii.String("Create Cluster"), &emrCreateClusterProps{
// instances: &instancesConfigProperty{
// },
// clusterRole: clusterRole,
// name: sfn.taskInput.fromJsonPathAt(jsii.String("$.ClusterName")).value,
// serviceRole: serviceRole,
// autoScalingRole: autoScalingRole,
// })
//
// See: https://docs.aws.amazon.com/emr/latest/APIReference/API_JobFlowInstancesConfig.html
//
// Experimental.
type EmrCreateCluster_InstancesConfigProperty struct {
// A list of additional Amazon EC2 security group IDs for the master node.
// Experimental.
AdditionalMasterSecurityGroups *[]*string `field:"optional" json:"additionalMasterSecurityGroups" yaml:"additionalMasterSecurityGroups"`
// A list of additional Amazon EC2 security group IDs for the core and task nodes.
// Experimental.
AdditionalSlaveSecurityGroups *[]*string `field:"optional" json:"additionalSlaveSecurityGroups" yaml:"additionalSlaveSecurityGroups"`
// The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.".
// Experimental.
Ec2KeyName *string `field:"optional" json:"ec2KeyName" yaml:"ec2KeyName"`
// Applies to clusters that use the uniform instance group configuration.
//
// To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC),
// set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch.
// Experimental.
Ec2SubnetId *string `field:"optional" json:"ec2SubnetId" yaml:"ec2SubnetId"`
// Applies to clusters that use the instance fleet configuration.
//
// When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and
// launches instances in the optimal subnet.
// Experimental.
Ec2SubnetIds *[]*string `field:"optional" json:"ec2SubnetIds" yaml:"ec2SubnetIds"`
// The identifier of the Amazon EC2 security group for the master node.
// Experimental.
EmrManagedMasterSecurityGroup *string `field:"optional" json:"emrManagedMasterSecurityGroup" yaml:"emrManagedMasterSecurityGroup"`
// The identifier of the Amazon EC2 security group for the core and task nodes.
// Experimental.
EmrManagedSlaveSecurityGroup *string `field:"optional" json:"emrManagedSlaveSecurityGroup" yaml:"emrManagedSlaveSecurityGroup"`
// Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster.
// Experimental.
HadoopVersion *string `field:"optional" json:"hadoopVersion" yaml:"hadoopVersion"`
// The number of EC2 instances in the cluster.
// Experimental.
InstanceCount *float64 `field:"optional" json:"instanceCount" yaml:"instanceCount"`
// Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.
//
// The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
// Experimental.
InstanceFleets *[]*EmrCreateCluster_InstanceFleetConfigProperty `field:"optional" json:"instanceFleets" yaml:"instanceFleets"`
// Configuration for the instance groups in a cluster.
// Experimental.
InstanceGroups *[]*EmrCreateCluster_InstanceGroupConfigProperty `field:"optional" json:"instanceGroups" yaml:"instanceGroups"`
// The EC2 instance type of the master node.
// Experimental.
MasterInstanceType *string `field:"optional" json:"masterInstanceType" yaml:"masterInstanceType"`
// The Availability Zone in which the cluster runs.
// Experimental.
Placement *EmrCreateCluster_PlacementTypeProperty `field:"optional" json:"placement" yaml:"placement"`
// The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
// Experimental.
ServiceAccessSecurityGroup *string `field:"optional" json:"serviceAccessSecurityGroup" yaml:"serviceAccessSecurityGroup"`
// The EC2 instance type of the core and task nodes.
// Experimental.
SlaveInstanceType *string `field:"optional" json:"slaveInstanceType" yaml:"slaveInstanceType"`
// Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.
// Experimental.
TerminationProtected *bool `field:"optional" json:"terminationProtected" yaml:"terminationProtected"`
}