:doc:`SageMaker <../../sagemaker>` / Client / create_cluster_scheduler_config

*******************************
create_cluster_scheduler_config
*******************************



.. py:method:: SageMaker.Client.create_cluster_scheduler_config(**kwargs)

  

  Create cluster policy configuration. This policy is used for task prioritization and fair-share allocation of idle compute. This helps prioritize critical workloads and distributes idle compute across entities.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateClusterSchedulerConfig>`_  


  **Request Syntax**
  ::

    response = client.create_cluster_scheduler_config(
        Name='string',
        ClusterArn='string',
        SchedulerConfig={
            'PriorityClasses': [
                {
                    'Name': 'string',
                    'Weight': 123
                },
            ],
            'FairShare': 'Enabled'|'Disabled',
            'IdleResourceSharing': 'Enabled'|'Disabled'
        },
        Description='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    Name for the cluster policy.

    

  
  :type ClusterArn: string
  :param ClusterArn: **[REQUIRED]** 

    ARN of the cluster.

    

  
  :type SchedulerConfig: dict
  :param SchedulerConfig: **[REQUIRED]** 

    Configuration about the monitoring schedule.

    

  
    - **PriorityClasses** *(list) --* 

      List of the priority classes, ``PriorityClass``, of the cluster policy. When specified, these class configurations define how tasks are queued.

      

    
      - *(dict) --* 

        Priority class configuration. When included in ``PriorityClasses``, these class configurations define how tasks are queued.

        

      
        - **Name** *(string) --* **[REQUIRED]** 

          Name of the priority class.

          

        
        - **Weight** *(integer) --* **[REQUIRED]** 

          Weight of the priority class. The value is within a range from 0 to 100, where 0 is the default.

           

          A weight of 0 is the lowest priority and 100 is the highest. Weight 0 is the default.

          

        
      
  
    - **FairShare** *(string) --* 

      When enabled, entities borrow idle compute based on their assigned ``FairShareWeight``.

       

      When disabled, entities borrow idle compute based on a first-come first-serve basis.

       

      Default is ``Enabled``.

      

    
    - **IdleResourceSharing** *(string) --* 

      Configuration for sharing idle compute resources across entities in the cluster. When enabled, unallocated resources are automatically calculated and made available for entities to borrow.

      

    
  
  :type Description: string
  :param Description: 

    Description of the cluster policy.

    

  
  :type Tags: list
  :param Tags: 

    Tags of the cluster policy.

    

  
    - *(dict) --* 

      A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

       

      You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see `AddTags <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AddTags.html>`__.

       

      For more information on adding metadata to your Amazon Web Services resources with tagging, see `Tagging Amazon Web Services resources <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html>`__. For advice on best practices for managing Amazon Web Services resources with tagging, see `Tagging Best Practices\: Implement an Effective Amazon Web Services Resource Tagging Strategy <https://d1.awsstatic.com/whitepapers/aws-tagging-best-practices.pdf>`__.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The tag key. Tag keys must be unique per resource.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The tag value.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ClusterSchedulerConfigArn': 'string',
          'ClusterSchedulerConfigId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ClusterSchedulerConfigArn** *(string) --* 

        ARN of the cluster policy.

        
      

      - **ClusterSchedulerConfigId** *(string) --* 

        ID of the cluster policy.

        
  
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ConflictException`

  
  *   :py:class:`SageMaker.Client.exceptions.ResourceLimitExceeded`

  