# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import _utilities, _tables


class Cluster(pulumi.CustomResource):
    additional_info: pulumi.Output[str]
    """
    A 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 this provider cannot detect drift from the actual EMR cluster if its value is changed outside this provider.
    """
    applications: pulumi.Output[list]
    """
    A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, `Spark`, and `JupyterHub` (as of EMR 5.14.0). Case insensitive
    """
    arn: pulumi.Output[str]
    autoscaling_role: pulumi.Output[str]
    """
    An 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.
    """
    bootstrap_actions: pulumi.Output[list]
    """
    Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. Defined below.

      * `args` (`list`) - List of command line arguments passed to the JAR file's main function when executed.
      * `name` (`str`) - The name of the step.
      * `path` (`str`) - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system
    """
    cluster_state: pulumi.Output[str]
    configurations: pulumi.Output[str]
    """
    List of configurations supplied for the EMR cluster you are creating
    """
    configurations_json: pulumi.Output[str]
    """
    A JSON string for supplying list of configurations for the EMR cluster.
    """
    core_instance_group: pulumi.Output[dict]
    """
    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).

      * `autoscaling_policy` (`str`) - String containing the [EMR Auto Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html) JSON.
      * `bid_price` (`str`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
      * `ebs_configs` (`list`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
        * `iops` (`float`) - The number of I/O operations per second (IOPS) that the volume supports
        * `size` (`float`) - The volume size, in gibibytes (GiB).
        * `type` (`str`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
        * `volumesPerInstance` (`float`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

      * `id` (`str`) - The ID of the EMR Cluster
      * `instance_count` (`float`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
      * `instance_type` (`str`) - EC2 instance type for all instances in the instance group.
      * `name` (`str`) - The name of the step.
    """
    custom_ami_id: pulumi.Output[str]
    """
    A custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
    """
    ebs_root_volume_size: pulumi.Output[float]
    """
    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.
    """
    ec2_attributes: pulumi.Output[dict]
    """
    Attributes for the EC2 instances running the job flow. Defined below

      * `additionalMasterSecurityGroups` (`str`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the master node
      * `additionalSlaveSecurityGroups` (`str`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string
      * `emrManagedMasterSecurityGroup` (`str`) - Identifier of the Amazon EC2 EMR-Managed security group for the master node
      * `emrManagedSlaveSecurityGroup` (`str`) - Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes
      * `instanceProfile` (`str`) - Instance Profile for EC2 instances of the cluster assume this role
      * `key_name` (`str`) - Amazon EC2 key pair that can be used to ssh to the master node as the user called `hadoop`
      * `serviceAccessSecurityGroup` (`str`) - Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet
      * `subnet_id` (`str`) - VPC subnet id where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC
    """
    keep_job_flow_alive_when_no_steps: pulumi.Output[bool]
    """
    Switch on/off run cluster with no steps or when all steps are complete (default is on)
    """
    kerberos_attributes: pulumi.Output[dict]
    """
    Kerberos configuration for the cluster. Defined below

      * `adDomainJoinPassword` (`str`) - The Active Directory password for `ad_domain_join_user`. This provider cannot perform drift detection of this configuration.
      * `adDomainJoinUser` (`str`) - Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.
      * `crossRealmTrustPrincipalPassword` (`str`) - Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.
      * `kdcAdminPassword` (`str`) - The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.
      * `realm` (`str`) - The name of the Kerberos realm to which all nodes in a cluster belong. For example, `EC2.INTERNAL`
    """
    log_uri: pulumi.Output[str]
    """
    S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created
    """
    master_instance_group: pulumi.Output[dict]
    """
    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).

      * `bid_price` (`str`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
      * `ebs_configs` (`list`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
        * `iops` (`float`) - The number of I/O operations per second (IOPS) that the volume supports
        * `size` (`float`) - The volume size, in gibibytes (GiB).
        * `type` (`str`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
        * `volumesPerInstance` (`float`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

      * `id` (`str`) - The ID of the EMR Cluster
      * `instance_count` (`float`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
      * `instance_type` (`str`) - EC2 instance type for all instances in the instance group.
      * `name` (`str`) - The name of the step.
    """
    master_public_dns: pulumi.Output[str]
    """
    The public DNS name of the master EC2 instance.
    * `core_instance_group.0.id` - Core node type Instance Group ID, if using Instance Group for this node type.
    """
    name: pulumi.Output[str]
    """
    The name of the step.
    """
    release_label: pulumi.Output[str]
    """
    The release label for the Amazon EMR release
    """
    scale_down_behavior: pulumi.Output[str]
    """
    The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
    """
    security_configuration: pulumi.Output[str]
    """
    The security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater
    """
    service_role: pulumi.Output[str]
    """
    IAM role that will be assumed by the Amazon EMR service to access AWS resources
    """
    step_concurrency_level: pulumi.Output[float]
    """
    The 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)
    """
    steps: pulumi.Output[list]
    """
    List of steps to run when creating the cluster. Defined below. It is highly recommended to utilize [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) if other steps are being managed outside of this provider.

      * `actionOnFailure` (`str`) - The action to take if the step fails. Valid values: `TERMINATE_JOB_FLOW`, `TERMINATE_CLUSTER`, `CANCEL_AND_WAIT`, and `CONTINUE`
      * `hadoopJarStep` (`dict`) - The JAR file used for the step. Defined below.
        * `args` (`list`) - List of command line arguments passed to the JAR file's main function when executed.
        * `jar` (`str`) - Path to a JAR file run during the step.
        * `mainClass` (`str`) - Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
        * `properties` (`dict`) - Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

      * `name` (`str`) - The name of the step.
    """
    tags: pulumi.Output[dict]
    """
    list of tags to apply to the EMR Cluster
    """
    termination_protection: pulumi.Output[bool]
    """
    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`.
    """
    visible_to_all_users: pulumi.Output[bool]
    """
    Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default `true`
    """
    def __init__(__self__, resource_name, opts=None, additional_info=None, applications=None, autoscaling_role=None, bootstrap_actions=None, configurations=None, configurations_json=None, core_instance_group=None, custom_ami_id=None, ebs_root_volume_size=None, ec2_attributes=None, keep_job_flow_alive_when_no_steps=None, kerberos_attributes=None, log_uri=None, master_instance_group=None, name=None, release_label=None, scale_down_behavior=None, security_configuration=None, service_role=None, step_concurrency_level=None, steps=None, tags=None, termination_protection=None, visible_to_all_users=None, __props__=None, __name__=None, __opts__=None):
        """
        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 `emr.InstanceGroup` resource.

        > Support for [Instance Fleets](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-fleets) will be made available in an upcoming release.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        cluster = aws.emr.Cluster("cluster",
            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": aws_subnet["main"]["id"],
                "emrManagedMasterSecurityGroup": aws_security_group["sg"]["id"],
                "emrManagedSlaveSecurityGroup": aws_security_group["sg"]["id"],
                "instanceProfile": aws_iam_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",
                    "volumesPerInstance": 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=aws_iam_role["iam_emr_service_role"]["arn"])
        ```

        The `emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster
        to use as a service, and another to place on your Cluster Instances to interact
        with AWS from those instances. The suggested role policy template for the EMR service is `AmazonElasticMapReduceRole`,
        and `AmazonElasticMapReduceforEC2Role` for the EC2 profile. See the [Getting
        Started](https://docs.aws.amazon.com/ElasticMapReduce/latest/ManagementGuide/emr-gs-launch-sample-cluster.html)
        guide for more information on these IAM roles. There is also a fully-bootable
        example this provider configuration at the bottom of this page.
        ### 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 to utilize [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) if other
        steps are being managed outside of this provider.

        ```python
        import pulumi
        import pulumi_aws as aws

        # ... other configuration ...
        example = aws.emr.Cluster("example", 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).

        ```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
        # ... other configuration ...
        example_subnet = aws.ec2.Subnet("exampleSubnet", map_public_ip_on_launch=True)
        # ... other configuration ...
        example_cluster = aws.emr.Cluster("exampleCluster",
            release_label="emr-5.24.1",
            termination_protection=True,
            ec2_attributes={
                "subnet_id": example_subnet.id,
            },
            master_instance_group={
                "instance_count": 3,
            },
            core_instance_group={})
        ```
        ## Example bootable config

        **NOTE:** This configuration demonstrates a minimal configuration needed to
        boot an example EMR Cluster. It is not meant to display best practices. Please
        use at your own risk.

        ```python
        import pulumi
        import pulumi_aws as aws

        main_vpc = aws.ec2.Vpc("mainVpc",
            cidr_block="168.31.0.0/16",
            enable_dns_hostnames=True,
            tags={
                "name": "emr_test",
            })
        main_subnet = aws.ec2.Subnet("mainSubnet",
            vpc_id=main_vpc.id,
            cidr_block="168.31.0.0/20",
            tags={
                "name": "emr_test",
            })
        # IAM role for EMR Service
        iam_emr_service_role = aws.iam.Role("iamEmrServiceRole", assume_role_policy=\"\"\"{
          "Version": "2008-10-17",
          "Statement": [
            {
              "Sid": "",
              "Effect": "Allow",
              "Principal": {
                "Service": "elasticmapreduce.amazonaws.com"
              },
              "Action": "sts:AssumeRole"
            }
          ]
        }
        \"\"\")
        # IAM Role for EC2 Instance Profile
        iam_emr_profile_role = aws.iam.Role("iamEmrProfileRole", assume_role_policy=\"\"\"{
          "Version": "2008-10-17",
          "Statement": [
            {
              "Sid": "",
              "Effect": "Allow",
              "Principal": {
                "Service": "ec2.amazonaws.com"
              },
              "Action": "sts:AssumeRole"
            }
          ]
        }
        \"\"\")
        emr_profile = aws.iam.InstanceProfile("emrProfile", role=iam_emr_profile_role.name)
        cluster = aws.emr.Cluster("cluster",
            release_label="emr-4.6.0",
            applications=["Spark"],
            ec2_attributes={
                "subnet_id": main_subnet.id,
                "emrManagedMasterSecurityGroup": aws_security_group["allow_all"]["id"],
                "emrManagedSlaveSecurityGroup": aws_security_group["allow_all"]["id"],
                "instanceProfile": emr_profile.arn,
            },
            master_instance_group={
                "instance_type": "m5.xlarge",
            },
            core_instance_group={
                "instance_count": 1,
                "instance_type": "m5.xlarge",
            },
            tags={
                "role": "rolename",
                "dns_zone": "env_zone",
                "env": "env",
                "name": "name-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)
        allow_access = aws.ec2.SecurityGroup("allowAccess",
            description="Allow inbound traffic",
            vpc_id=main_vpc.id,
            ingress=[{
                "from_port": 0,
                "to_port": 0,
                "protocol": "-1",
                "cidr_blocks": main_vpc.cidr_block,
            }],
            egress=[{
                "from_port": 0,
                "to_port": 0,
                "protocol": "-1",
                "cidr_blocks": ["0.0.0.0/0"],
            }],
            tags={
                "name": "emr_test",
            },
            opts=ResourceOptions(depends_on=[main_subnet]))
        gw = aws.ec2.InternetGateway("gw", vpc_id=main_vpc.id)
        route_table = aws.ec2.RouteTable("routeTable",
            vpc_id=main_vpc.id,
            routes=[{
                "cidr_block": "0.0.0.0/0",
                "gateway_id": gw.id,
            }])
        main_route_table_association = aws.ec2.MainRouteTableAssociation("mainRouteTableAssociation",
            vpc_id=main_vpc.id,
            route_table_id=route_table.id)
        ###
        iam_emr_service_policy = aws.iam.RolePolicy("iamEmrServicePolicy",
            role=iam_emr_service_role.id,
            policy=\"\"\"{
            "Version": "2012-10-17",
            "Statement": [{
                "Effect": "Allow",
                "Resource": "*",
                "Action": [
                    "ec2:AuthorizeSecurityGroupEgress",
                    "ec2:AuthorizeSecurityGroupIngress",
                    "ec2:CancelSpotInstanceRequests",
                    "ec2:CreateNetworkInterface",
                    "ec2:CreateSecurityGroup",
                    "ec2:CreateTags",
                    "ec2:DeleteNetworkInterface",
                    "ec2:DeleteSecurityGroup",
                    "ec2:DeleteTags",
                    "ec2:DescribeAvailabilityZones",
                    "ec2:DescribeAccountAttributes",
                    "ec2:DescribeDhcpOptions",
                    "ec2:DescribeInstanceStatus",
                    "ec2:DescribeInstances",
                    "ec2:DescribeKeyPairs",
                    "ec2:DescribeNetworkAcls",
                    "ec2:DescribeNetworkInterfaces",
                    "ec2:DescribePrefixLists",
                    "ec2:DescribeRouteTables",
                    "ec2:DescribeSecurityGroups",
                    "ec2:DescribeSpotInstanceRequests",
                    "ec2:DescribeSpotPriceHistory",
                    "ec2:DescribeSubnets",
                    "ec2:DescribeVpcAttribute",
                    "ec2:DescribeVpcEndpoints",
                    "ec2:DescribeVpcEndpointServices",
                    "ec2:DescribeVpcs",
                    "ec2:DetachNetworkInterface",
                    "ec2:ModifyImageAttribute",
                    "ec2:ModifyInstanceAttribute",
                    "ec2:RequestSpotInstances",
                    "ec2:RevokeSecurityGroupEgress",
                    "ec2:RunInstances",
                    "ec2:TerminateInstances",
                    "ec2:DeleteVolume",
                    "ec2:DescribeVolumeStatus",
                    "ec2:DescribeVolumes",
                    "ec2:DetachVolume",
                    "iam:GetRole",
                    "iam:GetRolePolicy",
                    "iam:ListInstanceProfiles",
                    "iam:ListRolePolicies",
                    "iam:PassRole",
                    "s3:CreateBucket",
                    "s3:Get*",
                    "s3:List*",
                    "sdb:BatchPutAttributes",
                    "sdb:Select",
                    "sqs:CreateQueue",
                    "sqs:Delete*",
                    "sqs:GetQueue*",
                    "sqs:PurgeQueue",
                    "sqs:ReceiveMessage"
                ]
            }]
        }
        \"\"\")
        iam_emr_profile_policy = aws.iam.RolePolicy("iamEmrProfilePolicy",
            role=iam_emr_profile_role.id,
            policy=\"\"\"{
            "Version": "2012-10-17",
            "Statement": [{
                "Effect": "Allow",
                "Resource": "*",
                "Action": [
                    "cloudwatch:*",
                    "dynamodb:*",
                    "ec2:Describe*",
                    "elasticmapreduce:Describe*",
                    "elasticmapreduce:ListBootstrapActions",
                    "elasticmapreduce:ListClusters",
                    "elasticmapreduce:ListInstanceGroups",
                    "elasticmapreduce:ListInstances",
                    "elasticmapreduce:ListSteps",
                    "kinesis:CreateStream",
                    "kinesis:DeleteStream",
                    "kinesis:DescribeStream",
                    "kinesis:GetRecords",
                    "kinesis:GetShardIterator",
                    "kinesis:MergeShards",
                    "kinesis:PutRecord",
                    "kinesis:SplitShard",
                    "rds:Describe*",
                    "s3:*",
                    "sdb:*",
                    "sns:*",
                    "sqs:*"
                ]
            }]
        }
        \"\"\")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] additional_info: A 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 this provider cannot detect drift from the actual EMR cluster if its value is changed outside this provider.
        :param pulumi.Input[list] applications: A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, `Spark`, and `JupyterHub` (as of EMR 5.14.0). Case insensitive
        :param pulumi.Input[str] autoscaling_role: An 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.
        :param pulumi.Input[list] bootstrap_actions: Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. Defined below.
        :param pulumi.Input[str] configurations: List of configurations supplied for the EMR cluster you are creating
        :param pulumi.Input[str] configurations_json: A JSON string for supplying list of configurations for the EMR cluster.
        :param pulumi.Input[dict] core_instance_group: 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).
        :param pulumi.Input[str] custom_ami_id: A custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
        :param pulumi.Input[float] ebs_root_volume_size: 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.
        :param pulumi.Input[dict] ec2_attributes: Attributes for the EC2 instances running the job flow. Defined below
        :param pulumi.Input[bool] keep_job_flow_alive_when_no_steps: Switch on/off run cluster with no steps or when all steps are complete (default is on)
        :param pulumi.Input[dict] kerberos_attributes: Kerberos configuration for the cluster. Defined below
        :param pulumi.Input[str] log_uri: S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created
        :param pulumi.Input[dict] master_instance_group: 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).
        :param pulumi.Input[str] name: The name of the step.
        :param pulumi.Input[str] release_label: The release label for the Amazon EMR release
        :param pulumi.Input[str] scale_down_behavior: The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
        :param pulumi.Input[str] security_configuration: The security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater
        :param pulumi.Input[str] service_role: IAM role that will be assumed by the Amazon EMR service to access AWS resources
        :param pulumi.Input[float] step_concurrency_level: The 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)
        :param pulumi.Input[list] steps: List of steps to run when creating the cluster. Defined below. It is highly recommended to utilize [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) if other steps are being managed outside of this provider.
        :param pulumi.Input[dict] tags: list of tags to apply to the EMR Cluster
        :param pulumi.Input[bool] termination_protection: 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`.
        :param pulumi.Input[bool] visible_to_all_users: Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default `true`

        The **bootstrap_actions** object supports the following:

          * `args` (`pulumi.Input[list]`) - List of command line arguments passed to the JAR file's main function when executed.
          * `name` (`pulumi.Input[str]`) - The name of the step.
          * `path` (`pulumi.Input[str]`) - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system

        The **core_instance_group** object supports the following:

          * `autoscaling_policy` (`pulumi.Input[str]`) - String containing the [EMR Auto Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html) JSON.
          * `bid_price` (`pulumi.Input[str]`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
          * `ebs_configs` (`pulumi.Input[list]`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
            * `iops` (`pulumi.Input[float]`) - The number of I/O operations per second (IOPS) that the volume supports
            * `size` (`pulumi.Input[float]`) - The volume size, in gibibytes (GiB).
            * `type` (`pulumi.Input[str]`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
            * `volumesPerInstance` (`pulumi.Input[float]`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

          * `id` (`pulumi.Input[str]`) - The ID of the EMR Cluster
          * `instance_count` (`pulumi.Input[float]`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
          * `instance_type` (`pulumi.Input[str]`) - EC2 instance type for all instances in the instance group.
          * `name` (`pulumi.Input[str]`) - The name of the step.

        The **ec2_attributes** object supports the following:

          * `additionalMasterSecurityGroups` (`pulumi.Input[str]`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the master node
          * `additionalSlaveSecurityGroups` (`pulumi.Input[str]`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string
          * `emrManagedMasterSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 EMR-Managed security group for the master node
          * `emrManagedSlaveSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes
          * `instanceProfile` (`pulumi.Input[str]`) - Instance Profile for EC2 instances of the cluster assume this role
          * `key_name` (`pulumi.Input[str]`) - Amazon EC2 key pair that can be used to ssh to the master node as the user called `hadoop`
          * `serviceAccessSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet
          * `subnet_id` (`pulumi.Input[str]`) - VPC subnet id where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC

        The **kerberos_attributes** object supports the following:

          * `adDomainJoinPassword` (`pulumi.Input[str]`) - The Active Directory password for `ad_domain_join_user`. This provider cannot perform drift detection of this configuration.
          * `adDomainJoinUser` (`pulumi.Input[str]`) - Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.
          * `crossRealmTrustPrincipalPassword` (`pulumi.Input[str]`) - Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.
          * `kdcAdminPassword` (`pulumi.Input[str]`) - The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.
          * `realm` (`pulumi.Input[str]`) - The name of the Kerberos realm to which all nodes in a cluster belong. For example, `EC2.INTERNAL`

        The **master_instance_group** object supports the following:

          * `bid_price` (`pulumi.Input[str]`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
          * `ebs_configs` (`pulumi.Input[list]`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
            * `iops` (`pulumi.Input[float]`) - The number of I/O operations per second (IOPS) that the volume supports
            * `size` (`pulumi.Input[float]`) - The volume size, in gibibytes (GiB).
            * `type` (`pulumi.Input[str]`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
            * `volumesPerInstance` (`pulumi.Input[float]`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

          * `id` (`pulumi.Input[str]`) - The ID of the EMR Cluster
          * `instance_count` (`pulumi.Input[float]`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
          * `instance_type` (`pulumi.Input[str]`) - EC2 instance type for all instances in the instance group.
          * `name` (`pulumi.Input[str]`) - The name of the step.

        The **steps** object supports the following:

          * `actionOnFailure` (`pulumi.Input[str]`) - The action to take if the step fails. Valid values: `TERMINATE_JOB_FLOW`, `TERMINATE_CLUSTER`, `CANCEL_AND_WAIT`, and `CONTINUE`
          * `hadoopJarStep` (`pulumi.Input[dict]`) - The JAR file used for the step. Defined below.
            * `args` (`pulumi.Input[list]`) - List of command line arguments passed to the JAR file's main function when executed.
            * `jar` (`pulumi.Input[str]`) - Path to a JAR file run during the step.
            * `mainClass` (`pulumi.Input[str]`) - Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
            * `properties` (`pulumi.Input[dict]`) - Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          * `name` (`pulumi.Input[str]`) - The name of the step.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['additional_info'] = additional_info
            __props__['applications'] = applications
            __props__['autoscaling_role'] = autoscaling_role
            __props__['bootstrap_actions'] = bootstrap_actions
            __props__['configurations'] = configurations
            __props__['configurations_json'] = configurations_json
            __props__['core_instance_group'] = core_instance_group
            __props__['custom_ami_id'] = custom_ami_id
            __props__['ebs_root_volume_size'] = ebs_root_volume_size
            __props__['ec2_attributes'] = ec2_attributes
            __props__['keep_job_flow_alive_when_no_steps'] = keep_job_flow_alive_when_no_steps
            __props__['kerberos_attributes'] = kerberos_attributes
            __props__['log_uri'] = log_uri
            __props__['master_instance_group'] = master_instance_group
            __props__['name'] = name
            if release_label is None:
                raise TypeError("Missing required property 'release_label'")
            __props__['release_label'] = release_label
            __props__['scale_down_behavior'] = scale_down_behavior
            __props__['security_configuration'] = security_configuration
            if service_role is None:
                raise TypeError("Missing required property 'service_role'")
            __props__['service_role'] = service_role
            __props__['step_concurrency_level'] = step_concurrency_level
            __props__['steps'] = steps
            __props__['tags'] = tags
            __props__['termination_protection'] = termination_protection
            __props__['visible_to_all_users'] = visible_to_all_users
            __props__['arn'] = None
            __props__['cluster_state'] = None
            __props__['master_public_dns'] = None
        super(Cluster, __self__).__init__(
            'aws:emr/cluster:Cluster',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, additional_info=None, applications=None, arn=None, autoscaling_role=None, bootstrap_actions=None, cluster_state=None, configurations=None, configurations_json=None, core_instance_group=None, custom_ami_id=None, ebs_root_volume_size=None, ec2_attributes=None, keep_job_flow_alive_when_no_steps=None, kerberos_attributes=None, log_uri=None, master_instance_group=None, master_public_dns=None, name=None, release_label=None, scale_down_behavior=None, security_configuration=None, service_role=None, step_concurrency_level=None, steps=None, tags=None, termination_protection=None, visible_to_all_users=None):
        """
        Get an existing Cluster resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] additional_info: A 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 this provider cannot detect drift from the actual EMR cluster if its value is changed outside this provider.
        :param pulumi.Input[list] applications: A list of applications for the cluster. Valid values are: `Flink`, `Hadoop`, `Hive`, `Mahout`, `Pig`, `Spark`, and `JupyterHub` (as of EMR 5.14.0). Case insensitive
        :param pulumi.Input[str] autoscaling_role: An 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.
        :param pulumi.Input[list] bootstrap_actions: Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. Defined below.
        :param pulumi.Input[str] configurations: List of configurations supplied for the EMR cluster you are creating
        :param pulumi.Input[str] configurations_json: A JSON string for supplying list of configurations for the EMR cluster.
        :param pulumi.Input[dict] core_instance_group: 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).
        :param pulumi.Input[str] custom_ami_id: A custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
        :param pulumi.Input[float] ebs_root_volume_size: 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.
        :param pulumi.Input[dict] ec2_attributes: Attributes for the EC2 instances running the job flow. Defined below
        :param pulumi.Input[bool] keep_job_flow_alive_when_no_steps: Switch on/off run cluster with no steps or when all steps are complete (default is on)
        :param pulumi.Input[dict] kerberos_attributes: Kerberos configuration for the cluster. Defined below
        :param pulumi.Input[str] log_uri: S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created
        :param pulumi.Input[dict] master_instance_group: 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).
        :param pulumi.Input[str] master_public_dns: The public DNS name of the master EC2 instance.
               * `core_instance_group.0.id` - Core node type Instance Group ID, if using Instance Group for this node type.
        :param pulumi.Input[str] name: The name of the step.
        :param pulumi.Input[str] release_label: The release label for the Amazon EMR release
        :param pulumi.Input[str] scale_down_behavior: The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
        :param pulumi.Input[str] security_configuration: The security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `release_label` 4.8.0 or greater
        :param pulumi.Input[str] service_role: IAM role that will be assumed by the Amazon EMR service to access AWS resources
        :param pulumi.Input[float] step_concurrency_level: The 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)
        :param pulumi.Input[list] steps: List of steps to run when creating the cluster. Defined below. It is highly recommended to utilize [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) if other steps are being managed outside of this provider.
        :param pulumi.Input[dict] tags: list of tags to apply to the EMR Cluster
        :param pulumi.Input[bool] termination_protection: 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`.
        :param pulumi.Input[bool] visible_to_all_users: Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default `true`

        The **bootstrap_actions** object supports the following:

          * `args` (`pulumi.Input[list]`) - List of command line arguments passed to the JAR file's main function when executed.
          * `name` (`pulumi.Input[str]`) - The name of the step.
          * `path` (`pulumi.Input[str]`) - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system

        The **core_instance_group** object supports the following:

          * `autoscaling_policy` (`pulumi.Input[str]`) - String containing the [EMR Auto Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html) JSON.
          * `bid_price` (`pulumi.Input[str]`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
          * `ebs_configs` (`pulumi.Input[list]`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
            * `iops` (`pulumi.Input[float]`) - The number of I/O operations per second (IOPS) that the volume supports
            * `size` (`pulumi.Input[float]`) - The volume size, in gibibytes (GiB).
            * `type` (`pulumi.Input[str]`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
            * `volumesPerInstance` (`pulumi.Input[float]`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

          * `id` (`pulumi.Input[str]`) - The ID of the EMR Cluster
          * `instance_count` (`pulumi.Input[float]`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
          * `instance_type` (`pulumi.Input[str]`) - EC2 instance type for all instances in the instance group.
          * `name` (`pulumi.Input[str]`) - The name of the step.

        The **ec2_attributes** object supports the following:

          * `additionalMasterSecurityGroups` (`pulumi.Input[str]`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the master node
          * `additionalSlaveSecurityGroups` (`pulumi.Input[str]`) - String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string
          * `emrManagedMasterSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 EMR-Managed security group for the master node
          * `emrManagedSlaveSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes
          * `instanceProfile` (`pulumi.Input[str]`) - Instance Profile for EC2 instances of the cluster assume this role
          * `key_name` (`pulumi.Input[str]`) - Amazon EC2 key pair that can be used to ssh to the master node as the user called `hadoop`
          * `serviceAccessSecurityGroup` (`pulumi.Input[str]`) - Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet
          * `subnet_id` (`pulumi.Input[str]`) - VPC subnet id where you want the job flow to launch. Cannot specify the `cc1.4xlarge` instance type for nodes of a job flow launched in a Amazon VPC

        The **kerberos_attributes** object supports the following:

          * `adDomainJoinPassword` (`pulumi.Input[str]`) - The Active Directory password for `ad_domain_join_user`. This provider cannot perform drift detection of this configuration.
          * `adDomainJoinUser` (`pulumi.Input[str]`) - Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.
          * `crossRealmTrustPrincipalPassword` (`pulumi.Input[str]`) - Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.
          * `kdcAdminPassword` (`pulumi.Input[str]`) - The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.
          * `realm` (`pulumi.Input[str]`) - The name of the Kerberos realm to which all nodes in a cluster belong. For example, `EC2.INTERNAL`

        The **master_instance_group** object supports the following:

          * `bid_price` (`pulumi.Input[str]`) - Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
          * `ebs_configs` (`pulumi.Input[list]`) - Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
            * `iops` (`pulumi.Input[float]`) - The number of I/O operations per second (IOPS) that the volume supports
            * `size` (`pulumi.Input[float]`) - The volume size, in gibibytes (GiB).
            * `type` (`pulumi.Input[str]`) - The volume type. Valid options are `gp2`, `io1`, `standard` and `st1`. See [EBS Volume Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html).
            * `volumesPerInstance` (`pulumi.Input[float]`) - The number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1)

          * `id` (`pulumi.Input[str]`) - The ID of the EMR Cluster
          * `instance_count` (`pulumi.Input[float]`) - Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's `core_instance_group` to be configured. Public (Internet accessible) instances must be created in VPC subnets that have `map public IP on launch` enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the `termination_protection = false` configuration applied before destroying this resource.
          * `instance_type` (`pulumi.Input[str]`) - EC2 instance type for all instances in the instance group.
          * `name` (`pulumi.Input[str]`) - The name of the step.

        The **steps** object supports the following:

          * `actionOnFailure` (`pulumi.Input[str]`) - The action to take if the step fails. Valid values: `TERMINATE_JOB_FLOW`, `TERMINATE_CLUSTER`, `CANCEL_AND_WAIT`, and `CONTINUE`
          * `hadoopJarStep` (`pulumi.Input[dict]`) - The JAR file used for the step. Defined below.
            * `args` (`pulumi.Input[list]`) - List of command line arguments passed to the JAR file's main function when executed.
            * `jar` (`pulumi.Input[str]`) - Path to a JAR file run during the step.
            * `mainClass` (`pulumi.Input[str]`) - Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
            * `properties` (`pulumi.Input[dict]`) - Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          * `name` (`pulumi.Input[str]`) - The name of the step.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["additional_info"] = additional_info
        __props__["applications"] = applications
        __props__["arn"] = arn
        __props__["autoscaling_role"] = autoscaling_role
        __props__["bootstrap_actions"] = bootstrap_actions
        __props__["cluster_state"] = cluster_state
        __props__["configurations"] = configurations
        __props__["configurations_json"] = configurations_json
        __props__["core_instance_group"] = core_instance_group
        __props__["custom_ami_id"] = custom_ami_id
        __props__["ebs_root_volume_size"] = ebs_root_volume_size
        __props__["ec2_attributes"] = ec2_attributes
        __props__["keep_job_flow_alive_when_no_steps"] = keep_job_flow_alive_when_no_steps
        __props__["kerberos_attributes"] = kerberos_attributes
        __props__["log_uri"] = log_uri
        __props__["master_instance_group"] = master_instance_group
        __props__["master_public_dns"] = master_public_dns
        __props__["name"] = name
        __props__["release_label"] = release_label
        __props__["scale_down_behavior"] = scale_down_behavior
        __props__["security_configuration"] = security_configuration
        __props__["service_role"] = service_role
        __props__["step_concurrency_level"] = step_concurrency_level
        __props__["steps"] = steps
        __props__["tags"] = tags
        __props__["termination_protection"] = termination_protection
        __props__["visible_to_all_users"] = visible_to_all_users
        return Cluster(resource_name, opts=opts, __props__=__props__)

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
