put_managed_scaling_policy

put_managed_scaling_policy(**kwargs)

Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

See also: AWS API Documentation

Request Syntax

response = client.put_managed_scaling_policy(
    ClusterId='string',
    ManagedScalingPolicy={
        'ComputeLimits': {
            'UnitType': 'InstanceFleetUnits'|'Instances'|'VCPU',
            'MinimumCapacityUnits': 123,
            'MaximumCapacityUnits': 123,
            'MaximumOnDemandCapacityUnits': 123,
            'MaximumCoreCapacityUnits': 123
        }
    }
)
Parameters
  • ClusterId (string) --

    [REQUIRED]

    Specifies the ID of an EMR cluster where the managed scaling policy is attached.

  • ManagedScalingPolicy (dict) --

    [REQUIRED]

    Specifies the constraints for the managed scaling policy.

    • ComputeLimits (dict) --

      The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

      • UnitType (string) -- [REQUIRED]

        The unit type used for specifying a managed scaling policy.

      • MinimumCapacityUnits (integer) -- [REQUIRED]

        The lower boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

      • MaximumCapacityUnits (integer) -- [REQUIRED]

        The upper boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

      • MaximumOnDemandCapacityUnits (integer) --

        The upper boundary of On-Demand EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances.

      • MaximumCoreCapacityUnits (integer) --

        The upper boundary of EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --