
com.pulumi.aws.emr.outputs.ClusterMasterInstanceGroup Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.emr.outputs;
import com.pulumi.aws.emr.outputs.ClusterMasterInstanceGroupEbsConfig;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ClusterMasterInstanceGroup {
/**
* @return 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.
*
*/
private @Nullable String bidPrice;
/**
* @return Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
*
*/
private @Nullable List ebsConfigs;
/**
* @return Master node type Instance Group ID, if using Instance Group for this node type.
*
*/
private @Nullable String id;
/**
* @return 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.
*
*/
private @Nullable Integer instanceCount;
/**
* @return EC2 instance type for all instances in the instance group.
*
*/
private String instanceType;
/**
* @return Friendly name given to the instance group.
*
*/
private @Nullable String name;
private ClusterMasterInstanceGroup() {}
/**
* @return 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.
*
*/
public Optional bidPrice() {
return Optional.ofNullable(this.bidPrice);
}
/**
* @return Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
*
*/
public List ebsConfigs() {
return this.ebsConfigs == null ? List.of() : this.ebsConfigs;
}
/**
* @return Master node type Instance Group ID, if using Instance Group for this node type.
*
*/
public Optional id() {
return Optional.ofNullable(this.id);
}
/**
* @return 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.
*
*/
public Optional instanceCount() {
return Optional.ofNullable(this.instanceCount);
}
/**
* @return EC2 instance type for all instances in the instance group.
*
*/
public String instanceType() {
return this.instanceType;
}
/**
* @return Friendly name given to the instance group.
*
*/
public Optional name() {
return Optional.ofNullable(this.name);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ClusterMasterInstanceGroup defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String bidPrice;
private @Nullable List ebsConfigs;
private @Nullable String id;
private @Nullable Integer instanceCount;
private String instanceType;
private @Nullable String name;
public Builder() {}
public Builder(ClusterMasterInstanceGroup defaults) {
Objects.requireNonNull(defaults);
this.bidPrice = defaults.bidPrice;
this.ebsConfigs = defaults.ebsConfigs;
this.id = defaults.id;
this.instanceCount = defaults.instanceCount;
this.instanceType = defaults.instanceType;
this.name = defaults.name;
}
@CustomType.Setter
public Builder bidPrice(@Nullable String bidPrice) {
this.bidPrice = bidPrice;
return this;
}
@CustomType.Setter
public Builder ebsConfigs(@Nullable List ebsConfigs) {
this.ebsConfigs = ebsConfigs;
return this;
}
public Builder ebsConfigs(ClusterMasterInstanceGroupEbsConfig... ebsConfigs) {
return ebsConfigs(List.of(ebsConfigs));
}
@CustomType.Setter
public Builder id(@Nullable String id) {
this.id = id;
return this;
}
@CustomType.Setter
public Builder instanceCount(@Nullable Integer instanceCount) {
this.instanceCount = instanceCount;
return this;
}
@CustomType.Setter
public Builder instanceType(String instanceType) {
if (instanceType == null) {
throw new MissingRequiredPropertyException("ClusterMasterInstanceGroup", "instanceType");
}
this.instanceType = instanceType;
return this;
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
public ClusterMasterInstanceGroup build() {
final var _resultValue = new ClusterMasterInstanceGroup();
_resultValue.bidPrice = bidPrice;
_resultValue.ebsConfigs = ebsConfigs;
_resultValue.id = id;
_resultValue.instanceCount = instanceCount;
_resultValue.instanceType = instanceType;
_resultValue.name = name;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy