class_docstr: EMR step for workflow.
class_docstr_tok: ["EMR","step","for","workflow","."]
docstr: Validates user provided cluster_config.
  
  Args:
      cluster_config(Union[Dict[str, Any], List[Dict[str, Any]]]):
          user provided cluster configuration.
      step_name: The name of the EMR step.
docstr_tok: ["Validates","user","provided","cluster_config",".","Args",":","cluster_config","(","Union","[","Dict","[","str",",","Any","]",",","List","[","Dict","[","str",",","Any","]","]","]",")",":","user","provided","cluster","configuration",".","step_name",":","The","name","of","the","EMR","step","."]
code: def _validate_cluster_config(self, cluster_config, step_name):
      """Validates user provided cluster_config.
  
      Args:
          cluster_config(Union[Dict[str, Any], List[Dict[str, Any]]]):
              user provided cluster configuration.
          step_name: The name of the EMR step.
      """
  
      if (
          "Name" in cluster_config
          or "AutoTerminationPolicy" in cluster_config
          or "Steps" in cluster_config
      ):
          raise ValueError(
              ERR_STR_WITH_NAME_AUTO_TERMINATION_OR_STEPS.format(
                  step_name=step_name
              )
          )
  
      if INSTANCES not in cluster_config:
          raise ValueError(
              ERR_STR_WITHOUT_INSTANCE.format(step_name=step_name)
          )
  
      if (
          "KeepJobFlowAliveWhenNoSteps" in cluster_config[INSTANCES]
          or "TerminationProtected" in cluster_config[INSTANCES]
      ):
          raise ValueError(
              ERR_STR_WITH_KEEPJOBFLOW_OR_TERMINATIONPROTECTED.format(
                  step_name=step_name
              )
          )
  
      if (
          INSTANCEGROUPS in cluster_config[INSTANCES]
          and INSTANCEFLEETS in cluster_config[INSTANCES]
      ) or (
          INSTANCEGROUPS not in cluster_config[INSTANCES]
          and INSTANCEFLEETS not in cluster_config[INSTANCES]
      ):
          raise ValueError(
              ERR_STR_BOTH_OR_NONE_INSTANCEGROUPS_OR_INSTANCEFLEETS.format(
                  step_name=step_name
              )
          )
  
file_path: sagemaker-python-sdk/src/sagemaker/workflow/emr_step.py
imports: from __future__ import absolute_import
  from typing import Any, Dict, List, Union, Optional
  from sagemaker.workflow.entities import RequestType
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.step_collections import StepCollection
  from sagemaker.workflow.steps import Step, StepTypeEnum, CacheConfig
label_desc: Use image node_id 1 for calling the EMRStep obj's underlying member method code with example usage: obj._validate_cluster_config(cluster_config, step_name) without return types