UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

775 lines 202 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * 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](https://docs.aws.amazon.com//emr/latest/ManagementGuide/) . * * 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. * * @cloudformationResource AWS::EMR::Cluster * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-cluster.html */ export declare class CfnCluster extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnCluster from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCluster; /** * The unique identifier for the cluster. * * @cloudformationAttribute Id */ readonly attrId: string; /** * The public DNS name of the master node (instance), such as `ec2-12-123-123-123.us-west-2.compute.amazonaws.com` . * * @cloudformationAttribute MasterPublicDNS */ readonly attrMasterPublicDns: string; /** * A JSON string for selecting additional features. */ additionalInfo?: any | cdk.IResolvable; /** * The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. */ applications?: Array<CfnCluster.ApplicationProperty | cdk.IResolvable> | cdk.IResolvable; /** * An IAM role for automatic scaling policies. */ autoScalingRole?: string; /** * An auto-termination policy for an Amazon EMR cluster. */ autoTerminationPolicy?: CfnCluster.AutoTerminationPolicyProperty | cdk.IResolvable; /** * A list of bootstrap actions to run before Hadoop starts on the cluster nodes. */ bootstrapActions?: Array<CfnCluster.BootstrapActionConfigProperty | cdk.IResolvable> | cdk.IResolvable; /** * Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. */ configurations?: Array<CfnCluster.ConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; /** * 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. */ customAmiId?: string; /** * The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. */ ebsRootVolumeIops?: number; /** * The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. */ ebsRootVolumeSize?: number; /** * The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. */ ebsRootVolumeThroughput?: number; /** * A specification of the number and type of Amazon EC2 instances. */ instances: cdk.IResolvable | CfnCluster.JobFlowInstancesConfigProperty; /** * Also called instance profile and Amazon EC2 role. */ jobFlowRole: string; /** * Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. */ kerberosAttributes?: cdk.IResolvable | CfnCluster.KerberosAttributesProperty; /** * The AWS KMS key used for encrypting log files. */ logEncryptionKmsKeyId?: string; /** * The path to the Amazon S3 location where logs for this cluster are stored. */ logUri?: string; /** * Creates or updates a managed scaling policy for an Amazon EMR cluster. */ managedScalingPolicy?: cdk.IResolvable | CfnCluster.ManagedScalingPolicyProperty; /** * The name of the cluster. */ name: string; /** * The Amazon Linux release specified in a cluster launch RunJobFlow request. */ osReleaseLabel?: string; placementGroupConfigs?: Array<cdk.IResolvable | CfnCluster.PlacementGroupConfigProperty> | cdk.IResolvable; /** * The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. */ releaseLabel?: string; /** * The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. */ scaleDownBehavior?: string; /** * The name of the security configuration applied to the cluster. */ securityConfiguration?: string; /** * The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf. */ serviceRole: string; /** * Specifies the number of steps that can be executed concurrently. */ stepConcurrencyLevel?: number; /** * A list of steps to run. */ steps?: Array<cdk.IResolvable | CfnCluster.StepConfigProperty> | cdk.IResolvable; /** * Tag Manager which manages the tags for this resource */ readonly tags: cdk.TagManager; /** * A list of tags associated with a cluster. */ tagsRaw?: Array<cdk.CfnTag>; /** * Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. */ visibleToAllUsers?: boolean | cdk.IResolvable; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnClusterProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnCluster { /** * `Application` is a property of `AWS::EMR::Cluster` . * * The `Application` property type defines the open-source big data applications for EMR to install and configure when a cluster is created. * * With Amazon EMR release version 4.0 and later, the only accepted parameter is the application `Name` . To pass arguments to these applications, you use configuration classifications specified using JSON objects in a `Configuration` property. For more information, see [Configuring Applications](https://docs.aws.amazon.com//emr/latest/ReleaseGuide/emr-configure-apps.html) . * * With earlier Amazon EMR releases, the application is any AWS or third-party software that you can add to the cluster. You can specify the version of the application and arguments to pass to it. Amazon EMR accepts and forwards the argument list to the corresponding installation script as a bootstrap action argument. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-application.html */ interface ApplicationProperty { /** * This option is for advanced users only. * * This is meta information about clusters and applications that are used for testing and troubleshooting. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-application.html#cfn-emr-cluster-application-additionalinfo */ readonly additionalInfo?: cdk.IResolvable | Record<string, string>; /** * Arguments for Amazon EMR to pass to the application. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-application.html#cfn-emr-cluster-application-args */ readonly args?: Array<string>; /** * The name of the application. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-application.html#cfn-emr-cluster-application-name */ readonly name?: string; /** * The version of the application. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-application.html#cfn-emr-cluster-application-version */ readonly version?: string; } /** * An auto-termination policy for an Amazon EMR cluster. * * An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see [Control cluster termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html) . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-autoterminationpolicy.html */ interface AutoTerminationPolicyProperty { /** * Specifies the amount of idle time in seconds after which the cluster automatically terminates. * * You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days). * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-autoterminationpolicy.html#cfn-emr-cluster-autoterminationpolicy-idletimeout */ readonly idleTimeout?: number; } /** * `BootstrapActionConfig` is a property of `AWS::EMR::Cluster` that can be used to run bootstrap actions on EMR clusters. * * You can use a bootstrap action to install software and configure EC2 instances for all cluster nodes before EMR installs and configures open-source big data applications on cluster instances. For more information, see [Create Bootstrap Actions to Install Additional Software](https://docs.aws.amazon.com//emr/latest/ManagementGuide/emr-plan-bootstrap.html) in the *Amazon EMR Management Guide* . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig.html */ interface BootstrapActionConfigProperty { /** * The name of the bootstrap action. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig.html#cfn-emr-cluster-bootstrapactionconfig-name */ readonly name: string; /** * The script run by the bootstrap action. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-bootstrapactionconfig.html#cfn-emr-cluster-bootstrapactionconfig-scriptbootstrapaction */ readonly scriptBootstrapAction: cdk.IResolvable | CfnCluster.ScriptBootstrapActionConfigProperty; } /** * `ScriptBootstrapActionConfig` is a subproperty of the `BootstrapActionConfig` property type. * * `ScriptBootstrapActionConfig` specifies the arguments and location of the bootstrap script for EMR to run on all cluster nodes before it installs open-source big data applications on them. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-scriptbootstrapactionconfig.html */ interface ScriptBootstrapActionConfigProperty { /** * A list of command line arguments to pass to the bootstrap action script. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-scriptbootstrapactionconfig.html#cfn-emr-cluster-scriptbootstrapactionconfig-args */ readonly args?: Array<string>; /** * Location in Amazon S3 of the script to run during a bootstrap action. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-scriptbootstrapactionconfig.html#cfn-emr-cluster-scriptbootstrapactionconfig-path */ readonly path: string; } /** * > Used only with Amazon EMR release 4.0 and later. * * `Configuration` is a subproperty of `InstanceFleetConfig` or `InstanceGroupConfig` . `Configuration` specifies optional configurations for customizing open-source big data applications and environment parameters. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see [Configuring Applications](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) in the *Amazon EMR Release Guide* . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html */ interface ConfigurationProperty { /** * The classification within a configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-classification */ readonly classification?: string; /** * A list of additional configurations to apply within a configuration object. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-configurationproperties */ readonly configurationProperties?: cdk.IResolvable | Record<string, string>; /** * A list of additional configurations to apply within a configuration object. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-configurations */ readonly configurations?: Array<CfnCluster.ConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; } /** * `JobFlowInstancesConfig` is a property of the `AWS::EMR::Cluster` resource. * * `JobFlowInstancesConfig` defines the instance groups or instance fleets that comprise the cluster. `JobFlowInstancesConfig` must contain either `InstanceFleetConfig` or `InstanceGroupConfig` . They cannot be used together. * * You can now define task instance groups or task instance fleets using the `TaskInstanceGroups` and `TaskInstanceFleets` subproperties. Using these subproperties reduces delays in provisioning task nodes compared to specifying task nodes with the `InstanceFleetConfig` and `InstanceGroupConfig` resources. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html */ interface JobFlowInstancesConfigProperty { /** * A list of additional Amazon EC2 security group IDs for the master node. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-additionalmastersecuritygroups */ readonly additionalMasterSecurityGroups?: Array<string>; /** * A list of additional Amazon EC2 security group IDs for the core and task nodes. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-additionalslavesecuritygroups */ readonly additionalSlaveSecurityGroups?: Array<string>; /** * Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-coreinstancefleet */ readonly coreInstanceFleet?: CfnCluster.InstanceFleetConfigProperty | cdk.IResolvable; /** * Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-coreinstancegroup */ readonly coreInstanceGroup?: CfnCluster.InstanceGroupConfigProperty | cdk.IResolvable; /** * The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.". * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-ec2keyname */ readonly ec2KeyName?: string; /** * 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. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-ec2subnetid */ readonly ec2SubnetId?: string; /** * Applies to clusters that use the instance fleet configuration. * * When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet. * * > The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-ec2subnetids */ readonly ec2SubnetIds?: Array<string>; /** * The identifier of the Amazon EC2 security group for the master node. * * If you specify `EmrManagedMasterSecurityGroup` , you must also specify `EmrManagedSlaveSecurityGroup` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-emrmanagedmastersecuritygroup */ readonly emrManagedMasterSecurityGroup?: string; /** * The identifier of the Amazon EC2 security group for the core and task nodes. * * If you specify `EmrManagedSlaveSecurityGroup` , you must also specify `EmrManagedMasterSecurityGroup` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-emrmanagedslavesecuritygroup */ readonly emrManagedSlaveSecurityGroup?: string; /** * Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the `AmiVersion` parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-hadoopversion */ readonly hadoopVersion?: string; /** * Specifies whether the cluster should remain available after completing all steps. * * Defaults to `false` . For more information about configuring cluster termination, see [Control Cluster Termination](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html) in the *EMR Management Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-keepjobflowalivewhennosteps */ readonly keepJobFlowAliveWhenNoSteps?: boolean | cdk.IResolvable; /** * Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-masterinstancefleet */ readonly masterInstanceFleet?: CfnCluster.InstanceFleetConfigProperty | cdk.IResolvable; /** * Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-masterinstancegroup */ readonly masterInstanceGroup?: CfnCluster.InstanceGroupConfigProperty | cdk.IResolvable; /** * The Availability Zone in which the cluster runs. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-placement */ readonly placement?: cdk.IResolvable | CfnCluster.PlacementTypeProperty; /** * The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-serviceaccesssecuritygroup */ readonly serviceAccessSecurityGroup?: string; /** * Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration. * * These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets. * * > You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of `InstanceFleetConfig` , which are `TargetOnDemandCapacity` and `TargetSpotCapacity` . Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, include `TaskInstanceFleets` when you create your cluster. If you create your cluster without `TaskInstanceFleets` , Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-taskinstancefleets */ readonly taskInstanceFleets?: Array<CfnCluster.InstanceFleetConfigProperty | cdk.IResolvable> | cdk.IResolvable; /** * Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration. * * These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups. * * > After creating the cluster, you can only modify the mutable properties of `InstanceGroupConfig` , which are `AutoScalingPolicy` and `InstanceCount` . Modifying any other property results in cluster replacement. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-taskinstancegroups */ readonly taskInstanceGroups?: Array<CfnCluster.InstanceGroupConfigProperty | cdk.IResolvable> | cdk.IResolvable; /** * 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. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-terminationprotected */ readonly terminationProtected?: boolean | cdk.IResolvable; /** * Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-jobflowinstancesconfig.html#cfn-emr-cluster-jobflowinstancesconfig-unhealthynodereplacement */ readonly unhealthyNodeReplacement?: boolean | cdk.IResolvable; } /** * Use `InstanceFleetConfig` to define instance fleets for an EMR cluster. * * A cluster can not use both instance fleets and instance groups. For more information, see [Configure Instance Fleets](https://docs.aws.amazon.com//emr/latest/ManagementGuide/emr-instance-group-configuration.html) in the *Amazon EMR Management Guide* . * * > The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetconfig.html */ interface InstanceFleetConfigProperty { /** * The instance type configurations that define the Amazon EC2 instances in the instance fleet. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-instancetypeconfigs */ readonly instanceTypeConfigs?: Array<CfnCluster.InstanceTypeConfigProperty | cdk.IResolvable> | cdk.IResolvable; /** * The launch specification for the instance fleet. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-launchspecifications */ readonly launchSpecifications?: CfnCluster.InstanceFleetProvisioningSpecificationsProperty | cdk.IResolvable; /** * The friendly name of the instance fleet. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-name */ readonly name?: string; /** * The resize specification for the instance fleet. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-resizespecifications */ readonly resizeSpecifications?: CfnCluster.InstanceFleetResizingSpecificationsProperty | cdk.IResolvable; /** * 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-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-targetondemandcapacity */ readonly targetOnDemandCapacity?: number; /** * 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-properties-emr-cluster-instancefleetconfig.html#cfn-emr-cluster-instancefleetconfig-targetspotcapacity */ readonly targetSpotCapacity?: number; } /** * > The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. * * `InstanceTypeConfig` is a sub-property of `InstanceFleetConfig` . `InstanceTypeConfig` determines the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html */ interface InstanceTypeConfigProperty { /** * The bid price for each Amazon EC2 Spot Instance type as defined by `InstanceType` . * * Expressed in USD. If neither `BidPrice` nor `BidPriceAsPercentageOfOnDemandPrice` is provided, `BidPriceAsPercentageOfOnDemandPrice` defaults to 100%. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-bidprice */ readonly bidPrice?: string; /** * The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by `InstanceType` . * * Expressed as a number (for example, 20 specifies 20%). If neither `BidPrice` nor `BidPriceAsPercentageOfOnDemandPrice` is provided, `BidPriceAsPercentageOfOnDemandPrice` defaults to 100%. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-bidpriceaspercentageofondemandprice */ readonly bidPriceAsPercentageOfOnDemandPrice?: number; /** * A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-configurations */ readonly configurations?: Array<CfnCluster.ConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; /** * The custom AMI ID to use for the instance type. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-customamiid */ readonly customAmiId?: string; /** * The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by `InstanceType` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-ebsconfiguration */ readonly ebsConfiguration?: CfnCluster.EbsConfigurationProperty | cdk.IResolvable; /** * An Amazon EC2 instance type, such as `m3.xlarge` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-instancetype */ readonly instanceType: string; /** * The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type. * * Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-priority */ readonly priority?: number; /** * The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in `InstanceFleetConfig` . * * This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancetypeconfig.html#cfn-emr-cluster-instancetypeconfig-weightedcapacity */ readonly weightedCapacity?: number; } /** * `EbsConfiguration` is a subproperty of `InstanceFleetConfig` or `InstanceGroupConfig` . * * `EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsconfiguration.html */ interface EbsConfigurationProperty { /** * An array of Amazon EBS volume specifications attached to a cluster instance. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsconfiguration.html#cfn-emr-cluster-ebsconfiguration-ebsblockdeviceconfigs */ readonly ebsBlockDeviceConfigs?: Array<CfnCluster.EbsBlockDeviceConfigProperty | cdk.IResolvable> | cdk.IResolvable; /** * Indicates whether an Amazon EBS volume is EBS-optimized. * * The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting for an EC2 instance. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsconfiguration.html#cfn-emr-cluster-ebsconfiguration-ebsoptimized */ readonly ebsOptimized?: boolean | cdk.IResolvable; } /** * `EbsBlockDeviceConfig` is a subproperty of the `EbsConfiguration` property type. * * `EbsBlockDeviceConfig` defines the number and type of EBS volumes to associate with all EC2 instances in an EMR cluster. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsblockdeviceconfig.html */ interface EbsBlockDeviceConfigProperty { /** * EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsblockdeviceconfig.html#cfn-emr-cluster-ebsblockdeviceconfig-volumespecification */ readonly volumeSpecification: cdk.IResolvable | CfnCluster.VolumeSpecificationProperty; /** * Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ebsblockdeviceconfig.html#cfn-emr-cluster-ebsblockdeviceconfig-volumesperinstance */ readonly volumesPerInstance?: number; } /** * `VolumeSpecification` is a subproperty of the `EbsBlockDeviceConfig` property type. * * `VolumeSecification` determines the volume type, IOPS, and size (GiB) for EBS volumes attached to EC2 instances. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-volumespecification.html */ interface VolumeSpecificationProperty { /** * The number of I/O operations per second (IOPS) that the volume supports. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-volumespecification.html#cfn-emr-cluster-volumespecification-iops */ readonly iops?: number; /** * The volume size, in gibibytes (GiB). * * This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-volumespecification.html#cfn-emr-cluster-volumespecification-sizeingb */ readonly sizeInGb: number; /** * The throughput, in mebibyte per second (MiB/s). * * This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-volumespecification.html#cfn-emr-cluster-volumespecification-throughput */ readonly throughput?: number; /** * The volume type. * * Volume types supported are gp3, gp2, io1, st1, sc1, and standard. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-volumespecification.html#cfn-emr-cluster-volumespecification-volumetype */ readonly volumeType: string; } /** * `InstanceFleetProvisioningSpecification` is a subproperty of `InstanceFleetConfig` . * * `InstanceFleetProvisioningSpecification` defines the launch specification for Spot instances in an instance fleet, which determines the defined duration and provisioning timeout behavior for Spot instances. * * > The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetprovisioningspecifications.html */ interface InstanceFleetProvisioningSpecificationsProperty { /** * The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy and capacity reservation options. * * > The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetprovisioningspecifications.html#cfn-emr-cluster-instancefleetprovisioningspecifications-ondemandspecification */ readonly onDemandSpecification?: cdk.IResolvable | CfnCluster.OnDemandProvisioningSpecificationProperty; /** * The launch specification for Spot instances in the fleet, which determines the allocation strategy, defined duration, and provisioning timeout behavior. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-instancefleetprovisioningspecifications.html#cfn-emr-cluster-instancefleetprovisioningspecifications-spotspecification */ readonly spotSpecification?: cdk.IResolvable | CfnCluster.SpotProvisioningSpecificationProperty; } /** * The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy. * * > The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandprovisioningspecification.html */ interface OnDemandProvisioningSpecificationProperty { /** * Specifies the strategy to use in launching On-Demand instance fleets. * * Available options are `lowest-price` and `prioritized` . `lowest-price` specifies to launch the instances with the lowest price first, and `prioritized` specifies that Amazon EMR should launch the instances with the highest priority first. The default is `lowest-price` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandprovisioningspecification.html#cfn-emr-cluster-ondemandprovisioningspecification-allocationstrategy */ readonly allocationStrategy: string; /** * The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandprovisioningspecification.html#cfn-emr-cluster-ondemandprovisioningspecification-capacityreservationoptions */ readonly capacityReservationOptions?: cdk.IResolvable | CfnCluster.OnDemandCapacityReservationOptionsProperty; } /** * Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandcapacityreservationoptions.html */ interface OnDemandCapacityReservationOptionsProperty { /** * Indicates the instance's Capacity Reservation preferences. Possible preferences include:. * * - `open` - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). * - `none` - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandcapacityreservationoptions.html#cfn-emr-cluster-ondemandcapacityreservationoptions-capacityreservationpreference */ readonly capacityReservationPreference?: string; /** * The ARN of the Capacity Reservation resource group in which to run the instance. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandcapacityreservationoptions.html#cfn-emr-cluster-ondemandcapacityreservationoptions-capacityreservationresourcegrouparn */ readonly capacityReservationResourceGroupArn?: string; /** * Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. * * If you specify `use-capacity-reservations-first` , the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy ( `lowest-price` ) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy ( `lowest-price` ). * * If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-ondemandcapacityreservationoptions.html#cfn-emr-cluster-ondemandcapacityreservationoptions-usagestrategy */ readonly usageStrategy?: string; } /** * `SpotProvisioningSpecification` is a subproperty of the `InstanceFleetProvisioningSpecifications` property type. * * `SpotProvisioningSpecification` determines the launch specification for Spot instances in the instance fleet, which includes the defined duration and provisioning timeout behavior. * * > The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-spotprovisioningspecification.html */ interface SpotProvisioningSpecificationProperty { /** * Specifies one of the following strategies to launch Spot Instance fleets: `capacity-optimized` , `price-capacity-optimized` , `lowest-price` , or `diversified` , and `capacity-optimized-prioritized` . * * For more information on the provisioning strategies, see [Allocation strategies for Spot Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) in the *Amazon EC2 User Guide for Linux Instances* . * * > When you launch a Spot Instance fleet with the old console, it automatically launches with the `capacity-optimized` strategy. You can't change the allocation strategy from the old console. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-spotprovisioningspecification.html#cfn-emr-cluster-spotprovisioningspecification-allocationstrategy */ readonly allocationStrategy?: string; /** * The defined duration for Spot Instances (also known as Spot blocks) in minutes. * * When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates. * * > Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December