DeadlineCloud / Client / update_worker_schedule

update_worker_schedule#

DeadlineCloud.Client.update_worker_schedule(**kwargs)#

Updates the schedule for a worker.

See also: AWS API Documentation

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': ...
        }
    }
)
Parameters:
  • farmId (string) –

    [REQUIRED]

    The farm ID to update.

  • fleetId (string) –

    [REQUIRED]

    The fleet ID to update.

  • workerId (string) –

    [REQUIRED]

    The worker ID to update.

  • updatedSessionActions (dict) –

    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.

        • 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.

Return type:

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'
                                }
                            }
                        },
                        '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. 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.

                • syncInputJobAttachments (dict) –

                  The job attachment to sync with an assigned session action.

                  • stepId (string) –

                    The step ID.

          • 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

  • DeadlineCloud.Client.exceptions.AccessDeniedException

  • DeadlineCloud.Client.exceptions.InternalServerErrorException

  • DeadlineCloud.Client.exceptions.ResourceNotFoundException

  • DeadlineCloud.Client.exceptions.ThrottlingException

  • DeadlineCloud.Client.exceptions.ConflictException

  • DeadlineCloud.Client.exceptions.ValidationException