com.pulumi.aws.emr.outputs.ClusterCoreInstanceGroup 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.ClusterCoreInstanceGroupEbsConfig;
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 ClusterCoreInstanceGroup {
/**
* @return String containing the [EMR Auto Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html) JSON.
*
*/
private @Nullable String autoscalingPolicy;
/**
* @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 Core 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 at least 1. Defaults to 1.
*
*/
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 ClusterCoreInstanceGroup() {}
/**
* @return String containing the [EMR Auto Scaling Policy](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html) JSON.
*
*/
public Optional autoscalingPolicy() {
return Optional.ofNullable(this.autoscalingPolicy);
}
/**
* @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 Core 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 at least 1. Defaults to 1.
*
*/
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(ClusterCoreInstanceGroup defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String autoscalingPolicy;
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(ClusterCoreInstanceGroup defaults) {
Objects.requireNonNull(defaults);
this.autoscalingPolicy = defaults.autoscalingPolicy;
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 autoscalingPolicy(@Nullable String autoscalingPolicy) {
this.autoscalingPolicy = autoscalingPolicy;
return this;
}
@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(ClusterCoreInstanceGroupEbsConfig... 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("ClusterCoreInstanceGroup", "instanceType");
}
this.instanceType = instanceType;
return this;
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
public ClusterCoreInstanceGroup build() {
final var _resultValue = new ClusterCoreInstanceGroup();
_resultValue.autoscalingPolicy = autoscalingPolicy;
_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