Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.emr.kotlin.ClusterArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.emr.kotlin
import com.pulumi.aws.emr.ClusterArgs.builder
import com.pulumi.aws.emr.kotlin.inputs.ClusterAutoTerminationPolicyArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterAutoTerminationPolicyArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterBootstrapActionArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterBootstrapActionArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterCoreInstanceFleetArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterCoreInstanceFleetArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterCoreInstanceGroupArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterCoreInstanceGroupArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterEc2AttributesArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterEc2AttributesArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterKerberosAttributesArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterKerberosAttributesArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterMasterInstanceFleetArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterMasterInstanceFleetArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterMasterInstanceGroupArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterMasterInstanceGroupArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterPlacementGroupConfigArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterPlacementGroupConfigArgsBuilder
import com.pulumi.aws.emr.kotlin.inputs.ClusterStepArgs
import com.pulumi.aws.emr.kotlin.inputs.ClusterStepArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/elastic-mapreduce/) for more information.
* To configure [Instance Groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for [task nodes](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-task), see the `aws.emr.InstanceGroup` resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const cluster = new aws.emr.Cluster("cluster", {
* name: "emr-test-arn",
* releaseLabel: "emr-4.6.0",
* applications: ["Spark"],
* additionalInfo: `{
* "instanceAwsClientConfiguration": {
* "proxyPort": 8099,
* "proxyHost": "myproxy.example.com"
* }
* }
* `,
* terminationProtection: false,
* keepJobFlowAliveWhenNoSteps: true,
* ec2Attributes: {
* subnetId: main.id,
* emrManagedMasterSecurityGroup: sg.id,
* emrManagedSlaveSecurityGroup: sg.id,
* instanceProfile: emrProfile.arn,
* },
* masterInstanceGroup: {
* instanceType: "m4.large",
* },
* coreInstanceGroup: {
* instanceType: "c4.large",
* instanceCount: 1,
* ebsConfigs: [{
* size: 40,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* bidPrice: "0.30",
* autoscalingPolicy: `{
* "Constraints": {
* "MinCapacity": 1,
* "MaxCapacity": 2
* },
* "Rules": [
* {
* "Name": "ScaleOutMemoryPercentage",
* "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
* "Action": {
* "SimpleScalingPolicyConfiguration": {
* "AdjustmentType": "CHANGE_IN_CAPACITY",
* "ScalingAdjustment": 1,
* "CoolDown": 300
* }
* },
* "Trigger": {
* "CloudWatchAlarmDefinition": {
* "ComparisonOperator": "LESS_THAN",
* "EvaluationPeriods": 1,
* "MetricName": "YARNMemoryAvailablePercentage",
* "Namespace": "AWS/ElasticMapReduce",
* "Period": 300,
* "Statistic": "AVERAGE",
* "Threshold": 15.0,
* "Unit": "PERCENT"
* }
* }
* }
* ]
* }
* `,
* },
* ebsRootVolumeSize: 100,
* tags: {
* role: "rolename",
* env: "env",
* },
* bootstrapActions: [{
* path: "s3://elasticmapreduce/bootstrap-actions/run-if",
* name: "runif",
* args: [
* "instance.isMaster=true",
* "echo running on master node",
* ],
* }],
* configurationsJson: ` [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* },
* {
* "Classification": "spark-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `,
* serviceRole: iamEmrServiceRole.arn,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* cluster = aws.emr.Cluster("cluster",
* name="emr-test-arn",
* release_label="emr-4.6.0",
* applications=["Spark"],
* additional_info="""{
* "instanceAwsClientConfiguration": {
* "proxyPort": 8099,
* "proxyHost": "myproxy.example.com"
* }
* }
* """,
* termination_protection=False,
* keep_job_flow_alive_when_no_steps=True,
* ec2_attributes={
* "subnet_id": main["id"],
* "emr_managed_master_security_group": sg["id"],
* "emr_managed_slave_security_group": sg["id"],
* "instance_profile": emr_profile["arn"],
* },
* master_instance_group={
* "instance_type": "m4.large",
* },
* core_instance_group={
* "instance_type": "c4.large",
* "instance_count": 1,
* "ebs_configs": [{
* "size": 40,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "bid_price": "0.30",
* "autoscaling_policy": """{
* "Constraints": {
* "MinCapacity": 1,
* "MaxCapacity": 2
* },
* "Rules": [
* {
* "Name": "ScaleOutMemoryPercentage",
* "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
* "Action": {
* "SimpleScalingPolicyConfiguration": {
* "AdjustmentType": "CHANGE_IN_CAPACITY",
* "ScalingAdjustment": 1,
* "CoolDown": 300
* }
* },
* "Trigger": {
* "CloudWatchAlarmDefinition": {
* "ComparisonOperator": "LESS_THAN",
* "EvaluationPeriods": 1,
* "MetricName": "YARNMemoryAvailablePercentage",
* "Namespace": "AWS/ElasticMapReduce",
* "Period": 300,
* "Statistic": "AVERAGE",
* "Threshold": 15.0,
* "Unit": "PERCENT"
* }
* }
* }
* ]
* }
* """,
* },
* ebs_root_volume_size=100,
* tags={
* "role": "rolename",
* "env": "env",
* },
* bootstrap_actions=[{
* "path": "s3://elasticmapreduce/bootstrap-actions/run-if",
* "name": "runif",
* "args": [
* "instance.isMaster=true",
* "echo running on master node",
* ],
* }],
* configurations_json=""" [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* },
* {
* "Classification": "spark-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """,
* service_role=iam_emr_service_role["arn"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var cluster = new Aws.Emr.Cluster("cluster", new()
* {
* Name = "emr-test-arn",
* ReleaseLabel = "emr-4.6.0",
* Applications = new[]
* {
* "Spark",
* },
* AdditionalInfo = @"{
* ""instanceAwsClientConfiguration"": {
* ""proxyPort"": 8099,
* ""proxyHost"": ""myproxy.example.com""
* }
* }
* ",
* TerminationProtection = false,
* KeepJobFlowAliveWhenNoSteps = true,
* Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs
* {
* SubnetId = main.Id,
* EmrManagedMasterSecurityGroup = sg.Id,
* EmrManagedSlaveSecurityGroup = sg.Id,
* InstanceProfile = emrProfile.Arn,
* },
* MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs
* {
* InstanceType = "m4.large",
* },
* CoreInstanceGroup = new Aws.Emr.Inputs.ClusterCoreInstanceGroupArgs
* {
* InstanceType = "c4.large",
* InstanceCount = 1,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceGroupEbsConfigArgs
* {
* Size = 40,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* BidPrice = "0.30",
* AutoscalingPolicy = @"{
* ""Constraints"": {
* ""MinCapacity"": 1,
* ""MaxCapacity"": 2
* },
* ""Rules"": [
* {
* ""Name"": ""ScaleOutMemoryPercentage"",
* ""Description"": ""Scale out if YARNMemoryAvailablePercentage is less than 15"",
* ""Action"": {
* ""SimpleScalingPolicyConfiguration"": {
* ""AdjustmentType"": ""CHANGE_IN_CAPACITY"",
* ""ScalingAdjustment"": 1,
* ""CoolDown"": 300
* }
* },
* ""Trigger"": {
* ""CloudWatchAlarmDefinition"": {
* ""ComparisonOperator"": ""LESS_THAN"",
* ""EvaluationPeriods"": 1,
* ""MetricName"": ""YARNMemoryAvailablePercentage"",
* ""Namespace"": ""AWS/ElasticMapReduce"",
* ""Period"": 300,
* ""Statistic"": ""AVERAGE"",
* ""Threshold"": 15.0,
* ""Unit"": ""PERCENT""
* }
* }
* }
* ]
* }
* ",
* },
* EbsRootVolumeSize = 100,
* Tags =
* {
* { "role", "rolename" },
* { "env", "env" },
* },
* BootstrapActions = new[]
* {
* new Aws.Emr.Inputs.ClusterBootstrapActionArgs
* {
* Path = "s3://elasticmapreduce/bootstrap-actions/run-if",
* Name = "runif",
* Args = new[]
* {
* "instance.isMaster=true",
* "echo running on master node",
* },
* },
* },
* ConfigurationsJson = @" [
* {
* ""Classification"": ""hadoop-env"",
* ""Configurations"": [
* {
* ""Classification"": ""export"",
* ""Properties"": {
* ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
* }
* }
* ],
* ""Properties"": {}
* },
* {
* ""Classification"": ""spark-env"",
* ""Configurations"": [
* {
* ""Classification"": ""export"",
* ""Properties"": {
* ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
* }
* }
* ],
* ""Properties"": {}
* }
* ]
* ",
* ServiceRole = iamEmrServiceRole.Arn,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
* Name: pulumi.String("emr-test-arn"),
* ReleaseLabel: pulumi.String("emr-4.6.0"),
* Applications: pulumi.StringArray{
* pulumi.String("Spark"),
* },
* AdditionalInfo: pulumi.String(`{
* "instanceAwsClientConfiguration": {
* "proxyPort": 8099,
* "proxyHost": "myproxy.example.com"
* }
* }
* `),
* TerminationProtection: pulumi.Bool(false),
* KeepJobFlowAliveWhenNoSteps: pulumi.Bool(true),
* Ec2Attributes: &emr.ClusterEc2AttributesArgs{
* SubnetId: pulumi.Any(main.Id),
* EmrManagedMasterSecurityGroup: pulumi.Any(sg.Id),
* EmrManagedSlaveSecurityGroup: pulumi.Any(sg.Id),
* InstanceProfile: pulumi.Any(emrProfile.Arn),
* },
* MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
* InstanceType: pulumi.String("m4.large"),
* },
* CoreInstanceGroup: &emr.ClusterCoreInstanceGroupArgs{
* InstanceType: pulumi.String("c4.large"),
* InstanceCount: pulumi.Int(1),
* EbsConfigs: emr.ClusterCoreInstanceGroupEbsConfigArray{
* &emr.ClusterCoreInstanceGroupEbsConfigArgs{
* Size: pulumi.Int(40),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* BidPrice: pulumi.String("0.30"),
* AutoscalingPolicy: pulumi.String(`{
* "Constraints": {
* "MinCapacity": 1,
* "MaxCapacity": 2
* },
* "Rules": [
* {
* "Name": "ScaleOutMemoryPercentage",
* "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
* "Action": {
* "SimpleScalingPolicyConfiguration": {
* "AdjustmentType": "CHANGE_IN_CAPACITY",
* "ScalingAdjustment": 1,
* "CoolDown": 300
* }
* },
* "Trigger": {
* "CloudWatchAlarmDefinition": {
* "ComparisonOperator": "LESS_THAN",
* "EvaluationPeriods": 1,
* "MetricName": "YARNMemoryAvailablePercentage",
* "Namespace": "AWS/ElasticMapReduce",
* "Period": 300,
* "Statistic": "AVERAGE",
* "Threshold": 15.0,
* "Unit": "PERCENT"
* }
* }
* }
* ]
* }
* `),
* },
* EbsRootVolumeSize: pulumi.Int(100),
* Tags: pulumi.StringMap{
* "role": pulumi.String("rolename"),
* "env": pulumi.String("env"),
* },
* BootstrapActions: emr.ClusterBootstrapActionArray{
* &emr.ClusterBootstrapActionArgs{
* Path: pulumi.String("s3://elasticmapreduce/bootstrap-actions/run-if"),
* Name: pulumi.String("runif"),
* Args: pulumi.StringArray{
* pulumi.String("instance.isMaster=true"),
* pulumi.String("echo running on master node"),
* },
* },
* },
* ConfigurationsJson: pulumi.String(` [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* },
* {
* "Classification": "spark-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `),
* ServiceRole: pulumi.Any(iamEmrServiceRole.Arn),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;
* import com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;
* import com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;
* import com.pulumi.aws.emr.inputs.ClusterBootstrapActionArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var cluster = new Cluster("cluster", ClusterArgs.builder()
* .name("emr-test-arn")
* .releaseLabel("emr-4.6.0")
* .applications("Spark")
* .additionalInfo("""
* {
* "instanceAwsClientConfiguration": {
* "proxyPort": 8099,
* "proxyHost": "myproxy.example.com"
* }
* }
* """)
* .terminationProtection(false)
* .keepJobFlowAliveWhenNoSteps(true)
* .ec2Attributes(ClusterEc2AttributesArgs.builder()
* .subnetId(main.id())
* .emrManagedMasterSecurityGroup(sg.id())
* .emrManagedSlaveSecurityGroup(sg.id())
* .instanceProfile(emrProfile.arn())
* .build())
* .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()
* .instanceType("m4.large")
* .build())
* .coreInstanceGroup(ClusterCoreInstanceGroupArgs.builder()
* .instanceType("c4.large")
* .instanceCount(1)
* .ebsConfigs(ClusterCoreInstanceGroupEbsConfigArgs.builder()
* .size("40")
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .bidPrice("0.30")
* .autoscalingPolicy("""
* {
* "Constraints": {
* "MinCapacity": 1,
* "MaxCapacity": 2
* },
* "Rules": [
* {
* "Name": "ScaleOutMemoryPercentage",
* "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
* "Action": {
* "SimpleScalingPolicyConfiguration": {
* "AdjustmentType": "CHANGE_IN_CAPACITY",
* "ScalingAdjustment": 1,
* "CoolDown": 300
* }
* },
* "Trigger": {
* "CloudWatchAlarmDefinition": {
* "ComparisonOperator": "LESS_THAN",
* "EvaluationPeriods": 1,
* "MetricName": "YARNMemoryAvailablePercentage",
* "Namespace": "AWS/ElasticMapReduce",
* "Period": 300,
* "Statistic": "AVERAGE",
* "Threshold": 15.0,
* "Unit": "PERCENT"
* }
* }
* }
* ]
* }
* """)
* .build())
* .ebsRootVolumeSize(100)
* .tags(Map.ofEntries(
* Map.entry("role", "rolename"),
* Map.entry("env", "env")
* ))
* .bootstrapActions(ClusterBootstrapActionArgs.builder()
* .path("s3://elasticmapreduce/bootstrap-actions/run-if")
* .name("runif")
* .args(
* "instance.isMaster=true",
* "echo running on master node")
* .build())
* .configurationsJson("""
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* },
* {
* "Classification": "spark-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* .serviceRole(iamEmrServiceRole.arn())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* cluster:
* type: aws:emr:Cluster
* properties:
* name: emr-test-arn
* releaseLabel: emr-4.6.0
* applications:
* - Spark
* additionalInfo: |
* {
* "instanceAwsClientConfiguration": {
* "proxyPort": 8099,
* "proxyHost": "myproxy.example.com"
* }
* }
* terminationProtection: false
* keepJobFlowAliveWhenNoSteps: true
* ec2Attributes:
* subnetId: ${main.id}
* emrManagedMasterSecurityGroup: ${sg.id}
* emrManagedSlaveSecurityGroup: ${sg.id}
* instanceProfile: ${emrProfile.arn}
* masterInstanceGroup:
* instanceType: m4.large
* coreInstanceGroup:
* instanceType: c4.large
* instanceCount: 1
* ebsConfigs:
* - size: '40'
* type: gp2
* volumesPerInstance: 1
* bidPrice: '0.30'
* autoscalingPolicy: |
* {
* "Constraints": {
* "MinCapacity": 1,
* "MaxCapacity": 2
* },
* "Rules": [
* {
* "Name": "ScaleOutMemoryPercentage",
* "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
* "Action": {
* "SimpleScalingPolicyConfiguration": {
* "AdjustmentType": "CHANGE_IN_CAPACITY",
* "ScalingAdjustment": 1,
* "CoolDown": 300
* }
* },
* "Trigger": {
* "CloudWatchAlarmDefinition": {
* "ComparisonOperator": "LESS_THAN",
* "EvaluationPeriods": 1,
* "MetricName": "YARNMemoryAvailablePercentage",
* "Namespace": "AWS/ElasticMapReduce",
* "Period": 300,
* "Statistic": "AVERAGE",
* "Threshold": 15.0,
* "Unit": "PERCENT"
* }
* }
* }
* ]
* }
* ebsRootVolumeSize: 100
* tags:
* role: rolename
* env: env
* bootstrapActions:
* - path: s3://elasticmapreduce/bootstrap-actions/run-if
* name: runif
* args:
* - instance.isMaster=true
* - echo running on master node
* configurationsJson: |2
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* },
* {
* "Classification": "spark-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* serviceRole: ${iamEmrServiceRole.arn}
* ```
*
* The `aws.emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster to use as a service role, and another is assigned to every EC2 instance in a cluster and each application process that runs on a cluster assumes this role for permissions to interact with other AWS services. An additional role, the Auto Scaling role, is required if your cluster uses automatic scaling in Amazon EMR.
* The default AWS managed EMR service role is called `EMR_DefaultRole` with Amazon managed policy `AmazonEMRServicePolicy_v2` attached. The name of default instance profile role is `EMR_EC2_DefaultRole` with default managed policy `AmazonElasticMapReduceforEC2Role` attached, but it is on the path to deprecation and will not be replaced with another default managed policy. You'll need to create and specify an instance profile to replace the deprecated role and default policy. See the [Configure IAM service roles for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html) guide for more information on these IAM roles. There is also a fully-bootable example Pulumi configuration at the bottom of this page.
* ### Instance Fleet
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.emr.Cluster("example", {
* masterInstanceFleet: {
* instanceTypeConfigs: [{
* instanceType: "m4.xlarge",
* }],
* targetOnDemandCapacity: 1,
* },
* coreInstanceFleet: {
* instanceTypeConfigs: [
* {
* bidPriceAsPercentageOfOnDemandPrice: 80,
* ebsConfigs: [{
* size: 100,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* instanceType: "m3.xlarge",
* weightedCapacity: 1,
* },
* {
* bidPriceAsPercentageOfOnDemandPrice: 100,
* ebsConfigs: [{
* size: 100,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* instanceType: "m4.xlarge",
* weightedCapacity: 1,
* },
* {
* bidPriceAsPercentageOfOnDemandPrice: 100,
* ebsConfigs: [{
* size: 100,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* instanceType: "m4.2xlarge",
* weightedCapacity: 2,
* },
* ],
* launchSpecifications: {
* spotSpecifications: [{
* allocationStrategy: "capacity-optimized",
* blockDurationMinutes: 0,
* timeoutAction: "SWITCH_TO_ON_DEMAND",
* timeoutDurationMinutes: 10,
* }],
* },
* name: "core fleet",
* targetOnDemandCapacity: 2,
* targetSpotCapacity: 2,
* },
* });
* const task = new aws.emr.InstanceFleet("task", {
* clusterId: example.id,
* instanceTypeConfigs: [
* {
* bidPriceAsPercentageOfOnDemandPrice: 100,
* ebsConfigs: [{
* size: 100,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* instanceType: "m4.xlarge",
* weightedCapacity: 1,
* },
* {
* bidPriceAsPercentageOfOnDemandPrice: 100,
* ebsConfigs: [{
* size: 100,
* type: "gp2",
* volumesPerInstance: 1,
* }],
* instanceType: "m4.2xlarge",
* weightedCapacity: 2,
* },
* ],
* launchSpecifications: {
* spotSpecifications: [{
* allocationStrategy: "capacity-optimized",
* blockDurationMinutes: 0,
* timeoutAction: "TERMINATE_CLUSTER",
* timeoutDurationMinutes: 10,
* }],
* },
* name: "task fleet",
* targetOnDemandCapacity: 1,
* targetSpotCapacity: 1,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.emr.Cluster("example",
* master_instance_fleet={
* "instance_type_configs": [{
* "instance_type": "m4.xlarge",
* }],
* "target_on_demand_capacity": 1,
* },
* core_instance_fleet={
* "instance_type_configs": [
* {
* "bid_price_as_percentage_of_on_demand_price": 80,
* "ebs_configs": [{
* "size": 100,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "instance_type": "m3.xlarge",
* "weighted_capacity": 1,
* },
* {
* "bid_price_as_percentage_of_on_demand_price": 100,
* "ebs_configs": [{
* "size": 100,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "instance_type": "m4.xlarge",
* "weighted_capacity": 1,
* },
* {
* "bid_price_as_percentage_of_on_demand_price": 100,
* "ebs_configs": [{
* "size": 100,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "instance_type": "m4.2xlarge",
* "weighted_capacity": 2,
* },
* ],
* "launch_specifications": {
* "spot_specifications": [{
* "allocation_strategy": "capacity-optimized",
* "block_duration_minutes": 0,
* "timeout_action": "SWITCH_TO_ON_DEMAND",
* "timeout_duration_minutes": 10,
* }],
* },
* "name": "core fleet",
* "target_on_demand_capacity": 2,
* "target_spot_capacity": 2,
* })
* task = aws.emr.InstanceFleet("task",
* cluster_id=example.id,
* instance_type_configs=[
* {
* "bid_price_as_percentage_of_on_demand_price": 100,
* "ebs_configs": [{
* "size": 100,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "instance_type": "m4.xlarge",
* "weighted_capacity": 1,
* },
* {
* "bid_price_as_percentage_of_on_demand_price": 100,
* "ebs_configs": [{
* "size": 100,
* "type": "gp2",
* "volumes_per_instance": 1,
* }],
* "instance_type": "m4.2xlarge",
* "weighted_capacity": 2,
* },
* ],
* launch_specifications={
* "spot_specifications": [{
* "allocation_strategy": "capacity-optimized",
* "block_duration_minutes": 0,
* "timeout_action": "TERMINATE_CLUSTER",
* "timeout_duration_minutes": 10,
* }],
* },
* name="task fleet",
* target_on_demand_capacity=1,
* target_spot_capacity=1)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Emr.Cluster("example", new()
* {
* MasterInstanceFleet = new Aws.Emr.Inputs.ClusterMasterInstanceFleetArgs
* {
* InstanceTypeConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterMasterInstanceFleetInstanceTypeConfigArgs
* {
* InstanceType = "m4.xlarge",
* },
* },
* TargetOnDemandCapacity = 1,
* },
* CoreInstanceFleet = new Aws.Emr.Inputs.ClusterCoreInstanceFleetArgs
* {
* InstanceTypeConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
* {
* BidPriceAsPercentageOfOnDemandPrice = 80,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
* {
* Size = 100,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* InstanceType = "m3.xlarge",
* WeightedCapacity = 1,
* },
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
* {
* BidPriceAsPercentageOfOnDemandPrice = 100,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
* {
* Size = 100,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* InstanceType = "m4.xlarge",
* WeightedCapacity = 1,
* },
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
* {
* BidPriceAsPercentageOfOnDemandPrice = 100,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
* {
* Size = 100,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* InstanceType = "m4.2xlarge",
* WeightedCapacity = 2,
* },
* },
* LaunchSpecifications = new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs
* {
* SpotSpecifications = new[]
* {
* new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs
* {
* AllocationStrategy = "capacity-optimized",
* BlockDurationMinutes = 0,
* TimeoutAction = "SWITCH_TO_ON_DEMAND",
* TimeoutDurationMinutes = 10,
* },
* },
* },
* Name = "core fleet",
* TargetOnDemandCapacity = 2,
* TargetSpotCapacity = 2,
* },
* });
* var task = new Aws.Emr.InstanceFleet("task", new()
* {
* ClusterId = example.Id,
* InstanceTypeConfigs = new[]
* {
* new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs
* {
* BidPriceAsPercentageOfOnDemandPrice = 100,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs
* {
* Size = 100,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* InstanceType = "m4.xlarge",
* WeightedCapacity = 1,
* },
* new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs
* {
* BidPriceAsPercentageOfOnDemandPrice = 100,
* EbsConfigs = new[]
* {
* new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs
* {
* Size = 100,
* Type = "gp2",
* VolumesPerInstance = 1,
* },
* },
* InstanceType = "m4.2xlarge",
* WeightedCapacity = 2,
* },
* },
* LaunchSpecifications = new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsArgs
* {
* SpotSpecifications = new[]
* {
* new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsSpotSpecificationArgs
* {
* AllocationStrategy = "capacity-optimized",
* BlockDurationMinutes = 0,
* TimeoutAction = "TERMINATE_CLUSTER",
* TimeoutDurationMinutes = 10,
* },
* },
* },
* Name = "task fleet",
* TargetOnDemandCapacity = 1,
* TargetSpotCapacity = 1,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
* MasterInstanceFleet: &emr.ClusterMasterInstanceFleetArgs{
* InstanceTypeConfigs: emr.ClusterMasterInstanceFleetInstanceTypeConfigArray{
* &emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs{
* InstanceType: pulumi.String("m4.xlarge"),
* },
* },
* TargetOnDemandCapacity: pulumi.Int(1),
* },
* CoreInstanceFleet: &emr.ClusterCoreInstanceFleetArgs{
* InstanceTypeConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigArray{
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
* BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(80),
* EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
* Size: pulumi.Int(100),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* InstanceType: pulumi.String("m3.xlarge"),
* WeightedCapacity: pulumi.Int(1),
* },
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
* BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
* EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
* Size: pulumi.Int(100),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* InstanceType: pulumi.String("m4.xlarge"),
* WeightedCapacity: pulumi.Int(1),
* },
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
* BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
* EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
* &emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
* Size: pulumi.Int(100),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* InstanceType: pulumi.String("m4.2xlarge"),
* WeightedCapacity: pulumi.Int(2),
* },
* },
* LaunchSpecifications: &emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs{
* SpotSpecifications: emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArray{
* &emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs{
* AllocationStrategy: pulumi.String("capacity-optimized"),
* BlockDurationMinutes: pulumi.Int(0),
* TimeoutAction: pulumi.String("SWITCH_TO_ON_DEMAND"),
* TimeoutDurationMinutes: pulumi.Int(10),
* },
* },
* },
* Name: pulumi.String("core fleet"),
* TargetOnDemandCapacity: pulumi.Int(2),
* TargetSpotCapacity: pulumi.Int(2),
* },
* })
* if err != nil {
* return err
* }
* _, err = emr.NewInstanceFleet(ctx, "task", &emr.InstanceFleetArgs{
* ClusterId: example.ID(),
* InstanceTypeConfigs: emr.InstanceFleetInstanceTypeConfigArray{
* &emr.InstanceFleetInstanceTypeConfigArgs{
* BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
* EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
* &emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
* Size: pulumi.Int(100),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* InstanceType: pulumi.String("m4.xlarge"),
* WeightedCapacity: pulumi.Int(1),
* },
* &emr.InstanceFleetInstanceTypeConfigArgs{
* BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
* EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
* &emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
* Size: pulumi.Int(100),
* Type: pulumi.String("gp2"),
* VolumesPerInstance: pulumi.Int(1),
* },
* },
* InstanceType: pulumi.String("m4.2xlarge"),
* WeightedCapacity: pulumi.Int(2),
* },
* },
* LaunchSpecifications: &emr.InstanceFleetLaunchSpecificationsArgs{
* SpotSpecifications: emr.InstanceFleetLaunchSpecificationsSpotSpecificationArray{
* &emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs{
* AllocationStrategy: pulumi.String("capacity-optimized"),
* BlockDurationMinutes: pulumi.Int(0),
* TimeoutAction: pulumi.String("TERMINATE_CLUSTER"),
* TimeoutDurationMinutes: pulumi.Int(10),
* },
* },
* },
* Name: pulumi.String("task fleet"),
* TargetOnDemandCapacity: pulumi.Int(1),
* TargetSpotCapacity: pulumi.Int(1),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetArgs;
* import com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetArgs;
* import com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs;
* import com.pulumi.aws.emr.InstanceFleet;
* import com.pulumi.aws.emr.InstanceFleetArgs;
* import com.pulumi.aws.emr.inputs.InstanceFleetInstanceTypeConfigArgs;
* import com.pulumi.aws.emr.inputs.InstanceFleetLaunchSpecificationsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Cluster("example", ClusterArgs.builder()
* .masterInstanceFleet(ClusterMasterInstanceFleetArgs.builder()
* .instanceTypeConfigs(ClusterMasterInstanceFleetInstanceTypeConfigArgs.builder()
* .instanceType("m4.xlarge")
* .build())
* .targetOnDemandCapacity(1)
* .build())
* .coreInstanceFleet(ClusterCoreInstanceFleetArgs.builder()
* .instanceTypeConfigs(
* ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()
* .bidPriceAsPercentageOfOnDemandPrice(80)
* .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()
* .size(100)
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .instanceType("m3.xlarge")
* .weightedCapacity(1)
* .build(),
* ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()
* .bidPriceAsPercentageOfOnDemandPrice(100)
* .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()
* .size(100)
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .instanceType("m4.xlarge")
* .weightedCapacity(1)
* .build(),
* ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()
* .bidPriceAsPercentageOfOnDemandPrice(100)
* .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()
* .size(100)
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .instanceType("m4.2xlarge")
* .weightedCapacity(2)
* .build())
* .launchSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsArgs.builder()
* .spotSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()
* .allocationStrategy("capacity-optimized")
* .blockDurationMinutes(0)
* .timeoutAction("SWITCH_TO_ON_DEMAND")
* .timeoutDurationMinutes(10)
* .build())
* .build())
* .name("core fleet")
* .targetOnDemandCapacity(2)
* .targetSpotCapacity(2)
* .build())
* .build());
* var task = new InstanceFleet("task", InstanceFleetArgs.builder()
* .clusterId(example.id())
* .instanceTypeConfigs(
* InstanceFleetInstanceTypeConfigArgs.builder()
* .bidPriceAsPercentageOfOnDemandPrice(100)
* .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()
* .size(100)
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .instanceType("m4.xlarge")
* .weightedCapacity(1)
* .build(),
* InstanceFleetInstanceTypeConfigArgs.builder()
* .bidPriceAsPercentageOfOnDemandPrice(100)
* .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()
* .size(100)
* .type("gp2")
* .volumesPerInstance(1)
* .build())
* .instanceType("m4.2xlarge")
* .weightedCapacity(2)
* .build())
* .launchSpecifications(InstanceFleetLaunchSpecificationsArgs.builder()
* .spotSpecifications(InstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()
* .allocationStrategy("capacity-optimized")
* .blockDurationMinutes(0)
* .timeoutAction("TERMINATE_CLUSTER")
* .timeoutDurationMinutes(10)
* .build())
* .build())
* .name("task fleet")
* .targetOnDemandCapacity(1)
* .targetSpotCapacity(1)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:emr:Cluster
* properties:
* masterInstanceFleet:
* instanceTypeConfigs:
* - instanceType: m4.xlarge
* targetOnDemandCapacity: 1
* coreInstanceFleet:
* instanceTypeConfigs:
* - bidPriceAsPercentageOfOnDemandPrice: 80
* ebsConfigs:
* - size: 100
* type: gp2
* volumesPerInstance: 1
* instanceType: m3.xlarge
* weightedCapacity: 1
* - bidPriceAsPercentageOfOnDemandPrice: 100
* ebsConfigs:
* - size: 100
* type: gp2
* volumesPerInstance: 1
* instanceType: m4.xlarge
* weightedCapacity: 1
* - bidPriceAsPercentageOfOnDemandPrice: 100
* ebsConfigs:
* - size: 100
* type: gp2
* volumesPerInstance: 1
* instanceType: m4.2xlarge
* weightedCapacity: 2
* launchSpecifications:
* spotSpecifications:
* - allocationStrategy: capacity-optimized
* blockDurationMinutes: 0
* timeoutAction: SWITCH_TO_ON_DEMAND
* timeoutDurationMinutes: 10
* name: core fleet
* targetOnDemandCapacity: 2
* targetSpotCapacity: 2
* task:
* type: aws:emr:InstanceFleet
* properties:
* clusterId: ${example.id}
* instanceTypeConfigs:
* - bidPriceAsPercentageOfOnDemandPrice: 100
* ebsConfigs:
* - size: 100
* type: gp2
* volumesPerInstance: 1
* instanceType: m4.xlarge
* weightedCapacity: 1
* - bidPriceAsPercentageOfOnDemandPrice: 100
* ebsConfigs:
* - size: 100
* type: gp2
* volumesPerInstance: 1
* instanceType: m4.2xlarge
* weightedCapacity: 2
* launchSpecifications:
* spotSpecifications:
* - allocationStrategy: capacity-optimized
* blockDurationMinutes: 0
* timeoutAction: TERMINATE_CLUSTER
* timeoutDurationMinutes: 10
* name: task fleet
* targetOnDemandCapacity: 1
* targetSpotCapacity: 1
* ```
*
* ### Enable Debug Logging
* [Debug logging in EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html) is implemented as a step. It is highly recommended that you utilize the resource options configuration with `ignoreChanges` if other steps are being managed outside of this provider.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.emr.Cluster("example", {steps: [{
* actionOnFailure: "TERMINATE_CLUSTER",
* name: "Setup Hadoop Debugging",
* hadoopJarStep: {
* jar: "command-runner.jar",
* args: ["state-pusher-script"],
* },
* }]});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.emr.Cluster("example", steps=[{
* "action_on_failure": "TERMINATE_CLUSTER",
* "name": "Setup Hadoop Debugging",
* "hadoop_jar_step": {
* "jar": "command-runner.jar",
* "args": ["state-pusher-script"],
* },
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Emr.Cluster("example", new()
* {
* Steps = new[]
* {
* new Aws.Emr.Inputs.ClusterStepArgs
* {
* ActionOnFailure = "TERMINATE_CLUSTER",
* Name = "Setup Hadoop Debugging",
* HadoopJarStep = new Aws.Emr.Inputs.ClusterStepHadoopJarStepArgs
* {
* Jar = "command-runner.jar",
* Args = new[]
* {
* "state-pusher-script",
* },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
* Steps: emr.ClusterStepArray{
* &emr.ClusterStepArgs{
* ActionOnFailure: pulumi.String("TERMINATE_CLUSTER"),
* Name: pulumi.String("Setup Hadoop Debugging"),
* HadoopJarStep: &emr.ClusterStepHadoopJarStepArgs{
* Jar: pulumi.String("command-runner.jar"),
* Args: pulumi.StringArray{
* pulumi.String("state-pusher-script"),
* },
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import com.pulumi.aws.emr.inputs.ClusterStepArgs;
* import com.pulumi.aws.emr.inputs.ClusterStepHadoopJarStepArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new Cluster("example", ClusterArgs.builder()
* .steps(ClusterStepArgs.builder()
* .actionOnFailure("TERMINATE_CLUSTER")
* .name("Setup Hadoop Debugging")
* .hadoopJarStep(ClusterStepHadoopJarStepArgs.builder()
* .jar("command-runner.jar")
* .args("state-pusher-script")
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:emr:Cluster
* properties:
* steps:
* - actionOnFailure: TERMINATE_CLUSTER
* name: Setup Hadoop Debugging
* hadoopJarStep:
* jar: command-runner.jar
* args:
* - state-pusher-script
* ```
*
* ### Multiple Node Master Instance Group
* Available in EMR version 5.23.0 and later, an EMR Cluster can be launched with three master nodes for high availability. Additional information about this functionality and its requirements can be found in the [EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha.html).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* // This configuration is for illustrative purposes and highlights
* // only relevant configurations for working with this functionality.
* // Map public IP on launch must be enabled for public (Internet accessible) subnets
* const example = new aws.ec2.Subnet("example", {mapPublicIpOnLaunch: true});
* const exampleCluster = new aws.emr.Cluster("example", {
* releaseLabel: "emr-5.24.1",
* terminationProtection: true,
* ec2Attributes: {
* subnetId: example.id,
* },
* masterInstanceGroup: {
* instanceCount: 3,
* },
* coreInstanceGroup: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* # This configuration is for illustrative purposes and highlights
* # only relevant configurations for working with this functionality.
* # Map public IP on launch must be enabled for public (Internet accessible) subnets
* example = aws.ec2.Subnet("example", map_public_ip_on_launch=True)
* example_cluster = aws.emr.Cluster("example",
* release_label="emr-5.24.1",
* termination_protection=True,
* ec2_attributes={
* "subnet_id": example.id,
* },
* master_instance_group={
* "instance_count": 3,
* },
* core_instance_group={})
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* // This configuration is for illustrative purposes and highlights
* // only relevant configurations for working with this functionality.
* // Map public IP on launch must be enabled for public (Internet accessible) subnets
* var example = new Aws.Ec2.Subnet("example", new()
* {
* MapPublicIpOnLaunch = true,
* });
* var exampleCluster = new Aws.Emr.Cluster("example", new()
* {
* ReleaseLabel = "emr-5.24.1",
* TerminationProtection = true,
* Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs
* {
* SubnetId = example.Id,
* },
* MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs
* {
* InstanceCount = 3,
* },
* CoreInstanceGroup = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* // This configuration is for illustrative purposes and highlights
* // only relevant configurations for working with this functionality.
* // Map public IP on launch must be enabled for public (Internet accessible) subnets
* example, err := ec2.NewSubnet(ctx, "example", &ec2.SubnetArgs{
* MapPublicIpOnLaunch: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = emr.NewCluster(ctx, "example", &emr.ClusterArgs{
* ReleaseLabel: pulumi.String("emr-5.24.1"),
* TerminationProtection: pulumi.Bool(true),
* Ec2Attributes: &emr.ClusterEc2AttributesArgs{
* SubnetId: example.ID(),
* },
* MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
* InstanceCount: pulumi.Int(3),
* },
* CoreInstanceGroup: nil,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.ec2.Subnet;
* import com.pulumi.aws.ec2.SubnetArgs;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;
* import com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;
* import com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* // This configuration is for illustrative purposes and highlights
* // only relevant configurations for working with this functionality.
* // Map public IP on launch must be enabled for public (Internet accessible) subnets
* var example = new Subnet("example", SubnetArgs.builder()
* .mapPublicIpOnLaunch(true)
* .build());
* var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
* .releaseLabel("emr-5.24.1")
* .terminationProtection(true)
* .ec2Attributes(ClusterEc2AttributesArgs.builder()
* .subnetId(example.id())
* .build())
* .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()
* .instanceCount(3)
* .build())
* .coreInstanceGroup()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # This configuration is for illustrative purposes and highlights
* # only relevant configurations for working with this functionality.
* # Map public IP on launch must be enabled for public (Internet accessible) subnets
* example:
* type: aws:ec2:Subnet
* properties:
* mapPublicIpOnLaunch: true
* exampleCluster:
* type: aws:emr:Cluster
* name: example
* properties:
* releaseLabel: emr-5.24.1
* terminationProtection: true
* ec2Attributes:
* subnetId: ${example.id}
* masterInstanceGroup:
* instanceCount: 3
* coreInstanceGroup: {}
* ```
*
* ## Import
* Using `pulumi import`, import EMR clusters using the `id`. For example:
* ```sh
* $ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF
* ```
* Since the API does not return the actual values for Kerberos configurations, environments with those options set will need to use the `lifecycle` configuration block `ignore_changes` argument available to all Pulumi resources to prevent perpetual differences. For example:
* @property additionalInfo JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
* @property applications A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
* @property autoTerminationPolicy 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. See Auto Termination Policy Below.
* @property autoscalingRole IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
* @property bootstrapActions Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
* @property configurations List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
* @property configurationsJson JSON string for supplying list of configurations for the EMR cluster.
* > **NOTE on `configurations_json`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* cluster = aws.emr.Cluster("cluster", configurations_json="""[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var cluster = new Aws.Emr.Cluster("cluster", new()
* {
* ConfigurationsJson = @"[
* {
* ""Classification"": ""hadoop-env"",
* ""Configurations"": [
* {
* ""Classification"": ""export"",
* ""Properties"": {
* ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
* }
* }
* ],
* ""Properties"": {}
* }
* ]
* ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
* ConfigurationsJson: pulumi.String(`[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var cluster = new Cluster("cluster", ClusterArgs.builder()
* .configurationsJson("""
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* cluster:
* type: aws:emr:Cluster
* properties:
* configurationsJson: |
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* ```
*
* @property coreInstanceFleet Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `core_instance_group` configuration blocks are set. Detailed below.
* @property coreInstanceGroup Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
* @property customAmiId Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
* @property ebsRootVolumeSize Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
* @property ec2Attributes Attributes for the EC2 instances running the job flow. See below.
* @property keepJobFlowAliveWhenNoSteps Switch on/off run cluster with no steps or when all steps are complete (default is on)
* @property kerberosAttributes Kerberos configuration for the cluster. See below.
* @property listStepsStates List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
* @property logEncryptionKmsKeyId AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
* @property logUri S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
* @property masterInstanceFleet Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `master_instance_group` configuration blocks are set. Detailed below.
* @property masterInstanceGroup Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
* @property name Name of the job flow.
* @property placementGroupConfigs The specified placement group configuration for an Amazon EMR cluster.
* @property releaseLabel Release label for the Amazon EMR release.
* @property scaleDownBehavior Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
* @property securityConfiguration Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater.
* @property serviceRole IAM role that will be assumed by the Amazon EMR service to access AWS resources.
* The following arguments are optional:
* @property stepConcurrencyLevel Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `release_label` 5.28.0 or greater (default is 1).
* @property steps List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
* @property tags list of tags to apply to the EMR Cluster. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
* @property terminationProtection Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
* @property unhealthyNodeReplacement Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
* @property visibleToAllUsers Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
*/
public data class ClusterArgs(
public val additionalInfo: Output? = null,
public val applications: Output>? = null,
public val autoTerminationPolicy: Output? = null,
public val autoscalingRole: Output? = null,
public val bootstrapActions: Output>? = null,
public val configurations: Output? = null,
public val configurationsJson: Output? = null,
public val coreInstanceFleet: Output? = null,
public val coreInstanceGroup: Output? = null,
public val customAmiId: Output? = null,
public val ebsRootVolumeSize: Output? = null,
public val ec2Attributes: Output? = null,
public val keepJobFlowAliveWhenNoSteps: Output? = null,
public val kerberosAttributes: Output? = null,
public val listStepsStates: Output>? = null,
public val logEncryptionKmsKeyId: Output? = null,
public val logUri: Output? = null,
public val masterInstanceFleet: Output? = null,
public val masterInstanceGroup: Output? = null,
public val name: Output? = null,
public val placementGroupConfigs: Output>? = null,
public val releaseLabel: Output? = null,
public val scaleDownBehavior: Output? = null,
public val securityConfiguration: Output? = null,
public val serviceRole: Output? = null,
public val stepConcurrencyLevel: Output? = null,
public val steps: Output>? = null,
public val tags: Output>? = null,
public val terminationProtection: Output? = null,
public val unhealthyNodeReplacement: Output? = null,
public val visibleToAllUsers: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.emr.ClusterArgs = com.pulumi.aws.emr.ClusterArgs.builder()
.additionalInfo(additionalInfo?.applyValue({ args0 -> args0 }))
.applications(applications?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.autoTerminationPolicy(
autoTerminationPolicy?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.autoscalingRole(autoscalingRole?.applyValue({ args0 -> args0 }))
.bootstrapActions(
bootstrapActions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.configurations(configurations?.applyValue({ args0 -> args0 }))
.configurationsJson(configurationsJson?.applyValue({ args0 -> args0 }))
.coreInstanceFleet(coreInstanceFleet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.coreInstanceGroup(coreInstanceGroup?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.customAmiId(customAmiId?.applyValue({ args0 -> args0 }))
.ebsRootVolumeSize(ebsRootVolumeSize?.applyValue({ args0 -> args0 }))
.ec2Attributes(ec2Attributes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.keepJobFlowAliveWhenNoSteps(keepJobFlowAliveWhenNoSteps?.applyValue({ args0 -> args0 }))
.kerberosAttributes(
kerberosAttributes?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.listStepsStates(listStepsStates?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.logEncryptionKmsKeyId(logEncryptionKmsKeyId?.applyValue({ args0 -> args0 }))
.logUri(logUri?.applyValue({ args0 -> args0 }))
.masterInstanceFleet(
masterInstanceFleet?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.masterInstanceGroup(
masterInstanceGroup?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.placementGroupConfigs(
placementGroupConfigs?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.releaseLabel(releaseLabel?.applyValue({ args0 -> args0 }))
.scaleDownBehavior(scaleDownBehavior?.applyValue({ args0 -> args0 }))
.securityConfiguration(securityConfiguration?.applyValue({ args0 -> args0 }))
.serviceRole(serviceRole?.applyValue({ args0 -> args0 }))
.stepConcurrencyLevel(stepConcurrencyLevel?.applyValue({ args0 -> args0 }))
.steps(steps?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.terminationProtection(terminationProtection?.applyValue({ args0 -> args0 }))
.unhealthyNodeReplacement(unhealthyNodeReplacement?.applyValue({ args0 -> args0 }))
.visibleToAllUsers(visibleToAllUsers?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ClusterArgs].
*/
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
private var additionalInfo: Output? = null
private var applications: Output>? = null
private var autoTerminationPolicy: Output? = null
private var autoscalingRole: Output? = null
private var bootstrapActions: Output>? = null
private var configurations: Output? = null
private var configurationsJson: Output? = null
private var coreInstanceFleet: Output? = null
private var coreInstanceGroup: Output? = null
private var customAmiId: Output? = null
private var ebsRootVolumeSize: Output? = null
private var ec2Attributes: Output? = null
private var keepJobFlowAliveWhenNoSteps: Output? = null
private var kerberosAttributes: Output? = null
private var listStepsStates: Output>? = null
private var logEncryptionKmsKeyId: Output? = null
private var logUri: Output? = null
private var masterInstanceFleet: Output? = null
private var masterInstanceGroup: Output? = null
private var name: Output? = null
private var placementGroupConfigs: Output>? = null
private var releaseLabel: Output? = null
private var scaleDownBehavior: Output? = null
private var securityConfiguration: Output? = null
private var serviceRole: Output? = null
private var stepConcurrencyLevel: Output? = null
private var steps: Output>? = null
private var tags: Output>? = null
private var terminationProtection: Output? = null
private var unhealthyNodeReplacement: Output? = null
private var visibleToAllUsers: Output? = null
/**
* @param value JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
*/
@JvmName("hyonbkfnwmriliqu")
public suspend fun additionalInfo(`value`: Output) {
this.additionalInfo = value
}
/**
* @param value A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
*/
@JvmName("piieisqtisiejgpk")
public suspend fun applications(`value`: Output>) {
this.applications = value
}
@JvmName("ipmslpbiglkauquv")
public suspend fun applications(vararg values: Output) {
this.applications = Output.all(values.asList())
}
/**
* @param values A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
*/
@JvmName("rtvldeevatnahkdn")
public suspend fun applications(values: List>) {
this.applications = Output.all(values)
}
/**
* @param value 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. See Auto Termination Policy Below.
*/
@JvmName("jbumsdkligynfexx")
public suspend fun autoTerminationPolicy(`value`: Output) {
this.autoTerminationPolicy = value
}
/**
* @param value IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
*/
@JvmName("ollpjtmgvaprsqji")
public suspend fun autoscalingRole(`value`: Output) {
this.autoscalingRole = value
}
/**
* @param value Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("pkaoftixppcenkpt")
public suspend fun bootstrapActions(`value`: Output>) {
this.bootstrapActions = value
}
@JvmName("kghgmkgenxnmsesc")
public suspend fun bootstrapActions(vararg values: Output) {
this.bootstrapActions = Output.all(values.asList())
}
/**
* @param values Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("baybbhlkpiprqiox")
public suspend fun bootstrapActions(values: List>) {
this.bootstrapActions = Output.all(values)
}
/**
* @param value List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
*/
@JvmName("kmbjqyykiynrlact")
public suspend fun configurations(`value`: Output) {
this.configurations = value
}
/**
* @param value JSON string for supplying list of configurations for the EMR cluster.
* > **NOTE on `configurations_json`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* cluster = aws.emr.Cluster("cluster", configurations_json="""[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var cluster = new Aws.Emr.Cluster("cluster", new()
* {
* ConfigurationsJson = @"[
* {
* ""Classification"": ""hadoop-env"",
* ""Configurations"": [
* {
* ""Classification"": ""export"",
* ""Properties"": {
* ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
* }
* }
* ],
* ""Properties"": {}
* }
* ]
* ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
* ConfigurationsJson: pulumi.String(`[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var cluster = new Cluster("cluster", ClusterArgs.builder()
* .configurationsJson("""
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* cluster:
* type: aws:emr:Cluster
* properties:
* configurationsJson: |
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* ```
*
*/
@JvmName("cnbxayokdbufcjrh")
public suspend fun configurationsJson(`value`: Output) {
this.configurationsJson = value
}
/**
* @param value Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `core_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("bsrlojxsollcpisn")
public suspend fun coreInstanceFleet(`value`: Output) {
this.coreInstanceFleet = value
}
/**
* @param value Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
*/
@JvmName("fwcnpsacwmlgmynf")
public suspend fun coreInstanceGroup(`value`: Output) {
this.coreInstanceGroup = value
}
/**
* @param value Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
*/
@JvmName("insxoakveneyqcjs")
public suspend fun customAmiId(`value`: Output) {
this.customAmiId = value
}
/**
* @param value Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
*/
@JvmName("rbfmmocvggqkhdmy")
public suspend fun ebsRootVolumeSize(`value`: Output) {
this.ebsRootVolumeSize = value
}
/**
* @param value Attributes for the EC2 instances running the job flow. See below.
*/
@JvmName("cgxnfqkdkkrfwgvv")
public suspend fun ec2Attributes(`value`: Output) {
this.ec2Attributes = value
}
/**
* @param value Switch on/off run cluster with no steps or when all steps are complete (default is on)
*/
@JvmName("mhsnvqhoibjvjdgm")
public suspend fun keepJobFlowAliveWhenNoSteps(`value`: Output) {
this.keepJobFlowAliveWhenNoSteps = value
}
/**
* @param value Kerberos configuration for the cluster. See below.
*/
@JvmName("ammxnkagerfajmhe")
public suspend fun kerberosAttributes(`value`: Output) {
this.kerberosAttributes = value
}
/**
* @param value List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
*/
@JvmName("pufncduxqcbulqha")
public suspend fun listStepsStates(`value`: Output>) {
this.listStepsStates = value
}
@JvmName("rkqkmedefmflslhg")
public suspend fun listStepsStates(vararg values: Output) {
this.listStepsStates = Output.all(values.asList())
}
/**
* @param values List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
*/
@JvmName("cnnrxaksgqtccpqs")
public suspend fun listStepsStates(values: List>) {
this.listStepsStates = Output.all(values)
}
/**
* @param value AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
*/
@JvmName("mqiixnrprfvogkis")
public suspend fun logEncryptionKmsKeyId(`value`: Output) {
this.logEncryptionKmsKeyId = value
}
/**
* @param value S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
*/
@JvmName("gfptqtxqtyaqvpvq")
public suspend fun logUri(`value`: Output) {
this.logUri = value
}
/**
* @param value Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `master_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("gsopesbuprppyerd")
public suspend fun masterInstanceFleet(`value`: Output) {
this.masterInstanceFleet = value
}
/**
* @param value Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
*/
@JvmName("duygchwanrcbvfqr")
public suspend fun masterInstanceGroup(`value`: Output) {
this.masterInstanceGroup = value
}
/**
* @param value Name of the job flow.
*/
@JvmName("mslmshjoaxrkfgma")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("dhyxbpoteqvaigul")
public suspend fun placementGroupConfigs(`value`: Output>) {
this.placementGroupConfigs = value
}
@JvmName("uwufyuwrxmuhjyye")
public suspend fun placementGroupConfigs(vararg values: Output) {
this.placementGroupConfigs = Output.all(values.asList())
}
/**
* @param values The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("bopcpsswogyediak")
public suspend fun placementGroupConfigs(values: List>) {
this.placementGroupConfigs = Output.all(values)
}
/**
* @param value Release label for the Amazon EMR release.
*/
@JvmName("clospghmqotqdogb")
public suspend fun releaseLabel(`value`: Output) {
this.releaseLabel = value
}
/**
* @param value Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
*/
@JvmName("vcinpgreblfvdgon")
public suspend fun scaleDownBehavior(`value`: Output) {
this.scaleDownBehavior = value
}
/**
* @param value Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater.
*/
@JvmName("eqldkubgglwslrmp")
public suspend fun securityConfiguration(`value`: Output) {
this.securityConfiguration = value
}
/**
* @param value IAM role that will be assumed by the Amazon EMR service to access AWS resources.
* The following arguments are optional:
*/
@JvmName("drxvotkiraddyfnf")
public suspend fun serviceRole(`value`: Output) {
this.serviceRole = value
}
/**
* @param value Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `release_label` 5.28.0 or greater (default is 1).
*/
@JvmName("qryoxknektmerudj")
public suspend fun stepConcurrencyLevel(`value`: Output) {
this.stepConcurrencyLevel = value
}
/**
* @param value List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("lnkygtfqluxbvyyy")
public suspend fun steps(`value`: Output>) {
this.steps = value
}
@JvmName("mswyjqgknqhhdnjb")
public suspend fun steps(vararg values: Output) {
this.steps = Output.all(values.asList())
}
/**
* @param values List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("ddntwjquaokuaihn")
public suspend fun steps(values: List>) {
this.steps = Output.all(values)
}
/**
* @param value list of tags to apply to the EMR Cluster. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("dxymipajbljrnxhg")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
*/
@JvmName("aeshmwjffodeamqx")
public suspend fun terminationProtection(`value`: Output) {
this.terminationProtection = value
}
/**
* @param value Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
*/
@JvmName("afbixpoxytkimfdu")
public suspend fun unhealthyNodeReplacement(`value`: Output) {
this.unhealthyNodeReplacement = value
}
/**
* @param value Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
*/
@JvmName("kuvjdcjfhwgpqmqp")
public suspend fun visibleToAllUsers(`value`: Output) {
this.visibleToAllUsers = value
}
/**
* @param value JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
*/
@JvmName("gxytyubvkfcjitbx")
public suspend fun additionalInfo(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.additionalInfo = mapped
}
/**
* @param value A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
*/
@JvmName("nyavjvcewtelisjt")
public suspend fun applications(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applications = mapped
}
/**
* @param values A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
*/
@JvmName("wgoljslfcsqsllie")
public suspend fun applications(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.applications = mapped
}
/**
* @param value 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. See Auto Termination Policy Below.
*/
@JvmName("gbiqurslncjxkako")
public suspend fun autoTerminationPolicy(`value`: ClusterAutoTerminationPolicyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.autoTerminationPolicy = mapped
}
/**
* @param argument 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. See Auto Termination Policy Below.
*/
@JvmName("wakhbhcvwnnuuydm")
public suspend fun autoTerminationPolicy(argument: suspend ClusterAutoTerminationPolicyArgsBuilder.() -> Unit) {
val toBeMapped = ClusterAutoTerminationPolicyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.autoTerminationPolicy = mapped
}
/**
* @param value IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
*/
@JvmName("oruapeeuaowhtbyx")
public suspend fun autoscalingRole(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.autoscalingRole = mapped
}
/**
* @param value Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("lacislruwrsooeqp")
public suspend fun bootstrapActions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bootstrapActions = mapped
}
/**
* @param argument Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("uefkmifonajugyeo")
public suspend fun bootstrapActions(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ClusterBootstrapActionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.bootstrapActions = mapped
}
/**
* @param argument Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("etvrujjtkvvoxmjh")
public suspend fun bootstrapActions(vararg argument: suspend ClusterBootstrapActionArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ClusterBootstrapActionArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.bootstrapActions = mapped
}
/**
* @param argument Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("pgcqvjkiwhjxuqfv")
public suspend fun bootstrapActions(argument: suspend ClusterBootstrapActionArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ClusterBootstrapActionArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.bootstrapActions = mapped
}
/**
* @param values Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
*/
@JvmName("vxmshsrrfamumuty")
public suspend fun bootstrapActions(vararg values: ClusterBootstrapActionArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.bootstrapActions = mapped
}
/**
* @param value List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
*/
@JvmName("qaaerdpcaenhweih")
public suspend fun configurations(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurations = mapped
}
/**
* @param value JSON string for supplying list of configurations for the EMR cluster.
* > **NOTE on `configurations_json`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const cluster = new aws.emr.Cluster("cluster", {configurationsJson: `[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* cluster = aws.emr.Cluster("cluster", configurations_json="""[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var cluster = new Aws.Emr.Cluster("cluster", new()
* {
* ConfigurationsJson = @"[
* {
* ""Classification"": ""hadoop-env"",
* ""Configurations"": [
* {
* ""Classification"": ""export"",
* ""Properties"": {
* ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
* }
* }
* ],
* ""Properties"": {}
* }
* ]
* ",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
* ConfigurationsJson: pulumi.String(`[
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* `),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.emr.Cluster;
* import com.pulumi.aws.emr.ClusterArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var cluster = new Cluster("cluster", ClusterArgs.builder()
* .configurationsJson("""
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* """)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* cluster:
* type: aws:emr:Cluster
* properties:
* configurationsJson: |
* [
* {
* "Classification": "hadoop-env",
* "Configurations": [
* {
* "Classification": "export",
* "Properties": {
* "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
* }
* }
* ],
* "Properties": {}
* }
* ]
* ```
*
*/
@JvmName("uyailknyldslbhip")
public suspend fun configurationsJson(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurationsJson = mapped
}
/**
* @param value Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `core_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("gffeocpqpousgryf")
public suspend fun coreInstanceFleet(`value`: ClusterCoreInstanceFleetArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.coreInstanceFleet = mapped
}
/**
* @param argument Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `core_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("kftoarhfdcmcdris")
public suspend fun coreInstanceFleet(argument: suspend ClusterCoreInstanceFleetArgsBuilder.() -> Unit) {
val toBeMapped = ClusterCoreInstanceFleetArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.coreInstanceFleet = mapped
}
/**
* @param value Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
*/
@JvmName("uhjwdppdnpeepsji")
public suspend fun coreInstanceGroup(`value`: ClusterCoreInstanceGroupArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.coreInstanceGroup = mapped
}
/**
* @param argument Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
*/
@JvmName("psyaghldvgkbcyxw")
public suspend fun coreInstanceGroup(argument: suspend ClusterCoreInstanceGroupArgsBuilder.() -> Unit) {
val toBeMapped = ClusterCoreInstanceGroupArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.coreInstanceGroup = mapped
}
/**
* @param value Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
*/
@JvmName("apxwrmnfdedoktyk")
public suspend fun customAmiId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customAmiId = mapped
}
/**
* @param value Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
*/
@JvmName("nosrjgtdyvmrpjbr")
public suspend fun ebsRootVolumeSize(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ebsRootVolumeSize = mapped
}
/**
* @param value Attributes for the EC2 instances running the job flow. See below.
*/
@JvmName("pomhsgobkneiqsgj")
public suspend fun ec2Attributes(`value`: ClusterEc2AttributesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ec2Attributes = mapped
}
/**
* @param argument Attributes for the EC2 instances running the job flow. See below.
*/
@JvmName("ixwpxbpgmvixxbjw")
public suspend fun ec2Attributes(argument: suspend ClusterEc2AttributesArgsBuilder.() -> Unit) {
val toBeMapped = ClusterEc2AttributesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.ec2Attributes = mapped
}
/**
* @param value Switch on/off run cluster with no steps or when all steps are complete (default is on)
*/
@JvmName("irmayttlxpeonppw")
public suspend fun keepJobFlowAliveWhenNoSteps(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keepJobFlowAliveWhenNoSteps = mapped
}
/**
* @param value Kerberos configuration for the cluster. See below.
*/
@JvmName("nuifawgrjmhwxmix")
public suspend fun kerberosAttributes(`value`: ClusterKerberosAttributesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kerberosAttributes = mapped
}
/**
* @param argument Kerberos configuration for the cluster. See below.
*/
@JvmName("yvdbhrftbbfojydw")
public suspend fun kerberosAttributes(argument: suspend ClusterKerberosAttributesArgsBuilder.() -> Unit) {
val toBeMapped = ClusterKerberosAttributesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.kerberosAttributes = mapped
}
/**
* @param value List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
*/
@JvmName("flrtwwhauymnbwoa")
public suspend fun listStepsStates(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.listStepsStates = mapped
}
/**
* @param values List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
*/
@JvmName("quccahprmgdfpdel")
public suspend fun listStepsStates(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.listStepsStates = mapped
}
/**
* @param value AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
*/
@JvmName("xbpaygpgtpnqrylk")
public suspend fun logEncryptionKmsKeyId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logEncryptionKmsKeyId = mapped
}
/**
* @param value S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
*/
@JvmName("xuniwuwoaxhtuqcf")
public suspend fun logUri(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logUri = mapped
}
/**
* @param value Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `master_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("cbnxpgmhndadmujv")
public suspend fun masterInstanceFleet(`value`: ClusterMasterInstanceFleetArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.masterInstanceFleet = mapped
}
/**
* @param argument Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `master_instance_group` configuration blocks are set. Detailed below.
*/
@JvmName("qkvkddypskkieakw")
public suspend fun masterInstanceFleet(argument: suspend ClusterMasterInstanceFleetArgsBuilder.() -> Unit) {
val toBeMapped = ClusterMasterInstanceFleetArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.masterInstanceFleet = mapped
}
/**
* @param value Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
*/
@JvmName("qqlfyefvpaedflac")
public suspend fun masterInstanceGroup(`value`: ClusterMasterInstanceGroupArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.masterInstanceGroup = mapped
}
/**
* @param argument Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
*/
@JvmName("lxhfrkenijmvhmoj")
public suspend fun masterInstanceGroup(argument: suspend ClusterMasterInstanceGroupArgsBuilder.() -> Unit) {
val toBeMapped = ClusterMasterInstanceGroupArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.masterInstanceGroup = mapped
}
/**
* @param value Name of the job flow.
*/
@JvmName("bqieekyfwpphbffr")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("pfexlwifpswvjeml")
public suspend fun placementGroupConfigs(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.placementGroupConfigs = mapped
}
/**
* @param argument The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("rkqqvjtithuymfev")
public suspend fun placementGroupConfigs(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ClusterPlacementGroupConfigArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.placementGroupConfigs = mapped
}
/**
* @param argument The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("xoloklprxqlqmulk")
public suspend fun placementGroupConfigs(vararg argument: suspend ClusterPlacementGroupConfigArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ClusterPlacementGroupConfigArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.placementGroupConfigs = mapped
}
/**
* @param argument The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("mfabywsmttgxfyxt")
public suspend fun placementGroupConfigs(argument: suspend ClusterPlacementGroupConfigArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ClusterPlacementGroupConfigArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.placementGroupConfigs = mapped
}
/**
* @param values The specified placement group configuration for an Amazon EMR cluster.
*/
@JvmName("xogureyvqpxohdvk")
public suspend fun placementGroupConfigs(vararg values: ClusterPlacementGroupConfigArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.placementGroupConfigs = mapped
}
/**
* @param value Release label for the Amazon EMR release.
*/
@JvmName("obijoucpurubhoaa")
public suspend fun releaseLabel(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.releaseLabel = mapped
}
/**
* @param value Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
*/
@JvmName("ylrqdiurbbfuwvfn")
public suspend fun scaleDownBehavior(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scaleDownBehavior = mapped
}
/**
* @param value Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater.
*/
@JvmName("ghcahjrjwoyyacrb")
public suspend fun securityConfiguration(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.securityConfiguration = mapped
}
/**
* @param value IAM role that will be assumed by the Amazon EMR service to access AWS resources.
* The following arguments are optional:
*/
@JvmName("mudatousftxduxfx")
public suspend fun serviceRole(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceRole = mapped
}
/**
* @param value Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `release_label` 5.28.0 or greater (default is 1).
*/
@JvmName("ilexpcvisowdymsy")
public suspend fun stepConcurrencyLevel(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.stepConcurrencyLevel = mapped
}
/**
* @param value List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("ugkndfsiaglmyllc")
public suspend fun steps(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.steps = mapped
}
/**
* @param argument List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("glbpafdrpjxrfujh")
public suspend fun steps(argument: List Unit>) {
val toBeMapped = argument.toList().map { ClusterStepArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.steps = mapped
}
/**
* @param argument List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("gqlqrvvpnueojpsc")
public suspend fun steps(vararg argument: suspend ClusterStepArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { ClusterStepArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.steps = mapped
}
/**
* @param argument List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("llivdcfnkdwvfumf")
public suspend fun steps(argument: suspend ClusterStepArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ClusterStepArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.steps = mapped
}
/**
* @param values List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
*/
@JvmName("vqevwbbriflfmuwb")
public suspend fun steps(vararg values: ClusterStepArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.steps = mapped
}
/**
* @param value list of tags to apply to the EMR Cluster. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("hgtnnfyarmnmtcyo")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values list of tags to apply to the EMR Cluster. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("ptivtpdkmcjkuetr")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
*/
@JvmName("ronutbjstnbvpqvj")
public suspend fun terminationProtection(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.terminationProtection = mapped
}
/**
* @param value Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
*/
@JvmName("iuonlwsmfrwlftba")
public suspend fun unhealthyNodeReplacement(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.unhealthyNodeReplacement = mapped
}
/**
* @param value Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
*/
@JvmName("qjsankhiuaqtgobw")
public suspend fun visibleToAllUsers(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.visibleToAllUsers = mapped
}
internal fun build(): ClusterArgs = ClusterArgs(
additionalInfo = additionalInfo,
applications = applications,
autoTerminationPolicy = autoTerminationPolicy,
autoscalingRole = autoscalingRole,
bootstrapActions = bootstrapActions,
configurations = configurations,
configurationsJson = configurationsJson,
coreInstanceFleet = coreInstanceFleet,
coreInstanceGroup = coreInstanceGroup,
customAmiId = customAmiId,
ebsRootVolumeSize = ebsRootVolumeSize,
ec2Attributes = ec2Attributes,
keepJobFlowAliveWhenNoSteps = keepJobFlowAliveWhenNoSteps,
kerberosAttributes = kerberosAttributes,
listStepsStates = listStepsStates,
logEncryptionKmsKeyId = logEncryptionKmsKeyId,
logUri = logUri,
masterInstanceFleet = masterInstanceFleet,
masterInstanceGroup = masterInstanceGroup,
name = name,
placementGroupConfigs = placementGroupConfigs,
releaseLabel = releaseLabel,
scaleDownBehavior = scaleDownBehavior,
securityConfiguration = securityConfiguration,
serviceRole = serviceRole,
stepConcurrencyLevel = stepConcurrencyLevel,
steps = steps,
tags = tags,
terminationProtection = terminationProtection,
unhealthyNodeReplacement = unhealthyNodeReplacement,
visibleToAllUsers = visibleToAllUsers,
)
}