:doc:`DeadlineCloud <../../deadline>` / Client / update_worker_schedule

**********************
update_worker_schedule
**********************



.. py:method:: DeadlineCloud.Client.update_worker_schedule(**kwargs)

  

  Updates the schedule for a worker.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/deadline-2023-10-12/UpdateWorkerSchedule>`_  


  **Request Syntax**
  ::

    response = client.update_worker_schedule(
        farmId='string',
        fleetId='string',
        workerId='string',
        updatedSessionActions={
            'string': {
                'completedStatus': 'SUCCEEDED'|'FAILED'|'INTERRUPTED'|'CANCELED'|'NEVER_ATTEMPTED',
                'processExitCode': 123,
                'progressMessage': 'string',
                'startedAt': datetime(2015, 1, 1),
                'endedAt': datetime(2015, 1, 1),
                'updatedAt': datetime(2015, 1, 1),
                'progressPercent': ...,
                'manifests': [
                    {
                        'outputManifestPath': 'string',
                        'outputManifestHash': 'string'
                    },
                ]
            }
        }
    )
    
  :type farmId: string
  :param farmId: **[REQUIRED]** 

    The farm ID to update.

    

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

    The fleet ID to update.

    

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

    The worker ID to update.

    

  
  :type updatedSessionActions: dict
  :param updatedSessionActions: 

    The session actions associated with the worker schedule to update.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        The updated session action information as it relates to completion and progress of the session.

        

      
        - **completedStatus** *(string) --* 

          The status of the session upon completion.

          

        
        - **processExitCode** *(integer) --* 

          The process exit code. The default Deadline Cloud worker agent converts unsigned 32-bit exit codes to signed 32-bit exit codes.

          

        
        - **progressMessage** *(string) --* 

          A message to indicate the progress of the updated session action.

          

        
        - **startedAt** *(datetime) --* 

          The date and time the resource started running.

          

        
        - **endedAt** *(datetime) --* 

          The date and time the resource ended running.

          

        
        - **updatedAt** *(datetime) --* 

          The updated time.

          

        
        - **progressPercent** *(float) --* 

          The percentage completed.

          

        
        - **manifests** *(list) --* 

          A list of output manifest properties reported by the worker agent, with each entry corresponding to a manifest property in the job.

          

        
          - *(dict) --* 

            The output manifest properties reported by the worker agent for a completed task run.

            

          
            - **outputManifestPath** *(string) --* 

              The manifest file path.

              

            
            - **outputManifestHash** *(string) --* 

              The hash value of the file.

              

            
          
      
      


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

    
    ::

      {
          'assignedSessions': {
              'string': {
                  'queueId': 'string',
                  'jobId': 'string',
                  'sessionActions': [
                      {
                          'sessionActionId': 'string',
                          'definition': {
                              'envEnter': {
                                  'environmentId': 'string'
                              },
                              'envExit': {
                                  'environmentId': 'string'
                              },
                              'taskRun': {
                                  'taskId': 'string',
                                  'stepId': 'string',
                                  'parameters': {
                                      'string': {
                                          'int': 'string',
                                          'float': 'string',
                                          'string': 'string',
                                          'path': 'string',
                                          'chunkInt': 'string'
                                      }
                                  }
                              },
                              'syncInputJobAttachments': {
                                  'stepId': 'string'
                              }
                          }
                      },
                  ],
                  'logConfiguration': {
                      'logDriver': 'string',
                      'options': {
                          'string': 'string'
                      },
                      'parameters': {
                          'string': 'string'
                      },
                      'error': 'string'
                  }
              }
          },
          'cancelSessionActions': {
              'string': [
                  'string',
              ]
          },
          'desiredWorkerStatus': 'STOPPED',
          'updateIntervalSeconds': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **assignedSessions** *(dict) --* 

        The assigned sessions to update.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            The assigned session for the worker.

            
            

            - **queueId** *(string) --* 

              The queue ID of the assigned session.

              
            

            - **jobId** *(string) --* 

              The job ID for the assigned session.

              
            

            - **sessionActions** *(list) --* 

              The session actions to apply to the assigned session.

              
              

              - *(dict) --* 

                The action for a session defined by the session action ID.

                
                

                - **sessionActionId** *(string) --* 

                  The session action ID for the assigned session.

                  
                

                - **definition** *(dict) --* 

                  The definition of the assigned session action.

                  .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``envEnter``, ``envExit``, ``taskRun``, ``syncInputJobAttachments``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                
                  

                  - **envEnter** *(dict) --* 

                    The environment a session starts on.

                    
                    

                    - **environmentId** *(string) --* 

                      The environment ID of the assigned environment at the start of a session.

                      
                
                  

                  - **envExit** *(dict) --* 

                    The environment a session exits from.

                    
                    

                    - **environmentId** *(string) --* 

                      The environment ID of the assigned environment when exiting a session.

                      
                
                  

                  - **taskRun** *(dict) --* 

                    The task run.

                    
                    

                    - **taskId** *(string) --* 

                      The task ID.

                      
                    

                    - **stepId** *(string) --* 

                      The step ID.

                      
                    

                    - **parameters** *(dict) --* 

                      The parameters to include.

                      
                      

                      - *(string) --* 
                        

                        - *(dict) --* 

                          The data types for the task parameters.

                          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``int``, ``float``, ``string``, ``path``, ``chunkInt``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                        
                          

                          - **int** *(string) --* 

                            A signed integer represented as a string.

                            
                          

                          - **float** *(string) --* 

                            A double precision IEEE-754 floating point number represented as a string.

                            
                          

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

                            A UTF-8 string.

                            
                          

                          - **path** *(string) --* 

                            A file system path represented as a string.

                            
                          

                          - **chunkInt** *(string) --* 

                            A range (for example 1-10) or selection of specific (for example 1,3,7,8,10) integers represented as a string.

                            
                      
                  
                
                
                  

                  - **syncInputJobAttachments** *(dict) --* 

                    The job attachments to sync for the assigned session action.

                    
                    

                    - **stepId** *(string) --* 

                      The step ID for the assigned sync input job attachments session action.

                      
                
              
            
          
            

            - **logConfiguration** *(dict) --* 

              The log configuration for the worker's assigned session.

              
              

              - **logDriver** *(string) --* 

                The log drivers for worker related logs.

                
              

              - **options** *(dict) --* 

                The options for a log driver.

                
                

                - *(string) --* 
                  

                  - *(string) --* 
            
          
              

              - **parameters** *(dict) --* 

                The parameters for the log configuration.

                
                

                - *(string) --* 
                  

                  - *(string) --* 
            
          
              

              - **error** *(string) --* 

                The log configuration error details.

                
          
        
    
  
      

      - **cancelSessionActions** *(dict) --* 

        The session actions associated with the worker schedule to cancel.

        
        

        - *(string) --* 
          

          - *(list) --* 
            

            - *(string) --* 
        
    
  
      

      - **desiredWorkerStatus** *(string) --* 

        The status to update the worker to.

        
      

      - **updateIntervalSeconds** *(integer) --* 

        Updates the time interval (in seconds) for the schedule.

        
  
  **Exceptions**
  
  *   :py:class:`DeadlineCloud.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ThrottlingException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ConflictException`

  
  *   :py:class:`DeadlineCloud.Client.exceptions.ValidationException`

  