Skip to content

modify_cluster

modify_cluster(
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    cluster_id: Optional[String] = None,
    step_concurrency_level: Optional[Integer] = None,
    extended_support: Optional[BooleanObject] = None,
) -> ModifyClusterOutput

Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.

Parameters:

  • cluster_id (Optional[String], default: None ) –

    The unique identifier of the cluster.

  • step_concurrency_level (Optional[Integer], default: None ) –

    The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the ActionOnFailure setting may not behave as expected. For more information see Step$ActionOnFailure.

  • extended_support (Optional[BooleanObject], default: None ) –

    Reserved.

Raises:

  • InternalServerError –

    Indicates that an error occurred while processing the request and that the request was not completed.

  • InvalidRequestException –

    This exception occurs when there is something wrong with user input.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_emr/_services/emr.py
def modify_cluster(
    self,
    *,
    config_overrides: Optional[EMRClientConfig] = None,
    cluster_id: Optional["capo_emr.types.string.String"] = None,
    step_concurrency_level: Optional["capo_emr.types.integer.Integer"] = None,
    extended_support: Optional[
        "capo_emr.types.boolean_object.BooleanObject"
    ] = None,
) -> "capo_emr.types.modify_cluster_output.ModifyClusterOutput":
    """<p>Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.</p>

    Args:
        cluster_id: <p>The unique identifier of the cluster.</p>
        step_concurrency_level: <p>The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the <code>ActionOnFailure</code> setting may not behave as expected. For more information see <a>Step$ActionOnFailure</a>.</p>
        extended_support: <p>Reserved.</p>

    Raises:
        capo_emr.errors.internal_server_error.InternalServerError: <p>Indicates that an error occurred while processing the request and that the request was not completed.</p>
        capo_emr.errors.invalid_request_exception.InvalidRequestException: <p>This exception occurs when there is something wrong with user input.</p>
        capo_emr.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_emr.types.modify_cluster_input.ModifyClusterInput]",
    ) -> OperationResponse[
        "capo_emr.types.modify_cluster_output.ModifyClusterOutput"
    ]:
        import capo_emr._operations.elastic_map_reduce.modify_cluster

        output, http_response = (
            capo_emr._operations.elastic_map_reduce.modify_cluster.modify_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyCluster")
    )
    input_: capo_emr.types.modify_cluster_input.ModifyClusterInput = {}
    if cluster_id is not None:
        input_["cluster_id"] = cluster_id
    if step_concurrency_level is not None:
        input_["step_concurrency_level"] = step_concurrency_level
    if extended_support is not None:
        input_["extended_support"] = extended_support

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output