EMR / Client / modify_instance_groups

modify_instance_groups#

EMR.Client.modify_instance_groups(**kwargs)#

ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_groups(
    ClusterId='string',
    InstanceGroups=[
        {
            'InstanceGroupId': 'string',
            'InstanceCount': 123,
            'EC2InstanceIdsToTerminate': [
                'string',
            ],
            'ShrinkPolicy': {
                'DecommissionTimeout': 123,
                'InstanceResizePolicy': {
                    'InstancesToTerminate': [
                        'string',
                    ],
                    'InstancesToProtect': [
                        'string',
                    ],
                    'InstanceTerminationTimeout': 123
                }
            },
            'ReconfigurationType': 'OVERWRITE'|'MERGE',
            'Configurations': [
                {
                    'Classification': 'string',
                    'Configurations': {'... recursive ...'},
                    'Properties': {
                        'string': 'string'
                    }
                },
            ]
        },
    ]
)
Parameters:
  • ClusterId (string) – The ID of the cluster to which the instance group belongs.

  • InstanceGroups (list) –

    Instance groups to change.

    • (dict) –

      Modify the size or configurations of an instance group.

      • InstanceGroupId (string) – [REQUIRED]

        Unique ID of the instance group to modify.

      • InstanceCount (integer) –

        Target size for the instance group.

      • EC2InstanceIdsToTerminate (list) –

        The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to its original requested size.

        • (string) –

      • ShrinkPolicy (dict) –

        Policy for customizing shrink operations.

        • DecommissionTimeout (integer) –

          The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.

        • InstanceResizePolicy (dict) –

          Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.

          • InstancesToTerminate (list) –

            Specific list of instances to be terminated when shrinking an instance group.

            • (string) –

          • InstancesToProtect (list) –

            Specific list of instances to be protected when shrinking an instance group.

            • (string) –

          • InstanceTerminationTimeout (integer) –

            Decommissioning timeout override for the specific list of instances to be terminated.

      • ReconfigurationType (string) –

        Type of reconfiguration requested. Valid values are MERGE and OVERWRITE.

      • Configurations (list) –

        A list of new or modified configurations to apply for an instance group.

        • (dict) –

          Note

          Amazon EMR releases 4.x or higher.

          An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications.

          • Classification (string) –

            The classification within a configuration.

          • Configurations (list) –

            A list of additional configurations to apply within a configuration object.

          • Properties (dict) –

            A set of properties specified within a configuration classification.

            • (string) –

              • (string) –

Returns:

None

Exceptions

  • EMR.Client.exceptions.InternalServerError