Class ManagedScalingPolicy


  • public class ManagedScalingPolicy
    extends com.pulumi.resources.CustomResource
    Provides a Managed Scaling policy for EMR Cluster. With Amazon EMR versions 5.30.0 and later (except for Amazon EMR 6.0.0), you can enable EMR managed scaling to automatically increase or decrease the number of instances or units in your cluster based on workload. See [Using EMR Managed Scaling in Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-managed-scaling.html) for more information. ## Example Usage <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.emr.Cluster; import com.pulumi.aws.emr.ClusterArgs; import com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs; import com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs; import com.pulumi.aws.emr.ManagedScalingPolicy; import com.pulumi.aws.emr.ManagedScalingPolicyArgs; import com.pulumi.aws.emr.inputs.ManagedScalingPolicyComputeLimitArgs; import java.util.List; import java.util.ArrayList; 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 sample = new Cluster("sample", ClusterArgs.builder() .name("emr-sample-cluster") .releaseLabel("emr-5.30.0") .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder() .instanceType("m4.large") .build()) .coreInstanceGroup(ClusterCoreInstanceGroupArgs.builder() .instanceType("c4.large") .build()) .build()); var samplepolicy = new ManagedScalingPolicy("samplepolicy", ManagedScalingPolicyArgs.builder() .clusterId(sample.id()) .computeLimits(ManagedScalingPolicyComputeLimitArgs.builder() .unitType("Instances") .minimumCapacityUnits(2) .maximumCapacityUnits(10) .maximumOndemandCapacityUnits(2) .maximumCoreCapacityUnits(10) .build()) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import EMR Managed Scaling Policies using the EMR Cluster identifier. For example: ```sh $ pulumi import aws:emr/managedScalingPolicy:ManagedScalingPolicy example j-123456ABCDEF ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> clusterId()  
      com.pulumi.core.Output<java.util.List<ManagedScalingPolicyComputeLimit>> computeLimits()  
      static ManagedScalingPolicy get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ManagedScalingPolicyState 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.
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ManagedScalingPolicy

        public ManagedScalingPolicy​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ManagedScalingPolicy

        public ManagedScalingPolicy​(java.lang.String name,
                                    ManagedScalingPolicyArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ManagedScalingPolicy

        public ManagedScalingPolicy​(java.lang.String name,
                                    ManagedScalingPolicyArgs 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
      • computeLimits

        public com.pulumi.core.Output<java.util.List<ManagedScalingPolicyComputeLimit>> computeLimits()
        Returns:
        Configuration block with compute limit settings. Described below.
      • get

        public static ManagedScalingPolicy get​(java.lang.String name,
                                               com.pulumi.core.Output<java.lang.String> id,
                                               @Nullable
                                               ManagedScalingPolicyState 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.