Package com.pulumi.aws.emr
Class InstanceFleet
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.emr.InstanceFleet
-
public class InstanceFleet extends com.pulumi.resources.CustomResourceProvides an Elastic MapReduce Cluster Instance Fleet configuration. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/emr/) for more information. > **NOTE:** At this time, Instance Fleets cannot be destroyed through the API nor web interface. Instance Fleets are destroyed when the EMR Cluster is destroyed. the provider will resize any Instance Fleet to zero when destroying the resource. ## Example Usage
## Import Using `pulumi import`, import EMR Instance Fleet using the EMR Cluster identifier and Instance Fleet identifier separated by a forward slash (`/`). For example: ```sh $ pulumi import aws:emr/instanceFleet:InstanceFleet example j-123456ABCDEF/if-15EK4O09RZLNR ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.emr.InstanceFleet; import com.pulumi.aws.emr.InstanceFleetArgs; import com.pulumi.aws.emr.inputs.InstanceFleetLaunchSpecificationsArgs; import com.pulumi.aws.emr.inputs.InstanceFleetLaunchSpecificationsSpotSpecificationArgs; import com.pulumi.aws.emr.inputs.InstanceFleetInstanceTypeConfigArgs; import com.pulumi.aws.emr.inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var task = new InstanceFleet("task", InstanceFleetArgs.builder() .launchSpecifications(InstanceFleetLaunchSpecificationsArgs.builder() .spotSpecifications(InstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder() .allocationStrategy("capacity-optimized") .blockDurationMinutes(0) .timeoutAction("TERMINATE_CLUSTER") .timeoutDurationMinutes(10) .build()) .build()) .instanceTypeConfigs( InstanceFleetInstanceTypeConfigArgs.builder() .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder() .size(100) .type("gp2") .volumesPerInstance(1) .build()) .bidPriceAsPercentageOfOnDemandPrice(100.0) .instanceType("m4.xlarge") .weightedCapacity(1) .build(), InstanceFleetInstanceTypeConfigArgs.builder() .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder() .size(100) .type("gp2") .volumesPerInstance(1) .build()) .bidPriceAsPercentageOfOnDemandPrice(100.0) .instanceType("m4.2xlarge") .weightedCapacity(2) .build()) .clusterId(cluster.id()) .name("task fleet") .targetOnDemandCapacity(1) .targetSpotCapacity(1) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description InstanceFleet(java.lang.String name)InstanceFleet(java.lang.String name, InstanceFleetArgs args)InstanceFleet(java.lang.String name, InstanceFleetArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>clusterId()static InstanceFleetget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InstanceFleetState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceFleetInstanceTypeConfig>>>instanceTypeConfigs()com.pulumi.core.Output<java.util.Optional<InstanceFleetLaunchSpecifications>>launchSpecifications()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.Integer>provisionedOnDemandCapacity()com.pulumi.core.Output<java.lang.Integer>provisionedSpotCapacity()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>targetOnDemandCapacity()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>targetSpotCapacity()
-
-
-
Constructor Detail
-
InstanceFleet
public InstanceFleet(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
InstanceFleet
public InstanceFleet(java.lang.String name, InstanceFleetArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
InstanceFleet
public InstanceFleet(java.lang.String name, InstanceFleetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
clusterId
public com.pulumi.core.Output<java.lang.String> clusterId()
- Returns:
- ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
-
instanceTypeConfigs
public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceFleetInstanceTypeConfig>>> instanceTypeConfigs()
- Returns:
- Configuration block for instance fleet
-
launchSpecifications
public com.pulumi.core.Output<java.util.Optional<InstanceFleetLaunchSpecifications>> launchSpecifications()
- Returns:
- Configuration block for launch specification
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Friendly name given to the instance fleet.
-
provisionedOnDemandCapacity
public com.pulumi.core.Output<java.lang.Integer> provisionedOnDemandCapacity()
- Returns:
- The number of On-Demand units that have been provisioned for the instance fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might be less than or greater than TargetOnDemandCapacity.
-
provisionedSpotCapacity
public com.pulumi.core.Output<java.lang.Integer> provisionedSpotCapacity()
- Returns:
- The number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity. This provisioned capacity might be less than or greater than TargetSpotCapacity.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
targetOnDemandCapacity
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> targetOnDemandCapacity()
- Returns:
- The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
-
targetSpotCapacity
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> targetSpotCapacity()
- Returns:
- The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
-
get
public static InstanceFleet get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable InstanceFleetState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-