// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Input to the <code>RunJobFlow</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RunJobFlowInput {
/// <p>The name of the job flow.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
pub log_uri: ::std::option::Option<::std::string::String>,
/// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
pub log_encryption_kms_key_id: ::std::option::Option<::std::string::String>,
/// <p>A JSON string for selecting additional features.</p>
pub additional_info: ::std::option::Option<::std::string::String>,
/// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
pub ami_version: ::std::option::Option<::std::string::String>,
/// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
pub release_label: ::std::option::Option<::std::string::String>,
/// <p>A specification of the number and type of Amazon EC2 instances.</p>
pub instances: ::std::option::Option<crate::types::JobFlowInstancesConfig>,
/// <p>A list of steps to run.</p>
pub steps: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>,
/// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
/// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
/// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
pub step_execution_role_arn: ::std::option::Option<::std::string::String>,
/// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
pub bootstrap_actions: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>,
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
/// </ul>
pub supported_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
/// <li>
/// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
/// <li>
/// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
/// <li>
/// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
/// <li>
/// <p>"hue"- launch the cluster with Hue installed.</p></li>
/// <li>
/// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
/// <li>
/// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
/// </ul>
pub new_supported_products: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>,
/// <p>Applies to Amazon EMR releases 4.0 and later. 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 <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
pub applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
/// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
/// <important>
/// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
/// </important>
/// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
/// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub visible_to_all_users: ::std::option::Option<bool>,
/// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
pub job_flow_role: ::std::option::Option<::std::string::String>,
/// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
pub service_role: ::std::option::Option<::std::string::String>,
/// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The name of a security configuration to apply to the cluster.</p>
pub security_configuration: ::std::option::Option<::std::string::String>,
/// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
pub auto_scaling_role: ::std::option::Option<::std::string::String>,
/// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
pub scale_down_behavior: ::std::option::Option<crate::types::ScaleDownBehavior>,
/// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
/// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
pub custom_ami_id: ::std::option::Option<::std::string::String>,
/// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
pub ebs_root_volume_size: ::std::option::Option<i32>,
/// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
pub repo_upgrade_on_boot: ::std::option::Option<crate::types::RepoUpgradeOnBoot>,
/// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub kerberos_attributes: ::std::option::Option<crate::types::KerberosAttributes>,
/// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
pub step_concurrency_level: ::std::option::Option<i32>,
/// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
pub managed_scaling_policy: ::std::option::Option<crate::types::ManagedScalingPolicy>,
/// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
pub placement_group_configs: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
/// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
pub auto_termination_policy: ::std::option::Option<crate::types::AutoTerminationPolicy>,
/// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
pub os_release_label: ::std::option::Option<::std::string::String>,
/// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub ebs_root_volume_iops: ::std::option::Option<i32>,
/// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub ebs_root_volume_throughput: ::std::option::Option<i32>,
/// <p>Reserved.</p>
pub extended_support: ::std::option::Option<bool>,
/// <p>Contains CloudWatch log configuration metadata and settings.</p>
pub monitoring_configuration: ::std::option::Option<crate::types::MonitoringConfiguration>,
/// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
pub session_enabled: ::std::option::Option<bool>,
}
impl RunJobFlowInput {
/// <p>The name of the job flow.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
pub fn log_uri(&self) -> ::std::option::Option<&str> {
self.log_uri.as_deref()
}
/// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
pub fn log_encryption_kms_key_id(&self) -> ::std::option::Option<&str> {
self.log_encryption_kms_key_id.as_deref()
}
/// <p>A JSON string for selecting additional features.</p>
pub fn additional_info(&self) -> ::std::option::Option<&str> {
self.additional_info.as_deref()
}
/// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
pub fn ami_version(&self) -> ::std::option::Option<&str> {
self.ami_version.as_deref()
}
/// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
pub fn release_label(&self) -> ::std::option::Option<&str> {
self.release_label.as_deref()
}
/// <p>A specification of the number and type of Amazon EC2 instances.</p>
pub fn instances(&self) -> ::std::option::Option<&crate::types::JobFlowInstancesConfig> {
self.instances.as_ref()
}
/// <p>A list of steps to run.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.steps.is_none()`.
pub fn steps(&self) -> &[crate::types::StepConfig] {
self.steps.as_deref().unwrap_or_default()
}
/// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
/// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
/// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
pub fn step_execution_role_arn(&self) -> ::std::option::Option<&str> {
self.step_execution_role_arn.as_deref()
}
/// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.bootstrap_actions.is_none()`.
pub fn bootstrap_actions(&self) -> &[crate::types::BootstrapActionConfig] {
self.bootstrap_actions.as_deref().unwrap_or_default()
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_products.is_none()`.
pub fn supported_products(&self) -> &[::std::string::String] {
self.supported_products.as_deref().unwrap_or_default()
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
/// <li>
/// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
/// <li>
/// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
/// <li>
/// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
/// <li>
/// <p>"hue"- launch the cluster with Hue installed.</p></li>
/// <li>
/// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
/// <li>
/// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.new_supported_products.is_none()`.
pub fn new_supported_products(&self) -> &[crate::types::SupportedProductConfig] {
self.new_supported_products.as_deref().unwrap_or_default()
}
/// <p>Applies to Amazon EMR releases 4.0 and later. 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 <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.applications.is_none()`.
pub fn applications(&self) -> &[crate::types::Application] {
self.applications.as_deref().unwrap_or_default()
}
/// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.configurations.is_none()`.
pub fn configurations(&self) -> &[crate::types::Configuration] {
self.configurations.as_deref().unwrap_or_default()
}
/// <important>
/// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
/// </important>
/// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
/// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn visible_to_all_users(&self) -> ::std::option::Option<bool> {
self.visible_to_all_users
}
/// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
pub fn job_flow_role(&self) -> ::std::option::Option<&str> {
self.job_flow_role.as_deref()
}
/// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
pub fn service_role(&self) -> ::std::option::Option<&str> {
self.service_role.as_deref()
}
/// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The name of a security configuration to apply to the cluster.</p>
pub fn security_configuration(&self) -> ::std::option::Option<&str> {
self.security_configuration.as_deref()
}
/// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
pub fn auto_scaling_role(&self) -> ::std::option::Option<&str> {
self.auto_scaling_role.as_deref()
}
/// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
pub fn scale_down_behavior(&self) -> ::std::option::Option<&crate::types::ScaleDownBehavior> {
self.scale_down_behavior.as_ref()
}
/// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
/// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
pub fn custom_ami_id(&self) -> ::std::option::Option<&str> {
self.custom_ami_id.as_deref()
}
/// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
pub fn ebs_root_volume_size(&self) -> ::std::option::Option<i32> {
self.ebs_root_volume_size
}
/// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
pub fn repo_upgrade_on_boot(&self) -> ::std::option::Option<&crate::types::RepoUpgradeOnBoot> {
self.repo_upgrade_on_boot.as_ref()
}
/// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn kerberos_attributes(&self) -> ::std::option::Option<&crate::types::KerberosAttributes> {
self.kerberos_attributes.as_ref()
}
/// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
pub fn step_concurrency_level(&self) -> ::std::option::Option<i32> {
self.step_concurrency_level
}
/// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
pub fn managed_scaling_policy(&self) -> ::std::option::Option<&crate::types::ManagedScalingPolicy> {
self.managed_scaling_policy.as_ref()
}
/// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_group_configs.is_none()`.
pub fn placement_group_configs(&self) -> &[crate::types::PlacementGroupConfig] {
self.placement_group_configs.as_deref().unwrap_or_default()
}
/// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
pub fn auto_termination_policy(&self) -> ::std::option::Option<&crate::types::AutoTerminationPolicy> {
self.auto_termination_policy.as_ref()
}
/// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
pub fn os_release_label(&self) -> ::std::option::Option<&str> {
self.os_release_label.as_deref()
}
/// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn ebs_root_volume_iops(&self) -> ::std::option::Option<i32> {
self.ebs_root_volume_iops
}
/// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn ebs_root_volume_throughput(&self) -> ::std::option::Option<i32> {
self.ebs_root_volume_throughput
}
/// <p>Reserved.</p>
pub fn extended_support(&self) -> ::std::option::Option<bool> {
self.extended_support
}
/// <p>Contains CloudWatch log configuration metadata and settings.</p>
pub fn monitoring_configuration(&self) -> ::std::option::Option<&crate::types::MonitoringConfiguration> {
self.monitoring_configuration.as_ref()
}
/// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
pub fn session_enabled(&self) -> ::std::option::Option<bool> {
self.session_enabled
}
}
impl RunJobFlowInput {
/// Creates a new builder-style object to manufacture [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
pub fn builder() -> crate::operation::run_job_flow::builders::RunJobFlowInputBuilder {
crate::operation::run_job_flow::builders::RunJobFlowInputBuilder::default()
}
}
/// A builder for [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RunJobFlowInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) log_uri: ::std::option::Option<::std::string::String>,
pub(crate) log_encryption_kms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) additional_info: ::std::option::Option<::std::string::String>,
pub(crate) ami_version: ::std::option::Option<::std::string::String>,
pub(crate) release_label: ::std::option::Option<::std::string::String>,
pub(crate) instances: ::std::option::Option<crate::types::JobFlowInstancesConfig>,
pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>,
pub(crate) step_execution_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) bootstrap_actions: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>,
pub(crate) supported_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) new_supported_products: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>,
pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
pub(crate) visible_to_all_users: ::std::option::Option<bool>,
pub(crate) job_flow_role: ::std::option::Option<::std::string::String>,
pub(crate) service_role: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
pub(crate) auto_scaling_role: ::std::option::Option<::std::string::String>,
pub(crate) scale_down_behavior: ::std::option::Option<crate::types::ScaleDownBehavior>,
pub(crate) custom_ami_id: ::std::option::Option<::std::string::String>,
pub(crate) ebs_root_volume_size: ::std::option::Option<i32>,
pub(crate) repo_upgrade_on_boot: ::std::option::Option<crate::types::RepoUpgradeOnBoot>,
pub(crate) kerberos_attributes: ::std::option::Option<crate::types::KerberosAttributes>,
pub(crate) step_concurrency_level: ::std::option::Option<i32>,
pub(crate) managed_scaling_policy: ::std::option::Option<crate::types::ManagedScalingPolicy>,
pub(crate) placement_group_configs: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
pub(crate) auto_termination_policy: ::std::option::Option<crate::types::AutoTerminationPolicy>,
pub(crate) os_release_label: ::std::option::Option<::std::string::String>,
pub(crate) ebs_root_volume_iops: ::std::option::Option<i32>,
pub(crate) ebs_root_volume_throughput: ::std::option::Option<i32>,
pub(crate) extended_support: ::std::option::Option<bool>,
pub(crate) monitoring_configuration: ::std::option::Option<crate::types::MonitoringConfiguration>,
pub(crate) session_enabled: ::std::option::Option<bool>,
}
impl RunJobFlowInputBuilder {
/// <p>The name of the job flow.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the job flow.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the job flow.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
pub fn log_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.log_uri = ::std::option::Option::Some(input.into());
self
}
/// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
pub fn set_log_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.log_uri = input;
self
}
/// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
pub fn get_log_uri(&self) -> &::std::option::Option<::std::string::String> {
&self.log_uri
}
/// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
pub fn log_encryption_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.log_encryption_kms_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
pub fn set_log_encryption_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.log_encryption_kms_key_id = input;
self
}
/// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
pub fn get_log_encryption_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.log_encryption_kms_key_id
}
/// <p>A JSON string for selecting additional features.</p>
pub fn additional_info(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.additional_info = ::std::option::Option::Some(input.into());
self
}
/// <p>A JSON string for selecting additional features.</p>
pub fn set_additional_info(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.additional_info = input;
self
}
/// <p>A JSON string for selecting additional features.</p>
pub fn get_additional_info(&self) -> &::std::option::Option<::std::string::String> {
&self.additional_info
}
/// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
pub fn ami_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ami_version = ::std::option::Option::Some(input.into());
self
}
/// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
pub fn set_ami_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ami_version = input;
self
}
/// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
pub fn get_ami_version(&self) -> &::std::option::Option<::std::string::String> {
&self.ami_version
}
/// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
pub fn release_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.release_label = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
pub fn set_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.release_label = input;
self
}
/// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
pub fn get_release_label(&self) -> &::std::option::Option<::std::string::String> {
&self.release_label
}
/// <p>A specification of the number and type of Amazon EC2 instances.</p>
/// This field is required.
pub fn instances(mut self, input: crate::types::JobFlowInstancesConfig) -> Self {
self.instances = ::std::option::Option::Some(input);
self
}
/// <p>A specification of the number and type of Amazon EC2 instances.</p>
pub fn set_instances(mut self, input: ::std::option::Option<crate::types::JobFlowInstancesConfig>) -> Self {
self.instances = input;
self
}
/// <p>A specification of the number and type of Amazon EC2 instances.</p>
pub fn get_instances(&self) -> &::std::option::Option<crate::types::JobFlowInstancesConfig> {
&self.instances
}
/// Appends an item to `steps`.
///
/// To override the contents of this collection use [`set_steps`](Self::set_steps).
///
/// <p>A list of steps to run.</p>
pub fn steps(mut self, input: crate::types::StepConfig) -> Self {
let mut v = self.steps.unwrap_or_default();
v.push(input);
self.steps = ::std::option::Option::Some(v);
self
}
/// <p>A list of steps to run.</p>
pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>) -> Self {
self.steps = input;
self
}
/// <p>A list of steps to run.</p>
pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepConfig>> {
&self.steps
}
/// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
/// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
/// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
pub fn step_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.step_execution_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
/// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
/// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
pub fn set_step_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.step_execution_role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
/// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
/// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
pub fn get_step_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.step_execution_role_arn
}
/// Appends an item to `bootstrap_actions`.
///
/// To override the contents of this collection use [`set_bootstrap_actions`](Self::set_bootstrap_actions).
///
/// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
pub fn bootstrap_actions(mut self, input: crate::types::BootstrapActionConfig) -> Self {
let mut v = self.bootstrap_actions.unwrap_or_default();
v.push(input);
self.bootstrap_actions = ::std::option::Option::Some(v);
self
}
/// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
pub fn set_bootstrap_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>) -> Self {
self.bootstrap_actions = input;
self
}
/// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
pub fn get_bootstrap_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>> {
&self.bootstrap_actions
}
/// Appends an item to `supported_products`.
///
/// To override the contents of this collection use [`set_supported_products`](Self::set_supported_products).
///
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
/// </ul>
pub fn supported_products(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.supported_products.unwrap_or_default();
v.push(input.into());
self.supported_products = ::std::option::Option::Some(v);
self
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
/// </ul>
pub fn set_supported_products(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.supported_products = input;
self
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
/// </ul>
pub fn get_supported_products(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.supported_products
}
/// Appends an item to `new_supported_products`.
///
/// To override the contents of this collection use [`set_new_supported_products`](Self::set_new_supported_products).
///
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
/// <li>
/// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
/// <li>
/// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
/// <li>
/// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
/// <li>
/// <p>"hue"- launch the cluster with Hue installed.</p></li>
/// <li>
/// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
/// <li>
/// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
/// </ul>
pub fn new_supported_products(mut self, input: crate::types::SupportedProductConfig) -> Self {
let mut v = self.new_supported_products.unwrap_or_default();
v.push(input);
self.new_supported_products = ::std::option::Option::Some(v);
self
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
/// <li>
/// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
/// <li>
/// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
/// <li>
/// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
/// <li>
/// <p>"hue"- launch the cluster with Hue installed.</p></li>
/// <li>
/// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
/// <li>
/// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
/// </ul>
pub fn set_new_supported_products(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>) -> Self {
self.new_supported_products = input;
self
}
/// <note>
/// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
/// </note>
/// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
/// <ul>
/// <li>
/// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
/// <li>
/// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
/// <li>
/// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
/// <li>
/// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
/// <li>
/// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
/// <li>
/// <p>"hue"- launch the cluster with Hue installed.</p></li>
/// <li>
/// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
/// <li>
/// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
/// </ul>
pub fn get_new_supported_products(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>> {
&self.new_supported_products
}
/// Appends an item to `applications`.
///
/// To override the contents of this collection use [`set_applications`](Self::set_applications).
///
/// <p>Applies to Amazon EMR releases 4.0 and later. 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 <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
pub fn applications(mut self, input: crate::types::Application) -> Self {
let mut v = self.applications.unwrap_or_default();
v.push(input);
self.applications = ::std::option::Option::Some(v);
self
}
/// <p>Applies to Amazon EMR releases 4.0 and later. 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 <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
self.applications = input;
self
}
/// <p>Applies to Amazon EMR releases 4.0 and later. 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 <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
&self.applications
}
/// Appends an item to `configurations`.
///
/// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
///
/// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
pub fn configurations(mut self, input: crate::types::Configuration) -> Self {
let mut v = self.configurations.unwrap_or_default();
v.push(input);
self.configurations = ::std::option::Option::Some(v);
self
}
/// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
self.configurations = input;
self
}
/// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
&self.configurations
}
/// <important>
/// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
/// </important>
/// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
/// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn visible_to_all_users(mut self, input: bool) -> Self {
self.visible_to_all_users = ::std::option::Option::Some(input);
self
}
/// <important>
/// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
/// </important>
/// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
/// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn set_visible_to_all_users(mut self, input: ::std::option::Option<bool>) -> Self {
self.visible_to_all_users = input;
self
}
/// <important>
/// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
/// </important>
/// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
/// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn get_visible_to_all_users(&self) -> &::std::option::Option<bool> {
&self.visible_to_all_users
}
/// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
pub fn job_flow_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_flow_role = ::std::option::Option::Some(input.into());
self
}
/// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
pub fn set_job_flow_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_flow_role = input;
self
}
/// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
pub fn get_job_flow_role(&self) -> &::std::option::Option<::std::string::String> {
&self.job_flow_role
}
/// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service_role = ::std::option::Option::Some(input.into());
self
}
/// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service_role = input;
self
}
/// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
&self.service_role
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The name of a security configuration to apply to the cluster.</p>
pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_configuration = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of a security configuration to apply to the cluster.</p>
pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_configuration = input;
self
}
/// <p>The name of a security configuration to apply to the cluster.</p>
pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
&self.security_configuration
}
/// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
pub fn auto_scaling_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.auto_scaling_role = ::std::option::Option::Some(input.into());
self
}
/// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
pub fn set_auto_scaling_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.auto_scaling_role = input;
self
}
/// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
pub fn get_auto_scaling_role(&self) -> &::std::option::Option<::std::string::String> {
&self.auto_scaling_role
}
/// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
pub fn scale_down_behavior(mut self, input: crate::types::ScaleDownBehavior) -> Self {
self.scale_down_behavior = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
pub fn set_scale_down_behavior(mut self, input: ::std::option::Option<crate::types::ScaleDownBehavior>) -> Self {
self.scale_down_behavior = input;
self
}
/// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
pub fn get_scale_down_behavior(&self) -> &::std::option::Option<crate::types::ScaleDownBehavior> {
&self.scale_down_behavior
}
/// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
/// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
pub fn custom_ami_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.custom_ami_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
/// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
pub fn set_custom_ami_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.custom_ami_id = input;
self
}
/// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
/// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
pub fn get_custom_ami_id(&self) -> &::std::option::Option<::std::string::String> {
&self.custom_ami_id
}
/// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
pub fn ebs_root_volume_size(mut self, input: i32) -> Self {
self.ebs_root_volume_size = ::std::option::Option::Some(input);
self
}
/// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
pub fn set_ebs_root_volume_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.ebs_root_volume_size = input;
self
}
/// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
pub fn get_ebs_root_volume_size(&self) -> &::std::option::Option<i32> {
&self.ebs_root_volume_size
}
/// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
pub fn repo_upgrade_on_boot(mut self, input: crate::types::RepoUpgradeOnBoot) -> Self {
self.repo_upgrade_on_boot = ::std::option::Option::Some(input);
self
}
/// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
pub fn set_repo_upgrade_on_boot(mut self, input: ::std::option::Option<crate::types::RepoUpgradeOnBoot>) -> Self {
self.repo_upgrade_on_boot = input;
self
}
/// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
pub fn get_repo_upgrade_on_boot(&self) -> &::std::option::Option<crate::types::RepoUpgradeOnBoot> {
&self.repo_upgrade_on_boot
}
/// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn kerberos_attributes(mut self, input: crate::types::KerberosAttributes) -> Self {
self.kerberos_attributes = ::std::option::Option::Some(input);
self
}
/// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn set_kerberos_attributes(mut self, input: ::std::option::Option<crate::types::KerberosAttributes>) -> Self {
self.kerberos_attributes = input;
self
}
/// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
pub fn get_kerberos_attributes(&self) -> &::std::option::Option<crate::types::KerberosAttributes> {
&self.kerberos_attributes
}
/// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
pub fn step_concurrency_level(mut self, input: i32) -> Self {
self.step_concurrency_level = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
pub fn set_step_concurrency_level(mut self, input: ::std::option::Option<i32>) -> Self {
self.step_concurrency_level = input;
self
}
/// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
pub fn get_step_concurrency_level(&self) -> &::std::option::Option<i32> {
&self.step_concurrency_level
}
/// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
pub fn managed_scaling_policy(mut self, input: crate::types::ManagedScalingPolicy) -> Self {
self.managed_scaling_policy = ::std::option::Option::Some(input);
self
}
/// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
pub fn set_managed_scaling_policy(mut self, input: ::std::option::Option<crate::types::ManagedScalingPolicy>) -> Self {
self.managed_scaling_policy = input;
self
}
/// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
pub fn get_managed_scaling_policy(&self) -> &::std::option::Option<crate::types::ManagedScalingPolicy> {
&self.managed_scaling_policy
}
/// Appends an item to `placement_group_configs`.
///
/// To override the contents of this collection use [`set_placement_group_configs`](Self::set_placement_group_configs).
///
/// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
pub fn placement_group_configs(mut self, input: crate::types::PlacementGroupConfig) -> Self {
let mut v = self.placement_group_configs.unwrap_or_default();
v.push(input);
self.placement_group_configs = ::std::option::Option::Some(v);
self
}
/// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
pub fn set_placement_group_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>) -> Self {
self.placement_group_configs = input;
self
}
/// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
pub fn get_placement_group_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>> {
&self.placement_group_configs
}
/// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
pub fn auto_termination_policy(mut self, input: crate::types::AutoTerminationPolicy) -> Self {
self.auto_termination_policy = ::std::option::Option::Some(input);
self
}
/// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
pub fn set_auto_termination_policy(mut self, input: ::std::option::Option<crate::types::AutoTerminationPolicy>) -> Self {
self.auto_termination_policy = input;
self
}
/// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
pub fn get_auto_termination_policy(&self) -> &::std::option::Option<crate::types::AutoTerminationPolicy> {
&self.auto_termination_policy
}
/// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
pub fn os_release_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.os_release_label = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
pub fn set_os_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.os_release_label = input;
self
}
/// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
pub fn get_os_release_label(&self) -> &::std::option::Option<::std::string::String> {
&self.os_release_label
}
/// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn ebs_root_volume_iops(mut self, input: i32) -> Self {
self.ebs_root_volume_iops = ::std::option::Option::Some(input);
self
}
/// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn set_ebs_root_volume_iops(mut self, input: ::std::option::Option<i32>) -> Self {
self.ebs_root_volume_iops = input;
self
}
/// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn get_ebs_root_volume_iops(&self) -> &::std::option::Option<i32> {
&self.ebs_root_volume_iops
}
/// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn ebs_root_volume_throughput(mut self, input: i32) -> Self {
self.ebs_root_volume_throughput = ::std::option::Option::Some(input);
self
}
/// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn set_ebs_root_volume_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
self.ebs_root_volume_throughput = input;
self
}
/// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
pub fn get_ebs_root_volume_throughput(&self) -> &::std::option::Option<i32> {
&self.ebs_root_volume_throughput
}
/// <p>Reserved.</p>
pub fn extended_support(mut self, input: bool) -> Self {
self.extended_support = ::std::option::Option::Some(input);
self
}
/// <p>Reserved.</p>
pub fn set_extended_support(mut self, input: ::std::option::Option<bool>) -> Self {
self.extended_support = input;
self
}
/// <p>Reserved.</p>
pub fn get_extended_support(&self) -> &::std::option::Option<bool> {
&self.extended_support
}
/// <p>Contains CloudWatch log configuration metadata and settings.</p>
pub fn monitoring_configuration(mut self, input: crate::types::MonitoringConfiguration) -> Self {
self.monitoring_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Contains CloudWatch log configuration metadata and settings.</p>
pub fn set_monitoring_configuration(mut self, input: ::std::option::Option<crate::types::MonitoringConfiguration>) -> Self {
self.monitoring_configuration = input;
self
}
/// <p>Contains CloudWatch log configuration metadata and settings.</p>
pub fn get_monitoring_configuration(&self) -> &::std::option::Option<crate::types::MonitoringConfiguration> {
&self.monitoring_configuration
}
/// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
pub fn session_enabled(mut self, input: bool) -> Self {
self.session_enabled = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
pub fn set_session_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.session_enabled = input;
self
}
/// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
pub fn get_session_enabled(&self) -> &::std::option::Option<bool> {
&self.session_enabled
}
/// Consumes the builder and constructs a [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
pub fn build(self) -> ::std::result::Result<crate::operation::run_job_flow::RunJobFlowInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::run_job_flow::RunJobFlowInput {
name: self.name,
log_uri: self.log_uri,
log_encryption_kms_key_id: self.log_encryption_kms_key_id,
additional_info: self.additional_info,
ami_version: self.ami_version,
release_label: self.release_label,
instances: self.instances,
steps: self.steps,
step_execution_role_arn: self.step_execution_role_arn,
bootstrap_actions: self.bootstrap_actions,
supported_products: self.supported_products,
new_supported_products: self.new_supported_products,
applications: self.applications,
configurations: self.configurations,
visible_to_all_users: self.visible_to_all_users,
job_flow_role: self.job_flow_role,
service_role: self.service_role,
tags: self.tags,
security_configuration: self.security_configuration,
auto_scaling_role: self.auto_scaling_role,
scale_down_behavior: self.scale_down_behavior,
custom_ami_id: self.custom_ami_id,
ebs_root_volume_size: self.ebs_root_volume_size,
repo_upgrade_on_boot: self.repo_upgrade_on_boot,
kerberos_attributes: self.kerberos_attributes,
step_concurrency_level: self.step_concurrency_level,
managed_scaling_policy: self.managed_scaling_policy,
placement_group_configs: self.placement_group_configs,
auto_termination_policy: self.auto_termination_policy,
os_release_label: self.os_release_label,
ebs_root_volume_iops: self.ebs_root_volume_iops,
ebs_root_volume_throughput: self.ebs_root_volume_throughput,
extended_support: self.extended_support,
monitoring_configuration: self.monitoring_configuration,
session_enabled: self.session_enabled,
})
}
}