EMR / Client / modify_instance_fleet

modify_instance_fleet#

EMR.Client.modify_instance_fleet(**kwargs)#

Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.

Note

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and higher, excluding 5.0.x versions.

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_fleet(
    ClusterId='string',
    InstanceFleet={
        'InstanceFleetId': 'string',
        'TargetOnDemandCapacity': 123,
        'TargetSpotCapacity': 123,
        'ResizeSpecifications': {
            'SpotResizeSpecification': {
                'TimeoutDurationMinutes': 123
            },
            'OnDemandResizeSpecification': {
                'TimeoutDurationMinutes': 123
            }
        }
    }
)
Parameters:
  • ClusterId (string) –

    [REQUIRED]

    The unique identifier of the cluster.

  • InstanceFleet (dict) –

    [REQUIRED]

    The configuration parameters of the instance fleet.

    • InstanceFleetId (string) – [REQUIRED]

      A unique identifier for the instance fleet.

    • TargetOnDemandCapacity (integer) –

      The target capacity of On-Demand units for the instance fleet. For more information see InstanceFleetConfig$TargetOnDemandCapacity.

    • TargetSpotCapacity (integer) –

      The target capacity of Spot units for the instance fleet. For more information, see InstanceFleetConfig$TargetSpotCapacity.

    • ResizeSpecifications (dict) –

      The resize specification for the instance fleet.

      • SpotResizeSpecification (dict) –

        The resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.

        • TimeoutDurationMinutes (integer) – [REQUIRED]

          Spot resize timeout in minutes. If Spot Instances are not provisioned within this time, the resize workflow will stop provisioning of Spot instances. Minimum value is 5 minutes and maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

      • OnDemandResizeSpecification (dict) –

        The resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.

        • TimeoutDurationMinutes (integer) – [REQUIRED]

          On-Demand resize timeout in minutes. If On-Demand Instances are not provisioned within this time, the resize workflow stops. The minimum value is 5 minutes, and the maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

Returns:

None

Exceptions

  • EMR.Client.exceptions.InternalServerException

  • EMR.Client.exceptions.InvalidRequestException