class CfnCluster (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EMR.CfnCluster |
Java | software.amazon.awscdk.services.emr.CfnCluster |
Python | aws_cdk.aws_emr.CfnCluster |
TypeScript | @aws-cdk/aws-emr » CfnCluster |
Implements
IConstruct
, IConstruct
, IDependable
, IInspectable
A CloudFormation AWS::EMR::Cluster
.
The AWS::EMR::Cluster
resource specifies an Amazon EMR cluster. This cluster is a collection of Amazon EC2 instances that run open source big data frameworks and applications to process and analyze vast amounts of data. For more information, see the Amazon EMR Management Guide .
Amazon EMR now supports launching task instance groups and task instance fleets as part of the AWS::EMR::Cluster
resource. This can be done by using the JobFlowInstancesConfig
property type's TaskInstanceGroups
and TaskInstanceFleets
subproperties. Using these subproperties reduces delays in provisioning task nodes compared to specifying task nodes with the AWS::EMR::InstanceGroupConfig
and AWS::EMR::InstanceFleetConfig
resources. Please refer to the examples at the bottom of this page to learn how to use these subproperties.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as emr from '@aws-cdk/aws-emr';
declare const additionalInfo: any;
declare const configurationProperty_: emr.CfnCluster.ConfigurationProperty;
const cfnCluster = new emr.CfnCluster(this, 'MyCfnCluster', {
instances: {
additionalMasterSecurityGroups: ['additionalMasterSecurityGroups'],
additionalSlaveSecurityGroups: ['additionalSlaveSecurityGroups'],
coreInstanceFleet: {
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
},
coreInstanceGroup: {
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
},
ec2KeyName: 'ec2KeyName',
ec2SubnetId: 'ec2SubnetId',
ec2SubnetIds: ['ec2SubnetIds'],
emrManagedMasterSecurityGroup: 'emrManagedMasterSecurityGroup',
emrManagedSlaveSecurityGroup: 'emrManagedSlaveSecurityGroup',
hadoopVersion: 'hadoopVersion',
keepJobFlowAliveWhenNoSteps: false,
masterInstanceFleet: {
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
},
masterInstanceGroup: {
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
},
placement: {
availabilityZone: 'availabilityZone',
},
serviceAccessSecurityGroup: 'serviceAccessSecurityGroup',
taskInstanceFleets: [{
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
}],
taskInstanceGroups: [{
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
}],
terminationProtected: false,
},
jobFlowRole: 'jobFlowRole',
name: 'name',
serviceRole: 'serviceRole',
// the properties below are optional
additionalInfo: additionalInfo,
applications: [{
additionalInfo: {
additionalInfoKey: 'additionalInfo',
},
args: ['args'],
name: 'name',
version: 'version',
}],
autoScalingRole: 'autoScalingRole',
autoTerminationPolicy: {
idleTimeout: 123,
},
bootstrapActions: [{
name: 'name',
scriptBootstrapAction: {
path: 'path',
// the properties below are optional
args: ['args'],
},
}],
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsRootVolumeSize: 123,
kerberosAttributes: {
kdcAdminPassword: 'kdcAdminPassword',
realm: 'realm',
// the properties below are optional
adDomainJoinPassword: 'adDomainJoinPassword',
adDomainJoinUser: 'adDomainJoinUser',
crossRealmTrustPrincipalPassword: 'crossRealmTrustPrincipalPassword',
},
logEncryptionKmsKeyId: 'logEncryptionKmsKeyId',
logUri: 'logUri',
managedScalingPolicy: {
computeLimits: {
maximumCapacityUnits: 123,
minimumCapacityUnits: 123,
unitType: 'unitType',
// the properties below are optional
maximumCoreCapacityUnits: 123,
maximumOnDemandCapacityUnits: 123,
},
},
osReleaseLabel: 'osReleaseLabel',
releaseLabel: 'releaseLabel',
scaleDownBehavior: 'scaleDownBehavior',
securityConfiguration: 'securityConfiguration',
stepConcurrencyLevel: 123,
steps: [{
hadoopJarStep: {
jar: 'jar',
// the properties below are optional
args: ['args'],
mainClass: 'mainClass',
stepProperties: [{
key: 'key',
value: 'value',
}],
},
name: 'name',
// the properties below are optional
actionOnFailure: 'actionOnFailure',
}],
tags: [{
key: 'key',
value: 'value',
}],
visibleToAllUsers: false,
});
Initializer
new CfnCluster(scope: Construct, id: string, props: CfnClusterProps)
Parameters
- scope
Construct
— - scope in which this resource is defined. - id
string
— - scoped id of the resource. - props
Cfn
— - resource properties.Cluster Props
Create a new AWS::EMR::Cluster
.
Construct Props
Name | Type | Description |
---|---|---|
instances | Job | IResolvable | A specification of the number and type of Amazon EC2 instances. |
job | string | Also called instance profile and Amazon EC2 role. |
name | string | The name of the cluster. |
service | string | The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf. |
additional | any | A JSON string for selecting additional features. |
applications? | IResolvable | IResolvable | Application [] | The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. |
auto | string | An IAM role for automatic scaling policies. |
auto | IResolvable | Auto | AWS::EMR::Cluster.AutoTerminationPolicy . |
bootstrap | IResolvable | IResolvable | Bootstrap [] | A list of bootstrap actions to run before Hadoop starts on the cluster nodes. |
configurations? | IResolvable | IResolvable | Configuration [] | Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. |
custom | string | Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI. |
ebs | number | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. |
kerberos | IResolvable | Kerberos | Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. |
log | string | The AWS KMS key used for encrypting log files. |
log | string | The path to the Amazon S3 location where logs for this cluster are stored. |
managed | IResolvable | Managed | Creates or updates a managed scaling policy for an Amazon EMR cluster. |
os | string | AWS::EMR::Cluster.OSReleaseLabel . |
release | string | The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. |
scale | string | The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. |
security | string | The name of the security configuration applied to the cluster. |
step | number | Specifies the number of steps that can be executed concurrently. |
steps? | IResolvable | IResolvable | Step [] | A list of steps to run. |
tags? | Cfn [] | A list of tags associated with a cluster. |
visible | boolean | IResolvable | Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. |
instances
Type:
Job
|
IResolvable
A specification of the number and type of Amazon EC2 instances.
jobFlowRole
Type:
string
Also called instance profile and Amazon EC2 role.
An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole
. In order to use the default role, you must have already created it using the AWS CLI or console.
name
Type:
string
The name of the cluster.
serviceRole
Type:
string
The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf.
additionalInfo?
Type:
any
(optional)
A JSON string for selecting additional features.
applications?
Type:
IResolvable
|
IResolvable
|
Application
[]
(optional)
The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.
autoScalingRole?
Type:
string
(optional)
An IAM role for automatic scaling policies.
The default role is EMR_AutoScaling_DefaultRole
. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.
autoTerminationPolicy?
Type:
IResolvable
|
Auto
(optional)
AWS::EMR::Cluster.AutoTerminationPolicy
.
bootstrapActions?
Type:
IResolvable
|
IResolvable
|
Bootstrap
[]
(optional)
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
configurations?
Type:
IResolvable
|
IResolvable
|
Configuration
[]
(optional)
Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.
customAmiId?
Type:
string
(optional)
Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
ebsRootVolumeSize?
Type:
number
(optional)
The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance.
Available in Amazon EMR releases 4.x and later.
kerberosAttributes?
Type:
IResolvable
|
Kerberos
(optional)
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
For more information see Use Kerberos Authentication in the Amazon EMR Management Guide .
logEncryptionKmsKeyId?
Type:
string
(optional)
The AWS KMS key used for encrypting log files.
This attribute is only available with Amazon EMR 5.30.0 and later, excluding Amazon EMR 6.0.0.
logUri?
Type:
string
(optional)
The path to the Amazon S3 location where logs for this cluster are stored.
managedScalingPolicy?
Type:
IResolvable
|
Managed
(optional)
Creates or updates a managed scaling policy for an Amazon EMR cluster.
The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
osReleaseLabel?
Type:
string
(optional)
AWS::EMR::Cluster.OSReleaseLabel
.
releaseLabel?
Type:
string
(optional)
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.
Release labels are in the form emr-x.x.x
, where x.x.x is an Amazon EMR release version such as emr-5.14.0
. For more information about Amazon EMR release versions and included application versions and features, see . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion
.
scaleDownBehavior?
Type:
string
(optional)
The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
securityConfiguration?
Type:
string
(optional)
The name of the security configuration applied to the cluster.
stepConcurrencyLevel?
Type:
number
(optional)
Specifies the number of steps that can be executed concurrently.
The default value is 1
. The maximum value is 256
.
steps?
Type:
IResolvable
|
IResolvable
|
Step
[]
(optional)
A list of steps to run.
tags?
Type:
Cfn
[]
(optional)
A list of tags associated with a cluster.
visibleToAllUsers?
Type:
boolean |
IResolvable
(optional)
Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.
If this value is set to true
, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false
, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.
When you create clusters directly through the EMR console or API, this value is set to
true
by default. However, forAWS::EMR::Cluster
resources in CloudFormation, the default isfalse
.
Properties
Name | Type | Description |
---|---|---|
additional | any | A JSON string for selecting additional features. |
attr | string | The public DNS name of the master node (instance), such as ec2-12-123-123-123.us-west-2.compute.amazonaws.com . |
cfn | ICfn | Options for this resource, such as condition, update policy etc. |
cfn | { [string]: any } | |
cfn | string | AWS resource type. |
creation | string[] | |
instances | Job | IResolvable | A specification of the number and type of Amazon EC2 instances. |
job | string | Also called instance profile and Amazon EC2 role. |
logical | string | The logical ID for this CloudFormation stack element. |
name | string | The name of the cluster. |
node | Construct | The construct tree node associated with this construct. |
ref | string | Return a string that will be resolved to a CloudFormation { Ref } for this element. |
service | string | The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf. |
stack | Stack | The stack in which this element is defined. |
tags | Tag | A list of tags associated with a cluster. |
applications? | IResolvable | IResolvable | Application [] | The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. |
auto | string | An IAM role for automatic scaling policies. |
auto | IResolvable | Auto | AWS::EMR::Cluster.AutoTerminationPolicy . |
bootstrap | IResolvable | IResolvable | Bootstrap [] | A list of bootstrap actions to run before Hadoop starts on the cluster nodes. |
configurations? | IResolvable | IResolvable | Configuration [] | Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. |
custom | string | Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI. |
ebs | number | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. |
kerberos | IResolvable | Kerberos | Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. |
log | string | The AWS KMS key used for encrypting log files. |
log | string | The path to the Amazon S3 location where logs for this cluster are stored. |
managed | IResolvable | Managed | Creates or updates a managed scaling policy for an Amazon EMR cluster. |
os | string | AWS::EMR::Cluster.OSReleaseLabel . |
release | string | The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. |
scale | string | The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. |
security | string | The name of the security configuration applied to the cluster. |
step | number | Specifies the number of steps that can be executed concurrently. |
steps? | IResolvable | IResolvable | Step [] | A list of steps to run. |
visible | boolean | IResolvable | Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. |
static CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. |
additionalInfo
Type:
any
A JSON string for selecting additional features.
attrMasterPublicDns
Type:
string
The public DNS name of the master node (instance), such as ec2-12-123-123-123.us-west-2.compute.amazonaws.com
.
cfnOptions
Type:
ICfn
Options for this resource, such as condition, update policy etc.
cfnProperties
Type:
{ [string]: any }
cfnResourceType
Type:
string
AWS resource type.
creationStack
Type:
string[]
instances
Type:
Job
|
IResolvable
A specification of the number and type of Amazon EC2 instances.
jobFlowRole
Type:
string
Also called instance profile and Amazon EC2 role.
An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole
. In order to use the default role, you must have already created it using the AWS CLI or console.
logicalId
Type:
string
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
name
Type:
string
The name of the cluster.
node
Type:
Construct
The construct tree node associated with this construct.
ref
Type:
string
Return a string that will be resolved to a CloudFormation { Ref }
for this element.
If, by any chance, the intrinsic reference of a resource is not a string, you could
coerce it to an IResolvable through Lazy.any({ produce: resource.ref })
.
serviceRole
Type:
string
The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf.
stack
Type:
Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
tags
Type:
Tag
A list of tags associated with a cluster.
applications?
Type:
IResolvable
|
IResolvable
|
Application
[]
(optional)
The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.
autoScalingRole?
Type:
string
(optional)
An IAM role for automatic scaling policies.
The default role is EMR_AutoScaling_DefaultRole
. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.
autoTerminationPolicy?
Type:
IResolvable
|
Auto
(optional)
AWS::EMR::Cluster.AutoTerminationPolicy
.
bootstrapActions?
Type:
IResolvable
|
IResolvable
|
Bootstrap
[]
(optional)
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
configurations?
Type:
IResolvable
|
IResolvable
|
Configuration
[]
(optional)
Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.
customAmiId?
Type:
string
(optional)
Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
ebsRootVolumeSize?
Type:
number
(optional)
The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance.
Available in Amazon EMR releases 4.x and later.
kerberosAttributes?
Type:
IResolvable
|
Kerberos
(optional)
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
For more information see Use Kerberos Authentication in the Amazon EMR Management Guide .
logEncryptionKmsKeyId?
Type:
string
(optional)
The AWS KMS key used for encrypting log files.
This attribute is only available with Amazon EMR 5.30.0 and later, excluding Amazon EMR 6.0.0.
logUri?
Type:
string
(optional)
The path to the Amazon S3 location where logs for this cluster are stored.
managedScalingPolicy?
Type:
IResolvable
|
Managed
(optional)
Creates or updates a managed scaling policy for an Amazon EMR cluster.
The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
osReleaseLabel?
Type:
string
(optional)
AWS::EMR::Cluster.OSReleaseLabel
.
releaseLabel?
Type:
string
(optional)
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.
Release labels are in the form emr-x.x.x
, where x.x.x is an Amazon EMR release version such as emr-5.14.0
. For more information about Amazon EMR release versions and included application versions and features, see . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion
.
scaleDownBehavior?
Type:
string
(optional)
The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
securityConfiguration?
Type:
string
(optional)
The name of the security configuration applied to the cluster.
stepConcurrencyLevel?
Type:
number
(optional)
Specifies the number of steps that can be executed concurrently.
The default value is 1
. The maximum value is 256
.
steps?
Type:
IResolvable
|
IResolvable
|
Step
[]
(optional)
A list of steps to run.
visibleToAllUsers?
Type:
boolean |
IResolvable
(optional)
Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.
If this value is set to true
, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false
, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.
When you create clusters directly through the EMR console or API, this value is set to
true
by default. However, forAWS::EMR::Cluster
resources in CloudFormation, the default isfalse
.
static CFN_RESOURCE_TYPE_NAME
Type:
string
The CloudFormation resource type name for this resource class.
Methods
Name | Description |
---|---|
add | Syntactic sugar for addOverride(path, undefined) . |
add | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. |
add | Add a value to the CloudFormation Resource Metadata. |
add | Adds an override to the synthesized CloudFormation resource. |
add | Adds an override that deletes the value of a property from the resource definition. |
add | Adds an override to a resource property. |
apply | Sets the deletion policy of the resource based on the removal policy specified. |
get | Returns a token for an runtime attribute of this resource. |
get | Retrieve a value value from the CloudFormation Resource Metadata. |
inspect(inspector) | Examines the CloudFormation resource and discloses attributes. |
override | Overrides the auto-generated logical ID with a specific ID. |
to | Returns a string representation of this construct. |
protected render |
DeletionOverride(path)
addpublic addDeletionOverride(path: string): void
Parameters
- path
string
— The path of the value to delete.
Syntactic sugar for addOverride(path, undefined)
.
DependsOn(target)
addpublic addDependsOn(target: CfnResource): void
Parameters
- target
Cfn
Resource
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
Metadata(key, value)
addpublic addMetadata(key: string, value: any): void
Parameters
- key
string
- value
any
Add a value to the CloudFormation Resource Metadata.
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.)
Override(path, value)
addpublic addOverride(path: string, value: any): void
Parameters
- path
string
— - The path of the property, you can use dot notation to override values in complex types. - value
any
— - The value.
Adds an override to the synthesized CloudFormation resource.
To add a
property override, either use addPropertyOverride
or prefix path
with
"Properties." (i.e. Properties.TopicName
).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal .
in the property name, prefix with a \
. In most
programming languages you will need to write this as "\\."
because the
\
itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value
argument to addOverride
will not be processed or translated
in any way. Pass raw JSON values in here with the correct capitalization
for CloudFormation. If you pass CDK classes or structs, they will be
rendered with lowercased key names, and CloudFormation will reject the
template.
PropertyDeletionOverride(propertyPath)
addpublic addPropertyDeletionOverride(propertyPath: string): void
Parameters
- propertyPath
string
— The path to the property.
Adds an override that deletes the value of a property from the resource definition.
PropertyOverride(propertyPath, value)
addpublic addPropertyOverride(propertyPath: string, value: any): void
Parameters
- propertyPath
string
— The path of the property. - value
any
— The value.
Adds an override to a resource property.
Syntactic sugar for addOverride("Properties.<...>", value)
.
RemovalPolicy(policy?, options?)
applypublic applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void
Parameters
- policy
Removal
Policy - options
Removal
Policy Options
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
Att(attributeName)
getpublic getAtt(attributeName: string): Reference
Parameters
- attributeName
string
— The name of the attribute.
Returns
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g. resource.arn
), but this can be used for future compatibility
in case there is no generated attribute.
Metadata(key)
getpublic getMetadata(key: string): any
Parameters
- key
string
Returns
any
Retrieve a value value from the CloudFormation Resource Metadata.
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.)
inspect(inspector)
public inspect(inspector: TreeInspector): void
Parameters
- inspector
Tree
— - tree inspector to collect and process attributes.Inspector
Examines the CloudFormation resource and discloses attributes.
LogicalId(newLogicalId)
overridepublic overrideLogicalId(newLogicalId: string): void
Parameters
- newLogicalId
string
— The new logical ID to use for this stack element.
Overrides the auto-generated logical ID with a specific ID.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
Properties(props)
protected renderprotected renderProperties(props: { [string]: any }): { [string]: any }
Parameters
- props
{ [string]: any }
Returns
{ [string]: any }